if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) ||
(RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) {
if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) ||
(RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) {
//
// Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored.
//
if (RegsiteredData->KeyState.KeyShiftState != 0 &&
RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) {
//
// Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored.
//
if (RegsiteredData->KeyState.KeyShiftState != 0 &&
RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) {
if (RegsiteredData->KeyState.KeyToggleState != 0 &&
RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) {
if (RegsiteredData->KeyState.KeyToggleState != 0 &&
RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) {
LIST_ENTRY *Link;
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
GOP_PRIVATE_DATA *Private = (GOP_PRIVATE_DATA *)Context;
LIST_ENTRY *Link;
EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
GOP_PRIVATE_DATA *Private = (GOP_PRIVATE_DATA *)Context;
- if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
- // We could be called at a high TPL so signal an event to call the registered function
+ if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
+ // We could be called at a high TPL so signal an event to call the registered function
@param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA.
@param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA.
state information, and in those cases the high order bit in the
respective Toggle and Shift state fields should not be active.
state information, and in those cases the high order bit in the
respective Toggle and Shift state fields should not be active.
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
@param KeyData A pointer to a buffer that is filled in with
the keystroke state data for the key that was
pressed.
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
@param KeyData A pointer to a buffer that is filled in with
the keystroke state data for the key that was
pressed.
@retval EFI_NOT_READY There was no keystroke data available.
EFI_DEVICE_ERROR The keystroke
information was not returned due to
@retval EFI_NOT_READY There was no keystroke data available.
EFI_DEVICE_ERROR The keystroke
information was not returned due to
be used to test for existance of a keystroke via WaitForEvent () call.
Arguments:
This - Protocol instance pointer.
be used to test for existance of a keystroke via WaitForEvent () call.
Arguments:
This - Protocol instance pointer.
state data for the key that was pressed.
Returns:
EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable.
state data for the key that was pressed.
Returns:
EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable.
@retval EFI_SUCCESS The device state was set appropriately.
@retval EFI_DEVICE_ERROR The device is not functioning
@retval EFI_SUCCESS The device state was set appropriately.
@retval EFI_DEVICE_ERROR The device is not functioning
@param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA.
@param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA.
/**
The RegisterKeystrokeNotify() function registers a function
which will be called when a specified keystroke will occur.
/**
The RegisterKeystrokeNotify() function registers a function
which will be called when a specified keystroke will occur.
@param KeyData A pointer to a buffer that is filled in with
the keystroke information for the key that was
pressed.
@param KeyData A pointer to a buffer that is filled in with
the keystroke information for the key that was
pressed.
@param KeyNotificationFunction Points to the function to be
called when the key sequence
is typed specified by KeyData.
@param KeyNotificationFunction Points to the function to be
called when the key sequence
is typed specified by KeyData.
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
return EFI_SUCCESS;
}
}
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
return EFI_SUCCESS;
}
}
NewNotify = (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) AllocateZeroPool (sizeof (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY));
if (NewNotify == NULL) {
return EFI_OUT_OF_RESOURCES;
}
NewNotify = (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) AllocateZeroPool (sizeof (EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY));
if (NewNotify == NULL) {
return EFI_OUT_OF_RESOURCES;
}
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
NotificationHandle - The handle of the notification function being unregistered.
Returns:
EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
NotificationHandle - The handle of the notification function being unregistered.
Returns:
EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
if (((EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) NotificationHandle)->Signature != EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE) {
return EFI_INVALID_PARAMETER;
if (((EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) NotificationHandle)->Signature != EMU_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE) {
return EFI_INVALID_PARAMETER;
Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
if (CurrentNotify->NotifyHandle == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//
if (CurrentNotify->NotifyHandle == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//
Private->SimpleTextInEx.Reset = EmuGopSimpleTextInExResetEx;
Private->SimpleTextInEx.ReadKeyStrokeEx = EmuGopSimpleTextInExReadKeyStrokeEx;
Private->SimpleTextInEx.SetState = EmuGopSimpleTextInExSetState;
Private->SimpleTextInEx.Reset = EmuGopSimpleTextInExResetEx;
Private->SimpleTextInEx.ReadKeyStrokeEx = EmuGopSimpleTextInExReadKeyStrokeEx;
Private->SimpleTextInEx.SetState = EmuGopSimpleTextInExSetState;
Private->SimpleTextInEx.UnregisterKeyNotify = EmuGopSimpleTextInExUnregisterKeyNotify;
Private->SimpleTextInEx.Reset (&Private->SimpleTextInEx, FALSE);
Private->SimpleTextInEx.UnregisterKeyNotify = EmuGopSimpleTextInExUnregisterKeyNotify;
Private->SimpleTextInEx.Reset (&Private->SimpleTextInEx, FALSE);
@retval EFI_SUCCESS The state of the pointer device was returned in State.
@retval EFI_NOT_READY The state of the pointer device has not changed since the last call to
@retval EFI_SUCCESS The state of the pointer device was returned in State.
@retval EFI_NOT_READY The state of the pointer device has not changed since the last call to
@param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA.
@param Event Event whose notification function is being invoked.
@param Context Pointer to GOP_PRIVATE_DATA.