home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 1
/
ARM_CLUB_CD.iso
/
contents
/
education
/
a
/
biology1
/
!Biology1
/
h
/
Input
< prev
next >
Wrap
Text File
|
1991-11-23
|
2KB
|
75 lines
/* Input.h */
#ifndef __wimp_h
#include "wimp.h"
#endif
#ifndef __input_h
#define __input_h
typedef struct {int maxlen; char *str;} string;
/* concat is intended to be one of the routines I supply,
finish would be an application routine.
It is passed it's handle (if applicable), and the string
which has been input, and the final input char which caused a
finish (eg maybe return, or escape etc)
*/
typedef BOOL (*concat_proc) (void *hand, string, int c);
typedef void (*finish_proc) (void *hand, string, int term_c);
void input_start (wimp_w wnd, string str,
concat_proc concat, void *concat_hand,
finish_proc finish, void *finish_hand
);
void input_key_pressed (wimp_w w, int c);
/* Wake up routines can be called before starting input to
pass concat routines extra info (eg what icons to use)
*/
void *concat_YNTF_wakeup (wimp_w wnd, wimp_i pos, wimp_i neg);
BOOL concat_YN (void *hand, string str, int c);
BOOL concat_TF (void *hand, string str, int c);
void *concat_string_wakeup (wimp_w wnd, wimp_i icon, string str, int res_type);
BOOL concat_string (void *hand, string str, int c);
void *concat_ok_wakeup (wimp_w wnd, wimp_i pos);
BOOL concat_ok (void *hand, string str, int c);
void *concat_choice_wakeup (wimp_w wnd, wimp_i i[], int no);
BOOL concat_choice (void *hand, string str, int c);
/* Now for a mechanism that enables a click on an icon to produce a 'keypress' */
/* Associate the keypress with the icon in question */
void input_icon (wimp_w w, wimp_i i, wimp_i text_i, int keypress);
/* Call this routine when there is a click on an icon which may have
a keypress associated with it. (It doesn't matter if it doesn't)
Eg maybe call this every time an icon is clicked in a particular window
*/
void input_click (wimp_w w, wimp_i i);
/* Housekeeping, If you've told me about windows & icons, I must be told
when they die. ( I don't mind being told about deaths of objects I
don't know about, so no need to check)
*/
void input_delete_icon (wimp_w w, wimp_i i);
void input_delete_wind (wimp_w w);
void input_delete_icons (wimp_w w);
#endif