Actual source code: win32draw.h
4: #include <stdio.h>
5: #include <windows.h>
6: #include <windowsx.h>
7: #include <math.h>
8: #include <time.h>
9: #include <conio.h>
10: #include <stdlib.h>
11: #include "petscdraw.h"
13: /* Nodes that record mouse actions when needed */
14: typedef struct _p_MouseNode *MouseNode;
15: struct _p_MouseNode{
16: PetscDrawButton Button;
17: POINT user;
18: POINT phys;
19: MouseNode mnext;
20: int Length;
21: };
23: /* nodes that contain handle to all user created windows */
24: typedef struct _p_WindowNode *WindowNode;
25: struct _p_WindowNode {
26: HWND hWnd;
27: WindowNode wnext,wprev;
28: HANDLE event;
29: MouseNode MouseListHead;
30: MouseNode MouseListTail;
31: BOOL IsGetMouseOn;
32: PetscTruth DoubleBuffered;
33: HDC Buffer,DoubleBuffer;
34: HBITMAP BufferBit,DoubleBufferBit;
35: HGDIOBJ store,dbstore;
36: int bitwidth,bitheight;
37: };
39: /* Nodes that hold all information about a windows device context */
40: typedef struct {
41: HDC hdc;
42: HWND hWnd;
43: int linewidth;
44: int pointdiameter;
45: COLORREF currentcolor;
46: int stringheight;
47: int stringwidth;
48: int pause;
49: PetscTruth haveresized;
50: HANDLE hReadyEvent;
51: int x,y,w,h; /* Size and location of window */
52: WindowNode node;/* so we can grab windownode info if needed */
53: DWORD popup,caption,overlapped;
54:
55: } PetscDraw_Win32;
59: #endif