diff options
author | Joursoir <chat@joursoir.net> | 2022-05-04 20:26:36 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-05-04 20:33:33 +0300 |
commit | 42a1a3f9800e96621a91228918cf24f37639f510 (patch) | |
tree | 3452bc5fbdc34bc3dfeb101b0165601e649d5a3a | |
parent | 0127500438ea934128595daea542605e25db1583 (diff) | |
download | umt-42a1a3f9800e96621a91228918cf24f37639f510.tar.gz umt-42a1a3f9800e96621a91228918cf24f37639f510.tar.bz2 umt-42a1a3f9800e96621a91228918cf24f37639f510.zip |
extend state actions API
-rw-r--r-- | UefiMonitorTest/MainMenu.c | 9 | ||||
-rw-r--r-- | UefiMonitorTest/MainMenu.h | 6 | ||||
-rw-r--r-- | UefiMonitorTest/UefiMonitorTest.c | 6 | ||||
-rw-r--r-- | UefiMonitorTest/UefiMonitorTest.h | 1 |
4 files changed, 21 insertions, 1 deletions
diff --git a/UefiMonitorTest/MainMenu.c b/UefiMonitorTest/MainMenu.c index 85c9e64..df13779 100644 --- a/UefiMonitorTest/MainMenu.c +++ b/UefiMonitorTest/MainMenu.c @@ -87,6 +87,15 @@ MainMenuTip ( } VOID +MainMenuChangeParam ( + IN UMT_CONTEXT *Ctx, + IN INT8 ParamStep + ) +{ + +} + +VOID MainMenuChangeValue ( IN UMT_CONTEXT *Ctx, IN INT8 ValueStep diff --git a/UefiMonitorTest/MainMenu.h b/UefiMonitorTest/MainMenu.h index 0b97250..e50418a 100644 --- a/UefiMonitorTest/MainMenu.h +++ b/UefiMonitorTest/MainMenu.h @@ -19,6 +19,12 @@ MainMenuTip ( ); VOID +MainMenuChangeParam ( + IN UMT_CONTEXT *Ctx, + IN INT8 ParamStep + ); + +VOID MainMenuChangeValue ( IN UMT_CONTEXT *Ctx, IN INT8 ValueStep diff --git a/UefiMonitorTest/UefiMonitorTest.c b/UefiMonitorTest/UefiMonitorTest.c index c7034f0..63429d7 100644 --- a/UefiMonitorTest/UefiMonitorTest.c +++ b/UefiMonitorTest/UefiMonitorTest.c @@ -12,7 +12,7 @@ #include "MainMenu.h" STATIC CONST UMT_STATE_ACTIONS mStateActions[UMT_STATE_END] = { - { MainMenuInit, MainMenuDoit, MainMenuTip, MainMenuChangeValue } + { MainMenuInit, MainMenuDoit, MainMenuTip, MainMenuChangeParam, MainMenuChangeValue } }; EFI_HII_HANDLE gUmtHiiHandle = NULL; @@ -148,7 +148,11 @@ HandleInput ( switch (KeyData.Key.ScanCode) { case SCAN_UP: + Ctx->Actions->ChangeParam (Ctx, -1); + break; + case SCAN_DOWN: + Ctx->Actions->ChangeParam (Ctx, +1); break; case SCAN_RIGHT: diff --git a/UefiMonitorTest/UefiMonitorTest.h b/UefiMonitorTest/UefiMonitorTest.h index 0138bce..185b900 100644 --- a/UefiMonitorTest/UefiMonitorTest.h +++ b/UefiMonitorTest/UefiMonitorTest.h @@ -12,6 +12,7 @@ typedef struct { VOID (*Init)(UMT_CONTEXT *); VOID (*Doit)(UMT_CONTEXT *); VOID (*Tip)(UMT_CONTEXT *); + VOID (*ChangeParam)(UMT_CONTEXT *, INT8); VOID (*ChangeValue)(UMT_CONTEXT *, INT8); } UMT_STATE_ACTIONS; |