Removing files that are no longer needed. r=cls.

This commit is contained in:
bryner%uiuc.edu 2000-08-20 22:41:06 +00:00
parent c82a2efd44
commit 0353c73ac0
9 changed files with 0 additions and 18963 deletions

View File

@ -1,453 +0,0 @@
/* -*- 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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef _AddrBook_H_
#define _AddrBook_H_
#include "xp_core.h"
#include "msgcom.h"
#include "abdefn.h"
#include "dirprefs.h"
#ifdef XP_CPLUSPLUS
class MLPane;
class ABPane;
class AddressPane;
class ABook;
#else
typedef struct MLPane MLPane;
typedef struct ABPane ABPane;
typedef struct AddressPane AddressPane;
typedef struct ABook ABook;
#endif
XP_BEGIN_PROTOS
#define AB_kGromitDbFileName "da5id.nab"
#define AB_CONFIG_USE_GROMIT_FILE_FORMAT 1
/****************************************************************************/
/* Get the address book .*/
/****************************************************************************/
ABook* FE_GetAddressBook(MSG_Pane* pane);
/****************************************************************************/
/* This is a callback into the FE to bring up a modal property sheet */
/* for modifying an existing entry or creating a new one from a */
/* person structure. If entryId != MSG_MESSAGEIDNONE then it is the */
/* entryID of the entry to modify. Each FE should Return TRUE if the user */
/* hit ok return FALSE if they hit cancel and return -1 if there was a */
/* problem creating the window or something */
/****************************************************************************/
int FE_ShowPropertySheetFor (MWContext* context, ABID entryID,
PersonEntry* pPerson);
/****************************************************************************/
/* Return whether or not to attach the users */
/* vcard to outgoing messages */
/****************************************************************************/
XP_Bool AB_AttachUsersvCard(void);
/****************************************************************************/
/* Convert the address book error code to .*/
/****************************************************************************/
int AB_ConvertABErrToMKErr(uint32 err);
/****************************************************************************/
/* Create and initialize the address book pane which is the a view on an */
/* address book. It will provide a sorted list of all the address book */
/* entries ids . This is intended to be used in a two step */
/* process of create and then initialize */
/****************************************************************************/
int AB_InitAddressBookPane(ABPane** ppABookPane,
DIR_Server* dir,
ABook* pABook,
MWContext* context,
MSG_Master* master,
unsigned long sortBy,
XP_Bool sortForward);
/****************************************************************************/
/* Create the address book pane which is the a view on an */
/* address book. */
/****************************************************************************/
int AB_CreateAddressBookPane(ABPane** ppABookPane,
MWContext* context,
MSG_Master* master);
/****************************************************************************/
/* Initialize the address book pane which is the a view on an */
/* address book. It will provide a sorted list of all the address book */
/* entries ids .*/
/****************************************************************************/
int AB_InitializeAddressBookPane(ABPane* ppABookPane,
DIR_Server* dir,
ABook* pABook,
unsigned long sortBy,
XP_Bool sortForward);
/****************************************************************************/
/* Close the address book pane. Called when the view on an address book */
/* is being closed */
/****************************************************************************/
int AB_CloseAddressBookPane(ABPane** ppABookPane);
/****************************************************************************/
/* Create and initialize a mailing list pane which is the a view on an */
/* mailing list. It will provide a sorted view of all the entries in a */
/* mailing list. This is intended to be used in as a one one step process */
/****************************************************************************/
int AB_InitMailingListPane(MLPane** ppABookPane,
ABID* listID,
DIR_Server* dir,
ABook* pABook,
MWContext* context,
MSG_Master* master,
unsigned long sortBy,
XP_Bool sortForward);
/****************************************************************************/
/* Create a mailing list pane which is the a view on an */
/* mailing list. This is intended to be used in a two step */
/* process of create and then initialize */
/****************************************************************************/
int AB_CreateMailingListPane(MLPane** ppABookPane,
MWContext* context,
MSG_Master* master);
/****************************************************************************/
/* Initialize a mailing list pane which is the a view on an */
/* mailing list. It will provide a sorted view of all the entries in a */
/* mailing list.*/
/****************************************************************************/
int AB_InitializeMailingListPane(MLPane* pABookPane,
ABID* listID,
DIR_Server* dir,
ABook* pABook);
/****************************************************************************/
/* Close the mailing list pane. Called when the view on an mailing list */
/* is being closed */
/****************************************************************************/
int AB_CloseMailingListPane(MLPane** ppMLPane);
/****************************************************************************/
/* Register a compose window with the address book */
/* The composition pane should do this everytime it opens */
/* so that name completion can take place */
/****************************************************************************/
int AB_RegisterComposeWindow(ABook* pABook, DIR_Server* directory);
/****************************************************************************/
/* Unregister a compose window with the address book */
/* The composition pane should do this when it is getting closed */
/****************************************************************************/
int AB_UnregisterComposeWindow(ABook* pABook, DIR_Server* directory);
/****************************************************************************/
/* Change the Current directory */
/****************************************************************************/
int AB_ChangeDirectory(ABPane* pABookPane, DIR_Server* directory);
/****************************************************************************/
/* Begin a search on the LDAP directory */
/****************************************************************************/
int AB_SearchDirectory(ABPane* pABookPane, char* searchString);
/****************************************************************************/
/* Process LDAP search results*/
/****************************************************************************/
int AB_LDAPSearchResults(ABPane* pABookPane, MSG_ViewIndex index, int32 num);
/****************************************************************************/
/* Finish an LDAP search */
/****************************************************************************/
int AB_FinishSearch(ABPane* pABookPane, MWContext* context);
/****************************************************************************/
/* Create and initialize the address book database */
/****************************************************************************/
int AB_InitAddressBook(DIR_Server* directory, ABook** ppABook);
/****************************************************************************/
/* Create and initialize the address book database */
/* upgrading the old html address book if we need to*/
/****************************************************************************/
int AB_InitializeAddressBook(DIR_Server* directory, ABook** ppABook,
const char * pOldHTMLBook);
/****************************************************************************/
/* Close the address book database */
/****************************************************************************/
int AB_CloseAddressBook(ABook** ppABook);
/****************************************************************************/
/* Add a person entry to the database */
/****************************************************************************/
int AB_AddUser(DIR_Server* dir, ABook* pABook, PersonEntry* pPerson,
ABID* entryID);
int AB_AddUserWithUI (MWContext *context, PersonEntry *person,
DIR_Server *pab, XP_Bool lastOneToAdd);
/****************************************************************************/
/* Add an entry to the database from a url*/
/****************************************************************************/
int AB_AddSenderToAddBook(ABook* pABook, MWContext* context, char* author,
char* url);
/****************************************************************************/
/* Add a mailing list to the database */
/****************************************************************************/
int AB_AddMailingList(DIR_Server* dir, ABook* pABook,
MailingListEntry* pABList, ABID* entryID);
/****************************************************************************/
/* Perform a command on the selected indices */
/* Right now this will only work on delete and mail to */
/****************************************************************************/
int AB_Command (ABPane* pane, AB_CommandType command,
MSG_ViewIndex* indices, int32 numindices);
/****************************************************************************/
/* Before the front end displays any menu (each time), it should call this */
/* function for each command on that menu to determine how it should be */
/* displayed. */
/****************************************************************************/
int AB_CommandStatus (ABPane* pane,
AB_CommandType command,
MSG_ViewIndex* indices, int32 numindices,
XP_Bool *selectable_p,
MSG_COMMAND_CHECK_STATE *selected_p,
const char **display_string,
XP_Bool *plural_p);
/****************************************************************************/
/* Get and Set how full names are constructed for people entries */
/* first last or last first */
/****************************************************************************/
XP_Bool AB_GetSortByFirstName(ABook* pABook);
void AB_SetSortByFirstName(ABook* pABook, XP_Bool sortby);
/****************************************************************************/
/* Import Export various formats that will prompt for filename */
/****************************************************************************/
int AB_ImportFromFile(ABPane* pABookPane, MWContext* context);
int AB_ExportToFile(ABPane* pABookPane, MWContext* context);
/****************************************************************************/
/* This is only used right now for drop/paste of a vcard */
/****************************************************************************/
int AB_ImportFromVcard(AddressPane* pABookPane, const char* pVcard);
/****************************************************************************/
/* This is only used right now for drop of a vcard */
/* It it a helper function that can be called by the FE to */
/* convert a vcard to an valid rfc822 address that can be used */
/* in the address widget of the compose window */
/****************************************************************************/
int AB_ConvertVCardsToExpandedName(ABook* pABook, const char* vCardString,
XP_List ** ppEntries, int32 * numEntries);
/****************************************************************************/
/* Import Export various formats that wont do any prompting */
/* This is needed for the command line interface and automatic upgrading */
/****************************************************************************/
int AB_ImportFromFileNamed(ABook* pABook, char* filename);
int AB_ExportToFileNamed(ABook* pABook, char* filename);
/****************************************************************************/
/* This function is only called from the backend. */
/* It is used to process the addbook url that is only used in mimevcrd.c */
/* It probably will never be called by an FE */
/****************************************************************************/
int AB_ImportFromVcardURL(ABook* pABook, MWContext* context, const char* pVcard);
/****************************************************************************/
/* This will create a buffer with a vcard in it. It is used for constructing */
/* a buffer that can be used in drag/drop or copy to the clipboard */
/****************************************************************************/
int AB_ExportToVCard(ABook* pABook, DIR_Server* dir, ABID entryID,
char** ppVcard);
int AB_ExportToVCardFromPerson(ABook* pABook, PersonEntry* pPerson,
char** ppVcard);
/****************************************************************************/
/* This will create a temp file for a vcard. This function is only called */
/* from the backend compose window for constructing a vcard attachment */
/* It probably will never be called by an FE */
/****************************************************************************/
int AB_ExportToVCardTempFile(ABook* pABook, DIR_Server* dir, ABID entryID,
char** filename);
/****************************************************************************/
/* Operations on panes/view */
/****************************************************************************/
/****************************************************************************/
/* Get the unique database id at a particular pane index */
/****************************************************************************/
ABID AB_GetEntryIDAt(AddressPane* pABookPane, uint32 index);
uint32 AB_GetIndexOfEntryID (AddressPane* pABookPane, ABID entryID);
int AB_GetEntryLine (ABPane * pABookPane, uint32 index,
AB_EntryLine * pEntryLine);
/****************************************************************************/
/* Get info about how a pane is sorted */
/****************************************************************************/
XP_Bool AB_GetPaneSortedAscending(ABPane * pABookPane);
ABID AB_GetPaneSortedBy(ABPane * pABookPane);
/****************************************************************************/
/* Get number of entries */
/* For the address book you can ask for ALL, people, or mailing lists */
/* For mailing list panes you will only be returned ALL */
/****************************************************************************/
int AB_GetEntryCount(DIR_Server* dir, ABook* pABook, uint32* count,
ABID etype, ABID listID);
/****************************************************************************/
/* Modify information for an entry (person or mailing list) */
/****************************************************************************/
int AB_ModifyUser(DIR_Server* dir, ABook* pABook, ABID entryID, PersonEntry* pPerson);
int AB_ModifyMailingList(DIR_Server* dir, ABook* pABook, ABID entryID,
MailingListEntry* pEntry);
/****************************************************************************/
/* Modify information for a mailing list that has been modified */
/* but not committed in a mailing list pane */
/****************************************************************************/
int AB_ModifyMailingListAndEntries(MLPane* pMLPane, MailingListEntry* pABList);
/****************************************************************************/
/* Modify information for a mailing list that has been modified */
/* but not committed in a mailing list pane. Some of the error checking */
/* that was perfomed in add/replace in a mailing list had to be moved to */
/* here. The fe's should be calling this function instead of the one above */
/****************************************************************************/
int AB_ModifyMailingListAndEntriesWithChecks(MLPane* pMLPane, MailingListEntry* pList,
MSG_ViewIndex *index, MSG_ViewIndex begIndex);
/****************************************************************************/
/* Get information for every entry (person or mailing list) */
/****************************************************************************/
int AB_GetType(DIR_Server* dir, ABook* pABook, ABID entryID, ABID* type);
int AB_GetFullName(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetNickname(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
/****************************************************************************/
/* Get information for every person entry */
/****************************************************************************/
int AB_GetGivenName(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetMiddleName(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetFamilyName(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetCompanyName(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetLocality(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetRegion(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetEmailAddress(DIR_Server* dir, ABook* pABook, ABID entryID, char* paddress);
int AB_GetInfo(DIR_Server* dir, ABook* pABook, ABID entryID, char* pinfo);
int AB_GetHTMLMail(DIR_Server* dir, ABook* pABook, ABID entryID, XP_Bool* pHTML);
int AB_GetExpandedName(DIR_Server* dir, ABook* pABook, ABID entryID, char** pname);
int AB_GetTitle(DIR_Server* dir, ABook* pABook, ABID entryID, char* ptitle);
int AB_GetPOAddress(DIR_Server* dir, ABook* pABook, ABID entryID, char* ppoaddress);
int AB_GetStreetAddress(DIR_Server* dir, ABook* pABook, ABID entryID, char* pstreet);
int AB_GetZipCode(DIR_Server* dir, ABook* pABook, ABID entryID, char* pzip);
int AB_GetCountry(DIR_Server* dir, ABook* pABook, ABID entryID, char* pcountry);
int AB_GetWorkPhone(DIR_Server* dir, ABook* pABook, ABID entryID, char* pphone);
int AB_GetFaxPhone(DIR_Server* dir, ABook* pABook, ABID entryID, char* pphone);
int AB_GetHomePhone(DIR_Server* dir, ABook* pABook, ABID entryID, char* pphone);
int AB_GetDistName(DIR_Server* dir, ABook* pABook, ABID entryID, char* pname);
int AB_GetSecurity(DIR_Server* dir, ABook* pABook, ABID entryID, short* security);
int AB_GetCoolAddress(DIR_Server* dir, ABook* pABook, ABID entryID, char* paddress);
int AB_GetUseServer(DIR_Server* dir, ABook* pABook, ABID entryID, short* use);
int AB_GetEntryIDForPerson(DIR_Server* dir, ABook* pABook, ABID* entryID,
PersonEntry* pPerson);
/****************************************************************************/
/* Add/Remove entries for a mailing list */
/****************************************************************************/
int AB_GetEntryCountInMailingList(MLPane* pMLPane, uint32* count);
int AB_AddIDToMailingListAt(MLPane* pMLPane, ABID entryID, MSG_ViewIndex index);
int AB_RemoveIDFromMailingListAt(MLPane* pMLPane, MSG_ViewIndex index);
int AB_ReplaceIDInMailingListAt(MLPane* pMLPane, ABID entryID, MSG_ViewIndex index);
int AB_AddPersonToMailingListAt(MLPane* pMLPane, PersonEntry* person,
MSG_ViewIndex index, ABID* entryID);
/****************************************************************************/
/* Find index to first entry in a pane that matches the typedown */
/****************************************************************************/
int AB_GetIndexMatchingTypedown(ABPane* pABookPane,
MSG_ViewIndex* index, const char* aValue, MSG_ViewIndex startIndex);
/****************************************************************************/
/* Return the id of the name/nickname entries that match a string. If we */
/* find a nickname that uniquely matches then return otherwise check the */
/* full name field. */
/****************************************************************************/
int AB_GetIDForNameCompletion(ABook* pABook, DIR_Server* dir, ABID* entryID,
ABID* field, const char* aValue);
/****************************************************************************/
/* Return a string of expanded addresses from the address book */
/****************************************************************************/
char* AB_ExpandHeaderString(ABook* pABook, const char* addresses,
XP_Bool expandfull);
/****************************************************************************/
/* Return the ids of mailing lists that a entry is a member of */
/* This was mentioned at one time as a requirement in the ui but it may */
/* go away */
/****************************************************************************/
int AB_GetMailingListsContainingID(ABook* pABook, MSG_ViewIndex* plist,
ABID entryID);
/****************************************************************************/
/* This should not be called by any of the fes. I placed it here so it */
/* could be called in the backend by other functions such as those in libmsg */
/* This allows for an increase in performance when adding a bunch of entries */
/* to the database */
/****************************************************************************/
int AB_SetIsImporting(ABook* pABook, XP_Bool isImporting);
/****************************************************************************/
/* This should not be called by any of the fes. I placed it here so it */
/* could be called in the backend by other functions in libmsg */
/* This will set the wantsHTML boolean to be set for all address book */
/* entries with that match the name and email address. */
/****************************************************************************/
int AB_SetHTMLForPerson(DIR_Server* dir, ABook* pABook, PersonEntry* pPerson);
/****************************************************************************/
/* This should not be called by any of the fes. I placed it here so it */
/* could be called in the backend by other functions in libmsg */
/* This will break a name apart into first name and last name. */
/* Be sure and set the WinCSID in the person structure */
/****************************************************************************/
int AB_BreakApartFirstName (ABook* pABook, PersonEntry* pPerson);
XP_END_PROTOS
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,137 +0,0 @@
/* -*- 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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/* Region-related definitions and prototypes */
#ifndef _FE_RGN_H_
#define _FE_RGN_H_
#ifdef LAYERS
#include "xp_core.h"
#include "xp_rect.h"
/******************Definitions and Types************/
/* For Windows only: Should we use the MFC CRgn class for region stuff? */
#ifdef XP_WIN
#undef FE_RGN_USE_MFC
#endif /* XP_WIN */
#ifdef XP_WIN
#ifdef FE_RGN_USE_MFC
#define FE_GetMDRegion(rgn) ((CRgn *)rgn)
#else
/*
* Note that the resultant CRgn * does not have to be
* explicitly deleted. It is considered a temporary object
* by the MFC and is deleted the next time we have idle
* time in the event loop.
*/
#define FE_GetMDRegion(rgn) ((HRGN)rgn)
#endif /* FE_RGN_USE_MFC */
#elif defined(XP_UNIX)
#define FE_GetMDRegion(rgn) ((Region)rgn)
#elif defined(XP_MAC)
#define FE_GetMDRegion(rgn) ((RgnHandle)rgn)
#else
#define FE_GetMDRegion(rgn) (rgn)
#endif /* XP_WIN */
#ifdef XP_WIN
#define FE_MAX_REGION_COORDINATE 0x7FFFFFFF
#else
#define FE_MAX_REGION_COORDINATE 0x7FFF
#endif
/* Setting the clip region to this effectively unsets the clip */
#define FE_NULL_REGION NULL
#define FE_CLEAR_REGION(region) \
do {FE_SubtractRegion((region), (region), (region)); } while (0)
/* Function called by FE_ForEachRectInRegion */
typedef void (*FE_RectInRegionFunc)(void *closure, XP_Rect *rect);
/*******************Prototypes**********************/
XP_BEGIN_PROTOS
extern FE_Region FE_CreateRegion(void);
/* Creates a region from a rectangle. Returns */
/* NULL if region can't be created. */
extern FE_Region FE_CreateRectRegion(XP_Rect *rect);
/* Destroys region. */
extern void FE_DestroyRegion(FE_Region region);
/* Makes a copy of a region. If dst is NULL, creates a new region */
extern FE_Region FE_CopyRegion(FE_Region src, FE_Region dst);
/* Set an existing region to a rectangle */
extern FE_Region FE_SetRectRegion(FE_Region region, XP_Rect *rect);
/* dst = src1 intersect sr2 */
/* dst can be one of src1 or src2 */
extern void FE_IntersectRegion(FE_Region src1, FE_Region src2, FE_Region dst);
/* dst = src1 union src2 */
/* dst can be one of src1 or src2 */
extern void FE_UnionRegion(FE_Region src1, FE_Region src2, FE_Region dst);
/* dst = src1 - src2 */
/* dst can be one of src1 or src2 */
extern void FE_SubtractRegion(FE_Region src1, FE_Region src2, FE_Region dst);
/* Returns TRUE if the region contains no pixels */
extern XP_Bool FE_IsEmptyRegion(FE_Region region);
/* Returns the bounding rectangle of the region */
extern void FE_GetRegionBoundingBox(FE_Region region, XP_Rect *bbox);
/* TRUE if rgn1 == rgn2 */
extern XP_Bool FE_IsEqualRegion(FE_Region rgn1, FE_Region rgn2);
/* Moves a region by the specified offsets */
extern void FE_OffsetRegion(FE_Region region, int32 xOffset, int32 yOffset);
/* Is any part of the rectangle in the specified region */
extern XP_Bool FE_RectInRegion(FE_Region region, XP_Rect *rect);
/* For each rectangle that makes up this region, call the func */
extern void FE_ForEachRectInRegion(FE_Region region,
FE_RectInRegionFunc func,
void * closure);
#ifdef DEBUG
extern void FE_HighlightRect(void *context, XP_Rect *rect, int how_much);
extern void FE_HighlightRegion(void *context, FE_Region region, int how_much);
#endif /* DEBUG */
XP_END_PROTOS
#endif /* LAYERS */
#endif /* _FE_RGN_H_ */

View File

@ -1,129 +0,0 @@
/* -*- 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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef _RESDEF_H_
#define _RESDEF_H_
#include "xp_core.h"
/* BEGING NEW_STRING_LIB */
#define RES_OFFSET 7000
/* END NEW_STRING_LIB */
/*
#ifdef XP_MAC
#define RES_OFFSET 4000
#else
#define RES_OFFSET 7000
#endif
*/
#ifndef RESOURCE_STR
#ifdef WANT_ENUM_STRING_IDS
#define RES_START
#if defined(XP_WIN) && _MSC_VER == 1100
/* VC50 has a bug, where large enumerations cause an
* internal compiler error. Do some hack here to fix without
* breaking the other platforms.
*/
#define BEGIN_STR(arg)
#define ResDef(name,id,msg) enum { name=id };
#define END_STR(arg)
#else /* XP_WIN _MSC_VER */
#define BEGIN_STR(arg) enum {
#define ResDef(name,id,msg) name=id,
#if defined(XP_WIN)
#define END_STR(arg) };
#else
#define END_STR(arg) arg=0 };
#endif
#endif /* XP_WIN _MSC_VER */
#else /* WANT_ENUM_STRING_IDS */
#define RES_START
#define BEGIN_STR(arg)
#ifdef XP_WIN16
/* Get these ints out of DGROUP (/Gt3 compiler switch)
* so we can increase the stack size
*/
#define ResDef(name,id,msg) int __far name = (id);
#else
#define ResDef(name,id,msg) int name = (id);
#endif
#define END_STR(arg)
#endif /* WANT_ENUM_STRING_IDS */
#else /* RESOURCE_STR, the definition here is for building resources */
#if defined(XP_WIN) || defined(XP_OS2)
#ifndef MOZILLA_CLIENT
#define RES_START
#define BEGIN_STR(arg) static char * (arg) (int32 i) { switch (i) {
#define ResDef(name,id,msg) case (id)+RES_OFFSET: return (msg);
#define END_STR(arg) } return NULL; }
#else /* MOZILLA_CLIENT */
#define RES_START STRINGTABLE DISCARDABLE
#define BEGIN_STR(arg) BEGIN
#define ResDef(name,id,msg) id+RES_OFFSET msg
#define END_STR(arg) END
#endif /* not MOZILLA_CLIENT */
#elif defined(XP_MAC)
/* Do nothing -- leave ResDef() to be perl'ized via MPW */
/*#define ResDef(name,id,msg) ResDef(name,id,msg)*/
/* BEGIN NEW_STRING_LIB */
#define RES_START
#define BEGIN_STR(arg) char* (arg)(long i); \
char* (arg)(long i) { switch (i) {
#define ResDef(name,id,msg) case ((id)+RES_OFFSET): return (msg);
#define END_STR(arg) default: return NULL;} return NULL; }
/* END NEW_STRING_LIB */
#elif defined(XP_UNIX)
#ifdef RESOURCE_STR_X
#define RES_START
#define BEGIN_STR(arg) static char *(arg)(void) {
#define ResDef(name,id,msg) output((id)+RES_OFFSET, (msg));
#define END_STR(arg) }
#else
#define RES_START
#define BEGIN_STR(arg) static char *(arg)(int32 i) { switch (i) {
#define ResDef(name,id,msg) case (id)+RES_OFFSET: return (msg);
#define END_STR(arg) } return NULL; }
#endif /* RESOURCE_STR_X */
#elif defined(XP_BEOS)
#define RES_START
#define BEGIN_STR(arg) static char *(arg)(int32 i) { switch (i) {
#define ResDef(name,id,msg) case (id)+RES_OFFSET: return (msg);
#define END_STR(arg) } return NULL; }
#endif /* XP_WIN */
#endif /* RESOURCE_STR */
#endif /* _RESDEF_H_ */

View File

@ -1,203 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/* *
*
*
***************************************************************************
* spellchk.h
* Public header file for the Spell Checker library.
****************************************************************************/
#ifndef _SPELLCHK_H_
#define _SPELLCHK_H_
/* In WIN16 DLL exported functions require __loadds keywords for the DS
* register to be set to the DLL's data-segment value and restored on return
* from the function.
*/
#ifdef WINDOWS
#define SCAPI __loadds
#elif defined(WIN32)
#define SCAPI __cdecl
#else
#define SCAPI
#endif
#ifdef MAC
#include <Files.h>
#endif
/* Language and Dialect codes. */
#define L_AFRIKAANS 101
#define L_CATALAN 102
#define L_CZECH 103
#define L_DANISH 104
#define L_DUTCH 105
#define L_ENGLISH 106
#define L_FINNISH 107
#define L_FRENCH 108
#define L_GERMAN 109
#define L_GREEK 110
#define L_HUNGARIAN 111
#define L_ITALIAN 112
#define L_NORWEGIAN 113
#define L_POLISH 114
#define L_PORTUGUESE 115
#define L_RUSSIAN 116
#define L_SPANISH 117
#define L_SWEDISH 118
#define D_DEFAULT 0xFFFF
#define D_AUS_ENGLISH 0x1001
#define D_US_ENGLISH 0x1010
#define D_UK_ENGLISH 0x1100
#define D_DOPPEL 0x2001 /* German */
#define D_SCHARFES 0x2010
#define D_BRAZILIAN 0x4001 /* Portuguese */
#define D_EUROPEAN 0x4010
#define D_BOKMAL 0x8001 /* Norwegian */
#define D_NYNORSK 0x8010
/* ISpellChecker - This class specifies the interface to the Spell Checker. A client
* application instatiates a spell checker object using the exported function SC_Create().
* The client application then performs spell checking using the member functions of this
* class. The spell checker object is destroyed by using the exported function SC_Destroy().
*/
class ISpellChecker
{
public:
/* Needs to be called by the client app once before calling any other functions.
* Return: 0 = success, non-zero = error
*/
#ifdef MAC
virtual int SCAPI Initialize(int LangCode, int DialectCode,
FSSpec *DbPath, FSSpec *PersonalDbFile) = 0;
#else
virtual int SCAPI Initialize(int LangCode, int DialectCode,
const char *DbPath, const char *PersonalDbFile) = 0;
#endif
/* Functions to set and get the current language and dialect settings.
* Returns: 0 = success, non-zero = failure
*/
virtual int SCAPI SetCurrentLanguage(int LangCode, int DialectCode) = 0;
virtual int SCAPI GetCurrentLanguage(int &LangCode, int &DialectCode) = 0;
/* Get the list of dictionaries available */
virtual int SCAPI GetNumOfDictionaries() = 0;
/* Get the language and dialect id for an available dictionary.
* Index = 0-based index into the list of available dictionaries.
* Returns: 0 = success, non-zero = failure.
*/
virtual int SCAPI GetDictionaryLanguage(int Index, int &LangCode, int &DialectCode) = 0;
/* Called by the client application to initialize a buffer for spell checking.
* It returns immediately without parsing the buffer. The client controls parsing of
* the buffer by calling GetNextMisspelledWord() and SetNewBuf().
* Return: 0 = success, non-zero = error
*/
virtual int SCAPI SetBuf(const char *pBuf) = 0;
/* Initialize a buffer with selection */
virtual int SCAPI SetBuf(const char *pBuf, unsigned long SelStart, unsigned long SelEnd) = 0;
/* Replace the current mispelled word with a new word */
virtual int SCAPI ReplaceMisspelledWord(const char *NewWord, int AllInstances) = 0;
/* Get the size of the current buffer */
virtual unsigned long SCAPI GetBufSize() = 0;
/* Copy the current buffer */
virtual int SCAPI GetBuf(char *pBuf, unsigned long BufSize) = 0;
/* Called by the client application to parse the buffer and return the next misspelled
* word in the buffer.
* Return: 0 = found a misspelled word.
* *Offset = Offset of the word from the beginning of the buffer
* *Len = Length of the word
* non-zero = no more misspelled word
*/
virtual int SCAPI GetNextMisspelledWord(unsigned long &Offset, unsigned long &Len) = 0;
/* The orginal buffer was changed by the client.
* ReparseFromStart = 1 - reparse the new buffer from the beginning
* = 0 - parse from the last offset into the original buffer
*/
virtual void SCAPI SetNewBuf(const char *pBuf, int ReparseFromStart) = 0;
/* Called by the client application to spell check a work.
* Return: 1 = valid word, 0 = not in dictionary
*/
virtual int SCAPI CheckWord(const char *pWord) = 0;
/* Get the number of possible alternatives found in the dictionary for the input word. */
virtual int SCAPI GetNumAlternatives(const char *pWord) = 0;
/* Get an alternative string. The "Index" is zero based.
* Return: 0 = success, -1 = error(bad Index),
* +ve value = BufSize too small, size needed
*/
virtual int SCAPI GetAlternative(int Index, char *pBuf, unsigned int BufSize) = 0;
/* The following functions interact with the personal database */
/* Add a word to the personal dictionary */
virtual int SCAPI AddWordToPersonalDictionary(const char *pWord) = 0;
/* Remove a word from the personal dictionary */
virtual int SCAPI RemoveWordFromPersonalDictionary(const char *pWord) = 0;
/* Ignore all references to a word in the current session */
virtual int SCAPI IgnoreWord(const char *pWord) = 0;
/* GetFirstPersonalDictionaryWord & GetNextPersonalDictionaryWord
* These functions retrieve words in the personal dictionary
* Returns: 0 = success, pBuf contains the next word
* -1 = no more words
* +ve = required buffer size. Size passed is too small.
*/
virtual int SCAPI GetFirstPersonalDictionaryWord(char *pBuf, int BufSize) = 0;
virtual int SCAPI GetNextPersonalDictionaryWord(char *pBuf, int BufSize) = 0;
/* Resets the contents of the personal dictionary */
virtual int SCAPI ResetPersonalDictionary() = 0;
/* destructor */
virtual ~ISpellChecker() {};
};
/* Exported library functions to create and destroy ISpellChecker objects. */
extern "C"
{
ISpellChecker * SCAPI SC_Create();
void SCAPI SC_Destroy(ISpellChecker *pSpellChecker);
}
#endif

View File

@ -1,57 +0,0 @@
/* -*- 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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef __XP_ERROR_h_
#define __XP_ERROR_h_
#include "xp_core.h"
#include <errno.h>
XP_BEGIN_PROTOS
extern int xp_errno;
/*
** Return the most recent set error code.
*/
#ifdef XP_WIN
#define XP_GetError() xp_errno
#else
#define XP_GetError() xp_errno
#endif
/*
** Set the error code
*/
#ifdef DEBUG
extern void XP_SetError(int value);
#else
#define XP_SetError(v) xp_errno = (v)
#endif
XP_END_PROTOS
#endif /* __XP_ERROR_h_ */

View File

@ -1,219 +0,0 @@
/* -*- 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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef __XP_SOCK_h_
#define __XP_SOCK_h_
#include "xp_core.h"
#include "xp_error.h"
#ifdef XP_UNIX
#ifdef AIXV3
#include <sys/signal.h>
#include <sys/select.h>
#endif /* AIXV3 */
#include <sys/types.h>
#include <string.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#ifndef __hpux
#include <arpa/inet.h>
#endif /* __hpux */
#include <netdb.h>
#endif /* XP_UNIX */
#ifdef XP_BEOS
#include <socket.h>
#include <netinet/in.h>
#endif
#ifdef XP_MAC
#include "macsocket.h"
#define SOCKET_BUFFER_SIZE 4096
#endif /* XP_MAC */
#ifdef XP_OS2 /* IBM-VPB050196 */
# include "os2sock.h"
# ifdef XP_OS2_DOUGSOCK
# include "dsfunc.h"
# endif
# define SOCKET_BUFFER_SIZE 4096
#endif
#ifdef XP_WIN
#include "winsock.h"
#define SOCKET_BUFFER_SIZE 4096
#ifdef __cplusplus
extern "C" {
#endif
extern int dupsocket(int foo); /* always fails */
#ifdef __cplusplus
}
#endif
#ifndef EPIPE
#define EPIPE ECONNRESET
#endif
#undef BOOLEAN
#define BOOLEAN char
#endif /* XP_WIN */
#ifndef SOCKET_ERRNO
#define SOCKET_ERRNO XP_GetError()
#endif
/************************************************************************/
#ifdef XP_UNIX
/* Network i/o wrappers */
#define XP_SOCKET int
#define XP_SOCK_ERRNO errno
#define XP_SOCK_SOCKET socket
#define XP_SOCK_CONNECT connect
#define XP_SOCK_ACCEPT accept
#define XP_SOCK_BIND bind
#define XP_SOCK_LISTEN listen
#define XP_SOCK_SHUTDOWN shutdown
#define XP_SOCK_IOCTL ioctl
#define XP_SOCK_RECV recv
#define XP_SOCK_RECVFROM recvfrom
#define XP_SOCK_RECVMSG recvmsg
#define XP_SOCK_SEND send
#define XP_SOCK_SENDTO sendto
#define XP_SOCK_SENDMSG sendmsg
#define XP_SOCK_READ read
#define XP_SOCK_WRITE write
#define XP_SOCK_READV readv
#define XP_SOCK_WRITEV writev
#define XP_SOCK_GETPEERNAME getpeername
#define XP_SOCK_GETSOCKNAME getsockname
#define XP_SOCK_GETSOCKOPT getsockopt
#define XP_SOCK_SETSOCKOPT setsockopt
#define XP_SOCK_CLOSE close
#define XP_SOCK_DUP dup
#endif /* XP_UNIX */
/*IBM-DSR072296 - now using WinSock 1.1 support in OS/2 Merlin instead of DOUGSOCK...*/
#if defined(XP_WIN) || ( defined(XP_OS2) && !defined(XP_OS2_DOUGSOCK) )
#define XP_SOCKET SOCKET
#define XP_SOCK_ERRNO WSAGetLastError()
#define XP_SOCK_SOCKET socket
#define XP_SOCK_CONNECT connect
#define XP_SOCK_ACCEPT accept
#define XP_SOCK_BIND bind
#define XP_SOCK_LISTEN listen
#define XP_SOCK_SHUTDOWN shutdown
#define XP_SOCK_IOCTL ioctlsocket
#define XP_SOCK_RECV recv
#define XP_SOCK_RECVFROM recvfrom
#define XP_SOCK_RECVMSG recvmsg
#define XP_SOCK_SEND send
#define XP_SOCK_SENDTO sendto
#define XP_SOCK_SENDMSG sendmsg
#define XP_SOCK_READ(s,b,l) recv(s,b,l,0)
#define XP_SOCK_WRITE(s,b,l) send(s,b,l,0)
#define XP_SOCK_READV readv
#define XP_SOCK_WRITEV writev
#define XP_SOCK_GETPEERNAME getpeername
#define XP_SOCK_GETSOCKNAME getsockname
#define XP_SOCK_GETSOCKOPT getsockopt
#define XP_SOCK_SETSOCKOPT setsockopt
#define XP_SOCK_CLOSE closesocket
#define XP_SOCK_DUP dupsocket
#endif /* XP_WIN/ XP_OS2 && not DOUGSOCK */
#if defined(XP_OS2) && defined(XP_OS2_DOUGSOCK)
/* Network i/o wrappers */
#define XP_SOCKET int
#define XP_SOCK_ERRNO sock_errno()
#define XP_SOCK_SOCKET socket
#define XP_SOCK_CONNECT connect
#define XP_SOCK_ACCEPT accept
#define XP_SOCK_BIND bind
#define XP_SOCK_LISTEN listen
#define XP_SOCK_SHUTDOWN shutdown
#define XP_SOCK_IOCTL ioctl
#define XP_SOCK_RECV receiveAndMakeReadSocketActive
#define XP_SOCK_RECVFROM recvfrom
#define XP_SOCK_RECVMSG recvmsg
#define XP_SOCK_SEND send
#define XP_SOCK_SENDTO sendto
#define XP_SOCK_SENDMSG sendmsg
#define XP_SOCK_READ(s,b,l) receiveAndMakeReadSocketActive(s,b,l,0)
#define XP_SOCK_WRITE(s,b,l) send(s,b,l,0)
#define XP_SOCK_READV readv
#define XP_SOCK_WRITEV writev
#define XP_SOCK_GETPEERNAME getpeername
#define XP_SOCK_GETSOCKNAME getsockname
#define XP_SOCK_GETSOCKOPT getsockopt
#define XP_SOCK_SETSOCKOPT setsockopt
#define XP_SOCK_CLOSE closeAndRemoveSocketFromPostList
#define XP_SOCK_DUP dupsocket
#endif /*XP_OS2 with DOUGSOCK*/
#ifdef XP_MAC
/*
Remap unix sockets into GUSI
*/
#define XP_SOCKET int
#define XP_SOCK_ERRNO errno
#define XP_SOCK_SOCKET macsock_socket
#define XP_SOCK_CONNECT macsock_connect
#define XP_SOCK_ACCEPT macsock_accept
#define XP_SOCK_BIND macsock_bind
#define XP_SOCK_LISTEN macsock_listen
#define XP_SOCK_SHUTDOWN macsock_shutdown
#define XP_SOCK_IOCTL macsock_ioctl
#define XP_SOCK_RECV(s,b,l,f) XP_SOCK_READ(s,b,l)
#define XP_SOCK_SEND(s,b,l,f) XP_SOCK_WRITE(s,b,l)
#define XP_SOCK_READ macsock_read
#define XP_SOCK_WRITE macsock_write
#define XP_SOCK_GETPEERNAME macsock_getpeername
#define XP_SOCK_GETSOCKNAME macsock_getsockname
#define XP_SOCK_GETSOCKOPT macsock_getsockopt
#define XP_SOCK_SETSOCKOPT macsock_setsockopt
#define XP_SOCK_CLOSE macsock_close
#define XP_SOCK_DUP macsock_dup
#endif /* XP_MAC */
#endif /* __XP_SOCK_h_ */

View File

@ -1,85 +0,0 @@
/* -*- 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.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/* xupfonts.h - X Unicode Pseudo FONTS Header file */
#ifndef XUPFONTS_H
#define XUPFONTS_H
#include "xp.h"
#define UNICODE_PSEUDO_FONT_TAG 0xabadbeef
#define UNICODE_PLACEHOLDER_WIDTH 10
typedef struct fe_UnicodePseudoFont
{
unsigned int tag;
char *family;
XFontStruct *xFonts[INTL_CHAR_SET_MAX];
char xfont_inited[INTL_CHAR_SET_MAX];
char xfont_scaled[INTL_CHAR_SET_MAX];
char* xfont_name[INTL_CHAR_SET_MAX];
char *fontFamily[INTL_CHAR_SET_MAX];
char larger_fonts_avail[INTL_CHAR_SET_MAX];
XmFontList xmfontlist;
XFontSet xfontset;
XmFontList xm_fontset;
Display *dpy;
int pitch;
int sizeNum;
int fontmask;
int faceNum;
int pixelSize;
int ascent;
int descent;
} fe_UnicodePseudoFont;
XP_BEGIN_PROTOS
XFontStruct *fe_UnicodeGetXfont(fe_UnicodePseudoFont *ufont, uint16 encoding);
int fe_DrawUCS2String(Display *dpy, Drawable d, fe_Font font, GC gc, int x,
int y, uint16 *string, int len);
void fe_freeUnicodePseudoFont(fe_Font font);
fe_Font fe_LoadUnicodeFontByPixelSize(void *not_used, char *familyName,
int pixelSize, int fontmask, int charset, int pitch, int faceNum,
Display *dpy);
void fe_UCS2TextExtents(fe_Font font, uint16 *string, int len, int *direction,
int *fontAscent, int *fontDescent, XCharStruct *overall);
void fe_UTF8TextExtents(fe_Font font, char *string, int len, int *direction,
int *fontAscent, int *fontDescent, XCharStruct *overall);
void fe_DrawUTF8String(Display *dpy, Drawable d, fe_Font font, GC gc, int x,
int y, char *string, int len);
fe_Font XUPF_LoadDefaultFont(Display *dpy);
XmFontList XUPF_GetXmFontList(fe_Font font);
XmFontList XUPF_GetXmFontSet(fe_Font font);
XmString XUPF_UCS2ToXmString(uint16 *uniChars, int32 length,
fe_Font ufont, XmFontList *fontList);
int XUPF_JavaPointToPixelSize(Display *dpy, int pointSize);
XP_END_PROTOS
#endif /* XUPFONTS_H */