Actual source code: dpause.c
petsc-3.10.5 2019-03-28
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:    Concepts: waiting^for user input
     18:    Concepts: drawing^waiting
     19:    Concepts: graphics^waiting

     21: .seealso: PetscDrawSetPause(), PetscDrawGetPause()
     22: @*/
     23: PetscErrorCode  PetscDrawPause(PetscDraw draw)
     24: {

     29:   if (draw->ops->pause) {
     30:     (*draw->ops->pause)(draw);
     31:   }
     32:   return(0);
     33: }

     35: /*@
     36:    PetscDrawSetPause - Sets the amount of time that program pauses after
     37:    a PetscDrawPause() is called.

     39:    Logically Collective on PetscDraw

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

     45:    Level: intermediate

     47:    Note:
     48:    By default the pause time is zero unless the -draw_pause option is given
     49:    during PetscDrawCreate().

     51:    Concepts: drawing^waiting

     53: .seealso: PetscDrawGetPause(), PetscDrawPause()
     54: @*/
     55: PetscErrorCode  PetscDrawSetPause(PetscDraw draw,PetscReal lpause)
     56: {
     60:   draw->pause = lpause;
     61:   return(0);
     62: }

     64: /*@
     65:    PetscDrawGetPause - Gets the amount of time that program pauses after
     66:    a PetscDrawPause() is called.

     68:    Not collective

     70:    Input Parameters:
     71: +  draw   - the drawing object
     72: -  lpause - number of seconds to pause, -1 implies until user input

     74:    Level: intermediate

     76:    Note:
     77:    By default the pause time is zero unless the -draw_pause option is given

     79:    Concepts: waiting^for user input
     80:    Concepts: drawing^waiting
     81:    Concepts: graphics^waiting

     83: .seealso: PetscDrawSetPause(), PetscDrawPause()
     84: @*/
     85: PetscErrorCode  PetscDrawGetPause(PetscDraw draw,PetscReal *lpause)
     86: {
     90:   *lpause = draw->pause;
     91:   return(0);
     92: }