home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
warphead.zip
/
H
/
WPPOWER.XH
< prev
next >
Wrap
Text File
|
1997-07-09
|
12KB
|
501 lines
/*
* This file was generated by the SOM Compiler.
* FileName: E:\cwpsh\rel\os2c\include\base\os2\wppower.xh.
* Generated using:
* SOM Precompiler somipc: 2.29.1.14
* SOM Emitter emitxh: 2.43
*/
/*
* Module Header
*
* Module Name: WPPOWER
*
* OS/2 Presentation Manager Workplace class definitions
*
* Copyright (c) International Business Machines Corporation 1991, 1992
*
*/
#ifndef SOM_WPPower_xh
#define SOM_WPPower_xh
class WPPower;
#define WPPower_MajorVersion 1
#define WPPower_MinorVersion 2
/*
* Passthru lines: File: "C.h", "before"
*/
#define OPEN_STATUS 131
#define OPEN_BATTERY 132
/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>
/* C++ parent defs */
#ifndef SOM_WPAbstract_xh
#include <wpabs.xh>
#endif
#ifndef WPPower_API
#define WPPower_API
/*
* -- The Class API
*/
/*
* Start of bindings for IDL types
*/
class SOMClass;
class SOMObject;
class WPFolder;
class M_WPObject;
class WPObject;
class WPImageFile;
class M_WPAbstract;
class M_WPPower;
/*
* End of bindings for IDL types.
*/
/* A procedure to create the WPPower Class */
class M_WPPower;
SOMEXTERN M_WPPower * SOMLINK WPPowerNewClass(
integer4 majorVersion,
integer4 minorVersion);
/* The API to the WPPower class object, and the methods it introduces. */
SOMEXTERN struct WPPowerClassDataStructure {
M_WPPower *classObject;
somMToken wpChangePowerState;
somMToken wpSetPowerManagement;
somMToken wpQueryPowerManagement;
somMToken wpSetPowerConfirmation;
somMToken wpQueryPowerConfirmation;
somMToken wpAddPowerPage;
somMToken wpAddPowerViewPage;
somMToken wpSetAutoRefresh;
somMToken wpQueryAutoRefresh;
somMToken wpQueryRefreshRate;
somMToken wpSetRefreshRate;
somMToken wpPowerPrivate1;
somMToken wpPowerPrivate2;
somMToken wpQueryDefStatusView;
somMToken wpSetDefStatusView;
} SOMDLINK WPPowerClassData;
#define _WPPower WPPowerClassData.classObject
/* The API to parentMtabs for WPPower, and the instance data it introduces. */
SOMEXTERN struct WPPowerCClassDataStructure {
somMethodTabs parentMtab;
somDToken instanceDataToken;
} SOMDLINK WPPowerCClassData;
/*
* -- Typedefs for WPPower Method Procedures
*/
SOMEXTERN {
typedef ULONG SOMLINK somTP_WPPower_wpAddPowerPage(WPPower *somSelf,
HWND hwndNotebook);
typedef somTP_WPPower_wpAddPowerPage *somTD_WPPower_wpAddPowerPage;
typedef ULONG SOMLINK somTP_WPPower_wpAddPowerViewPage(WPPower *somSelf,
HWND hwndNotebook);
typedef somTP_WPPower_wpAddPowerViewPage *somTD_WPPower_wpAddPowerViewPage;
typedef BOOL SOMLINK somTP_WPPower_wpChangePowerState(WPPower *somSelf,
ULONG ulParm1,
ULONG ulParm2);
typedef somTP_WPPower_wpChangePowerState *somTD_WPPower_wpChangePowerState;
typedef BOOL SOMLINK somTP_WPPower_wpQueryAutoRefresh(WPPower *somSelf);
typedef somTP_WPPower_wpQueryAutoRefresh *somTD_WPPower_wpQueryAutoRefresh;
typedef ULONG SOMLINK somTP_WPPower_wpQueryDefStatusView(WPPower *somSelf);
typedef somTP_WPPower_wpQueryDefStatusView *somTD_WPPower_wpQueryDefStatusView;
typedef BOOL SOMLINK somTP_WPPower_wpQueryPowerConfirmation(WPPower *somSelf);
typedef somTP_WPPower_wpQueryPowerConfirmation *somTD_WPPower_wpQueryPowerConfirmation;
typedef BOOL SOMLINK somTP_WPPower_wpQueryPowerManagement(WPPower *somSelf);
typedef somTP_WPPower_wpQueryPowerManagement *somTD_WPPower_wpQueryPowerManagement;
typedef ULONG SOMLINK somTP_WPPower_wpQueryRefreshRate(WPPower *somSelf);
typedef somTP_WPPower_wpQueryRefreshRate *somTD_WPPower_wpQueryRefreshRate;
typedef void SOMLINK somTP_WPPower_wpSetAutoRefresh(WPPower *somSelf,
BOOL fAutoRefresh);
typedef somTP_WPPower_wpSetAutoRefresh *somTD_WPPower_wpSetAutoRefresh;
typedef void SOMLINK somTP_WPPower_wpSetDefStatusView(WPPower *somSelf,
ULONG ulDefStatus);
typedef somTP_WPPower_wpSetDefStatusView *somTD_WPPower_wpSetDefStatusView;
typedef void SOMLINK somTP_WPPower_wpSetPowerConfirmation(WPPower *somSelf,
BOOL fConfirm);
typedef somTP_WPPower_wpSetPowerConfirmation *somTD_WPPower_wpSetPowerConfirmation;
typedef BOOL SOMLINK somTP_WPPower_wpSetPowerManagement(WPPower *somSelf,
BOOL fPower);
typedef somTP_WPPower_wpSetPowerManagement *somTD_WPPower_wpSetPowerManagement;
typedef BOOL SOMLINK somTP_WPPower_wpSetRefreshRate(WPPower *somSelf,
ULONG ulRefreshRate);
typedef somTP_WPPower_wpSetRefreshRate *somTD_WPPower_wpSetRefreshRate;
/*
* -- Typedefs for Reintroduced Wrapper Methods
*/
typedef M_WPPower* SOMLINK somTP_WPPower_somGetClass(WPPower *somSelf);
typedef somTP_WPPower_somGetClass *somTD_WPPower_somGetClass;
}
#endif /* WPPower_API */
/*
* -- This emitter treats Method Tokens as Thunks by default.
* -- Use the sc modifier "nothunks" to change this default
*/
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
/*
* -- The C++ Wrapper Class for WPPower
*/
class WPPower : public WPAbstract
{
public:
// WPPower::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
if (!_WPPower) WPPowerNewClass(WPPower_MajorVersion,WPPower_MinorVersion);
return (void*)
SOM_Resolve(_WPPower,SOMClass,somNewNoInit)
((SOMClass *)((void*)_WPPower));
}
// WPPower::delete uses somDestruct.
void operator delete(void * obj)
{
if (obj && *(void**)obj) {
SOM_Resolve(obj,SOMObject,somDestruct)
((SOMObject*)obj, 1, 0);
}
}
WPPower& operator=(WPPower& fromObj)
{
this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
return *this;
}
WPPower()
{
if (*(void**)this !=
((somParentMtabStructPtr)
(WPPowerCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultInit(0);
}
WPPower(WPPower* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(WPPowerCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}
WPPower(const WPPower* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(WPPowerCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
/* method: wpAddPowerPage */
ULONG wpAddPowerPage(HWND hwndNotebook)
{
return SOM_ResolveD(this,WPPower,WPPower,wpAddPowerPage)
(this,hwndNotebook);
}
/* method: wpAddPowerViewPage */
ULONG wpAddPowerViewPage(HWND hwndNotebook)
{
return SOM_ResolveD(this,WPPower,WPPower,wpAddPowerViewPage)
(this,hwndNotebook);
}
/* method: wpChangePowerState */
BOOL wpChangePowerState(ULONG ulParm1,
ULONG ulParm2)
{
return SOM_ResolveD(this,WPPower,WPPower,wpChangePowerState)
(this,ulParm1,ulParm2);
}
/* method: wpQueryAutoRefresh */
BOOL wpQueryAutoRefresh()
{
return SOM_ResolveD(this,WPPower,WPPower,wpQueryAutoRefresh)
(this);
}
/* method: wpQueryDefStatusView */
ULONG wpQueryDefStatusView()
{
return SOM_ResolveD(this,WPPower,WPPower,wpQueryDefStatusView)
(this);
}
/* method: wpQueryPowerConfirmation */
BOOL wpQueryPowerConfirmation()
{
return SOM_ResolveD(this,WPPower,WPPower,wpQueryPowerConfirmation)
(this);
}
/* method: wpQueryPowerManagement */
BOOL wpQueryPowerManagement()
{
return SOM_ResolveD(this,WPPower,WPPower,wpQueryPowerManagement)
(this);
}
/* method: wpQueryRefreshRate */
ULONG wpQueryRefreshRate()
{
return SOM_ResolveD(this,WPPower,WPPower,wpQueryRefreshRate)
(this);
}
/* method: wpSetAutoRefresh */
void wpSetAutoRefresh(BOOL fAutoRefresh)
{
SOM_ResolveD(this,WPPower,WPPower,wpSetAutoRefresh)
(this,fAutoRefresh);
}
/* method: wpSetDefStatusView */
void wpSetDefStatusView(ULONG ulDefStatus)
{
SOM_ResolveD(this,WPPower,WPPower,wpSetDefStatusView)
(this,ulDefStatus);
}
/* method: wpSetPowerConfirmation */
void wpSetPowerConfirmation(BOOL fConfirm)
{
SOM_ResolveD(this,WPPower,WPPower,wpSetPowerConfirmation)
(this,fConfirm);
}
/* method: wpSetPowerManagement */
BOOL wpSetPowerManagement(BOOL fPower)
{
return SOM_ResolveD(this,WPPower,WPPower,wpSetPowerManagement)
(this,fPower);
}
/* method: wpSetRefreshRate */
BOOL wpSetRefreshRate(ULONG ulRefreshRate)
{
return SOM_ResolveD(this,WPPower,WPPower,wpSetRefreshRate)
(this,ulRefreshRate);
}
/*
* Reintroduce inherited methods
*/
/* method: somGetClass */
M_WPPower* somGetClass()
{
/*
* Return the receiver's class.
*/
return SOM_ResolveD(this,WPPower,SOMObject,somGetClass)
(this);
}
}; /* WPPower */
#endif /* SOM_WPPower_xh */
#ifndef SOM_M_WPPower_xh
#define SOM_M_WPPower_xh
class M_WPPower;
#define M_WPPower_MajorVersion 1
#define M_WPPower_MinorVersion 2
/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>
/* C++ parent defs */
#ifndef SOM_M_WPAbstract_xh
#include <wpabs.xh>
#endif
#ifndef M_WPPower_API
#define M_WPPower_API
/*
* -- The Class API
*/
/*
* Start of bindings for IDL types
*/
/*
* End of bindings for IDL types.
*/
/*
* -- M_WPPower is a metaclass for WPPower. Make sure WPPower is known.
*/
class WPPower;
/* A procedure to create the M_WPPower Class */
SOMEXTERN SOMClass * SOMLINK M_WPPowerNewClass(
integer4 majorVersion,
integer4 minorVersion);
/* The API to the M_WPPower class object, and the methods it introduces. */
SOMEXTERN struct M_WPPowerClassDataStructure {
SOMClass *classObject;
} SOMDLINK M_WPPowerClassData;
#define _M_WPPower M_WPPowerClassData.classObject
/* The API to parentMtabs for M_WPPower, and the instance data it introduces. */
SOMEXTERN struct M_WPPowerCClassDataStructure {
somMethodTabs parentMtab;
somDToken instanceDataToken;
} SOMDLINK M_WPPowerCClassData;
/*
* -- Typedefs for M_WPPower Method Procedures
*/
SOMEXTERN {
/*
* -- Typedefs for Reintroduced Wrapper Methods
*/
typedef WPPower* SOMLINK somTP_M_WPPower_somNew(M_WPPower *somSelf);
typedef somTP_M_WPPower_somNew *somTD_M_WPPower_somNew;
}
#endif /* M_WPPower_API */
/*
* -- This emitter treats Method Tokens as Thunks by default.
* -- Use the sc modifier "nothunks" to change this default
*/
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
/*
* -- The C++ Wrapper Class for M_WPPower
*/
class M_WPPower : public M_WPAbstract
{
public:
// M_WPPower::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
if (!_M_WPPower) M_WPPowerNewClass(M_WPPower_MajorVersion,M_WPPower_MinorVersion);
return (void*)
SOM_Resolve(_M_WPPower,SOMClass,somNewNoInit)
((SOMClass *)((void*)_M_WPPower));
}
// M_WPPower::delete uses somDestruct.
void operator delete(void * obj)
{
if (obj && *(void**)obj) {
SOM_Resolve(obj,SOMObject,somDestruct)
((SOMObject*)obj, 1, 0);
}
}
M_WPPower& operator=(M_WPPower& fromObj)
{
this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
return *this;
}
M_WPPower()
{
if (*(void**)this !=
((somParentMtabStructPtr)
(M_WPPowerCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultInit(0);
}
M_WPPower(M_WPPower* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(M_WPPowerCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}
M_WPPower(const M_WPPower* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(M_WPPowerCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
/*
* Reintroduce inherited methods
*/
/* method: somNew */
WPPower* somNew()
{
return SOM_ResolveD(this,M_WPPower,SOMClass,somNew)
(this);
}
}; /* M_WPPower */
#endif /* SOM_M_WPPower_xh */