home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: wppower.xh.
- * Generated using:
- * SOM Precompiler spc: 1.22
- * SOM Emitter emitxh: 1.11
- */
-
- /*
- *
- * Module Header
- *
- * Module Name: WPPOWER
- *
- * OS/2 Presentation Manager Workplace class definitions
- *
- * Copyright (c) International Business Machines Corporation 1991, 1992
- *
- */
-
- #ifndef wppower_xh
- #define wppower_xh
- class WPPower;
-
- #define WPPower_MajorVersion 1
- #define WPPower_MinorVersion 2
-
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
- #define OPEN_STATUS 131
- #define OPEN_BATTERY 132
- /* C++ som defs */
- #include <somcls.xh>
-
- /* C++ parent def */
- #ifndef wpabs_xh
- #include "wpabs.xh"
- #endif
-
- #ifndef WPPower_API
- #define WPPower_API
- /*
- * The Class API
- */
-
- /* A procedure to create the WPPower Class */
- SOMEXTERN SOMClass * SOMLINK WPPowerNewClass(
- integer4 majorVersion,
- integer4 minorVersion);
-
- /* A macro to return the WPPower class object */
- class M_WPPower;
- #define _WPPower ((M_WPPower*)WPPowerClassData.classObject)
-
- /* The static interface to WPPower and its instances */
- SOMEXTERN struct WPPowerClassDataStructure {
- SOMClass *classObject;
- somMToken wpChangePowerState;
- somMToken wpSetPowerManagement;
- somMToken wpQueryPowerManagement;
- somMToken wpSetPowerConfirmation;
- somMToken wpQueryPowerConfirmation;
- somMToken wpAddPowerPage;
- somMToken wpAddPowerViewPage;
- somMToken wpSetAutoRefresh;
- somMToken wpQueryAutoRefresh;
- somMToken wpQueryRefreshRate;
- somMToken wpSetRefreshRate;
- somMToken wpQueryEventSemaphore;
- somMToken wpSetEventSemaphore;
- somMToken wpQueryDefStatusView;
- somMToken wpSetDefStatusView;
- } WPPowerClassData;
-
- /*
- * -- Typedefs for Procedures that support WPPower Methods
- */
- extern "C" {
- typedef ULONG (SOMLINK *somTD_WPPower_wpAddPowerPage)(WPPower *somSelf,HWND hwndNotebook);
- typedef ULONG (SOMLINK *somTD_WPPower_wpAddPowerViewPage)(WPPower *somSelf,HWND hwndNotebook);
- typedef BOOL (SOMLINK *somTD_WPPower_wpChangePowerState)(WPPower *somSelf,ULONG ulParm1,ULONG ulParm2);
- typedef BOOL (SOMLINK *somTD_WPPower_wpQueryAutoRefresh)(WPPower *somSelf);
- typedef ULONG (SOMLINK *somTD_WPPower_wpQueryDefStatusView)(WPPower *somSelf);
- typedef BOOL (SOMLINK *somTD_WPPower_wpQueryPowerConfirmation)(WPPower *somSelf);
- typedef BOOL (SOMLINK *somTD_WPPower_wpQueryPowerManagement)(WPPower *somSelf);
- typedef ULONG (SOMLINK *somTD_WPPower_wpQueryRefreshRate)(WPPower *somSelf);
- typedef VOID (SOMLINK *somTD_WPPower_wpSetAutoRefresh)(WPPower *somSelf,BOOL fAutoRefresh);
- typedef VOID (SOMLINK *somTD_WPPower_wpSetDefStatusView)(WPPower *somSelf,ULONG ulDefStatus);
- typedef VOID (SOMLINK *somTD_WPPower_wpSetPowerConfirmation)(WPPower *somSelf,BOOL fConfirm);
- typedef BOOL (SOMLINK *somTD_WPPower_wpSetPowerManagement)(WPPower *somSelf,BOOL fPower);
- typedef BOOL (SOMLINK *somTD_WPPower_wpSetRefreshRate)(WPPower *somSelf,ULONG ulRefreshRate);
- }
-
-
- #endif /* WPPower_API */
-
-
- /*
- * -- The C++ Wrapper Class for WPPower
- */
- class WPPower : public WPAbstract
- {
- public:
-
- void *operator new(size_t size)
- {
- (void) size;
- if (!WPPowerClassData.classObject)
- WPPowerNewClass(WPPower_MajorVersion,WPPower_MinorVersion);
- return (void *)
- ((somTD_SOMClass_somNew)
- somResolve(SOM_TestCls((SOMAny *)(WPPowerClassData.classObject),
- SOMClassClassData.classObject),
- SOMClassClassData.somNew))
- ((SOMClass*)(WPPowerClassData.classObject));
- }
-
- void operator delete(void * obj)
- {
- ((SOMObject *)obj)->somFree();
- }
-
- /* public method: wpAddPowerPage */
- ULONG wpAddPowerPage(HWND hwndNotebook)
- {
- return (ULONG) SOM_Resolve((SOMAny *)this,WPPower,wpAddPowerPage)
- (this,hwndNotebook);
- }
-
-
- /* public method: wpAddPowerViewPage */
- ULONG wpAddPowerViewPage(HWND hwndNotebook)
- {
- return (ULONG) SOM_Resolve((SOMAny *)this,WPPower,wpAddPowerViewPage)
- (this,hwndNotebook);
- }
-
-
- /* public method: wpChangePowerState */
- BOOL wpChangePowerState(ULONG ulParm1,
- ULONG ulParm2)
- {
- return (BOOL) SOM_Resolve((SOMAny *)this,WPPower,wpChangePowerState)
- (this,ulParm1,ulParm2);
- }
-
-
- /* public method: wpQueryAutoRefresh */
- BOOL wpQueryAutoRefresh()
- {
- return (BOOL) SOM_Resolve((SOMAny *)this,WPPower,wpQueryAutoRefresh)
- (this);
- }
-
-
- /* public method: wpQueryDefStatusView */
- ULONG wpQueryDefStatusView()
- {
- return (ULONG) SOM_Resolve((SOMAny *)this,WPPower,wpQueryDefStatusView)
- (this);
- }
-
-
- /* public method: wpQueryPowerConfirmation */
- BOOL wpQueryPowerConfirmation()
- {
- return (BOOL) SOM_Resolve((SOMAny *)this,WPPower,wpQueryPowerConfirmation)
- (this);
- }
-
-
- /* public method: wpQueryPowerManagement */
- BOOL wpQueryPowerManagement()
- {
- return (BOOL) SOM_Resolve((SOMAny *)this,WPPower,wpQueryPowerManagement)
- (this);
- }
-
-
- /* public method: wpQueryRefreshRate */
- ULONG wpQueryRefreshRate()
- {
- return (ULONG) SOM_Resolve((SOMAny *)this,WPPower,wpQueryRefreshRate)
- (this);
- }
-
-
- /* public method: wpSetAutoRefresh */
- VOID wpSetAutoRefresh(BOOL fAutoRefresh)
- {
- SOM_Resolve((SOMAny *)this,WPPower,wpSetAutoRefresh)
- (this,fAutoRefresh);
- }
-
-
- /* public method: wpSetDefStatusView */
- VOID wpSetDefStatusView(ULONG ulDefStatus)
- {
- SOM_Resolve((SOMAny *)this,WPPower,wpSetDefStatusView)
- (this,ulDefStatus);
- }
-
-
- /* public method: wpSetPowerConfirmation */
- VOID wpSetPowerConfirmation(BOOL fConfirm)
- {
- SOM_Resolve((SOMAny *)this,WPPower,wpSetPowerConfirmation)
- (this,fConfirm);
- }
-
-
- /* public method: wpSetPowerManagement */
- BOOL wpSetPowerManagement(BOOL fPower)
- {
- return (BOOL) SOM_Resolve((SOMAny *)this,WPPower,wpSetPowerManagement)
- (this,fPower);
- }
-
-
- /* public method: wpSetRefreshRate */
- BOOL wpSetRefreshRate(ULONG ulRefreshRate)
- {
- return (BOOL) SOM_Resolve((SOMAny *)this,WPPower,wpSetRefreshRate)
- (this,ulRefreshRate);
- }
-
-
-
- }; /* WPPower */
-
-
-
- #endif /* wppower_xh */
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: wppower.xh.
- * Generated using:
- * SOM Precompiler spc: 1.22
- * SOM Emitter emitxh: 1.11
- */
- #ifndef wppower_mxh
- #define wppower_mxh
- class M_WPPower;
-
- #define M_WPPower_MajorVersion 1
- #define M_WPPower_MinorVersion 2
-
- /* C++ som defs */
- #include <somcls.xh>
-
- /* C++ parent def */
- #ifndef wpabs_xh
- #include "wpabs.xh"
- #endif
-
- #ifndef M_WPPower_API
- #define M_WPPower_API
- /*
- * The Class API
- */
-
- /* A procedure to create the M_WPPower Class */
- SOMEXTERN SOMClass * SOMLINK M_WPPowerNewClass(
- integer4 majorVersion,
- integer4 minorVersion);
-
- /* A macro to return the M_WPPower class object */
- #define _M_WPPower ((SOMClass*)M_WPPowerClassData.classObject)
-
- /* The static interface to M_WPPower and its instances */
- SOMEXTERN struct M_WPPowerClassDataStructure {
- SOMClass *classObject;
- } M_WPPowerClassData;
-
- /*
- * -- Typedefs for Procedures that support M_WPPower Methods
- */
- extern "C" {
- }
-
-
- #endif /* M_WPPower_API */
-
-
- /*
- * -- The C++ Wrapper Class for M_WPPower
- */
- class M_WPPower : public M_WPAbstract
- {
- public:
-
- void *operator new(size_t size)
- {
- (void) size;
- if (!M_WPPowerClassData.classObject)
- M_WPPowerNewClass(M_WPPower_MajorVersion,M_WPPower_MinorVersion);
- return (void *)
- ((somTD_SOMClass_somNew)
- somResolve(SOM_TestCls((SOMAny *)(M_WPPowerClassData.classObject),
- SOMClassClassData.classObject),
- SOMClassClassData.somNew))
- ((SOMClass*)(M_WPPowerClassData.classObject));
- }
-
- void operator delete(void * obj)
- {
- ((SOMObject *)obj)->somFree();
- }
-
-
- }; /* M_WPPower */
-
-
-
- #endif /* wppower_mxh */
-