#pragma once


#define WM_USR_DEF_GAP              1000                                // Below Commented values are correct iff WM_USER = 0x400 (not always the case)

#define WM_ON_SWITCH_DOWN           (WM_USER + WM_USR_DEF_GAP + 0)                              // 2024
#define WM_ON_JAM                   (WM_USER + WM_USR_DEF_GAP + 1)                              // 2025
#define WM_ON_JAM_RESET             (WM_USER + WM_USR_DEF_GAP + 2)                              // 2026
#define WM_ON_WARNING               (WM_USER + WM_USR_DEF_GAP + 3)                              // 2027
#define WM_ON_SET_SHEET             (WM_USER + WM_USR_DEF_GAP + 4)                              // 2028
#define WM_ON_POWER_UP_COMPLETE     (WM_USER + WM_USR_DEF_GAP + 6)                              // 2030
#define WM_ON_CLOSE_LOT_COMPLETE    (WM_USER + WM_USR_DEF_GAP + 7)                              // 2031
#define WM_ON_SHORTCUT              (WM_USER + WM_USR_DEF_GAP + 8)                              // 2032
#define WM_ON_MAINT_MESSAGE         (WM_USER + WM_USR_DEF_GAP + 9)                              // 2033
//  general message for modules to
// inform GUI of an event not handle by GUI dll
#define WM_ON_GENERAL_MESSAGE       (WM_USER + WM_USR_DEF_GAP + 10)                             // 2034
#define WM_ON_DISABLE_MENU          (WM_USER + WM_USR_DEF_GAP + 11)                             // 2035
#define WM_ON_ENABLE_MENU           (WM_USER + WM_USR_DEF_GAP + 12)                             // 2036
#define WM_ON_ACTION_COMPLETE       (WM_USER + WM_USR_DEF_GAP + 13)                             // 2037
#define WM_ON_CLOSE_SPLASH          (WM_USER + WM_USR_DEF_GAP + 14)                             // 2038
#define WM_ON_CLOSE_STATUS_DISPLAY  (WM_USER + WM_USR_DEF_GAP + 15)                             // 2039
#define WM_ON_MACHINE_STOPPING      (WM_USER + WM_USR_DEF_GAP + 16)                             // 2040
#define WM_ON_MACHINE_EOL           (WM_USER + WM_USR_DEF_GAP + 17)                             // 2041
#define WM_ON_MACHINE_INITIALISING  (WM_USER + WM_USR_DEF_GAP + 18)                             // 2042
#define WM_ON_SEND_SECGEM_EVENT     (WM_USER + WM_USR_DEF_GAP + 19)                             // 2043
// ems status
#define WM_ON_EMS_STATUS            (WM_USER + WM_USR_DEF_GAP + 20)                             // 2044
// App Close request from WPF UI
#define WM_ON_APP_CLOSE_REQ         (WM_USER + WM_USR_DEF_GAP + 21)                             // 2045

//
#define WM_ON_REQUEST_SEND_MESSAGE_TO_ALL_PROPERTY_PAGES        (WM_USER + WM_USR_DEF_GAP + 30) // 2054
#define WM_ON_MESSAGE_FROM_PROPERTY_SHEETS                      (WM_USER + WM_USR_DEF_GAP + 31) // 2055

#define WM_ON_WPF_THIRDPARTY_MESSAGE                            (WM_USER + WM_USR_DEF_GAP + 80) // 2104

// to close loop ui<->control tcp handshake
#define WM_ON_CONTROL_MESSAGE                  (WM_USER + WM_USR_DEF_GAP + 81 )     // 2105
// refer to CONTROL_MSG_ENUM for wp value



//#define WM_ON_SECSGEM_TO_HANDLER    WM_USER + 1500
//#define WM_ON_THREAD_INTERRUPTED   (WM_USER + 0x701)
#define WM_ON_SECSGEM_TO_HANDLER    (WM_USER + WM_USR_DEF_GAP + 500)

#define WM_ON_GUI_TO_WAF_HANDLER_0     (WM_USER + WM_USR_DEF_GAP + 550) // Message 550 to 549 reserved for
#define WM_ON_GUI_TO_WAF_HANDLER_1     (WM_USER + WM_USR_DEF_GAP + 551) // Wafer-Table Related infro
#define WM_ON_GUI_TO_WAF_HANDLER_2     (WM_USER + WM_USR_DEF_GAP + 552)
#define WM_ON_GUI_TO_WAF_HANDLER_3     (WM_USER + WM_USR_DEF_GAP + 553)
#define WM_ON_GUI_TO_WAF_HANDLER_4     (WM_USER + WM_USR_DEF_GAP + 554)
#define WM_ON_GUI_TO_WAF_HANDLER_5     (WM_USER + WM_USR_DEF_GAP + 555)
#define WM_ON_GUI_TO_WAF_HANDLER_6     (WM_USER + WM_USR_DEF_GAP + 556)
#define WM_ON_GUI_TO_WAF_HANDLER_7     (WM_USER + WM_USR_DEF_GAP + 557)
#define WM_ON_GUI_TO_WAF_HANDLER_8     (WM_USER + WM_USR_DEF_GAP + 558)
#define WM_ON_GUI_TO_WAF_HANDLER_9     (WM_USER + WM_USR_DEF_GAP + 559)

#define WM_ON_GUI_TO_OPER_0           (WM_USER + WM_USR_DEF_GAP + 560) // Message 550 to 549 reserved for
#define WM_ON_GUI_TO_OPER_1           (WM_USER + WM_USR_DEF_GAP + 561) // Wafer-Table Related infro
#define WM_ON_GUI_TO_OPER_2           (WM_USER + WM_USR_DEF_GAP + 562)
#define WM_ON_GUI_TO_OPER_3           (WM_USER + WM_USR_DEF_GAP + 563)
#define WM_ON_GUI_TO_OPER_4           (WM_USER + WM_USR_DEF_GAP + 564)
#define WM_ON_GUI_TO_OPER_5           (WM_USER + WM_USR_DEF_GAP + 565)
#define WM_ON_GUI_TO_OPER_6           (WM_USER + WM_USR_DEF_GAP + 566)
#define WM_ON_GUI_TO_OPER_7           (WM_USER + WM_USR_DEF_GAP + 567)
#define WM_ON_GUI_TO_OPER_8           (WM_USER + WM_USR_DEF_GAP + 568)
#define WM_ON_GUI_TO_OPER_9           (WM_USER + WM_USR_DEF_GAP + 569)


#define WM_ON_WAF_GUI_MAP_UPDATE      WM_ON_GUI_TO_WAF_HANDLER_0

#define WM_ON_THREAD_INTERRUPTED    (WM_USER + WM_USR_DEF_GAP + 793)

#define WM_ON_TESTMSG           (WM_USER + WM_USR_DEF_GAP + 801)

//
#define WM_ON_GUI_TO_HANDLER    (WM_USER + WM_USR_DEF_GAP + 1000)



// wp param for WM_ON_CONTROL_MESSAGE
enum CONTROL_MSG_ENUM {
    CTRL_ALL_RUNS_RDY,
    CTRL_INITPARAMS_DONE,
    CTRL_RESTART_DONE,
    CTRL_OPEN_LOT_COMPLETE,

};