Beispiel #1
0
static void rfb_exittask(RFBDISPLAY *mod)
{
	TAPTR TExecBase = TGetExecBase(mod);
	struct TNode *imsg, *node, *next;

	/* free pooled input messages: */
	while ((imsg = TRemHead(&mod->rfb_IMsgPool)))
		TFree(imsg);

	/* close all fonts */
	node = mod->rfb_FontManager.openfonts.tlh_Head;
	for (; (next = node->tln_Succ); node = next)
		rfb_hostclosefont(mod, (TAPTR) node);

	if (mod->rfb_BufferOwner)
		TFree(mod->rfb_BufPtr);
	
	TDestroy(mod->rfb_RndIMsgPort);
	TFree(mod->rfb_RndRequest);
	TCloseModule(mod->rfb_RndDevice);
	TDestroy((struct THandle *) mod->rfb_RndRPort);
	TDestroy((struct THandle *) mod->rfb_InstanceLock);
	
	if (mod->rfb_DirtyRegion)
		region_destroy(&mod->rfb_RectPool, mod->rfb_DirtyRegion);
	
	region_destroypool(&mod->rfb_RectPool);
}
Beispiel #2
0
static void rfb_exittask(struct rfb_Display *mod)
{
	TAPTR TExecBase = TGetExecBase(mod);
	struct TNode *imsg, *node, *next;

#if defined(ENABLE_LINUXFB)
	rfb_linux_exit(mod);
#endif

	TFree(mod->rfb_PtrBackBuffer.data);
	if (mod->rfb_Flags & RFBFL_PTR_ALLOCATED)
		TFree(mod->rfb_PtrImage.tpb_Data);

	/* free pooled input messages: */
	while ((imsg = TRemHead(&mod->rfb_IMsgPool)))
		TFree(imsg);

	/* close all fonts */
	node = mod->rfb_FontManager.openfonts.tlh_Head.tln_Succ;
	for (; (next = node->tln_Succ); node = next)
		rfb_hostclosefont(mod, (TAPTR) node);

	if (mod->rfb_Flags & RFBFL_BUFFER_OWNER)
		TFree(mod->rfb_PixBuf.tpb_Data);

	TDestroy(mod->rfb_RndIMsgPort);
	TFree(mod->rfb_RndRequest);
	TCloseModule(mod->rfb_RndDevice);
	TDestroy((struct THandle *) mod->rfb_RndRPort);
	TDestroy((struct THandle *) mod->rfb_InstanceLock);

	region_free(&mod->rfb_RectPool, &mod->rfb_DirtyRegion);

	region_destroypool(&mod->rfb_RectPool);
}