home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / central / LTSMSupport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  69 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #include <TextServices.h>
  20. #ifndef __LTSMSUPPORT__
  21. #define __LTSMSUPPORT__
  22.  
  23. #include <TSMTE.h>
  24.  
  25. //    ftang:
  26. //    LTSMSupport handle the following TSM stuff:
  27. //        InitTSMAwareApplication()    - in Initalize() => BeginTextServices()
  28. //        CloseTSMAwareApplication()  - in DoQuit() => EndTextServices()
  29. //        TSMEvent()                     - in TSMEvent()
  30. //        SetTSMCursor()                 - in SetTSMCursor()
  31. //
  32. //    LTSMSupport handle the following TSM stuff:
  33. //        NewTSMDocument()
  34. //        DeleteTSMDocument()
  35. //        ActiveTSMDocument()
  36. //        DeactivateTSMDocument()
  37. //        FixTSMDocument()
  38. //
  39. //    The following TSM stuff will not be handle:
  40. //        TSMMenuSelect() : We only deal with input method. Therefore, ignore it
  41. //                            See IM-Text 7-22
  42.  
  43. class    LTSMSupport {
  44. public:
  45.     static void                Initialize();
  46.     static void                DoQuit(Int32    inSaveOption);
  47.     static Boolean            TSMEvent(const EventRecord &inMacEvent);        
  48.     static Boolean            SetTSMCursor(Point mousePos);
  49.     
  50.     static Boolean            HasTextServices();
  51.     static Boolean            HasTSMTE();
  52.     
  53.     static TSMTEPreUpdateUPP    GetDefaultTSMTEPreUpdateUPP();
  54.     static TSMTEPostUpdateUPP    GetDefaultTSMTEPostUpdateUPP();
  55.     
  56.     static void             StartFontScriptLimit();
  57.      static void             StartFontScriptLimit( ScriptCode scriptcode );
  58.     
  59.     static void                EndFontScriptLimit();
  60.     
  61. protected:
  62.     static void                CheckForTextServices(void);    
  63.     static void                BeginTextServices(void);
  64.     static void             TSMTENewUPP();
  65.  
  66. };
  67.  
  68. #endif
  69.