about summary refs log tree commit diff stats
path: root/tests/unittests/pgp/stub_gpg.c
Commit message (Expand)AuthorAgeFilesLines
* Add context to autocomplete_with_func and use it for omemo trust commandPaul Fariello2020-01-311-1/+1
* Allow previous autocompletion with shift tabJames Booth2017-04-011-1/+1
* Show PGP error stringsJames Booth2015-12-151-1/+1
* PGP: Format fingerprintsJames Booth2015-08-301-0/+6
* Added PGP key autocompleterJames Booth2015-08-251-0/+7
* PGP: Show key IDs for assigned public keysJames Booth2015-08-251-1/+1
* Show public/private indicator when listing PGP keysJames Booth2015-08-251-3/+3
* Removed unused barejid argument from PGP decryptionJames Booth2015-08-241-1/+1
* Added JID to log when failing to load PGP fingerprintJames Booth2015-08-231-0/+5
* Tidied pgp memory allocationsJames Booth2015-08-111-0/+2
* Added /pgp setkey commandJames Booth2015-06-231-0/+9
* Encryption modes for sv_ev_incoming_messageJames Booth2015-06-211-1/+4
* Added window encyption mode for PGPJames Booth2015-06-201-0/+5
* Moved stub_gpg.cJames Booth2015-06-121-0/+32
Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <event.h>

void
eresized(int new)
{
	if(new&& getwindow(display, Refnone) < 0)
		sysfatal("can't reattach to window");
}

void
main(int argc, char* argv[])
{
	Mouse m;
	Point prevm;
	initdraw(0, 0, "Example: Mouse");
	eresized(0);
	einit(Emouse);

	/* Main loop */
	for(;;) {
		m = emouse();
		if(m.buttons & 4)
			break;
		if(m.buttons & 1) {
			line(screen,
			     prevm.x == -1 ? m.xy : prevm,
			     m.xy, Enddisc, Enddisc, 1, display->black, ZP);
			prevm = m.xy;
		} else {
			prevm = Pt(-1, -1);
		}
	}
}