Commit 9aab70f6 authored by Neil Turton's avatar Neil Turton
Browse files

New Wimp imported

parent 72ea345b
...@@ -12,3 +12,8 @@ ...@@ -12,3 +12,8 @@
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and
| limitations under the License. | limitations under the License.
| |
| > !Run file for !MenuTree
WimpSlot -min 640k -max 640k
Run <Obey$Dir>.!RunImage
No preview for this file type
No preview for this file type
...@@ -12,3 +12,4 @@ ...@@ -12,3 +12,4 @@
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and
| limitations under the License. | limitations under the License.
| |
Set Monitor$Dir <Obey$Dir>
\ No newline at end of file
...@@ -12,3 +12,6 @@ ...@@ -12,3 +12,6 @@
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and
| limitations under the License. | limitations under the License.
| |
Set Monitor$Dir <Obey$Dir>
Wimpslot -min 64K -max 64K
Run <Obey$Dir>.!RunImage
No preview for this file type
No preview for this file type
...@@ -12,3 +12,99 @@ ...@@ -12,3 +12,99 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* Monitor messages comming in */
#include <string.h>
#include "wimp.h"
#include "wimpt.h"
#include "event.h"
#include "win.h"
#include "template.h"
#include "dbox.h"
#include "alarm.h"
#include "res.h"
#include "akbd.h"
#include "kernel.h"
#include "swis.h"
int start_time =0;
int messages =0;
int my_task;
BOOL unknown_event(wimp_eventstr *e, void *handle)
{
dbox d = (dbox) handle;
int av=alarm_timedifference(start_time,alarm_timenow());
static int ov=0;
if (ov==0) ov=av-101;
if ( (e->e==wimp_ENULL) && akbd_pollsh() ) /* Shift pressed on a null event */
{
_kernel_swi_regs r;
r.r[0]=my_task;
wimpt_noerror( (os_error *) _kernel_swi(XOS_Bit | 0x816c1 ,&r,&r); /* Get character at pointer */
}
if (e->e==wimp_ESEND)
{
if (e->data.msg.action == 0x816c0)
{
werr(0,"Character found %c (%i)",e->data.msg.data.words[0],e->data.msg.data.words[0]);
wimp_processkey(e->data.msg.data.words[0]);
}
char strbuf [100];
sprintf(strbuf,"%x",e->data.msg.hdr.action);
dbox_setfield(d,3,strbuf);
dbox_setnumeric(d,5,++messages);
}
if (av-ov >= 100)
{
ov=av;
if (av >= 6000) av = messages / (av / 6000);
else av=messages;
dbox_setnumeric(d,1,av);
}
return TRUE;
}
int main()
{
dbox d;
/* Start a wimp task */
wimpt_wimpversion(275);
my_task=wimpt_init("Monitor");
res_init("Monitor");
template_init();
dbox_init();
alarm_init();
start_time=alarm_timenow();
d=dbox_new("Monitor");
dbox_showstatic(d);
win_add_unknown_event_processor(unknown_event,d) ;
event_setmask(0);
while (1)
{
event_process();
if (wimpt_last_event()->e==wimp_ECLOSE) exit(0);
}
return 0;
}
...@@ -12,3 +12,8 @@ ...@@ -12,3 +12,8 @@
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and
| limitations under the License. | limitations under the License.
| |
| > !Run file for !MenuTree
WimpSlot -min 640k -max 640k
Run <Obey$Dir>.!RunImage
No preview for this file type
No preview for this file type
...@@ -12,3 +12,8 @@ ...@@ -12,3 +12,8 @@
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and
| limitations under the License. | limitations under the License.
| |
| > !Run file for !MenuTree
WimpSlot -min 640k -max 640k
Run <Obey$Dir>.!RunImage
No preview for this file type
No preview for this file type
...@@ -12,3 +12,9 @@ ...@@ -12,3 +12,9 @@
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and
| limitations under the License. | limitations under the License.
| |
| > !Run file for !MenuTree
*IconSprites <Obey$Dir>.sprites
WimpSlot -min 640k -max 640k
Run <Obey$Dir>.!RunImage
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -12,3 +12,7 @@ ...@@ -12,3 +12,7 @@
| See the License for the specific language governing permissions and | See the License for the specific language governing permissions and
| limitations under the License. | limitations under the License.
| |
| boot file for wexample application
Iconsprites <Obey$Dir>.!Sprites
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment