home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWEvents / Include / FWEvent.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  20.8 KB  |  655 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWEvent.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWEVENT_H
  11. #define FWEVENT_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #ifndef FWRUNTYP_H
  18. #include "FWRunTyp.h"
  19. #endif
  20.  
  21. // ----- OpenDoc Includes -----
  22.  
  23. #ifndef _ODTYPES_
  24. #include <ODTypes.h>
  25. #endif
  26.  
  27. #if defined(FW_BUILD_WIN)  && !defined(_INC_WINDOWS)
  28. #include <windows.h>
  29. #endif    
  30.  
  31. #if FW_LIB_EXPORT_PRAGMAS
  32. #pragma lib_export on
  33. #endif
  34.  
  35. //========================================================================================
  36. // Forward class declarations
  37. //========================================================================================
  38.  
  39. class FW_CLASS_ATTR FW_CPoint;
  40. class FW_CLASS_ATTR ODFrame;
  41. class FW_CLASS_ATTR ODFacet;
  42. class FW_CLASS_ATTR FW_CEmbeddedMouseEvent;
  43. class FW_CLASS_ATTR    FW_CMapping;
  44.  
  45. //========================================================================================
  46. //  Type definitions
  47. //========================================================================================
  48.  
  49. #ifdef FW_BUILD_MAC
  50. typedef long FW_PlatformEventTime;
  51. #endif
  52.  
  53. #ifdef FW_BUILD_WIN
  54. typedef DWORD FW_PlatformEventTime;
  55. #endif
  56.  
  57. //========================================================================================
  58. // CLASS FW_CSystemEvent
  59. //========================================================================================
  60. class FW_CLASS_ATTR FW_CSystemEvent
  61. {
  62. public:
  63.     FW_DECLARE_CLASS
  64.  
  65.     virtual ~FW_CSystemEvent();
  66.     
  67.     ODEventData*                     GetPlatformEvent();
  68.     unsigned long                     GetMessage() const;
  69.     FW_PlatformEventTime             GetTime() const;
  70.     unsigned long                     GetModifiers() const;
  71.     ODPlatformWindow                 GetPlatformWindow() const;
  72.  
  73. protected:
  74.     FW_CSystemEvent(Environment* ev, ODPlatformWindow theWindow, FW_PlatformEventTime time);
  75.     FW_CSystemEvent(Environment* ev, ODEventData* theEvent);
  76.     
  77.     FW_CSystemEvent(Environment* ev, const FW_CSystemEvent& other);
  78.     
  79.     ODEventData         fEvent;
  80.     ODPlatformWindow    fPlatformWindow;
  81. };
  82.  
  83. //========================================================================================
  84. // CLASS FW_CNullEvent
  85. //========================================================================================
  86.  
  87. class FW_CLASS_ATTR FW_CNullEvent : public FW_CSystemEvent
  88. {
  89. public:
  90.     FW_DECLARE_CLASS
  91.     
  92.     FW_CNullEvent(Environment* ev, ODEventData* theEvent);
  93.     FW_CNullEvent(Environment* ev, ODPlatformWindow theWindow, FW_PlatformEventTime time);
  94.  
  95.     FW_CNullEvent(Environment* ev, const FW_CNullEvent& other);
  96.     virtual        ~FW_CNullEvent();
  97. };
  98.  
  99. #ifdef FW_BUILD_MAC
  100. //========================================================================================
  101. // CLASS FW_CMacWindowEvent
  102. //========================================================================================
  103.  
  104. class FW_CLASS_ATTR FW_CMacWindowEvent : public FW_CSystemEvent
  105. {
  106. public:
  107.     FW_DECLARE_CLASS
  108.     
  109.     FW_CMacWindowEvent(Environment* ev, ODEventData* theEvent);
  110.     virtual        ~FW_CMacWindowEvent();
  111. };
  112. #endif
  113.  
  114. //========================================================================================
  115. // CLASS FW_CMouseEvent
  116. //========================================================================================
  117.  
  118. class FW_CLASS_ATTR FW_CMouseEvent : public FW_CSystemEvent
  119. {
  120. public:
  121.     FW_DECLARE_CLASS
  122.     
  123.     enum ButtonState
  124.     {
  125.         kMouseButtonDown, kMouseButtonUp
  126.     };
  127.  
  128.     enum WhichButton
  129.     {
  130.         kLeftMouseButton, kMiddleMouseButton, kRightMouseButton
  131.     };
  132.  
  133.     enum ECoordinates
  134.     {
  135.         kScreen, kWindow, kFrame
  136.     };
  137.  
  138.     static const short kEmpty;
  139.     static const short kExtend;
  140.     static const short kItem;
  141.     static const short kCopy;
  142.     static const short kControl;
  143.  
  144.     FW_CMouseEvent(Environment* ev, ODEventData* theEvent, ODFacet* theFacet, ButtonState theState, short numOfClicks = 1);
  145.     FW_CMouseEvent(Environment* ev, ODFacet* theFacet,
  146.                                     ButtonState theState,
  147.                                     WhichButton initialButton,
  148.                                     ODPlatformWindow theWindow,
  149.                                     FW_PlatformEventTime when,
  150.                                     const FW_CPoint& where,
  151.                                     unsigned short modifiers,
  152.                                     short numOfClicks = 1);
  153.     FW_CMouseEvent(Environment* ev, const FW_CEmbeddedMouseEvent& embeddedEvent);
  154.     
  155.     FW_CMouseEvent(Environment* ev, const FW_CMouseEvent& other);
  156.     virtual        ~FW_CMouseEvent();
  157.     
  158.     
  159.     ODFacet*            GetFacet(Environment* ev) const;
  160.     ButtonState            GetButtonState(Environment* ev) const;
  161.     WhichButton            GetInitialButtonPressed(Environment* ev) const;
  162.     short                GetNumberOfClicks(Environment* ev) const;
  163.     unsigned short        GetButtonModifiers(Environment* ev) const;
  164.  
  165.     // Position
  166.     FW_CPoint            GetLogicalMousePosition(Environment* ev, 
  167.                                         const FW_CMapping& mapping) const;
  168.     FW_CPoint            GetMousePosition(Environment* ev, 
  169.                                         ECoordinates coordinate) const;
  170.  
  171.     // Buttons Pressed
  172.     FW_Boolean            IsLeftButtonPressed(Environment* ev) const;
  173.     FW_Boolean            IsMiddleButtonPressed(Environment* ev) const;
  174.     FW_Boolean            IsRightButtonPressed(Environment* ev) const;
  175.     
  176.     // Modifiers
  177.     FW_Boolean            IsExtendModifier(Environment* ev) const;
  178.     FW_Boolean            IsItemModifier(Environment* ev) const;
  179.     FW_Boolean            IsCopyModifier(Environment* ev) const;
  180.     FW_Boolean            IsControlKeyModifier(Environment* ev) const;        // No semantic equivalent on the Mac
  181.  
  182.     void                ClearExtendModifier(Environment* ev);
  183.     void                ClearItemModifier(Environment* ev);
  184.     void                ClearCopyModifier(Environment* ev);
  185.     void                ClearControlKeyModifier(Environment* ev);
  186.  
  187.     // Utility
  188.     FW_Boolean            WaitUntilMouseMoved(Environment* ev) const;
  189.     
  190. protected:
  191.     ODFacet*             fFacet;
  192.     ButtonState         fButtonState;
  193.     WhichButton         fWhichButton;
  194.     short                fNumberOfClicks;
  195. };
  196.  
  197. //========================================================================================
  198. // CLASS FW_CEmbeddedMouseEvent
  199. //========================================================================================
  200.  
  201. class FW_CLASS_ATTR FW_CEmbeddedMouseEvent : public FW_CMouseEvent
  202. {
  203. public:
  204.     FW_DECLARE_CLASS
  205.     
  206.     FW_CEmbeddedMouseEvent(Environment* ev, ODEventData* theEvent,
  207.                                             ODFacet* theFacet,
  208.                                             ODFrame* theEmbeddedFrame,
  209.                                             ODFacet* theEmbeddedFacet,
  210.                                             ButtonState theState,
  211.                                             short numOfClicks = 1);
  212.                                             
  213.     FW_CEmbeddedMouseEvent(Environment* ev, ODFacet* theFacet,
  214.                                             ODFrame* theEmbeddedFrame,
  215.                                             ODFacet* theEmbeddedFacet,
  216.                                             ButtonState theState,
  217.                                             WhichButton initialButton,
  218.                                             ODPlatformWindow theWindow,
  219.                                             FW_PlatformEventTime when,
  220.                                             const FW_CPoint& where,
  221.                                             unsigned short modifiers,
  222.                                             short numOfClicks = 1);
  223.  
  224.     FW_CEmbeddedMouseEvent(Environment* ev, const FW_CEmbeddedMouseEvent& other);
  225.     virtual        ~FW_CEmbeddedMouseEvent();
  226.     
  227.     ODFrame*     GetEmbeddedFrame(Environment* ev) const;
  228.     ODFacet*     GetEmbeddedFacet(Environment* ev) const;
  229.  
  230. private:
  231.     ODFrame*     fEmbeddedFrame;
  232.     ODFacet*     fEmbeddedFacet;
  233. };
  234.  
  235. //========================================================================================
  236. // CLASS FW_CBorderMouseEvent
  237. //========================================================================================
  238.  
  239. class FW_CLASS_ATTR FW_CBorderMouseEvent : public FW_CMouseEvent
  240. {
  241. public:
  242.     FW_DECLARE_CLASS
  243.     
  244.     FW_CBorderMouseEvent(Environment* ev, ODEventData* theEvent,
  245.                                             ODFacet* theFacet,
  246.                                             ODFrame* theEmbeddedFrame,
  247.                                             ODFacet* theEmbeddedFacet,
  248.                                             ButtonState theState,
  249.                                             short numOfClicks = 1);
  250.                                             
  251.     FW_CBorderMouseEvent(Environment* ev, ODFacet* theFacet,
  252.                                             ODFrame* theEmbeddedFrame,
  253.                                             ODFacet* theEmbeddedFacet,
  254.                                             ButtonState theState,
  255.                                             WhichButton initialButton,
  256.                                             ODPlatformWindow theWindow,
  257.                                             FW_PlatformEventTime when,
  258.                                             const FW_CPoint& where,
  259.                                             unsigned short modifiers,
  260.                                             short numOfClicks = 1);
  261.                                             
  262.     FW_CBorderMouseEvent(Environment* ev, const FW_CBorderMouseEvent& other);
  263.     virtual        ~FW_CBorderMouseEvent();
  264.  
  265.     ODFrame*     GetEmbeddedFrame(Environment* ev) const;
  266.     ODFacet*     GetEmbeddedFacet(Environment* ev) const;
  267.  
  268. private:
  269.     ODFrame*     fEmbeddedFrame;
  270.     ODFacet*     fEmbeddedFacet;
  271. };
  272.  
  273. //========================================================================================
  274. // CLASS FW_CVirtualKeyEvent
  275. //========================================================================================
  276.  
  277. class FW_CLASS_ATTR FW_CVirtualKeyEvent : public FW_CSystemEvent
  278. {
  279. public:
  280.     FW_DECLARE_CLASS
  281.     
  282.     enum KeyboardState
  283.     {
  284.         kKeyDown, kKeyUp
  285.     };
  286.     
  287.     FW_CVirtualKeyEvent(Environment* ev, ODEventData* theEvent, KeyboardState theKeyboardState, unsigned short repeatCount = 0);
  288.     FW_CVirtualKeyEvent(Environment* ev, KeyboardState theKeyboardState,
  289.                                             short keyCode,
  290.                                             ODPlatformWindow theWindow,
  291.                                             FW_PlatformEventTime when,
  292.                                             unsigned short repeatCount = 0);
  293.  
  294.     FW_CVirtualKeyEvent(Environment* ev, const FW_CVirtualKeyEvent& other);
  295.     virtual~ FW_CVirtualKeyEvent();
  296.     
  297.     KeyboardState    GetKeyboardState(Environment* ev) const;
  298.     FW_Boolean         IsRepeating(Environment* ev) const;
  299.     unsigned short     GetRepeatCount(Environment* ev) const;
  300.     short             GetKeyCode(Environment* ev) const;
  301.  
  302. private:
  303.     KeyboardState     fKeyboardState;
  304.     unsigned short     fRepeatCount;
  305. };
  306.  
  307.  
  308. //========================================================================================
  309. // CLASS FW_CCharKeyEvent
  310. //========================================================================================
  311.  
  312. class FW_CLASS_ATTR FW_CCharKeyEvent : public FW_CSystemEvent
  313. {
  314. public:
  315.     FW_DECLARE_CLASS
  316.     
  317.     FW_CCharKeyEvent(Environment* ev, ODEventData* theEvent, unsigned short repeatCount = 0);
  318.     FW_CCharKeyEvent(Environment* ev, char keyChar,
  319.                                         ODPlatformWindow theWindow,
  320.                                         FW_PlatformEventTime when,
  321.                                         unsigned short repeatCount = 0);
  322.  
  323.     FW_CCharKeyEvent(Environment* ev, const FW_CCharKeyEvent& other);
  324.     virtual~ FW_CCharKeyEvent();
  325.  
  326.     FW_Boolean         IsRepeating(Environment* ev) const;
  327.     unsigned short     GetRepeatCount(Environment* ev) const;
  328.     char            GetChar(Environment* ev) const;
  329.     
  330. private:
  331.     unsigned short fRepeatCount;
  332. };
  333.  
  334. //========================================================================================
  335. // CLASS FW_CSuspendResumeEvent
  336. //========================================================================================
  337.  
  338. class FW_CLASS_ATTR FW_CSuspendResumeEvent : public FW_CSystemEvent
  339. {
  340. public:
  341.     FW_DECLARE_CLASS
  342.     
  343.     FW_CSuspendResumeEvent(Environment* ev, ODEventData* theEvent, ODFacet* facet, FW_Boolean isGoingToBackground);
  344.     FW_CSuspendResumeEvent(Environment* ev, const FW_CSuspendResumeEvent& other);
  345.     virtual~ FW_CSuspendResumeEvent();
  346.     
  347.     FW_Boolean         IsGoingToBackground(Environment* ev) const;
  348.     ODFacet*         GetFacet(Environment* ev) const;
  349.     
  350. private:
  351.     FW_Boolean         fIsGoingToBackground;
  352.     ODFacet*        fFacet;
  353. };
  354.  
  355. //========================================================================================
  356. // CLASS FW_CActivateEvent
  357. //========================================================================================
  358.  
  359. class FW_CLASS_ATTR FW_CActivateEvent : public FW_CSystemEvent
  360. {
  361. public:
  362.     FW_DECLARE_CLASS
  363.     
  364.     FW_CActivateEvent(Environment* ev, ODEventData* theEvent, ODFacet* facet, FW_Boolean theState);
  365.     FW_CActivateEvent(Environment* ev, ODFacet* facet,
  366.                                         FW_Boolean theState,
  367.                                         ODPlatformWindow theWindow,
  368.                                         FW_PlatformEventTime when);
  369.  
  370.     FW_CActivateEvent(Environment* ev, const FW_CActivateEvent& other);
  371.     virtual~ FW_CActivateEvent();
  372.     
  373.     FW_Boolean                     IsActivating(Environment* ev) const;
  374.     ODFacet*                     GetFacet(Environment* ev) const;
  375.     
  376. private:
  377.     FW_Boolean         fActivationState;
  378.     ODFacet*        fFacet;
  379. };
  380.  
  381. //========================================================================================
  382. // CLASS FW_CMenuEvent
  383. //========================================================================================
  384.  
  385. class FW_CLASS_ATTR FW_CMenuEvent : public FW_CSystemEvent
  386. {
  387. public:
  388.     FW_DECLARE_CLASS
  389.     
  390.     FW_CMenuEvent(Environment* ev, ODEventData* theEvent, ODCommandID theCommandID);
  391.     FW_CMenuEvent(Environment* ev, ODCommandID theCommandID,
  392.                                 ODPlatformWindow theWindow,
  393.                                 FW_PlatformEventTime when);
  394.  
  395.     FW_CMenuEvent(Environment* ev, const FW_CMenuEvent& other);
  396.     virtual~ FW_CMenuEvent();
  397.     
  398.     ODCommandID GetCommandID(Environment* ev) const;
  399.     
  400. private:
  401.     ODCommandID fCommandID;
  402. };
  403.  
  404. //========================================================================================
  405. // inlines
  406. //========================================================================================
  407.  
  408. //----------------------------------------------------------------------------------------
  409. //    FW_CSystemEvent::GetPlatformEvent
  410. //----------------------------------------------------------------------------------------
  411. inline ODEventData* FW_CSystemEvent::GetPlatformEvent()
  412. {
  413.     return &fEvent;
  414. }
  415.  
  416. //----------------------------------------------------------------------------------------
  417. //    FW_CSystemEvent::GetMessage
  418. //----------------------------------------------------------------------------------------
  419. inline unsigned long FW_CSystemEvent::GetMessage() const
  420. {
  421.     return fEvent.message;
  422. }
  423.  
  424. //----------------------------------------------------------------------------------------
  425. //    FW_CSystemEvent::GetTime
  426. //----------------------------------------------------------------------------------------
  427. inline FW_PlatformEventTime FW_CSystemEvent::GetTime() const
  428. {
  429. #ifdef FW_BUILD_MAC
  430.     return fEvent.when;
  431. #endif
  432. #ifdef FW_BUILD_WIN
  433.     return fEvent.time;
  434. #endif
  435. }
  436.  
  437. //----------------------------------------------------------------------------------------
  438. //    FW_CSystemEvent::GetModifiers
  439. //----------------------------------------------------------------------------------------
  440. inline unsigned long FW_CSystemEvent::GetModifiers() const
  441. {
  442. #ifdef FW_BUILD_MAC
  443.     return fEvent.modifiers;
  444. #endif
  445. #ifdef FW_BUILD_WIN
  446.     return fEvent.wParam;
  447. #endif
  448. }
  449.  
  450. //----------------------------------------------------------------------------------------
  451. //    FW_CSystemEvent::GetPlatformWindow
  452. //----------------------------------------------------------------------------------------
  453. inline ODPlatformWindow FW_CSystemEvent::GetPlatformWindow() const
  454. {
  455.     return fPlatformWindow;
  456. }
  457.  
  458. //----------------------------------------------------------------------------------------
  459. //    FW_CMouseEvent::GetFacet
  460. //----------------------------------------------------------------------------------------
  461. inline ODFacet* FW_CMouseEvent::GetFacet(Environment* ev) const
  462. {
  463.     return fFacet;
  464. }
  465.  
  466. //----------------------------------------------------------------------------------------
  467. //    FW_CMouseEvent::GetButtonState
  468. //----------------------------------------------------------------------------------------
  469. inline FW_CMouseEvent::ButtonState FW_CMouseEvent::GetButtonState(Environment* ev) const
  470. {
  471.     return fButtonState;
  472. }
  473.  
  474. //----------------------------------------------------------------------------------------
  475. //    FW_CMouseEvent::GetInitialButtonPressed
  476. //----------------------------------------------------------------------------------------
  477. inline FW_CMouseEvent::WhichButton FW_CMouseEvent::GetInitialButtonPressed(Environment* ev) const
  478. {
  479.     return fWhichButton;
  480. }
  481.  
  482. //----------------------------------------------------------------------------------------
  483. //    FW_CMouseEvent::GetNumberOfClicks
  484. //----------------------------------------------------------------------------------------
  485. inline short FW_CMouseEvent::GetNumberOfClicks(Environment* ev) const
  486. {
  487.     return fNumberOfClicks;
  488. }
  489.  
  490. //----------------------------------------------------------------------------------------
  491. //    FW_CMouseEvent::ClearExtendModifier
  492. //----------------------------------------------------------------------------------------
  493. inline void FW_CMouseEvent::ClearExtendModifier(Environment* ev)
  494. {
  495. #ifdef FW_BUILD_MAC
  496.     fEvent.modifiers -= shiftKey;
  497. #endif
  498. #ifdef FW_BUILD_WIN
  499.     fEvent.wParam -= MK_SHIFT;
  500. #endif
  501. }
  502.  
  503. //----------------------------------------------------------------------------------------
  504. //    FW_CMouseEvent::ClearItemModifier
  505. //----------------------------------------------------------------------------------------
  506. inline void FW_CMouseEvent::ClearItemModifier(Environment* ev)
  507. {
  508. #ifdef FW_BUILD_MAC
  509.     fEvent.modifiers -= cmdKey;
  510. #endif
  511. #ifdef FW_BUILD_WIN
  512.     fEvent.wParam -= MK_CONTROL;
  513. #endif
  514. }
  515.  
  516. //----------------------------------------------------------------------------------------
  517. //    FW_CMouseEvent::ClearCopyModifier
  518. //----------------------------------------------------------------------------------------
  519. inline void FW_CMouseEvent::ClearCopyModifier(Environment* ev)
  520. {
  521. #ifdef FW_BUILD_MAC
  522.     fEvent.modifiers -= optionKey;
  523. #endif
  524. #ifdef FW_BUILD_WIN
  525.     fEvent.wParam -= MK_CONTROL;
  526. #endif
  527. }
  528.  
  529. //----------------------------------------------------------------------------------------
  530. //    FW_CMouseEvent::ClearControlKeyModifier
  531. //----------------------------------------------------------------------------------------
  532. inline void FW_CMouseEvent::ClearControlKeyModifier(Environment* ev)
  533. {
  534. #ifdef FW_BUILD_MAC
  535.     fEvent.modifiers -= controlKey;
  536. #endif
  537. #ifdef FW_BUILD_WIN
  538.     fEvent.wParam -= MK_CONTROL;
  539. #endif
  540. }
  541.  
  542. //----------------------------------------------------------------------------------------
  543. //    FW_CMouseEvent::IsCopyModifier
  544. //----------------------------------------------------------------------------------------
  545. inline FW_Boolean FW_CMouseEvent::IsCopyModifier(Environment* ev) const
  546. {
  547. #ifdef FW_BUILD_MAC
  548.     return (fEvent.modifiers & optionKey) != 0;
  549. #endif
  550. #ifdef FW_BUILD_WIN
  551.     return (fEvent.wParam & MK_CONTROL) != 0;
  552. #endif
  553. }
  554.  
  555. //----------------------------------------------------------------------------------------
  556. //    FW_CMouseEvent::IsControlKeyModifier
  557. //----------------------------------------------------------------------------------------
  558. inline FW_Boolean FW_CMouseEvent::IsControlKeyModifier(Environment* ev) const
  559. {
  560. #ifdef FW_BUILD_MAC
  561.     return (fEvent.modifiers & controlKey) != 0;
  562. #endif
  563. #ifdef FW_BUILD_WIN
  564.     return (fEvent.wParam & MK_CONTROL) != 0;
  565. #endif
  566. }
  567.  
  568. //----------------------------------------------------------------------------------------
  569. //    FW_CVirtualKeyEvent::GetKeyboardState
  570. //----------------------------------------------------------------------------------------
  571. inline FW_CVirtualKeyEvent::KeyboardState FW_CVirtualKeyEvent::GetKeyboardState(Environment* ev) const
  572. {
  573.     return fKeyboardState;
  574. }
  575.  
  576. //----------------------------------------------------------------------------------------
  577. //    FW_CVirtualKeyEvent::IsRepeating
  578. //----------------------------------------------------------------------------------------
  579. inline FW_Boolean FW_CVirtualKeyEvent::IsRepeating(Environment* ev) const
  580. {
  581.     return (fRepeatCount > 0);
  582. }
  583.  
  584. //----------------------------------------------------------------------------------------
  585. //    FW_CVirtualKeyEvent::GetRepeatCount
  586. //----------------------------------------------------------------------------------------
  587. inline unsigned short FW_CVirtualKeyEvent::GetRepeatCount(Environment* ev) const
  588. {
  589.     return fRepeatCount;
  590. }
  591.  
  592. //----------------------------------------------------------------------------------------
  593. //    FW_CCharKeyEvent::IsRepeating
  594. //----------------------------------------------------------------------------------------
  595. inline FW_Boolean FW_CCharKeyEvent::IsRepeating(Environment* ev) const
  596. {
  597.     return (fRepeatCount > 0);
  598. }
  599.  
  600. //----------------------------------------------------------------------------------------
  601. //    FW_CCharKeyEvent::GetRepeatCount
  602. //----------------------------------------------------------------------------------------
  603. inline unsigned short FW_CCharKeyEvent::GetRepeatCount(Environment* ev) const
  604. {
  605.     return fRepeatCount;
  606. }
  607.  
  608. //----------------------------------------------------------------------------------------
  609. //    FW_CActivateEvent::IsActivating
  610. //----------------------------------------------------------------------------------------
  611. inline FW_Boolean FW_CActivateEvent::IsActivating(Environment* ev) const
  612. {
  613.     return fActivationState;
  614. }
  615.  
  616. //----------------------------------------------------------------------------------------
  617. //    FW_CActivateEvent::GetFacet
  618. //----------------------------------------------------------------------------------------
  619. inline ODFacet* FW_CActivateEvent::GetFacet(Environment* ev) const
  620. {
  621.     return fFacet;
  622. }
  623.  
  624. //----------------------------------------------------------------------------------------
  625. //    FW_CSuspendResumeEvent::IsGoingToBackground
  626. //----------------------------------------------------------------------------------------
  627. inline FW_Boolean FW_CSuspendResumeEvent::IsGoingToBackground(Environment* ev) const
  628. {
  629.     return fIsGoingToBackground;
  630. }
  631.  
  632. //----------------------------------------------------------------------------------------
  633. //    FW_CSuspendResumeEvent::GetFacet
  634. //----------------------------------------------------------------------------------------
  635. inline ODFacet* FW_CSuspendResumeEvent::GetFacet(Environment* ev) const
  636. {
  637.     return fFacet;
  638. }
  639.  
  640. //----------------------------------------------------------------------------------------
  641. //    FW_CMenuEvent::GetCommandID
  642. //----------------------------------------------------------------------------------------
  643. inline ODCommandID FW_CMenuEvent::GetCommandID(Environment* ev) const
  644. {
  645.     return fCommandID;
  646. }
  647.  
  648. #if FW_LIB_EXPORT_PRAGMAS
  649. #pragma lib_export off
  650. #endif
  651.  
  652. #endif
  653.  
  654.  
  655.