OSDN Git Service

Fix the bug of X.NodeAnime.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 04_XUI_Event.js
1 \r
2 var XUI_Event = X[ 'UI' ][ 'Event' ] = {\r
3 \r
4         INIT              : ++X_Event_last,\r
5         ADDED             : ++X_Event_last,\r
6         CREATION_COMPLETE : ++X_Event_last,\r
7         REMOVED           : ++X_Event_last,\r
8 \r
9         LAYOUT_BEFORE     : ++X_Event_last,\r
10         LAYOUT_COMPLETE   : ++X_Event_last,\r
11 \r
12         // http://d.hatena.ne.jp/edvakf/20100205/1265338487\r
13         // http://d.hatena.ne.jp/uupaa/20100401/1270097629\r
14         VIEW_IN           : ++X_Event_last, // 要素が視界に入った\r
15         VIEW_OUT          : ++X_Event_last,\r
16         \r
17         POINTER_OUT       : ++X_Event_last,\r
18         POINTER_IN        : ++X_Event_last,\r
19         \r
20         // FOCUS\r
21         // DISABLED\r
22         // ENABLED\r
23         // BASE_FONT_SIZE_CHANGE\r
24         \r
25 /* -- Pointing Device Event -- */\r
26         _START_POINTER    : X_Event_last + 0.5,\r
27         \r
28         CONTEXT_MENU      : ++X_Event_last, // rightclick or longtouch or menukey or ctrl + click\r
29         \r
30 /* -- ここよりあとはノード上をバブルアップ    -- */\r
31         _START_BUBLEUP    : X_Event_last + 0.5,         \r
32 \r
33         // raw pointing device event\r
34         _POINTER_DOWN     : ++X_Event_last,\r
35         _POINTER_MOVE     : ++X_Event_last,     \r
36         _POINTER_UP       : ++X_Event_last,\r
37         _POINTER_CANCEL   : ++X_Event_last,\r
38         \r
39         FILE_DRAG         : ++X_Event_last,\r
40         FILE_DRAG_START   : ++X_Event_last,\r
41         FILE_DRAG_END     : ++X_Event_last,\r
42         FILE_HOLD         : ++X_Event_last,\r
43         FILE_HOLD_END     : ++X_Event_last,\r
44         FILE_DROP_BEFORE  : ++X_Event_last,\r
45         FILE_DROP         : ++X_Event_last,\r
46         FILE_DROP_CANCEL  : ++X_Event_last,\r
47 \r
48 /* -- ここより後は X.UI 用のイベント -- */\r
49         _START_XUI_EVENT  : X_Event_last + 0.5,\r
50 \r
51 /* -- Mouse & Floating touch(Xperia sola)?? -- */\r
52         HOVER_MOVE        : ++X_Event_last,\r
53         HOVER_STAY        : ++X_Event_last,\r
54         HOVER_STAY_END    : ++X_Event_last,\r
55         WHEEL             : ++X_Event_last,\r
56 \r
57 /* -- Gesuture Event -- */\r
58         HOLD              : ++X_Event_last,\r
59         HOLD_END          : ++X_Event_last,\r
60         TAP               : ++X_Event_last,\r
61         DOUBLE_TAP        : ++X_Event_last,\r
62         DRAG              : ++X_Event_last,\r
63         DRAG_START        : ++X_Event_last,\r
64         DRAG_END          : ++X_Event_last,\r
65         DRAG_UP           : ++X_Event_last,\r
66         DRAG_RIGHT        : ++X_Event_last,\r
67         DRAG_LEFT         : ++X_Event_last,\r
68         DRAG_DOWN         : ++X_Event_last,\r
69         SWIP              : ++X_Event_last,\r
70         SWIP_UP           : ++X_Event_last,\r
71         SWIP_RIGHT        : ++X_Event_last,\r
72         SWIP_LEFT         : ++X_Event_last,             \r
73         SWIP_DOWN         : ++X_Event_last,\r
74         TRANSFORM         : ++X_Event_last,\r
75         TRANSFORM_START   : ++X_Event_last,\r
76         TRANSFORM_END     : ++X_Event_last,\r
77         PINCH             : ++X_Event_last,\r
78         PINCH_IN          : ++X_Event_last,\r
79         PINCH_OUT         : ++X_Event_last,\r
80         ROTATE            : ++X_Event_last,\r
81         \r
82         _END_XUI_EVENT    : X_Event_last + 0.5,\r
83         \r
84         _END_POINTER      : X_Event_last + 0.5,\r
85 /* -- Pointing Device Event -- */\r
86         \r
87         KEY_DOWN          : ++X_Event_last,\r
88         KEY_UP            : ++X_Event_last,\r
89         KEY_HOLD          : ++X_Event_last,\r
90         KEY_CANCEL        : ++X_Event_last,\r
91         \r
92         SCROLL_BEFORE_START : ++X_Event_last, // cancelable\r
93         SCROLL_START        : ++X_Event_last,\r
94         SCROLL_BEFORE_MOVE  : ++X_Event_last,\r
95         SCROLL_MOVE         : ++X_Event_last,\r
96         SCROLL_END          : ++X_Event_last,\r
97         SCROLL_REFRESH      : ++X_Event_last,\r
98 \r
99         ANIME_BEFORE_START  : ++X_Event_last,\r
100         ANIME_START         : ++X_Event_last,\r
101         ANIME               : ++X_Event_last,\r
102         ANIME_END           : ++X_Event_last,\r
103         ANIME_BEFORE_STOP   : ++X_Event_last, // before cancel\r
104         ANIME_STOP          : ++X_Event_last,\r
105 \r
106         PAGE_SHOW_BEFORE    : ++X_Event_last,\r
107         PAGE_SHOW           : ++X_Event_last,\r
108         PAGE_SHOW_AFTER     : ++X_Event_last,\r
109         PAGE_HIDE_BEFORE    : ++X_Event_last,\r
110         PAGE_HIDE           : ++X_Event_last,\r
111         PAGE_HIDE_AFTER     : ++X_Event_last,\r
112 \r
113         // X.UI.Form\r
114         CHANGE              : ++X_Event_last,\r
115         SUBMIT              : ++X_Event_last,\r
116         SELECT              : ++X_Event_last, // click or tap or enterkey\r
117         \r
118         ITEMDATA_CHANGED    : ++X_Event_last,\r
119         \r
120         IdToName : {},\r
121         NameToID : {}\r
122 };\r
123 \r
124         XUI_Event.IdToName[ XUI_Event._POINTER_DOWN   ] = 'pointerdown';\r
125         XUI_Event.IdToName[ XUI_Event._POINTER_UP     ] = 'pointerup';\r
126         XUI_Event.IdToName[ XUI_Event._POINTER_MOVE   ] = 'pointermove';\r
127         XUI_Event.IdToName[ XUI_Event._POINTER_CANCEL ] = 'pointercancel';\r
128 \r
129 \r
130 \r
131 ( function( IdToName, NameToID, p ){\r
132         for( p in IdToName ){\r
133                 // if( X_EMPTY_OBJECT[ p ] ) continue;\r
134                 NameToID[ IdToName[ p ] ] = parseFloat( p );\r
135         };\r
136 })( XUI_Event.IdToName, XUI_Event.NameToID );\r
137 \r