1*0513a670SBarry Smith /* $Id: viewer.h,v 1.38 1997/01/06 20:44:46 bsmith Exp bsmith $ */ 22eb8c8abSBarry Smith 32eb8c8abSBarry Smith #if !defined(__VIEWER_PACKAGE) 42eb8c8abSBarry Smith #define __VIEWER_PACKAGE 52eb8c8abSBarry Smith 62eb8c8abSBarry Smith #include "petsc.h" 72eb8c8abSBarry Smith 82eb8c8abSBarry Smith typedef struct _Viewer* Viewer; 92eb8c8abSBarry Smith #define VIEWER_COOKIE PETSC_COOKIE+1 10bcd2baecSBarry Smith typedef enum { MATLAB_VIEWER,ASCII_FILE_VIEWER, ASCII_FILES_VIEWER, 11bcd2baecSBarry Smith BINARY_FILE_VIEWER, STRING_VIEWER, DRAW_VIEWER} ViewerType; 122eb8c8abSBarry Smith 13dbb450caSBarry Smith extern int ViewerFileOpenASCII(MPI_Comm,char*,Viewer *); 144b0e389bSBarry Smith typedef enum { BINARY_RDONLY, BINARY_WRONLY, BINARY_CREATE} ViewerBinaryType; 1521b0d8fbSLois Curfman McInnes extern int ViewerFileOpenBinary(MPI_Comm,char*,ViewerBinaryType,Viewer *); 16d7e8b826SBarry Smith extern int ViewerMatlabOpen(MPI_Comm,char*,int,Viewer *); 17bcd2baecSBarry Smith extern int ViewerStringOpen(MPI_Comm,char *,int, Viewer *); 18bcd2baecSBarry Smith extern int ViewerDrawOpenX(MPI_Comm,char *,char *,int,int,int,int,Viewer*); 19a2ce50c7SBarry Smith extern int ViewerDrawOpenVRML(MPI_Comm,char *,char *,Viewer*); 204b0e389bSBarry Smith 21bcd2baecSBarry Smith extern int ViewerGetType(Viewer,ViewerType*); 229651b370SBarry Smith extern int ViewerDestroy(Viewer); 23ae39576cSLois Curfman McInnes 2490ace30eSBarry Smith extern int ViewerASCIIGetPointer(Viewer,FILE**); 2590ace30eSBarry Smith extern int ViewerBinaryGetDescriptor(Viewer,int*); 26496e697eSBarry Smith extern int ViewerBinaryGetInfoPointer(Viewer,FILE **); 2790ace30eSBarry Smith 28639f9d9dSBarry Smith #define VIEWER_FORMAT_ASCII_DEFAULT 0 29639f9d9dSBarry Smith #define VIEWER_FORMAT_ASCII_MATLAB 1 30639f9d9dSBarry Smith #define VIEWER_FORMAT_ASCII_IMPL 2 31639f9d9dSBarry Smith #define VIEWER_FORMAT_ASCII_INFO 3 32639f9d9dSBarry Smith #define VIEWER_FORMAT_ASCII_INFO_LONG 4 33639f9d9dSBarry Smith #define VIEWER_FORMAT_ASCII_COMMON 5 34639f9d9dSBarry Smith #define VIEWER_FORMAT_BINARY_DEFAULT 0 35639f9d9dSBarry Smith #define VIEWER_FORMAT_BINARY_NATIVE 1 365311e20fSBarry Smith #define VIEWER_FORMAT_DRAW_BASIC 0 375311e20fSBarry Smith #define VIEWER_FORMAT_DRAW_LG 1 38*0513a670SBarry Smith #define VIEWER_FORMAT_DRAW_CONTOUR 2 395311e20fSBarry Smith 4090ace30eSBarry Smith extern int ViewerSetFormat(Viewer,int,char *); 415311e20fSBarry Smith extern int ViewerPushFormat(Viewer,int,char *); 425311e20fSBarry Smith extern int ViewerPopFormat(Viewer); 4390ace30eSBarry Smith extern int ViewerGetFormat(Viewer,int*); 4490ace30eSBarry Smith 455fe861cdSBarry Smith extern int ViewerFlush(Viewer); 4677c4ece6SBarry Smith extern int ViewerStringSPrintf(Viewer,char *,...); 474b0e389bSBarry Smith 486d4a8577SBarry Smith extern Viewer VIEWER_STDOUT_SELF; 496d4a8577SBarry Smith extern Viewer VIEWER_STDERR_SELF; 5025482d47SBarry Smith extern Viewer VIEWER_STDOUT_WORLD; 51639f9d9dSBarry Smith extern Viewer VIEWER_DRAWX_WORLD_PRIVATE_0; 52639f9d9dSBarry Smith extern Viewer VIEWER_DRAWX_WORLD_PRIVATE_1; 53639f9d9dSBarry Smith extern Viewer VIEWER_DRAWX_WORLD_PRIVATE_2; 545311e20fSBarry Smith extern Viewer VIEWER_DRAWX_SELF_PRIVATE; 55c16cb8f2SBarry Smith extern Viewer VIEWER_MATLAB_WORLD_PRIVATE; 56c16cb8f2SBarry Smith extern Viewer VIEWER_MATLAB_SELF_PRIVATE; /* not yet used */ 575311e20fSBarry Smith 58639f9d9dSBarry Smith extern int ViewerInitializeDrawXWorld_Private_0(); 59639f9d9dSBarry Smith extern int ViewerInitializeDrawXWorld_Private_1(); 60639f9d9dSBarry Smith extern int ViewerInitializeDrawXWorld_Private_2(); 615311e20fSBarry Smith extern int ViewerInitializeDrawXSelf_Private(); 6258562591SBarry Smith extern int ViewerInitializeMatlabWorld_Private(); 6358562591SBarry Smith extern Viewer VIEWER_DRAWX_(MPI_Comm); 645311e20fSBarry Smith 65639f9d9dSBarry Smith #define VIEWER_DRAWX_WORLD_0 \ 66639f9d9dSBarry Smith (ViewerInitializeDrawXWorld_Private_0(),VIEWER_DRAWX_WORLD_PRIVATE_0) 67639f9d9dSBarry Smith #define VIEWER_DRAWX_WORLD_1 \ 68639f9d9dSBarry Smith (ViewerInitializeDrawXWorld_Private_1(),VIEWER_DRAWX_WORLD_PRIVATE_1) 69639f9d9dSBarry Smith #define VIEWER_DRAWX_WORLD_2 \ 70639f9d9dSBarry Smith (ViewerInitializeDrawXWorld_Private_2(),VIEWER_DRAWX_WORLD_PRIVATE_2) 71639f9d9dSBarry Smith 725311e20fSBarry Smith #define VIEWER_DRAWX_SELF \ 735311e20fSBarry Smith (ViewerInitializeDrawXSelf_Private(),VIEWER_DRAWX_SELF_PRIVATE) 74639f9d9dSBarry Smith #define VIEWER_DRAWX_WORLD VIEWER_DRAWX_WORLD_0 75c16cb8f2SBarry Smith #define VIEWER_MATLAB_WORLD \ 76c16cb8f2SBarry Smith (ViewerInitializeMatlabWorld_Private(),VIEWER_MATLAB_WORLD_PRIVATE) 77c16cb8f2SBarry Smith 782eb8c8abSBarry Smith #endif 79