xref: /petsc/src/sys/classes/draw/interface/drawregall.c (revision 9566063d113dddea24716c546802770db7481bc0)
15c6c1daeSBarry Smith 
25c6c1daeSBarry Smith /*
35c6c1daeSBarry Smith        Provides the calling sequences for all the basic PetscDraw routines.
45c6c1daeSBarry Smith */
5af0996ceSBarry Smith #include <petsc/private/drawimpl.h>  /*I "petscdraw.h" I*/
65c6c1daeSBarry Smith 
72b8d69caSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscDrawCreate_Image(PetscDraw);
88cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_TikZ(PetscDraw);
95c6c1daeSBarry Smith #if defined(PETSC_HAVE_X)
108cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_X(PetscDraw);
115c6c1daeSBarry Smith #endif
128cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_Null(PetscDraw);
135c6c1daeSBarry Smith #if defined(PETSC_USE_WINDOWS_GRAPHICS)
148cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_Win32(PetscDraw);
155c6c1daeSBarry Smith #endif
165c6c1daeSBarry Smith 
17e118a51fSLisandro Dalcin PetscBool PetscDrawRegisterAllCalled = PETSC_FALSE;
180f51fdf8SToby Isaac 
195c6c1daeSBarry Smith /*@C
205c6c1daeSBarry Smith   PetscDrawRegisterAll - Registers all of the graphics methods in the PetscDraw package.
215c6c1daeSBarry Smith 
225c6c1daeSBarry Smith   Not Collective
235c6c1daeSBarry Smith 
245c6c1daeSBarry Smith   Level: developer
255c6c1daeSBarry Smith 
265c6c1daeSBarry Smith .seealso:  PetscDrawRegisterDestroy()
275c6c1daeSBarry Smith @*/
28607a6623SBarry Smith PetscErrorCode  PetscDrawRegisterAll(void)
295c6c1daeSBarry Smith {
305c6c1daeSBarry Smith   PetscFunctionBegin;
310f51fdf8SToby Isaac   if (PetscDrawRegisterAllCalled) PetscFunctionReturn(0);
320f51fdf8SToby Isaac   PetscDrawRegisterAllCalled = PETSC_TRUE;
330f51fdf8SToby Isaac 
34*9566063dSJacob Faibussowitsch   PetscCall(PetscDrawRegister(PETSC_DRAW_IMAGE,    PetscDrawCreate_Image));
35*9566063dSJacob Faibussowitsch   PetscCall(PetscDrawRegister(PETSC_DRAW_TIKZ,     PetscDrawCreate_TikZ));
365c6c1daeSBarry Smith #if defined(PETSC_HAVE_X)
37*9566063dSJacob Faibussowitsch   PetscCall(PetscDrawRegister(PETSC_DRAW_X,        PetscDrawCreate_X));
385c6c1daeSBarry Smith #elif defined(PETSC_USE_WINDOWS_GRAPHICS)
39*9566063dSJacob Faibussowitsch   PetscCall(PetscDrawRegister(PETSC_DRAW_WIN32,    PetscDrawCreate_Win32));
405c6c1daeSBarry Smith #endif
41*9566063dSJacob Faibussowitsch   PetscCall(PetscDrawRegister(PETSC_DRAW_NULL,     PetscDrawCreate_Null));
425c6c1daeSBarry Smith   PetscFunctionReturn(0);
435c6c1daeSBarry Smith }
44