equal
deleted
inserted
replaced
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1996-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
63 COomFailBase *CreateOomCaptureKey(CTOom *aTest) |
63 COomFailBase *CreateOomCaptureKey(CTOom *aTest) |
64 {return(new(ELeave) COomCaptureKey(aTest));} |
64 {return(new(ELeave) COomCaptureKey(aTest));} |
65 |
65 |
66 COomFailBase *CreateOomCaptureKeyUpDown(CTOom *aTest) |
66 COomFailBase *CreateOomCaptureKeyUpDown(CTOom *aTest) |
67 {return(new(ELeave) COomCaptureKeyUpDown(aTest));} |
67 {return(new(ELeave) COomCaptureKeyUpDown(aTest));} |
|
68 |
|
69 COomFailBase *CreateOomLongKeyCapture(CTOom *aTest) |
|
70 {return(new(ELeave) COomLongKeyCapture(aTest));} |
68 |
71 |
69 COomFailBase *CreateOomHotKey(CTOom *aTest) |
72 COomFailBase *CreateOomHotKey(CTOom *aTest) |
70 {return(new(ELeave) COomHotKey(aTest));} |
73 {return(new(ELeave) COomHotKey(aTest));} |
71 |
74 |
72 COomFailBase *CreateOomGroupName(CTOom *aTest) |
75 COomFailBase *CreateOomGroupName(CTOom *aTest) |
111 CreateOomPointerBuffer, |
114 CreateOomPointerBuffer, |
112 CreateOomPolygon, |
115 CreateOomPolygon, |
113 CreateOomPriorityKey, |
116 CreateOomPriorityKey, |
114 CreateOomCaptureKey, |
117 CreateOomCaptureKey, |
115 CreateOomCaptureKeyUpDown, |
118 CreateOomCaptureKeyUpDown, |
|
119 CreateOomLongKeyCapture, |
116 CreateOomHotKey, |
120 CreateOomHotKey, |
117 CreateOomGroupName, |
121 CreateOomGroupName, |
118 CreateOomSprite, |
122 CreateOomSprite, |
119 CreateOomPointerCursor, |
123 CreateOomPointerCursor, |
120 CreateOomCopyScreen, |
124 CreateOomCopyScreen, |
419 iWinGroup.RemovePriorityKey(1,0,0); |
423 iWinGroup.RemovePriorityKey(1,0,0); |
420 } |
424 } |
421 |
425 |
422 // |
426 // |
423 |
427 |
424 COomCaptureKey::COomCaptureKey(CTOom *aTest) : COomSetup(aTest) |
428 COomCaptureKeyBase::COomCaptureKeyBase(CTOom *aTest) : COomSetup(aTest) |
|
429 {} |
|
430 |
|
431 COomCaptureKeyBase::~COomCaptureKeyBase() |
|
432 {} |
|
433 |
|
434 void COomCaptureKeyBase::ConstructL() |
|
435 { |
|
436 COomSetup::ConstructL(); |
|
437 } |
|
438 |
|
439 COomCaptureKey::COomCaptureKey(CTOom *aTest) : COomCaptureKeyBase(aTest) |
425 {} |
440 {} |
426 |
441 |
427 COomCaptureKey::~COomCaptureKey() |
442 COomCaptureKey::~COomCaptureKey() |
428 { |
443 { |
429 } |
444 } |
430 |
445 |
431 TOomTestName COomCaptureKey::TestName() |
446 TOomTestName COomCaptureKey::TestName() |
432 { |
447 { |
433 return(_L("Capture key")); |
448 return(_L("Capture key")); |
434 } |
|
435 |
|
436 void COomCaptureKey::ConstructL() |
|
437 { |
|
438 COomSetup::ConstructL(); |
|
439 } |
449 } |
440 |
450 |
441 /** Requests a capture keys for a previously created window group |
451 /** Requests a capture keys for a previously created window group |
442 */ |
452 */ |
443 TInt COomCaptureKey::Fail() |
453 TInt COomCaptureKey::Fail() |
458 iWinGroup.CancelCaptureKey(iCapKey[index]); |
468 iWinGroup.CancelCaptureKey(iCapKey[index]); |
459 } |
469 } |
460 |
470 |
461 // |
471 // |
462 |
472 |
463 COomCaptureKeyUpDown::COomCaptureKeyUpDown(CTOom *aTest) : COomSetup(aTest) |
473 COomCaptureKeyUpDown::COomCaptureKeyUpDown(CTOom *aTest) : COomCaptureKeyBase(aTest) |
464 {} |
474 {} |
465 |
475 |
466 COomCaptureKeyUpDown::~COomCaptureKeyUpDown() |
476 COomCaptureKeyUpDown::~COomCaptureKeyUpDown() |
467 { |
477 { |
468 } |
478 } |
469 |
479 |
470 TOomTestName COomCaptureKeyUpDown::TestName() |
480 TOomTestName COomCaptureKeyUpDown::TestName() |
471 { |
481 { |
472 return(_L("Capture up/down keys")); |
482 return(_L("Capture up/down keys")); |
473 } |
|
474 |
|
475 void COomCaptureKeyUpDown::ConstructL() |
|
476 { |
|
477 COomSetup::ConstructL(); |
|
478 } |
483 } |
479 |
484 |
480 /** Requests the capture of key-up and key-down events for a previously created window group |
485 /** Requests the capture of key-up and key-down events for a previously created window group |
481 */ |
486 */ |
482 TInt COomCaptureKeyUpDown::Fail() |
487 TInt COomCaptureKeyUpDown::Fail() |
493 |
498 |
494 void COomCaptureKeyUpDown::ClearUpL() |
499 void COomCaptureKeyUpDown::ClearUpL() |
495 { |
500 { |
496 for (TInt index=0;index<iIndex;index++) |
501 for (TInt index=0;index<iIndex;index++) |
497 iWinGroup.CancelCaptureKeyUpAndDowns(iCapKey[index]); |
502 iWinGroup.CancelCaptureKeyUpAndDowns(iCapKey[index]); |
|
503 } |
|
504 |
|
505 // |
|
506 |
|
507 COomLongKeyCapture::COomLongKeyCapture(CTOom *aTest) : COomCaptureKeyBase(aTest) |
|
508 {} |
|
509 |
|
510 COomLongKeyCapture::~COomLongKeyCapture() |
|
511 { |
|
512 } |
|
513 |
|
514 TOomTestName COomLongKeyCapture::TestName() |
|
515 { |
|
516 _LIT(KLongKeyCapTestName, "Long key capture"); |
|
517 return KLongKeyCapTestName(); |
|
518 } |
|
519 |
|
520 /** |
|
521 Requests capture of long key events for a previously created window group |
|
522 */ |
|
523 TInt COomLongKeyCapture::Fail() |
|
524 { |
|
525 for (iIndex=0; iIndex < KNumCapKeyRequest; iIndex++) |
|
526 { |
|
527 TInt ret=iWinGroup.CaptureLongKey(' ','a',0,0,2,ELongCaptureNormal); |
|
528 if (ret<0) |
|
529 return(ret); |
|
530 iCapKey[iIndex]=ret; |
|
531 } |
|
532 return(KErrNone); |
|
533 } |
|
534 |
|
535 void COomLongKeyCapture::ClearUpL() |
|
536 { |
|
537 for (TInt index=0;index<iIndex;index++) |
|
538 iWinGroup.CancelCaptureLongKey(iCapKey[index]); |
498 } |
539 } |
499 |
540 |
500 // |
541 // |
501 |
542 |
502 COomHotKey::COomHotKey(CTOom *aTest) : COomSetup(aTest) |
543 COomHotKey::COomHotKey(CTOom *aTest) : COomSetup(aTest) |