diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-31 00:59:15 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-31 00:59:15 +0000 |
commit | b18e7050464b0809e0c8366219447e87c9124551 (patch) | |
tree | fe7559d345762b6aa5688380608f4c137e5f26b1 /MdeModulePkg/Universal/DriverSampleDxe | |
parent | d490265ca611af3c6a309c293b4794c461761956 (diff) | |
download | edk2-platforms-b18e7050464b0809e0c8366219447e87c9124551.tar.xz |
Add new call back return value; also add some sample code to use it.
Signed-off-by: ydong10
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11713 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe')
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | 32 | ||||
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr | 29 | ||||
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni | bin | 51254 -> 52710 bytes |
3 files changed, 58 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 9751242fd2..9f78db2854 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -2,7 +2,7 @@ This is an example of how a driver might export data to the HII protocol to be
later utilized by the Setup Protocol
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -587,7 +587,7 @@ AppendAltCfgString ( StringPtr += StrLen (L"&VALUE=");
//
- // Get Width
+ // Get Value
//
Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);
if (EFI_ERROR (Status)) {
@@ -1501,6 +1501,34 @@ DriverCallback ( *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
break;
+ case 0x1241:
+ //
+ // User press "Submit current form and Exit now", request Browser to submit current form and exit
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
+ break;
+
+ case 0x1242:
+ //
+ // User press "Discard current form now", request Browser to discard the uncommitted data.
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD;
+ break;
+
+ case 0x1243:
+ //
+ // User press "Submit current form now", request Browser to save the uncommitted data.
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
+ break;
+
+ case 0x1244:
+ //
+ // User press "Discard current form and Exit now", request Browser to discard the uncommitted data and exit.
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
+ break;
+
case 0x2000:
//
// Only used to update the state.
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index fce22fef2f..26d29e3813 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -2,7 +2,7 @@ //
// Sample Setup formset.
//
-// Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
@@ -141,6 +141,19 @@ formset flags = INTERACTIVE,
key = 0x1238;
+ text
+ help = STRING_TOKEN(STR_SAVE_CURRENT),
+ text = STRING_TOKEN(STR_SAVE_CURRENT),
+ text = STRING_TOKEN(STR_SAVE_CURRENT),
+ flags = INTERACTIVE,
+ key = 0x1243;
+
+ text
+ help = STRING_TOKEN(STR_DISCARD_CURRENT_AND_EXIT),
+ text = STRING_TOKEN(STR_DISCARD_CURRENT_AND_EXIT),
+ text = STRING_TOKEN(STR_DISCARD_CURRENT_AND_EXIT),
+ flags = INTERACTIVE,
+ key = 0x1244;
//
// Define oneof (EFI_IFR_ONE_OF)
//
@@ -530,6 +543,20 @@ formset enddate;
+ text
+ help = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT),
+ text = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT),
+ text = STRING_TOKEN(STR_SAVE_CURRENT_AND_EXIT),
+ flags = INTERACTIVE,
+ key = 0x1241;
+
+ text
+ help = STRING_TOKEN(STR_DISCARD_CURRENT),
+ text = STRING_TOKEN(STR_DISCARD_CURRENT),
+ text = STRING_TOKEN(STR_DISCARD_CURRENT),
+ flags = INTERACTIVE,
+ key = 0x1242;
+
time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_TIME_PROMPT),
help = STRING_TOKEN(STR_TIME_HELP),
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni Binary files differindex 1901fd8d2e..8bd34469a2 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni |