2: /*
3: Provides the calling sequences for all the basic PetscDraw routines.
4: */
5: #include <petsc/private/drawimpl.h> /*I "petscdraw.h" I*/
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: #if defined(PETSC_HAVE_GLUT)
13: PETSC_EXTERN PetscErrorCode PetscDrawCreate_GLUT(PetscDraw);
14: #endif
15: #if defined(PETSC_HAVE_OPENGLES)
16: PETSC_EXTERN PetscErrorCode PetscDrawCreate_OpenGLES(PetscDraw);
17: #endif
18: PETSC_EXTERN PetscErrorCode PetscDrawCreate_Null(PetscDraw);
19: #if defined(PETSC_USE_WINDOWS_GRAPHICS)
20: PETSC_EXTERN PetscErrorCode PetscDrawCreate_Win32(PetscDraw);
21: #endif
23: PetscBool PetscDrawRegisterAllCalled = PETSC_FALSE;
27: /*@C
28: PetscDrawRegisterAll - Registers all of the graphics methods in the PetscDraw package.
30: Not Collective
32: Level: developer
34: .seealso: PetscDrawRegisterDestroy()
35: @*/
36: PetscErrorCode PetscDrawRegisterAll(void)
37: {
41: if (PetscDrawRegisterAllCalled) return(0);
42: PetscDrawRegisterAllCalled = PETSC_TRUE;
44: PetscDrawRegister(PETSC_DRAW_IMAGE, PetscDrawCreate_Image);
45: PetscDrawRegister(PETSC_DRAW_TIKZ, PetscDrawCreate_TikZ);
46: #if defined(PETSC_HAVE_OPENGLES)
47: PetscDrawRegister(PETSC_DRAW_OPENGLES, PetscDrawCreate_OpenGLES);
48: #endif
49: #if defined(PETSC_HAVE_GLUT)
50: PetscDrawRegister(PETSC_DRAW_GLUT, PetscDrawCreate_GLUT);
51: #endif
52: #if defined(PETSC_HAVE_X)
53: PetscDrawRegister(PETSC_DRAW_X, PetscDrawCreate_X);
54: #elif defined(PETSC_USE_WINDOWS_GRAPHICS)
55: PetscDrawRegister(PETSC_DRAW_WIN32, PetscDrawCreate_Win32);
56: #endif
57: PetscDrawRegister(PETSC_DRAW_NULL, PetscDrawCreate_Null);
58: return(0);
59: }