1 2 /* 3 Provides the calling sequences for all the basic PetscDraw routines. 4 */ 5 #include <petsc/private/drawimpl.h> /*I "petscdraw.h" I*/ 6 7 PETSC_EXTERN PetscErrorCode PetscDrawCreate_Image(PetscDraw); 8 PETSC_EXTERN PetscErrorCode PetscDrawCreate_TikZ(PetscDraw); 9 #if defined(PETSC_HAVE_X) 10 PETSC_EXTERN PetscErrorCode PetscDrawCreate_X(PetscDraw); 11 #endif 12 PETSC_EXTERN PetscErrorCode PetscDrawCreate_Null(PetscDraw); 13 #if defined(PETSC_USE_WINDOWS_GRAPHICS) 14 PETSC_EXTERN PetscErrorCode PetscDrawCreate_Win32(PetscDraw); 15 #endif 16 17 PetscBool PetscDrawRegisterAllCalled = PETSC_FALSE; 18 19 /*@C 20 PetscDrawRegisterAll - Registers all of the graphics methods in the PetscDraw package. 21 22 Not Collective 23 24 Level: developer 25 26 .seealso: `PetscDrawRegisterDestroy()` 27 @*/ 28 PetscErrorCode PetscDrawRegisterAll(void) { 29 PetscFunctionBegin; 30 if (PetscDrawRegisterAllCalled) PetscFunctionReturn(0); 31 PetscDrawRegisterAllCalled = PETSC_TRUE; 32 33 PetscCall(PetscDrawRegister(PETSC_DRAW_IMAGE, PetscDrawCreate_Image)); 34 PetscCall(PetscDrawRegister(PETSC_DRAW_TIKZ, PetscDrawCreate_TikZ)); 35 #if defined(PETSC_HAVE_X) 36 PetscCall(PetscDrawRegister(PETSC_DRAW_X, PetscDrawCreate_X)); 37 #elif defined(PETSC_USE_WINDOWS_GRAPHICS) 38 PetscCall(PetscDrawRegister(PETSC_DRAW_WIN32, PetscDrawCreate_Win32)); 39 #endif 40 PetscCall(PetscDrawRegister(PETSC_DRAW_NULL, PetscDrawCreate_Null)); 41 PetscFunctionReturn(0); 42 } 43