First checkin, AXE release 0.2
[AXE.git] / src / cursor.h
1 /**************************************************************************
2 **  (c) Copyright 1998, Andromeda Technology & Automation
3 ***************************************************************************
4 ** MODULE INFORMATION *
5 ***********************
6 **      FILE NAME      : cursor.h
7 **      SYSTEM NAME    : AXE - Andromeda X-windows Encapsulation
8 **      VERSION NUMBER : $Revision: 1.1 $
9 **
10 **  DESCRIPTION      : Definition of cursor class
11 **
12 **  EXPORTED OBJECTS : class cursor
13 **  LOCAL    OBJECTS : 
14 **  MODULES  USED    :
15 ***************************************************************************
16 **  ADMINISTRATIVE INFORMATION *
17 ********************************
18 **      ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
19 **      CREATION DATE   : Feb 25, 1998
20 **      LAST UPDATE     : Feb 25, 1998
21 **      MODIFICATIONS   : 
22 **************************************************************************/
23
24 /*****************************
25    $Log: cursor.h,v $
26    Revision 1.1  2002-07-25 08:01:26  arjen
27    First checkin, AXE release 0.2
28
29 *****************************/
30
31 /* static const char *RCSID = "$Id: cursor.h,v 1.1 2002-07-25 08:01:26 arjen Exp $"; */
32
33 #include <X11/Xlib.h>
34 #include <X11/cursorfont.h>
35 #include "display.h"
36
37 /*
38 ///////////////////////////////////////////////////////////////////////////
39 //  NAME           : cursor
40 //  BASECLASS      :
41 //  MEMBERS        : Cursor curs
42 //  OPERATORS      :
43 //  METHODS        :
44 //
45 //  DESCRIPTION    :
46 //
47 //  RELATIONS      :
48 //  SEE ALSO       :
49 //  LAST MODIFIED  : Feb 25, 1998
50 ///////////////////////////////////////////////////////////////////////////
51 */
52
53 class cursor
54 {
55    Cursor curs;
56
57 public:
58
59    cursor()
60    {
61       curs = 0;
62    }
63
64    cursor(unsigned int shape)
65    {
66       curs = XCreateFontCursor(stddpy, shape);
67    }
68
69    ~cursor()
70    {
71       XFreeCursor(stddpy, curs);
72    }
73
74    operator Cursor()
75    {
76       return curs;
77    }
78 };
79