Mercurial > ~darius > hgwebdir.cgi > paradise_client
diff Wlib.h @ 1:ff5e05767bd3 ALPHA
Empty changelog
author | darius |
---|---|
date | Sat, 06 Dec 1997 05:41:28 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Wlib.h Sat Dec 06 05:41:28 1997 +0000 @@ -0,0 +1,156 @@ +/* $Id: Wlib.h,v 1.1.1.1 1997/12/06 05:41:28 darius Exp $ */ + +/* Wlib.h + * + * Include file for the Windowing interface. + * + * Kevin P. Smith 6/11/89 + * + * The deal is this: + * Call W_Initialize(), and then you may call any of the listed fuinctions. + * Also, externals you are allowed to pass or use include W_BigFont, + * W_RegularFont, W_UnderlineFont, W_HighlightFont, W_White, W_Black, + * W_Red, W_Green, W_Yellow, W_Cyan, W_Grey, W_Textwidth, and W_Textheight. + */ + +#ifndef Wlib_h_ +#define Wlib_h_ + +#include <stdio.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include "Wlib.h" +#include "copyright2.h" + +#ifndef P +#ifdef __STDC__ +#define P(x) x +#else +#define P(x) () +#endif +#endif /* P */ + +typedef struct event W_Event; +typedef int (*W_Callback) (); +typedef char *W_Window; +extern W_Callback W_GetWindowKeyDownHandler(); +extern W_Callback W_GetWindowKeyUpHandler(); +extern W_Callback W_GetWindowButtonHandler(); +extern W_Callback W_GetWindowExposeHandler(); +extern W_Callback W_SetWindowKeyDownHandler(); +extern W_Callback W_SetWindowKeyUpHandler(); +extern W_Callback W_SetWindowButtonHandler(); +extern W_Callback W_SetWindowExposeHandler(); +int W_Mono P((void)); + +/*typedef char *W_Window;*/ +typedef char *W_Icon; +typedef char *W_Font; +typedef int W_Color; + +extern W_Font W_BigFont, W_RegularFont, W_UnderlineFont, W_HighlightFont; +extern W_Color W_White, W_Black, W_Red, W_Green, W_Yellow, W_Cyan, W_Grey; +extern int W_Textwidth, W_Textheight; +extern int W_FastClear; + +void W_Initialize P((char * /* display */)); +W_Window +W_MakeWindow P(( char *, int, int, int, int, W_Window, char *, int, W_Color /* name, x, y, width, height, parent, border, color */ )); +W_Icon W_StoreBitmap P(( int, int, char *, W_Window + /* width, height, data, window */ )); +void W_FreeBitmap P(( W_Icon /* icon */ )); +W_Window W_MakeTextWindow P(( + char *, int, int, int, int, W_Window, char *, int + /* name, x, y, width, height, parent, border */ )); +W_Window W_MakeScrollingWindow P(( + char *, int, int, int, int, W_Window, char *, int + /* name, x, y, width, height, parent,border */ )); +W_Window W_MakeMenu P(( char *, int, int, int, int, W_Window, int + /* name, x, y, width, height, parent, border */ )); +void W_WriteText P(( W_Window, int, int, W_Color, char *, int, W_Font + /* window, x, y, color, str, length, font */ )); +void W_MaskText P(( W_Window, int, int, W_Color, char *, int, W_Font + /* window, x, y, color, str, length, font */ )); +void W_WriteBitmap P(( int, int, W_Icon, W_Color + /* x, y, icon, color */ )); +void W_WriteWinBitmap P(( W_Window, int, int, W_Icon, W_Color + /* win, x, y, icon, color */ )); +void W_ClearArea P(( W_Window, int, int, int, int + /* window, x, y, width, height, color */ )); +void W_MakeLine P(( W_Window, int, int, int, int, W_Color + /* window, x0, y0, x1, y1, color */ )); +void W_DrawPoint P(( W_Window, int, int, W_Color + /* window, x, y, color */ )); +void W_MapWindow P(( W_Window /* window */ )); +void W_UnmapWindow P(( W_Window /* window */ )); +int W_EventsPending P(( void )); +void W_NextEvent P(( W_Event * /* W_Event *event */ )); +void W_TileWindow P(( W_Window, W_Icon /* window, bitmap */ )); +void W_UnTileWindow P(( W_Window /* window */ )); +void W_ChangeBorder P(( W_Window, int /* window, color */ )); +void W_DefineCursor P(( + W_Window, int, int, char *, char *, int, int + /* window, width, height, data, mask, xhot, yhot */ )); +int W_IsMapped P(( W_Window /* window */ )); +void W_Beep P(( void )); +void W_DestroyWindow P(( W_Window )); +int W_WindowWidth P(( W_Window /* window */ )); +int W_WindowHeight P(( W_Window /* window */ )); +int W_Socket P(( void )); +void W_ClearWindow P(( W_Window /* window */ )); +void W_SetIconWindow P(( W_Window, W_Window /* mainwindow, iconwindow */ )); +int W_StringWidth P(( char [], W_Font /* string, font */ )); +void W_TranslatePoints P(( W_Window, int *, int * /* window, x, y */ )); +void W_ResizeWindow P(( W_Window, int, int /* window, neww, newh */ )); +void W_ResizeMenu P(( W_Window, int, int /* window, neww, newh */ )); +void W_ResizeText P(( W_Window, int, int /* window, neww, newh */ )); +void W_Deiconify P(( W_Window /* window */ )); + +W_Icon W_MakeShieldBitmap P(( int, int, W_Window /* width,height, window */ )); + +#ifdef AMIGA +void switchScreen(); +/* things ignored or different for now: */ +/* some laziness on my part, mostly just unneeded. */ +#define W_CacheLine W_MakeLine +#define W_CachePoint W_DrawPoint +#define W_FlushPointCaches(w) +#define W_FlushLineCaches(w) +#define W_DefineTextCursor(w) W_DefineMessageCursor(w) +#define W_RevertCursor(w) W_DefineTCrossCursor(w) +#define W_RenameWindow(w,s) + +extern W_Icon W_ReadPixmap(W_Window window, char *path, char *name, int width, int height, int x, int y, int mask); + +#define W_StringWidth(st,font) (strlen(st)*W_Textwidth) + +/* Don't even know what this is supposed to do... */ +#define W_SetSensitive(w,b) + +extern int autoPoint, W_KeyDepth, animPointers, useWorkbench; +extern unsigned long w_socket; +#endif /* AMIGA */ + + +#define W_EV_EXPOSE 1 +#define W_EV_KEY 2 +#define W_EV_BUTTON 3 + +#ifdef AUTOKEY +#define W_EV_KEY_OFF 4 +#endif /* AUTOKEY */ + +#define W_LBUTTON 1 +#define W_MBUTTON 2 +#define W_RBUTTON 3 + +struct event { + int type; + W_Window Window; + int key; + int x, y; +}; + +#define W_BoldFont W_HighlightFont + +#endif