[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 07:56:28 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Asko Soukka <address@hidden> 03/05/09 07:56:28
Modified files:
doc/pegboard/cursors--humppake: peg.rst
Log message:
fix
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/doc/pegboard/cursors--humppake/peg.rst.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: libvob/doc/pegboard/cursors--humppake/peg.rst
diff -u libvob/doc/pegboard/cursors--humppake/peg.rst:1.3
libvob/doc/pegboard/cursors--humppake/peg.rst:1.4
--- libvob/doc/pegboard/cursors--humppake/peg.rst:1.3 Fri May 9 06:48:06 2003
+++ libvob/doc/pegboard/cursors--humppake/peg.rst Fri May 9 07:56:28 2003
@@ -4,8 +4,8 @@
:Authors: Asko Soukka
:Date-Created: 2003-05-09
-:Last-Modified: $Date: 2003/05/09 10:48:06 $
-:Revision: $Revision: 1.3 $
+:Last-Modified: $Date: 2003/05/09 11:56:28 $
+:Revision: $Revision: 1.4 $
:Status: Current
:Scope: Trivial
:Type: Feature, Interface, Implementation
@@ -35,6 +35,14 @@
with ID of wanted cursor as a parameter. Of course setCursor() method
should be implemented separately for both AWT and GL.
+ RE-RESOLVED: Calling
``org.nongnu.libvob.GraphicsAPI.Window.setCursor()``
+ with java.awt.Cursor as parameter.
+
+- How java.awt.Cursor is mapped to Xlib mouse cursor values?
+
+ RESOLVED: Mapping is done in setCursor() method
+ in ``org.nongnu.libvob.impl.gl.GLScreen`` using switch structure.
+
- What are the mouse cursor IDs?
RESOLVED: IDs are our own constants mapped to integer values that
@@ -42,6 +50,8 @@
for specific mouse cursors are different in AWT and Xlib and that's
why we need our own mapping for them.
+ RE-RESOLVED: Irrelevant.
+
- Where are the mouse cursor ID mappings located?
RESOLVED: Mouse cursor constants are described with AWT values as
default
@@ -49,20 +59,28 @@
mappings must be overwritten into
``org.nongnu.libvob.impl.gl.GLAPI``.
+ RE-RESOLVED: Irrelevant.
+
- What is the available set of mouse cursors?
- RESOLVED: The set of available mouse cursors is the interserction of
+ RESOLVED: The set of available mouse cursors is the intersection of
Xlib and AWT mouse cursors sets:
- http://java.sun.com/products/jdk/1.2/docs/api/java/awt/Cursor.html
- http://tronche.com/gui/x/xlib/appendix/b/
+ RE-RESOLVED: To be more specific, all Java AWT cursors except
+ custom cursor are available.
+
- Since it's possible to call setCursor() with pure integer values, is
it allowed to use AWT or Xlib specific cursors?
RESOLVED: Yes, but with care. If the application is runnable under
both AWT and GL, there should be checking for proper GraphicsAPI..
+
+ RESOLVED: Irrelevant. Not possible anymore.
+
- Should we use our own custom cursors?
RESOLVED: Not yet. Probably we would like to use also our own
@@ -78,58 +96,18 @@
Java
----
-Into ``org.nongnu.libvob.GraphicsAPI``::
-
- /** Available mouse cursor, set after AWT by default, must
- * be overwritten in GL.
- */
- public static int CROSSHAIR_CURSOR = Cursor.CROSSHAIR_CURSOR;
- public static int DEFAULT_CURSOR = Cursor.DEFAULT_CURSOR;
- public static int E_RESIZE_CURSOR = Cursor.E_RESIZE_CURSOR;
- public static int HAND_CURSOR = Cursor.HAND_CURSOR;
- public static int MOVE_CURSOR = Cursor.MOVE_CURSOR;
- public static int N_RESIZE_CURSOR = Cursor.N_RESIZE_CURSOR;
- public static int NE_RESIZE_CURSOR = Cursor.NE_RESIZE_CURSOR;
- public static int NW_RESIZE_CURSOR = Cursor.NW_RESIZE_CURSOR;
- public static int S_RESIZE_CURSOR = Cursor.S_RESIZE_CURSOR;
- public static int SE_RESIZE_CURSOR = Cursor.SE_RESIZE_CURSOR;
- public static int SW_RESIZE_CURSOR = Cursor.SW_RESIZE_CURSOR;
- public static int TEXT_CURSOR = Cursor.TEXT_CURSOR;
- public static int W_RESIZE_CURSOR = Cursor.W_RESIZE_CURSOR;
- public static int WAIT_CURSOR = Cursor.WAIT_CURSOR;
-
Into ``org.nongnu.libvob.GraphicsAPI.Window``::
/** Sets the mouse cursors shape.
*/
- void setCursor(int shape);
+ void setCursor(Cursor cursor);
Into ``org.nongnu.libvob.impl.awt.AWTScreen``::
- public void setCursor(int shape) {
- canvas.setCursor(new Cursor(shape));
+ public void setCursor(cursor Cursor) {
+ canvas.setCursor(cursor);
}
-Into ``org.nongnu.libvob.impl.GL.GLAPI``::
-
- /** Available mouse cursor
- * After Xlib: http://tronche.com/gui/x/xlib/appendix/b/
- */
- public static int CROSSHAIR_CURSOR = 130; // XC_tcross
- public static int DEFAULT_CURSOR = 68; // XC_left_ptr
- public static int E_RESIZE_CURSOR = 98; // XC_righside
- public static int HAND_CURSOR = 60; // XC_hand2
- public static int MOVE_CURSOR = 52; // XC_fleur
- public static int N_RESIZE_CURSOR = 138; // XC_top_side
- public static int NE_RESIZE_CURSOR = 136; // XC_top_right_corner
- public static int NW_RESIZE_CURSOR = 134; // XC_top_left_corner
- public static int S_RESIZE_CURSOR = 16; // XC_bottom_side
- public static int SE_RESIZE_CURSOR = 14; // XC_bottom_right_corner
- public static int SW_RESIZE_CURSOR = 12; // XC_bottom_left_corner
- public static int TEXT_CURSOR = 152; // XC_xterm
- public static int W_RESIZE_CURSOR = 70; // XC_left_side
- public static int WAIT_CURSOR = 150; // XC_watch
-
Into ``org.nongnu.libvob.GL``::
static private native void impl_Window_setCursor(int id, int shape);
@@ -142,8 +120,23 @@
Into ``org.nongnu.libvob.impl.GL.GLScreen``::
- public void setCursor(int shape) {
- window.setCursor(shape);
+ 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
- [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/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/12
- [Gzz-commits] libvob/doc/pegboard/cursors--humppake peg.rst, Asko Soukka, 2003/05/13