home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ibmodf.zip / CNTNRPRT.ZIP / CNNOTEBK.XIH < prev    next >
Text File  |  1995-04-13  |  14KB  |  416 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: CNNotebk.xih.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.2
  7.  *     SOM Emitter emitxih: 2.41
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Theory of Operation
  13.  * 
  14.  * 
  15.  *   CNNotebk is implemented as a subclass of ODNotebk. The AddNotebookPages
  16.  *   method is overridden to allow the part to add only the background page. The
  17.  *   InsertBackgroundPage is added to provide the new page.
  18.  * 
  19.  *  Classes defined in this interface
  20.  * 
  21.  */
  22.  
  23.  
  24. /*
  25.  * -- By default, for classes declared using IDL,
  26.  * -- this emitter doesn't define redispatch/apply stubs.
  27.  * -- Instead, it requests that the SOM kernel produce them.
  28.  * -- To override this default, use the "notc" modifier.
  29.  */
  30.  
  31. #ifndef SOM_CNNotebook_xih
  32. #define SOM_CNNotebook_xih
  33.  
  34. #include <somcls.xh>
  35. #include <somcm.xh>
  36.  
  37. #ifndef SOM_CNNotebook_xh
  38. #include <CNNotebk.xh>
  39. #endif
  40.  
  41. /*
  42.  * Set the scope of methods functions
  43.  */
  44. #ifndef SOM_Scope
  45. #define SOM_Scope extern "C"
  46. #endif
  47.  
  48. #define CNNotebook_MaxNoMethods 1
  49.  
  50. /*
  51.  * -- Instance Data
  52.  */
  53. typedef struct {
  54.     HMODULE hmodHandle;
  55. } CNNotebookData;
  56.  
  57. /*
  58.  * -- Getdata Macro
  59.  */
  60.  
  61. /*
  62.  * -- This emitter treats Data Tokens as Thunks by default.
  63.  * -- Use the sc modifier "nothunks" to override this default.
  64.  */
  65. typedef CNNotebookData* (SOMLINK * somTD_CNNotebook_DataThunk)(void*);
  66. #define CNNotebookGetData(somSelf) \
  67.    (((somTD_CNNotebook_DataThunk)(CNNotebookCClassData.instanceDataToken))(somSelf))
  68.  
  69. /*
  70.  * -- Instance Data Access Macros for use in Method Procedures
  71.  */
  72. #ifdef VARIABLE_MACROS
  73.   #define _hmodHandle (somThis->hmodHandle)
  74. #endif
  75.  
  76.  
  77. /*
  78.  * -- Primary Implementation File Support
  79.  */
  80. #if (defined(CNNotebook_Class_Source) || defined(SOM_Module_cnnotebk_Source))
  81.  
  82. /*
  83.  * Trace/Debug macro
  84.  */
  85. #ifndef CNNotebookMethodDebug
  86.    #define CNNotebookMethodDebug(c,m) SOMMethodDebug(c,m)
  87. #endif
  88.  
  89. /*
  90.  * -- Method Macros for use in Method Procedures
  91.  */
  92. #ifdef METHOD_MACROS
  93.   #define _InitNotebookExtension somSelf->InitNotebookExtension
  94.   #define _AddNotebookPages somSelf->AddNotebookPages
  95.   #define _InsertNotebookPage somSelf->InsertNotebookPage
  96.   #define _InsertTypePage somSelf->InsertTypePage
  97.   #define _InsertViewPage somSelf->InsertViewPage
  98.   #define _InsertFilePage1 somSelf->InsertFilePage1
  99.   #define _InsertFilePage2 somSelf->InsertFilePage2
  100.   #define _InsertGeneralPage somSelf->InsertGeneralPage
  101.   #define _SetTitle somSelf->SetTitle
  102.   #define _QueryTitle somSelf->QueryTitle
  103.   #define _SetIcon somSelf->SetIcon
  104.   #define _QueryIcon somSelf->QueryIcon
  105.   #define _Display somSelf->Display
  106.   #define _SetSizePos somSelf->SetSizePos
  107.   #define _QuerySizePos somSelf->QuerySizePos
  108.   #define _InitExtension somSelf->InitExtension
  109.   #define _GetBase somSelf->GetBase
  110.   #define _Release somSelf->Release
  111.   #define _InitObject somSelf->InitObject
  112.   #define _IsInitialized somSelf->IsInitialized
  113.   #define _HasExtension somSelf->HasExtension
  114.   #define _GetExtension somSelf->GetExtension
  115.   #define _ReleaseExtension somSelf->ReleaseExtension
  116.   #define _Purge somSelf->Purge
  117.   #define _SubClassResponsibility somSelf->SubClassResponsibility
  118.   #define _somDefaultInit somSelf->somDefaultInit
  119.   #define _somDestruct somSelf->somDestruct
  120.   #define _somDefaultCopyInit somSelf->somDefaultCopyInit
  121.   #define _somDefaultAssign somSelf->somDefaultAssign
  122.   #define _somDefaultConstCopyInit somSelf->somDefaultConstCopyInit
  123.   #define _somDefaultVCopyInit somSelf->somDefaultVCopyInit
  124.   #define _somDefaultConstVCopyInit somSelf->somDefaultConstVCopyInit
  125.   #define _somDefaultConstAssign somSelf->somDefaultConstAssign
  126.   #define _somDefaultVAssign somSelf->somDefaultVAssign
  127.   #define _somDefaultConstVAssign somSelf->somDefaultConstVAssign
  128.   #define _somInit somSelf->somInit
  129.   #define _somFree somSelf->somFree
  130.   #define _somUninit somSelf->somUninit
  131.   #define _somGetClass somSelf->somGetClass
  132.   #define _somGetClassName somSelf->somGetClassName
  133.   #define _somGetSize somSelf->somGetSize
  134.   #define _somIsA somSelf->somIsA
  135.   #define _somIsInstanceOf somSelf->somIsInstanceOf
  136.   #define _somRespondsTo somSelf->somRespondsTo
  137.   #define _somDispatch somSelf->somDispatch
  138.   #define _somClassDispatch somSelf->somClassDispatch
  139.   #define _somCastObj somSelf->somCastObj
  140.   #define _somResetObj somSelf->somResetObj
  141.   #define _somDispatchV somSelf->somDispatchV
  142.   #define _somDispatchL somSelf->somDispatchL
  143.   #define _somDispatchA somSelf->somDispatchA
  144.   #define _somDispatchD somSelf->somDispatchD
  145.   #define _somPrintSelf somSelf->somPrintSelf
  146.   #define _somDumpSelf somSelf->somDumpSelf
  147.   #define _somDumpSelfInt somSelf->somDumpSelfInt
  148.   #define _InsertBackgroundPage somSelf->InsertBackgroundPage
  149.   #define _AddNotebookPages somSelf->AddNotebookPages
  150.   #define _somInit somSelf->somInit
  151.   #define _somUninit somSelf->somUninit
  152. #endif
  153.  
  154.  
  155. /*
  156.  * -- The CNNotebook ClassData Structure
  157.  */
  158. SOMEXTERN struct CNNotebookClassDataStructure SOMDLINK CNNotebookClassData = {(SOMClass *) NULL};
  159.  
  160. /*
  161.  * -- The auxiliary CNNotebook ClassData structure
  162.  */
  163. SOMEXTERN struct CNNotebookCClassDataStructure SOMDLINK CNNotebookCClassData = {(somMethodTabs) NULL};
  164.  
  165.  
  166. /*
  167.  * -- Apply Stubs for New Methods
  168.  */
  169. static void SOMLINK somAP_ODNotebookInsertBackgroundPage(CNNotebook *somSelf,
  170.         ODULong *__retVal,
  171.         somMethodProc *__methodPtr,
  172.         va_list __ap)
  173. {
  174.     somSelf = va_arg(__ap, CNNotebook*);
  175.     Environment *ev = va_arg(__ap, Environment*);
  176.     HWND hwndNotebook = va_arg(__ap, HWND);
  177.  
  178.     *__retVal = ((somTD_CNNotebook_InsertBackgroundPage) __methodPtr) (somSelf, ev, hwndNotebook);
  179. }
  180.  
  181.  
  182. /*
  183.  * New Method: InsertBackgroundPage
  184.  */
  185. SOM_Scope ODULong  SOMLINK ODNotebookInsertBackgroundPage(CNNotebook *somSelf, Environment *ev,
  186.         HWND hwndNotebook);
  187. #ifndef somMN_InsertBackgroundPage_defined
  188. #define somMN_InsertBackgroundPage_defined
  189. static char *somMN_InsertBackgroundPage = "InsertBackgroundPage";
  190. static somId somId_InsertBackgroundPage = &somMN_InsertBackgroundPage;
  191. #endif  /* somMN_InsertBackgroundPage_defined */
  192. #ifndef somDS_InsertBackgroundPage_defined
  193. #define somDS_InsertBackgroundPage_defined
  194. static char *somDS_InsertBackgroundPage = "::CNNotebook::InsertBackgroundPage";
  195. static somId somDI_InsertBackgroundPage = &somDS_InsertBackgroundPage;
  196. #endif  /* somDS_InsertBackgroundPage_defined */
  197. static ODULong  SOMLINK somRD_ODNotebookInsertBackgroundPage(CNNotebook *somSelf, Environment *ev,
  198.         HWND hwndNotebook)
  199. {
  200.     ODULong __retVal;
  201.  
  202.     somSelf->somDispatch((void **)&__retVal, somId_InsertBackgroundPage, somSelf , ev
  203.         ,hwndNotebook);
  204.     return __retVal;
  205. }
  206.  
  207. /*
  208.  * Overridden method: AddNotebookPages
  209.  */
  210. SOM_Scope void  SOMLINK ODNotebookAddNotebookPages(CNNotebook *somSelf, Environment *ev,
  211.         HWND hwndNotebook);
  212. static char *somMN_CNNotebookAddNotebookPages = "ODNotebook::AddNotebookPages";
  213. static somId somId_CNNotebookAddNotebookPages = &somMN_CNNotebookAddNotebookPages;
  214. #ifdef somId_AddNotebookPages
  215. #undef somId_AddNotebookPages
  216. #else
  217. #define somId_AddNotebookPages somId_CNNotebookAddNotebookPages
  218. #endif
  219. typedef void   (SOMLINK * somTD_xih_CNNotebook_AddNotebookPages)(CNNotebook *somSelf, Environment *ev,
  220.         HWND hwndNotebook);
  221. /* define the parent method call macro */
  222. static somMethodProc* CNNotebook_parent_ODNotebook_AddNotebookPages_resolved = 0;
  223. #define CNNotebook_parent_ODNotebook_AddNotebookPages(somSelf,ev,hwndNotebook) \
  224.   ((( somTD_xih_CNNotebook_AddNotebookPages ) \
  225.     ((CNNotebook_parent_ODNotebook_AddNotebookPages_resolved)? \
  226.       CNNotebook_parent_ODNotebook_AddNotebookPages_resolved : \
  227.       (CNNotebook_parent_ODNotebook_AddNotebookPages_resolved = \
  228.           somParentNumResolve(CNNotebookCClassData.parentMtab, 1, ODNotebookClassData.AddNotebookPages)))) \
  229.    (somSelf,ev,hwndNotebook))
  230. /* define a variety of (possibly ambiguous) short forms */
  231. #ifndef SOMGD_pmc_parent_AddNotebookPages
  232.   #ifdef parent_AddNotebookPages
  233.     #define SOMGD_pmc_parent_AddNotebookPages
  234.     #undef parent_AddNotebookPages
  235.   #else
  236. #define parent_AddNotebookPages CNNotebook_parent_ODNotebook_AddNotebookPages
  237.   #endif
  238. #endif
  239. #ifndef SOMGD_pmc_parent_ODNotebook_AddNotebookPages
  240.   #ifdef parent_ODNotebook_AddNotebookPages
  241.     #define SOMGD_pmc_parent_ODNotebook_AddNotebookPages
  242.     #undef parent_ODNotebook_AddNotebookPages
  243.   #else
  244.     #define parent_ODNotebook_AddNotebookPages CNNotebook_parent_ODNotebook_AddNotebookPages
  245.   #endif
  246. #endif
  247. #define CNNotebook_parents_AddNotebookPages(arg0,arg1) (\
  248.    CNNotebook_parent_ODNotebook_AddNotebookPages(arg0,arg1))
  249.  
  250. /*
  251.  * Overridden method: somInit
  252.  */
  253. SOM_Scope void  SOMLINK ODNotebooksomInit(CNNotebook *somSelf);
  254. static char *somMN_CNNotebooksomInit = "SOMObject::somInit";
  255. static somId somId_CNNotebooksomInit = &somMN_CNNotebooksomInit;
  256. #ifdef somId_somInit
  257. #undef somId_somInit
  258. #else
  259. #define somId_somInit somId_CNNotebooksomInit
  260. #endif
  261. typedef void   (SOMLINK * somTD_xih_CNNotebook_somInit)(CNNotebook *somSelf);
  262. /* define the parent method call macro */
  263. #define CNNotebook_parent_ODNotebook_somInit(__somSelf) \
  264.     somSelf = (__somSelf,somSelf) /* pcalls for somInit/somUninit turned off */
  265. /* define a variety of (possibly ambiguous) short forms */
  266. #ifndef SOMGD_pmc_parent_somInit
  267.   #ifdef parent_somInit
  268.     #define SOMGD_pmc_parent_somInit
  269.     #undef parent_somInit
  270.   #else
  271. #define parent_somInit CNNotebook_parent_ODNotebook_somInit
  272.   #endif
  273. #endif
  274. #ifndef SOMGD_pmc_parent_ODNotebook_somInit
  275.   #ifdef parent_ODNotebook_somInit
  276.     #define SOMGD_pmc_parent_ODNotebook_somInit
  277.     #undef parent_ODNotebook_somInit
  278.   #else
  279.     #define parent_ODNotebook_somInit CNNotebook_parent_ODNotebook_somInit
  280.   #endif
  281. #endif
  282. #define CNNotebook_parents_somInit(somSelf) (somSelf)
  283.  
  284. /*
  285.  * Overridden method: somUninit
  286.  */
  287. SOM_Scope void  SOMLINK ODNotebooksomUninit(CNNotebook *somSelf);
  288. static char *somMN_CNNotebooksomUninit = "SOMObject::somUninit";
  289. static somId somId_CNNotebooksomUninit = &somMN_CNNotebooksomUninit;
  290. #ifdef somId_somUninit
  291. #undef somId_somUninit
  292. #else
  293. #define somId_somUninit somId_CNNotebooksomUninit
  294. #endif
  295. typedef void   (SOMLINK * somTD_xih_CNNotebook_somUninit)(CNNotebook *somSelf);
  296. /* define the parent method call macro */
  297. #define CNNotebook_parent_ODNotebook_somUninit(__somSelf) \
  298.     somSelf = (__somSelf,somSelf) /* pcalls for somInit/somUninit turned off */
  299. /* define a variety of (possibly ambiguous) short forms */
  300. #ifndef SOMGD_pmc_parent_somUninit
  301.   #ifdef parent_somUninit
  302.     #define SOMGD_pmc_parent_somUninit
  303.     #undef parent_somUninit
  304.   #else
  305. #define parent_somUninit CNNotebook_parent_ODNotebook_somUninit
  306.   #endif
  307. #endif
  308. #ifndef SOMGD_pmc_parent_ODNotebook_somUninit
  309.   #ifdef parent_ODNotebook_somUninit
  310.     #define SOMGD_pmc_parent_ODNotebook_somUninit
  311.     #undef parent_ODNotebook_somUninit
  312.   #else
  313.     #define parent_ODNotebook_somUninit CNNotebook_parent_ODNotebook_somUninit
  314.   #endif
  315. #endif
  316. #define CNNotebook_parents_somUninit(somSelf) (somSelf)
  317.  
  318. /*
  319.  * -- Routines and Structures to create the class object
  320.  */
  321.  
  322.  
  323. /*
  324.  * Declare the Static Methods table.
  325.  */
  326. static somStaticMethod_t CNNotebookSM[] = {
  327.     {    &CNNotebookClassData.InsertBackgroundPage,
  328.          &somId_InsertBackgroundPage,
  329.          &somDI_InsertBackgroundPage,
  330.          (somMethodProc *) ODNotebookInsertBackgroundPage,
  331.          (somMethodProc *) somRD_ODNotebookInsertBackgroundPage,
  332.          (somMethodProc *) somAP_ODNotebookInsertBackgroundPage    },
  333. };
  334.  
  335.  
  336. /*
  337.  * Declare the Override Methods table.
  338.  */
  339. static somOverrideMethod_t CNNotebookOM[] = {
  340.     {    &somId_CNNotebookAddNotebookPages,
  341.          (somMethodProc *) ODNotebookAddNotebookPages  },
  342.     {    &somId_CNNotebooksomInit,
  343.          (somMethodProc *) ODNotebooksomInit  },
  344.     {    &somId_CNNotebooksomUninit,
  345.          (somMethodProc *) ODNotebooksomUninit  },
  346. };
  347.  
  348.  
  349. /*
  350.  *  class Ids
  351.  */
  352. static char * somCN_CNNotebook = "CNNotebook";
  353. static char * somPCN_CNNotebook_ODNotebook = "ODNotebook";
  354.  
  355. static somId somPCCNNotebook[] = {
  356.     &somPCN_CNNotebook_ODNotebook,
  357. };
  358.  
  359. static somStaticClassInfo CNNotebookSCI = {
  360.     4, 1, 3, 0, 0, 0, /* layout version 4 */ 
  361.     CNNotebook_MajorVersion, CNNotebook_MinorVersion,
  362.     sizeof(CNNotebookData), CNNotebook_MaxNoMethods, 1,
  363.     &somCN_CNNotebook,
  364.     (somId) NULL, 1,
  365.     somPCCNNotebook,
  366.     (somClassDataStructure *) &CNNotebookClassData,
  367.     (somCClassDataStructure *) &CNNotebookCClassData,
  368.     CNNotebookSM, CNNotebookOM,
  369.     (char *) NULL,
  370.     (somNonInternalData_t *) NULL,
  371.    (somProcMethods_t *) NULL,
  372.     (somVarargsFuncs_t *) NULL,
  373.     (somTP_somClassInitFunc *) NULL,
  374.     0, /* default alignment */
  375.     -1, /* use parents as DirectInitClasses */
  376.     0, /* no explicit DirectInitClasses */
  377.     0, /* number of general methods */
  378.     (somMethods_t *) NULL,
  379.     0, /* no public data offset */
  380.     0, /* no sci development level check */
  381.     0, /* number of SelectInheritedMethods */
  382.     0, /* no SelectInheritedMethods */
  383.     1, /* number of classdata entries */
  384.     0, /* no list provided currently */
  385.     0, /* number of migrated methods */
  386.     0, /* no migrated method implementations */
  387.     0, /* number of initializers */
  388.     0, /* no initializers */
  389.     0, /* not a DTS class */
  390.     0, /* no dynamically computed info */
  391. };
  392.  
  393.  
  394. /*
  395.  * Class Creation and Initialization
  396.  */
  397.  
  398. SOMClass * SOMLINK CNNotebookNewClass (integer4 somtmajorVersion,
  399.         integer4 somtminorVersion)
  400. {
  401.     ODNotebookNewClass(ODNotebook_MajorVersion,ODNotebook_MinorVersion);    /* static reference */
  402.     return (SOMClass*) ((void*)(somBuildClass(1,&CNNotebookSCI, somtmajorVersion, somtminorVersion)));
  403. }
  404.  
  405. /*
  406.  * Functions for attributes.
  407.  */
  408.  
  409. /*
  410.  * Macros for initializer/destructor entry/exit
  411.  */
  412.  
  413. #endif /* Primary Implementation Support */
  414.  
  415. #endif       /* SOM_CNNotebook_xih */
  416.