From 752d3597ef02a95efd693373132bf1e246f0edb0 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 31 Jan 2017 09:44:29 +0100 Subject: core: Add new context flag "redraw". * src/context.h (struct gpgme_context): New field 'redraw_suggested'. * src/op-support.c (_gpgme_op_reset): Clear REDRAW_SUGGESTED. * src/progress.c (_gpgme_progress_status_handler): Set REDRAW_SUGGESTED. * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "redraw". * tests/run-sign.c (main): Use it. Signed-off-by: Werner Koch --- doc/gpgme.texi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 511384f9..99627c4b 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2888,6 +2888,29 @@ by this function. The properties are identified by the following values for @var{name}: @table @code +@item "redraw" +This flag is normally not changed by the caller because GPGME sets and +clears it automatically: The flag is cleared before an operation and +set if an operation noticed that the engine has launched a Pinentry. +A Curses based application may use this information to redraw the +screen; for example: + +@example + err = gpgme_op_keylist_start (ctx, "foo@@example.org", 0); + while (!err) + @{ + err = gpgme_op_keylist_next (ctx, &key); + if (err) + break; + show_key (key); + gpgme_key_release (key); + @} + if ((s = gpgme_get_ctx_flag (ctx, "redraw")) && *s) + redraw_screen (); + gpgme_release (ctx); +@end example + + @item "full-status" Using a @var{value} of "1" the status callback set by gpgme_set_status_cb returns all status lines with the exception of -- cgit v1.2.3