1: /* 2: Provides the calling sequences for all the basic PetscDraw routines. 3: */ 4: #include <petsc/private/drawimpl.h> 6: /*@ 7: PetscDrawPause - Waits n seconds or until user input, depending on input 8: to PetscDrawSetPause(). 10: Collective operation on PetscDraw object. 12: Input Parameter: 13: . draw - the drawing context 15: Level: beginner 17: .seealso: PetscDrawSetPause(), PetscDrawGetPause() 18: @*/ 19: PetscErrorCode PetscDrawPause(PetscDraw draw) 20: { 22: if (draw->ops->pause) { 23: (*draw->ops->pause)(draw); 24: } 25: return 0; 26: } 28: /*@ 29: PetscDrawSetPause - Sets the amount of time that program pauses after 30: a PetscDrawPause() is called. 32: Logically Collective on PetscDraw 34: Input Parameters: 35: + draw - the drawing object 36: - lpause - number of seconds to pause, -1 implies until user input, -2 pauses only on the PetscDrawDestroy() 38: Level: intermediate 40: Note: 41: By default the pause time is zero unless the -draw_pause option is given 42: during PetscDrawCreate(). 44: .seealso: PetscDrawGetPause(), PetscDrawPause() 45: @*/ 46: PetscErrorCode PetscDrawSetPause(PetscDraw draw,PetscReal lpause) 47: { 50: draw->pause = lpause; 51: return 0; 52: } 54: /*@ 55: PetscDrawGetPause - Gets the amount of time that program pauses after 56: a PetscDrawPause() is called. 58: Not collective 60: Input Parameters: 61: + draw - the drawing object 62: - lpause - number of seconds to pause, -1 implies until user input 64: Level: intermediate 66: Note: 67: By default the pause time is zero unless the -draw_pause option is given 69: .seealso: PetscDrawSetPause(), PetscDrawPause() 70: @*/ 71: PetscErrorCode PetscDrawGetPause(PetscDraw draw,PetscReal *lpause) 72: { 75: *lpause = draw->pause; 76: return 0; 77: }