home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
INCLUDE
/
MSYS.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-10
|
6KB
|
171 lines
/*
msys.h
% Header for menuing systems.
C-scape 3.2
Copyright (c) 1988, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
8/30/88 jdc Created
10/17/88 jmd Added _arg, preened
11/30/88 jmd Fixed spelling of vertical
12/20/88 jmd removed mouse handler
2/02/89 jdc fixed frame_Unlock bug
7/26/89 jmd made frame_Lock a function
removed msys_Lock (it should be made a function)
9/10/89 jmd re-wrote msys_dir
11/27/89 ted removed prototypes for slug & framer field funcs; made'em static.
12/09/89 ted Added MSYS_IN conditional.
12/11/89 ted Moved framer & slug stuff around
12/18/89 ted Added msys_ macros accessing bob_Ubits.
1/09/90 gam Removed Ted's new slug_Go macro.
1/24/90 ted Added msys_SetPixShadow stuff.
2/26/90 ted Made slug_Repaint a function again.
3/28/90 jmd ansi-fied
9/09/90 jmd added msys_SetHiColors
*/
#ifndef MSYS_IN
#define MSYS_IN
#include "ufuncobj.h"
/* -------------------------------------------------------------------------- */
/* NMENU definitions */
#define MENU_VERTICAL 1
#define MENU_HORIZONTAL 2
#define MSYS_LOCK 1
#define MSYS_UNLOCK 2
#define MSYS_ISLOCKED 3
#define MSYS_SETBOB 4
#define MSYS_GETBOB 5
/* messages for msys_doall */
#define MSYSALL_SETFFUNCS 1
#define MSYSALL_SETMFUNC 2
#define MSYSALL_SETSPCFUNC 3
#define MSYSALL_SETPARMOVE 4
#define MSYSALL_SETSHADOW 5
#define MSYSALL_SETHICOLOR 6
#define msys_UnLock(sed, code) msys_do(sed, code, MSYS_UNLOCK, NULL)
#define msys_IsLocked(sed, code) msys_do(sed, code, MSYS_ISLOCKED, NULL)
#define msys_SetBob(sed, code, bob) msys_do(sed, code, MSYS_SETBOB, (VOID *)bob)
#define msys_GetBob(s, c, bobp) msys_do(sed, code, MSYS_GETBOB, (VOID *)bobp)
#define msys_SetFfunc(sed, ffp) msys_doall(sed, MSYSALL_SETFFUNC, (VOID *)(ffp))
/* structure for set hicol msg */
struct msys_hicolor {
byte hisel;
byte hireg;
};
/* MSYS.C */
extern void msys_SetSpecial(sed_type sed, spc_fptr spcfunc);
extern void msys_SetMouse(sed_type sed, mouhandler_fptr mfunc);
extern void msys_SetParentMove(sed_type sed, boolean move);
extern void msys_SetPixShadow(sed_type sed, opcoord xshad, opcoord yshad);
extern void msys_SetHiColors(sed_type sed, byte hreg, byte hsel);
extern int msys_bobgo(sed_type sed, unsigned scancode);
extern void msys_doall(sed_type sed, int msg, VOID *data);
extern int msys_dir(sed_type sed);
/* MSYSDO.C */
extern boolean msys_Lock(sed_type sed, int *code, byte attr);
extern boolean msys_do(sed_type sed, int *code, int msg, VOID *data);
/* MSYSPARS.C */
extern int msys_ParseChoice(char *in, char *out, int slen);
/* -------------------------------------------------------------------------- */
/* Obsolete stuff that's in the 3.1 manual */
#define frame_Repaint(sed) sed_Repaint(sed)
#define frame_SetPosition(sed, row, col) sed_SetPosition(sed, row, col)
#define frame_Close(sed) sed_Close(sed)
#define slug_Close(sed) sed_Close(sed)
/* -------------------------------------------------------------------------- */
/* Framer stuff */
struct frame_def {
char *choice;
ufunc_fptr frame_func;
int value;
};
typedef sed_type frame_type;
#define FRAME_END NULL, FNULL, 0
#define msys_SetFramer(win, f) bob_SetUbit0(win, f)
#define msys_IsFramer(win) bob_GetUbit0(win)
#define msys_SetFrameRtn(win, fr) bob_SetUbit1(win, fr)
#define msys_IsFrameRtn(win) bob_GetUbit1(win)
/* fnframer.c */
OEXTERN field_funcs_struct framer_funcs;
#define frame_Open(frame_list, bord, bkg, sel, bdc) \
frame_create(frame_list, bord, bkg, sel, bdc, &framer_funcs, sedmou_Framer)
#define frame_UnLock(sed, family, member) \
frame_do(sed, MSYS_UNLOCK, family, member, NULL)
#define frame_IsLocked(sed, family, member) \
frame_do(sed, MSYS_ISLOCKED, family, member, NULL)
#define frame_SetBob(sed, family, member, bob) \
frame_do(sed, MSYS_SETBOB, family, member, (VOID *)bob)
/* FRAMER.C */
extern sed_type frame_create(struct frame_def frame_list[], bd_fptr bord, byte bkg, byte sel, byte bdr, field_funcs_ptr ffuncs, mouhandler_fptr fmfunc);
extern boolean frame_Lock(sed_type sed, int family, int member, byte attr);
extern boolean frame_do(sed_type sed, int msg, int family, int member, VOID *indata);
extern int frame_Go(sed_type sed, int chr, VOID *data);
/* FNFRAMER.C */
extern void framerbar_help(sed_type sed);
/* -------------------------------------------------------------------------- */
/* Slug stuff */
struct slug_list {
char *choice;
char *message;
struct slug_list *child;
ufunc_fptr slug_func;
int value;
};
typedef sed_type slug_type;
#define SLUG_VERTICAL MENU_VERTICAL
#define SLUG_HORIZONTAL MENU_HORIZONTAL
/* fnslug.c */
OEXTERN field_funcs_struct slug_funcs;
/* fnmsys.c */
OEXTERN field_funcs_struct msys_funcs;
#define slug_Open(slist, dir, bord, bkg, sel, bdc) \
slug_create(slist, dir, bord, bkg, sel, bdc, &slug_funcs, sedmou_GreedyTrack)
/* SLUG.C */
extern sed_type slug_create(struct slug_list slug_def[], int dir, bd_fptr bord, byte bkg, byte sel, byte bdr, field_funcs_ptr ffuncs, mouhandler_fptr mfunc);
extern int slug_Go(sed_type sed, int startfld, int row, int col, VOID *data);
extern void slug_Repaint(sed_type sed, int row, int col);
/* FNSLUG.C */
extern void slug_dokey(sed_type sed, unsigned scancode);
/* -------------------------------------------------------------------------- */
#endif