|
|
1.1 ! root 1: /****************************************************************************/ ! 2: /* */ ! 3: /* Microsoft Confidential */ ! 4: /* */ ! 5: /* Copyright (c) Microsoft Corp. 1987, 1990 */ ! 6: /* All Rights Reserved */ ! 7: /* */ ! 8: /****************************************************************************/ ! 9: /****************************** Module Header ******************************* ! 10: * Module Name: globals.h ! 11: * ! 12: * Declares global data for the image editor. ! 13: * ! 14: * History: ! 15: * ! 16: ****************************************************************************/ ! 17: ! 18: ! 19: /* ! 20: * Initialized data and structures ----------------------------------------- ! 21: */ ! 22: ! 23: extern INIENTRY gaie[]; // Initialization data structure. ! 24: ! 25: extern BOOL gfGrid; // TRUE if the grid is on. ! 26: extern BOOL gfShowColor; // TRUE if Color palette is to be shown. ! 27: extern BOOL gfShowView; // TRUE if View window is to be shown. ! 28: extern BOOL gfShowToolbox; // TRUE if Toolbox is to be shown. ! 29: extern INT gnBrushSize; // Current brush size. ! 30: ! 31: extern CHAR szAppPos[]; // App window's position keyname. ! 32: extern CHAR szTBPos[]; // Toolbox window's position keyname. ! 33: extern CHAR szViewPos[]; // View window's position keyname. ! 34: extern CHAR szColorPos[]; // Color palette window's position keyname. ! 35: extern CHAR szrgbScreen[]; // Screen color keyname. ! 36: ! 37: ! 38: /* ! 39: * Instance handles, window handles and class strings ---------------------- ! 40: */ ! 41: ! 42: extern HANDLE ghInst; // App instance handle. ! 43: extern HANDLE haccelTbl; // Accelerator table handle. ! 44: extern HCURSOR hcurWait; // Standard hourglass cursor. ! 45: ! 46: extern HWND ghwndMain; // Main app window handle. ! 47: extern HWND ghwndWork; // Workspace window handle. ! 48: extern HWND ghwndPropBar; // Properties Bar window handle. ! 49: extern HWND ghwndToolbox; // Toolbox window handle. ! 50: extern HWND ghwndView; // View window handle. ! 51: extern HWND ghwndColor; // Color palette window handle. ! 52: ! 53: extern CHAR szMainClass[]; // Main window class. ! 54: extern CHAR szWorkClass[]; // Work window class. ! 55: extern CHAR szToolboxClass[]; // Toolbox window class. ! 56: extern CHAR szToolBtnClass[]; // Toolbox button window class. ! 57: extern CHAR szViewClass[]; // View window class. ! 58: extern CHAR szColorBoxClass[]; // Color box window class. ! 59: extern CHAR szColorLRClass[]; // Color Left-Right sample class. ! 60: ! 61: ! 62: /* ! 63: * Device list globals ----------------------------------------------------- ! 64: */ ! 65: ! 66: extern PDEVICE gpIconDeviceHead; // Head of icon device list. ! 67: extern INT gnIconDevices; // Number of icon devices. ! 68: extern PDEVICE gpCursorDeviceHead; // Head of cursor device list. ! 69: extern INT gnCursorDevices; // Number of cursor devices. ! 70: ! 71: ! 72: /* ! 73: * Globals that describe the current file and image being edited ----------- ! 74: */ ! 75: ! 76: extern CHAR gszFullFileName[]; // Full path name of current file. ! 77: extern PSTR gpszFileName; // Current file name (or NULL). ! 78: extern INT giType; // Type of object being edited currently. ! 79: extern PIMAGEINFO gpImageHead; // Head of image linked list. ! 80: extern INT gnImages; // Number of images in the file. ! 81: extern BOOL fFileDirty; // TRUE if the file is dirty. ! 82: ! 83: extern PIMAGEINFO gpImageCur; // Pointer to current image. ! 84: extern INT gcxImage; // Width of the image. ! 85: extern INT gcyImage; // Height of the image. ! 86: extern INT gnColors; // Number of colors of current image. ! 87: extern BOOL fImageDirty; // TRUE if the image is dirty. ! 88: ! 89: ! 90: /* ! 91: * Drawing DC's and bitmaps ------------------------------------------------ ! 92: */ ! 93: ! 94: extern HDC ghdcImage; // Image XOR DC. ! 95: extern HBITMAP ghbmImage; // Image XOR bitmap. ! 96: ! 97: extern HDC ghdcANDMask; // Image AND mask DC. ! 98: extern HBITMAP ghbmANDMask; // Image AND mask bitmap. ! 99: ! 100: extern HBITMAP ghbmUndo; // Backup of XOR bitmap for undo. ! 101: extern HBITMAP ghbmUndoMask; // Backup of AND mask bitmap for undo. ! 102: ! 103: ! 104: /* ! 105: * Globals for the color palette and drawing ------------------------------- ! 106: */ ! 107: ! 108: extern INT giColorLeft; // Index to the left color in gargbCurrent. ! 109: extern INT giColorRight; // Index to the right color in gargbCurrent. ! 110: extern INT gfModeLeft; // Mode of the left color brush. ! 111: extern INT gfModeRight; // Mode of the right color brush. ! 112: extern HBRUSH ghbrLeft; // Brush with left mouse button color. ! 113: extern HBRUSH ghbrLeftSolid; // Brush with solid left button color. ! 114: extern HBRUSH ghbrRight; // Brush with right mouse button color. ! 115: extern HBRUSH ghbrRightSolid; // Brush with solid right button color. ! 116: extern HBRUSH ghbrScreen; // Brush with screen color. ! 117: extern HBRUSH ghbrInverse; // Brush with inverse screen color. ! 118: extern HPEN ghpenLeft; // Left color pen. ! 119: extern HPEN ghpenRight; // Right color pen. ! 120: extern DWORD grgbScreenDefault; // Default screen color. ! 121: extern DWORD grgbScreen; // RGB of screen color. ! 122: extern DWORD grgbInverse; // RGB of inverse screen color. ! 123: extern DWORD *gargbCurrent; // Points to the current color table. ! 124: extern DWORD gargbColor[]; // Current color color table. ! 125: extern DWORD gargbMono[]; // Current monochrome color table. ! 126: extern HPEN hpenDarkGray; // A dark gray pen. ! 127: ! 128: extern DRAWPROC gpfnDrawProc; // Current drawing functions. ! 129: extern INT gCurTool; // Current tool (TOOL_* define). ! 130: extern HBRUSH ghbrDraw; // Current drawing brush. ! 131: extern HBRUSH ghbrDrawSolid; // Current solid drawing brush. ! 132: extern HPEN ghpenDraw; // Current drawing pen. ! 133: extern INT gfDrawMode; // Mode of current drawing brush. ! 134: ! 135: extern DWORD gargbDefaultColor[]; // The default color palette. ! 136: ! 137: extern DWORD gargbDefaultMono[]; // The default monochrome palette. ! 138: ! 139: extern DWORD gargbColorTable2[]; // Color table for monochrome DIB's. ! 140: ! 141: extern TOOLS gaTools[]; // Tool table. ! 142: ! 143: ! 144: /* ! 145: * Globals and tables for messages and help -------------------------------- ! 146: */ ! 147: ! 148: extern MESSAGEDATA gamdMessages[]; // Message box messages table. ! 149: ! 150: extern INT gidCurrentDlg; // Current dialog id (null if none). ! 151: extern INT gMenuSelected; // Currently selected menu item. ! 152: extern CHAR gszHelpFile[]; // Path to the help file. ! 153: extern HHOOK ghhkMsgFilter; // Hook handle for message filter func. ! 154: extern FARPROC lpfnMsgFilterHookFunc; // The message filter proc instance. ! 155: ! 156: extern HELPMAP gahmapMenu[]; // Menu item to help topic mapping table. ! 157: ! 158: extern HELPMAP gahmapDialog[]; // Dialog id to help topic mapping table. ! 159: ! 160: ! 161: /* ! 162: * Misc. globals ----------------------------------------------------------- ! 163: */ ! 164: ! 165: extern INT gcxWorkSpace; // Width of workspace window. ! 166: extern INT gcyWorkSpace; // Height of workspace window. ! 167: extern INT gZoomFactor; // Magnification factor of image. ! 168: ! 169: extern RECT grcPick; // The current picking rectangle. ! 170: extern INT gcxPick; // Width of picking rectangle. ! 171: extern INT gcyPick; // Height of picking rectangle. ! 172: ! 173: extern UINT ClipboardFormat; // ID of private clipboard format. ! 174: extern BOOL fStretchClipboardData; // TRUE to default to stretch on paste. ! 175: ! 176: extern INT iNewFileType; // New file type the user selected. ! 177: ! 178: extern INT gcyBorder; // System border height. ! 179: extern INT gcyPropBar; // Height of PropBar window. ! 180: ! 181: extern WNDPROC lpfnPropBarDlgProc; // Proc inst. of PropBar dialog proc. ! 182: extern WNDPROC lpfnColorDlgProc; // Proc inst. of Color palette dlg proc.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.