summaryrefslogtreecommitdiffstats
path: root/win/tkWinIco.h
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2020-08-10 00:51:58 (GMT)
committerKevin Walzer <kw@codebykevin.com>2020-08-10 00:51:58 (GMT)
commite8265093130028add35cfdff771aca32f0c74577 (patch)
tree3afd1889d7e0ec5ecc41a745f9e6ead4b90754ca /win/tkWinIco.h
parentf91288c10c35271aba33a167829c0d7963063e61 (diff)
downloadtk-e8265093130028add35cfdff771aca32f0c74577.zip
tk-e8265093130028add35cfdff771aca32f0c74577.tar.gz
tk-e8265093130028add35cfdff771aca32f0c74577.tar.bz2
Reduce refactoring of code, not as much needed
Diffstat (limited to 'win/tkWinIco.h')
-rw-r--r--win/tkWinIco.h45
1 files changed, 2 insertions, 43 deletions
diff --git a/win/tkWinIco.h b/win/tkWinIco.h
index cf2c7f9..fd1e177 100644
--- a/win/tkWinIco.h
+++ b/win/tkWinIco.h
@@ -64,32 +64,6 @@ typedef struct {
ICONDIRENTRY idEntries[1]; /* The entries for each image */
} ICONDIR, *LPICONDIR;
-/*
- * A pointer to one of these strucutures is associated with each toplevel.
- * This allows us to free up all memory associated with icon resources when a
- * window is deleted or if the window's icon is changed. They are simply
- * reference counted according to:
- *
- * (1) How many WmInfo structures point to this object
- * (2) Whether the ThreadSpecificData defined in this file contains a pointer
- * to this object.
- *
- * The former count is for windows whose icons are individually set, and the
- * latter is for the global default icon choice.
- *
- * Icons loaded from .icr/.icr use the iconBlock field, icons loaded from
- * .exe/.dll use the hIcon field.
- */
-
-typedef struct WinIconInstance {
- size_t refCount; /* Number of instances that share this data
- * structure. */
- BlockOfIconImagesPtr iconBlock;
- /* Pointer to icon resource data for image */
-} WinIconInstance;
-
-typedef struct WinIconInstance *WinIconPtr;
-
/*
* Used in BytesPerLine
@@ -102,27 +76,12 @@ typedef struct WinIconInstance *WinIconPtr;
* The following are implemented in tkWinIco.c and also used in tkWinWm.c and tkWinSysTray.c.
*/
-static BlockOfIconImagesPtr ReadIconOrCursorFromFile(Tcl_Interp *interp, Tcl_Obj* fileName, BOOL isIcon);
-static WinIconPtr ReadIconFromFile(Tcl_Interp *interp,
- Tcl_Obj *fileName);
-static WinIconPtr GetIconFromPixmap(Display *dsPtr, Pixmap pixmap);
-static int ReadICOHeader(Tcl_Channel channel);
-static BOOL AdjustIconImagePointers(LPICONIMAGE lpImage);
-static HICON MakeIconOrCursorFromResource(LPICONIMAGE lpIcon,
- BOOL isIcon);
-static HICON GetIcon(WinIconPtr titlebaricon, int icon_size);
-static int WinSetIcon(Tcl_Interp *interp,
- WinIconPtr titlebaricon, Tk_Window tkw);
-static void FreeIconBlock(BlockOfIconImagesPtr lpIR);
-static void DecrIconRefCount(WinIconPtr titlebaricon);
-static HICON MakeIconOrCursorFromResource(LPICONIMAGE lpIcon,
- BOOL isIcon);
-static BOOL AdjustIconImagePointers( LPICONIMAGE lpImage);
+
static DWORD BytesPerLine(LPBITMAPINFOHEADER lpBMIH);
static LPSTR FindDIBBits(LPSTR lpbi);
static WORD PaletteSize(LPSTR lpbi);
static WORD DIBNumColors(LPSTR lpbi);
static int ReadICOHeader(Tcl_Channel channel);
-static HICON GetIcon( WinIconPtr titlebaricon, int icon_size);
+