/[libvob]/libvob/doc/pegboard/cursors--humppake/peg.rst
ViewVC logotype

Diff of /libvob/doc/pegboard/cursors--humppake/peg.rst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by humppake, Fri May 9 13:24:57 2003 UTC revision 1.7 by humppake, Fri May 9 13:36:51 2003 UTC
# Line 95  Issues Line 95  Issues
95          NOTE: In Java, Toolkit.createCustomCursor is available since          NOTE: In Java, Toolkit.createCustomCursor is available since
96          JDK 1.2. How custom cursor could be used efficiently in GL?          JDK 1.2. How custom cursor could be used efficiently in GL?
97    
98          RE-RESOLVED: Using custom cursor is allowed, thought it left          RE-RESOLVED: Since ustom cursors should be also possible
99          unimplemented in GL.          outside the AWT, using custom cursor is allowed. Althought, left
100            yet unimplemented in GL.
101    
102  Changes  Changes
103  =======  =======
# Line 162  Into ``src/jni/Main.cxx``:: Line 163  Into ``src/jni/Main.cxx``::
163            Os::Window *w = (Os::Window *)windows.get(id);            Os::Window *w = (Os::Window *)windows.get(id);
164            DBG(dbg) << "Set window "<<id<<" Cursor shape "<<shape<<" at "<<(int)w<<"\n";            DBG(dbg) << "Set window "<<id<<" Cursor shape "<<shape<<" at "<<(int)w<<"\n";
165            std::string shape_str = jstr2stdstr(env, shape);            std::string shape_str = jstr2stdstr(env, shape);
          std::transform(shape_str.begin(), shape_strend(),  
                         shape_str.begin(), std::toupper);  
166            w->setCursor(shape_str);            w->setCursor(shape_str);
167      }      }
168    
169  Into ``src/os/Os-GLX.cxx``::  Into ``src/os/Os-GLX.cxx``::
170    
171          // For setCursor()      // For setCursor()
172          #include <X11/Xlib.h>      #include <X11/Xlib.h>
173          #include <X11/cursorfont.h>      #include <X11/cursorfont.h>
174          #include <string>      //
         using std::string;  
         //  
175    
176  Into ``src/os/Os-GLX.cxx Vob.Os.LXWindow``::  Into ``src/os/Os-GLX.cxx Vob.Os.LXWindow``::
177    
# Line 206  Into ``src/os/Os-GLX.cxx Vob.Os.LXWindow Line 203  Into ``src/os/Os-GLX.cxx Vob.Os.LXWindow
203            cursor = XCreateFontCursor(ws->dpy, XC_xterm);            cursor = XCreateFontCursor(ws->dpy, XC_xterm);
204          else if (shape == "W_RESIZE_CURSOR")          else if (shape == "W_RESIZE_CURSOR")
205            cursor = XCreateFontCursor(ws->dpy, XC_left_side);            cursor = XCreateFontCursor(ws->dpy, XC_left_side);
206           else if (shape == "WAIT_CURSOR")          else if (shape == "WAIT_CURSOR")
207            cursor = XCreateFontCursor(ws->dpy, XC_watch);            cursor = XCreateFontCursor(ws->dpy, XC_watch);
208          if (cursor != 0) XDefineCursor(ws->dpy, xw, cursor);          if (cursor != 0) XDefineCursor(ws->dpy, xw, cursor);
209      }      }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26