1. Stewart Mackenzie
  2. cappuccino-docs

Source

cappuccino-docs / cappuccino docs / cappuccino.org / learn / documentation / _c_p_event_8j_source.html

  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
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!-- Mirrored from cappuccino.org/learn/documentation/_c_p_event_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:30 GMT -->
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Cappuccino API: AppKit/CPEvent.j Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>AppKit/CPEvent.j</h1><a href="_c_p_event_8j.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * CPEvent.j</span>
<a name="l00003"></a>00003 <span class="comment"> * AppKit</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Created by Francisco Tolmasky.</span>
<a name="l00006"></a>00006 <span class="comment"> * Copyright 2008, 280 North, Inc.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00016"></a>00016 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00019"></a>00019 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 @<span class="keyword">import</span> &lt;Foundation/<a class="code" href="class_c_p_object.html" title="The root class from which most classes are subclassed.">CPObject</a>.j&gt;
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="_c_g_geometry_8h.html">CoreGraphics/CGGeometry.h</a>&quot;</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 
<a name="l00028"></a><a class="code" href="_c_p_event_8j.html#a1e3613de4780ff7b45bace27a1521899">00028</a> <a class="code" href="_c_p_event_8j.html#a1e3613de4780ff7b45bace27a1521899">CPLeftMouseDown</a>                         = 1;
<a name="l00029"></a><a class="code" href="_c_p_event_8j.html#a192f15362855840eb6cfb4177a6494ef">00029</a> <a class="code" href="_c_p_event_8j.html#a192f15362855840eb6cfb4177a6494ef">CPLeftMouseUp</a>                           = 2;
<a name="l00030"></a><a class="code" href="_c_p_event_8j.html#af7881703a39edf5c57b0e51ed6123d49">00030</a> <a class="code" href="_c_p_event_8j.html#af7881703a39edf5c57b0e51ed6123d49">CPRightMouseDown</a>                        = 3;
<a name="l00031"></a><a class="code" href="_c_p_event_8j.html#ad01d8900a24d2f095d84e3e08d36c937">00031</a> <a class="code" href="_c_p_event_8j.html#ad01d8900a24d2f095d84e3e08d36c937">CPRightMouseUp</a>                          = 4;
<a name="l00032"></a><a class="code" href="_c_p_event_8j.html#a5bdb3919044bdb124c16292b9e50f615">00032</a> <a class="code" href="_c_p_event_8j.html#a5bdb3919044bdb124c16292b9e50f615">CPMouseMoved</a>                            = 5;
<a name="l00033"></a><a class="code" href="_c_p_event_8j.html#a391b5492a8cbdfa1b84b349eb2120c4e">00033</a> <a class="code" href="_c_p_event_8j.html#a391b5492a8cbdfa1b84b349eb2120c4e">CPLeftMouseDragged</a>                      = 6;
<a name="l00034"></a><a class="code" href="_c_p_event_8j.html#a1fadebaac82052428820fc0da9eceaa5">00034</a> <a class="code" href="_c_p_event_8j.html#a1fadebaac82052428820fc0da9eceaa5">CPRightMouseDragged</a>                     = 7;
<a name="l00035"></a><a class="code" href="_c_p_event_8j.html#a2b3334bed4389088e8b053d0e89c23a0">00035</a> <a class="code" href="_c_p_event_8j.html#a2b3334bed4389088e8b053d0e89c23a0">CPMouseEntered</a>                          = 8;
<a name="l00036"></a><a class="code" href="_c_p_event_8j.html#af59e7a93fe0e2195300038f044a54353">00036</a> <a class="code" href="_c_p_event_8j.html#af59e7a93fe0e2195300038f044a54353">CPMouseExited</a>                           = 9;
<a name="l00037"></a><a class="code" href="_c_p_event_8j.html#a44b7200967c244a014e1ee34ad02ecd9">00037</a> <a class="code" href="_c_p_event_8j.html#a44b7200967c244a014e1ee34ad02ecd9">CPKeyDown</a>                               = 10;
<a name="l00038"></a><a class="code" href="_c_p_event_8j.html#a2d5100bbd68b5192c640acc7c6b48764">00038</a> <a class="code" href="_c_p_event_8j.html#a2d5100bbd68b5192c640acc7c6b48764">CPKeyUp</a>                                 = 11;
<a name="l00039"></a><a class="code" href="_c_p_event_8j.html#ac6794e5b1e2c5481d31aaf8923f417c9">00039</a> <a class="code" href="_c_p_event_8j.html#ac6794e5b1e2c5481d31aaf8923f417c9">CPFlagsChanged</a>                          = 12;
<a name="l00040"></a><a class="code" href="_c_p_event_8j.html#aff78edb5689e1369986ff9424c958679">00040</a> <a class="code" href="_c_p_event_8j.html#aff78edb5689e1369986ff9424c958679">CPAppKitDefined</a>                         = 13;
<a name="l00041"></a><a class="code" href="_c_p_event_8j.html#a919bac60cf59a51c5b673545e63e412e">00041</a> <a class="code" href="_c_p_event_8j.html#a919bac60cf59a51c5b673545e63e412e">CPSystemDefined</a>                         = 14;
<a name="l00042"></a><a class="code" href="_c_p_event_8j.html#a2c77857a83b8fc913ecbbaea89bab8f1">00042</a> <a class="code" href="_c_p_event_8j.html#a2c77857a83b8fc913ecbbaea89bab8f1">CPApplicationDefined</a>                    = 15;
<a name="l00043"></a><a class="code" href="_c_p_event_8j.html#a3bf3e66cf7ddeaf022485cf863732ea1">00043</a> <a class="code" href="_c_p_event_8j.html#a3bf3e66cf7ddeaf022485cf863732ea1">CPPeriodic</a>                              = 16;
<a name="l00044"></a><a class="code" href="_c_p_event_8j.html#a0aeb3f9230b78e7e80d5ed1b5a1b9346">00044</a> <a class="code" href="_c_p_event_8j.html#a0aeb3f9230b78e7e80d5ed1b5a1b9346">CPCursorUpdate</a>                          = 17; 
<a name="l00045"></a><a class="code" href="_c_p_event_8j.html#a27aba2fa2e11afafa2725dd5a177b35e">00045</a> <a class="code" href="_c_p_event_8j.html#a27aba2fa2e11afafa2725dd5a177b35e">CPScrollWheel</a>                           = 22;
<a name="l00046"></a><a class="code" href="_c_p_event_8j.html#a00cb062980025dc9e3d8a729949d9db3">00046</a> <a class="code" href="_c_p_event_8j.html#a00cb062980025dc9e3d8a729949d9db3">CPOtherMouseDown</a>                        = 25;
<a name="l00047"></a><a class="code" href="_c_p_event_8j.html#ae4ed151a51eca21687bcb07d0381b5d0">00047</a> <a class="code" href="_c_p_event_8j.html#ae4ed151a51eca21687bcb07d0381b5d0">CPOtherMouseUp</a>                          = 26;
<a name="l00048"></a><a class="code" href="_c_p_event_8j.html#a0d44df771788ade9a14f850c6b2cfe3f">00048</a> <a class="code" href="_c_p_event_8j.html#a0d44df771788ade9a14f850c6b2cfe3f">CPOtherMouseDragged</a>                     = 27;
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="comment">// iPhone Event Types</span>
<a name="l00051"></a><a class="code" href="_c_p_event_8j.html#ab9664366e33c9edc8a9091242622f983">00051</a> <a class="code" href="_c_p_event_8j.html#ab9664366e33c9edc8a9091242622f983">CPTouchStart</a>                            = 28;
<a name="l00052"></a><a class="code" href="_c_p_event_8j.html#a5b92b4f203f514fc54ad7ebb01e77254">00052</a> <a class="code" href="_c_p_event_8j.html#a5b92b4f203f514fc54ad7ebb01e77254">CPTouchMove</a>                             = 29;
<a name="l00053"></a><a class="code" href="_c_p_event_8j.html#a71c199e5025804a94f69ea8eb027f95f">00053</a> <a class="code" href="_c_p_event_8j.html#a71c199e5025804a94f69ea8eb027f95f">CPTouchEnd</a>                              = 30;
<a name="l00054"></a><a class="code" href="_c_p_event_8j.html#a6fab9a9c66c584e719067626f02b659a">00054</a> <a class="code" href="_c_p_event_8j.html#a6fab9a9c66c584e719067626f02b659a">CPTouchCancel</a>                           = 31;
<a name="l00055"></a>00055                                         
<a name="l00056"></a>00056                                         
<a name="l00057"></a><a class="code" href="_c_p_event_8j.html#a81840c1dba61e3f3f6bc76308e72c078">00057</a> <a class="code" href="_c_p_event_8j.html#a81840c1dba61e3f3f6bc76308e72c078">CPAlphaShiftKeyMask</a>                     = 1 &lt;&lt; 16;
<a name="l00058"></a><a class="code" href="_c_p_event_8j.html#a2343191b34b38dc1952bb44d83fa30d6">00058</a> <a class="code" href="_c_p_event_8j.html#a2343191b34b38dc1952bb44d83fa30d6">CPShiftKeyMask</a>                          = 1 &lt;&lt; 17;
<a name="l00059"></a><a class="code" href="_c_p_event_8j.html#a144f394b3de6afb9b329491dba0e8d14">00059</a> <a class="code" href="_c_p_event_8j.html#a144f394b3de6afb9b329491dba0e8d14">CPControlKeyMask</a>                        = 1 &lt;&lt; 18;
<a name="l00060"></a><a class="code" href="_c_p_event_8j.html#abb24a409c7daa575dd1fa20b7fcf8d51">00060</a> <a class="code" href="_c_p_event_8j.html#abb24a409c7daa575dd1fa20b7fcf8d51">CPAlternateKeyMask</a>                      = 1 &lt;&lt; 19;
<a name="l00061"></a><a class="code" href="_c_p_event_8j.html#a675a3ab6cfc14dd4ad6702d7c682c7fe">00061</a> <a class="code" href="_c_p_event_8j.html#a675a3ab6cfc14dd4ad6702d7c682c7fe">CPCommandKeyMask</a>                        = 1 &lt;&lt; 20;
<a name="l00062"></a><a class="code" href="_c_p_event_8j.html#a2b1b2bb298094cfca40447cc3fa50b51">00062</a> <a class="code" href="_c_p_event_8j.html#a2b1b2bb298094cfca40447cc3fa50b51">CPNumericPadKeyMask</a>                     = 1 &lt;&lt; 21;
<a name="l00063"></a><a class="code" href="_c_p_event_8j.html#a8fb553cb47b97ab54fafdc7af498f501">00063</a> <a class="code" href="_c_p_event_8j.html#a8fb553cb47b97ab54fafdc7af498f501">CPHelpKeyMask</a>                           = 1 &lt;&lt; 22;
<a name="l00064"></a><a class="code" href="_c_p_event_8j.html#a2dee4e467d8f7eaf21b5ccf940d038b4">00064</a> <a class="code" href="_c_p_event_8j.html#a2dee4e467d8f7eaf21b5ccf940d038b4">CPFunctionKeyMask</a>                       = 1 &lt;&lt; 23;
<a name="l00065"></a><a class="code" href="_c_p_event_8j.html#a3ae7391db148b727dfb38be16d609345">00065</a> <a class="code" href="_c_p_event_8j.html#a3ae7391db148b727dfb38be16d609345">CPDeviceIndependentModifierFlagsMask</a>    = 0xffff0000;
<a name="l00066"></a>00066 
<a name="l00067"></a><a class="code" href="_c_p_event_8j.html#abbcf0983947a8ba59bd306c798391db2">00067</a> <a class="code" href="_c_p_event_8j.html#abbcf0983947a8ba59bd306c798391db2">CPLeftMouseDownMask</a>                     = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a1e3613de4780ff7b45bace27a1521899">CPLeftMouseDown</a>;
<a name="l00068"></a><a class="code" href="_c_p_event_8j.html#aacc950eaccf76272f410f5a1251821c8">00068</a> <a class="code" href="_c_p_event_8j.html#aacc950eaccf76272f410f5a1251821c8">CPLeftMouseUpMask</a>                       = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a192f15362855840eb6cfb4177a6494ef">CPLeftMouseUp</a>;
<a name="l00069"></a><a class="code" href="_c_p_event_8j.html#ae026d63ae96d7ad4f12708c886a0e7f5">00069</a> <a class="code" href="_c_p_event_8j.html#ae026d63ae96d7ad4f12708c886a0e7f5">CPRightMouseDownMask</a>                    = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#af7881703a39edf5c57b0e51ed6123d49">CPRightMouseDown</a>;
<a name="l00070"></a><a class="code" href="_c_p_event_8j.html#a3e7028b19a788166bb0be183c9fc5567">00070</a> <a class="code" href="_c_p_event_8j.html#a3e7028b19a788166bb0be183c9fc5567">CPRightMouseUpMask</a>                      = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#ad01d8900a24d2f095d84e3e08d36c937">CPRightMouseUp</a>;
<a name="l00071"></a><a class="code" href="_c_p_event_8j.html#ae67e74fcea0f0933d270ee5adde18b5b">00071</a> <a class="code" href="_c_p_event_8j.html#ae67e74fcea0f0933d270ee5adde18b5b">CPOtherMouseDownMask</a>                    = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a00cb062980025dc9e3d8a729949d9db3">CPOtherMouseDown</a>;
<a name="l00072"></a><a class="code" href="_c_p_event_8j.html#a808421a1832b28ca8a2e0a91a0fcb3da">00072</a> <a class="code" href="_c_p_event_8j.html#a808421a1832b28ca8a2e0a91a0fcb3da">CPOtherMouseUpMask</a>                      = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#ae4ed151a51eca21687bcb07d0381b5d0">CPOtherMouseUp</a>;
<a name="l00073"></a><a class="code" href="_c_p_event_8j.html#a35e20e21603ceb69e14d476dc59d0c5e">00073</a> <a class="code" href="_c_p_event_8j.html#a35e20e21603ceb69e14d476dc59d0c5e">CPMouseMovedMask</a>                        = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a5bdb3919044bdb124c16292b9e50f615">CPMouseMoved</a>;
<a name="l00074"></a><a class="code" href="_c_p_event_8j.html#a24147616add72497d59c51610bc2db08">00074</a> <a class="code" href="_c_p_event_8j.html#a24147616add72497d59c51610bc2db08">CPLeftMouseDraggedMask</a>                  = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a391b5492a8cbdfa1b84b349eb2120c4e">CPLeftMouseDragged</a>;
<a name="l00075"></a><a class="code" href="_c_p_event_8j.html#a11a88d5d9c56145c7fe70dee6344a9a2">00075</a> <a class="code" href="_c_p_event_8j.html#a11a88d5d9c56145c7fe70dee6344a9a2">CPRightMouseDraggedMask</a>                 = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a1fadebaac82052428820fc0da9eceaa5">CPRightMouseDragged</a>;
<a name="l00076"></a>00076 <a class="code" href="_c_p_event_8j.html#a0d44df771788ade9a14f850c6b2cfe3f">CPOtherMouseDragged</a>                     = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a0d44df771788ade9a14f850c6b2cfe3f">CPOtherMouseDragged</a>;
<a name="l00077"></a><a class="code" href="_c_p_event_8j.html#a90c61c4b8d24070231b01eaeb9233c4b">00077</a> <a class="code" href="_c_p_event_8j.html#a90c61c4b8d24070231b01eaeb9233c4b">CPMouseEnteredMask</a>                      = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a2b3334bed4389088e8b053d0e89c23a0">CPMouseEntered</a>;
<a name="l00078"></a><a class="code" href="_c_p_event_8j.html#a2420e7506fe5435b42f1f50a27aaf0cc">00078</a> <a class="code" href="_c_p_event_8j.html#a2420e7506fe5435b42f1f50a27aaf0cc">CPMouseExitedMask</a>                       = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#af59e7a93fe0e2195300038f044a54353">CPMouseExited</a>;
<a name="l00079"></a><a class="code" href="_c_p_event_8j.html#aec9054e68676287a016a202d58a200fe">00079</a> <a class="code" href="_c_p_event_8j.html#aec9054e68676287a016a202d58a200fe">CPCursorUpdateMask</a>                      = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a0aeb3f9230b78e7e80d5ed1b5a1b9346">CPCursorUpdate</a>;
<a name="l00080"></a><a class="code" href="_c_p_event_8j.html#a0cb2d4bf26a5dcd356dbf102a37f316b">00080</a> <a class="code" href="_c_p_event_8j.html#a0cb2d4bf26a5dcd356dbf102a37f316b">CPKeyDownMask</a>                           = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a44b7200967c244a014e1ee34ad02ecd9">CPKeyDown</a>;
<a name="l00081"></a><a class="code" href="_c_p_event_8j.html#a00e117370b1d4dd6662eb83c4246e61a">00081</a> <a class="code" href="_c_p_event_8j.html#a00e117370b1d4dd6662eb83c4246e61a">CPKeyUpMask</a>                             = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a2d5100bbd68b5192c640acc7c6b48764">CPKeyUp</a>;
<a name="l00082"></a><a class="code" href="_c_p_event_8j.html#a21cf30f0c4aed01a296ff84ce7ef95f9">00082</a> <a class="code" href="_c_p_event_8j.html#a21cf30f0c4aed01a296ff84ce7ef95f9">CPFlagsChangedMask</a>                      = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#ac6794e5b1e2c5481d31aaf8923f417c9">CPFlagsChanged</a>;
<a name="l00083"></a><a class="code" href="_c_p_event_8j.html#a9612b4bfef8dc56ad32afae25497b7a5">00083</a> <a class="code" href="_c_p_event_8j.html#a9612b4bfef8dc56ad32afae25497b7a5">CPAppKitDefinedMask</a>                     = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#aff78edb5689e1369986ff9424c958679">CPAppKitDefined</a>;
<a name="l00084"></a><a class="code" href="_c_p_event_8j.html#ab1dcab7388b0d4a428b336662a6659cf">00084</a> <a class="code" href="_c_p_event_8j.html#ab1dcab7388b0d4a428b336662a6659cf">CPSystemDefinedMask</a>                     = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a919bac60cf59a51c5b673545e63e412e">CPSystemDefined</a>;
<a name="l00085"></a><a class="code" href="_c_p_event_8j.html#a04f3a28a3a63432d2e749c019e5ff710">00085</a> <a class="code" href="_c_p_event_8j.html#a04f3a28a3a63432d2e749c019e5ff710">CPApplicationDefinedMask</a>                = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a2c77857a83b8fc913ecbbaea89bab8f1">CPApplicationDefined</a>;
<a name="l00086"></a><a class="code" href="_c_p_event_8j.html#a0e95f6742ecc60f09a1bec262a440e31">00086</a> <a class="code" href="_c_p_event_8j.html#a0e95f6742ecc60f09a1bec262a440e31">CPPeriodicMask</a>                          = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a3bf3e66cf7ddeaf022485cf863732ea1">CPPeriodic</a>;
<a name="l00087"></a><a class="code" href="_c_p_event_8j.html#aeb0b91b2db1a9c82471b02727a3b79ba">00087</a> <a class="code" href="_c_p_event_8j.html#aeb0b91b2db1a9c82471b02727a3b79ba">CPScrollWheelMask</a>                       = 1 &lt;&lt; <a class="code" href="_c_p_event_8j.html#a27aba2fa2e11afafa2725dd5a177b35e">CPScrollWheel</a>;
<a name="l00088"></a><a class="code" href="_c_p_event_8j.html#a289dab10f0cdb8e6c121ded45858cd59">00088</a> <a class="code" href="_c_p_event_8j.html#a289dab10f0cdb8e6c121ded45858cd59">CPAnyEventMask</a>                          = 0xffffffff;
<a name="l00089"></a>00089 
<a name="l00090"></a><a class="code" href="_c_p_event_8j.html#a516116c97ab5b099b028af28163579eb">00090</a> <a class="code" href="_c_p_event_8j.html#a516116c97ab5b099b028af28163579eb">CPDOMEventDoubleClick</a>                   = <span class="stringliteral">&quot;dblclick&quot;</span>,
<a name="l00091"></a><a class="code" href="_c_p_event_8j.html#af82102afe20931d2fc0992ac99b7ccc6">00091</a> <a class="code" href="_c_p_event_8j.html#af82102afe20931d2fc0992ac99b7ccc6">CPDOMEventMouseDown</a>                     = <span class="stringliteral">&quot;mousedown&quot;</span>,
<a name="l00092"></a><a class="code" href="_c_p_event_8j.html#aebbdac20792601bec74684dc4b88bd7a">00092</a> <a class="code" href="_c_p_event_8j.html#aebbdac20792601bec74684dc4b88bd7a">CPDOMEventMouseUp</a>                       = <span class="stringliteral">&quot;mouseup&quot;</span>,
<a name="l00093"></a><a class="code" href="_c_p_event_8j.html#af9e09708dccb782a48f41a45fb1b38e8">00093</a> <a class="code" href="_c_p_event_8j.html#af9e09708dccb782a48f41a45fb1b38e8">CPDOMEventMouseMoved</a>                    = <span class="stringliteral">&quot;mousemove&quot;</span>,
<a name="l00094"></a><a class="code" href="_c_p_event_8j.html#a6795eb10287576ffa3e28781cb457d61">00094</a> <a class="code" href="_c_p_event_8j.html#a6795eb10287576ffa3e28781cb457d61">CPDOMEventMouseDragged</a>                  = <span class="stringliteral">&quot;mousedrag&quot;</span>,
<a name="l00095"></a><a class="code" href="_c_p_event_8j.html#a52c32e71bcdc2f566cbe0f88daa05858">00095</a> <a class="code" href="_c_p_event_8j.html#a52c32e71bcdc2f566cbe0f88daa05858">CPDOMEventKeyUp</a>                         = <span class="stringliteral">&quot;keyup&quot;</span>,
<a name="l00096"></a><a class="code" href="_c_p_event_8j.html#a135c633e8d07fc61d1422eff85f84bcc">00096</a> <a class="code" href="_c_p_event_8j.html#a135c633e8d07fc61d1422eff85f84bcc">CPDOMEventKeyDown</a>                       = <span class="stringliteral">&quot;keydown&quot;</span>,
<a name="l00097"></a><a class="code" href="_c_p_event_8j.html#aef64615b58085ae9cf23c98a1b45d125">00097</a> <a class="code" href="_c_p_event_8j.html#aef64615b58085ae9cf23c98a1b45d125">CPDOMEventKeyPress</a>                      = <span class="stringliteral">&quot;keypress&quot;</span>;
<a name="l00098"></a><a class="code" href="_c_p_event_8j.html#a8754411d8a32700f27b0e94187c68fa4">00098</a> <a class="code" href="_c_p_event_8j.html#a8754411d8a32700f27b0e94187c68fa4">CPDOMEventCopy</a>                          = <span class="stringliteral">&quot;copy&quot;</span>;
<a name="l00099"></a><a class="code" href="_c_p_event_8j.html#aae07127ddee79c0dc3d1e5db5f756338">00099</a> <a class="code" href="_c_p_event_8j.html#aae07127ddee79c0dc3d1e5db5f756338">CPDOMEventPaste</a>                         = <span class="stringliteral">&quot;paste&quot;</span>;
<a name="l00100"></a><a class="code" href="_c_p_event_8j.html#a5a23aee4ae9daf3894fd8a1c4be5c917">00100</a> <a class="code" href="_c_p_event_8j.html#a5a23aee4ae9daf3894fd8a1c4be5c917">CPDOMEventScrollWheel</a>                   = <span class="stringliteral">&quot;mousewheel&quot;</span>;
<a name="l00101"></a><a class="code" href="_c_p_event_8j.html#a2376d441a1ce1d7e00f48ce5942ff238">00101</a> <a class="code" href="_c_p_event_8j.html#a2376d441a1ce1d7e00f48ce5942ff238">CPDOMEventTouchStart</a>                    = <span class="stringliteral">&quot;touchstart&quot;</span>;
<a name="l00102"></a><a class="code" href="_c_p_event_8j.html#a73afe5e545d69dd6422f6678f855430d">00102</a> <a class="code" href="_c_p_event_8j.html#a73afe5e545d69dd6422f6678f855430d">CPDOMEventTouchMove</a>                     = <span class="stringliteral">&quot;touchmove&quot;</span>;
<a name="l00103"></a><a class="code" href="_c_p_event_8j.html#a479c7c40b4534654fc9eefaccde2bc6c">00103</a> <a class="code" href="_c_p_event_8j.html#a479c7c40b4534654fc9eefaccde2bc6c">CPDOMEventTouchEnd</a>                      = <span class="stringliteral">&quot;touchend&quot;</span>;
<a name="l00104"></a><a class="code" href="_c_p_event_8j.html#a2bfff8f958ce3b5a3622307bf2fe9764">00104</a> <a class="code" href="_c_p_event_8j.html#a2bfff8f958ce3b5a3622307bf2fe9764">CPDOMEventTouchCancel</a>                   = <span class="stringliteral">&quot;touchcancel&quot;</span>;
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 var _CPEventPeriodicEventPeriod         = 0,
<a name="l00107"></a>00107     _CPEventPeriodicEventTimer          = nil;
<a name="l00108"></a>00108 
<a name="l00114"></a><a class="code" href="class_c_p_event.html">00114</a> <span class="keyword">@implementation </span><a class="code" href="class_c_p_event.html">CPEvent</a> : <a class="code" href="class_c_p_object.html" title="The root class from which most classes are subclassed.">CPObject</a>
<a name="l00115"></a>00115 {
<a name="l00116"></a>00116     CPEventType         _type;
<a name="l00117"></a>00117     CPPoint             _location;
<a name="l00118"></a>00118     <span class="keywordtype">unsigned</span>            _modifierFlags;
<a name="l00119"></a>00119     CPTimeInterval      _timestamp;
<a name="l00120"></a>00120     <a class="code" href="class_c_p_graphics_context.html">CPGraphicsContext</a>   _context;
<a name="l00121"></a>00121     <span class="keywordtype">int</span>                 _eventNumber;
<a name="l00122"></a>00122     <span class="keywordtype">unsigned</span>            _clickCount;
<a name="l00123"></a>00123     <span class="keywordtype">float</span>               _pressure;
<a name="l00124"></a>00124     <a class="code" href="class_c_p_window.html">CPWindow</a>            _window;
<a name="l00125"></a>00125     Number              _windowNumber;
<a name="l00126"></a>00126     <a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>            _characters;
<a name="l00127"></a>00127     <a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>            _charactersIgnoringModifiers
<a name="l00128"></a>00128     BOOL                _isARepeat;
<a name="l00129"></a>00129     <span class="keywordtype">unsigned</span>            _keyCode;
<a name="l00130"></a>00130     DOMEvent            _DOMEvent;
<a name="l00131"></a>00131     
<a name="l00132"></a>00132     <span class="keywordtype">float</span>               _deltaX;
<a name="l00133"></a>00133     <span class="keywordtype">float</span>               _deltaY;
<a name="l00134"></a>00134     <span class="keywordtype">float</span>               _deltaZ;
<a name="l00135"></a>00135 }
<a name="l00136"></a>00136 
<a name="l00153"></a><a class="code" href="class_c_p_event.html#aa29c7da6c770bce3df32ab01df5342f8">00153</a> + (<a class="code" href="class_c_p_event.html">CPEvent</a>)keyEventWithType:(CPEventType)anEventType location:(CGPoint)aPoint modifierFlags:(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)modifierFlags
<a name="l00154"></a>00154     timestamp:(CPTimeInterval)aTimestamp windowNumber:(<span class="keywordtype">int</span>)aWindowNumber context:(<a class="code" href="class_c_p_graphics_context.html">CPGraphicsContext</a>)aGraphicsContext
<a name="l00155"></a>00155     characters:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)characters charactersIgnoringModifiers:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)unmodCharacters isARepeat:(BOOL)repeatKey keyCode:(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>)code
<a name="l00156"></a>00156 {
<a name="l00157"></a>00157     <span class="keywordflow">return</span> [[<span class="keyword">self</span> alloc] _initKeyEventWithType:anEventType location:aPoint modifierFlags:modifierFlags
<a name="l00158"></a>00158         timestamp:aTimestamp windowNumber:aWindowNumber context:aGraphicsContext 
<a name="l00159"></a>00159         characters:characters charactersIgnoringModifiers:unmodCharacters isARepeat:repeatKey keyCode:code];
<a name="l00160"></a>00160 }
<a name="l00161"></a>00161 
<a name="l00176"></a><a class="code" href="class_c_p_event.html#ab05997e830d1bb2022f57b2e29f6e878">00176</a> + (id)mouseEventWithType:(CPEventType)anEventType location:(CGPoint)aPoint modifierFlags:(<span class="keywordtype">unsigned</span>)modifierFlags 
<a name="l00177"></a>00177     timestamp:(CPTimeInterval)aTimestamp windowNumber:(<span class="keywordtype">int</span>)aWindowNumber context:(<a class="code" href="class_c_p_graphics_context.html">CPGraphicsContext</a>)aGraphicsContext
<a name="l00178"></a>00178     eventNumber:(<span class="keywordtype">int</span>)anEventNumber clickCount:(<span class="keywordtype">int</span>)aClickCount pressure:(<span class="keywordtype">float</span>)aPressure
<a name="l00179"></a>00179 {
<a name="l00180"></a>00180     <span class="keywordflow">return</span> [[<span class="keyword">self</span> alloc] _initMouseEventWithType:anEventType location:aPoint modifierFlags:modifierFlags
<a name="l00181"></a>00181         timestamp:aTimestamp windowNumber:aWindowNumber context:aGraphicsContext eventNumber:anEventNumber clickCount:aClickCount pressure:aPressure];
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183 
<a name="l00198"></a><a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">00198</a> + (<a class="code" href="class_c_p_event.html">CPEvent</a>)otherEventWithType:(CPEventType)anEventType location:(CGPoint)aLocation modifierFlags:(<span class="keywordtype">unsigned</span>)modifierFlags
<a name="l00199"></a>00199     timestamp:(CPTimeInterval)aTimestamp windowNumber:(<span class="keywordtype">int</span>)aWindowNumber context:(<a class="code" href="class_c_p_graphics_context.html">CPGraphicsContext</a>)aGraphicsContext
<a name="l00200"></a>00200     subtype:(<span class="keywordtype">short</span>)aSubtype data1:(<span class="keywordtype">int</span>)aData1 data2:(<span class="keywordtype">int</span>)aData2
<a name="l00201"></a>00201 {
<a name="l00202"></a>00202     <span class="keywordflow">return</span> [[<span class="keyword">self</span> alloc] _initOtherEventWithType:anEventType location:aLocation modifierFlags:modifierFlags
<a name="l00203"></a>00203         timestamp:aTimestamp windowNumber:aWindowNumber context:aGraphicsContext subtype:aSubtype data1:aData1 data2:aData2];
<a name="l00204"></a>00204 }
<a name="l00205"></a>00205 
<a name="l00206"></a>00206 <span class="comment">/* @ignore */</span>
<a name="l00207"></a>00207 - (id)_initMouseEventWithType:(CPEventType)anEventType location:(CPPoint)aPoint modifierFlags:(<span class="keywordtype">unsigned</span>)modifierFlags 
<a name="l00208"></a>00208     timestamp:(CPTimeInterval)aTimestamp windowNumber:(<span class="keywordtype">int</span>)aWindowNumber context:(<a class="code" href="class_c_p_graphics_context.html">CPGraphicsContext</a>)aGraphicsContext
<a name="l00209"></a>00209     eventNumber:(<span class="keywordtype">int</span>)anEventNumber clickCount:(<span class="keywordtype">int</span>)aClickCount pressure:(<span class="keywordtype">float</span>)aPressure
<a name="l00210"></a>00210 {
<a name="l00211"></a>00211     <span class="keyword">self</span> = [<span class="keyword">super</span> init];
<a name="l00212"></a>00212     
<a name="l00213"></a>00213     <span class="keywordflow">if</span> (<span class="keyword">self</span>)
<a name="l00214"></a>00214     {
<a name="l00215"></a>00215         _type = anEventType;
<a name="l00216"></a>00216         _location = <a class="code" href="group__appkit.html#gad598c0723910b60871b2154ec31e0980">CPPointCreateCopy</a>(aPoint);
<a name="l00217"></a>00217         _modifierFlags = modifierFlags;
<a name="l00218"></a>00218         _timestamp = aTimestamp;
<a name="l00219"></a>00219         _context = aGraphicsContext;
<a name="l00220"></a>00220         _eventNumber = anEventNumber;
<a name="l00221"></a>00221         _clickCount = aClickCount;
<a name="l00222"></a>00222         _pressure = aPressure;
<a name="l00223"></a>00223         _window = [CPApp windowWithWindowNumber:aWindowNumber];
<a name="l00224"></a>00224     }
<a name="l00225"></a>00225     
<a name="l00226"></a>00226     <span class="keywordflow">return</span> <span class="keyword">self</span>;
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228 
<a name="l00229"></a>00229 <span class="comment">/* @ignore */</span>
<a name="l00230"></a>00230 - (id)_initKeyEventWithType:(CPEventType)anEventType location:(CPPoint)aPoint modifierFlags:(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)modifierFlags
<a name="l00231"></a>00231     timestamp:(CPTimeInterval)aTimestamp windowNumber:(<span class="keywordtype">int</span>)aWindowNumber context:(<a class="code" href="class_c_p_graphics_context.html">CPGraphicsContext</a>)aGraphicsContext
<a name="l00232"></a>00232     characters:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)characters charactersIgnoringModifiers:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)unmodCharacters isARepeat:(BOOL)isARepeat keyCode:(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>)code
<a name="l00233"></a>00233 {
<a name="l00234"></a>00234     <span class="keyword">self</span> = [<span class="keyword">super</span> init];
<a name="l00235"></a>00235     
<a name="l00236"></a>00236     <span class="keywordflow">if</span> (<span class="keyword">self</span>)
<a name="l00237"></a>00237     {
<a name="l00238"></a>00238         _type = anEventType;
<a name="l00239"></a>00239         _location = <a class="code" href="group__appkit.html#gad598c0723910b60871b2154ec31e0980">CPPointCreateCopy</a>(aPoint);
<a name="l00240"></a>00240         _modifierFlags = modifierFlags;
<a name="l00241"></a>00241         _timestamp = aTimestamp;
<a name="l00242"></a>00242         _context = aGraphicsContext;
<a name="l00243"></a>00243         _characters = characters;
<a name="l00244"></a>00244         _charactersIgnoringModifiers = unmodCharacters;
<a name="l00245"></a>00245         _isARepeat = isARepeat;
<a name="l00246"></a>00246         _keyCode = code;
<a name="l00247"></a>00247         _windowNumber = aWindowNumber;
<a name="l00248"></a>00248     }
<a name="l00249"></a>00249     
<a name="l00250"></a>00250     <span class="keywordflow">return</span> <span class="keyword">self</span>;
<a name="l00251"></a>00251 }
<a name="l00252"></a>00252 
<a name="l00253"></a>00253 <span class="comment">/* @ignore */</span>
<a name="l00254"></a>00254 - (id)_initOtherEventWithType:(CPEventType)anEventType location:(CGPoint)aPoint modifierFlags:(<span class="keywordtype">unsigned</span>)modifierFlags
<a name="l00255"></a>00255     timestamp:(CPTimeInterval)aTimestamp windowNumber:(<span class="keywordtype">int</span>)aWindowNumber context:(<a class="code" href="class_c_p_graphics_context.html">CPGraphicsContext</a>)aGraphicsContext
<a name="l00256"></a>00256     subtype:(<span class="keywordtype">short</span>)aSubtype data1:(<span class="keywordtype">int</span>)aData1 data2:(<span class="keywordtype">int</span>)aData2
<a name="l00257"></a>00257 {
<a name="l00258"></a>00258     <span class="keyword">self</span> = [<span class="keyword">super</span> init];
<a name="l00259"></a>00259     
<a name="l00260"></a>00260     <span class="keywordflow">if</span> (<span class="keyword">self</span>)
<a name="l00261"></a>00261     {
<a name="l00262"></a>00262         _type = anEventType;
<a name="l00263"></a>00263         _location = <a class="code" href="group__appkit.html#gad598c0723910b60871b2154ec31e0980">CPPointCreateCopy</a>(aPoint);
<a name="l00264"></a>00264         _modifierFlags = modifierFlags;
<a name="l00265"></a>00265         _timestamp = aTimestamp;
<a name="l00266"></a>00266         _context = aGraphicsContext;
<a name="l00267"></a>00267         _subtype = aSubtype;
<a name="l00268"></a>00268         _data1 = aData1;
<a name="l00269"></a>00269         _data2 = aData2;
<a name="l00270"></a>00270     }   
<a name="l00271"></a>00271 
<a name="l00272"></a>00272     <span class="keywordflow">return</span> <span class="keyword">self</span>;
<a name="l00273"></a>00273 }
<a name="l00274"></a>00274 
<a name="l00283"></a><a class="code" href="class_c_p_event.html#a5a57f4fa909de5d83e5402a8d8af4b94">00283</a> - (CGPoint)locationInWindow
<a name="l00284"></a>00284 {
<a name="l00285"></a>00285     <span class="keywordflow">return</span> _CGPointMakeCopy(_location);
<a name="l00286"></a>00286 }
<a name="l00287"></a>00287 
<a name="l00288"></a><a class="code" href="class_c_p_event.html#ad464fd6df3bf20110075dc81ce662a44">00288</a> - (CGPoint)globalLocation
<a name="l00289"></a>00289 {
<a name="l00290"></a>00290     var theWindow = [<span class="keyword">self</span> <a class="code" href="class_c_p_event.html#af9a0e45bbaba9bc6587a222e74bf0703">window</a>],
<a name="l00291"></a>00291         location = [<span class="keyword">self</span> <a class="code" href="class_c_p_event.html#a5a57f4fa909de5d83e5402a8d8af4b94">locationInWindow</a>];
<a name="l00292"></a>00292 
<a name="l00293"></a>00293     <span class="keywordflow">if</span> (theWindow)
<a name="l00294"></a>00294         <span class="keywordflow">return</span> [theWindow convertBaseToGlobal:location];
<a name="l00295"></a>00295 
<a name="l00296"></a>00296     <span class="keywordflow">return</span> location;
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298 
<a name="l00302"></a><a class="code" href="class_c_p_event.html#ae1990580a2f73b19009f30f27ff1e396">00302</a> - (unsigned)modifierFlags
<a name="l00303"></a>00303 {
<a name="l00304"></a>00304     <span class="keywordflow">return</span> _modifierFlags;
<a name="l00305"></a>00305 }
<a name="l00306"></a>00306 
<a name="l00310"></a><a class="code" href="class_c_p_event.html#ab290762686ceda8bb462e0e989f62e04">00310</a> - (CPTimeInterval)timestamp
<a name="l00311"></a>00311 {
<a name="l00312"></a>00312     <span class="keywordflow">return</span> _timestamp;
<a name="l00313"></a>00313 }
<a name="l00314"></a>00314 
<a name="l00318"></a><a class="code" href="class_c_p_event.html#abbbd5ff6550996fa3ef524ef27a1ef80">00318</a> - (CPEventType)type
<a name="l00319"></a>00319 {
<a name="l00320"></a>00320     <span class="keywordflow">return</span> _type;
<a name="l00321"></a>00321 }
<a name="l00322"></a>00322 
<a name="l00326"></a><a class="code" href="class_c_p_event.html#af9a0e45bbaba9bc6587a222e74bf0703">00326</a> - (<a class="code" href="class_c_p_window.html">CPWindow</a>)window
<a name="l00327"></a>00327 {
<a name="l00328"></a>00328     <span class="keywordflow">if</span> (!_window)
<a name="l00329"></a>00329         _window = [CPApp windowWithWindowNumber:_windowNumber];
<a name="l00330"></a>00330 
<a name="l00331"></a>00331     <span class="keywordflow">return</span> _window;
<a name="l00332"></a>00332 }
<a name="l00333"></a>00333 
<a name="l00337"></a><a class="code" href="class_c_p_event.html#a15734c6e53f37894f69326ac46ec3600">00337</a> - (int)windowNumber
<a name="l00338"></a>00338 {
<a name="l00339"></a>00339     <span class="keywordflow">return</span> _windowNumber;
<a name="l00340"></a>00340 }
<a name="l00341"></a>00341 
<a name="l00342"></a>00342 <span class="comment">// Mouse Event Information</span>
<a name="l00346"></a><a class="code" href="class_c_p_event.html#a95f060acf8268fe7f3a16c42ea121466">00346</a> <span class="comment"></span>- (int)buttonNumber
<a name="l00347"></a>00347 {
<a name="l00348"></a>00348     <span class="keywordflow">return</span> _buttonNumber;
<a name="l00349"></a>00349 }
<a name="l00350"></a>00350 
<a name="l00354"></a><a class="code" href="class_c_p_event.html#a21ba312feb01ac26df9cab0eae85cdcc">00354</a> - (int)clickCount
<a name="l00355"></a>00355 {
<a name="l00356"></a>00356     <span class="keywordflow">return</span> _clickCount;
<a name="l00357"></a>00357 }
<a name="l00358"></a>00358 
<a name="l00363"></a><a class="code" href="class_c_p_event.html#a1bf8cbf0c017151070a99236c957fc94">00363</a> - (<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)characters
<a name="l00364"></a>00364 {
<a name="l00365"></a>00365     <span class="keywordflow">return</span> _characters;
<a name="l00366"></a>00366 }
<a name="l00367"></a>00367 
<a name="l00372"></a><a class="code" href="class_c_p_event.html#aa1b99c685842a415f6736d776c8aba90">00372</a> - (<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)charactersIgnoringModifiers
<a name="l00373"></a>00373 {
<a name="l00374"></a>00374     <span class="keywordflow">return</span> _charactersIgnoringModifiers;
<a name="l00375"></a>00375 }
<a name="l00376"></a>00376 
<a name="l00381"></a><a class="code" href="class_c_p_event.html#a0d6e1d0c4afa0c4231bedcdd9401ba87">00381</a> - (BOOL)isARepeat
<a name="l00382"></a>00382 {
<a name="l00383"></a>00383     <span class="keywordflow">return</span> _isARepeat;
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385 
<a name="l00390"></a><a class="code" href="class_c_p_event.html#a5ecd01fadd6c4bc25a8508dc4bb7cca7">00390</a> - (<span class="keywordtype">unsigned</span> short)keyCode
<a name="l00391"></a>00391 {
<a name="l00392"></a>00392     <span class="keywordflow">return</span> _keyCode;
<a name="l00393"></a>00393 }
<a name="l00394"></a>00394 
<a name="l00395"></a><a class="code" href="class_c_p_event.html#a91d4b5abd148e3976056714f6cf658fc">00395</a> + (CGPoint)mouseLocation
<a name="l00396"></a>00396 {
<a name="l00397"></a>00397     <span class="comment">// FIXME: this is incorrect, we shouldn&apos;t depend on the current event.</span>
<a name="l00398"></a>00398     var <span class="keyword">event</span> = [CPApp currentEvent],
<a name="l00399"></a>00399         eventWindow = [event window];
<a name="l00400"></a>00400 
<a name="l00401"></a>00401     <span class="keywordflow">if</span> (eventWindow)
<a name="l00402"></a>00402         <span class="keywordflow">return</span> [eventWindow convertBaseToGlobal:[event locationInWindow]];
<a name="l00403"></a>00403 
<a name="l00404"></a>00404     <span class="keywordflow">return</span> [event locationInWindow];
<a name="l00405"></a>00405 }
<a name="l00406"></a>00406 
<a name="l00407"></a><a class="code" href="class_c_p_event.html#acac4af271cc9cbeb999d0c148767fc99">00407</a> - (float)pressure
<a name="l00408"></a>00408 {
<a name="l00409"></a>00409     <span class="keywordflow">return</span> _pressure;
<a name="l00410"></a>00410 }
<a name="l00411"></a>00411 
<a name="l00412"></a>00412 <span class="comment">/*</span>
<a name="l00413"></a>00413 <span class="comment">    @ignore</span>
<a name="l00414"></a>00414 <span class="comment">*/</span>
<a name="l00415"></a>00415 - (DOMEvent)_DOMEvent
<a name="l00416"></a>00416 {
<a name="l00417"></a>00417     <span class="keywordflow">return</span> _DOMEvent;
<a name="l00418"></a>00418 }
<a name="l00419"></a>00419 
<a name="l00420"></a>00420 <span class="comment">// Getting Scroll Wheel Event Infomration</span>
<a name="l00424"></a><a class="code" href="class_c_p_event.html#a8bcf33e092b83a9bf10fc2aabae6c249">00424</a> <span class="comment"></span>- (float)deltaX
<a name="l00425"></a>00425 {
<a name="l00426"></a>00426     <span class="keywordflow">return</span> _deltaX;
<a name="l00427"></a>00427 }
<a name="l00428"></a>00428 
<a name="l00432"></a><a class="code" href="class_c_p_event.html#a1804678959cc324a1af7386b71720cf2">00432</a> - (float)deltaY
<a name="l00433"></a>00433 {
<a name="l00434"></a>00434     <span class="keywordflow">return</span> _deltaY;
<a name="l00435"></a>00435 }
<a name="l00436"></a>00436 
<a name="l00440"></a><a class="code" href="class_c_p_event.html#adb216a38817ab6a03fc50276fb7abad9">00440</a> - (float)deltaZ
<a name="l00441"></a>00441 {
<a name="l00442"></a>00442     <span class="keywordflow">return</span> _deltaZ;
<a name="l00443"></a>00443 }
<a name="l00444"></a>00444 
<a name="l00445"></a>00445 - (BOOL)_couldBeKeyEquivalent
<a name="l00446"></a>00446 {
<a name="l00447"></a>00447     <span class="comment">// FIXME: More cases? Space?</span>
<a name="l00448"></a>00448     <span class="keywordflow">return</span>  _type === <a class="code" href="_c_p_event_8j.html#a44b7200967c244a014e1ee34ad02ecd9">CPKeyDown</a> &amp;&amp;
<a name="l00449"></a>00449             _modifierFlags &amp; (<a class="code" href="_c_p_event_8j.html#a675a3ab6cfc14dd4ad6702d7c682c7fe">CPCommandKeyMask</a> | <a class="code" href="_c_p_event_8j.html#a144f394b3de6afb9b329491dba0e8d14">CPControlKeyMask</a>) &amp;&amp;
<a name="l00450"></a>00450             [_characters length] &gt; 0;
<a name="l00451"></a>00451 }
<a name="l00452"></a>00452 
<a name="l00458"></a><a class="code" href="class_c_p_event.html#a5770b438b323df0f32e76e9599c8f226">00458</a> + (void)startPeriodicEventsAfterDelay:(CPTimeInterval)aDelay withPeriod:(CPTimeInterval)aPeriod
<a name="l00459"></a>00459 {
<a name="l00460"></a>00460     _CPEventPeriodicEventPeriod = aPeriod;
<a name="l00461"></a>00461     
<a name="l00462"></a>00462     <span class="comment">// FIXME: OH TIMERS!!!</span>
<a name="l00463"></a>00463     _CPEventPeriodicEventTimer = window.setTimeout(function() { _CPEventPeriodicEventTimer = window.setInterval(_CPEventFirePeriodEvent, aPeriod * 1000.0); }, aDelay * 1000.0);
<a name="l00464"></a>00464 }
<a name="l00465"></a>00465 
<a name="l00469"></a><a class="code" href="class_c_p_event.html#a5071c8f5ce8fd7d8a08e6ae4756b1d2d">00469</a> + (void)stopPeriodicEvents
<a name="l00470"></a>00470 {
<a name="l00471"></a>00471     <span class="keywordflow">if</span> (_CPEventPeriodicEventTimer === nil)
<a name="l00472"></a>00472         <span class="keywordflow">return</span>;
<a name="l00473"></a>00473     
<a name="l00474"></a>00474     window.clearTimeout(_CPEventPeriodicEventTimer);
<a name="l00475"></a>00475     
<a name="l00476"></a>00476     _CPEventPeriodicEventTimer = nil;
<a name="l00477"></a>00477 }
<a name="l00478"></a>00478 
<a name="l00479"></a>00479 <span class="keyword">@end</span>
<a name="l00480"></a>00480 
<a name="l00481"></a>00481 function _CPEventFirePeriodEvent()
<a name="l00482"></a>00482 {
<a name="l00483"></a>00483     [CPApp sendEvent:[<a class="code" href="class_c_p_event.html">CPEvent</a> <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">otherEventWithType</a>:CPPeriodic <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">location</a>:_CGPointMakeZero() <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">modifierFlags</a>:0 <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">timestamp</a>:0 <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">windowNumber</a>:0 <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">context</a>:nil <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">subtype</a>:0 <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">data1</a>:0 <a class="code" href="class_c_p_event.html#af5b1bfede88a107b505046623f0ccedc">data2</a>:0]];
<a name="l00484"></a>00484 }
<a name="l00485"></a>00485 
<a name="l00486"></a><a class="code" href="_c_p_event_8j.html#a11ebb6319a620c82b7a48ee8e30d8877">00486</a> var <a class="code" href="_c_p_event_8j.html#a11ebb6319a620c82b7a48ee8e30d8877">CPEventClass</a> = [<a class="code" href="class_c_p_event.html">CPEvent</a> class];
<a name="l00487"></a>00487 
<a name="l00488"></a>00488 function _CPEventFromNativeMouseEvent(aNativeEvent, anEventType, aPoint, modifierFlags, aTimestamp, aWindowNumber, aGraphicsContext, anEventNumber, aClickCount, aPressure)
<a name="l00489"></a>00489 {
<a name="l00490"></a>00490     aNativeEvent.isa = <a class="code" href="_c_p_event_8j.html#a11ebb6319a620c82b7a48ee8e30d8877">CPEventClass</a>;
<a name="l00491"></a>00491 
<a name="l00492"></a>00492     aNativeEvent._type = anEventType;
<a name="l00493"></a>00493     aNativeEvent._location = aPoint;
<a name="l00494"></a>00494     aNativeEvent._modifierFlags = modifierFlags;
<a name="l00495"></a>00495     aNativeEvent._timestamp = aTimestamp;
<a name="l00496"></a>00496     aNativeEvent._windowNumber = aWindowNumber;
<a name="l00497"></a>00497     aNativeEvent._window = nil;
<a name="l00498"></a>00498     aNativeEvent._context = aGraphicsContext;
<a name="l00499"></a>00499     aNativeEvent._eventNumber = anEventNumber;
<a name="l00500"></a>00500     aNativeEvent._clickCount = aClickCount;
<a name="l00501"></a>00501     aNativeEvent._pressure = aPressure;
<a name="l00502"></a>00502 
<a name="l00503"></a>00503     <span class="keywordflow">return</span> aNativeEvent;
<a name="l00504"></a>00504 }
<a name="l00505"></a>00505 
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 10:32:55 2010 for Cappuccino API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>

<!-- Mirrored from cappuccino.org/learn/documentation/_c_p_event_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:30 GMT -->
</html>