home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
programming
/
dreamscape
/
source
/
Dreamscape
/
Headers
/
low-level
/
h
/
wimpevent
< prev
next >
Wrap
Text File
|
1996-08-30
|
2KB
|
61 lines
/* low-level.h.wimpevent
*
* Dreamscape - C++ class library for RISC OS
* Copyright (c) 1996 Mark Seaborn <mseaborn@argonet.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* See the Dreamscape documentation for more information.
*/
#ifndef dreamscape_wimpevent_H
#define dreamscape_wimpevent_H
#include "bool.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef bool (dscape_wimpevent_handler)(const union wimp_block *event,
const struct toolbox_block *ids, void *handle);
#define dscape_wimpevent_any_window ((struct wimp_w_ *) 0)
void dscape_wimpevent_dispatch_event(const union wimp_block *event,
const struct toolbox_block *ids, int id);
void dscape_wimpevent_register_handler(int id, struct wimp_w_ *window,
dscape_wimpevent_handler *function, void *handle);
void dscape_wimpevent_deregister_handler(int id, struct wimp_w_ *window,
dscape_wimpevent_handler *function, void *handle);
#ifdef __cplusplus
}
typedef struct wimp_w_ *wimp_w;
typedef int wimp_event_no;
union wimp_block;
struct toolbox_block;
class WimpEventHandler {
public:
typedef dscape_wimpevent_handler Handler;
enum { any_window = 0 };
static void dispatch_event(const wimp_block *event,
const toolbox_block *ids, wimp_event_no id)
{ dscape_wimpevent_dispatch_event(event, ids, id); }
static void register_handler(wimp_event_no id, wimp_w window,
Handler *function, void *handle)
{ dscape_wimpevent_register_handler(id, window, function, handle); }
static void deregister_handler(wimp_event_no id, wimp_w window,
Handler *function, void *handle)
{ dscape_wimpevent_deregister_handler(id, window, function, handle); }
};
#endif
#endif