home *** CD-ROM | disk | FTP | other *** search
- /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL. You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- *
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All Rights
- * Reserved.
- */
- /*******************************************************************************
- * Source date: 26 Feb 1998 01:03:40 GMT
- * netscape/fonts/winrf module C header file
- * Generated by jmc version 1.8 -- DO NOT EDIT
- ******************************************************************************/
-
- #ifndef _Mwinrf_H_
- #define _Mwinrf_H_
-
- #include "jmc.h"
-
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
-
- /*******************************************************************************
- * winrf
- ******************************************************************************/
-
- /* The type of the winrf interface. */
- struct winrfInterface;
-
- /* The public type of a winrf instance. */
- typedef struct winrf {
- const struct winrfInterface* vtable;
- } winrf;
-
- /* The inteface ID of the winrf interface. */
- #ifndef JMC_INIT_winrf_ID
- extern EXTERN_C_WITHOUT_EXTERN const JMCInterfaceID winrf_ID;
- #else
- EXTERN_C const JMCInterfaceID winrf_ID = { 0x472d303c, 0x3c0b096b, 0x7609161a, 0x402b5c49 };
- #endif /* JMC_INIT_winrf_ID */
- /*******************************************************************************
- * winrf Operations
- ******************************************************************************/
-
- #define winrf_getInterface(self, a, exception) \
- (((self)->vtable->getInterface)(self, winrf_getInterface_op, a, exception))
-
- #define winrf_addRef(self, exception) \
- (((self)->vtable->addRef)(self, winrf_addRef_op, exception))
-
- #define winrf_release(self, exception) \
- (((self)->vtable->release)(self, winrf_release_op, exception))
-
- #define winrf_hashCode(self, exception) \
- (((self)->vtable->hashCode)(self, winrf_hashCode_op, exception))
-
- #define winrf_equals(self, obj, exception) \
- (((self)->vtable->equals)(self, winrf_equals_op, obj, exception))
-
- #define winrf_clone(self, exception) \
- (((self)->vtable->clone)(self, winrf_clone_op, exception))
-
- #define winrf_toString(self, exception) \
- (((self)->vtable->toString)(self, winrf_toString_op, exception))
-
- #define winrf_finalize(self, exception) \
- (((self)->vtable->finalize)(self, winrf_finalize_op, exception))
-
- #define winrf_GetMatchInfo(self, exception) \
- (((self)->vtable->GetMatchInfo)(self, winrf_GetMatchInfo_op, exception))
-
- #define winrf_GetPointSize(self, exception) \
- (((self)->vtable->GetPointSize)(self, winrf_GetPointSize_op, exception))
-
- #define winrf_GetMaxWidth(self, exception) \
- (((self)->vtable->GetMaxWidth)(self, winrf_GetMaxWidth_op, exception))
-
- #define winrf_GetFontAscent(self, exception) \
- (((self)->vtable->GetFontAscent)(self, winrf_GetFontAscent_op, exception))
-
- #define winrf_GetFontDescent(self, exception) \
- (((self)->vtable->GetFontDescent)(self, winrf_GetFontDescent_op, exception))
-
- #define winrf_GetMaxLeftBearing(self, exception) \
- (((self)->vtable->GetMaxLeftBearing)(self, winrf_GetMaxLeftBearing_op, exception))
-
- #define winrf_GetMaxRightBearing(self, exception) \
- (((self)->vtable->GetMaxRightBearing)(self, winrf_GetMaxRightBearing_op, exception))
-
- #define winrf_SetTransformMatrix(self, a, a_length, exception) \
- (((self)->vtable->SetTransformMatrix)(self, winrf_SetTransformMatrix_op, a, a_length, exception))
-
- #define winrf_GetTransformMatrix(self, exception) \
- (((self)->vtable->GetTransformMatrix)(self, winrf_GetTransformMatrix_op, exception))
-
- #define winrf_MeasureText(self, a, b, c, c_length, d, d_length, exception) \
- (((self)->vtable->MeasureText)(self, winrf_MeasureText_op, a, b, c, c_length, d, d_length, exception))
-
- #define winrf_MeasureBoundingBox(self, a, b, c, c_length, d, exception) \
- (((self)->vtable->MeasureBoundingBox)(self, winrf_MeasureBoundingBox_op, a, b, c, c_length, d, exception))
-
- #define winrf_DrawText(self, a, b, c, d, e, e_length, exception) \
- (((self)->vtable->DrawText)(self, winrf_DrawText_op, a, b, c, d, e, e_length, exception))
-
- #define winrf_PrepareDraw(self, a, exception) \
- (((self)->vtable->PrepareDraw)(self, winrf_PrepareDraw_op, a, exception))
-
- #define winrf_EndDraw(self, a, exception) \
- (((self)->vtable->EndDraw)(self, winrf_EndDraw_op, a, exception))
-
- /*******************************************************************************
- * winrf Interface
- ******************************************************************************/
-
- struct netscape_jmc_JMCInterfaceID;
- struct java_lang_Object;
- struct java_lang_String;
- struct netscape_fonts_nffmi;
- struct netscape_fonts_nfrc;
- struct netscape_fonts_BoundingBoxStar;
-
- struct winrfInterface {
- void* (*getInterface)(struct winrf* self, jint op, const JMCInterfaceID* a, JMCException* *exception);
- void (*addRef)(struct winrf* self, jint op, JMCException* *exception);
- void (*release)(struct winrf* self, jint op, JMCException* *exception);
- jint (*hashCode)(struct winrf* self, jint op, JMCException* *exception);
- jbool (*equals)(struct winrf* self, jint op, void* obj, JMCException* *exception);
- void* (*clone)(struct winrf* self, jint op, JMCException* *exception);
- const char* (*toString)(struct winrf* self, jint op, JMCException* *exception);
- void (*finalize)(struct winrf* self, jint op, JMCException* *exception);
- struct nffmi* (*GetMatchInfo)(struct winrf* self, jint op, JMCException* *exception);
- jdouble (*GetPointSize)(struct winrf* self, jint op, JMCException* *exception);
- jint (*GetMaxWidth)(struct winrf* self, jint op, JMCException* *exception);
- jint (*GetFontAscent)(struct winrf* self, jint op, JMCException* *exception);
- jint (*GetFontDescent)(struct winrf* self, jint op, JMCException* *exception);
- jint (*GetMaxLeftBearing)(struct winrf* self, jint op, JMCException* *exception);
- jint (*GetMaxRightBearing)(struct winrf* self, jint op, JMCException* *exception);
- void (*SetTransformMatrix)(struct winrf* self, jint op, void** a, jsize a_length, JMCException* *exception);
- void* (*GetTransformMatrix)(struct winrf* self, jint op, JMCException* *exception);
- jint (*MeasureText)(struct winrf* self, jint op, struct nfrc* a, jint b, jbyte* c, jsize c_length, jint* d, jsize d_length, JMCException* *exception);
- jint (*MeasureBoundingBox)(struct winrf* self, jint op, struct nfrc* a, jint b, jbyte* c, jsize c_length, struct nf_bounding_box * d, JMCException* *exception);
- jint (*DrawText)(struct winrf* self, jint op, struct nfrc* a, jint b, jint c, jint d, jbyte* e, jsize e_length, JMCException* *exception);
- jint (*PrepareDraw)(struct winrf* self, jint op, struct nfrc* a, JMCException* *exception);
- jint (*EndDraw)(struct winrf* self, jint op, struct nfrc* a, JMCException* *exception);
- };
-
- /*******************************************************************************
- * winrf Operation IDs
- ******************************************************************************/
-
- typedef enum winrfOperations {
- winrf_getInterface_op,
- winrf_addRef_op,
- winrf_release_op,
- winrf_hashCode_op,
- winrf_equals_op,
- winrf_clone_op,
- winrf_toString_op,
- winrf_finalize_op,
- winrf_GetMatchInfo_op,
- winrf_GetPointSize_op,
- winrf_GetMaxWidth_op,
- winrf_GetFontAscent_op,
- winrf_GetFontDescent_op,
- winrf_GetMaxLeftBearing_op,
- winrf_GetMaxRightBearing_op,
- winrf_SetTransformMatrix_op,
- winrf_GetTransformMatrix_op,
- winrf_MeasureText_op,
- winrf_MeasureBoundingBox_op,
- winrf_DrawText_op,
- winrf_PrepareDraw_op,
- winrf_EndDraw_op
- } winrfOperations;
-
- /*******************************************************************************
- * Writing your C implementation: "winrf.h"
- * *****************************************************************************
- * You must create a header file named "winrf.h" that implements
- * the struct winrfImpl, including the struct winrfImplHeader
- * as it's first field:
- *
- * #include "Mwinrf.h" // generated header
- *
- * struct winrfImpl {
- * winrfImplHeader header;
- * <your instance data>
- * };
- *
- * This header file will get included by the generated module implementation.
- ******************************************************************************/
-
- /* Forward reference to the user-defined instance struct: */
- typedef struct winrfImpl winrfImpl;
-
-
- /* This struct must be included as the first field of your instance struct: */
- typedef struct winrfImplHeader {
- const struct winrfInterface* vtablewinrf;
- jint refcount;
- } winrfImplHeader;
-
- /*******************************************************************************
- * Instance Casting Macros
- * These macros get your back to the top of your instance, winrf,
- * given a pointer to one of its interfaces.
- ******************************************************************************/
-
- #undef winrfImpl2nfrf
- #define winrfImpl2nfrf(winrfImplPtr) \
- ((nfrf*)((char*)(winrfImplPtr) + offsetof(winrfImplHeader, vtablewinrf)))
-
- #undef nfrf2winrfImpl
- #define nfrf2winrfImpl(nfrfPtr) \
- ((winrfImpl*)((char*)(nfrfPtr) - offsetof(winrfImplHeader, vtablewinrf)))
-
- #undef winrfImpl2winrf
- #define winrfImpl2winrf(winrfImplPtr) \
- ((winrf*)((char*)(winrfImplPtr) + offsetof(winrfImplHeader, vtablewinrf)))
-
- #undef winrf2winrfImpl
- #define winrf2winrfImpl(winrfPtr) \
- ((winrfImpl*)((char*)(winrfPtr) - offsetof(winrfImplHeader, vtablewinrf)))
-
- /*******************************************************************************
- * Operations you must implement
- ******************************************************************************/
-
-
- extern JMC_PUBLIC_API(void*)
- _winrf_getBackwardCompatibleInterface(struct winrf* self, const JMCInterfaceID* iid,
- JMCException* *exception);
-
- extern JMC_PUBLIC_API(void)
- _winrf_init(struct winrf* self, JMCException* *exception);
-
- extern JMC_PUBLIC_API(void*)
- _winrf_getInterface(struct winrf* self, jint op, const JMCInterfaceID* a, JMCException* *exception);
-
- extern JMC_PUBLIC_API(void)
- _winrf_addRef(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(void)
- _winrf_release(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_hashCode(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jbool)
- _winrf_equals(struct winrf* self, jint op, void* obj, JMCException* *exception);
-
- extern JMC_PUBLIC_API(void*)
- _winrf_clone(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(const char*)
- _winrf_toString(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(void)
- _winrf_finalize(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(struct nffmi*)
- _winrf_GetMatchInfo(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jdouble)
- _winrf_GetPointSize(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_GetMaxWidth(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_GetFontAscent(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_GetFontDescent(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_GetMaxLeftBearing(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_GetMaxRightBearing(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(void)
- _winrf_SetTransformMatrix(struct winrf* self, jint op, void* * a, jsize a_length, JMCException* *exception);
-
- extern JMC_PUBLIC_API(void*)
- _winrf_GetTransformMatrix(struct winrf* self, jint op, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_MeasureText(struct winrf* self, jint op, struct nfrc* a, jint b, jbyte * c, jsize c_length, jint * d, jsize d_length, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_MeasureBoundingBox(struct winrf* self, jint op, struct nfrc* a, jint b, jbyte * c, jsize c_length, struct nf_bounding_box * d, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_DrawText(struct winrf* self, jint op, struct nfrc* a, jint b, jint c, jint d, jbyte * e, jsize e_length, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_PrepareDraw(struct winrf* self, jint op, struct nfrc* a, JMCException* *exception);
-
- extern JMC_PUBLIC_API(jint)
- _winrf_EndDraw(struct winrf* self, jint op, struct nfrc* a, JMCException* *exception);
-
- /*******************************************************************************
- * Factory Operations
- ******************************************************************************/
-
- JMC_PUBLIC_API(winrf*)
- winrfFactory_Create(JMCException* *exception);
-
- /******************************************************************************/
-
- #ifdef __cplusplus
- } /* extern "C" */
- #endif /* __cplusplus */
-
- #endif /* _Mwinrf_H_ */
-