Date: 2016-07-24T16:46:31+00:00

Actual source code: dpause.c
petsc-3.7.3 2016-07-24
Report Typos and Errors

      1: /*
      2:        Provides the calling sequences for all the basic PetscDraw routines.
      3: */
      4: #include <petsc/private/drawimpl.h>  /*I "petscdraw.h" I*/

      8: /*@
      9:    PetscDrawPause - Waits n seconds or until user input, depending on input
     10:                to PetscDrawSetPause().

     12:    Collective operation on PetscDraw object.

     14:    Input Parameter:
     15: .  draw - the drawing context

     17:    Level: beginner

     19:    Concepts: waiting^for user input
     20:    Concepts: drawing^waiting
     21:    Concepts: graphics^waiting

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

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

     39: /*@
     40:    PetscDrawSetPause - Sets the amount of time that program pauses after
     41:    a PetscDrawPause() is called.

     43:    Logically Collective on PetscDraw

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

     49:    Level: intermediate

     51:    Note:
     52:    By default the pause time is zero unless the -draw_pause option is given
     53:    during PetscDrawCreate().

     55:    Concepts: drawing^waiting

     57: .seealso: PetscDrawGetPause(), PetscDrawPause()
     58: @*/
     59: PetscErrorCode  PetscDrawSetPause(PetscDraw draw,PetscReal lpause)
     60: {
     64:   draw->pause = lpause;
     65:   return(0);
     66: }

     70: /*@
     71:    PetscDrawGetPause - Gets the amount of time that program pauses after
     72:    a PetscDrawPause() is called.

     74:    Not collective

     76:    Input Parameters:
     77: +  draw   - the drawing object
     78: -  lpause - number of seconds to pause, -1 implies until user input

     80:    Level: intermediate

     82:    Note:
     83:    By default the pause time is zero unless the -draw_pause option is given

     85:    Concepts: waiting^for user input
     86:    Concepts: drawing^waiting
     87:    Concepts: graphics^waiting

     89: .seealso: PetscDrawSetPause(), PetscDrawPause()
     90: @*/
     91: PetscErrorCode  PetscDrawGetPause(PetscDraw draw,PetscReal *lpause)
     92: {
     96:   *lpause = draw->pause;
     97:   return(0);
     98: }