From 33019a717c8c94a7a4b7a78cd3eed177af88c990 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Fri, 11 Jul 2008 07:23:59 +0000 Subject: add functions header for ConSplitterDxe module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5453 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Console/ConSplitterDxe/ConSplitter.c | 37 +++++-- .../Universal/Console/ConSplitterDxe/ConSplitter.h | 54 +++++++-- .../Console/ConSplitterDxe/ConSplitterGraphics.c | 123 ++++++++++++++++++++- 3 files changed, 192 insertions(+), 22 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 9d45af26ea..4cf4dd0cf6 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -2019,6 +2019,15 @@ ConSplitterAbsolutePointerDeleteDevice ( return EFI_NOT_FOUND; } +/** + Reallocate Text Out mode map. + + @param Private Consplitter Text Out pointer. + + @retval EFI_SUCCESS Buffer size has grown + @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size. + +**/ EFI_STATUS ConSplitterGrowMapTable ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private @@ -2240,10 +2249,10 @@ ConSplitterGetIntersection ( /** Add the device's output mode to console splitter's mode list. - @param Private Text Out Splitter pointer + @param Private Text Out Splitter pointer. @param TextOut Simple Text Output protocol pointer. - @reture None + @return None **/ VOID @@ -2743,7 +2752,7 @@ Done: from ConsoleOutMode variable and set it; if the variable does not exist, set to user defined console mode. - None + @param Private Consplitter Text Out pointer. @return None @@ -3154,7 +3163,7 @@ ConSplitterTextInReset ( 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 Private Protocol instance pointer. @param Key Driver may perform diagnostics on reset. @retval EFI_SUCCESS The keystroke information was returned. @@ -3304,6 +3313,8 @@ ConSpliterConsoleControlLockStdInEvent ( timer. If the Password is too big return an error. If the Password is valid Copy the Password and enable state variable and then arm the periodic timer + @param This Console Control protocol pointer. + @param Password The password input. @retval EFI_SUCCESS Lock the StdIn device @retval EFI_INVALID_PARAMETER Password is NULL @@ -3894,7 +3905,8 @@ ConSplitterSimplePointerReset ( 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. State - + @param Private Protocol instance pointer. + @param State The state information of simple pointer device. @retval EFI_SUCCESS The keystroke information was returned. @retval EFI_NOT_READY There was no keystroke data availiable. @@ -4298,7 +4310,7 @@ ConSplitterTextOutReset ( Write a Unicode string to the output device. @param This Protocol instance pointer. - @param String The NULL-terminated Unicode string to be + @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. @@ -4379,7 +4391,7 @@ ConSplitterTextOutOutputString ( target device. @param This Protocol instance pointer. - @param String The NULL-terminated Unicode string to be + @param WString The NULL-terminated Unicode string to be examined for the output device(s). @retval EFI_SUCCESS The device(s) are capable of rendering the @@ -4432,7 +4444,9 @@ ConSplitterTextOutTestString ( @param This Protocol instance pointer. @param ModeNumber The mode number to return information on. - @param Rows Returns the geometry of the text output device + @param Columns Returns the columns of the text output device + for the requested ModeNumber. + @param Rows Returns the rows of the text output device for the requested ModeNumber. @retval EFI_SUCCESS The requested mode information was returned. @@ -4681,9 +4695,12 @@ ConSplitterTextOutClearScreen ( Sets the current coordinates of the cursor position @param This Protocol instance pointer. - @param Row the position to set the cursor to. Must be + @param Column The column position to set the cursor to. Must be + greater than or equal to zero and less than the + number of columns by QueryMode (). + @param Row The row 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 (). + number of rows by QueryMode (). @retval EFI_SUCCESS The operation completed successfully. @retval EFI_DEVICE_ERROR The device had an error and could not complete diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h index f43e63be78..f4060a29ad 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h @@ -1533,6 +1533,8 @@ ConSpliterConsoleControlLockStdInEvent ( timer. If the Password is too big return an error. If the Password is valid Copy the Password and enable state variable and then arm the periodic timer + @param This Console Control protocol pointer. + @param Password The password input. @retval EFI_SUCCESS Lock the StdIn device @retval EFI_INVALID_PARAMETER Password is NULL @@ -1551,7 +1553,7 @@ ConSpliterConsoleControlLockStdIn ( 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 Private Protocol instance pointer. @param Key Driver may perform diagnostics on reset. @retval EFI_SUCCESS The keystroke information was returned. @@ -1658,7 +1660,7 @@ ConSplitterTextOutReset ( Write a Unicode string to the output device. @param This Protocol instance pointer. - @param String The NULL-terminated Unicode string to be + @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. @@ -1686,7 +1688,7 @@ ConSplitterTextOutOutputString ( target device. @param This Protocol instance pointer. - @param String The NULL-terminated Unicode string to be + @param WString The NULL-terminated Unicode string to be examined for the output device(s). @retval EFI_SUCCESS The device(s) are capable of rendering the @@ -1710,7 +1712,9 @@ ConSplitterTextOutTestString ( @param This Protocol instance pointer. @param ModeNumber The mode number to return information on. - @param Rows Returns the geometry of the text output device + @param Columns Returns the columns of the text output device + for the requested ModeNumber. + @param Rows Returns the rows of the text output device for the requested ModeNumber. @retval EFI_SUCCESS The requested mode information was returned. @@ -1797,9 +1801,12 @@ ConSplitterTextOutClearScreen ( Sets the current coordinates of the cursor position @param This Protocol instance pointer. - @param Row the position to set the cursor to. Must be + @param Column The column 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 (). + number of columns by QueryMode (). + @param Row The row position to set the cursor to. Must be + greater than or equal to zero and less than the + number of rows by QueryMode (). @retval EFI_SUCCESS The operation completed successfully. @retval EFI_DEVICE_ERROR The device had an error and could not complete @@ -1993,8 +2000,8 @@ ConSpliterGraphicsOutputSetMode ( @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 - - + @param Height Hight of rectangle in BltBuffer in pixels. + @param Delta OPTIONAL. @retval EFI_SUCCESS The Blt operation completed. @retval EFI_INVALID_PARAMETER BltOperation is not valid. @@ -2018,6 +2025,20 @@ ConSpliterGraphicsOutputBlt ( ) ; +/** + Write data from the buffer to video display based on Graphics Output setting. + + @param Private Consplitter Text Out pointer. + @param GraphicsOutput Graphics Output protocol pointer. + @param UgaDraw UGA Draw protocol pointer. + + @retval EFI_UNSUPPORTED No graphics devcie available . + @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 DevNullGopSync ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, @@ -2113,8 +2134,8 @@ ConSpliterUgaDrawSetMode ( @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 - - + @param Height Hight of rectangle in BltBuffer in pixels. + @param Delta OPTIONAL. @retval EFI_SUCCESS The Blt operation completed. @retval EFI_INVALID_PARAMETER BltOperation is not valid. @@ -2138,6 +2159,19 @@ ConSpliterUgaDrawBlt ( ) ; +/** + Write data from the buffer to video display based on UGA Draw setting. + + @param Private Consplitter Text Out pointer. + @param GraphicsOutput Graphics Output protocol pointer. + @param UgaDraw UGA Draw protocol pointer. + + @retval EFI_UNSUPPORTED No graphics devcie available . + @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 DevNullUgaSync ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c index aa083735c2..f663ec1c24 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c @@ -330,6 +330,52 @@ ConSpliterGraphicsOutputSetMode ( return ReturnStatus; } +/** + 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 Private 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. + @param Delta OPTIONAL. + + @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 DevNullGraphicsOutputBlt ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, @@ -486,7 +532,7 @@ DevNullGraphicsOutputBlt ( @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. - @param Delta (not used here). + @param Delta OPTIONAL. @retval EFI_SUCCESS The Blt operation completed. @retval EFI_INVALID_PARAMETER BltOperation is not valid. @@ -593,6 +639,20 @@ ConSpliterGraphicsOutputBlt ( return ReturnStatus; } +/** + Write data from the buffer to video display based on Graphics Output setting. + + @param Private Consplitter Text Out pointer. + @param GraphicsOutput Graphics Output protocol pointer. + @param UgaDraw UGA Draw protocol pointer. + + @retval EFI_UNSUPPORTED No graphics devcie available . + @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 DevNullGopSync ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, @@ -799,6 +859,52 @@ ConSpliterUgaDrawSetMode ( return ReturnStatus; } +/** + 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 Private 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. + @param Delta OPTIONAL. + + @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 DevNullUgaBlt ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, @@ -955,7 +1061,7 @@ DevNullUgaBlt ( @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. - @param Delta (not used here) + @param Delta OPTIONAL. @retval EFI_SUCCESS The Blt operation completed. @retval EFI_INVALID_PARAMETER BltOperation is not valid. @@ -1059,6 +1165,19 @@ ConSpliterUgaDrawBlt ( return ReturnStatus; } +/** + Write data from the buffer to video display based on UGA Draw setting. + + @param Private Consplitter Text Out pointer. + @param GraphicsOutput Graphics Output protocol pointer. + @param UgaDraw UGA Draw protocol pointer. + + @retval EFI_UNSUPPORTED No graphics devcie available . + @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 DevNullUgaSync ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, -- cgit v1.2.3