Actual source code: dpause.c
petsc-3.13.6 2020-09-29
Report Typos and Errors

      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: {

     25:   if (draw->ops->pause) {
     26:     (*draw->ops->pause)(draw);
     27:   }
     28:   return(0);
     29: }

     31: /*@
     32:    PetscDrawSetPause - Sets the amount of time that program pauses after
     33:    a PetscDrawPause() is called.

     35:    Logically Collective on PetscDraw

     37:    Input Parameters:
     38: +  draw   - the drawing object
     39: -  lpause - number of seconds to pause, -1 implies until user input, -2 pauses only on the PetscDrawDestroy()

     41:    Level: intermediate

     43:    Note:
     44:    By default the pause time is zero unless the -draw_pause option is given
     45:    during PetscDrawCreate().

     47: .seealso: PetscDrawGetPause(), PetscDrawPause()
     48: @*/
     49: PetscErrorCode  PetscDrawSetPause(PetscDraw draw,PetscReal lpause)
     50: {
     54:   draw->pause = lpause;
     55:   return(0);
     56: }

     58: /*@
     59:    PetscDrawGetPause - Gets the amount of time that program pauses after
     60:    a PetscDrawPause() is called.

     62:    Not collective

     64:    Input Parameters:
     65: +  draw   - the drawing object
     66: -  lpause - number of seconds to pause, -1 implies until user input

     68:    Level: intermediate

     70:    Note:
     71:    By default the pause time is zero unless the -draw_pause option is given

     73: .seealso: PetscDrawSetPause(), PetscDrawPause()
     74: @*/
     75: PetscErrorCode  PetscDrawGetPause(PetscDraw draw,PetscReal *lpause)
     76: {
     80:   *lpause = draw->pause;
     81:   return(0);
     82: }