home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / modules / libfont / jmcgen / include / Mcfmi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  8.5 KB  |  229 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /*******************************************************************************
  19.  * Source date: 9 Apr 1997 21:45:13 GMT
  20.  * netscape/fonts/cfmi module C header file
  21.  * Generated by jmc version 1.8 -- DO NOT EDIT
  22.  ******************************************************************************/
  23.  
  24. #ifndef _Mcfmi_H_
  25. #define _Mcfmi_H_
  26.  
  27. #include "jmc.h"
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif /* __cplusplus */
  32.  
  33. /*******************************************************************************
  34.  * cfmi
  35.  ******************************************************************************/
  36.  
  37. /* The type of the cfmi interface. */
  38. struct cfmiInterface;
  39.  
  40. /* The public type of a cfmi instance. */
  41. typedef struct cfmi {
  42.     const struct cfmiInterface*    vtable;
  43. } cfmi;
  44.  
  45. /* The inteface ID of the cfmi interface. */
  46. #ifndef JMC_INIT_cfmi_ID
  47. extern EXTERN_C_WITHOUT_EXTERN const JMCInterfaceID cfmi_ID;
  48. #else
  49. EXTERN_C const JMCInterfaceID cfmi_ID = { 0x22420e05, 0x574c4001, 0x5a4e671e, 0x0b464713 };
  50. #endif /* JMC_INIT_cfmi_ID */
  51. /*******************************************************************************
  52.  * cfmi Operations
  53.  ******************************************************************************/
  54.  
  55. #define cfmi_getInterface(self, a, exception)    \
  56.     (((self)->vtable->getInterface)(self, cfmi_getInterface_op, a, exception))
  57.  
  58. #define cfmi_addRef(self, exception)    \
  59.     (((self)->vtable->addRef)(self, cfmi_addRef_op, exception))
  60.  
  61. #define cfmi_release(self, exception)    \
  62.     (((self)->vtable->release)(self, cfmi_release_op, exception))
  63.  
  64. #define cfmi_hashCode(self, exception)    \
  65.     (((self)->vtable->hashCode)(self, cfmi_hashCode_op, exception))
  66.  
  67. #define cfmi_equals(self, a, exception)    \
  68.     (((self)->vtable->equals)(self, cfmi_equals_op, a, exception))
  69.  
  70. #define cfmi_clone(self, exception)    \
  71.     (((self)->vtable->clone)(self, cfmi_clone_op, exception))
  72.  
  73. #define cfmi_toString(self, exception)    \
  74.     (((self)->vtable->toString)(self, cfmi_toString_op, exception))
  75.  
  76. #define cfmi_finalize(self, exception)    \
  77.     (((self)->vtable->finalize)(self, cfmi_finalize_op, exception))
  78.  
  79. #define cfmi_GetValue(self, a, exception)    \
  80.     (((self)->vtable->GetValue)(self, cfmi_GetValue_op, a, exception))
  81.  
  82. #define cfmi_ListAttributes(self, exception)    \
  83.     (((self)->vtable->ListAttributes)(self, cfmi_ListAttributes_op, exception))
  84.  
  85. /*******************************************************************************
  86.  * cfmi Interface
  87.  ******************************************************************************/
  88.  
  89. struct netscape_jmc_JMCInterfaceID;
  90. struct java_lang_Object;
  91. struct java_lang_String;
  92. struct netscape_jmc_ConstCString;
  93.  
  94. struct cfmiInterface {
  95.     void*    (*getInterface)(struct cfmi* self, jint op, const JMCInterfaceID* a, JMCException* *exception);
  96.     void    (*addRef)(struct cfmi* self, jint op, JMCException* *exception);
  97.     void    (*release)(struct cfmi* self, jint op, JMCException* *exception);
  98.     jint    (*hashCode)(struct cfmi* self, jint op, JMCException* *exception);
  99.     jbool    (*equals)(struct cfmi* self, jint op, void* a, JMCException* *exception);
  100.     void*    (*clone)(struct cfmi* self, jint op, JMCException* *exception);
  101.     const char*    (*toString)(struct cfmi* self, jint op, JMCException* *exception);
  102.     void    (*finalize)(struct cfmi* self, jint op, JMCException* *exception);
  103.     void*    (*GetValue)(struct cfmi* self, jint op, const char* a, JMCException* *exception);
  104.     void*    (*ListAttributes)(struct cfmi* self, jint op, JMCException* *exception);
  105. };
  106.  
  107. /*******************************************************************************
  108.  * cfmi Operation IDs
  109.  ******************************************************************************/
  110.  
  111. typedef enum cfmiOperations {
  112.     cfmi_getInterface_op,
  113.     cfmi_addRef_op,
  114.     cfmi_release_op,
  115.     cfmi_hashCode_op,
  116.     cfmi_equals_op,
  117.     cfmi_clone_op,
  118.     cfmi_toString_op,
  119.     cfmi_finalize_op,
  120.     cfmi_GetValue_op,
  121.     cfmi_ListAttributes_op
  122. } cfmiOperations;
  123.  
  124. /*******************************************************************************
  125.  * Writing your C implementation: "cfmi.h"
  126.  * *****************************************************************************
  127.  * You must create a header file named "cfmi.h" that implements
  128.  * the struct cfmiImpl, including the struct cfmiImplHeader
  129.  * as it's first field:
  130.  * 
  131.  *         #include "Mcfmi.h" // generated header
  132.  * 
  133.  *         struct cfmiImpl {
  134.  *             cfmiImplHeader    header;
  135.  *             <your instance data>
  136.  *         };
  137.  * 
  138.  * This header file will get included by the generated module implementation.
  139.  ******************************************************************************/
  140.  
  141. /* Forward reference to the user-defined instance struct: */
  142. typedef struct cfmiImpl    cfmiImpl;
  143.  
  144.  
  145. /* This struct must be included as the first field of your instance struct: */
  146. typedef struct cfmiImplHeader {
  147.     const struct cfmiInterface*    vtablecfmi;
  148.     jint        refcount;
  149. } cfmiImplHeader;
  150.  
  151. /*******************************************************************************
  152.  * Instance Casting Macros
  153.  * These macros get your back to the top of your instance, cfmi,
  154.  * given a pointer to one of its interfaces.
  155.  ******************************************************************************/
  156.  
  157. #undef  cfmiImpl2nffmi
  158. #define cfmiImpl2nffmi(cfmiImplPtr) \
  159.     ((nffmi*)((char*)(cfmiImplPtr) + offsetof(cfmiImplHeader, vtablecfmi)))
  160.  
  161. #undef  nffmi2cfmiImpl
  162. #define nffmi2cfmiImpl(nffmiPtr) \
  163.     ((cfmiImpl*)((char*)(nffmiPtr) - offsetof(cfmiImplHeader, vtablecfmi)))
  164.  
  165. #undef  cfmiImpl2cfmi
  166. #define cfmiImpl2cfmi(cfmiImplPtr) \
  167.     ((cfmi*)((char*)(cfmiImplPtr) + offsetof(cfmiImplHeader, vtablecfmi)))
  168.  
  169. #undef  cfmi2cfmiImpl
  170. #define cfmi2cfmiImpl(cfmiPtr) \
  171.     ((cfmiImpl*)((char*)(cfmiPtr) - offsetof(cfmiImplHeader, vtablecfmi)))
  172.  
  173. /*******************************************************************************
  174.  * Operations you must implement
  175.  ******************************************************************************/
  176.  
  177.  
  178. extern JMC_PUBLIC_API(void*)
  179. _cfmi_getBackwardCompatibleInterface(struct cfmi* self, const JMCInterfaceID* iid,
  180.     JMCException* *exception);
  181.  
  182. extern JMC_PUBLIC_API(void)
  183. _cfmi_init(struct cfmi* self, JMCException* *exception, const char* a, const char* b, const char* c, jint d, jint e, jint f, jint g, jint h, jint i, jint j);
  184.  
  185. extern JMC_PUBLIC_API(void*)
  186. _cfmi_getInterface(struct cfmi* self, jint op, const JMCInterfaceID* a, JMCException* *exception);
  187.  
  188. extern JMC_PUBLIC_API(void)
  189. _cfmi_addRef(struct cfmi* self, jint op, JMCException* *exception);
  190.  
  191. extern JMC_PUBLIC_API(void)
  192. _cfmi_release(struct cfmi* self, jint op, JMCException* *exception);
  193.  
  194. extern JMC_PUBLIC_API(jint)
  195. _cfmi_hashCode(struct cfmi* self, jint op, JMCException* *exception);
  196.  
  197. extern JMC_PUBLIC_API(jbool)
  198. _cfmi_equals(struct cfmi* self, jint op, void* a, JMCException* *exception);
  199.  
  200. extern JMC_PUBLIC_API(void*)
  201. _cfmi_clone(struct cfmi* self, jint op, JMCException* *exception);
  202.  
  203. extern JMC_PUBLIC_API(const char*)
  204. _cfmi_toString(struct cfmi* self, jint op, JMCException* *exception);
  205.  
  206. extern JMC_PUBLIC_API(void)
  207. _cfmi_finalize(struct cfmi* self, jint op, JMCException* *exception);
  208.  
  209. extern JMC_PUBLIC_API(void*)
  210. _cfmi_GetValue(struct cfmi* self, jint op, const char* a, JMCException* *exception);
  211.  
  212. extern JMC_PUBLIC_API(void*)
  213. _cfmi_ListAttributes(struct cfmi* self, jint op, JMCException* *exception);
  214.  
  215. /*******************************************************************************
  216.  * Factory Operations
  217.  ******************************************************************************/
  218.  
  219. JMC_PUBLIC_API(cfmi*)
  220. cfmiFactory_Create(JMCException* *exception, const char* a, const char* b, const char* c, jint d, jint e, jint f, jint g, jint h, jint i, jint j);
  221.  
  222. /******************************************************************************/
  223.  
  224. #ifdef __cplusplus
  225. } /* extern "C" */
  226. #endif /* __cplusplus */
  227.  
  228. #endif /* _Mcfmi_H_ */
  229.