- Timestamp:
- Apr 18, 2008 3:00:53 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxSDL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r8144 r8154 112 112 mLabelFont = NULL; 113 113 mLabelHeight = 0; 114 mLabelOffs = 0; 114 115 #endif 115 116 mWMIcon = NULL; … … 981 982 * @param pointsize font size in points 982 983 */ 983 int VBoxSDLFB::initSecureLabel(uint32_t height, char *font, uint32_t pointsize )984 int VBoxSDLFB::initSecureLabel(uint32_t height, char *font, uint32_t pointsize, uint32_t labeloffs) 984 985 { 985 986 LogFlow(("VBoxSDLFB:initSecureLabel: new offset: %d pixels, new font: %s, new pointsize: %d\n", 986 987 height, font, pointsize)); 987 988 mLabelHeight = height; 989 mLabelOffs = labeloffs; 988 990 Assert(font); 989 991 pTTF_Init(); … … 1062 1064 : pTTF_RenderUTF8_Solid(mLabelFont, mSecureLabelText.raw(), clrFg); 1063 1065 rect.x = 10; 1066 rect.y = mLabelOffs; 1064 1067 SDL_BlitSurface(sText, NULL, mScreen, &rect); 1065 1068 SDL_FreeSurface(sText); -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
r8144 r8154 123 123 uint32_t getGuestYRes() { return mGuestYRes; } 124 124 #ifdef VBOX_SECURELABEL 125 int initSecureLabel(uint32_t height, char *font, uint32_t pointsize );125 int initSecureLabel(uint32_t height, char *font, uint32_t pointsize, uint32_t labeloffs); 126 126 void setSecureLabelText(const char *text); 127 127 void setSecureLabelColor(uint32_t colorFG, uint32_t colorBG); … … 178 178 /** secure label height in pixels */ 179 179 uint32_t mLabelHeight; 180 /** secure label offset from the top of the secure label */ 181 uint32_t mLabelOffs; 180 182 #endif 181 183 #ifdef RT_OS_WINDOWS -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r8144 r8154 659 659 " -seclabelfnt TrueType (.ttf) font file for secure session label\n" 660 660 " -seclabelsiz Font point size for secure session label (default 12)\n" 661 " -seclabelofs Font offset within the secure label (default 0)\n" 661 662 " -seclabelfgcol <rgb> Secure label text color RGB value in 6 digit hexadecimal (eg: FFFF00)\n" 662 663 " -seclabelbgcol <rgb> Secure label background color RGB value in 6 digit hexadecimal (eg: FF0000)\n" … … 1004 1005 BOOL fSecureLabel = false; 1005 1006 uint32_t secureLabelPointSize = 12; 1007 uint32_t secureLabelFontOffs = 0; 1006 1008 char *secureLabelFontFile = NULL; 1007 1009 uint32_t secureLabelColorFG = 0x0000FF00; … … 1419 1421 secureLabelPointSize = atoi(argv[curArg]); 1420 1422 } 1423 else if (strcmp(argv[curArg], "-seclabelofs") == 0) 1424 { 1425 if (++curArg >= argc) 1426 { 1427 RTPrintf("Error: missing font pixel offset for secure label!\n"); 1428 rc = E_FAIL; 1429 break; 1430 } 1431 secureLabelFontOffs = atoi(argv[curArg]); 1432 } 1421 1433 else if (strcmp(argv[curArg], "-seclabelfgcol") == 0) 1422 1434 { … … 1880 1892 rcVBox = RTLdrGetSymbol(gLibrarySDL_ttf, "TTF_Quit", (void**)&pTTF_Quit); 1881 1893 if (VBOX_SUCCESS(rcVBox)) 1882 rcVBox = gpFrameBuffer->initSecureLabel(SECURE_LABEL_HEIGHT, secureLabelFontFile, secureLabelPointSize );1894 rcVBox = gpFrameBuffer->initSecureLabel(SECURE_LABEL_HEIGHT, secureLabelFontFile, secureLabelPointSize, secureLabelFontOffs); 1883 1895 if (VBOX_FAILURE(rcVBox)) 1884 1896 {
Note:
See TracChangeset
for help on using the changeset viewer.