1 /* 2 * wmslib/src/abut/swin.h, part of wmslib (Library functions) 3 * Copyright (C) 1994-1995 William Shubert. 4 * See "configure.h.in" for more copyright information. 5 * 6 * Includes for auxiliary button code. 7 */ 8 9 #ifndef _ABUT_SWIN_H_ 10 #define _ABUT_SWIN_H_ 1 11 12 #ifndef _WMS_H_ 13 #include <wms.h> 14 #endif 15 #ifndef _BUT_BUT_H_ 16 #include <but/but.h> 17 #endif 18 19 20 /********************************************************************** 21 * Constants 22 **********************************************************************/ 23 #define ABUT_UPPIC "\2\1" 24 #define ABUT_DOWNPIC "\2\2" 25 #define ABUT_LEFTPIC "\2\3" 26 #define ABUT_RIGHTPIC "\2\4" 27 28 29 /********************************************************************** 30 * Data types 31 **********************************************************************/ 32 typedef struct AbutSwin_struct { 33 ButWin *win; 34 void *packet; 35 But *up, *down, *left, *right, *hSlide, *vSlide, *box; 36 float xCenter, yCenter; 37 uint flags; 38 ButTimer *timer; 39 int x, y, w, h, slideW, lineH; /* Backups for resizing. */ 40 int canButW, canButH; 41 MAGIC_STRUCT 42 } AbutSwin; 43 #define ABUTSWIN_LSLIDE 0x1 44 #define ABUTSWIN_RSLIDE 0x2 45 #define ABUTSWIN_TSLIDE 0x4 46 #define ABUTSWIN_BSLIDE 0x8 47 48 49 /********************************************************************** 50 * Functions 51 **********************************************************************/ 52 extern AbutSwin *abutSwin_create(void *packet, ButWin *parent, 53 int layer, uint flags, 54 ButWinFunc resize); 55 extern void abutSwin_resize(AbutSwin *swin, int x, int y, int w, int h, 56 int slidew, int lineh); 57 extern void abutSwin_destroy(AbutSwin *swin); 58 extern void abutSwin_vMove(AbutSwin *swin, int newLoc); 59 60 61 #endif /* _ABUT_SWIN_H_ */ 62