Annotation of OpenXM_contrib/gnuplot/os2/gnupmdrv.h, Revision 1.1
1.1 ! maekawa 1: /* gnushell header file */
! 2: /*
! 3: ** static char RCSid[]="$Id: gnupmdrv.h,v 1.8 1998/03/22 22:34:23 drd Exp $" ;
! 4: */
! 5:
! 6: /* PM driver for GNUPLOT */
! 7:
! 8: /*[
! 9: * Copyright 1992, 1993, 1998 Roger Fearick
! 10: *
! 11: * Permission to use, copy, and distribute this software and its
! 12: * documentation for any purpose with or without fee is hereby granted,
! 13: * provided that the above copyright notice appear in all copies and
! 14: * that both that copyright notice and this permission notice appear
! 15: * in supporting documentation.
! 16: *
! 17: * Permission to modify the software is granted, but not the right to
! 18: * distribute the complete modified source code. Modifications are to
! 19: * be distributed as patches to the released version. Permission to
! 20: * distribute binaries produced by compiling modified sources is granted,
! 21: * provided you
! 22: * 1. distribute the corresponding source modifications from the
! 23: * released version in the form of a patch file along with the binaries,
! 24: * 2. add special version identification to distinguish your version
! 25: * in addition to the base release version number,
! 26: * 3. provide your name and address as the primary contact for the
! 27: * support of your modified version, and
! 28: * 4. retain our contact information in regard to use of the base
! 29: * software.
! 30: * Permission to distribute the released version of the source code along
! 31: * with corresponding source modifications in the form of a patch file is
! 32: * granted with same provisions 2 through 4 for binary distributions.
! 33: *
! 34: * This software is provided "as is" without express or implied warranty
! 35: * to the extent permitted by applicable law.
! 36: ]*/
! 37:
! 38:
! 39: /*
! 40: * AUTHOR
! 41: *
! 42: * Gnuplot driver for OS/2: Roger Fearick
! 43: *
! 44: * Send your comments or suggestions to
! 45: * info-gnuplot@dartmouth.edu.
! 46: * This is a mailing list; to join it send a note to
! 47: * majordomo@dartmouth.edu.
! 48: * Send bug reports to
! 49: * bug-gnuplot@dartmouth.edu.
! 50: **/
! 51:
! 52: /* include resource defines */
! 53:
! 54: #ifndef DISPDEFS_H
! 55: /*#include "dispdefs.h"*/
! 56: #include "dialogs.h"
! 57: #endif
! 58:
! 59: /*==== own window messages =================================================*/
! 60:
! 61: #define WM_GNUPLOT (WM_USER+20)
! 62: #define WM_PAUSEPLOT (WM_USER+21)
! 63: #define WM_PAUSEEND (WM_USER+22)
! 64: #define WM_GPSTART (WM_USER+23)
! 65: #define WM_USER_SET_DATA (WM_USER+90)
! 66: #define WM_USER_GET_DATA (WM_USER+91)
! 67: #define WM_USER_CHGFONT (WM_USER+10)
! 68: #define WM_USER_PRINT_BEGIN (WM_USER+200)
! 69: #define WM_USER_PRINT_OK (WM_USER+201)
! 70: #define WM_USER_PRINT_ERROR (WM_USER+202)
! 71: #define WM_USER_DEV_ERROR (WM_USER+203)
! 72: #define WM_USER_PRINT_QBUSY (WM_USER+204)
! 73: #define WM_USER_PRINT_CANCEL (WM_USER+205)
! 74:
! 75: /*==== various names ========================================================*/
! 76:
! 77: #define GNUPIPE "\\pipe\\gnuplot" /* named pipe to gnuplot */
! 78: #define GNUQUEUE "\\queues\\gnuplot" /* queue for gnuplot termination */
! 79: #define GNUSEM "\\sem32\\gnuplot.sem" /* synch gnuplot and gnupmdrv */
! 80: #define GNUINI "GNUPMDRV.INI" /* ini filename */
! 81: #define ENVGNUHELP "GNUHELP" /* gnuplot help envionment name */
! 82: #define ENVGNUPLOT "GNUPLOT" /* general gnuplot environment */
! 83: #define GNUEXEFILE "gnuplot.exe" /* exe file name */
! 84: #define GNUHELPFILE "gnuplot.gih" /* help file name */
! 85: #define GNUTERMINIT "GNUTERM=pm" /* terminal setup string */
! 86: #define INITIAL_FONT "14.Helvetica" /* initial font for plots */
! 87: #define APP_NAME "GnuplotPM" /* application name */
! 88: #define CHILD_NAME "GnupltChild" /* child window name */
! 89:
! 90: // profile (ini file) names
! 91: #define INISHELLPOS "PosShell"
! 92: #define INIPAUSEPOS "PosPause"
! 93: #define INIPLOTPOS "PosPlot"
! 94: #define INIFONT "DefFont"
! 95: #define INIFRAC "PageFrac"
! 96: #define INIPRDRIV "DrivData"
! 97: #define INIPRPR "Printer"
! 98: #define INIOPTS "DefOpts"
! 99: #define INICHAR "Fontdata"
! 100:
! 101: /*==== global data ==========================================================*/
! 102:
! 103: HAB hab ; // application anchor block handle
! 104: HWND hApp ; // application window handle
! 105: HWND hwndFrame ; // frame window handle
! 106: #define FONTBUF 256 /* buffer for dropped font namesize */
! 107: #define GNUXPAGE 19500 /* width of plot area in 0.01 cm */
! 108: #define GNUYPAGE 12500 /* height of plot area in 0.01 cm */
! 109:
! 110: /*==== stuff for querying printer capability =================================*/
! 111:
! 112: typedef struct { //query data for printer setup
! 113: int cbStruct ; /* size of struct */
! 114: float xsize ;
! 115: float ysize ;
! 116: float xfrac ;
! 117: float yfrac ;
! 118: short caps ;
! 119: char szFilename[CCHMAXPATHCOMP] ;
! 120: char szPrinterName[128] ;
! 121: PPRQINFO3 piPrinter ;
! 122: int cbpdriv ;
! 123: PDRIVDATA pdriv ;
! 124: } QPRINT, *PQPRINT ;
! 125:
! 126: #define QP_CAPS_NORMAL 0
! 127: #define QP_CAPS_FILE 1 /* can print to file */
! 128:
! 129: /*==== stuff for pause dialogs =================================*/
! 130:
! 131: typedef struct { //pause data for dialog box
! 132: int cbStruct ; /* size of struct */
! 133: char *pszMessage ; /* pause message */
! 134: PSWP pswp ; /* dialog box position */
! 135: } PAUSEDATA, *PPAUSEDATA ;
! 136:
! 137: /*==== function declarations =================================================*/
! 138:
! 139: short ScalePS( HPS ) ;
! 140: int SetupPrinter( HWND, PQPRINT ) ;
! 141: HDC OpenPrinterDC( HAB, PQPRINT, LONG, char* ) ;
! 142: int SetPrinterMode( HWND, PQPRINT ) ;
! 143: MPARAM PrintCmdProc( HWND, ULONG, MPARAM, MPARAM ) ;
! 144: MRESULT EXPENTRY PrintDlgProc( HWND, ULONG, MPARAM, MPARAM ) ;
! 145: MRESULT EXPENTRY PauseMsgDlgProc( HWND, ULONG, MPARAM, MPARAM ) ;
! 146: MRESULT EXPENTRY QFontDlgProc( HWND ,ULONG, MPARAM, MPARAM ) ;
! 147: MRESULT EXPENTRY QPrintDlgProc (HWND, ULONG, MPARAM, MPARAM) ;
! 148: MRESULT EXPENTRY QPrintersDlgProc ( HWND, ULONG, MPARAM, MPARAM ) ;
! 149: MRESULT EXPENTRY DisplayClientWndProc(HWND, ULONG, MPARAM, MPARAM);
! 150: MRESULT EXPENTRY NewFrameWndProc(HWND, ULONG, MPARAM, MPARAM) ;
! 151: MRESULT EXPENTRY About(HWND, ULONG, MPARAM, MPARAM);
! 152: MRESULT EXPENTRY CancelPrintDlgProc ( HWND, ULONG, MPARAM, MPARAM ) ;
! 153:
! 154: /* own window functions... */
! 155: void WinSetDlgItemFloat( HWND, USHORT, float ) ;
! 156: void WinSetDlgItemFloatF( HWND, USHORT, int, float ) ;
! 157: void WinQueryDlgItemFloat( HWND, USHORT, float* ) ;
! 158:
! 159:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>