diff --git a/src/boards/board_Arduino_Uno.cc b/src/boards/board_Arduino_Uno.cc index 3761c726..00f5f46a 100644 --- a/src/boards/board_Arduino_Uno.cc +++ b/src/boards/board_Arduino_Uno.cc @@ -224,15 +224,15 @@ void cboard_Arduino_Uno::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_Arduino_Uno::EvKeyPress(uint key, uint mask) {} +void cboard_Arduino_Uno::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Arduino_Uno::EvKeyRelease(uint key, uint mask) {} +void cboard_Arduino_Uno::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Arduino_Uno::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_Arduino_Uno::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -273,7 +273,7 @@ void cboard_Arduino_Uno::EvMouseButtonPress(uint button, uint x, uint y, uint st // Event on the board -void cboard_Arduino_Uno::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_Arduino_Uno::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_Arduino_Uno.h b/src/boards/board_Arduino_Uno.h index 3fa63a00..5d15ceb6 100644 --- a/src/boards/board_Arduino_Uno.h +++ b/src/boards/board_Arduino_Uno.h @@ -54,13 +54,13 @@ class cboard_Arduino_Uno : public bsim_simavr { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_Blue_Pill.cc b/src/boards/board_Blue_Pill.cc index 57a66f8e..2f388916 100644 --- a/src/boards/board_Blue_Pill.cc +++ b/src/boards/board_Blue_Pill.cc @@ -333,15 +333,15 @@ void cboard_Blue_Pill::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_Blue_Pill::EvKeyPress(uint key, uint mask) {} +void cboard_Blue_Pill::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Blue_Pill::EvKeyRelease(uint key, uint mask) {} +void cboard_Blue_Pill::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Blue_Pill::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_Blue_Pill::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -383,7 +383,7 @@ void cboard_Blue_Pill::EvMouseButtonPress(uint button, uint x, uint y, uint stat // Event on the board -void cboard_Blue_Pill::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_Blue_Pill::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_Blue_Pill.h b/src/boards/board_Blue_Pill.h index 6e6aa2eb..d2402aff 100644 --- a/src/boards/board_Blue_Pill.h +++ b/src/boards/board_Blue_Pill.h @@ -55,13 +55,13 @@ class cboard_Blue_Pill : public bsim_qemu { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_Breadboard.cc b/src/boards/board_Breadboard.cc index 3d3b0523..14823e22 100644 --- a/src/boards/board_Breadboard.cc +++ b/src/boards/board_Breadboard.cc @@ -242,15 +242,15 @@ void cboard_Breadboard::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_Breadboard::EvKeyPress(uint key, uint mask) {} +void cboard_Breadboard::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Breadboard::EvKeyRelease(uint key, uint mask) {} +void cboard_Breadboard::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Breadboard::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_Breadboard::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -296,7 +296,7 @@ void cboard_Breadboard::EvMouseButtonPress(uint button, uint x, uint y, uint sta // Event on the board -void cboard_Breadboard::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_Breadboard::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_Breadboard.h b/src/boards/board_Breadboard.h index 5ab6d170..45348968 100644 --- a/src/boards/board_Breadboard.h +++ b/src/boards/board_Breadboard.h @@ -103,13 +103,13 @@ class cboard_Breadboard : public bsim_picsim, public bsim_simavr { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_C3_DevKitC.cc b/src/boards/board_C3_DevKitC.cc index 2b92951d..e52d48b6 100644 --- a/src/boards/board_C3_DevKitC.cc +++ b/src/boards/board_C3_DevKitC.cc @@ -374,15 +374,15 @@ void cboard_C3_DevKitC::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_C3_DevKitC::EvKeyPress(uint key, uint mask) {} +void cboard_C3_DevKitC::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_C3_DevKitC::EvKeyRelease(uint key, uint mask) {} +void cboard_C3_DevKitC::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_C3_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_C3_DevKitC::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -427,7 +427,7 @@ void cboard_C3_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint sta // Event on the board -void cboard_C3_DevKitC::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_C3_DevKitC::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -662,7 +662,8 @@ void cboard_C3_DevKitC::BoardOptions(int* argc, char** argv) { } } -void cboard_C3_DevKitC::board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) { +void cboard_C3_DevKitC::board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { if (!strcmp(controlname, "b_button2")) { std::string fname = PICSimLab.GetSharePath() + "boards" diff --git a/src/boards/board_C3_DevKitC.h b/src/boards/board_C3_DevKitC.h index 3d46e809..d78edad6 100644 --- a/src/boards/board_C3_DevKitC.h +++ b/src/boards/board_C3_DevKitC.h @@ -61,13 +61,13 @@ class cboard_C3_DevKitC : public bsim_qemu { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file @@ -80,7 +80,8 @@ class cboard_C3_DevKitC : public bsim_qemu { unsigned short GetOutputId(char* name) override; // board combo events void board_Event(const char* controlname) override; - void board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) override; + void board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void MSetAPin(int pin, float value) override; std::string MGetPinName(int pin) override; int MGetPinCount(void) override; diff --git a/src/boards/board_Curiosity.cc b/src/boards/board_Curiosity.cc index 355f05c4..338df98e 100644 --- a/src/boards/board_Curiosity.cc +++ b/src/boards/board_Curiosity.cc @@ -238,7 +238,7 @@ void cboard_Curiosity::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_Curiosity::EvKeyPress(uint key, uint mask) { +void cboard_Curiosity::EvKeyPress(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then activate button (state=0) if (key == '1') { p_BT1 = 0; @@ -247,7 +247,7 @@ void cboard_Curiosity::EvKeyPress(uint key, uint mask) { // Event on the board -void cboard_Curiosity::EvKeyRelease(uint key, uint mask) { +void cboard_Curiosity::EvKeyRelease(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then deactivate button (state=1) if (key == '1') { p_BT1 = 1; @@ -256,7 +256,7 @@ void cboard_Curiosity::EvKeyRelease(uint key, uint mask) { // Event on the board -void cboard_Curiosity::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_Curiosity::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -307,7 +307,7 @@ void cboard_Curiosity::EvMouseButtonPress(uint button, uint x, uint y, uint stat } } -void cboard_Curiosity::EvMouseMove(uint button, uint x, uint y, uint state) { +void cboard_Curiosity::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -327,7 +327,7 @@ void cboard_Curiosity::EvMouseMove(uint button, uint x, uint y, uint state) { // Event on the board -void cboard_Curiosity::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_Curiosity::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_Curiosity.h b/src/boards/board_Curiosity.h index cf215c4a..1f93100b 100644 --- a/src/boards/board_Curiosity.h +++ b/src/boards/board_Curiosity.h @@ -58,15 +58,15 @@ class cboard_Curiosity : public bsim_picsim { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseMove(uint button, uint x, uint y, uint state) override; + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_Curiosity_HPC.cc b/src/boards/board_Curiosity_HPC.cc index abaf0f1e..ebd6fc0d 100644 --- a/src/boards/board_Curiosity_HPC.cc +++ b/src/boards/board_Curiosity_HPC.cc @@ -303,7 +303,7 @@ void cboard_Curiosity_HPC::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_Curiosity_HPC::EvKeyPress(uint key, uint mask) { +void cboard_Curiosity_HPC::EvKeyPress(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then activate button (state=0) if (key == '1') { p_BT[0] = 0; @@ -315,7 +315,7 @@ void cboard_Curiosity_HPC::EvKeyPress(uint key, uint mask) { // Event on the board -void cboard_Curiosity_HPC::EvKeyRelease(uint key, uint mask) { +void cboard_Curiosity_HPC::EvKeyRelease(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then desactivate button (state=1) if (key == '1') { p_BT[0] = 1; @@ -327,7 +327,7 @@ void cboard_Curiosity_HPC::EvKeyRelease(uint key, uint mask) { // Event on the board -void cboard_Curiosity_HPC::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_Curiosity_HPC::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -383,7 +383,7 @@ void cboard_Curiosity_HPC::EvMouseButtonPress(uint button, uint x, uint y, uint } } -void cboard_Curiosity_HPC::EvMouseMove(uint button, uint x, uint y, uint state) { +void cboard_Curiosity_HPC::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -403,7 +403,8 @@ void cboard_Curiosity_HPC::EvMouseMove(uint button, uint x, uint y, uint state) // Event on the board -void cboard_Curiosity_HPC::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_Curiosity_HPC::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_Curiosity_HPC.h b/src/boards/board_Curiosity_HPC.h index e2b2c36a..0bb37aee 100644 --- a/src/boards/board_Curiosity_HPC.h +++ b/src/boards/board_Curiosity_HPC.h @@ -64,15 +64,15 @@ class cboard_Curiosity_HPC : public bsim_picsim { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseMove(uint button, uint x, uint y, uint state) override; + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_DevKitC.cc b/src/boards/board_DevKitC.cc index f1de30f8..348c5c20 100644 --- a/src/boards/board_DevKitC.cc +++ b/src/boards/board_DevKitC.cc @@ -433,15 +433,15 @@ void cboard_DevKitC::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_DevKitC::EvKeyPress(uint key, uint mask) {} +void cboard_DevKitC::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_DevKitC::EvKeyRelease(uint key, uint mask) {} +void cboard_DevKitC::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_DevKitC::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -486,7 +486,7 @@ void cboard_DevKitC::EvMouseButtonPress(uint button, uint x, uint y, uint state) // Event on the board -void cboard_DevKitC::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_DevKitC::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -720,7 +720,8 @@ void cboard_DevKitC::BoardOptions(int* argc, char** argv) { } } -void cboard_DevKitC::board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) { +void cboard_DevKitC::board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { if (!strcmp(controlname, "b_button2")) { std::string fname = PICSimLab.GetSharePath() + "boards" diff --git a/src/boards/board_DevKitC.h b/src/boards/board_DevKitC.h index 03d4cbb4..7deacc18 100644 --- a/src/boards/board_DevKitC.h +++ b/src/boards/board_DevKitC.h @@ -61,13 +61,13 @@ class cboard_DevKitC : public bsim_qemu { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file @@ -80,7 +80,8 @@ class cboard_DevKitC : public bsim_qemu { unsigned short GetOutputId(char* name) override; // board combo events void board_Event(const char* controlname) override; - void board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) override; + void board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void MSetAPin(int pin, float value) override; std::string MGetPinName(int pin) override; int MGetPinCount(void) override; diff --git a/src/boards/board_Franzininho_DIY.cc b/src/boards/board_Franzininho_DIY.cc index ca94745b..7f1b203d 100644 --- a/src/boards/board_Franzininho_DIY.cc +++ b/src/boards/board_Franzininho_DIY.cc @@ -190,15 +190,16 @@ void cboard_Franzininho_DIY::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_Franzininho_DIY::EvKeyPress(uint key, uint mask) {} +void cboard_Franzininho_DIY::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Franzininho_DIY::EvKeyRelease(uint key, uint mask) {} +void cboard_Franzininho_DIY::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_Franzininho_DIY::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_Franzininho_DIY::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { int i; // search for the input area which owner the event @@ -239,7 +240,8 @@ void cboard_Franzininho_DIY::EvMouseButtonPress(uint button, uint x, uint y, uin // Event on the board -void cboard_Franzininho_DIY::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_Franzininho_DIY::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_Franzininho_DIY.h b/src/boards/board_Franzininho_DIY.h index 788e4e04..e9f23211 100644 --- a/src/boards/board_Franzininho_DIY.h +++ b/src/boards/board_Franzininho_DIY.h @@ -53,13 +53,13 @@ class cboard_Franzininho_DIY : public bsim_simavr { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_K16F.cc b/src/boards/board_K16F.cc index c7892075..a8aea1eb 100644 --- a/src/boards/board_K16F.cc +++ b/src/boards/board_K16F.cc @@ -516,7 +516,7 @@ void cboard_K16F::RegisterRemoteControl(void) { output_ids[O_LCD]->status = &lcd; } -void cboard_K16F::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_K16F::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -646,7 +646,7 @@ void cboard_K16F::EvMouseButtonPress(uint button, uint x, uint y, uint state) { } } -void cboard_K16F::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_K16F::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -718,7 +718,7 @@ void cboard_K16F::EvMouseButtonRelease(uint button, uint x, uint y, uint state) } } -void cboard_K16F::EvKeyPress(uint key, uint mask) { +void cboard_K16F::EvKeyPress(unsigned int key, unsigned int mask) { if (key == '1') { p_KEY[0] = 1; output_ids[O_TC1]->update = 1; @@ -770,7 +770,7 @@ void cboard_K16F::EvKeyPress(uint key, uint mask) { } } -void cboard_K16F::EvKeyRelease(uint key, uint mask) { +void cboard_K16F::EvKeyRelease(unsigned int key, unsigned int mask) { if (key == '1') { p_KEY[0] = 0; output_ids[O_TC1]->update = 1; diff --git a/src/boards/board_K16F.h b/src/boards/board_K16F.h index 4906dc32..0d374318 100644 --- a/src/boards/board_K16F.h +++ b/src/boards/board_K16F.h @@ -66,10 +66,10 @@ class cboard_K16F : public bsim_picsim { int MInit(const char* processor, const char* fname, float freq) override; void Reset(void) override; int MDumpMemory(const char* mfname) override; - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void EvOnShow(void) override; void RefreshStatus(void) override; void WritePreferences(void) override; diff --git a/src/boards/board_McLab1.cc b/src/boards/board_McLab1.cc index 9c45aab0..78332eba 100644 --- a/src/boards/board_McLab1.cc +++ b/src/boards/board_McLab1.cc @@ -637,7 +637,7 @@ void cboard_McLab1::RegisterRemoteControl(void) { } } -void cboard_McLab1::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_McLab1::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -702,7 +702,7 @@ void cboard_McLab1::EvMouseButtonPress(uint button, uint x, uint y, uint state) } } -void cboard_McLab1::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_McLab1::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -742,7 +742,7 @@ void cboard_McLab1::EvMouseButtonRelease(uint button, uint x, uint y, uint state } } -void cboard_McLab1::EvKeyPress(uint key, uint mask) { +void cboard_McLab1::EvKeyPress(unsigned int key, unsigned int mask) { if (key == '1') { p_BT[0] = 0; output_ids[O_BRA1]->update = 1; @@ -761,7 +761,7 @@ void cboard_McLab1::EvKeyPress(uint key, uint mask) { } } -void cboard_McLab1::EvKeyRelease(uint key, uint mask) { +void cboard_McLab1::EvKeyRelease(unsigned int key, unsigned int mask) { if (key == '1') { p_BT[0] = 1; output_ids[O_BRA1]->update = 1; diff --git a/src/boards/board_McLab1.h b/src/boards/board_McLab1.h index d91eec31..0621a485 100644 --- a/src/boards/board_McLab1.h +++ b/src/boards/board_McLab1.h @@ -51,10 +51,10 @@ class cboard_McLab1 : public bsim_picsim { void Run_CPU(void) override; std::string GetSupportedDevices(void) override { return "PIC16F628A,PIC16F648A,PIC16F84A,"; }; void Reset(void) override; - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void WritePreferences(void) override; void ReadPreferences(char* name, char* value) override; unsigned short GetInputId(char* name) override; diff --git a/src/boards/board_McLab2.cc b/src/boards/board_McLab2.cc index b8578ca3..4160ee32 100644 --- a/src/boards/board_McLab2.cc +++ b/src/boards/board_McLab2.cc @@ -931,7 +931,7 @@ void cboard_McLab2::RegisterRemoteControl(void) { output_ids[O_P4]->status = &lm4[29]; } -void cboard_McLab2::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_McLab2::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1057,7 +1057,7 @@ void cboard_McLab2::EvMouseButtonPress(uint button, uint x, uint y, uint state) } } -void cboard_McLab2::EvMouseMove(uint button, uint x, uint y, uint state) { +void cboard_McLab2::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1076,7 +1076,7 @@ void cboard_McLab2::EvMouseMove(uint button, uint x, uint y, uint state) { } } -void cboard_McLab2::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_McLab2::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1120,7 +1120,7 @@ void cboard_McLab2::EvMouseButtonRelease(uint button, uint x, uint y, uint state } } -void cboard_McLab2::EvKeyPress(uint key, uint mask) { +void cboard_McLab2::EvKeyPress(unsigned int key, unsigned int mask) { if (key == '1') { p_BT[0] = 0; output_ids[O_BRB0]->update = 1; @@ -1139,7 +1139,7 @@ void cboard_McLab2::EvKeyPress(uint key, uint mask) { } } -void cboard_McLab2::EvKeyRelease(uint key, uint mask) { +void cboard_McLab2::EvKeyRelease(unsigned int key, unsigned int mask) { if (key == '1') { p_BT[0] = 1; output_ids[O_BRB0]->update = 1; diff --git a/src/boards/board_McLab2.h b/src/boards/board_McLab2.h index 68d047a4..48d1d46b 100644 --- a/src/boards/board_McLab2.h +++ b/src/boards/board_McLab2.h @@ -98,11 +98,11 @@ class cboard_McLab2 : public bsim_picsim { int MInit(const char* processor, const char* fname, float freq) override; void Reset(void) override; int MDumpMemory(const char* mfname) override; - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; - void EvMouseMove(uint button, uint x, uint y, uint state) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void EvOnShow(void) override; void RefreshStatus(void) override; void WritePreferences(void) override; diff --git a/src/boards/board_PICGenios.cc b/src/boards/board_PICGenios.cc index 87a5439c..c6f478bc 100644 --- a/src/boards/board_PICGenios.cc +++ b/src/boards/board_PICGenios.cc @@ -1455,7 +1455,7 @@ void cboard_PICGenios::RegisterRemoteControl(void) { output_ids[O_P4]->status = &lm4[29]; } -void cboard_PICGenios::EvMouseMove(uint button, uint x, uint y, uint state) { +void cboard_PICGenios::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1475,7 +1475,7 @@ void cboard_PICGenios::EvMouseMove(uint button, uint x, uint y, uint state) { } } -void cboard_PICGenios::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_PICGenios::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1771,7 +1771,7 @@ void cboard_PICGenios::EvMouseButtonPress(uint button, uint x, uint y, uint stat } } -void cboard_PICGenios::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_PICGenios::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1881,7 +1881,7 @@ void cboard_PICGenios::EvMouseButtonRelease(uint button, uint x, uint y, uint st } } -void cboard_PICGenios::EvKeyPress(uint key, uint mask) { +void cboard_PICGenios::EvKeyPress(unsigned int key, unsigned int mask) { if (key == '1') { p_KEY[0] = 1; output_ids[O_TC1]->update = 1; @@ -1964,7 +1964,7 @@ void cboard_PICGenios::EvKeyPress(uint key, uint mask) { } } -void cboard_PICGenios::EvKeyRelease(uint key, uint mask) { +void cboard_PICGenios::EvKeyRelease(unsigned int key, unsigned int mask) { if (key == '1') { p_KEY[0] = 0; output_ids[O_TC1]->update = 1; diff --git a/src/boards/board_PICGenios.h b/src/boards/board_PICGenios.h index 5fa62b5d..7bf7cc20 100644 --- a/src/boards/board_PICGenios.h +++ b/src/boards/board_PICGenios.h @@ -107,11 +107,11 @@ class cboard_PICGenios : public bsim_picsim { int MInit(const char* processor, const char* fname, float freq) override; void Reset(void) override; int MDumpMemory(const char* mfname) override; - void EvMouseMove(uint button, uint x, uint y, uint state) override; - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void EvOnShow(void) override; void RefreshStatus(void) override; void WritePreferences(void) override; diff --git a/src/boards/board_PQDB.cc b/src/boards/board_PQDB.cc index f55755e8..c2cbcd78 100644 --- a/src/boards/board_PQDB.cc +++ b/src/boards/board_PQDB.cc @@ -959,7 +959,7 @@ void cboard_PQDB::RegisterRemoteControl(void) { output_ids[O_E4]->status = &lm7seg[31]; } -void cboard_PQDB::EvMouseMove(uint button, uint x, uint y, uint state) { +void cboard_PQDB::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -978,7 +978,7 @@ void cboard_PQDB::EvMouseMove(uint button, uint x, uint y, uint state) { } } -void cboard_PQDB::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_PQDB::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1059,7 +1059,7 @@ void cboard_PQDB::EvMouseButtonPress(uint button, uint x, uint y, uint state) { } } -void cboard_PQDB::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_PQDB::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -1130,7 +1130,7 @@ void cboard_PQDB::EvMouseButtonRelease(uint button, uint x, uint y, uint state) } } -void cboard_PQDB::EvKeyPress(uint key, uint mask) { +void cboard_PQDB::EvKeyPress(unsigned int key, unsigned int mask) { if (key == '1') { p_KEY[0] = 1; output_ids[O_TC1]->update = 1; @@ -1173,7 +1173,7 @@ void cboard_PQDB::EvKeyPress(uint key, uint mask) { } } -void cboard_PQDB::EvKeyRelease(uint key, uint mask) { +void cboard_PQDB::EvKeyRelease(unsigned int key, unsigned int mask) { if (key == '1') { p_KEY[0] = 0; output_ids[O_TC1]->update = 1; diff --git a/src/boards/board_PQDB.h b/src/boards/board_PQDB.h index 8b52689e..af82b62e 100644 --- a/src/boards/board_PQDB.h +++ b/src/boards/board_PQDB.h @@ -192,11 +192,11 @@ class cboard_PQDB : public bsim_picsim { std::string GetSupportedDevices(void) override { return "PIC18F4520,PIC18F4550,PIC18F4620,"; }; void Reset(void) override; - void EvMouseMove(uint button, uint x, uint y, uint state) override; - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void EvOnShow(void) override; void RefreshStatus(void) override; void WritePreferences(void) override; diff --git a/src/boards/board_RemoteTCP.cc b/src/boards/board_RemoteTCP.cc index 9ba7858c..c205731f 100644 --- a/src/boards/board_RemoteTCP.cc +++ b/src/boards/board_RemoteTCP.cc @@ -281,15 +281,15 @@ void cboard_RemoteTCP::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_RemoteTCP::EvKeyPress(uint key, uint mask) {} +void cboard_RemoteTCP::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_RemoteTCP::EvKeyRelease(uint key, uint mask) {} +void cboard_RemoteTCP::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_RemoteTCP::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_RemoteTCP::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -337,7 +337,7 @@ void cboard_RemoteTCP::EvMouseButtonPress(uint button, uint x, uint y, uint stat // Event on the board -void cboard_RemoteTCP::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_RemoteTCP::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_RemoteTCP.h b/src/boards/board_RemoteTCP.h index a13b1399..af668753 100644 --- a/src/boards/board_RemoteTCP.h +++ b/src/boards/board_RemoteTCP.h @@ -54,13 +54,13 @@ class cboard_RemoteTCP : public bsim_remote { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Event on the board void EvThreadRun(void) override; // Called ever 1s to refresh status diff --git a/src/boards/board_STM32_H103.cc b/src/boards/board_STM32_H103.cc index 295740c2..262c835c 100644 --- a/src/boards/board_STM32_H103.cc +++ b/src/boards/board_STM32_H103.cc @@ -361,15 +361,15 @@ void cboard_STM32_H103::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_STM32_H103::EvKeyPress(uint key, uint mask) {} +void cboard_STM32_H103::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_STM32_H103::EvKeyRelease(uint key, uint mask) {} +void cboard_STM32_H103::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_STM32_H103::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_STM32_H103::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -415,7 +415,7 @@ void cboard_STM32_H103::EvMouseButtonPress(uint button, uint x, uint y, uint sta // Event on the board -void cboard_STM32_H103::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_STM32_H103::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_STM32_H103.h b/src/boards/board_STM32_H103.h index f78b7caf..4b730366 100644 --- a/src/boards/board_STM32_H103.h +++ b/src/boards/board_STM32_H103.h @@ -57,13 +57,13 @@ class cboard_STM32_H103 : public bsim_qemu { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_Xpress.cc b/src/boards/board_Xpress.cc index 55240723..85c798cc 100644 --- a/src/boards/board_Xpress.cc +++ b/src/boards/board_Xpress.cc @@ -212,7 +212,7 @@ void cboard_Xpress::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_Xpress::EvKeyPress(uint key, uint mask) { +void cboard_Xpress::EvKeyPress(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then activate button (state=0) if (key == '1') { p_BT1 = 0; @@ -221,7 +221,7 @@ void cboard_Xpress::EvKeyPress(uint key, uint mask) { // Event on the board -void cboard_Xpress::EvKeyRelease(uint key, uint mask) { +void cboard_Xpress::EvKeyRelease(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then deactivate button (state=1) if (key == '1') { p_BT1 = 1; @@ -230,7 +230,7 @@ void cboard_Xpress::EvKeyRelease(uint key, uint mask) { // Event on the board -void cboard_Xpress::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_Xpress::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -277,7 +277,7 @@ void cboard_Xpress::EvMouseButtonPress(uint button, uint x, uint y, uint state) } } -void cboard_Xpress::EvMouseMove(uint button, uint x, uint y, uint state) { +void cboard_Xpress::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -297,7 +297,7 @@ void cboard_Xpress::EvMouseMove(uint button, uint x, uint y, uint state) { // Event on the board -void cboard_Xpress::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_Xpress::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_Xpress.h b/src/boards/board_Xpress.h index ae92c838..dbc26041 100644 --- a/src/boards/board_Xpress.h +++ b/src/boards/board_Xpress.h @@ -56,15 +56,15 @@ class cboard_Xpress : public bsim_picsim { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseMove(uint button, uint x, uint y, uint state) override; + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_gpboard.cc b/src/boards/board_gpboard.cc index 51ffa4f1..016427af 100644 --- a/src/boards/board_gpboard.cc +++ b/src/boards/board_gpboard.cc @@ -129,15 +129,15 @@ void cboard_gpboard::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_gpboard::EvKeyPress(uint key, uint mask) {} +void cboard_gpboard::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_gpboard::EvKeyRelease(uint key, uint mask) {} +void cboard_gpboard::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_gpboard::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_gpboard::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -180,7 +180,7 @@ void cboard_gpboard::EvMouseButtonPress(uint button, uint x, uint y, uint state) // Event on the board -void cboard_gpboard::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_gpboard::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_gpboard.h b/src/boards/board_gpboard.h index f46d2355..580cd2f7 100644 --- a/src/boards/board_gpboard.h +++ b/src/boards/board_gpboard.h @@ -53,13 +53,13 @@ class cboard_gpboard : public bsim_gpsim { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_uCboard.cc b/src/boards/board_uCboard.cc index 80b08370..c03e83c8 100644 --- a/src/boards/board_uCboard.cc +++ b/src/boards/board_uCboard.cc @@ -130,15 +130,15 @@ void cboard_uCboard::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_uCboard::EvKeyPress(uint key, uint mask) {} +void cboard_uCboard::EvKeyPress(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_uCboard::EvKeyRelease(uint key, uint mask) {} +void cboard_uCboard::EvKeyRelease(unsigned int key, unsigned int mask) {} // Event on the board -void cboard_uCboard::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_uCboard::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -183,7 +183,7 @@ void cboard_uCboard::EvMouseButtonPress(uint button, uint x, uint y, uint state) // Event on the board -void cboard_uCboard::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_uCboard::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_uCboard.h b/src/boards/board_uCboard.h index 0de834c6..5d21794e 100644 --- a/src/boards/board_uCboard.h +++ b/src/boards/board_uCboard.h @@ -53,13 +53,13 @@ class cboard_uCboard : public bsim_ucsim { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/board_x.cc b/src/boards/board_x.cc index 7caabb7f..c9a90067 100644 --- a/src/boards/board_x.cc +++ b/src/boards/board_x.cc @@ -234,7 +234,7 @@ void cboard_x::ReadPreferences(char* name, char* value) { // Event on the board -void cboard_x::EvKeyPress(uint key, uint mask) { +void cboard_x::EvKeyPress(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then activate button (state=0) if (key == '1') { p_BT1 = 0; @@ -250,7 +250,7 @@ void cboard_x::EvKeyPress(uint key, uint mask) { // Event on the board -void cboard_x::EvKeyRelease(uint key, uint mask) { +void cboard_x::EvKeyRelease(unsigned int key, unsigned int mask) { // if keyboard key 1 is pressed then deactivate button (state=1) if (key == '1') { p_BT1 = 1; @@ -260,7 +260,7 @@ void cboard_x::EvKeyRelease(uint key, uint mask) { // Event on the board -void cboard_x::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void cboard_x::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event @@ -320,7 +320,7 @@ void cboard_x::EvMouseButtonPress(uint button, uint x, uint y, uint state) { // Event on the board -void cboard_x::EvMouseMove(uint button, uint x, uint y, uint state) { +void cboard_x::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; for (i = 0; i < inputc; i++) { @@ -343,7 +343,7 @@ void cboard_x::EvMouseMove(uint button, uint x, uint y, uint state) { // Event on the board -void cboard_x::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void cboard_x::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int i; // search for the input area which owner the event diff --git a/src/boards/board_x.h b/src/boards/board_x.h index 1fb7812d..5b1029b7 100644 --- a/src/boards/board_x.h +++ b/src/boards/board_x.h @@ -64,15 +64,15 @@ class cboard_x : public bsim_picsim { // Reset board status void Reset(void) override; // Event on the board - void EvMouseButtonPress(uint button, uint x, uint y, uint state) override; + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseButtonRelease(uint button, uint x, uint y, uint state) override; + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvMouseMove(uint button, uint x, uint y, uint state) override; + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) override; // Event on the board - void EvKeyPress(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; // Event on the board - void EvKeyRelease(uint key, uint mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; // Called ever 1s to refresh status void RefreshStatus(void) override; // Called to save board preferences in configuration file diff --git a/src/boards/bsim_qemu.h b/src/boards/bsim_qemu.h index 89df8659..e1e34c48 100644 --- a/src/boards/bsim_qemu.h +++ b/src/boards/bsim_qemu.h @@ -26,6 +26,8 @@ #ifndef BOARD_QEMU_H #define BOARD_QEMU_H +#include "lxrad.h" + #include "../devices/bitbang_i2c.h" #include "../devices/bitbang_pwm.h" #include "../devices/bitbang_spi.h" @@ -33,8 +35,6 @@ #include "../lib/board.h" #include "qemu.h" -#include "lxrad.h" - typedef enum { QEMU_SIM_NONE = 0, QEMU_SIM_STM32, QEMU_SIM_ESP32, QEMU_SIM_ESP32_C3 } QEMUSimType; #define TTIMEOUT (BASETIMER * 1000000L) diff --git a/src/lib/board.cc b/src/lib/board.cc index c883bda1..efd11c45 100644 --- a/src/lib/board.cc +++ b/src/lib/board.cc @@ -23,6 +23,8 @@ For e-mail suggestions : lcgamboa@yahoo.com ######################################################################## */ +#define _USE_MATH_DEFINES + #include "board.h" #include #include "picsimlab.h" diff --git a/src/lib/board.h b/src/lib/board.h index abaae690..ad635f5e 100644 --- a/src/lib/board.h +++ b/src/lib/board.h @@ -143,27 +143,27 @@ class board { /** * @brief Event on the board */ - virtual void EvMouseButtonPress(uint button, uint x, uint y, uint state) = 0; + virtual void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) = 0; /** * @brief Event on the board */ - virtual void EvMouseButtonRelease(uint button, uint x, uint y, uint state) = 0; + virtual void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) = 0; /** * @brief Event on the board */ - virtual void EvMouseMove(uint button, uint x, uint y, uint state){}; + virtual void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state){}; /** * @brief Event on the board */ - virtual void EvKeyPress(uint key, uint mask) = 0; + virtual void EvKeyPress(unsigned int key, unsigned int mask) = 0; /** * @brief Event on the board */ - virtual void EvKeyRelease(uint key, uint mask) = 0; + virtual void EvKeyRelease(unsigned int key, unsigned int mask) = 0; /** * @brief Event on the board @@ -208,7 +208,8 @@ class board { /** * @brief Called when window side controls are activated */ - virtual void board_ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state){}; + virtual void board_ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state){}; /** * @brief Called once on board creation diff --git a/src/lib/part.cc b/src/lib/part.cc index 31ccfbb6..67a04fb8 100644 --- a/src/lib/part.cc +++ b/src/lib/part.cc @@ -558,7 +558,7 @@ void part::Draw(void) { } } -void part::EvMouseButtonPress(uint button, uint x, uint y, uint state) { +void part::EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { for (int i = 0; i < inputc; i++) { if (PointInside(x, y, input[i])) { unsigned int xr = x; @@ -569,7 +569,7 @@ void part::EvMouseButtonPress(uint button, uint x, uint y, uint state) { } } -void part::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { +void part::EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { for (int i = 0; i < inputc; i++) { if (PointInside(x, y, input[i])) { unsigned int xr = x; @@ -580,7 +580,7 @@ void part::EvMouseButtonRelease(uint button, uint x, uint y, uint state) { } } -void part::EvMouseMove(uint button, uint x, uint y, uint state) { +void part::EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state) { int none = 1; for (int i = 0; i < inputc; i++) { if (PointInside(x, y, input[i])) { diff --git a/src/lib/part.h b/src/lib/part.h index af9229e7..24f52c3b 100644 --- a/src/lib/part.h +++ b/src/lib/part.h @@ -136,42 +136,45 @@ class part { /** * @brief Event handler on the part */ - void EvMouseButtonPress(uint button, uint x, uint y, uint state); + void EvMouseButtonPress(unsigned int button, unsigned int x, unsigned int y, unsigned int state); /** * @brief Event handler on the part */ - virtual void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state){}; + virtual void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state){}; /** * @brief Event handler on the part */ - void EvMouseButtonRelease(uint button, uint x, uint y, uint state); + void EvMouseButtonRelease(unsigned int button, unsigned int x, unsigned int y, unsigned int state); /** * @brief Event handler on the part */ - virtual void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state){}; + virtual void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state){}; /** * @brief Event handler on the part */ - void EvMouseMove(uint button, uint x, uint y, uint state); + void EvMouseMove(unsigned int button, unsigned int x, unsigned int y, unsigned int state); /** * @brief Event handler on the part */ - virtual void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state){}; + virtual void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state){}; /** * @brief Event handler on the part */ - virtual void EvKeyPress(uint key, uint mask){}; + virtual void EvKeyPress(unsigned int key, unsigned int mask){}; /** * @brief Event handler on the part */ - virtual void EvKeyRelease(uint key, uint mask){}; + virtual void EvKeyRelease(unsigned int key, unsigned int mask){}; /** * @brief Called to save part preferences in configuration file @@ -216,12 +219,13 @@ class part { /** * @brief Used by windows of parts */ - virtual void ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state){}; + virtual void ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state){}; /** * @brief Used by windows of parts */ - virtual void KeyEvent(const char* controlname, uint keysym, uint ukeysym, uint state){}; + virtual void KeyEvent(const char* controlname, unsigned int keysym, unsigned int ukeysym, unsigned int state){}; /** * @brief Used by windows of parts diff --git a/src/parts/input_ADXL345.cc b/src/parts/input_ADXL345.cc index 369bce44..7b667fc8 100644 --- a/src/parts/input_ADXL345.cc +++ b/src/parts/input_ADXL345.cc @@ -333,7 +333,8 @@ unsigned char cpart_ADXL345::getValues(unsigned char addr) { return value; } -void cpart_ADXL345::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ADXL345::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { unsigned char value; switch (inputId) { @@ -364,7 +365,8 @@ void cpart_ADXL345::OnMouseButtonPress(uint inputId, uint button, uint x, uint y } } -void cpart_ADXL345::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ADXL345::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_VS1: active[0] = 0; @@ -381,7 +383,8 @@ void cpart_ADXL345::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_ADXL345::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ADXL345::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { unsigned char value; switch (inputId) { diff --git a/src/parts/input_ADXL345.h b/src/parts/input_ADXL345.h index bed0685f..b4bf1d65 100644 --- a/src/parts/input_ADXL345.h +++ b/src/parts/input_ADXL345.h @@ -43,9 +43,12 @@ class cpart_ADXL345 : public part { void Process(void) override; void PostProcess(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_LDR.cc b/src/parts/input_LDR.cc index c9f3b73e..f78e0ab2 100644 --- a/src/parts/input_LDR.cc +++ b/src/parts/input_LDR.cc @@ -149,7 +149,8 @@ void cpart_LDR::PostProcess(void) { } } -void cpart_LDR::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_LDR::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: value = (y - input_ids[I_PO1]->y1) * 1.66; @@ -161,7 +162,8 @@ void cpart_LDR::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, ui } } -void cpart_LDR::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_LDR::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active = 0; @@ -170,7 +172,8 @@ void cpart_LDR::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, } } -void cpart_LDR::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_LDR::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active) { diff --git a/src/parts/input_LDR.h b/src/parts/input_LDR.h index ee3f2f54..02f1d36b 100644 --- a/src/parts/input_LDR.h +++ b/src/parts/input_LDR.h @@ -37,9 +37,12 @@ class cpart_LDR : public part { ~cpart_LDR(void); void DrawOutput(const unsigned int index) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_MPU6050.cc b/src/parts/input_MPU6050.cc index 6ac0417e..96f2f4ee 100644 --- a/src/parts/input_MPU6050.cc +++ b/src/parts/input_MPU6050.cc @@ -375,7 +375,8 @@ unsigned char cpart_MPU6050::getValues(unsigned char addr) { return value; } -void cpart_MPU6050::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_MPU6050::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { unsigned char value; switch (inputId) { @@ -430,7 +431,8 @@ void cpart_MPU6050::OnMouseButtonPress(uint inputId, uint button, uint x, uint y } } -void cpart_MPU6050::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_MPU6050::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_VS1: active[0] = 0; @@ -459,7 +461,8 @@ void cpart_MPU6050::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_MPU6050::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_MPU6050::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { unsigned char value; switch (inputId) { diff --git a/src/parts/input_MPU6050.h b/src/parts/input_MPU6050.h index 58fa3ffb..eaff6371 100644 --- a/src/parts/input_MPU6050.h +++ b/src/parts/input_MPU6050.h @@ -42,9 +42,12 @@ class cpart_MPU6050 : public part { void PreProcess(void) override; void Process(void) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_bmp180.cc b/src/parts/input_bmp180.cc index abe91680..b15270ae 100644 --- a/src/parts/input_bmp180.cc +++ b/src/parts/input_bmp180.cc @@ -176,7 +176,8 @@ void cpart_bmp180::Process(void) { ppins[input_pins[1] - 1].value)); } -void cpart_bmp180::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_bmp180::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -195,7 +196,8 @@ void cpart_bmp180::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_bmp180::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_bmp180::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -208,7 +210,8 @@ void cpart_bmp180::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_bmp180::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_bmp180::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/input_bmp180.h b/src/parts/input_bmp180.h index 29c00e8b..a56ed544 100644 --- a/src/parts/input_bmp180.h +++ b/src/parts/input_bmp180.h @@ -39,9 +39,12 @@ class cpart_bmp180 : public part { void DrawOutput(const unsigned int index) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_bmp280.cc b/src/parts/input_bmp280.cc index e5c2b379..c4dbe249 100644 --- a/src/parts/input_bmp280.cc +++ b/src/parts/input_bmp280.cc @@ -224,7 +224,8 @@ void cpart_bmp280::Process(void) { } } -void cpart_bmp280::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_bmp280::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -243,7 +244,8 @@ void cpart_bmp280::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_bmp280::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_bmp280::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -256,7 +258,8 @@ void cpart_bmp280::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_bmp280::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_bmp280::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/input_bmp280.h b/src/parts/input_bmp280.h index 49e47ba4..20a9a046 100644 --- a/src/parts/input_bmp280.h +++ b/src/parts/input_bmp280.h @@ -39,9 +39,12 @@ class cpart_bmp280 : public part { void DrawOutput(const unsigned int index) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_dht11.cc b/src/parts/input_dht11.cc index 905af55b..07c4a7eb 100644 --- a/src/parts/input_dht11.cc +++ b/src/parts/input_dht11.cc @@ -150,7 +150,8 @@ void cpart_dht11::Process(void) { } } -void cpart_dht11::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_dht11::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -169,7 +170,8 @@ void cpart_dht11::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_dht11::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_dht11::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -182,7 +184,8 @@ void cpart_dht11::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y } } -void cpart_dht11::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_dht11::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/input_dht11.h b/src/parts/input_dht11.h index 7c78f591..2d348fc9 100644 --- a/src/parts/input_dht11.h +++ b/src/parts/input_dht11.h @@ -40,9 +40,12 @@ class cpart_dht11 : public part { void Reset(void) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_dht22.cc b/src/parts/input_dht22.cc index 9adda1f6..3c010de8 100644 --- a/src/parts/input_dht22.cc +++ b/src/parts/input_dht22.cc @@ -150,7 +150,8 @@ void cpart_dht22::Process(void) { } } -void cpart_dht22::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_dht22::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -169,7 +170,8 @@ void cpart_dht22::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_dht22::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_dht22::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -182,7 +184,8 @@ void cpart_dht22::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y } } -void cpart_dht22::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_dht22::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/input_dht22.h b/src/parts/input_dht22.h index 5cbe4502..388f26bd 100644 --- a/src/parts/input_dht22.h +++ b/src/parts/input_dht22.h @@ -40,9 +40,12 @@ class cpart_dht22 : public part { void Reset(void) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_ds1621.cc b/src/parts/input_ds1621.cc index af7256e7..c0615419 100644 --- a/src/parts/input_ds1621.cc +++ b/src/parts/input_ds1621.cc @@ -218,7 +218,8 @@ void cpart_ds1621::Process(void) { // TODO implement Tout output } -void cpart_ds1621::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ds1621::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: value = (y - input_ids[I_PO1]->y1) * 1.66; @@ -230,7 +231,8 @@ void cpart_ds1621::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_ds1621::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ds1621::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active = 0; @@ -239,7 +241,8 @@ void cpart_ds1621::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_ds1621::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ds1621::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active) { diff --git a/src/parts/input_ds1621.h b/src/parts/input_ds1621.h index 21639f39..b9af21f3 100644 --- a/src/parts/input_ds1621.h +++ b/src/parts/input_ds1621.h @@ -39,9 +39,12 @@ class cpart_ds1621 : public part { void DrawOutput(const unsigned int index) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_ds18b20.cc b/src/parts/input_ds18b20.cc index 3d6d59e1..dbef3edb 100644 --- a/src/parts/input_ds18b20.cc +++ b/src/parts/input_ds18b20.cc @@ -132,7 +132,8 @@ void cpart_ds18b20::Process(void) { } } -void cpart_ds18b20::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ds18b20::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -144,7 +145,8 @@ void cpart_ds18b20::OnMouseButtonPress(uint inputId, uint button, uint x, uint y } } -void cpart_ds18b20::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ds18b20::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -153,7 +155,8 @@ void cpart_ds18b20::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_ds18b20::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ds18b20::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/input_ds18b20.h b/src/parts/input_ds18b20.h index d49ccf7b..fc8d1dda 100644 --- a/src/parts/input_ds18b20.h +++ b/src/parts/input_ds18b20.h @@ -41,9 +41,12 @@ class cpart_ds18b20 : public part { void Reset(void) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_encoder.cc b/src/parts/input_encoder.cc index c856fee9..91d23207 100644 --- a/src/parts/input_encoder.cc +++ b/src/parts/input_encoder.cc @@ -23,6 +23,8 @@ For e-mail suggestions : lcgamboa@yahoo.com ######################################################################## */ +#define _USE_MATH_DEFINES + #include "input_encoder.h" #include "../lib/oscilloscope.h" #include "../lib/picsimlab.h" @@ -223,7 +225,8 @@ void cpart_encoder::Process(void) { } } -void cpart_encoder::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_encoder::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_RT1: if (p_BTN) { @@ -240,7 +243,8 @@ void cpart_encoder::OnMouseButtonPress(uint inputId, uint button, uint x, uint y } } -void cpart_encoder::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_encoder::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_RT1: active = 0; @@ -254,7 +258,8 @@ void cpart_encoder::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_encoder::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_encoder::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_RT1: if (active) { diff --git a/src/parts/input_encoder.h b/src/parts/input_encoder.h index 43df56d3..2ef2d9e7 100644 --- a/src/parts/input_encoder.h +++ b/src/parts/input_encoder.h @@ -39,9 +39,12 @@ class cpart_encoder : public part { void DrawOutput(const unsigned int index) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_fm50.cc b/src/parts/input_fm50.cc index bcdbd4c9..2194d51f 100644 --- a/src/parts/input_fm50.cc +++ b/src/parts/input_fm50.cc @@ -108,7 +108,8 @@ void cpart_fm50::PostProcess(void) { } } -void cpart_fm50::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_fm50::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: value = (y - input_ids[I_PO1]->y1) * 1.66; @@ -120,7 +121,8 @@ void cpart_fm50::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, u } } -void cpart_fm50::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_fm50::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active = 0; @@ -129,7 +131,8 @@ void cpart_fm50::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, } } -void cpart_fm50::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_fm50::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active) { diff --git a/src/parts/input_fm50.h b/src/parts/input_fm50.h index d175f88b..400a6531 100644 --- a/src/parts/input_fm50.h +++ b/src/parts/input_fm50.h @@ -37,9 +37,12 @@ class cpart_fm50 : public part { ~cpart_fm50(void); void DrawOutput(const unsigned int index) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_gamepad.cc b/src/parts/input_gamepad.cc index d02e68ab..7ab98218 100644 --- a/src/parts/input_gamepad.cc +++ b/src/parts/input_gamepad.cc @@ -178,7 +178,8 @@ void cpart_gamepad::PreProcess(void) { SpareParts.SetAPin(output_pins[7], 2.5 * (value[1]) / jr); } -void cpart_gamepad::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_gamepad::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value[0] = 0; @@ -224,7 +225,8 @@ void cpart_gamepad::OnMouseButtonPress(uint inputId, uint button, uint x, uint y } } -void cpart_gamepad::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_gamepad::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value[0] = 1; @@ -259,7 +261,8 @@ void cpart_gamepad::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_gamepad::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_gamepad::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_J1: if (active) { @@ -284,7 +287,7 @@ void cpart_gamepad::OnMouseMove(uint inputId, uint button, uint x, uint y, uint } } -void cpart_gamepad::EvKeyPress(uint key, uint mask) { +void cpart_gamepad::EvKeyPress(unsigned int key, unsigned int mask) { switch (key) { case 'W': case 'w': @@ -373,7 +376,7 @@ void cpart_gamepad::EvKeyPress(uint key, uint mask) { } } -void cpart_gamepad::EvKeyRelease(uint key, uint mask) { +void cpart_gamepad::EvKeyRelease(unsigned int key, unsigned int mask) { switch (key) { case 'W': case 'A': diff --git a/src/parts/input_gamepad.h b/src/parts/input_gamepad.h index 83f67a9f..a827a9ac 100644 --- a/src/parts/input_gamepad.h +++ b/src/parts/input_gamepad.h @@ -39,11 +39,14 @@ class cpart_gamepad : public part { void PostInit(void) override; void DrawOutput(const unsigned int index) override; void PreProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_gamepad_an.cc b/src/parts/input_gamepad_an.cc index caab4da6..370e3d34 100644 --- a/src/parts/input_gamepad_an.cc +++ b/src/parts/input_gamepad_an.cc @@ -170,7 +170,8 @@ void cpart_gamepad_an::PreProcess(void) { output_value_an_ = output_value_an; } -void cpart_gamepad_an::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_gamepad_an::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value[0] = 0; @@ -195,7 +196,8 @@ void cpart_gamepad_an::OnMouseButtonPress(uint inputId, uint button, uint x, uin } } -void cpart_gamepad_an::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_gamepad_an::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value[0] = 1; @@ -220,7 +222,7 @@ void cpart_gamepad_an::OnMouseButtonRelease(uint inputId, uint button, uint x, u } } -void cpart_gamepad_an::EvKeyPress(uint key, uint mask) { +void cpart_gamepad_an::EvKeyPress(unsigned int key, unsigned int mask) { switch (key) { case 'I': case 'i': @@ -250,7 +252,7 @@ void cpart_gamepad_an::EvKeyPress(uint key, uint mask) { } } -void cpart_gamepad_an::EvKeyRelease(uint key, uint mask) { +void cpart_gamepad_an::EvKeyRelease(unsigned int key, unsigned int mask) { switch (key) { case 'I': case 'i': diff --git a/src/parts/input_gamepad_an.h b/src/parts/input_gamepad_an.h index cc850992..1b1ef9f4 100644 --- a/src/parts/input_gamepad_an.h +++ b/src/parts/input_gamepad_an.h @@ -39,10 +39,12 @@ class cpart_gamepad_an : public part { void DrawOutput(const unsigned int index) override; void PreProcess(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_hcsr04.cc b/src/parts/input_hcsr04.cc index 36cc1cfd..981ba644 100644 --- a/src/parts/input_hcsr04.cc +++ b/src/parts/input_hcsr04.cc @@ -142,7 +142,8 @@ void cpart_hcsr04::Process(void) { } } -void cpart_hcsr04::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_hcsr04::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: value = (y - input_ids[I_PO1]->y1) * 1.66; @@ -154,7 +155,8 @@ void cpart_hcsr04::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_hcsr04::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_hcsr04::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active = 0; @@ -163,7 +165,8 @@ void cpart_hcsr04::OnMouseButtonRelease(uint inputId, uint button, uint x, uint } } -void cpart_hcsr04::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_hcsr04::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active) { diff --git a/src/parts/input_hcsr04.h b/src/parts/input_hcsr04.h index 4fd94ca5..0c87d177 100644 --- a/src/parts/input_hcsr04.h +++ b/src/parts/input_hcsr04.h @@ -37,9 +37,12 @@ class cpart_hcsr04 : public part { ~cpart_hcsr04(void); void DrawOutput(const unsigned int index) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_hx711.cc b/src/parts/input_hx711.cc index 179c90a6..a6c1357c 100644 --- a/src/parts/input_hx711.cc +++ b/src/parts/input_hx711.cc @@ -171,7 +171,8 @@ void cpart_hx711::Reset(void) { sen_hx711_rst(&hx711); } -void cpart_hx711::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_hx711::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -183,7 +184,8 @@ void cpart_hx711::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_hx711::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_hx711::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -192,7 +194,8 @@ void cpart_hx711::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y } } -void cpart_hx711::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_hx711::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/input_hx711.h b/src/parts/input_hx711.h index 3b69540f..1aab680a 100644 --- a/src/parts/input_hx711.h +++ b/src/parts/input_hx711.h @@ -40,9 +40,12 @@ class cpart_hx711 : public part { void PreProcess(void) override; void Process(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_keypad.cc b/src/parts/input_keypad.cc index 51956e4e..7c306978 100644 --- a/src/parts/input_keypad.cc +++ b/src/parts/input_keypad.cc @@ -313,7 +313,8 @@ void cpart_keypad::Process(void) { refresh++; } -void cpart_keypad::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_keypad::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_K1: keys[0][0] = 1; @@ -408,7 +409,8 @@ void cpart_keypad::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_keypad::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_keypad::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_K1: keys[0][0] = 0; diff --git a/src/parts/input_keypad.h b/src/parts/input_keypad.h index ca458434..1a2897b3 100644 --- a/src/parts/input_keypad.h +++ b/src/parts/input_keypad.h @@ -39,8 +39,10 @@ class cpart_keypad : public part { void Process(void) override; std::string GetPictureFileName(void) override; std::string GetMapFile(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_lm35.cc b/src/parts/input_lm35.cc index 9ba90619..103bb13e 100644 --- a/src/parts/input_lm35.cc +++ b/src/parts/input_lm35.cc @@ -108,7 +108,8 @@ void cpart_lm35::PostProcess(void) { } } -void cpart_lm35::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_lm35::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: value = (y - input_ids[I_PO1]->y1) * 1.66; @@ -120,7 +121,8 @@ void cpart_lm35::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, u } } -void cpart_lm35::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_lm35::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active = 0; @@ -129,7 +131,8 @@ void cpart_lm35::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, } } -void cpart_lm35::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_lm35::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active) { diff --git a/src/parts/input_lm35.h b/src/parts/input_lm35.h index c3c95a5b..4c86c303 100644 --- a/src/parts/input_lm35.h +++ b/src/parts/input_lm35.h @@ -37,9 +37,12 @@ class cpart_lm35 : public part { ~cpart_lm35(void); void DrawOutput(const unsigned int index) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_ntc.cc b/src/parts/input_ntc.cc index 5121cc08..0d964594 100644 --- a/src/parts/input_ntc.cc +++ b/src/parts/input_ntc.cc @@ -124,7 +124,8 @@ void cpart_ntc::PostProcess(void) { } } -void cpart_ntc::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ntc::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: value = (y - input_ids[I_PO1]->y1) * 1.66; @@ -136,7 +137,8 @@ void cpart_ntc::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, ui } } -void cpart_ntc::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ntc::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active = 0; @@ -145,7 +147,8 @@ void cpart_ntc::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, } } -void cpart_ntc::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ntc::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active) { diff --git a/src/parts/input_ntc.h b/src/parts/input_ntc.h index c224520d..bfe9dbb8 100644 --- a/src/parts/input_ntc.h +++ b/src/parts/input_ntc.h @@ -37,9 +37,12 @@ class cpart_ntc : public part { ~cpart_ntc(void); void DrawOutput(const unsigned int index) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_pot.cc b/src/parts/input_pot.cc index 1fe1d0ab..b1333749 100644 --- a/src/parts/input_pot.cc +++ b/src/parts/input_pot.cc @@ -129,7 +129,8 @@ void cpart_pot::PreProcess(void) { } } -void cpart_pot::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pot::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = 200 - ((y - input_ids[I_PO1]->y1) * 1.66); @@ -162,7 +163,8 @@ void cpart_pot::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, ui } } -void cpart_pot::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pot::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -183,7 +185,8 @@ void cpart_pot::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, } } -void cpart_pot::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pot::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: case I_PO2: diff --git a/src/parts/input_pot.h b/src/parts/input_pot.h index 97f79184..aa8fcf78 100644 --- a/src/parts/input_pot.h +++ b/src/parts/input_pot.h @@ -37,9 +37,12 @@ class cpart_pot : public part { ~cpart_pot(void); void DrawOutput(const unsigned int index) override; void PreProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; void LoadPartImage(void) override; diff --git a/src/parts/input_pot_r.cc b/src/parts/input_pot_r.cc index ef306bc3..67f0781e 100644 --- a/src/parts/input_pot_r.cc +++ b/src/parts/input_pot_r.cc @@ -23,6 +23,8 @@ For e-mail suggestions : lcgamboa@yahoo.com ######################################################################## */ +#define _USE_MATH_DEFINES + #include "input_pot_r.h" #include "../lib/oscilloscope.h" #include "../lib/picsimlab.h" @@ -146,7 +148,8 @@ void cpart_pot_r::PreProcess(void) { } } -void cpart_pot_r::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pot_r::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = CalcAngle(inputId, x, y); @@ -171,7 +174,8 @@ void cpart_pot_r::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_pot_r::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pot_r::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -192,7 +196,8 @@ void cpart_pot_r::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y } } -void cpart_pot_r::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pot_r::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1 ... I_PO4: if (active[inputId - I_PO1]) { diff --git a/src/parts/input_pot_r.h b/src/parts/input_pot_r.h index 376ffcfe..6bfb62a2 100644 --- a/src/parts/input_pot_r.h +++ b/src/parts/input_pot_r.h @@ -37,9 +37,12 @@ class cpart_pot_r : public part { ~cpart_pot_r(void); void DrawOutput(const unsigned int index) override; void PreProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; void LoadPartImage(void) override; diff --git a/src/parts/input_push_buttons.cc b/src/parts/input_push_buttons.cc index 75eaa50c..bee72824 100644 --- a/src/parts/input_push_buttons.cc +++ b/src/parts/input_push_buttons.cc @@ -225,7 +225,8 @@ void cpart_pbuttons::Process(void) { } } -void cpart_pbuttons::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pbuttons::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value[0] = active; @@ -262,7 +263,8 @@ void cpart_pbuttons::OnMouseButtonPress(uint inputId, uint button, uint x, uint } } -void cpart_pbuttons::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pbuttons::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value[0] = !active; diff --git a/src/parts/input_push_buttons.h b/src/parts/input_push_buttons.h index c6c4ac39..7fea0d32 100644 --- a/src/parts/input_push_buttons.h +++ b/src/parts/input_push_buttons.h @@ -41,8 +41,10 @@ class cpart_pbuttons : public part { void PreProcess(void) override; void Process(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; void LoadPartImage(void) override; diff --git a/src/parts/input_push_buttons_an.cc b/src/parts/input_push_buttons_an.cc index a5163d5a..55a9f4c2 100644 --- a/src/parts/input_push_buttons_an.cc +++ b/src/parts/input_push_buttons_an.cc @@ -194,7 +194,8 @@ void cpart_pbuttons_an::PreProcess(void) { SpareParts.SetAPin(output_pins[0], output_value); } -void cpart_pbuttons_an::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pbuttons_an::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value_[0] = active; @@ -231,7 +232,8 @@ void cpart_pbuttons_an::OnMouseButtonPress(uint inputId, uint button, uint x, ui } } -void cpart_pbuttons_an::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_pbuttons_an::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_B1: output_value_[0] = !active; diff --git a/src/parts/input_push_buttons_an.h b/src/parts/input_push_buttons_an.h index 12b89b37..6e60ccfc 100644 --- a/src/parts/input_push_buttons_an.h +++ b/src/parts/input_push_buttons_an.h @@ -41,8 +41,10 @@ class cpart_pbuttons_an : public part { std::string GetPictureFileName(void) override { return "Push Buttons/part.svg"; }; std::string GetMapFile(void) override { return "Push Buttons/part.map"; }; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_sht3x.cc b/src/parts/input_sht3x.cc index 95df6882..711cd149 100644 --- a/src/parts/input_sht3x.cc +++ b/src/parts/input_sht3x.cc @@ -134,7 +134,8 @@ void cpart_sht3x::PostProcess(void) { } } -void cpart_sht3x::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_sht3x::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -153,7 +154,8 @@ void cpart_sht3x::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, } } -void cpart_sht3x::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_sht3x::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -166,7 +168,8 @@ void cpart_sht3x::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y } } -void cpart_sht3x::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_sht3x::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/input_sht3x.h b/src/parts/input_sht3x.h index e80ca55c..1c8362f2 100644 --- a/src/parts/input_sht3x.h +++ b/src/parts/input_sht3x.h @@ -37,9 +37,12 @@ class cpart_sht3x : public part { ~cpart_sht3x(void); void DrawOutput(const unsigned int index) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/input_switches.cc b/src/parts/input_switches.cc index 9a607ade..00927f0d 100644 --- a/src/parts/input_switches.cc +++ b/src/parts/input_switches.cc @@ -263,7 +263,8 @@ void cpart_switches::Process(void) { } } -void cpart_switches::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_switches::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_S1: output_value[0] ^= 1; diff --git a/src/parts/input_switches.h b/src/parts/input_switches.h index f6509cea..271b5ffa 100644 --- a/src/parts/input_switches.h +++ b/src/parts/input_switches.h @@ -41,7 +41,8 @@ class cpart_switches : public part { void PreProcess(void) override; void Process(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; void LoadPartImage(void) override; diff --git a/src/parts/other_ETH_w5500.cc b/src/parts/other_ETH_w5500.cc index d43052b3..83e6972a 100644 --- a/src/parts/other_ETH_w5500.cc +++ b/src/parts/other_ETH_w5500.cc @@ -370,7 +370,8 @@ void cpart_ETH_w5500::Process(void) { } } -void cpart_ETH_w5500::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_ETH_w5500::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_CONN: link ^= 1; diff --git a/src/parts/other_ETH_w5500.h b/src/parts/other_ETH_w5500.h index 176b825a..5cbeaf36 100644 --- a/src/parts/other_ETH_w5500.h +++ b/src/parts/other_ETH_w5500.h @@ -42,7 +42,8 @@ class cpart_ETH_w5500 : public part { void Process(void) override; void PostProcess(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/other_MI2C_24CXXX.cc b/src/parts/other_MI2C_24CXXX.cc index 239a9aec..38863169 100644 --- a/src/parts/other_MI2C_24CXXX.cc +++ b/src/parts/other_MI2C_24CXXX.cc @@ -274,7 +274,8 @@ void cpart_MI2C_24CXXX::Process(void) { mi2c_io(&mi2c, ppins[input_pins[4] - 1].value, ppins[input_pins[3] - 1].value)); } -void cpart_MI2C_24CXXX::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_MI2C_24CXXX::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_LOAD: SpareParts.WindowCmd(PW_MAIN, "filedialog1", PWA_FILEDIALOGSETTYPE, diff --git a/src/parts/other_MI2C_24CXXX.h b/src/parts/other_MI2C_24CXXX.h index cfa94449..0a2b95ad 100644 --- a/src/parts/other_MI2C_24CXXX.h +++ b/src/parts/other_MI2C_24CXXX.h @@ -41,7 +41,8 @@ class cpart_MI2C_24CXXX : public part { void DrawOutput(const unsigned int index) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void filedialog_EvOnClose(int retId) override; void ReadPropertiesWindow(void) override; diff --git a/src/parts/other_sdcard.cc b/src/parts/other_sdcard.cc index a5fd2bb8..99e7ee97 100644 --- a/src/parts/other_sdcard.cc +++ b/src/parts/other_sdcard.cc @@ -231,7 +231,8 @@ void cpart_SDCard::Process(void) { } } -void cpart_SDCard::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_SDCard::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_CONN: SpareParts.WindowCmd(PW_MAIN, "filedialog1", PWA_FILEDIALOGSETTYPE, diff --git a/src/parts/other_sdcard.h b/src/parts/other_sdcard.h index 8ff0bd8d..7d16ec0d 100644 --- a/src/parts/other_sdcard.h +++ b/src/parts/other_sdcard.h @@ -39,7 +39,8 @@ class cpart_SDCard : public part { void DrawOutput(const unsigned int index) override; void Process(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/output_LCD_ili9341.cc b/src/parts/output_LCD_ili9341.cc index 63ceec03..dcdda1e6 100644 --- a/src/parts/output_LCD_ili9341.cc +++ b/src/parts/output_LCD_ili9341.cc @@ -764,7 +764,8 @@ void cpart_LCD_ili9341::ChangeType(unsigned char tp) { LoadPartImage(); } -void cpart_LCD_ili9341::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_LCD_ili9341::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_LCD: tsc_XPT2046_set_pos(&touch, x - input_ids[I_LCD]->x1, y - input_ids[I_LCD]->y1); @@ -773,7 +774,8 @@ void cpart_LCD_ili9341::OnMouseButtonPress(uint inputId, uint button, uint x, ui } } -void cpart_LCD_ili9341::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_LCD_ili9341::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_LCD: tsc_XPT2046_set_pos(&touch, -1, -1); @@ -782,7 +784,8 @@ void cpart_LCD_ili9341::OnMouseButtonRelease(uint inputId, uint button, uint x, } } -void cpart_LCD_ili9341::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_LCD_ili9341::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_LCD: if (active[0]) { diff --git a/src/parts/output_LCD_ili9341.h b/src/parts/output_LCD_ili9341.h index e8e217bd..eec539a5 100644 --- a/src/parts/output_LCD_ili9341.h +++ b/src/parts/output_LCD_ili9341.h @@ -44,9 +44,12 @@ class cpart_LCD_ili9341 : public part { void PostProcess(void) override; std::string GetPictureFileName(void) override; std::string GetMapFile(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void Reset(void) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; diff --git a/src/parts/output_dcmotor.cc b/src/parts/output_dcmotor.cc index 294357e7..87c5d093 100644 --- a/src/parts/output_dcmotor.cc +++ b/src/parts/output_dcmotor.cc @@ -23,6 +23,8 @@ For e-mail suggestions : lcgamboa@yahoo.com ######################################################################## */ +#define _USE_MATH_DEFINES + #include "output_dcmotor.h" #include "../lib/oscilloscope.h" #include "../lib/picsimlab.h" diff --git a/src/parts/output_servo.cc b/src/parts/output_servo.cc index 03b93bcf..4db5398e 100644 --- a/src/parts/output_servo.cc +++ b/src/parts/output_servo.cc @@ -23,6 +23,8 @@ For e-mail suggestions : lcgamboa@yahoo.com ######################################################################## */ +#define _USE_MATH_DEFINES + #include "output_servo.h" #include "../lib/oscilloscope.h" #include "../lib/picsimlab.h" diff --git a/src/parts/output_step.cc b/src/parts/output_step.cc index 632fada0..b00974c0 100644 --- a/src/parts/output_step.cc +++ b/src/parts/output_step.cc @@ -23,6 +23,8 @@ For e-mail suggestions : lcgamboa@yahoo.com ######################################################################## */ +#define _USE_MATH_DEFINES + #include "output_step.h" #include "../lib/oscilloscope.h" #include "../lib/picsimlab.h" diff --git a/src/parts/virtual_SignalGenerator.cc b/src/parts/virtual_SignalGenerator.cc index 02a32142..16e71d16 100644 --- a/src/parts/virtual_SignalGenerator.cc +++ b/src/parts/virtual_SignalGenerator.cc @@ -23,6 +23,8 @@ For e-mail suggestions : lcgamboa@yahoo.com ######################################################################## */ +#define _USE_MATH_DEFINES + #include "virtual_SignalGenerator.h" #include "../lib/oscilloscope.h" #include "../lib/picsimlab.h" @@ -221,7 +223,8 @@ void cpart_SignalGenerator::Process(void) { } } -void cpart_SignalGenerator::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_SignalGenerator::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, + unsigned int y, unsigned int state) { switch (inputId) { case I_PO1: values[0] = (y - input_ids[I_PO1]->y1) * 1.66; @@ -262,7 +265,8 @@ void cpart_SignalGenerator::OnMouseButtonPress(uint inputId, uint button, uint x } } -void cpart_SignalGenerator::OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_SignalGenerator::OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, + unsigned int y, unsigned int state) { switch (inputId) { case I_PO1: active[0] = 0; @@ -282,7 +286,8 @@ void cpart_SignalGenerator::OnMouseButtonRelease(uint inputId, uint button, uint } } -void cpart_SignalGenerator::OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_SignalGenerator::OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_PO1: if (active[0]) { diff --git a/src/parts/virtual_SignalGenerator.h b/src/parts/virtual_SignalGenerator.h index 197618d6..2f6a2722 100644 --- a/src/parts/virtual_SignalGenerator.h +++ b/src/parts/virtual_SignalGenerator.h @@ -39,9 +39,12 @@ class cpart_SignalGenerator : public part { void DrawOutput(const unsigned int index) override; void PreProcess(void) override; void Process(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseButtonRelease(uint inputId, uint button, uint x, uint y, uint state) override; - void OnMouseMove(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseButtonRelease(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void OnMouseMove(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/virtual_Text.cc b/src/parts/virtual_Text.cc index fc80db87..ed9d639f 100644 --- a/src/parts/virtual_Text.cc +++ b/src/parts/virtual_Text.cc @@ -295,7 +295,8 @@ void cpart_TEXT::ReadPropertiesWindow(void) { ChangeText(Size, Textcolor, Bgcolor); } -void cpart_TEXT::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_TEXT::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { if ((button == 1) && Link.length()) { lxLaunchDefaultBrowser(Link); } diff --git a/src/parts/virtual_Text.h b/src/parts/virtual_Text.h index a2bad7c6..5c345d8d 100644 --- a/src/parts/virtual_Text.h +++ b/src/parts/virtual_Text.h @@ -38,7 +38,8 @@ class cpart_TEXT : public part { ~cpart_TEXT(void); void PostInit(void) override; void DrawOutput(const unsigned int index) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/virtual_VCD_Dump.cc b/src/parts/virtual_VCD_Dump.cc index ec5e6346..fb63cb16 100644 --- a/src/parts/virtual_VCD_Dump.cc +++ b/src/parts/virtual_VCD_Dump.cc @@ -357,7 +357,8 @@ void cpart_VCD_Dump::PostProcess(void) { } } -void cpart_VCD_Dump::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_VCD_Dump::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_START: rec ^= 1; diff --git a/src/parts/virtual_VCD_Dump.h b/src/parts/virtual_VCD_Dump.h index 4dc67477..f7046b75 100644 --- a/src/parts/virtual_VCD_Dump.h +++ b/src/parts/virtual_VCD_Dump.h @@ -40,7 +40,8 @@ class cpart_VCD_Dump : public part { void PreProcess(void) override; void Process(void) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/virtual_VCD_Dump_an.cc b/src/parts/virtual_VCD_Dump_an.cc index 66ae5f56..3fe2a51c 100644 --- a/src/parts/virtual_VCD_Dump_an.cc +++ b/src/parts/virtual_VCD_Dump_an.cc @@ -359,7 +359,8 @@ void cpart_VCD_Dump_an::PostProcess(void) { } } -void cpart_VCD_Dump_an::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_VCD_Dump_an::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_START: rec ^= 1; diff --git a/src/parts/virtual_VCD_Dump_an.h b/src/parts/virtual_VCD_Dump_an.h index f0020f65..5c3a7267 100644 --- a/src/parts/virtual_VCD_Dump_an.h +++ b/src/parts/virtual_VCD_Dump_an.h @@ -43,7 +43,8 @@ class cpart_VCD_Dump_an : public part { std::string GetPictureFileName(void) override { return "VCD Dump/part.svg"; }; std::string GetMapFile(void) override { return "VCD Dump/part.map"; }; std::string GetPropertiesWindowFile(void) override { return "VCD Dump/part.lxrad"; }; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/virtual_VCD_Play.cc b/src/parts/virtual_VCD_Play.cc index 7f8612ca..d083b7b5 100644 --- a/src/parts/virtual_VCD_Play.cc +++ b/src/parts/virtual_VCD_Play.cc @@ -327,7 +327,8 @@ void cpart_VCD_Play::PostProcess(void) { } } -void cpart_VCD_Play::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_VCD_Play::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_LOAD: SpareParts.WindowCmd(PW_MAIN, "filedialog1", PWA_FILEDIALOGSETTYPE, diff --git a/src/parts/virtual_VCD_Play.h b/src/parts/virtual_VCD_Play.h index 77190c1b..e827f5c6 100644 --- a/src/parts/virtual_VCD_Play.h +++ b/src/parts/virtual_VCD_Play.h @@ -45,7 +45,8 @@ class cpart_VCD_Play : public part { void PreProcess(void) override; void Process(void) override; void PostProcess(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void filedialog_EvOnClose(int retId) override; void ReadPropertiesWindow(void) override; diff --git a/src/parts/virtual_d_transfer_function.cc b/src/parts/virtual_d_transfer_function.cc index f745da0d..1bba8698 100644 --- a/src/parts/virtual_d_transfer_function.cc +++ b/src/parts/virtual_d_transfer_function.cc @@ -191,7 +191,7 @@ void cpart_dtfunc::Reset(void) { } void -cpart_dtfunc::EvKeyPress(uint key, uint mask) { +cpart_dtfunc::EvKeyPress(unsigned int key, unsigned int mask) { /* if(key == '1') { @@ -212,7 +212,7 @@ cpart_dtfunc::EvKeyPress(uint key, uint mask) { */ }; void -cpart_dtfunc::EvKeyRelease(uint key, uint mask) { +cpart_dtfunc::EvKeyRelease(unsigned int key, unsigned int mask) { /* if(key == '1') { diff --git a/src/parts/virtual_d_transfer_function.h b/src/parts/virtual_d_transfer_function.h index 93af6aba..39dcaf31 100644 --- a/src/parts/virtual_d_transfer_function.h +++ b/src/parts/virtual_d_transfer_function.h @@ -39,8 +39,8 @@ class cpart_dtfunc : public part { void PreProcess(void) override; void Process(void) override; void Reset(void) override; - void EvKeyPress(uint key, uint mask) override; - void EvKeyRelease(uint key, uint mask) override; + void EvKeyPress(unsigned int key, unsigned int mask) override; + void EvKeyRelease(unsigned int key, unsigned int mask) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; std::string WritePreferences(void) override; diff --git a/src/parts/virtual_vterm.cc b/src/parts/virtual_vterm.cc index 944c6e34..08963d92 100644 --- a/src/parts/virtual_vterm.cc +++ b/src/parts/virtual_vterm.cc @@ -120,7 +120,8 @@ void cpart_vterm::RegisterRemoteControl(void) { output_ids[O_VT]->status = &vt; } -void cpart_vterm::ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) { +void cpart_vterm::ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { if (!strcmp(controlname, "button1")) { char buff[256]; SpareParts.WindowCmd(wvtermId, "edit1", PWA_EDITGETTEXT, NULL, buff); @@ -132,7 +133,7 @@ void cpart_vterm::ButtonEvent(const char* controlname, uint button, uint x, uint } } -void cpart_vterm::KeyEvent(const char* controlname, uint keysym, uint ukeysym, uint state) { +void cpart_vterm::KeyEvent(const char* controlname, unsigned int keysym, unsigned int ukeysym, unsigned int state) { if (!strcmp(controlname, "edit1")) { if (ukeysym == 13) { char buff[256]; @@ -396,7 +397,8 @@ void cpart_vterm::Process(void) { SpareParts.SetPin(pins[1], ret); } -void cpart_vterm::OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) { +void cpart_vterm::OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (inputId) { case I_TERM: if (button == 1) { diff --git a/src/parts/virtual_vterm.h b/src/parts/virtual_vterm.h index b3a902f7..c8f95061 100644 --- a/src/parts/virtual_vterm.h +++ b/src/parts/virtual_vterm.h @@ -41,11 +41,13 @@ class cpart_vterm : public part { void Process(void) override; void PostProcess(void) override; void Reset(void) override; - void OnMouseButtonPress(uint inputId, uint button, uint x, uint y, uint state) override; + void OnMouseButtonPress(unsigned int inputId, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; void ConfigurePropertiesWindow(void) override; void ReadPropertiesWindow(void) override; - void ButtonEvent(const char* controlname, uint button, uint x, uint y, uint state) override; - void KeyEvent(const char* controlname, uint keysym, uint ukeysym, uint state) override; + void ButtonEvent(const char* controlname, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) override; + void KeyEvent(const char* controlname, unsigned int keysym, unsigned int ukeysym, unsigned int state) override; void Event(const char* controlname) override; std::string WritePreferences(void) override; void ReadPreferences(std::string value) override; diff --git a/src/picsimlab1.cc b/src/picsimlab1.cc index 58dd067c..8cfe47f4 100644 --- a/src/picsimlab1.cc +++ b/src/picsimlab1.cc @@ -350,32 +350,37 @@ void CPWindow1::timer2_EvOnTime(CControl* control) { } } -void CPWindow1::draw1_EvMouseMove(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow1::draw1_EvMouseMove(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { x = x / PICSimLab.GetScale(); y = y / PICSimLab.GetScale(); PICSimLab.GetBoard()->EvMouseMove(button, x, y, state); } -void CPWindow1::draw1_EvMouseButtonPress(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow1::draw1_EvMouseButtonPress(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { x = x / PICSimLab.GetScale(); y = y / PICSimLab.GetScale(); PICSimLab.GetBoard()->EvMouseButtonPress(button, x, y, state); } -void CPWindow1::draw1_EvMouseButtonRelease(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow1::draw1_EvMouseButtonRelease(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { x = x / PICSimLab.GetScale(); y = y / PICSimLab.GetScale(); PICSimLab.GetBoard()->EvMouseButtonRelease(button, x, y, state); } -void CPWindow1::draw1_EvKeyboardPress(CControl* control, const uint key, const uint hkey, const uint mask) { +void CPWindow1::draw1_EvKeyboardPress(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask) { PICSimLab.GetBoard()->EvKeyPress(key, mask); } -void CPWindow1::draw1_EvKeyboardRelease(CControl* control, const uint key, const uint hkey, const uint mask) { +void CPWindow1::draw1_EvKeyboardRelease(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask) { PICSimLab.GetBoard()->EvKeyRelease(key, mask); } @@ -1268,7 +1273,8 @@ void CPWindow1::board_Event(CControl* control) { PICSimLab.GetBoard()->board_Event(control->GetName().c_str()); } -void CPWindow1::board_ButtonEvent(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow1::board_ButtonEvent(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { PICSimLab.GetBoard()->board_ButtonEvent(control->GetName().c_str(), button, x, y, state); } diff --git a/src/picsimlab1.h b/src/picsimlab1.h index c23b3619..9c83cb46 100644 --- a/src/picsimlab1.h +++ b/src/picsimlab1.h @@ -110,11 +110,16 @@ class CPWindow1 : public CPWindow { void timer1_EvOnTime(CControl* control); void timer2_EvOnTime(CControl* control); void filedialog1_EvOnClose(const int retId); - void draw1_EvMouseMove(CControl* control, const uint button, const uint x, const uint y, const uint state); - void draw1_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, const uint state); - void draw1_EvMouseButtonRelease(CControl* control, const uint button, const uint x, const uint y, const uint state); - void draw1_EvKeyboardPress(CControl* control, const uint key, const uint hkey, const uint mask); - void draw1_EvKeyboardRelease(CControl* control, const uint key, const uint hkey, const uint mask); + void draw1_EvMouseMove(CControl* control, const unsigned int button, const unsigned int x, const unsigned int y, + const unsigned int state); + void draw1_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void draw1_EvMouseButtonRelease(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void draw1_EvKeyboardPress(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask); + void draw1_EvKeyboardRelease(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask); void combo1_EvOnComboChange(CControl* control); void menu1_File_LoadHex_EvMenuActive(CControl* control); void menu1_File_ReloadLast_EvMenuActive(CControl* control); @@ -147,7 +152,7 @@ class CPWindow1 : public CPWindow { ~CPWindow1(void); void board_Event(CControl* control); - void board_ButtonEvent(CControl* control, uint button, uint x, uint y, uint state); + void board_ButtonEvent(CControl* control, unsigned int button, unsigned int x, unsigned int y, unsigned int state); void thread1_EvThreadRun(CControl* control); void thread2_EvThreadRun(CControl* control); void thread3_EvThreadRun(CControl* control); diff --git a/src/picsimlab2.cc b/src/picsimlab2.cc index 5552ea49..1d4c1e64 100644 --- a/src/picsimlab2.cc +++ b/src/picsimlab2.cc @@ -38,7 +38,8 @@ void CPWindow2::_EvOnShow(CControl* control) { html1.SetHeight(Window2.GetHeight() - 82); } -void CPWindow2::button1_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow2::button1_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { html1.HistoryBack(); } diff --git a/src/picsimlab2.h b/src/picsimlab2.h index 9c61ead7..54045725 100644 --- a/src/picsimlab2.h +++ b/src/picsimlab2.h @@ -36,7 +36,8 @@ class CPWindow2 : public CPWindow { CButton button1; /*#Events*/ void _EvOnShow(CControl* control); - void button1_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); + void button1_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); #endif /*#Others*/ CPWindow2(void); diff --git a/src/picsimlab3.cc b/src/picsimlab3.cc index 2002a105..afde16b9 100644 --- a/src/picsimlab3.cc +++ b/src/picsimlab3.cc @@ -54,7 +54,8 @@ void CPWindow3::_EvOnCreate(CControl* control) { #endif } -void CPWindow3::button1_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow3::button1_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { int osc_on = PICSimLab.GetBoard()->GetUseOscilloscope(); int spare_on = PICSimLab.GetBoard()->GetUseSpareParts(); @@ -95,11 +96,13 @@ void CPWindow3::button1_EvMouseButtonClick(CControl* control, uint button, uint WDestroy(); } -void CPWindow3::button2_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow3::button2_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { WDestroy(); } -void CPWindow3::button3_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow3::button3_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { #ifdef _WIN_ std::string cmd = "explorer "; #else diff --git a/src/picsimlab3.h b/src/picsimlab3.h index 18930313..d5948458 100644 --- a/src/picsimlab3.h +++ b/src/picsimlab3.h @@ -48,9 +48,12 @@ class CPWindow3 : public CPWindow { /*#Events*/ void _EvOnCreate(CControl* control); void _EvOnShow(CControl* control); - void button1_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); - void button2_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); - void button3_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); + void button1_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void button2_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void button3_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); /*#Others*/ CPWindow3(void); }; diff --git a/src/picsimlab4.cc b/src/picsimlab4.cc index 47ee86c7..7adfdf89 100644 --- a/src/picsimlab4.cc +++ b/src/picsimlab4.cc @@ -266,7 +266,8 @@ void CPWindow4::DrawScreen(void) { draw1.Canvas.End(); } -void CPWindow4::button1_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow4::button1_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { #ifndef __WXX11__ colordialog1.SetColor(button1.GetColor()); ctrl = &button1; @@ -274,7 +275,8 @@ void CPWindow4::button1_EvMouseButtonClick(CControl* control, uint button, uint #endif } -void CPWindow4::button2_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow4::button2_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { #ifndef __WXX11__ colordialog1.SetColor(button2.GetColor()); ctrl = &button2; @@ -282,7 +284,8 @@ void CPWindow4::button2_EvMouseButtonClick(CControl* control, uint button, uint #endif } -void CPWindow4::draw1_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow4::draw1_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { // code here:) mprint("draw1_EvMouseButtonClick\n"); } @@ -379,7 +382,8 @@ void CPWindow4::spind6_EvOnChangeSpinDouble(CControl* control) { // autoset -void CPWindow4::button3_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow4::button3_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { int ce = togglebutton1.GetCheck() + togglebutton2.GetCheck() * 2; togglebutton5.SetCheck(1); // trigguer @@ -441,7 +445,8 @@ void CPWindow4::togglebutton6_EvOnToggleButton(CControl* control) { // save PNG -void CPWindow4::button4_EvMouseButtonClick(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow4::button4_EvMouseButtonClick(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { filedialog1.SetType(lxFD_SAVE | lxFD_CHANGE_DIR); filedialog1.Run(); } @@ -458,28 +463,28 @@ void CPWindow4::colordialog1_EvOnClose(int retId) { } } -void CPWindow4::button5_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, - const uint state) { +void CPWindow4::button5_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state) { Oscilloscope.NextMeasure(0); } -void CPWindow4::button6_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, - const uint state) { +void CPWindow4::button6_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state) { Oscilloscope.NextMeasure(1); } -void CPWindow4::button7_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, - const uint state) { +void CPWindow4::button7_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state) { Oscilloscope.NextMeasure(2); } -void CPWindow4::button8_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, - const uint state) { +void CPWindow4::button8_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state) { Oscilloscope.NextMeasure(3); } -void CPWindow4::button9_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, - const uint state) { +void CPWindow4::button9_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state) { Oscilloscope.NextMeasure(4); } diff --git a/src/picsimlab4.h b/src/picsimlab4.h index b6cfedaa..b1db2eb8 100644 --- a/src/picsimlab4.h +++ b/src/picsimlab4.h @@ -85,26 +85,36 @@ class CPWindow4 : public CPWindow { void _EvOnDestroy(CControl* control); void _EvOnShow(CControl* control); void _EvOnHide(CControl* control); - void draw1_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); + void draw1_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); void spind5_EvOnChangeSpinDouble(CControl* control); void spind6_EvOnChangeSpinDouble(CControl* control); - void button1_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); - void button2_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); + void button1_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void button2_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); void togglebutton5_EvOnToggleButton(CControl* control); void spind7_EvOnChangeSpinDouble(CControl* control); void timer1_EvOnTime(CControl* control); void combo2_EvOnComboChange(CControl* control); void combo3_EvOnComboChange(CControl* control); - void button3_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); + void button3_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); void togglebutton6_EvOnToggleButton(CControl* control); - void button4_EvMouseButtonClick(CControl* control, const uint button, const uint x, const uint y, const uint state); + void button4_EvMouseButtonClick(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); void filedialog1_EvOnClose(const int retId); void colordialog1_EvOnClose(const int retId); - void button5_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, const uint state); - void button6_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, const uint state); - void button7_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, const uint state); - void button8_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, const uint state); - void button9_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, const uint state); + void button5_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void button6_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void button7_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void button8_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void button9_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); /*#Others*/ // lxrad automatic generated block end, don't edit above! diff --git a/src/picsimlab5.cc b/src/picsimlab5.cc index 96a68646..7011d7d1 100644 --- a/src/picsimlab5.cc +++ b/src/picsimlab5.cc @@ -105,7 +105,8 @@ void CPWindow5::_EvOnCreate(CControl* control) { PICSimLab.GetBoard()->Reset(); } -void CPWindow5::draw1_EvMouseButtonPress(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow5::draw1_EvMouseButtonPress(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { x = x / SpareParts.GetScale(); y = y / SpareParts.GetScale(); @@ -139,7 +140,8 @@ void CPWindow5::draw1_EvMouseButtonPress(CControl* control, uint button, uint x, } } -void CPWindow5::draw1_EvMouseButtonRelease(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow5::draw1_EvMouseButtonRelease(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { x = x / SpareParts.GetScale(); y = y / SpareParts.GetScale(); @@ -444,7 +446,8 @@ void CPWindow5::PropClose(int tag) { update_all = 1; } -void CPWindow5::PropButtonRelease(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow5::PropButtonRelease(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { switch (control->GetTag()) { case 0: case 1: @@ -473,13 +476,14 @@ void CPWindow5::PropSpinChange(CSpin* control) { SpareParts.GetPart(Window5.PartSelected)->SpinChange(control->GetName().c_str(), control->GetValue()); } -void CPWindow5::PartButtonEvent(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow5::PartButtonEvent(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { if (control->GetTag() < (unsigned int)SpareParts.GetCount()) { SpareParts.GetPart(control->GetTag())->ButtonEvent(control->GetName().c_str(), button, x, y, state); } } -void CPWindow5::PartKeyEvent(CControl* control, uint keysym, uint ukeysym, uint state) { +void CPWindow5::PartKeyEvent(CControl* control, unsigned int keysym, unsigned int ukeysym, unsigned int state) { if (control->GetTag() < (unsigned int)SpareParts.GetCount()) { SpareParts.GetPart(control->GetTag())->KeyEvent(control->GetName().c_str(), keysym, ukeysym, state); } @@ -570,7 +574,8 @@ void CPWindow5::draw1_EvMouseWheel(CControl* control, const int rotation) { } } -void CPWindow5::draw1_EvMouseMove(CControl* control, uint button, uint x, uint y, uint state) { +void CPWindow5::draw1_EvMouseMove(CControl* control, unsigned int button, unsigned int x, unsigned int y, + unsigned int state) { x = x / SpareParts.GetScale(); y = y / SpareParts.GetScale(); @@ -600,7 +605,8 @@ void CPWindow5::draw1_EvMouseMove(CControl* control, uint button, uint x, uint y } } -void CPWindow5::draw1_EvKeyboardPress(CControl* control, const uint key, const uint hkey, const uint mask) { +void CPWindow5::draw1_EvKeyboardPress(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask) { switch (key) { case 'P': case 'p': @@ -638,7 +644,8 @@ void CPWindow5::draw1_EvKeyboardPress(CControl* control, const uint key, const u } } -void CPWindow5::draw1_EvKeyboardRelease(CControl* control, const uint key, const uint hkey, const uint mask) { +void CPWindow5::draw1_EvKeyboardRelease(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask) { for (int i = 0; i < SpareParts.GetCount(); i++) { SpareParts.GetPart(i)->EvKeyRelease(key, mask); } diff --git a/src/picsimlab5.h b/src/picsimlab5.h index ba0bf8d6..0485f75e 100644 --- a/src/picsimlab5.h +++ b/src/picsimlab5.h @@ -74,11 +74,16 @@ class CPWindow5 : public CPWindow { void _EvOnCreate(CControl* control); void _EvOnShow(CControl* control); void _EvOnHide(CControl* control); - void draw1_EvMouseMove(CControl* control, const uint button, const uint x, const uint y, const uint state); - void draw1_EvMouseButtonPress(CControl* control, const uint button, const uint x, const uint y, const uint state); - void draw1_EvMouseButtonRelease(CControl* control, const uint button, const uint x, const uint y, const uint state); - void draw1_EvKeyboardPress(CControl* control, const uint key, const uint hkey, const uint mask); - void draw1_EvKeyboardRelease(CControl* control, const uint key, const uint hkey, const uint mask); + void draw1_EvMouseMove(CControl* control, const unsigned int button, const unsigned int x, const unsigned int y, + const unsigned int state); + void draw1_EvMouseButtonPress(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void draw1_EvMouseButtonRelease(CControl* control, const unsigned int button, const unsigned int x, + const unsigned int y, const unsigned int state); + void draw1_EvKeyboardPress(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask); + void draw1_EvKeyboardRelease(CControl* control, const unsigned int key, const unsigned int hkey, + const unsigned int mask); void draw1_EvMouseWheel(CControl* control, const int rotation); void pmenu2_Properties_EvMenuActive(CControl* control); void timer1_EvOnTime(CControl* control); @@ -108,12 +113,12 @@ class CPWindow5 : public CPWindow { // lxrad automatic generated block end, don't edit above! void menu1_EvMenuActive(CControl* control); - void PropButtonRelease(CControl* control, uint button, uint x, uint y, uint state); + void PropButtonRelease(CControl* control, unsigned int button, unsigned int x, unsigned int y, unsigned int state); void PropComboChange(CCombo* control); void PropSpinChange(CSpin* control); void PropClose(int tag); - void PartButtonEvent(CControl* control, uint button, uint x, uint y, uint state); - void PartKeyEvent(CControl* control, uint keysm, uint ukeysym, uint state); + void PartButtonEvent(CControl* control, unsigned int button, unsigned int x, unsigned int y, unsigned int state); + void PartKeyEvent(CControl* control, unsigned int keysm, unsigned int ukeysym, unsigned int state); void PartEvent(CControl* control); void DeleteParts(void);