X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FConsole%2FGraphicsConsoleDxe%2FGraphicsConsole.c;h=f925daa975bd935c7b4e2c622f15f9620663a3d6;hp=ada795b99c1fd1007610d1ccf1ebba06062c41b4;hb=aa79b0b3799e95bc21e0df32a135cc5a4d749e4b;hpb=4058e906c15600ee6229335c316cb85fcbd687b3 diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index ada795b99c..f925daa975 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c @@ -14,82 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "GraphicsConsole.h" -/** - Gets Graphics Console devcie's foreground color and background color. - - @param This Protocol instance pointer. - @param Foreground Returned text foreground color. - @param Background Returned text background color. - - @retval EFI_SUCCESS It returned always. - -**/ -EFI_STATUS -GetTextColors ( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, - OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background - ); - -/** - Draw Unicode string on the Graphice Console device's screen. - - @param This Protocol instance pointer. - @param UnicodeWeight One Unicode string to be displayed. - @param Count The count of Unicode string. - - @retval EFI_OUT_OF_RESOURCES If no memory resource to use. - @retval EFI_UNSUPPORTED If no Graphics Output protocol and UGA Draw - protocol exist. - @retval EFI_SUCCESS Drawing Unicode string implemented successfully. - -**/ -EFI_STATUS -DrawUnicodeWeightAtCursorN ( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, - IN CHAR16 *UnicodeWeight, - IN UINTN Count - ); - -/** - Erase the cursor on the screen. - - @param This Protocol instance pointer. - - @retval EFI_SUCCESS The cursor is erased successfully. - -**/ -EFI_STATUS -EraseCursor ( - IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This - ); - -/** - Check if the current specific mode supported the user defined resolution - for the Graphice Console devcie based on Graphics Output Protocol. - - If yes, set the graphic devcice's current mode to this specific mode. - - @param GraphicsOutput Graphics Output Protocol instance pointer. - @param HorizontalResolution User defined horizontal resolution - @param VerticalResolution User defined vertical resolution. - @param CurrentModeNumber Current specific mode to be check. - - @retval EFI_SUCCESS The mode is supported. - @retval EFI_UNSUPPORTED The specific mode is out of range of graphics - devcie supported. - @retval other The specific mode does not support user defined - resolution or failed to set the current mode to the - specific mode on graphics device. - -**/ -EFI_STATUS -CheckModeSupported ( - EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput, - IN UINT32 HorizontalResolution, - IN UINT32 VerticalResolution, - OUT UINT32 *CurrentModeNumber - ); // // Graphics Console Devcie Private Data template @@ -175,6 +99,83 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding = { NULL }; +/** + Gets Graphics Console devcie's foreground color and background color. + + @param This Protocol instance pointer. + @param Foreground Returned text foreground color. + @param Background Returned text background color. + + @retval EFI_SUCCESS It returned always. + +**/ +EFI_STATUS +GetTextColors ( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, + OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, + OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background + ); + +/** + Draw Unicode string on the Graphice Console device's screen. + + @param This Protocol instance pointer. + @param UnicodeWeight One Unicode string to be displayed. + @param Count The count of Unicode string. + + @retval EFI_OUT_OF_RESOURCES If no memory resource to use. + @retval EFI_UNSUPPORTED If no Graphics Output protocol and UGA Draw + protocol exist. + @retval EFI_SUCCESS Drawing Unicode string implemented successfully. + +**/ +EFI_STATUS +DrawUnicodeWeightAtCursorN ( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, + IN CHAR16 *UnicodeWeight, + IN UINTN Count + ); + +/** + Erase the cursor on the screen. + + @param This Protocol instance pointer. + + @retval EFI_SUCCESS The cursor is erased successfully. + +**/ +EFI_STATUS +EraseCursor ( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This + ); + +/** + Check if the current specific mode supported the user defined resolution + for the Graphice Console devcie based on Graphics Output Protocol. + + If yes, set the graphic devcice's current mode to this specific mode. + + @param GraphicsOutput Graphics Output Protocol instance pointer. + @param HorizontalResolution User defined horizontal resolution + @param VerticalResolution User defined vertical resolution. + @param CurrentModeNumber Current specific mode to be check. + + @retval EFI_SUCCESS The mode is supported. + @retval EFI_UNSUPPORTED The specific mode is out of range of graphics + devcie supported. + @retval other The specific mode does not support user defined + resolution or failed to set the current mode to the + specific mode on graphics device. + +**/ +EFI_STATUS +CheckModeSupported ( + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput, + IN UINT32 HorizontalResolution, + IN UINT32 VerticalResolution, + OUT UINT32 *CurrentModeNumber + ); + /** Test to see if Graphics Console could be supported on the Controller.