Date: 2022-03-31T04:45:59+00:00

Actual source code: drawregall.c

      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: {
     30:   if (PetscDrawRegisterAllCalled) return 0;
     31:   PetscDrawRegisterAllCalled = PETSC_TRUE;

     33:   PetscDrawRegister(PETSC_DRAW_IMAGE,    PetscDrawCreate_Image);
     34:   PetscDrawRegister(PETSC_DRAW_TIKZ,     PetscDrawCreate_TikZ);
     35: #if defined(PETSC_HAVE_X)
     36:   PetscDrawRegister(PETSC_DRAW_X,        PetscDrawCreate_X);
     37: #elif defined(PETSC_USE_WINDOWS_GRAPHICS)
     38:   PetscDrawRegister(PETSC_DRAW_WIN32,    PetscDrawCreate_Win32);
     39: #endif
     40:   PetscDrawRegister(PETSC_DRAW_NULL,     PetscDrawCreate_Null);
     41:   return 0;
     42: }