
/* > C.Wimp-Funct                                                            */

/*****************************************************************************
*                                                                            *
* Hulp routines voor de window omgeving. Deze bestaan uit:                   *
*                                                                            * 
*   - Memory management routines (aanvragen geheugen / vrijgeven / debug)    *
*   - String routines (dynamisch string copy/update)                         *
*   - Wimp routines (High level window redraw enz.)                          *
*   - Help systeem (Help systeem dat in elk programma verwerkt kan worden)   *
*   - Printer driver routines (aansturen RiscOs printer driver)              *
*                                                                            *
* (C) Bernard Rutgrink 1991                                                  *
*                                                                            *
*****************************************************************************/

#ifndef __system_io
#define __system_io
#endif
#define FILEHANDLE int

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <setjmp.h>
#include <signal.h>
#include <limits.h>
#include <time.h>

#include "alarm.h"
#include "swis.h"
#include "wimp.h"
#include "wimpt.h"
#include "werr.h"
#include "dbox.h"
#include "dboxQuery.h"
#include "visdelay.h"
#include "os.h"
#include "bbc.h"
#include "heap.h"
#include "sprite.h"
#include "font.h"
#include "colourtran.h"
#include "res.h"
#include "template.h"
#include "txtedit.h"

#include "Wimp-Funct.h"


int mode_var(int varnum)
{
   int mode;
   int value;
   int dummy;

   wimpt_checkmode();
   mode = wimpt_mode();
   os_swi3r(OS_ReadModeVariable,mode,varnum,dummy,&dummy,&dummy,&value);

   return ( value );
}

int mode_x_res(void)
{
   return ((mode_var(11) + 1) << mode_var(4));
}

int mode_y_res(void)
{
   return ((mode_var(12) + 1) << mode_var(5));
}


