#include "ConSplitter.h"\r
\r
\r
-STATIC CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };\r
+CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };\r
\r
\r
/**\r
Return the current video mode information. Also returns info about existence\r
- of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the\r
- arguments are optional and only returned if a non NULL pointer is passed in.\r
+ of Graphics Output devices or UGA Draw devices in system, and whether the Std\r
+ In device is locked. GopUgaExists and StdInLocked parameters are optional, and\r
+ only returned if a non NULL pointer is passed in.\r
\r
@param This Protocol instance pointer.\r
- @param Mode Are we in text of grahics mode.\r
- @param GopExists TRUE if GOP Spliter has found a GOP/UGA device\r
+ @param Mode Current video mode.\r
+ @param GopUgaExists TRUE if GOP Spliter has found a GOP/UGA device\r
@param StdInLocked TRUE if StdIn device is keyboard locked\r
\r
- @retval EFI_SUCCESS Mode information returned.\r
- @retval EFI_INVALID_PARAMETER Invalid parameters.\r
+ @retval EFI_SUCCESS Video mode information is returned.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameters if Mode == NULL.\r
\r
**/\r
EFI_STATUS\r
ConSpliterConsoleControlGetMode (\r
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,\r
- OUT BOOLEAN *GopExists,\r
+ OUT BOOLEAN *GopUgaExists,\r
OUT BOOLEAN *StdInLocked\r
)\r
{\r
\r
*Mode = Private->ConsoleOutputMode;\r
\r
- if (GopExists != NULL) {\r
- *GopExists = FALSE;\r
+ if (GopUgaExists != NULL) {\r
+ *GopUgaExists = FALSE;\r
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {\r
if ((Private->TextOutList[Index].GraphicsOutput != NULL) || (Private->TextOutList[Index].UgaDraw != NULL)) {\r
- *GopExists = TRUE;\r
+ *GopUgaExists = TRUE;\r
break;\r
}\r
}\r
\r
\r
/**\r
- Graphics output protocol interface to set video mode\r
+ Graphics output protocol interface to set video mode.\r
\r
@param This Protocol instance pointer.\r
@param ModeNumber The mode number to be set.\r
\r
Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);\r
\r
- //\r
- // GopDevNullSetMode ()\r
- //\r
ReturnStatus = EFI_SUCCESS;\r
\r
//\r
return ReturnStatus;\r
}\r
\r
+/**\r
+ The following table defines actions for BltOperations.\r
+\r
+ EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
+ directly to every pixel of the video display rectangle\r
+ (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+ EfiBltVideoToBltBuffer - Read data from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+ the BltBuffer rectangle (DestinationX, DestinationY )\r
+ (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+ DestinationY is not zero then Delta must be set to the length in bytes\r
+ of a row in the BltBuffer.\r
+ EfiBltBufferToVideo - Write data from the BltBuffer rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+ video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+ not zero then Delta must be set to the length in bytes of a row in the\r
+ BltBuffer.\r
+ EfiBltVideoToVideo - Copy from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
+ to the video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ The BltBuffer and Delta are not used in this mode.\r
+\r
+ @param Private Protocol instance pointer.\r
+ @param BltBuffer Buffer containing data to blit into video buffer.\r
+ This buffer has a size of\r
+ Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+ @param BltOperation Operation to perform on BlitBuffer and video\r
+ memory\r
+ @param SourceX X coordinate of source for the BltBuffer.\r
+ @param SourceY Y coordinate of source for the BltBuffer.\r
+ @param DestinationX X coordinate of destination for the BltBuffer.\r
+ @param DestinationY Y coordinate of destination for the BltBuffer.\r
+ @param Width Width of rectangle in BltBuffer in pixels.\r
+ @param Height Hight of rectangle in BltBuffer in pixels. \r
+ @param Delta OPTIONAL.\r
+\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video\r
+ buffer.\r
+\r
+**/\r
EFI_STATUS\r
DevNullGraphicsOutputBlt (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
@param DestinationX X coordinate of destination for the BltBuffer.\r
@param DestinationY Y coordinate of destination for the BltBuffer.\r
@param Width Width of rectangle in BltBuffer in pixels.\r
- @param Height Hight of rectangle in BltBuffer in pixels. Delta\r
- -\r
+ @param Height Hight of rectangle in BltBuffer in pixels. \r
+ @param Delta OPTIONAL.\r
\r
@retval EFI_SUCCESS The Blt operation completed.\r
@retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
return ReturnStatus;\r
}\r
\r
+/**\r
+ Write data from the buffer to video display based on Graphics Output setting. \r
+\r
+ @param Private Consplitter Text Out pointer.\r
+ @param GraphicsOutput Graphics Output protocol pointer.\r
+ @param UgaDraw UGA Draw protocol pointer.\r
+\r
+ @retval EFI_UNSUPPORTED No graphics devcie available .\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.\r
+ \r
+\r
+**/\r
EFI_STATUS\r
DevNullGopSync (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
return ReturnStatus;\r
}\r
\r
+/**\r
+ The following table defines actions for BltOperations.\r
+\r
+ EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
+ directly to every pixel of the video display rectangle\r
+ (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+ EfiBltVideoToBltBuffer - Read data from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+ the BltBuffer rectangle (DestinationX, DestinationY )\r
+ (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+ DestinationY is not zero then Delta must be set to the length in bytes\r
+ of a row in the BltBuffer.\r
+ EfiBltBufferToVideo - Write data from the BltBuffer rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+ video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+ not zero then Delta must be set to the length in bytes of a row in the\r
+ BltBuffer.\r
+ EfiBltVideoToVideo - Copy from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
+ to the video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ The BltBuffer and Delta are not used in this mode.\r
+\r
+ @param Private Protocol instance pointer.\r
+ @param BltBuffer Buffer containing data to blit into video buffer.\r
+ This buffer has a size of\r
+ Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+ @param BltOperation Operation to perform on BlitBuffer and video\r
+ memory\r
+ @param SourceX X coordinate of source for the BltBuffer.\r
+ @param SourceY Y coordinate of source for the BltBuffer.\r
+ @param DestinationX X coordinate of destination for the BltBuffer.\r
+ @param DestinationY Y coordinate of destination for the BltBuffer.\r
+ @param Width Width of rectangle in BltBuffer in pixels.\r
+ @param Height Hight of rectangle in BltBuffer in pixels. \r
+ @param Delta OPTIONAL.\r
+\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video\r
+ buffer.\r
+\r
+**/\r
EFI_STATUS\r
DevNullUgaBlt (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
@param DestinationX X coordinate of destination for the BltBuffer.\r
@param DestinationY Y coordinate of destination for the BltBuffer.\r
@param Width Width of rectangle in BltBuffer in pixels.\r
- @param Height Hight of rectangle in BltBuffer in pixels. Delta\r
- -\r
+ @param Height Hight of rectangle in BltBuffer in pixels.\r
+ @param Delta OPTIONAL.\r
\r
@retval EFI_SUCCESS The Blt operation completed.\r
@retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
return ReturnStatus;\r
}\r
\r
+/**\r
+ Write data from the buffer to video display based on UGA Draw setting. \r
+\r
+ @param Private Consplitter Text Out pointer.\r
+ @param GraphicsOutput Graphics Output protocol pointer.\r
+ @param UgaDraw UGA Draw protocol pointer.\r
+\r
+ @retval EFI_UNSUPPORTED No graphics devcie available .\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.\r
+ \r
+**/\r
EFI_STATUS\r
DevNullUgaSync (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
Attribute = NullAttributes + SizeAttribute;\r
\r
for (Index = 0; Index < MaxColumn; Index++, Screen++, Attribute++) {\r
- *Screen = ' ';\r
+ *Screen = L' ';\r
*Attribute = Mode->Attribute;\r
}\r
} else {\r
if (Private->TextOutModeMap != NULL) {\r
CurrentMode = *(Private->TextOutModeMap + Private->TextOutListCount * ModeNumber);\r
} else {\r
- CurrentMode = (INT32)(ModeNumber);\r
+ CurrentMode = (INT32) (ModeNumber);\r
}\r
Mode = &(Private->TextOutQueryData[CurrentMode]);\r
Row = Mode->Rows;\r
\r
for (Row = 0; Row < Private->DevNullRows; Row++) {\r
for (Column = 0; Column < Private->DevNullColumns; Column++, Screen++, Attributes++) {\r
- *Screen = ' ';\r
+ *Screen = L' ';\r
*Attributes = CurrentAttribute;\r
}\r
//\r