diff options
author | Kevin Walzer <kw@codebykevin.com> | 2020-10-12 01:34:57 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2020-10-12 01:34:57 (GMT) |
commit | b702ba89a394de8668091f7442e4b08da0e94dcb (patch) | |
tree | 24f82ac90bc11798fc08fa3672833be464719772 /win/tkWinSysTray.c | |
parent | 4057120bb20bac23d00b670a51d5547269520588 (diff) | |
download | tk-b702ba89a394de8668091f7442e4b08da0e94dcb.zip tk-b702ba89a394de8668091f7442e4b08da0e94dcb.tar.gz tk-b702ba89a394de8668091f7442e4b08da0e94dcb.tar.bz2 |
Remove and refactor some irrelevant code
Diffstat (limited to 'win/tkWinSysTray.c')
-rw-r--r-- | win/tkWinSysTray.c | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/win/tkWinSysTray.c b/win/tkWinSysTray.c index 5044d60..f26c39d 100644 --- a/win/tkWinSysTray.c +++ b/win/tkWinSysTray.c @@ -176,99 +176,6 @@ FreeIconResource(BlockOfIconImagesPtr lpIR) { } - -/* - *---------------------------------------------------------------------- - * - * AdjustICONIMAGEPointers -- - * - * Adjust internal pointers in icon resource struct. - * - * Results: - * Pointers adjusted as needed in icon resource struct. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static BOOL -AdjustICONIMAGEPointers(LPICONIMAGE lpImage) { - /* Sanity check */ - if (lpImage == NULL) - return FALSE; - /* BITMAPINFO is at beginning of bits */ - lpImage -> lpbi = (LPBITMAPINFO) lpImage -> lpBits; - /* Width - simple enough */ - lpImage -> Width = lpImage -> lpbi -> bmiHeader.biWidth; - /* Icons are stored in funky format where height is doubled - account for it */ - lpImage -> Height = (lpImage -> lpbi -> bmiHeader.biHeight) / 2; - /* How many colors? */ - lpImage -> Colors = lpImage -> lpbi -> bmiHeader.biPlanes * lpImage -> lpbi -> bmiHeader.biBitCount; - /* XOR bits follow the header and color table */ - lpImage -> lpXOR = (LPBYTE) FindDIBBits((LPSTR) lpImage -> lpbi); - /* AND bits follow the XOR bits */ - lpImage -> lpAND = lpImage -> lpXOR + (lpImage -> Height * BytesPerLine((LPBITMAPINFOHEADER)(lpImage -> lpbi))); - return TRUE; -} - - -/* - *---------------------------------------------------------------------- - * - * ReadICOHeader -- - * - * Read the header from an ICO file. - * - * Results: - * Icon is created. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - - -static int -ReadICOHeader(Tcl_Channel channel) { - WORD Input; - DWORD dwBytesRead; - - /* Read the 'reserved' WORD */ - if ((dwBytesRead = Tcl_Read(channel, (char * ) & Input, sizeof(WORD))) < 0) - return -1; - - /* Did we get a WORD? */ - if (dwBytesRead != sizeof(WORD)) - return -1; - - /* Was it 'reserved' ? (ie 0) */ - if (Input != 0) - return -1; - - /* Read the type WORD */ - if ((dwBytesRead = Tcl_Read(channel, (char * ) & Input, sizeof(WORD))) < 0) - return -1; - - /* Did we get a WORD? */ - if (dwBytesRead != sizeof(WORD)) - return -1; - /* Was it type 1? */ - if (Input != 1) - return -1; - - /* Get the count of images */ - if ((dwBytesRead = Tcl_Read(channel, (char * ) & Input, sizeof(WORD))) < 0) - return -1; - /* Did we get a WORD? */ - if (dwBytesRead != sizeof(WORD)) - return -1; - /* Return the count */ - return (int) Input; -} - /* * If someone wants to see the several masks somewhere on the screen... * set the ICO_DRAW define and feel free to make some Tcl commands |