[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst
From: |
Asko Soukka |
Subject: |
[Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst |
Date: |
Fri, 09 May 2003 09:24:57 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Asko Soukka <address@hidden> 03/05/09 09:24:57
Modified files:
doc/pegboard/cursors--humppake: peg.rst
Log message:
fixes
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/doc/pegboard/cursors--humppake/peg.rst.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: libvob/doc/pegboard/cursors--humppake/peg.rst
diff -u libvob/doc/pegboard/cursors--humppake/peg.rst:1.5
libvob/doc/pegboard/cursors--humppake/peg.rst:1.6
--- libvob/doc/pegboard/cursors--humppake/peg.rst:1.5 Fri May 9 09:12:16 2003
+++ libvob/doc/pegboard/cursors--humppake/peg.rst Fri May 9 09:24:57 2003
@@ -4,8 +4,8 @@
:Authors: Asko Soukka
:Date-Created: 2003-05-09
-:Last-Modified: $Date: 2003/05/09 13:12:16 $
-:Revision: $Revision: 1.5 $
+:Last-Modified: $Date: 2003/05/09 13:24:57 $
+:Revision: $Revision: 1.6 $
:Status: Current
:Scope: Trivial
:Type: Feature, Interface, Implementation
@@ -43,6 +43,11 @@
RESOLVED: Mapping is done in setCursor() method
in ``org.nongnu.libvob.impl.gl.GLScreen`` using switch structure.
+ RE-RESOLVED: String value corresponding to cursor is
+ passed to on in ``org.nongnu.libvob.impl.gl.GLScreen`` and
+ low level implementation like usin Xlib is determined later on.
+ At first in /src/os/Os-GLX.
+
- What are the mouse cursor IDs?
RESOLVED: IDs are our own constants mapped to integer values that
@@ -90,6 +95,9 @@
NOTE: In Java, Toolkit.createCustomCursor is available since
JDK 1.2. How custom cursor could be used efficiently in GL?
+ RE-RESOLVED: Using custom cursor is allowed, thought it left
+ unimplemented in GL.
+
Changes
=======
@@ -121,7 +129,7 @@
Into ``org.nongnu.libvob.impl.GL.GLScreen``::
public void setCursor(Cursor cursor) {
- switch cursor {
+ switch (cursor.getType()) {
case Cursor.CROSSHAIR_CURSOR: window.setCursor("CROSSHAIR_CURSOR");
break;
case Cursor.DEFAULT_CURSOR: window.setCursor("DEFAULT_CURSOR"); break;
case Cursor.E_RESIZE_CURSOR: window.setCursor("E_RESIZE_CURSOR"); break;
@@ -137,26 +145,7 @@
case Cursor.W_RESIZE_CURSOR: window.setCursor("W_RESIZE_CURSOR"); break;
case Cursor.WAIT_CURSOR: window.setCursor("WAIT_CURSOR"); break;
case Cursor.CUSTOM_CURSOR: window.setCursor("CUSTOM_CURSOR"); break;
- }
- }
-
- public void setCursor(Cursor cursor) {
- switch cursor {
- case Cursor.CROSSHAIR_CURSOR: window.setCursor(130); break; //
XC_tcross
- case Cursor.DEFAULT_CURSOR: window.setCursor(68); break; //
XC_left_ptr
- case Cursor.E_RESIZE_CURSOR: window.setCursor(98); break; //
XC_righside
- case Cursor.HAND_CURSOR: window.setCursor(60); break; // XC_hand2
- case Cursor.MOVE_CURSOR: window.setCursor(52); break; // XC_fleur
- case Cursor.N_RESIZE_CURSOR: window.setCursor(138); break; //
XC_top_side
- case Cursor.NE_RESIZE_CURSOR: window.setCursor(136); break; //
XC_top_right_corner
- case Cursor.NW_RESIZE_CURSOR: window.setCursor(134); break; //
XC_top_left_corner
- case Cursor.S_RESIZE_CURSOR: window.setCursor(16); break; //
XC_bottom_side
- case Cursor.SE_RESIZE_CURSOR: window.setCursor(14); break; //
XC_bottom_right_corner
- case Cursor.SW_RESIZE_CURSOR: window.setCursor(12); break; //
XC_bottom_left_corner
- case Cursor.TEXT_CURSOR: window.setCursor(152); break; // XC_xterm
- case Cursor.W_RESIZE_CURSOR: window.setCursor(70); break; //
XC_left_side
- case Cursor.WAIT_CURSOR: window.setCursor(150); break; // XC_watch
- }
+ };
}
C
@@ -180,12 +169,17 @@
Into ``src/os/Os-GLX.cxx``::
- #include <X11/Xlib.h>
+ // For setCursor()
+ #include <X11/Xlib.h>
+ #include <X11/cursorfont.h>
+ #include <string>
+ using std::string;
+ //
Into ``src/os/Os-GLX.cxx Vob.Os.LXWindow``::
virtual void setCursor(const std::string shape) {
- Cursor cursor = NULL;
+ Cursor *cursor = 0;
if (shape == "CROSSHAIR_CURSOR")
cursor = XCreateFontCursor(ws->dpy, XC_crosshair);
else if (shape == "DEFAULT_CURSOR")
@@ -214,7 +208,7 @@
cursor = XCreateFontCursor(ws->dpy, XC_left_side);
else if (shape == "WAIT_CURSOR")
cursor = XCreateFontCursor(ws->dpy, XC_watch);
- if (cursor != NULL) XDefineCursor(ws->dpy, xw, cursor);
+ if (cursor != 0) XDefineCursor(ws->dpy, xw, cursor);
}
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/09
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/09
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/09
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/09
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst,
Asko Soukka <=
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/09
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/12
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/13