mirror of https://github.com/acidanthera/audk.git
Clean codes per ECC for ConSplitterDxe module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5391 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6dcf9abc6a
commit
a4d608d1f7
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
UEFI Component Name(2) protocol implementation for ConSplitter driver.
|
UEFI Component Name(2) protocol implementation for ConSplitter driver.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation. <BR>
|
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -492,6 +492,51 @@ ConSplitterSimplePointerComponentNameGetControllerName (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by an EFI Driver.
|
||||||
|
|
||||||
|
@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
|
||||||
|
instance.
|
||||||
|
@param ControllerHandle The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
@param ChildHandle The handle of the child controller to retrieve the
|
||||||
|
name of. This is an optional parameter that may
|
||||||
|
be NULL. It will be NULL for device drivers. It
|
||||||
|
will also be NULL for a bus drivers that wish to
|
||||||
|
retrieve the name of the bus controller. It will
|
||||||
|
not be NULL for a bus driver that wishes to
|
||||||
|
retrieve the name of a child controller.
|
||||||
|
@param Language A pointer to RFC3066 language identifier. This is
|
||||||
|
the language of the controller name that that the
|
||||||
|
caller is requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up to
|
||||||
|
the driver writer.
|
||||||
|
@param ControllerName A pointer to the Unicode string to return. This
|
||||||
|
Unicode string is the name of the controller
|
||||||
|
specified by ControllerHandle and ChildHandle in
|
||||||
|
the language specified by Language from the point
|
||||||
|
of view of the driver specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the driver
|
||||||
|
specified by This was returned in DriverName.
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
||||||
|
language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterAbsolutePointerComponentNameGetControllerName (
|
ConSplitterAbsolutePointerComponentNameGetControllerName (
|
||||||
|
@ -501,51 +546,6 @@ ConSplitterAbsolutePointerComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to RFC3066 language identifier.
|
|
||||||
This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language
|
|
||||||
specified by Language from the point of view of the
|
|
||||||
driver specified by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
/**@file
|
/** @file
|
||||||
Private data structures for the Console Splitter driver
|
Private data structures for the Console Splitter driver
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
Copyright (c) 2006 - 2008 Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -76,7 +76,7 @@ extern EFI_GUID gSimpleTextInExNotifyGuid;
|
||||||
#define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
|
#define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
|
||||||
#define MAX_STD_IN_PASSWORD 80
|
#define MAX_STD_IN_PASSWORD 80
|
||||||
|
|
||||||
#define VarConOutMode L"ConOutMode"
|
#define VARCONOUTMODE L"ConOutMode"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINTN Column;
|
UINTN Column;
|
||||||
|
@ -259,6 +259,15 @@ ConSplitterDriverEntry (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Construct the ConSplitter.
|
||||||
|
|
||||||
|
@param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
|
||||||
|
structure.
|
||||||
|
|
||||||
|
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ConSplitterTextInConstructor (
|
ConSplitterTextInConstructor (
|
||||||
TEXT_IN_SPLITTER_PRIVATE_DATA *Private
|
TEXT_IN_SPLITTER_PRIVATE_DATA *Private
|
||||||
|
@ -274,6 +283,17 @@ ConSplitterTextOutConstructor (
|
||||||
//
|
//
|
||||||
// Driver Binding Functions
|
// Driver Binding Functions
|
||||||
//
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
Console In Supported Check
|
||||||
|
|
||||||
|
@param This Pointer to protocol.
|
||||||
|
@param ControllerHandle Controller handle.
|
||||||
|
@param RemainingDevicePath Remaining device path.
|
||||||
|
|
||||||
|
@return EFI_STATUS
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterConInDriverBindingSupported (
|
ConSplitterConInDriverBindingSupported (
|
||||||
|
@ -283,6 +303,16 @@ ConSplitterConInDriverBindingSupported (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Standard Error Supported Check
|
||||||
|
|
||||||
|
@param This Pointer to protocol.
|
||||||
|
@param ControllerHandle Controller handle.
|
||||||
|
@param RemainingDevicePath Remaining device path.
|
||||||
|
|
||||||
|
@return EFI_STATUS
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterSimplePointerDriverBindingSupported (
|
ConSplitterSimplePointerDriverBindingSupported (
|
||||||
|
@ -292,6 +322,16 @@ ConSplitterSimplePointerDriverBindingSupported (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Console Out Supported Check
|
||||||
|
|
||||||
|
@param This Pointer to protocol.
|
||||||
|
@param ControllerHandle Controller handle.
|
||||||
|
@param RemainingDevicePath Remaining device path.
|
||||||
|
|
||||||
|
@return EFI_STATUS
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterConOutDriverBindingSupported (
|
ConSplitterConOutDriverBindingSupported (
|
||||||
|
@ -301,6 +341,16 @@ ConSplitterConOutDriverBindingSupported (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Standard Error Supported Check
|
||||||
|
|
||||||
|
@param This Pointer to protocol.
|
||||||
|
@param ControllerHandle Controller handle.
|
||||||
|
@param RemainingDevicePath Remaining device path.
|
||||||
|
|
||||||
|
@return EFI_STATUS
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterStdErrDriverBindingSupported (
|
ConSplitterStdErrDriverBindingSupported (
|
||||||
|
@ -436,51 +486,48 @@ ConSplitterAbsolutePointerDeleteDevice (
|
||||||
// Absolute Pointer protocol interfaces
|
// Absolute Pointer protocol interfaces
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Resets the pointer device hardware.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param ExtendedVerification Driver may perform diagnostics on reset.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The device was reset.
|
||||||
|
@retval EFI_DEVICE_ERROR The device is not functioning correctly and
|
||||||
|
could not be reset.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterAbsolutePointerReset (
|
ConSplitterAbsolutePointerReset (
|
||||||
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
|
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
|
||||||
IN BOOLEAN ExtendedVerification
|
IN BOOLEAN ExtendedVerification
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Resets the pointer device hardware.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
ExtendedVerification - Driver may perform diagnostics on reset.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The device was reset.
|
|
||||||
EFI_DEVICE_ERROR - The device is not functioning correctly and could
|
|
||||||
not be reset.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves the current state of a pointer device.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param State A pointer to the state information on the
|
||||||
|
pointer device.
|
||||||
|
|
||||||
|
@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 GetState().
|
||||||
|
@retval EFI_DEVICE_ERROR A device error occurred while attempting to
|
||||||
|
retrieve the pointer device's current state.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterAbsolutePointerGetState (
|
ConSplitterAbsolutePointerGetState (
|
||||||
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
|
IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
|
||||||
IN OUT EFI_ABSOLUTE_POINTER_STATE *State
|
IN OUT EFI_ABSOLUTE_POINTER_STATE *State
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves the current state of a pointer device.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
State - A pointer to the state information on the pointer device.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The state of the pointer device was returned in State..
|
|
||||||
EFI_NOT_READY - The state of the pointer device has not changed since the last call to
|
|
||||||
GetState().
|
|
||||||
EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
|
|
||||||
device's current state.
|
|
||||||
--*/
|
|
||||||
;
|
;
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
@ -954,82 +1001,95 @@ ConSplitterTextInExDeleteDevice (
|
||||||
// Simple Text Input Ex protocol function prototypes
|
// Simple Text Input Ex protocol function prototypes
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reset the input device and optionaly run diagnostics
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param ExtendedVerification Driver may perform diagnostics on reset.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The device was reset.
|
||||||
|
@retval EFI_DEVICE_ERROR The device is not functioning properly and could
|
||||||
|
not be reset.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterTextInResetEx (
|
ConSplitterTextInResetEx (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN BOOLEAN ExtendedVerification
|
IN BOOLEAN ExtendedVerification
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Reset the input device and optionaly run diagnostics
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
ExtendedVerification - Driver may perform diagnostics on reset.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The device was reset.
|
|
||||||
EFI_DEVICE_ERROR - The device is not functioning properly and could
|
|
||||||
not be reset.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||||
|
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param KeyData A pointer to a buffer that is filled in with the
|
||||||
|
keystroke state data for the key that was
|
||||||
|
pressed.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The keystroke information was returned.
|
||||||
|
@retval EFI_NOT_READY There was no keystroke data availiable.
|
||||||
|
@retval EFI_DEVICE_ERROR The keystroke information was not returned due
|
||||||
|
to hardware errors.
|
||||||
|
@retval EFI_INVALID_PARAMETER KeyData is NULL.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterTextInReadKeyStrokeEx (
|
ConSplitterTextInReadKeyStrokeEx (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
OUT EFI_KEY_DATA *KeyData
|
OUT EFI_KEY_DATA *KeyData
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
|
||||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
KeyData - A pointer to a buffer that is filled in with the keystroke
|
|
||||||
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.
|
|
||||||
EFI_DEVICE_ERROR - The keystroke information was not returned due to
|
|
||||||
hardware errors.
|
|
||||||
EFI_INVALID_PARAMETER - KeyData is NULL.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set certain state for the input device.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
|
||||||
|
state for the input device.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The device state was set successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR The device is not functioning correctly and
|
||||||
|
could not have the setting adjusted.
|
||||||
|
@retval EFI_UNSUPPORTED The device does not have the ability to set its
|
||||||
|
state.
|
||||||
|
@retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterTextInSetState (
|
ConSplitterTextInSetState (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
|
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Set certain state for the input device.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
|
|
||||||
state for the input device.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The device state was set successfully.
|
|
||||||
EFI_DEVICE_ERROR - The device is not functioning correctly and could
|
|
||||||
not have the setting adjusted.
|
|
||||||
EFI_UNSUPPORTED - The device does not have the ability to set its state.
|
|
||||||
EFI_INVALID_PARAMETER - KeyToggleState is NULL.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Register a notification function for a particular keystroke for the input device.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param KeyData A pointer to a buffer that is filled in with the
|
||||||
|
keystroke information data 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 NotifyHandle Points to the unique handle assigned to the
|
||||||
|
registered notification.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The notification function was registered
|
||||||
|
successfully.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
|
||||||
|
structures.
|
||||||
|
@retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterTextInRegisterKeyNotify (
|
ConSplitterTextInRegisterKeyNotify (
|
||||||
|
@ -1038,48 +1098,28 @@ ConSplitterTextInRegisterKeyNotify (
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT EFI_HANDLE *NotifyHandle
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Register a notification function for a particular keystroke for the input device.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
KeyData - A pointer to a buffer that is filled in with the keystroke
|
|
||||||
information data for the key that was pressed.
|
|
||||||
KeyNotificationFunction - Points to the function to be called when the key
|
|
||||||
sequence is typed specified by KeyData.
|
|
||||||
NotifyHandle - Points to the unique handle assigned to the registered notification.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The notification function was registered successfully.
|
|
||||||
EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
|
|
||||||
EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Remove a registered notification function from a particular keystroke.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param NotificationHandle The handle of the notification function being
|
||||||
|
unregistered.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The notification function was unregistered
|
||||||
|
successfully.
|
||||||
|
@retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
|
||||||
|
@retval EFI_NOT_FOUND Can not find the matching entry in database.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterTextInUnregisterKeyNotify (
|
ConSplitterTextInUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN EFI_HANDLE NotificationHandle
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Remove a registered notification function from a particular keystroke.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
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.
|
|
||||||
EFI_NOT_FOUND - Can not find the matching entry in database.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
;
|
;
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -1135,6 +1175,19 @@ ConSplitterSimplePointerGetState (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
This event agregates all the events of the ConIn devices in the spliter.
|
||||||
|
If the ConIn is password locked then return.
|
||||||
|
If any events of physical ConIn devices are signaled, signal the ConIn
|
||||||
|
spliter event. This will cause the calling code to call
|
||||||
|
ConSplitterTextInReadKeyStroke ().
|
||||||
|
|
||||||
|
@param Event The Event assoicated with callback.
|
||||||
|
@param Context Context registered when Event was created.
|
||||||
|
|
||||||
|
@return None
|
||||||
|
|
||||||
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterSimplePointerWaitForInput (
|
ConSplitterSimplePointerWaitForInput (
|
||||||
|
|
|
@ -13,14 +13,30 @@ http://opensource.org/licenses/bsd-license.php
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
#include "ConSplitter.h"
|
#include "ConSplitter.h"
|
||||||
|
|
||||||
|
|
||||||
static CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
|
STATIC CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Return the current video mode information. Also returns info about existence
|
||||||
|
of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
|
||||||
|
arguments are optional and only returned if a non NULL pointer is passed in.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param Mode Are we in text of grahics mode.
|
||||||
|
@param GopExists TRUE if GOP Spliter has found a GOP/UGA device
|
||||||
|
@param StdInLocked TRUE if StdIn device is keyboard locked
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Mode information returned.
|
||||||
|
@retval EFI_INVALID_PARAMETER Invalid parameters.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterConsoleControlGetMode (
|
ConSpliterConsoleControlGetMode (
|
||||||
|
@ -29,24 +45,6 @@ ConSpliterConsoleControlGetMode (
|
||||||
OUT BOOLEAN *GopExists,
|
OUT BOOLEAN *GopExists,
|
||||||
OUT BOOLEAN *StdInLocked
|
OUT BOOLEAN *StdInLocked
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Return the current video mode information. Also returns info about existence
|
|
||||||
of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
|
|
||||||
arguments are optional and only returned if a non NULL pointer is passed in.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
Mode - Are we in text of grahics mode.
|
|
||||||
GopExists - TRUE if GOP Spliter has found a GOP/UGA device
|
|
||||||
StdInLocked - TRUE if StdIn device is keyboard locked
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Mode information returned.
|
|
||||||
EFI_INVALID_PARAMETER - Invalid parameters.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
@ -76,28 +74,25 @@ ConSpliterConsoleControlGetMode (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set the current mode to either text or graphics. Graphics is
|
||||||
|
for Quiet Boot.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param Mode Mode to set the
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Mode information returned.
|
||||||
|
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
||||||
|
@retval EFI_UNSUPPORTED Operation unsupported.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterConsoleControlSetMode (
|
ConSpliterConsoleControlSetMode (
|
||||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||||
IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Set the current mode to either text or graphics. Graphics is
|
|
||||||
for Quiet Boot.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
Mode - Mode to set the
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Mode information returned.
|
|
||||||
EFI_INVALID_PARAMETER - Invalid parameter.
|
|
||||||
EFI_UNSUPPORTED - Operation unsupported.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
@ -154,6 +149,25 @@ ConSpliterConsoleControlSetMode (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Return the current video mode information.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param ModeNumber The mode number to return information on.
|
||||||
|
@param SizeOfInfo A pointer to the size, in bytes, of the Info
|
||||||
|
buffer.
|
||||||
|
@param Info Caller allocated buffer that returns information
|
||||||
|
about ModeNumber.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Mode information returned.
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
|
||||||
|
@retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
|
||||||
|
video mode.
|
||||||
|
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
|
||||||
|
@retval EFI_INVALID_PARAMETER One of the input args was NULL.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputQueryMode (
|
ConSpliterGraphicsOutputQueryMode (
|
||||||
|
@ -162,25 +176,6 @@ ConSpliterGraphicsOutputQueryMode (
|
||||||
OUT UINTN *SizeOfInfo,
|
OUT UINTN *SizeOfInfo,
|
||||||
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
|
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Return the current video mode information.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
ModeNumber - The mode number to return information on.
|
|
||||||
Info - Caller allocated buffer that returns information about ModeNumber.
|
|
||||||
SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Mode information returned.
|
|
||||||
EFI_BUFFER_TOO_SMALL - The Info buffer was too small.
|
|
||||||
EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.
|
|
||||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
|
||||||
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
|
|
||||||
|
@ -210,28 +205,25 @@ ConSpliterGraphicsOutputQueryMode (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Graphics output protocol interface to set video mode
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param ModeNumber The mode number to be set.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Graphics mode was changed.
|
||||||
|
@retval EFI_DEVICE_ERROR The device had an error and could not complete
|
||||||
|
the request.
|
||||||
|
@retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputSetMode (
|
ConSpliterGraphicsOutputSetMode (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
||||||
IN UINT32 ModeNumber
|
IN UINT32 ModeNumber
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Graphics output protocol interface to set video mode
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
ModeNumber - The mode number to be set.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Graphics mode was changed.
|
|
||||||
EFI_DEVICE_ERROR - The device had an error and could not complete the request.
|
|
||||||
EFI_UNSUPPORTED - ModeNumber is not supported by this device.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
|
@ -338,7 +330,6 @@ Routine Description:
|
||||||
return ReturnStatus;
|
return ReturnStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullGraphicsOutputBlt (
|
DevNullGraphicsOutputBlt (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||||
|
@ -393,7 +384,7 @@ DevNullGraphicsOutputBlt (
|
||||||
|
|
||||||
BltPtr = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) ((UINT8 *) BltBuffer + DestinationY * Delta + DestinationX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
BltPtr = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) ((UINT8 *) BltBuffer + DestinationY * Delta + DestinationX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||||
ScreenPtr = &Private->GraphicsOutputBlt[SourceY * HorizontalResolution + SourceX];
|
ScreenPtr = &Private->GraphicsOutputBlt[SourceY * HorizontalResolution + SourceX];
|
||||||
while (Height) {
|
while (Height > 0) {
|
||||||
CopyMem (BltPtr, ScreenPtr, Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
CopyMem (BltPtr, ScreenPtr, Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||||
BltPtr = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) ((UINT8 *) BltPtr + Delta);
|
BltPtr = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) ((UINT8 *) BltPtr + Delta);
|
||||||
ScreenPtr += HorizontalResolution;
|
ScreenPtr += HorizontalResolution;
|
||||||
|
@ -456,6 +447,53 @@ DevNullGraphicsOutputBlt (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
The following table defines actions for BltOperations.
|
||||||
|
|
||||||
|
EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
|
||||||
|
directly to every pixel of the video display rectangle
|
||||||
|
(DestinationX, DestinationY)
|
||||||
|
(DestinationX + Width, DestinationY + Height).
|
||||||
|
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
||||||
|
EfiBltVideoToBltBuffer - Read data from the video display rectangle
|
||||||
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
||||||
|
the BltBuffer rectangle (DestinationX, DestinationY )
|
||||||
|
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
||||||
|
DestinationY is not zero then Delta must be set to the length in bytes
|
||||||
|
of a row in the BltBuffer.
|
||||||
|
EfiBltBufferToVideo - Write data from the BltBuffer rectangle
|
||||||
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
||||||
|
video display rectangle (DestinationX, DestinationY)
|
||||||
|
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
||||||
|
not zero then Delta must be set to the length in bytes of a row in the
|
||||||
|
BltBuffer.
|
||||||
|
EfiBltVideoToVideo - Copy from the video display rectangle
|
||||||
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) .
|
||||||
|
to the video display rectangle (DestinationX, DestinationY)
|
||||||
|
(DestinationX + Width, DestinationY + Height).
|
||||||
|
The BltBuffer and Delta are not used in this mode.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param BltBuffer Buffer containing data to blit into video buffer.
|
||||||
|
This buffer has a size of
|
||||||
|
Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
|
@param BltOperation Operation to perform on BlitBuffer and video
|
||||||
|
memory
|
||||||
|
@param SourceX X coordinate of source for the BltBuffer.
|
||||||
|
@param SourceY Y coordinate of source for the BltBuffer.
|
||||||
|
@param DestinationX X coordinate of destination for the BltBuffer.
|
||||||
|
@param DestinationY Y coordinate of destination for the BltBuffer.
|
||||||
|
@param Width Width of rectangle in BltBuffer in pixels.
|
||||||
|
@param Height Hight of rectangle in BltBuffer in pixels. Delta
|
||||||
|
-
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Blt operation completed.
|
||||||
|
@retval EFI_INVALID_PARAMETER BltOperation is not valid.
|
||||||
|
@retval EFI_DEVICE_ERROR A hardware error occured writting to the video
|
||||||
|
buffer.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputBlt (
|
ConSpliterGraphicsOutputBlt (
|
||||||
|
@ -470,53 +508,6 @@ ConSpliterGraphicsOutputBlt (
|
||||||
IN UINTN Height,
|
IN UINTN Height,
|
||||||
IN UINTN Delta OPTIONAL
|
IN UINTN Delta OPTIONAL
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
The following table defines actions for BltOperations:
|
|
||||||
EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
|
|
||||||
directly to every pixel of the video display rectangle
|
|
||||||
(DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height).
|
|
||||||
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
|
||||||
EfiBltVideoToBltBuffer - Read data from the video display rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
|
||||||
the BltBuffer rectangle (DestinationX, DestinationY )
|
|
||||||
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
|
||||||
DestinationY is not zero then Delta must be set to the length in bytes
|
|
||||||
of a row in the BltBuffer.
|
|
||||||
EfiBltBufferToVideo - Write data from the BltBuffer rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
|
||||||
video display rectangle (DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
|
||||||
not zero then Delta must be set to the length in bytes of a row in the
|
|
||||||
BltBuffer.
|
|
||||||
EfiBltVideoToVideo - Copy from the video display rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) .
|
|
||||||
to the video display rectangle (DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height).
|
|
||||||
The BltBuffer and Delta are not used in this mode.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
BltBuffer - Buffer containing data to blit into video buffer. This
|
|
||||||
buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
|
||||||
BltOperation - Operation to perform on BlitBuffer and video memory
|
|
||||||
SourceX - X coordinate of source for the BltBuffer.
|
|
||||||
SourceY - Y coordinate of source for the BltBuffer.
|
|
||||||
DestinationX - X coordinate of destination for the BltBuffer.
|
|
||||||
DestinationY - Y coordinate of destination for the BltBuffer.
|
|
||||||
Width - Width of rectangle in BltBuffer in pixels.
|
|
||||||
Height - Hight of rectangle in BltBuffer in pixels.
|
|
||||||
Delta -
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Blt operation completed.
|
|
||||||
EFI_INVALID_PARAMETER - BltOperation is not valid.
|
|
||||||
EFI_DEVICE_ERROR - A hardware error occured writting to the video
|
|
||||||
buffer.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
|
@ -640,6 +631,21 @@ DevNullGopSync (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Return the current video mode information.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param HorizontalResolution Current video horizontal resolution in pixels
|
||||||
|
@param VerticalResolution Current video vertical resolution in pixels
|
||||||
|
@param ColorDepth Current video color depth in bits per pixel
|
||||||
|
@param RefreshRate Current video refresh rate in Hz.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Mode information returned.
|
||||||
|
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
|
||||||
|
@retval EFI_INVALID_PARAMETER One of the input args was NULL.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawGetMode (
|
ConSpliterUgaDrawGetMode (
|
||||||
|
@ -649,28 +655,13 @@ ConSpliterUgaDrawGetMode (
|
||||||
OUT UINT32 *ColorDepth,
|
OUT UINT32 *ColorDepth,
|
||||||
OUT UINT32 *RefreshRate
|
OUT UINT32 *RefreshRate
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Return the current video mode information.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
HorizontalResolution - Current video horizontal resolution in pixels
|
|
||||||
VerticalResolution - Current video vertical resolution in pixels
|
|
||||||
ColorDepth - Current video color depth in bits per pixel
|
|
||||||
RefreshRate - Current video refresh rate in Hz.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Mode information returned.
|
|
||||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
|
||||||
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
|
|
||||||
if (!(HorizontalResolution && VerticalResolution && RefreshRate && ColorDepth)) {
|
if ((HorizontalResolution == NULL) ||
|
||||||
|
(VerticalResolution == NULL) ||
|
||||||
|
(RefreshRate == NULL) ||
|
||||||
|
(ColorDepth == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -686,6 +677,21 @@ ConSpliterUgaDrawGetMode (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Return the current video mode information.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param HorizontalResolution Current video horizontal resolution in pixels
|
||||||
|
@param VerticalResolution Current video vertical resolution in pixels
|
||||||
|
@param ColorDepth Current video color depth in bits per pixel
|
||||||
|
@param RefreshRate Current video refresh rate in Hz.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Mode information returned.
|
||||||
|
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
|
||||||
|
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawSetMode (
|
ConSpliterUgaDrawSetMode (
|
||||||
|
@ -695,24 +701,6 @@ ConSpliterUgaDrawSetMode (
|
||||||
IN UINT32 ColorDepth,
|
IN UINT32 ColorDepth,
|
||||||
IN UINT32 RefreshRate
|
IN UINT32 RefreshRate
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Return the current video mode information.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
HorizontalResolution - Current video horizontal resolution in pixels
|
|
||||||
VerticalResolution - Current video vertical resolution in pixels
|
|
||||||
ColorDepth - Current video color depth in bits per pixel
|
|
||||||
RefreshRate - Current video refresh rate in Hz.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - Mode information returned.
|
|
||||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
|
||||||
EFI_OUT_OF_RESOURCES - Out of resources.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
|
@ -865,7 +853,7 @@ DevNullUgaBlt (
|
||||||
|
|
||||||
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + DestinationY * Delta + DestinationX * sizeof (EFI_UGA_PIXEL));
|
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + DestinationY * Delta + DestinationX * sizeof (EFI_UGA_PIXEL));
|
||||||
ScreenPtr = &Private->UgaBlt[SourceY * HorizontalResolution + SourceX];
|
ScreenPtr = &Private->UgaBlt[SourceY * HorizontalResolution + SourceX];
|
||||||
while (Height) {
|
while (Height > 0) {
|
||||||
CopyMem (BltPtr, ScreenPtr, Width * sizeof (EFI_UGA_PIXEL));
|
CopyMem (BltPtr, ScreenPtr, Width * sizeof (EFI_UGA_PIXEL));
|
||||||
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltPtr + Delta);
|
BltPtr = (EFI_UGA_PIXEL *) ((UINT8 *) BltPtr + Delta);
|
||||||
ScreenPtr += HorizontalResolution;
|
ScreenPtr += HorizontalResolution;
|
||||||
|
@ -928,6 +916,53 @@ DevNullUgaBlt (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
The following table defines actions for BltOperations.
|
||||||
|
|
||||||
|
EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
|
||||||
|
directly to every pixel of the video display rectangle
|
||||||
|
(DestinationX, DestinationY)
|
||||||
|
(DestinationX + Width, DestinationY + Height).
|
||||||
|
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
||||||
|
EfiUgaVideoToBltBuffer - Read data from the video display rectangle
|
||||||
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
||||||
|
the BltBuffer rectangle (DestinationX, DestinationY )
|
||||||
|
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
||||||
|
DestinationY is not zero then Delta must be set to the length in bytes
|
||||||
|
of a row in the BltBuffer.
|
||||||
|
EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
|
||||||
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
||||||
|
video display rectangle (DestinationX, DestinationY)
|
||||||
|
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
||||||
|
not zero then Delta must be set to the length in bytes of a row in the
|
||||||
|
BltBuffer.
|
||||||
|
EfiUgaVideoToVideo - Copy from the video display rectangle
|
||||||
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) .
|
||||||
|
to the video display rectangle (DestinationX, DestinationY)
|
||||||
|
(DestinationX + Width, DestinationY + Height).
|
||||||
|
The BltBuffer and Delta are not used in this mode.
|
||||||
|
|
||||||
|
@param This Protocol instance pointer.
|
||||||
|
@param BltBuffer Buffer containing data to blit into video buffer.
|
||||||
|
This buffer has a size of
|
||||||
|
Width*Height*sizeof(EFI_UGA_PIXEL)
|
||||||
|
@param BltOperation Operation to perform on BlitBuffer and video
|
||||||
|
memory
|
||||||
|
@param SourceX X coordinate of source for the BltBuffer.
|
||||||
|
@param SourceY Y coordinate of source for the BltBuffer.
|
||||||
|
@param DestinationX X coordinate of destination for the BltBuffer.
|
||||||
|
@param DestinationY Y coordinate of destination for the BltBuffer.
|
||||||
|
@param Width Width of rectangle in BltBuffer in pixels.
|
||||||
|
@param Height Hight of rectangle in BltBuffer in pixels. Delta
|
||||||
|
-
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Blt operation completed.
|
||||||
|
@retval EFI_INVALID_PARAMETER BltOperation is not valid.
|
||||||
|
@retval EFI_DEVICE_ERROR A hardware error occured writting to the video
|
||||||
|
buffer.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawBlt (
|
ConSpliterUgaDrawBlt (
|
||||||
|
@ -942,53 +977,6 @@ ConSpliterUgaDrawBlt (
|
||||||
IN UINTN Height,
|
IN UINTN Height,
|
||||||
IN UINTN Delta OPTIONAL
|
IN UINTN Delta OPTIONAL
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
The following table defines actions for BltOperations:
|
|
||||||
EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
|
|
||||||
directly to every pixel of the video display rectangle
|
|
||||||
(DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height).
|
|
||||||
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
|
||||||
EfiUgaVideoToBltBuffer - Read data from the video display rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
|
||||||
the BltBuffer rectangle (DestinationX, DestinationY )
|
|
||||||
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
|
||||||
DestinationY is not zero then Delta must be set to the length in bytes
|
|
||||||
of a row in the BltBuffer.
|
|
||||||
EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
|
||||||
video display rectangle (DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
|
||||||
not zero then Delta must be set to the length in bytes of a row in the
|
|
||||||
BltBuffer.
|
|
||||||
EfiUgaVideoToVideo - Copy from the video display rectangle
|
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) .
|
|
||||||
to the video display rectangle (DestinationX, DestinationY)
|
|
||||||
(DestinationX + Width, DestinationY + Height).
|
|
||||||
The BltBuffer and Delta are not used in this mode.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - Protocol instance pointer.
|
|
||||||
BltBuffer - Buffer containing data to blit into video buffer. This
|
|
||||||
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
|
||||||
BltOperation - Operation to perform on BlitBuffer and video memory
|
|
||||||
SourceX - X coordinate of source for the BltBuffer.
|
|
||||||
SourceY - Y coordinate of source for the BltBuffer.
|
|
||||||
DestinationX - X coordinate of destination for the BltBuffer.
|
|
||||||
DestinationY - Y coordinate of destination for the BltBuffer.
|
|
||||||
Width - Width of rectangle in BltBuffer in pixels.
|
|
||||||
Height - Hight of rectangle in BltBuffer in pixels.
|
|
||||||
Delta -
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Blt operation completed.
|
|
||||||
EFI_INVALID_PARAMETER - BltOperation is not valid.
|
|
||||||
EFI_DEVICE_ERROR - A hardware error occured writting to the video
|
|
||||||
buffer.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
|
@ -1109,34 +1097,32 @@ DevNullUgaSync (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Write a Unicode string to the output device.
|
||||||
|
|
||||||
|
@param Private Pointer to the console output splitter's private
|
||||||
|
data. It indicates the calling context.
|
||||||
|
@param WString The NULL-terminated Unicode string to be
|
||||||
|
displayed on the output device(s). All output
|
||||||
|
devices must also support the Unicode drawing
|
||||||
|
defined in this file.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The string was output to the device.
|
||||||
|
@retval EFI_DEVICE_ERROR The device reported an error while attempting to
|
||||||
|
output the text.
|
||||||
|
@retval EFI_UNSUPPORTED The output device's mode is not currently in a
|
||||||
|
defined text mode.
|
||||||
|
@retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
|
||||||
|
characters in the Unicode string could not be
|
||||||
|
rendered and were skipped.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullTextOutOutputString (
|
DevNullTextOutOutputString (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||||
IN CHAR16 *WString
|
IN CHAR16 *WString
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Write a Unicode string to the output device.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
Private - Pointer to the console output splitter's private data. It
|
|
||||||
indicates the calling context.
|
|
||||||
WString - The NULL-terminated Unicode string to be displayed on the output
|
|
||||||
device(s). All output devices must also support the Unicode
|
|
||||||
drawing defined in this file.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The string was output to the device.
|
|
||||||
EFI_DEVICE_ERROR - The device reported an error while attempting to
|
|
||||||
output the text.
|
|
||||||
EFI_UNSUPPORTED - The output device's mode is not currently in a
|
|
||||||
defined text mode.
|
|
||||||
EFI_WARN_UNKNOWN_GLYPH - This warning code indicates that some of the
|
|
||||||
characters in the Unicode string could not be
|
|
||||||
rendered and were skipped.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINTN SizeScreen;
|
UINTN SizeScreen;
|
||||||
UINTN SizeAttribute;
|
UINTN SizeAttribute;
|
||||||
|
@ -1165,7 +1151,7 @@ DevNullTextOutOutputString (
|
||||||
CurrentWidth = 1;
|
CurrentWidth = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*WString) {
|
while (*WString != L'\0') {
|
||||||
|
|
||||||
if (*WString == CHAR_BACKSPACE) {
|
if (*WString == CHAR_BACKSPACE) {
|
||||||
//
|
//
|
||||||
|
@ -1193,7 +1179,7 @@ DevNullTextOutOutputString (
|
||||||
//
|
//
|
||||||
InsertChar = CHAR_BACKSPACE;
|
InsertChar = CHAR_BACKSPACE;
|
||||||
PStr = WString + 1;
|
PStr = WString + 1;
|
||||||
while (*PStr) {
|
while (*PStr != L'\0') {
|
||||||
TempChar = *PStr;
|
TempChar = *PStr;
|
||||||
*PStr = InsertChar;
|
*PStr = InsertChar;
|
||||||
InsertChar = TempChar;
|
InsertChar = TempChar;
|
||||||
|
@ -1329,28 +1315,25 @@ DevNullTextOutOutputString (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets the output device(s) to a specified mode.
|
||||||
|
|
||||||
|
@param Private Private data structure pointer.
|
||||||
|
@param ModeNumber The mode number to set.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The requested text mode was set.
|
||||||
|
@retval EFI_DEVICE_ERROR The device had an error and could not complete
|
||||||
|
the request.
|
||||||
|
@retval EFI_UNSUPPORTED The mode number was not valid.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullTextOutSetMode (
|
DevNullTextOutSetMode (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||||
IN UINTN ModeNumber
|
IN UINTN ModeNumber
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Sets the output device(s) to a specified mode.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
Private - Private data structure pointer.
|
|
||||||
ModeNumber - The mode number to set.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The requested text mode was set.
|
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
|
||||||
could not complete the request.
|
|
||||||
EFI_UNSUPPORTED - The mode number was not valid.
|
|
||||||
EFI_OUT_OF_RESOURCES - Out of resources.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
INT32 CurrentMode;
|
INT32 CurrentMode;
|
||||||
|
@ -1408,26 +1391,23 @@ DevNullTextOutSetMode (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Clears the output device(s) display to the currently selected background
|
||||||
|
color.
|
||||||
|
|
||||||
|
@param Private Protocol instance pointer.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR The device had an error and could not complete
|
||||||
|
the request.
|
||||||
|
@retval EFI_UNSUPPORTED The output device is not in a valid text mode.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullTextOutClearScreen (
|
DevNullTextOutClearScreen (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Clears the output device(s) display to the currently selected background
|
|
||||||
color.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
Private - Protocol instance pointer.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The operation completed successfully.
|
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
|
||||||
could not complete the request.
|
|
||||||
EFI_UNSUPPORTED - The output device is not in a valid text mode.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
UINTN Row;
|
UINTN Row;
|
||||||
UINTN Column;
|
UINTN Column;
|
||||||
|
@ -1460,31 +1440,30 @@ DevNullTextOutClearScreen (
|
||||||
return DevNullTextOutEnableCursor (Private, TRUE);
|
return DevNullTextOutEnableCursor (Private, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Sets the current coordinates of the cursor position.
|
||||||
|
|
||||||
|
@param Private Protocol instance pointer.
|
||||||
|
@param Column
|
||||||
|
@param Row the position to set the cursor to. Must be
|
||||||
|
greater than or equal to zero and less than the
|
||||||
|
number of columns and rows by QueryMode ().
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The operation completed successfully.
|
||||||
|
@retval EFI_DEVICE_ERROR The device had an error and could not complete
|
||||||
|
the request.
|
||||||
|
@retval EFI_UNSUPPORTED The output device is not in a valid text mode, or
|
||||||
|
the cursor position is invalid for the current
|
||||||
|
mode.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullTextOutSetCursorPosition (
|
DevNullTextOutSetCursorPosition (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||||
IN UINTN Column,
|
IN UINTN Column,
|
||||||
IN UINTN Row
|
IN UINTN Row
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Sets the current coordinates of the cursor position
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
Private - Protocol instance pointer.
|
|
||||||
Column, Row - the position to set the cursor to. Must be greater than or
|
|
||||||
equal to zero and less than the number of columns and rows
|
|
||||||
by QueryMode ().
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The operation completed successfully.
|
|
||||||
EFI_DEVICE_ERROR - The device had an error and
|
|
||||||
could not complete the request.
|
|
||||||
EFI_UNSUPPORTED - The output device is not in a valid text mode, or the
|
|
||||||
cursor position is invalid for the current mode.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// No need to do extra check here as whether (Column, Row) is valid has
|
// No need to do extra check here as whether (Column, Row) is valid has
|
||||||
|
@ -1497,53 +1476,44 @@ DevNullTextOutSetCursorPosition (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
|
||||||
|
In this driver, the cursor cannot be hidden.
|
||||||
|
|
||||||
|
@param Private Indicates the calling context.
|
||||||
|
@param Visible If TRUE, the cursor is set to be visible, If
|
||||||
|
FALSE, the cursor is set to be invisible.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The request is valid.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullTextOutEnableCursor (
|
DevNullTextOutEnableCursor (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||||
IN BOOLEAN Visible
|
IN BOOLEAN Visible
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
|
|
||||||
In this driver, the cursor cannot be hidden.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
Private - Indicates the calling context.
|
|
||||||
|
|
||||||
Visible - If TRUE, the cursor is set to be visible, If FALSE, the cursor
|
|
||||||
is set to be invisible.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
EFI_SUCCESS - The request is valid.
|
|
||||||
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
Private->TextOutMode.CursorVisible = Visible;
|
Private->TextOutMode.CursorVisible = Visible;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Take the DevNull TextOut device and update the Simple Text Out on every
|
||||||
|
UGA device.
|
||||||
|
|
||||||
|
@param Private Indicates the calling context.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The request is valid.
|
||||||
|
@retval other Return status of TextOut->OutputString ()
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullSyncStdOut (
|
DevNullSyncStdOut (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
Routine Description:
|
|
||||||
Take the DevNull TextOut device and update the Simple Text Out on every
|
|
||||||
UGA device.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
Private - Indicates the calling context.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The request is valid.
|
|
||||||
other - Return status of TextOut->OutputString ()
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_STATUS ReturnStatus;
|
EFI_STATUS ReturnStatus;
|
||||||
|
@ -1607,7 +1577,7 @@ DevNullSyncStdOut (
|
||||||
|
|
||||||
Column = 0;
|
Column = 0;
|
||||||
while (Column < MaxColumn) {
|
while (Column < MaxColumn) {
|
||||||
if (Screen[Column]) {
|
if (Screen[Column] > 0) {
|
||||||
CurrentAttribute = Attributes[Column];
|
CurrentAttribute = Attributes[Column];
|
||||||
CurrentColumn = Column;
|
CurrentColumn = Column;
|
||||||
ScreenStart = &Screen[Column];
|
ScreenStart = &Screen[Column];
|
||||||
|
@ -1625,7 +1595,7 @@ DevNullSyncStdOut (
|
||||||
|
|
||||||
*BufferTail = *Str;
|
*BufferTail = *Str;
|
||||||
BufferTail++;
|
BufferTail++;
|
||||||
if (Attributes[Column] & EFI_WIDE_ATTRIBUTE) {
|
if ((Attributes[Column] & EFI_WIDE_ATTRIBUTE) != 0) {
|
||||||
Str++;
|
Str++;
|
||||||
Column++;
|
Column++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue