home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / idl / wppower.idl < prev    next >
Text File  |  1999-03-15  |  9KB  |  247 lines

  1.  
  2. //  Module Header
  3. //
  4. //  Module Name: WPPOWER
  5. //
  6. //  OS/2 Presentation Manager Workplace class definitions
  7. //
  8. //  Copyright (c) International Business Machines Corporation 1991, 1992
  9. //
  10.  
  11. #ifndef wppower_idl
  12. #define wppower_idl
  13.  
  14. #include "wpabs.idl"
  15. #include <somcls.idl>
  16.  
  17. typedef USHORT TID;
  18.  
  19. interface M_WPPower;
  20.  
  21. interface WPPower : WPAbstract
  22.  
  23. {
  24.  
  25.   ULONG wpAddPowerPage(in HWND hwndNotebook);
  26.  
  27. #ifdef _PPC_                                           
  28.   ULONG wpAddPowerPage2(in HWND hwndNotebook);
  29.  
  30. #endif                                                 
  31.  
  32.   ULONG wpAddPowerResumePage(in HWND hwndNotebook);                             
  33.  
  34.   ULONG wpAddPowerViewPage(in HWND hwndNotebook);
  35.  
  36. #ifndef _PPC_
  37.   BOOL wpChangePowerState(in ULONG ulParm1,
  38.                           in ULONG ulParm2);
  39.  
  40. #endif
  41.  
  42. #ifdef _PPC_                                           
  43.   BOOL wpChangePPCPowerState(in ULONG ulParm1,
  44.                              in ULONG ulParm2);
  45.  
  46. #endif                                                       
  47.  
  48.   BOOL wpPowerOff(in BOOL bConfirm);                                            
  49.  
  50.   ULONG wpQueryAPMLevel();                                                      
  51.  
  52.   BOOL wpQueryAutoRefresh();
  53.  
  54.   BOOL wpQueryBIOSPowerManagementSupport(out BOOL pbEnable);                    
  55.  
  56.   BOOL wpQueryCapabilities(out ULONG pulBatteryMax,out ULONG pulCapabilities);  
  57.  
  58.   ULONG wpQueryDefStatusView();
  59.  
  60. #ifdef _PPC_                                           
  61.   BOOL wpQueryDischarge();
  62.  
  63. #endif                                                 
  64.  
  65. #ifdef _PPC_                                           
  66.   ULONG wpQueryMachineStateSettings(in ULONG ulEvent);
  67.  
  68. #endif                                                 
  69.  
  70.   BOOL wpQueryOS2PowerManagementSupport(out BOOL pbEnable);                     
  71.  
  72.   BOOL wpQueryPowerConfirmation();
  73.  
  74.   BOOL wpQueryPowerManagement();
  75.  
  76.   ULONG wpQueryRefreshRate();
  77.  
  78.   BOOL wpQueryResumeOnRing(out BOOL pbEnable);                                  
  79.  
  80.   BOOL wpQueryResumeOnTimer(out BOOL  pbEnable,                                 
  81.                             out ULONG pulYear,
  82.                             out ULONG pulMonth,
  83.                             out ULONG pulDay,
  84.                             out ULONG pulHour,
  85.                             out ULONG pulMinute,
  86.                             out ULONG pulSecond);
  87.  
  88.   BOOL wpQueryTimerBasedRequests(out BOOL pbEnable);                            
  89.  
  90.   VOID wpRefreshNotebookPages();                                                
  91.  
  92.   VOID wpSetAutoRefresh(in BOOL fAutoRefresh);
  93.  
  94.   BOOL wpSetBIOSPowerManagementSupport(in BOOL bEnable);                        
  95.  
  96.   VOID wpSetDefStatusView(in ULONG ulDefStatus);
  97.  
  98. #ifdef _PPC_                                           
  99.   BOOL wpSetDischarge(in BOOL bDischarge);
  100.  
  101. #endif                                                 
  102.  
  103. #ifdef _PPC_                                           
  104.   BOOL wpSetMachineStateSettings(in ULONG ulEvent, in ULONG ulState);
  105.  
  106. #endif                                                 
  107.  
  108.   BOOL wpSetOS2PowerManagementSupport(in BOOL bEnable);                         
  109.  
  110.   VOID wpSetPowerConfirmation(in BOOL fConfirm);
  111.  
  112.   BOOL wpSetPowerManagement(in BOOL fPower);
  113.  
  114.   BOOL wpSetRefreshRate(in ULONG ulRefreshRate);
  115.  
  116.   BOOL wpSetResumeOnRing(in BOOL bEnable);                                      
  117.  
  118.   BOOL wpSetResumeOnTimer(in BOOL  bEnable,                                     
  119.                           in ULONG ulYear,
  120.                           in ULONG ulMonth,
  121.                           in ULONG ulDay,
  122.                           in ULONG ulHour,
  123.                           in ULONG ulMinute,
  124.                           in ULONG ulSecond);
  125.  
  126.   BOOL wpSetTimerBasedRequests(in BOOL bEnable);                                
  127.  
  128.   BOOL wpSuspend(in BOOL bConfirm);                                             
  129.  
  130.  
  131. #ifdef __SOMIDL__
  132.   implementation {
  133.  
  134.     releaseorder: wpChangePowerState,wpSetPowerManagement,wpQueryPowerManagement,
  135.                   wpSetPowerConfirmation,wpQueryPowerConfirmation,
  136.                   wpAddPowerPage,wpAddPowerViewPage,wpSetAutoRefresh,
  137.                   wpQueryAutoRefresh,wpQueryRefreshRate,wpSetRefreshRate,
  138.                   wpPowerPrivate1, wpPowerPrivate2,
  139.                   wpQueryDefStatusView,
  140.                   wpSetDefStatusView,
  141. #ifdef _PPC_                                                          
  142.                   wpAddPowerPage2,wpQueryMachineStateSettings,
  143.                   wpSetMachineStateSettings,wpQueryDischarge,wpSetDischarge,
  144.                   wpChangePPCPowerState
  145. #endif                                                                
  146.                   wpAddPowerResumePage,                                         
  147.                   wpPowerPrivate3,                                              
  148.                   wpQueryAPMLevel,                                              
  149.                   wpQueryBIOSPowerManagementSupport,wpSetBIOSPowerManagementSupport, 
  150.                   wpQueryOS2PowerManagementSupport,wpSetOS2PowerManagementSupport, 
  151.                   wpQueryTimerBasedRequests,wpSetTimerBasedRequests,            
  152.                   wpQueryResumeOnRing,wpSetResumeOnRing,                        
  153.                   wpQueryResumeOnTimer,wpSetResumeOnTimer,                      
  154.                   wpQueryCapabilities,                                          
  155.                   wpPowerOff,wpSuspend,wpRefreshNotebookPages;                  
  156.  
  157.     externalstem = WPPower;
  158.     local;
  159.     externalprefix = pwr_;
  160.     majorversion = 1;
  161.     minorversion = 2;
  162.     filestem = wppower;
  163.     metaclass = M_WPPower;
  164.     callstyle = oidl;
  165.     dllname = "wpconfig.dll";
  166.  
  167.     passthru C_h =
  168. "    #define OPEN_STATUS  131"
  169. "    #define OPEN_BATTERY 132"
  170. ""
  171. "    #define APMLEVEL_NONE    0"                                                
  172. "    #define APMLEVEL_UNKNOWN 1"                                                
  173. "    #define APMLEVEL_10      2"                                                
  174. "    #define APMLEVEL_11      3"                                                
  175. "    #define APMLEVEL_12      4"                                                
  176. ""                                                                              
  177. #ifdef _PPC_                                             
  178. "    #define QWL_POWERPAGE2 QWL_USER+sizeof(ULONG)"
  179. #endif                                                   
  180. "";
  181.  
  182.     ULONG ulAPMLevel;                                                           
  183.     BOOL  bBIOSPowerManagementSupport;                                          
  184.     BOOL  bOS2PowerManagementSupport;                                           
  185.     BOOL  bTimerBasedRequests;                                                  
  186.     BOOL  bResumeOnRing;                                                        
  187.     BOOL  bResumeOnTimer;                                                       
  188.     ULONG ulResumeYear;                                                         
  189.     ULONG ulResumeMonth;                                                        
  190.     ULONG ulResumeDay;                                                          
  191.     ULONG ulResumeHour;                                                         
  192.     ULONG ulResumeMinute;                                                       
  193.     ULONG ulResumeSecond;                                                       
  194.     ULONG ulBatteryMax;                                                         
  195.     ULONG ulCapabilities;                                                       
  196.     ULONG ulDialogRevision;                                                     
  197.  
  198.     wpAddObjectWindowPage: override;
  199.     wpAddSettingsPages: override;
  200.     wpFilterMenu: override;                                                     
  201.     wpInitData: override;
  202.     wpMenuItemHelpSelected: override;
  203.     wpMenuItemSelected: override;
  204.     wpModifyMenu: override;                                                     
  205.     wpObjectReady: override;                                                    
  206.     wpOpen: override;
  207.     wpRestoreState: override;
  208.     wpSaveState: override;
  209.     wpSetup: override;                                                          
  210.     wpUnInitData: override;                                                     
  211.     somDefaultInit: override;             
  212.     somDestruct:    override;             
  213.  
  214.  
  215.   };
  216. #endif /* __SOMIDL__ */
  217. };
  218.  
  219. interface M_WPPower : M_WPAbstract
  220. {
  221.  
  222. #ifdef __SOMIDL__
  223.   implementation {
  224.  
  225.     externalstem = WPPower;
  226.     local;
  227.     externalprefix = pwrM_;
  228.     majorversion = 1;
  229.     minorversion = 2;
  230.     filestem = wppower;
  231.     callstyle = oidl;
  232.     dllname = "wpconfig.dll";
  233.  
  234.     wpclsInitData: override;                                                    
  235.     wpclsQueryDefaultHelp: override;
  236.     wpclsQueryDefaultView: override;
  237.     wpclsQueryIconData: override;
  238.     wpclsQueryStyle: override;
  239.     wpclsQueryTitle: override;
  240.     wpclsUnInitData: override;                                                  
  241.  
  242.   };
  243. #endif /* __SOMIDL__ */
  244. };
  245.  
  246. #endif  /* wppower_idl */
  247.