aboutsummaryrefslogtreecommitdiff
path: root/packages/patches/set_cursors_in_tcl-0.41-test06.patch
blob: b34cce6858962ed5f4af14b2c7d0709145f750fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.28
diff -u -w -r1.28 u_main.tk
--- u_main.tk	18 Aug 2007 23:32:44 -0000	1.28
+++ u_main.tk	6 Nov 2007 02:10:48 -0000
@@ -31,6 +31,36 @@
 set pd_array_listview_page(0) 0
 # end jsarlo
 
+# set up mouse cursors individually on each platform
+switch -- $pd_nt { 0 {
+    # GNU/Linux
+    set cursor_runmode_nothing "left_ptr"
+    set cursor_runmode_clickme "arrow"
+    set cursor_runmode_thicken "sb_v_double_arrow"
+    set cursor_runmode_addpoint "plus"
+    set cursor_editmode_nothing "hand2"
+    set cursor_editmode_connect "circle"
+    set cursor_editmode_disconnect "X_cursor"
+} 1 {
+    # Windows
+    set cursor_runmode_nothing "rigth_ptr"
+    set cursor_runmode_clickme "arrow"
+    set cursor_runmode_thicken "sb_v_double_arrow"
+    set cursor_runmode_addpoint "plus"
+    set cursor_editmode_nothing "hand2"
+    set cursor_editmode_connect "circle"
+    set cursor_editmode_disconnect "X_cursor"
+} 2 {
+    # Mac OS X
+    set cursor_runmode_nothing "arrow"
+    set cursor_runmode_clickme "center_ptr"
+    set cursor_runmode_thicken "sb_v_double_arrow"
+    set cursor_runmode_addpoint "plus"
+    set cursor_editmode_nothing "hand2"
+    set cursor_editmode_connect "circle"
+    set cursor_editmode_disconnect "X_cursor"
+} }
+
 if {$pd_nt == 1} {
     global pd_guidir
     global pd_tearoff
Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.20
diff -u -w -r1.20 g_editor.c
--- g_editor.c	9 Oct 2006 04:36:12 -0000	1.20
+++ g_editor.c	6 Nov 2007 02:10:48 -0000
@@ -729,17 +729,13 @@
 /* ------------------------ event handling ------------------------ */
 
 static char *cursorlist[] = {
-#ifdef MSW
-    "right_ptr",        /* CURSOR_RUNMODE_NOTHING */
-#else
-    "left_ptr",         /* CURSOR_RUNMODE_NOTHING */
-#endif
-    "arrow",            /* CURSOR_RUNMODE_CLICKME */
-    "sb_v_double_arrow", /* CURSOR_RUNMODE_THICKEN */
-    "plus",             /* CURSOR_RUNMODE_ADDPOINT */
-    "hand2",            /* CURSOR_EDITMODE_NOTHING */
-    "circle",           /* CURSOR_EDITMODE_CONNECT */
-    "X_cursor"          /* CURSOR_EDITMODE_DISCONNECT */
+    "$cursor_runmode_nothing",
+    "$cursor_runmode_clickme",
+    "$cursor_runmode_thicken",
+    "$cursor_runmode_addpoint",
+    "$cursor_editmode_nothing",
+    "$cursor_editmode_connect",
+    "$cursor_editmode_disconnect"
 };
 
 void canvas_setcursor(t_canvas *x, unsigned int cursornum)