OSDN Git Service

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