1 /*
2  * wmslib/include/but/rcur.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 remote cursors.
7  */
8 
9 #ifndef  _BUTRCUR_H_
10 #define  _BUTRCUR_H_  1
11 
12 /**********************************************************************
13  * Constants
14  **********************************************************************/
15 
16 #define  BUTCUR_NUM  10
17 
18 /**********************************************************************
19  * Types
20  **********************************************************************/
21 
22 /*
23  * Do not use butCur_bogus.  It is a bogus cursor, _NOT_ a bogus-looking
24  *   cursor.
25  */
26 typedef enum  {
27   butCur_idle, butCur_text, butCur_twitch, butCur_right, butCur_left,
28   butCur_up, butCur_down, butCur_lr, butCur_ud, butCur_grab, butCur_bogus}
29 ButCur;
30 
31 typedef struct ButRcur_struct  {
32   ButEnv  *env;
33   int  winId, rx,ry, rw,rh;
34   int  lx,ly;
35   ButCur  type;
36   bool  drawn;
37   Pixmap  under;
38   MAGIC_STRUCT
39 } ButRcur;
40 
41 /**********************************************************************
42  * Functions
43  **********************************************************************/
44 
45 /* Public. */
46 extern void  butEnv_rcInit(ButEnv *env);
47 
48 extern void  butRcur_create(ButRcur *rc, ButEnv *env);
49 #define  butRcur_destroy(rc) butRcur_move(-2, 0,0, 0,0);
50 
51 extern void  butRcur_move(ButRcur *rc, int winId, int rx,int ry,
52 			  int rw,int rh, ButCur type);
53 extern void  butRcur_redraw(ButEnv *env, int winId, int x,int y, int w,int h);
54 
55 /* The type of cursor has changed. */
56 extern void  butEnv_setCursor(ButEnv *env, But *but, ButCur newCursor);
57 
58 /* Set up any cursor changes that may have occurred. */
59 extern void  butEnv_rcActivate(ButEnv *env);
60 
61 #endif  /* _BUTRCUR_H_ */
62