Actual source code: drawregall.c
petsc-3.13.6 2020-09-29
2: /*
3: Provides the calling sequences for all the basic PetscDraw routines.
4: */
5: #include <petsc/private/drawimpl.h>
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
17: PetscBool PetscDrawRegisterAllCalled = PETSC_FALSE;
19: /*@C
20: PetscDrawRegisterAll - Registers all of the graphics methods in the PetscDraw package.
22: Not Collective
24: Level: developer
26: .seealso: PetscDrawRegisterDestroy()
27: @*/
28: PetscErrorCode PetscDrawRegisterAll(void)
29: {
33: if (PetscDrawRegisterAllCalled) return(0);
34: PetscDrawRegisterAllCalled = PETSC_TRUE;
36: PetscDrawRegister(PETSC_DRAW_IMAGE, PetscDrawCreate_Image);
37: PetscDrawRegister(PETSC_DRAW_TIKZ, PetscDrawCreate_TikZ);
38: #if defined(PETSC_HAVE_X)
39: PetscDrawRegister(PETSC_DRAW_X, PetscDrawCreate_X);
40: #elif defined(PETSC_USE_WINDOWS_GRAPHICS)
41: PetscDrawRegister(PETSC_DRAW_WIN32, PetscDrawCreate_Win32);
42: #endif
43: PetscDrawRegister(PETSC_DRAW_NULL, PetscDrawCreate_Null);
44: return(0);
45: }