MMHTIMER.INT 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMHTimer;
  26. {$I COMPILER.INC}
  27. {$C FIXED PRELOAD PERMANENT}
  28. {.$DEFINE _MMDEBUG}
  29. interface
  30. uses
  31. {$IFDEF WIN32}
  32. Windows,
  33. {$ELSE}
  34. WinTypes,
  35. WinProcs,
  36. {$ENDIF}
  37. SysUtils,
  38. Messages,
  39. Classes,
  40. Graphics,
  41. Controls,
  42. Forms,
  43. Dialogs,
  44. MMSystem,
  45. MMUtils,
  46. MMString,
  47. MMObj;
  48. type
  49. EMMHiTimerError = class(Exception);
  50. {$IFDEF WIN32}
  51. TMMHiTimer = class;
  52. {-- TMMTimerThread ---------------------------------------------------}
  53. TMMTimerThread = class(TThread)
  54. {$ENDIF}
  55. {-- TMMHiTimer -------------------------------------------------------}
  56. TMMHiTimer = class(TMMComponent)
  57. public
  58. constructor Create(AOwner:TComponent); override;
  59. destructor Destroy; override;
  60. {$IFDEF WIN32}
  61. procedure SynchronizeVCL(VCLProc: TThreadMethod);
  62. {$ENDIF}
  63. published
  64. property CallBackMode: TMMCBMode read FCallBackMode write SetCallBackMode default cmWindow;
  65. property Enabled: Boolean read FEnabled write SetEnabled default True;
  66. property Interval: integer read FInterval write SetInterval default 1000;
  67. property OnTimer: TNotifyEvent read FOnTimer write SetOnTimer;
  68. {$IFDEF WIN32}
  69. property Priority: TThreadPriority read FPriority write SetPriority default tpNormal;
  70. property Synchronize: Boolean read FSynchronize write FSynchronize default True;
  71. property WaitForTerminate: Boolean read FWaitForTerminate write FWaitForTerminate default False;
  72. {$ENDIF}
  73. end;
  74. implementation