home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Xplore
/
Xplore.iso
/
gl
/
pure_c
/
gl.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-17
|
14KB
|
422 lines
/* ------------------------------------------------------------------- *
* Module Version : 2.00 *
* Module Date : 10-03-94 *
* Last Change : 10-03-94 *
* Author : Andrea Pietsch *
* Programming Language : Pure-C *
* Copyright : (c) 1994, Andrea Pietsch, 56727 Mayen *
* ------------------------------------------------------------------- */
#ifndef __gl2__
#define __gl2__
/* ------------------------------------------------------------------- */
#ifndef __PORTAB__
#include <portab.h>
#endif
#ifndef __AES__
#include <aes.h>
#endif
#ifndef __VDI__
#include <vdi.h>
#endif
/* ------------------------------------------------------------------- */
#define SPECIAL_MOVE 17
#define SPECIAL_BUTTON 18
#define SPECIAL_TEXT 19
#define SPECIAL_FRAME 20
#define WHITEBAK 64
#define DRAW3D 128
/* ------------------------------------------------------------------- */
#define ButtonLeft 0
#define ButtonCenter 1
#define ButtonRight 2
#define DIAL_CONTINUE 0
#define DIAL_CLOSE 1
#define DIAL_REDRAW 2
#define DIAL_ABORT 3
#define DIAL_KEYCONT 4
#define DIAL_START 0
#define DIAL_NO_HANDLE 1
#define DIAL_END 2
#define DIAL_ENDPOS_X 3
#define DIAL_ENDPOS_Y 4
#define DIAL_QUIT 5
#define DIAL_KEY 6
#define DIAL_MENU 7
#define DIAL_TOP 8
#define DIAL_UNTOP 9
#define DIAL_INVISIBLE 10
#define DIAL_VISIBLE 11
#define WINDOW_CONTINUE 0
#define WINDOW_CLOSE 1
#define WINDOW_REDRAW 2
#define WINDOW_KEYUSED 3
#define WINDOW_KEYCONT 4
#define wLclick1 1
#define wLclick2 2
#define wRclick1 3
#define wRclick2 4
#define wKey 5
#define wMenu 6
#define wSized 7
#define wClose 8
#define wQuit 9
#define wUntop 10
#define wTop 11
#define wInvisible 12
#define wVisible 13
/* ------------------------------------------------------------------- */
#define FLIP_STATE 0
#define DEL_STATE 1
#define SET_STATE 2
#define UPD_STATE 3
#define CALL_AFTER 0
#define CALL_BEFORE 1
/* ------------------------------------------------------------------- */
#define SCROLL_LEFT 0
#define SCROLL_RIGHT 1
#define SCROLL_UP 2
#define SCROLL_DOWN 3
#define SET_X 0
#define SET_Y 1
#define SET_W 2
#define SET_H 3
/* ------------------------------------------------------------------- */
#define MSG_TERM 1
#define MSG_OPEN 2
#define MSG_CLOSE 3
#define MSG_SUSPEND 4
#define MSG_CONTINUE 5
#define MSG_NEW 6
#define MSG_QUIT 7
/* ------------------------------------------------------------------- */
typedef struct
{
INT x;
INT y;
INT w;
INT h;
} RECT;
/* ------------------------------------------------------------------- */
typedef struct
{
LONG id;
LONG value;
} COOKIE;
/* ------------------------------------------------------------------- */
typedef struct
{
INT handle;
LONG id;
LONG pos_x;
LONG pos_y;
INT key;
INT state;
INT mTitle;
INT mItem;
INT mx, my;
RECT work_area;
RECT clip;
VOID *user;
} WINDOW_INFO;
/* ------------------------------------------------------------------- */
typedef struct
{
LONG id;
VOID *user;
OBJECT *tree;
INT handle;
} DIAL_INFO;
/* ------------------------------------------------------------------- */
typedef struct
{
INT vdi_handle;
INT charw;
INT charh;
INT boxw;
INT boxh;
INT appl_id;
INT xmax;
INT ymax;
RECT desktop;
INT gem_version;
UINT tos_version;
INT bitplanes;
INT max_colors;
INT act_colors;
BOOL color_avail;
INT acc_entry;
UINT rsc_length;
} PARAMETER;
/* ------------------------------------------------------------------- */
typedef struct /* Bei Benutzung _nicht_ aendern! */
{
BOOL init;
INT x;
INT y;
INT w;
INT h;
ULONG size;
MFDB mf;
} AREA;
/* ------------------------------------------------------------------- */
INT Init_GEM ( PARAMETER *parm, BYTE *acc_name, LONG prg_id, BYTE *prg_name, LONG user_id, BYTE *name );
VOID Exit_GEM ( VOID );
/* ------------------------------------------------------------------- */
VOID ShowArrow ( VOID );
VOID ShowBee ( VOID );
VOID ShowHour ( VOID );
VOID ShowFinger ( VOID );
VOID ShowHand ( VOID );
VOID ShowThinCross ( VOID );
VOID ShowThickCross ( VOID );
VOID ShowOutlineCross( VOID );
VOID ShowMouse ( VOID );
VOID HideMouse ( VOID );
/* ------------------------------------------------------------------- */
VOID SetClipping ( INT handle, BOOL clip, INT x, INT y, INT w, INT h );
/* ------------------------------------------------------------------- */
VOID SetState ( OBJECT *tree, INT obj, INT state );
BOOL GetState ( OBJECT *tree, INT obj, INT state );
VOID DelState ( OBJECT *tree, INT obj, INT state );
VOID SetGlobalState ( OBJECT *tree, INT obj, INT state );
VOID SetFlags ( OBJECT *tree, INT obj, INT flags );
BOOL GetFlags ( OBJECT *tree, INT obj, INT flags );
VOID DelFlags ( OBJECT *tree, INT obj, INT flags );
VOID SetGlobalFlags ( OBJECT *tree, INT obj, INT flags );
INT objc_frame ( OBJECT *tree, INT obj );
VOID CalcArea ( OBJECT *tree, INT obj, RECT *r );
/* ------------------------------------------------------------------- */
VOID RedrawObj ( OBJECT *tree, INT obj, INT state, INT flag );
/* ------------------------------------------------------------------- */
BOOL NewArea ( AREA *area );
VOID FreeArea ( AREA *area );
VOID ClearArea ( AREA *area );
BOOL SaveArea ( INT handle, AREA *area, RECT *r );
VOID RestoreArea ( INT handle, AREA *area );
VOID CopyArea ( INT handle, AREA *area, INT x, INT y );
VOID MoveArea ( INT handle, AREA *area, INT xm, INT ym, INT *xx, INT *yy );
VOID MoveScreen ( INT handle, RECT *r, INT x, INT y );
/* ------------------------------------------------------------------- */
BOOL NewDialog ( OBJECT *tree );
VOID ShowDialog ( OBJECT *tree );
INT DoDialog ( OBJECT *tree, INT first_edit );
INT HandleDialog ( OBJECT *tree, INT first_edit );
VOID DisableDialog ( OBJECT *tree );
VOID EnableDialog ( OBJECT *tree );
VOID EndDialog ( OBJECT *tree );
BOOL DelDialog ( OBJECT *tree );
VOID RedrawDialog ( OBJECT *tree );
VOID DialPosXY ( BOOL center );
VOID TellKeyStrokes ( BOOL tell );
VOID SetFieldProc ( VOID (*proc)(INT ed, OBJECT *tree));
VOID SetReturn ( BOOL like_sysgem );
VOID SetEdField ( INT field );
VOID SetEditField ( OBJECT *tree, INT field );
VOID MoveSolid ( BOOL solid );
VOID SetCall ( BOOL do_call_before );
VOID GetEditFields ( OBJECT *tree, VOID (*callback)(INT obj, BYTE *s ));
VOID ClearEditFields ( OBJECT *tree );
VOID UseRightButton ( BOOL use );
BOOL WasRightButton ( VOID );
BOOL WasDoubleClick ( VOID );
/* ------------------------------------------------------------------- */
INT Alert ( INT def, BYTE *alert_string );
INT SetIconColor ( INT color );
VOID SetButton ( INT just );
VOID UseHighButtons ( BOOL use_high );
/* ------------------------------------------------------------------- */
VOID RedrawArea ( INT handle, RECT *rect );
VOID RedrawWindow ( INT handle );
/* ------------------------------------------------------------------- */
VOID SetWName ( INT handle, BYTE *name );
VOID SetWInfo ( INT handle, BYTE *info );
INT GetHandle ( LONG id );
LONG GetID ( INT handle );
BOOL TopWindow ( INT handle );
INT GetTopWindow ( VOID );
BOOL OwnWindow ( INT handle );
BOOL CloseWindow ( INT handle );
VOID CloseAllWindows ( VOID );
/* ------------------------------------------------------------------- */
VOID RectIntersect ( RECT *r1, RECT *r2 );
VOID ScrollWindow ( INT handle, INT what );
LONG SetWindowParm ( INT handle, INT what, LONG value );
VOID SetWindowRect ( INT handle, INT x, INT y );
VOID GetWindowRect ( INT handle, INT *x, INT *y );
/* ------------------------------------------------------------------- */
VOID HandleEvents ( VOID );
VOID TerminateGL ( VOID );
/* ------------------------------------------------------------------- */
VOID SetMsgProc ( VOID (*msg_proc)(INT msg, LONG from, LONG parm ));
BOOL SendMessage ( INT msg, LONG to, LONG parm );
INT ProgramExist ( LONG id );
/* ------------------------------------------------------------------- */
INT OpenWindow ( LONG id,
BYTE *name,
BYTE *info,
INT flags,
OBJECT *menu_line,
INT align,
BOOL part_redraw,
INT scroll_x,
INT scroll_y,
LONG doc_x,
LONG doc_y,
INT x,
INT y,
INT w,
INT h,
VOID *user,
VOID (*redraw)(WINDOW_INFO *inf ),
INT (*action)(INT msg, WINDOW_INFO *inf ));
/* ------------------------------------------------------------------- */
BOOL WindowDialog ( LONG id,
INT xpos,
INT ypos,
BYTE *title,
BYTE *info,
BOOL shut,
BOOL force,
OBJECT *tree,
OBJECT *menu_line,
INT first_edit,
INT (*dfunc)(INT msg, INT button) );
/* ------------------------------------------------------------------- */
BOOL LinkSlider ( OBJECT *tree, INT up, INT dn, INT show, INT hide,
INT max, INT box, VOID *buffer, INT len );
VOID SetSliderLen ( OBJECT *tree, INT box, INT len );
BOOL UnLinkSlider ( OBJECT *tree, INT box );
BOOL AddSliderItem ( OBJECT *tree, INT box, INT anz_items );
VOID RedrawSliderBox ( OBJECT *tree, INT box );
INT SetSliderPos ( OBJECT *tree, INT box, INT pos );
VOID ScrollSlider ( OBJECT *tree, INT box, INT what );
VOID SetRealTimeSld ( BOOL real_time );
/* ------------------------------------------------------------------- */
VOID SetText ( OBJECT *tree, INT index, BYTE *text );
BYTE *GetText ( OBJECT *tree, INT index, BYTE *text );
/* ------------------------------------------------------------------- */
BOOL SetDeskTopMenu ( OBJECT *tree, INT (*action)(INT msg, WINDOW_INFO *inf ));
VOID RemDeskTopMenu ( VOID );
INT IsMenuKey ( OBJECT *tree, INT scan, INT state );
VOID SelectMenu ( INT item, BOOL invert );
/* ------------------------------------------------------------------- */
UINT LoadResource ( BYTE *rsc_name );
OBJECT *RscAdr ( INT tree_type, INT index );
VOID RscFree ( VOID );
/* ------------------------------------------------------------------- */
BOOL InstallTermProc ( VOID (*proc)(VOID) );
VOID SetUnknownEvent ( VOID (*proc)(INT event, INT *msg));
VOID SetAccProc ( VOID (*acc_open)(VOID), VOID (*acc_close)(VOID));
/* ------------------------------------------------------------------- */
BOOL SetCookie ( LONG id, LONG value );
BOOL GetCookie ( LONG id, LONG *value );
BOOL RemoveCookie ( LONG id );
/* ------------------------------------------------------------------- */
INT PopUp ( OBJECT *tree, INT x, INT y, INT start_obj, INT first_obj );
VOID PopUpMenu ( BOOL wait_for_click );
/* ------------------------------------------------------------------- */
VOID SetProcTimer ( VOID (*proc)(VOID));
VOID SetTimer ( INT ms_low, INT ms_high );
/* ------------------------------------------------------------------- */
BOOL SetDeskTop ( OBJECT *tree, INT first, INT (*action)(INT msg, WINDOW_INFO *inf ));
VOID RemoveDeskTop ( VOID );
/* ------------------------------------------------------------------- */
VOID SetWatch ( INT enter, RECT *watch, VOID (*p)(BOOL enter, RECT *r ));
/* ------------------------------------------------------------------- */
#endif
/* ------------------------------------------------------------------- */