Actual source code: win32draw.h

petsc-3.13.6 2020-09-29
Report Typos and Errors

  4: #if defined(PETSC_HAVE_WINDOWS_H)
  5: #include <windows.h>
  6: #endif
  7: #if defined(PETSC_HAVE_WINDOWSX_H)
  8: #include <windowsx.h>
  9: #endif
 10:  #include <petscdraw.h>

 12: /* Nodes that record mouse actions when needed */
 13: typedef struct _p_MouseNode *MouseNode;
 14: struct _p_MouseNode {
 15:   PetscDrawButton Button;
 16:   POINT           user;
 17:   POINT           phys;
 18:   MouseNode       mnext;
 19:   int             Length;
 20: };

 22: /* nodes that contain handle to all user created windows */
 23: typedef struct _p_WindowNode *WindowNode;
 24: struct _p_WindowNode {
 25:   HWND       hWnd;
 26:   WindowNode wnext,wprev;
 27:   HANDLE     event;
 28:   MouseNode  MouseListHead;
 29:   MouseNode  MouseListTail;
 30:   BOOL       IsGetMouseOn;
 31:   PetscBool  DoubleBuffered;
 32:   HDC        Buffer,DoubleBuffer;
 33:   HBITMAP    BufferBit,DoubleBufferBit;
 34:   HGDIOBJ    store,dbstore;
 35:   int        bitwidth,bitheight;
 36: };

 38: /* Nodes that hold all information about a windows device context */
 39: typedef struct  {
 40:   HDC        hdc;
 41:   HWND       hWnd;
 42:   int        linewidth;
 43:   int        pointdiameter;
 44:   COLORREF   currentcolor;
 45:   int        stringheight;
 46:   int        stringwidth;
 47:   int        pause;
 48:   PetscBool  haveresized;
 49:   HANDLE     hReadyEvent;
 50:   int        x,y,w,h;  /* Size and location of window */
 51:   WindowNode node; /* so we can grab windownode info if needed */
 52:   DWORD      popup,caption,overlapped;

 54: } PetscDraw_Win32;



 58: #endif