diff options
author | Rr42 | 2018-05-25 10:13:59 +0530 |
---|---|---|
committer | Rr42 | 2018-05-25 10:13:59 +0530 |
commit | f7669a3fcc87d4f6040257c3dd8708c263331458 (patch) | |
tree | 9eb6b47b5911eb1f13776caaa341aab40cabe5e7 /ldmicro/includes/components/componentfunctions.h | |
parent | 8deab843fa6d616086955702c77751f631badc0d (diff) | |
download | LDMicroGtk-f7669a3fcc87d4f6040257c3dd8708c263331458.tar.gz LDMicroGtk-f7669a3fcc87d4f6040257c3dd8708c263331458.tar.bz2 LDMicroGtk-f7669a3fcc87d4f6040257c3dd8708c263331458.zip |
Added all LDmicro filles to be ported
Diffstat (limited to 'ldmicro/includes/components/componentfunctions.h')
-rw-r--r-- | ldmicro/includes/components/componentfunctions.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/ldmicro/includes/components/componentfunctions.h b/ldmicro/includes/components/componentfunctions.h new file mode 100644 index 0000000..916bf00 --- /dev/null +++ b/ldmicro/includes/components/componentfunctions.h @@ -0,0 +1,63 @@ +#ifndef _COMPONENT_FUNCTIONS +#define _COMPONENT_FUNCTIONS + +//Few Prerequisites +extern HFONT MyNiceFont; +extern HFONT MyFixedFont; +extern HWND OkButton; +extern HWND CancelButton; +extern HINSTANCE* ComponentInstance; + +extern BOOL DlgDone; +extern BOOL DlgCancel; +extern HWND ComponentDialog; + +// Common Functions + +void FontNice(HWND h); +void FontFixed(HWND h); +HWND* CreateDialogWindow(LPCTSTR title, int x, int y, int width, int height, int style); +void ShowDialogWindow(void); +BOOL ProcessDialogWindow(void); + +/*Initialization Functions*/ +int InitSwitch(void* ComponentAddress); +int InitRelay(void* ComponentAddress); +int InitSpdt(void* ComponentAddress); +int InitDpst(void* ComponentAddress); +int InitDpdt(void* ComponentAddress); + +/*Event Handlers*/ +void HandleSwitchEvent(void* ComponentAddress, int Event, BOOL SimulationStarted, + void* ImageLocation, UINT ImageId, HWND* h); +void HandleRelayEvent(void* ComponentAddress, int Event, BOOL SimulationStarted, + void* ImageLocation, UINT ImageId, HWND* h); +void HandleSpdtEvent(void* ComponentAddress, int Event, BOOL SimulationStarted, + void* ImageLocation, UINT ImageId, HWND* h); +void HandleDpstEvent(void* ComponentAddress, int Event, BOOL SimulationStarted, + void* ImageLocation, UINT ImageId, HWND* h); +void HandleDpdtEvent(void* ComponentAddress, int Event, BOOL SimulationStarted, + void* ImageLocation, UINT ImageId, HWND* h); + +/*Request Handlers*/ +double SwitchVoltChanged(void* ComponentAddress, BOOL SimulationStarted, int index, + double Volt, int Source, void* ImageLocation); +double RelayVoltChanged(void* ComponentAddress, BOOL SimulationStarted, int index, + double Volt, int Source, void* ImageLocation); +double SpdtVoltChanged(void* ComponentAddress, BOOL SimulationStarted, int index, + double Volt, int Source, void* ImageLocation); +double DpstVoltChanged(void* ComponentAddress, BOOL SimulationStarted, int index, + double Volt, int Source, void* ImageLocation); +double DpdtVoltChanged(void* ComponentAddress, BOOL SimulationStarted, int index, + double Volt, int Source, void* ImageLocation); + +/*Program Reference Functions*/ +void SetSwitchIds(int*, void*); +void SetRelayIds(int*, void*); +void SetSpdtIds(int*, void*); +void SetDpstIds(int*, void*); +void SetDpdtIds(int*, void*); + +// Relay Functions + +#endif |