home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
warphead.zip
/
H
/
WPCLRPAL.XH
< prev
next >
Wrap
Text File
|
1997-07-09
|
9KB
|
354 lines
/*
* This file was generated by the SOM Compiler.
* FileName: E:\cwpsh\rel\os2c\include\base\os2\wpclrpal.xh.
* Generated using:
* SOM Precompiler somipc: 2.29.1.14
* SOM Emitter emitxh: 2.43
*/
/*
* Module Header
*
* Module Name: WPCLRPAL
*
* OS/2 Presentation Manager Workplace class definitions
*
* Copyright (c) International Business Machines Corporation 1991, 1992
*
*/
#ifndef SOM_WPColorPalette_xh
#define SOM_WPColorPalette_xh
class WPColorPalette;
#define WPColorPalette_MajorVersion 1
#define WPColorPalette_MinorVersion 2
/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>
/* C++ parent defs */
#ifndef SOM_WPPalette_xh
#include <wppalet.xh>
#endif
#ifndef WPColorPalette_API
#define WPColorPalette_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_WPPalette;
class M_WPColorPalette;
/*
* End of bindings for IDL types.
*/
/*
* Passthru lines: File: "C.h", "after"
*/
/* Paintpot structure */
typedef struct _PAINTPOT
{
CELL cell; /* Size of the data that follows */
ULONG ulRGB; /* Color of this paintpot */
} PAINTPOT;
typedef PAINTPOT *PPAINTPOT;
/* A procedure to create the WPColorPalette Class */
class M_WPColorPalette;
SOMEXTERN M_WPColorPalette * SOMLINK WPColorPaletteNewClass(
integer4 majorVersion,
integer4 minorVersion);
/* The API to the WPColorPalette class object, and the methods it introduces. */
SOMEXTERN struct WPColorPaletteClassDataStructure {
M_WPColorPalette *classObject;
} SOMDLINK WPColorPaletteClassData;
#define _WPColorPalette WPColorPaletteClassData.classObject
/* The API to parentMtabs for WPColorPalette, and the instance data it introduces. */
SOMEXTERN struct WPColorPaletteCClassDataStructure {
somMethodTabs parentMtab;
somDToken instanceDataToken;
} SOMDLINK WPColorPaletteCClassData;
/*
* -- Typedefs for WPColorPalette Method Procedures
*/
SOMEXTERN {
/*
* -- Typedefs for Reintroduced Wrapper Methods
*/
typedef M_WPColorPalette* SOMLINK somTP_WPColorPalette_somGetClass(WPColorPalette *somSelf);
typedef somTP_WPColorPalette_somGetClass *somTD_WPColorPalette_somGetClass;
}
#endif /* WPColorPalette_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 WPColorPalette
*/
class WPColorPalette : public WPPalette
{
public:
// WPColorPalette::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 (!_WPColorPalette) WPColorPaletteNewClass(WPColorPalette_MajorVersion,WPColorPalette_MinorVersion);
return (void*)
SOM_Resolve(_WPColorPalette,SOMClass,somNewNoInit)
((SOMClass *)((void*)_WPColorPalette));
}
// WPColorPalette::delete uses somDestruct.
void operator delete(void * obj)
{
if (obj && *(void**)obj) {
SOM_Resolve(obj,SOMObject,somDestruct)
((SOMObject*)obj, 1, 0);
}
}
WPColorPalette& operator=(WPColorPalette& fromObj)
{
this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
return *this;
}
WPColorPalette()
{
if (*(void**)this !=
((somParentMtabStructPtr)
(WPColorPaletteCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultInit(0);
}
WPColorPalette(WPColorPalette* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(WPColorPaletteCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}
WPColorPalette(const WPColorPalette* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(WPColorPaletteCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
/*
* Reintroduce inherited methods
*/
/* method: somGetClass */
M_WPColorPalette* somGetClass()
{
/*
* Return the receiver's class.
*/
return SOM_ResolveD(this,WPColorPalette,SOMObject,somGetClass)
(this);
}
}; /* WPColorPalette */
#endif /* SOM_WPColorPalette_xh */
#ifndef SOM_M_WPColorPalette_xh
#define SOM_M_WPColorPalette_xh
class M_WPColorPalette;
#define M_WPColorPalette_MajorVersion 1
#define M_WPColorPalette_MinorVersion 2
/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>
/* C++ parent defs */
#ifndef SOM_M_WPPalette_xh
#include <wppalet.xh>
#endif
#ifndef M_WPColorPalette_API
#define M_WPColorPalette_API
/*
* -- The Class API
*/
/*
* Start of bindings for IDL types
*/
/*
* End of bindings for IDL types.
*/
/*
* -- M_WPColorPalette is a metaclass for WPColorPalette. Make sure WPColorPalette is known.
*/
class WPColorPalette;
/* A procedure to create the M_WPColorPalette Class */
SOMEXTERN SOMClass * SOMLINK M_WPColorPaletteNewClass(
integer4 majorVersion,
integer4 minorVersion);
/* The API to the M_WPColorPalette class object, and the methods it introduces. */
SOMEXTERN struct M_WPColorPaletteClassDataStructure {
SOMClass *classObject;
} SOMDLINK M_WPColorPaletteClassData;
#define _M_WPColorPalette M_WPColorPaletteClassData.classObject
/* The API to parentMtabs for M_WPColorPalette, and the instance data it introduces. */
SOMEXTERN struct M_WPColorPaletteCClassDataStructure {
somMethodTabs parentMtab;
somDToken instanceDataToken;
} SOMDLINK M_WPColorPaletteCClassData;
/*
* -- Typedefs for M_WPColorPalette Method Procedures
*/
SOMEXTERN {
/*
* -- Typedefs for Reintroduced Wrapper Methods
*/
typedef WPColorPalette* SOMLINK somTP_M_WPColorPalette_somNew(M_WPColorPalette *somSelf);
typedef somTP_M_WPColorPalette_somNew *somTD_M_WPColorPalette_somNew;
}
#endif /* M_WPColorPalette_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_WPColorPalette
*/
class M_WPColorPalette : public M_WPPalette
{
public:
// M_WPColorPalette::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_WPColorPalette) M_WPColorPaletteNewClass(M_WPColorPalette_MajorVersion,M_WPColorPalette_MinorVersion);
return (void*)
SOM_Resolve(_M_WPColorPalette,SOMClass,somNewNoInit)
((SOMClass *)((void*)_M_WPColorPalette));
}
// M_WPColorPalette::delete uses somDestruct.
void operator delete(void * obj)
{
if (obj && *(void**)obj) {
SOM_Resolve(obj,SOMObject,somDestruct)
((SOMObject*)obj, 1, 0);
}
}
M_WPColorPalette& operator=(M_WPColorPalette& fromObj)
{
this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
return *this;
}
M_WPColorPalette()
{
if (*(void**)this !=
((somParentMtabStructPtr)
(M_WPColorPaletteCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultInit(0);
}
M_WPColorPalette(M_WPColorPalette* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(M_WPColorPaletteCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}
M_WPColorPalette(const M_WPColorPalette* fromObj)
{
if (*(void**)this !=
((somParentMtabStructPtr)
(M_WPColorPaletteCClassData.parentMtab))->mtab)
return;
((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}
/*
* Reintroduce inherited methods
*/
/* method: somNew */
WPColorPalette* somNew()
{
return SOM_ResolveD(this,M_WPColorPalette,SOMClass,somNew)
(this);
}
}; /* M_WPColorPalette */
#endif /* SOM_M_WPColorPalette_xh */