mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 03:49:37 +00:00
Bug 38061 - removing obsolete headers. sr=cls.
This commit is contained in:
parent
589229a55e
commit
a7df13353f
@ -2,31 +2,12 @@
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
client.h
|
||||
csid.h
|
||||
ctxtfunc.h
|
||||
edttypes.h
|
||||
fe_proto.h
|
||||
libc_r.h
|
||||
merrors.h
|
||||
minicom.h
|
||||
mk_cx_fn.h
|
||||
msgtypes.h
|
||||
m_cvstrm.h
|
||||
ncompat.h
|
||||
net.h
|
||||
npapi.h
|
||||
npupp.h
|
||||
ntypes.h
|
||||
platform.h
|
||||
proto.h
|
||||
shistele.h
|
||||
structs.h
|
||||
unix-dns.h
|
||||
winfile.h
|
||||
xp.h
|
||||
xpassert.h
|
||||
xpgetstr.h
|
||||
xp_core.h
|
||||
xp_debug.h
|
||||
xp_file.h
|
||||
|
@ -26,12 +26,8 @@ VPATH = @srcdir@
|
||||
|
||||
EXPORTS = \
|
||||
csid.h \
|
||||
merrors.h \
|
||||
msgtypes.h \
|
||||
net.h \
|
||||
npapi.h \
|
||||
npupp.h \
|
||||
ntypes.h \
|
||||
platform.h \
|
||||
xp_core.h \
|
||||
xp_file.h \
|
||||
|
@ -1,49 +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):
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* This file should be included after xp_mcom.h
|
||||
*
|
||||
* All definitions for intermodule communications in the Netscape
|
||||
* client should be contained in this file
|
||||
*/
|
||||
|
||||
#ifndef _CLIENT_H_
|
||||
#define _CLIENT_H_
|
||||
|
||||
#define NEW_FE_CONTEXT_FUNCS
|
||||
|
||||
/* include header files needed for prototypes/etc */
|
||||
|
||||
#include "xp_mcom.h"
|
||||
|
||||
#include "ntypes.h" /* typedefs for commonly used Netscape data structures */
|
||||
#include "fe_proto.h" /* all the standard FE functions */
|
||||
#include "proto.h" /* library functions */
|
||||
|
||||
/* global data structures */
|
||||
#include "structs.h"
|
||||
#include "merrors.h"
|
||||
|
||||
#endif /* _CLIENT_H_ */
|
||||
|
@ -1,39 +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):
|
||||
*/
|
||||
|
||||
/* the context function table
|
||||
*
|
||||
* This was typedef'd to ContextFuncs in structs.h
|
||||
*/
|
||||
#ifndef _ContextFunctions_
|
||||
#define _ContextFunctions_
|
||||
|
||||
#include "il_types.h"
|
||||
#include "xp_obs.h"
|
||||
|
||||
struct _ContextFuncs {
|
||||
#define MAKE_FE_FUNCS_STRUCT
|
||||
#include "mk_cx_fn.h"
|
||||
};
|
||||
|
||||
#endif /* _ContextFunctions_ */
|
||||
|
@ -1,699 +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):
|
||||
*/
|
||||
|
||||
/*
|
||||
* File defines external editor types.
|
||||
*
|
||||
* These types are remapped internally to the editor.
|
||||
*/
|
||||
|
||||
#ifndef _edt_types_h_
|
||||
#define _edt_types_h_
|
||||
|
||||
#ifndef EDITOR_TYPES
|
||||
#define ED_Element void
|
||||
#define ED_Buffer void
|
||||
#define ED_TagCursor void
|
||||
#define ED_BitArray void
|
||||
#endif
|
||||
|
||||
#include "xp_core.h"
|
||||
|
||||
/* Number of "Netscape Colors" All are in
|
||||
* Color cube
|
||||
*/
|
||||
#define MAX_NS_COLORS 70
|
||||
|
||||
/* Limits on table parameters */
|
||||
#define MAX_TABLE_ROWS 500
|
||||
#define MAX_TABLE_COLUMNS 100
|
||||
/* This is also limit used for cell size, padding, and borders */
|
||||
#define MAX_TABLE_PIXELS 10000
|
||||
|
||||
typedef int32 ED_BufferOffset;
|
||||
|
||||
/*
|
||||
* Handle to Internal structure used for maintaining links.
|
||||
*/
|
||||
typedef struct ED_Link* ED_LinkId;
|
||||
#define ED_LINK_ID_NONE 0
|
||||
|
||||
/* this id is passed to FE_GetImageData.. when it returns, we know to pass
|
||||
* the call to EDT_SetImageData
|
||||
*/
|
||||
#define ED_IMAGE_LOAD_HACK_ID -10
|
||||
|
||||
typedef enum {
|
||||
ED_ELEMENT_NONE, /* Not returned from EDT_GetCurrentElement, needed to have a "not known" value */
|
||||
ED_ELEMENT_SELECTION, /* a selection instead of a single element */
|
||||
ED_ELEMENT_TEXT,
|
||||
ED_ELEMENT_IMAGE,
|
||||
ED_ELEMENT_HRULE,
|
||||
ED_ELEMENT_UNKNOWN_TAG,
|
||||
ED_ELEMENT_TARGET,
|
||||
ED_ELEMENT_TABLE, /* Keep these at the end so we can use type >= ED_ELEMENT_TABLE to test for any of them */
|
||||
ED_ELEMENT_CELL,
|
||||
ED_ELEMENT_ROW, /* May not need these. Currently returning ED_ELEMENT_CELL instead */
|
||||
ED_ELEMENT_COL
|
||||
} ED_ElementType;
|
||||
|
||||
typedef enum {
|
||||
ED_CARET_BEFORE = 0,
|
||||
ED_CARET_AFTER = 1
|
||||
} ED_CaretObjectPosition;
|
||||
|
||||
#define TF_NONE 0
|
||||
#define TF_BOLD 1
|
||||
#define TF_ITALIC 2
|
||||
#define TF_FIXED 4
|
||||
#define TF_SUPER 8
|
||||
#define TF_SUB 0x10
|
||||
#define TF_STRIKEOUT 0x20
|
||||
#define TF_BLINK 0x40
|
||||
#define TF_FONT_COLOR 0x80 /* set if font has color */
|
||||
#define TF_FONT_SIZE 0x100 /* set if font has size */
|
||||
#define TF_HREF 0x200
|
||||
#define TF_SERVER 0x400
|
||||
#define TF_SCRIPT 0x800
|
||||
#define TF_STYLE 0x1000
|
||||
#define TF_UNDERLINE 0x2000
|
||||
#define TF_FONT_FACE 0x4000
|
||||
#define TF_NOBREAK 0x8000
|
||||
#define TF_SPELL 0x10000
|
||||
#define TF_INLINEINPUT 0x20000
|
||||
#define TF_INLINEINPUTTHICK 0x40000
|
||||
#define TF_INLINEINPUTDOTTED 0x80000
|
||||
#define TF_FONT_WEIGHT 0x100000
|
||||
#define TF_FONT_POINT_SIZE 0x200000
|
||||
|
||||
typedef int32 ED_TextFormat; /* Prefered type for the editor text format. */
|
||||
typedef ED_TextFormat ED_ETextFormat; /* Alias for old code. Remove when possible. */
|
||||
|
||||
/* Similar to ED_TextFormat. Used when multiple cells are represented in EDT_TableCellData */
|
||||
|
||||
#define CF_NONE 0
|
||||
#define CF_ALIGN 1
|
||||
#define CF_VALIGN 2
|
||||
#define CF_COLSPAN 4
|
||||
#define CF_ROWSPAN 8
|
||||
#define CF_HEADER 0x10
|
||||
#define CF_NOWRAP 0x20
|
||||
#define CF_WIDTH 0x40
|
||||
#define CF_HEIGHT 0x80
|
||||
#define CF_BACK_COLOR 0x100
|
||||
#define CF_BACK_IMAGE 0x200
|
||||
#define CF_BACK_NOSAVE 0x400
|
||||
#define CF_EXTRA_HTML 0x800
|
||||
|
||||
typedef int32 ED_CellFormat; /* Prefered type for the editor cell format. */
|
||||
|
||||
/*
|
||||
* The names here are confusing, and have a historical basis that is
|
||||
* lost in the mists of time. The trouble is that the "ED_ALIGN_CENTER"
|
||||
* tag is really "abscenter", while the ED_ALIGN_ABSCENTER tag is
|
||||
* really "center". (and the same for the TOP and BOTTOM tags.)
|
||||
*
|
||||
* Someday, if we have a lot of spare time we could switch the names.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
ED_ALIGN_DEFAULT = -1, /* HTML string */
|
||||
ED_ALIGN_CENTER = 0, /* abscenter NOT SUPPORTED IN COMPOSER FE STARTING IN 5.0 */
|
||||
ED_ALIGN_LEFT = 1, /* left */
|
||||
ED_ALIGN_RIGHT = 2, /* right */
|
||||
ED_ALIGN_TOP = 3, /* texttop */
|
||||
ED_ALIGN_BOTTOM = 4, /* absbottom NOT SUPPORTED IN COMPOSER FE STARTING IN 5.0 */
|
||||
ED_ALIGN_BASELINE = 5, /* baseline (default, no param written out) */
|
||||
ED_ALIGN_ABSCENTER = 6, /* center */
|
||||
ED_ALIGN_ABSBOTTOM = 7, /* bottom Used for Table Cells only */
|
||||
ED_ALIGN_ABSTOP = 8 /* top */
|
||||
} ED_Alignment;
|
||||
|
||||
|
||||
/*------------------- TABLE SIZING AND SELECTION --------------------*/
|
||||
|
||||
/* SizeStyle defines */
|
||||
#define ED_SIZE_NONE 0
|
||||
#define ED_SIZE_TOP 0x0001
|
||||
#define ED_SIZE_RIGHT 0x0002
|
||||
#define ED_SIZE_BOTTOM 0x0004
|
||||
#define ED_SIZE_LEFT 0x0008
|
||||
#define ED_SIZE_ADD_ROWS 0x0010
|
||||
#define ED_SIZE_ADD_COLS 0x0020
|
||||
|
||||
/* Hotspot at corners */
|
||||
#define ED_SIZE_TOP_RIGHT (ED_SIZE_TOP | ED_SIZE_RIGHT)
|
||||
#define ED_SIZE_BOTTOM_RIGHT (ED_SIZE_BOTTOM | ED_SIZE_RIGHT)
|
||||
#define ED_SIZE_TOP_LEFT (ED_SIZE_TOP | ED_SIZE_LEFT)
|
||||
#define ED_SIZE_BOTTOM_LEFT (ED_SIZE_BOTTOM | ED_SIZE_LEFT)
|
||||
|
||||
typedef intn ED_SizeStyle;
|
||||
|
||||
typedef enum { /* Return value for EDT_GetTableHitRegion) */
|
||||
ED_HIT_NONE,
|
||||
ED_HIT_SEL_TABLE, /* Upper left corner */
|
||||
ED_HIT_SEL_COL, /* Near top table border */
|
||||
ED_HIT_SEL_ROW, /* Near left table border */
|
||||
ED_HIT_SEL_CELL, /* Near top cell border */
|
||||
ED_HIT_SEL_ALL_CELLS, /* Upper left corner when Ctrl is pressed */
|
||||
ED_HIT_SIZE_TABLE_WIDTH, /* Near right table border */
|
||||
ED_HIT_SIZE_TABLE_HEIGHT, /* Near bottom table border */
|
||||
ED_HIT_SIZE_COL, /* Near right border of a cell and between columns */
|
||||
ED_HIT_SIZE_ROW, /* Near bottom border of a cell and between columns */
|
||||
ED_HIT_ADD_ROWS, /* Lower left corner */
|
||||
ED_HIT_ADD_COLS, /* Lower right corner */
|
||||
ED_HIT_DRAG_TABLE, /* Near bottom border and between rows when table or cell is already selected */
|
||||
ED_HIT_CHANGE_COLSPAN, /* Near Right border of cell having COLSPAN (Not used yet) */
|
||||
ED_HIT_CHANGE_ROWSPAN /* Bottom edge of cell having ROWSPAN (Not used yet) */
|
||||
} ED_HitType;
|
||||
|
||||
typedef enum { /* Return types for EDT_GetTableDragDropRegion */
|
||||
ED_DROP_NONE, /* Don't allow drop - when pasting wouldn't change anything */
|
||||
ED_DROP_NORMAL, /* No special table behavior - do the same as any HTML drop */
|
||||
ED_DROP_ROW_ABOVE, /* Between rows - near top border of cell when source = row */
|
||||
ED_DROP_ROW_BELOW, /* Between rows - near bottom border of cell when source = row */
|
||||
ED_DROP_COLUMN_BEFORE, /* Between columns - near left border of cell when source = column */
|
||||
ED_DROP_COLUMN_AFTER, /* Between columns - near right border of cell when source = column */
|
||||
ED_DROP_REPLACE_CELLS /* Inside cell - when we want to replace cell contents */
|
||||
} ED_DropType;
|
||||
|
||||
/* Different behavior when pasting table cells. 2nd param values for EDT_PasteHTML() */
|
||||
typedef enum {
|
||||
ED_PASTE_NORMAL,
|
||||
ED_PASTE_TABLE, /* Create a new table at insert point */
|
||||
ED_PASTE_ROW_ABOVE, /* Insert new row(s) above current row */
|
||||
ED_PASTE_ROW_BELOW, /* Insert new row(s) below current row*/
|
||||
ED_PASTE_COLUMN_BEFORE, /* Insert new column(s) before current column */
|
||||
ED_PASTE_COLUMN_AFTER, /* Insert new column(s) after current column */
|
||||
ED_PASTE_REPLACE_CELLS, /* Replace cell contents of cells marked with
|
||||
the "special selection" attribute */
|
||||
/* Next 2 are used only when pasting tab-delimited text or image representation from Excel */
|
||||
ED_PASTE_TEXT, /* Paste plain text, not a table */
|
||||
ED_PASTE_IMAGE /* Paste the image representation of the text */
|
||||
} ED_PasteType;
|
||||
/* Note: Keep the range from ROW_ABOVE through REPLACE_CELLS in synch with ED_DropType values
|
||||
for quick conversion from ED_DropType into ED_PasteType */
|
||||
|
||||
/* Data type written to stream. Used to decide how to paste into existing table */
|
||||
typedef enum {
|
||||
|
||||
ED_COPY_NORMAL, /* Default = 0. Normal HTML copying, not a table */
|
||||
ED_COPY_TABLE, /* Entire Table was copied */
|
||||
ED_COPY_ROWS, /* Only entire rows were copied */
|
||||
ED_COPY_COLUMNS, /* Only entire columns were copied */
|
||||
ED_COPY_CELLS /* Arbitrary set of selected cells were copied */
|
||||
} ED_CopyType;
|
||||
|
||||
struct _EDT_DragTableData {
|
||||
LO_TableStruct *pSourceTable; /* So we can tell if dragging over the source table */
|
||||
ED_HitType iSourceType; /* One of the ED_HIT_SEL_... enums */
|
||||
ED_DropType iDropType; /* One of ED_DROP_... enums */
|
||||
LO_Element *pFirstSelectedCell; /* First cell in source being dragged */
|
||||
LO_Element *pDragOverCell; /* Cell being dragged over */
|
||||
int32 iRows; /* Number of rows being dragged */
|
||||
int32 iColumns; /* Number of columns being dragged (counts COLSPAN) */
|
||||
int32 *pCellsPerRow; /* Array of number of actual cells in each row (size = iRows) */
|
||||
/* (this doesn't count COLSPAN effects) */
|
||||
int32 X; /* Location to place highlighting or make caret */
|
||||
int32 Y; /* to show where to drop cells */
|
||||
int32 iWidth; /* The width and */
|
||||
int32 iHeight; /* height of the insert-between-cells feedback */
|
||||
};
|
||||
typedef struct _EDT_DragTableData EDT_DragTableData;
|
||||
|
||||
|
||||
typedef enum { /* Return values from EDT_GetMergeCellsType */
|
||||
ED_MERGE_NONE,
|
||||
ED_MERGE_NEXT_CELL,
|
||||
ED_MERGE_SELECTED_CELLS
|
||||
} ED_MergeType;
|
||||
|
||||
/* Used with EDT_ChangeTableSelection to tell if we should move
|
||||
* to next Cell, Row, or Columns along with changing the selected cells
|
||||
*/
|
||||
typedef enum {
|
||||
ED_MOVE_NONE,
|
||||
ED_MOVE_PREV,
|
||||
ED_MOVE_NEXT
|
||||
} ED_MoveSelType;
|
||||
|
||||
/*--------------------------- HREF --------------------------------*/
|
||||
|
||||
struct _EDT_HREFData {
|
||||
char *pURL;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_HREFData EDT_HREFData;
|
||||
|
||||
/*--------------------------- Image --------------------------------*/
|
||||
|
||||
struct _EDT_ImageData {
|
||||
XP_Bool bIsMap;
|
||||
/* char *pUseMap; created with XP_ALLOC() Now in pExtra, hardts */
|
||||
ED_Alignment align;
|
||||
char *pSrc;
|
||||
char *pLowSrc;
|
||||
char *pName;
|
||||
char *pAlt;
|
||||
int32 iWidth;
|
||||
int32 iHeight;
|
||||
XP_Bool bWidthPercent; /* Range: 1 - 100 if TRUE, else = pixels (default) */
|
||||
XP_Bool bHeightPercent;
|
||||
int32 iHSpace;
|
||||
int32 iVSpace;
|
||||
int32 iBorder;
|
||||
/* Added hardts */
|
||||
XP_Bool bNoSave;
|
||||
/* Added by CLM: */
|
||||
int32 iOriginalWidth; /* Width and Height we got on initial loading */
|
||||
int32 iOriginalHeight;
|
||||
EDT_HREFData *pHREFData;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_ImageData EDT_ImageData;
|
||||
|
||||
/*--------------------------- Target --------------------------------*/
|
||||
|
||||
struct _EDT_TargetData {
|
||||
char *pName;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_TargetData EDT_TargetData;
|
||||
|
||||
/*--------------------------- Character --------------------------------*/
|
||||
#define ED_FONT_POINT_SIZE_DEFAULT 0
|
||||
#define ED_FONT_POINT_SIZE_MIN 1
|
||||
#define ED_FONT_POINT_SIZE_MAX 1000
|
||||
|
||||
#define ED_FONT_WEIGHT_MIN 100
|
||||
#define ED_FONT_WEIGHT_NORMAL 400
|
||||
#define ED_FONT_WEIGHT_BOLD 700
|
||||
#define ED_FONT_WEIGHT_MAX 900
|
||||
|
||||
enum {
|
||||
ED_FONT_VARIABLE,
|
||||
ED_FONT_FIXED,
|
||||
ED_FONT_LOCAL
|
||||
};
|
||||
|
||||
struct _EDT_CharacterData {
|
||||
ED_TextFormat mask; /* bits to set or get */
|
||||
ED_TextFormat values; /* values of the bits in the mask */
|
||||
LO_Color *pColor; /* color if mask bit is set */
|
||||
int32 iSize; /* size if mask bit is set */
|
||||
EDT_HREFData *pHREFData; /* href if mask bit is set */
|
||||
ED_LinkId linkId; /* internal use only */
|
||||
char* pFontFace; /* FontFace name */
|
||||
int16 iWeight; /* font weight range = 100-900, 400=Normal, 700=Bold*/
|
||||
int16 iPointSize; /* not sure what default is! Use 0 to mean "default" */
|
||||
};
|
||||
|
||||
typedef struct _EDT_CharacterData EDT_CharacterData;
|
||||
|
||||
/*--------------------------- Horizonal Rule --------------------------------*/
|
||||
|
||||
struct _EDT_HorizRuleData {
|
||||
ED_Alignment align; /* only allows left and right alignment */
|
||||
int32 size; /* value 1 to 100 indicates line thickness */
|
||||
int32 iWidth; /* CM: default = 100% */
|
||||
XP_Bool bWidthPercent; /* Range: 1 - 100 if TRUE(default), else = pixels */
|
||||
XP_Bool bNoShade;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_HorizRuleData EDT_HorizRuleData;
|
||||
|
||||
/*--------------------------- ContainerData --------------------------------*/
|
||||
|
||||
struct _EDT_ContainerData {
|
||||
ED_Alignment align; /* only allows left and right alignment */
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_ContainerData EDT_ContainerData;
|
||||
|
||||
/*--------------------------- TableData --------------------------------*/
|
||||
|
||||
struct _EDT_TableData {
|
||||
ED_Alignment align; /* ED_ALIGN_LEFT, ED_ALIGN_ABSCENTER, ED_ALIGN_RIGHT */
|
||||
ED_Alignment malign; /* margin alignment: ED_ALIGN_DEFAULT, ED_ALIGN_LEFT, ED_ALIGN_RIGHT */
|
||||
XP_Bool bUseCols; /* TRUE means COLS= will be output, which speeds up layout in 4.0 */
|
||||
int32 iRows;
|
||||
int32 iColumns;
|
||||
XP_Bool bBorderWidthDefined;
|
||||
int32 iBorderWidth;
|
||||
int32 iCellSpacing;
|
||||
int32 iCellPadding;
|
||||
XP_Bool bWidthDefined;
|
||||
XP_Bool bWidthPercent;
|
||||
int32 iWidth;
|
||||
int32 iWidthPixels;
|
||||
XP_Bool bHeightDefined;
|
||||
XP_Bool bHeightPercent;
|
||||
int32 iHeight;
|
||||
int32 iHeightPixels;
|
||||
LO_Color *pColorBackground; /* null in the default case */
|
||||
char *pBackgroundImage; /* null in the default case */
|
||||
XP_Bool bBackgroundNoSave;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_TableData EDT_TableData;
|
||||
|
||||
/*--------------------------- TableCaptionData --------------------------------*/
|
||||
|
||||
struct _EDT_TableCaptionData {
|
||||
ED_Alignment align;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_TableCaptionData EDT_TableCaptionData;
|
||||
|
||||
/*--------------------------- TableRowData --------------------------------*/
|
||||
|
||||
struct _EDT_TableRowData {
|
||||
ED_Alignment align;
|
||||
ED_Alignment valign;
|
||||
LO_Color *pColorBackground; /* null in the default case */
|
||||
char *pBackgroundImage; /* null in the default case */
|
||||
XP_Bool bBackgroundNoSave;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_TableRowData EDT_TableRowData;
|
||||
|
||||
/*--------------------------- TableCellData --------------------------------*/
|
||||
|
||||
struct _EDT_TableCellData {
|
||||
ED_CellFormat mask; /* bits to tell us what we know for all cells */
|
||||
ED_HitType iSelectionType; /* Either: ED_HIT_SEL_CELL, ED_HIT_SEL_COL, ED_HIT_SEL_ROW, or ED_HIT_NONE */
|
||||
intn iSelectedCount; /* Number of cells selected. Usually >= 1 */
|
||||
ED_Alignment align;
|
||||
ED_Alignment valign;
|
||||
int32 iColSpan;
|
||||
int32 iRowSpan;
|
||||
XP_Bool bHeader; /* TRUE == th, FALSE == td */
|
||||
XP_Bool bNoWrap;
|
||||
int32 X;
|
||||
int32 Y;
|
||||
intn iRow;
|
||||
XP_Bool bWidthDefined;
|
||||
XP_Bool bWidthPercent;
|
||||
int32 iWidth;
|
||||
int32 iWidthPixels;
|
||||
XP_Bool bHeightDefined;
|
||||
XP_Bool bHeightPercent;
|
||||
int32 iHeight;
|
||||
int32 iHeightPixels;
|
||||
LO_Color *pColorBackground; /* null in the default case */
|
||||
char *pBackgroundImage; /* null in the default case */
|
||||
XP_Bool bBackgroundNoSave;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_TableCellData EDT_TableCellData;
|
||||
|
||||
/*--------------------------- LayerData --------------------------------*/
|
||||
|
||||
struct _EDT_LayerData {
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_LayerData EDT_LayerData;
|
||||
|
||||
/*--------------------------- DivisionData --------------------------------*/
|
||||
|
||||
struct _EDT_DivisionData {
|
||||
ED_Alignment align;
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_DivisionData EDT_DivisionData;
|
||||
|
||||
/*--------------------------- Page Properties --------------------------------*/
|
||||
struct _EDT_MetaData {
|
||||
XP_Bool bHttpEquiv; /* true, http-equiv="fdsfds", false name="fdsfds" */
|
||||
char *pName; /* http-equiv's or name's value */
|
||||
char *pContent; /* value of the CONTENT param */
|
||||
char *pPrevContent; /* The previous CONTENT value to search for
|
||||
so we can support multiple items with same
|
||||
name or http-equiv param */
|
||||
};
|
||||
|
||||
typedef struct _EDT_MetaData EDT_MetaData;
|
||||
|
||||
struct _EDT_PageData {
|
||||
LO_Color *pColorBackground; /* null in the default case */
|
||||
LO_Color *pColorLink;
|
||||
LO_Color *pColorText;
|
||||
LO_Color *pColorFollowedLink;
|
||||
LO_Color *pColorActiveLink;
|
||||
char *pBackgroundImage;
|
||||
XP_Bool bBackgroundNoSave;
|
||||
char *pFontDefURL; /* For Web Fonts. */
|
||||
XP_Bool bFontDefNoSave;
|
||||
char *pTitle;
|
||||
XP_Bool bKeepImagesWithDoc;
|
||||
};
|
||||
|
||||
typedef struct _EDT_PageData EDT_PageData;
|
||||
|
||||
typedef enum {
|
||||
ED_COLOR_BACKGROUND,
|
||||
ED_COLOR_LINK,
|
||||
ED_COLOR_TEXT,
|
||||
ED_COLOR_FOLLOWED_LINK
|
||||
} ED_EColor;
|
||||
|
||||
/*
|
||||
* CLM: Java and PlugIn data structures
|
||||
*/
|
||||
struct _EDT_ParamData {
|
||||
char *pName;
|
||||
char *pValue;
|
||||
};
|
||||
typedef struct _EDT_ParamData EDT_ParamData;
|
||||
|
||||
typedef int32 EDT_ParamID;
|
||||
|
||||
struct _EDT_PlugInData {
|
||||
EDT_ParamID ParamID; /* Identifies which Param list is associated */
|
||||
char *pSrc;
|
||||
XP_Bool bHidden;
|
||||
ED_Alignment align;
|
||||
int32 iWidth;
|
||||
int32 iHeight;
|
||||
XP_Bool bWidthPercent; /* Range: 1 - 100 if TRUE, else = pixels default) */
|
||||
XP_Bool bHeightPercent;
|
||||
XP_Bool bForegroundPalette; /* PC systems only. For controling 256-color palette wars */
|
||||
int32 iHSpace;
|
||||
int32 iVSpace;
|
||||
int32 iBorder;
|
||||
};
|
||||
typedef struct _EDT_PlugInData EDT_PlugInData;
|
||||
|
||||
struct _EDT_JavaData {
|
||||
EDT_ParamID ParamID;
|
||||
char *pCode;
|
||||
char *pCodebase;
|
||||
char *pName;
|
||||
ED_Alignment align;
|
||||
char *pSrc;
|
||||
int32 iWidth;
|
||||
int32 iHeight;
|
||||
XP_Bool bWidthPercent; /* Range: 1 - 100 if TRUE, else = pixels default) */
|
||||
XP_Bool bHeightPercent;
|
||||
int32 iHSpace;
|
||||
int32 iVSpace;
|
||||
int32 iBorder;
|
||||
};
|
||||
typedef struct _EDT_JavaData EDT_JavaData;
|
||||
|
||||
/* CLM: Error codes for file writing
|
||||
* Return 0 if no error
|
||||
*/
|
||||
typedef enum {
|
||||
ED_ERROR_NONE,
|
||||
ED_ERROR_READ_ONLY, /* File is marked read-only */
|
||||
ED_ERROR_BLOCKED, /* Can't write at this time, edit buffer blocked */
|
||||
ED_ERROR_BAD_URL, /* URL was not a "file:" type or no string */
|
||||
ED_ERROR_FILE_OPEN,
|
||||
ED_ERROR_FILE_WRITE,
|
||||
ED_ERROR_CREATE_BAKNAME,
|
||||
ED_ERROR_DELETE_BAKFILE,
|
||||
ED_ERROR_FILE_RENAME_TO_BAK,
|
||||
ED_ERROR_CANCEL,
|
||||
ED_ERROR_FILE_EXISTS, /* We really didn't save -- file existed and no overwrite */
|
||||
ED_ERROR_SRC_NOT_FOUND,
|
||||
ED_ERROR_FILE_READ,
|
||||
|
||||
/* The following are used internally by the editor and will not be passed to the front end. */
|
||||
ED_ERROR_PUBLISHING, /* When netlib encounters an error http or ftp publishing. */
|
||||
ED_ERROR_TAPEFS_COMPLETION /* The tape file system for saving encountered an error when
|
||||
the Complete() method was called. E.g. an error sending a
|
||||
mail message. */
|
||||
} ED_FileError;
|
||||
|
||||
typedef enum {
|
||||
ED_PUBLISH_OK,
|
||||
ED_PUBLISH_ERROR_FILENAME,
|
||||
ED_PUBLISH_ERROR_LOCATION
|
||||
} ED_PublishError;
|
||||
|
||||
typedef enum {
|
||||
ED_TAG_OK,
|
||||
ED_TAG_UNOPENED,
|
||||
ED_TAG_UNCLOSED,
|
||||
ED_TAG_UNTERMINATED_STRING,
|
||||
ED_TAG_PREMATURE_CLOSE,
|
||||
ED_TAG_TAGNAME_EXPECTED
|
||||
} ED_TagValidateResult;
|
||||
|
||||
typedef enum {
|
||||
ED_LIST_TYPE_DEFAULT,
|
||||
ED_LIST_TYPE_DIGIT,
|
||||
ED_LIST_TYPE_BIG_ROMAN,
|
||||
ED_LIST_TYPE_SMALL_ROMAN,
|
||||
ED_LIST_TYPE_BIG_LETTERS,
|
||||
ED_LIST_TYPE_SMALL_LETTERS,
|
||||
ED_LIST_TYPE_CIRCLE,
|
||||
ED_LIST_TYPE_SQUARE,
|
||||
ED_LIST_TYPE_DISC,
|
||||
ED_LIST_TYPE_CITE /* For Mail Quoting */
|
||||
} ED_ListType;
|
||||
|
||||
|
||||
struct _EDT_ListData {
|
||||
/* This should be TagType, but there are problems with the include file dependencies. */
|
||||
int8 iTagType; /* P_UNUM_LIST, P_NUM_LIST, P_BLOCKQUOTE, */
|
||||
/* P_DIRECTOR, P_MENU, P_DESC_LIST */
|
||||
XP_Bool bCompact;
|
||||
ED_ListType eType;
|
||||
int32 iStart; /* automatically maps, start is one */
|
||||
char *pBaseURL; /* If an ED_LIST_TYPE_CITE, this is the URL from the enclosing <BASE> tag.
|
||||
Don't expose this to users because not actually written out in the HTML. */
|
||||
char *pExtra;
|
||||
};
|
||||
|
||||
typedef struct _EDT_ListData EDT_ListData;
|
||||
|
||||
typedef enum {
|
||||
ED_BREAK_NORMAL, /* just break the line, ignore images */
|
||||
ED_BREAK_LEFT, /* break so it passes the image on the left */
|
||||
ED_BREAK_RIGHT, /* break past the right image */
|
||||
ED_BREAK_BOTH /* break past both images */
|
||||
} ED_BreakType;
|
||||
|
||||
typedef enum {
|
||||
ED_SAVE_OVERWRITE_THIS,
|
||||
ED_SAVE_OVERWRITE_ALL,
|
||||
ED_SAVE_DONT_OVERWRITE_THIS,
|
||||
ED_SAVE_DONT_OVERWRITE_ALL,
|
||||
ED_SAVE_CANCEL
|
||||
} ED_SaveOption;
|
||||
|
||||
/* After saving, what to do with the editor buffer. */
|
||||
typedef enum {
|
||||
ED_FINISHED_GOTO_NEW, /* Point the editor to the location of the
|
||||
newly saved document. */
|
||||
ED_FINISHED_REVERT_BUFFER, /* Revert the buffer to the state before
|
||||
the save operation began. */
|
||||
ED_FINISHED_SAVE_DRAFT, /* Like ED_FINISHED_REVERT_BUFFER, except clears the dirty flag
|
||||
on success. */
|
||||
ED_FINISHED_MAIL_SEND /* If we succeed we're going to throw the buffer
|
||||
away, so don't revert it. If failure, revert the buffer.
|
||||
Used for mail compose, we don't
|
||||
want the editor to start any operation that
|
||||
causes problems when libmsg destroys the editor
|
||||
context. */
|
||||
} ED_SaveFinishedOption;
|
||||
|
||||
|
||||
/* For FE_SaveDialogCreate */
|
||||
typedef enum {
|
||||
ED_SAVE_DLG_SAVE_LOCAL, /* "saving files to local disk" */
|
||||
ED_SAVE_DLG_PUBLISH, /* "uploading files to remote server" */
|
||||
ED_SAVE_DLG_PREPARE_PUBLISH /* "preparing files to publish" */
|
||||
} ED_SaveDialogType;
|
||||
|
||||
typedef int32 EDT_ClipboardResult;
|
||||
#define EDT_COP_OK 0
|
||||
#define EDT_COP_DOCUMENT_BUSY 1
|
||||
#define EDT_COP_SELECTION_EMPTY 2
|
||||
#define EDT_COP_SELECTION_CROSSES_TABLE_DATA_CELL 3
|
||||
#define EDT_COP_SELECTION_CROSSES_NESTED_TABLE 4
|
||||
|
||||
/* For the result EDT_COP_CLIPBOARD_BAD the XP code has already
|
||||
* given the user an error dialog. So FE code should not
|
||||
* give an additional error dialog. (Only occurs on
|
||||
* paste and paste-like operations.)
|
||||
*/
|
||||
#define EDT_COP_CLIPBOARD_BAD 4
|
||||
|
||||
|
||||
#ifdef FIND_REPLACE
|
||||
|
||||
#define ED_FIND_FIND_ALL_WORDS 1 /* used to enumerate all words in a */
|
||||
/* buffer */
|
||||
#define ED_FIND_MATCH_CASE 2 /* default is to ignore case */
|
||||
#define ED_FIND_REPLACE 4 /* call back the replace routine */
|
||||
#define ED_FIND_WHOLE_BUFFER 8 /* start search from the top */
|
||||
#define ED_FIND_REVERSE 0x10 /* reverse search from this point */
|
||||
|
||||
typedef intn ED_FindFlags;
|
||||
|
||||
typedef void (*EDT_PFReplaceFunc)( void *pMWContext,
|
||||
char *pFoundWord,
|
||||
char **pReplaceWord );
|
||||
|
||||
struct _EDT_FindAndReplaceData {
|
||||
char* pSearchString;
|
||||
ED_FindFlags fflags;
|
||||
EDT_PFReplaceFunc pfReplace;
|
||||
};
|
||||
|
||||
typedef struct _EDT_FindAndReplaceData EDT_FindAndReplaceData;
|
||||
|
||||
#endif /* FIND_REPLACE */
|
||||
|
||||
/* Callback function for image encoder */
|
||||
|
||||
typedef int32 EDT_ImageEncoderReference;
|
||||
typedef unsigned char EDT_ImageEncoderStatus;
|
||||
#define ED_IMAGE_ENCODER_OK 0
|
||||
#define ED_IMAGE_ENCODER_USER_CANCELED 1
|
||||
#define ED_IMAGE_ENCODER_EXCEPTION 2
|
||||
|
||||
typedef void (*EDT_ImageEncoderCallbackFn)(EDT_ImageEncoderStatus status, void* hook);
|
||||
|
||||
/* Outcomes which can be returned by FE_EncodingDialog(): */
|
||||
typedef enum {
|
||||
ED_ENCODE_CANCEL, /* User canceled - close the page */
|
||||
ED_ENCODE_CHANGE_CHARSET, /* Convert current document's charset */
|
||||
ED_ENCODE_CHANGE_METATAG /* Just write charset to meta tag */
|
||||
/* (doesn't change content) */
|
||||
} ED_CharsetEncode;
|
||||
|
||||
#endif
|
1341
include/fe_proto.h
1341
include/fe_proto.h
File diff suppressed because it is too large
Load Diff
@ -1,97 +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):
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
** Mac_Convert_Stream.h
|
||||
** --------------------
|
||||
**
|
||||
** The header file for the constructing functions of apple file
|
||||
** encode/decode stream.
|
||||
**
|
||||
** 27sep95 mym created.
|
||||
*/
|
||||
|
||||
#ifndef M_CVStrm_h
|
||||
#define M_CVStrm_h
|
||||
|
||||
XP_BEGIN_PROTOS
|
||||
|
||||
PUBLIC NET_StreamClass *
|
||||
fe_MakeBinHexEncodeStream (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *window_id,
|
||||
char* dst_filename);
|
||||
|
||||
PUBLIC NET_StreamClass *
|
||||
fe_MakeBinHexDecodeStream (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *window_id );
|
||||
|
||||
PUBLIC NET_StreamClass *
|
||||
fe_MakeAppleDoubleDecodeStream (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *window_id,
|
||||
XP_Bool write_as_binhex,
|
||||
char *dst_filename);
|
||||
|
||||
PUBLIC NET_StreamClass *
|
||||
fe_MakeAppleSingleDecodeStream (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *window_id,
|
||||
XP_Bool write_as_binhex,
|
||||
char *dst_filename);
|
||||
|
||||
#ifdef XP_MAC
|
||||
|
||||
PUBLIC NET_StreamClass *
|
||||
fe_MakeAppleDoubleEncodeStream (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *window_id,
|
||||
char* src_filename,
|
||||
char* dst_filename,
|
||||
char* separator);
|
||||
|
||||
XP_Bool isMacFile(char* filename);
|
||||
|
||||
#endif
|
||||
|
||||
PUBLIC NET_StreamClass *
|
||||
fe_MakeAppleDoubleDecodeStream_1 (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *window_id);
|
||||
|
||||
PUBLIC NET_StreamClass *
|
||||
fe_MakeAppleSingleDecodeStream_1 (int format_out,
|
||||
void *data_obj,
|
||||
URL_Struct *URL_s,
|
||||
MWContext *window_id);
|
||||
|
||||
XP_END_PROTOS
|
||||
|
||||
#endif
|
@ -50,13 +50,9 @@ DEPTH = ..
|
||||
#INSTALL_DIR=$(XPDIST)\include
|
||||
EXPORTS = \
|
||||
csid.h \
|
||||
merrors.h \
|
||||
minicom.h \
|
||||
msgtypes.h \
|
||||
net.h \
|
||||
npapi.h \
|
||||
npupp.h \
|
||||
ntypes.h \
|
||||
platform.h \
|
||||
xp_core.h \
|
||||
xp_file.h \
|
||||
|
@ -1,78 +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):
|
||||
*/
|
||||
|
||||
|
||||
/* merrors.h --- error codes for netlib. */
|
||||
|
||||
|
||||
#ifndef _MERRORS_H_
|
||||
#define _MERRORS_H_
|
||||
|
||||
/*
|
||||
* Return codes
|
||||
*/
|
||||
|
||||
#define MK_INTERRUPTED -201
|
||||
|
||||
#define MK_UNABLE_TO_CONVERT -208
|
||||
|
||||
#define MK_UNABLE_TO_LOGIN -210
|
||||
|
||||
#define MK_NO_NEWS_SERVER -224
|
||||
#define MK_USE_FTP_INSTEAD -225
|
||||
#define MK_USE_COPY_FROM_CACHE -226
|
||||
#define MK_EMPTY_NEWS_LIST -227
|
||||
|
||||
#define MK_MAILTO_NOT_READY -228
|
||||
|
||||
#define MK_OBJECT_NOT_IN_CACHE -239
|
||||
|
||||
#define MK_UNABLE_TO_LISTEN_ON_SOCKET -244
|
||||
|
||||
#define MK_WAITING_FOR_LOOKUP -248 /* response for async dns */
|
||||
#define MK_DO_REDIRECT -249 /* tells mkgeturl to redirect */
|
||||
|
||||
#define MK_MIME_NEED_B64 -270 /* used internally */
|
||||
#define MK_MIME_NEED_QP -271 /* used internally */
|
||||
#define MK_MIME_NEED_TEXT_CONVERTER -272 /* used internally */
|
||||
#define MK_MIME_NEED_PS_CONVERTER -273 /* used internally */
|
||||
|
||||
#define MK_IMAGE_LOSSAGE -277
|
||||
|
||||
#define MK_TOO_MANY_OPEN_FILES -310
|
||||
|
||||
#define MK_FILE_WRITE_ERROR -350
|
||||
|
||||
#define MK_GET_REST_OF_PARTIAL_FILE_FROM_NETWORK -399
|
||||
|
||||
#define MK_MULTIPART_MESSAGE_COMPLETED -437
|
||||
|
||||
#define MK_OFFLINE -438
|
||||
|
||||
/* success codes */
|
||||
#define MK_DATA_LOADED 1
|
||||
#define MK_NO_DATA 2
|
||||
#define MK_NO_ACTION 3
|
||||
#define MK_CHANGING_CONTEXT 4
|
||||
|
||||
|
||||
#endif /* _MERRORS_H_ */
|
@ -1,171 +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):
|
||||
*/
|
||||
|
||||
/*
|
||||
** This file is Michael Toy's fault. If you hate it or have troubles figuring
|
||||
** it out, you should bother him about it.
|
||||
**
|
||||
** This file generates both the fields of the front end structure, and the
|
||||
** fe specific prototypes for your front end implementations, AND the
|
||||
** the code to fill in the structure in your context initilization code
|
||||
**
|
||||
** To use it:
|
||||
**
|
||||
** #define MAKE_FE_FUNCS_STRUCT
|
||||
** #include "mk_cx_fn.h"
|
||||
** This will generate the field definitions for the structure.
|
||||
**
|
||||
** #define MAKE_FE_FUNCS_PREFIX(func) prefix_##func
|
||||
** #define MAKE_FE_FUNCS_ASSIGN cx->
|
||||
** #include "mk_cx_fn.h"
|
||||
** Substitute your naming prefix for "prefix" (e.g XFE)
|
||||
** This will generate the assignment statements to fill in the structure,
|
||||
** the definition of MAKE_FE_FUNCS_ASSIGN will be the left hand side of the
|
||||
** assignment statement.
|
||||
**
|
||||
** #define MAKE_FE_FUNCS_PREFIX(func) prefix_##func
|
||||
** #define MAKE_FE_FUNCS_EXTERN
|
||||
** #include "mk_cx_fn.h"
|
||||
** This will generate the prototypes for all your front end functions.
|
||||
*/
|
||||
|
||||
#if defined(MAKE_FE_FUNCS_TYPES)
|
||||
#define FE_DEFINE(func, returns, args) typedef returns (*MAKE_FE_TYPES_PREFIX(func)) args;
|
||||
#elif defined(MAKE_FE_FUNCS_STRUCT)
|
||||
#define FE_DEFINE(func, returns, args) returns (*func) args;
|
||||
#elif defined(MAKE_FE_FUNCS_EXTERN)
|
||||
#define FE_DEFINE(func, returns, args) extern returns MAKE_FE_FUNCS_PREFIX(func) args;
|
||||
#elif defined(MAKE_FE_FUNCS_ASSIGN)
|
||||
#define FE_DEFINE(func, returns, args) MAKE_FE_FUNCS_ASSIGN func = MAKE_FE_FUNCS_PREFIX(func);
|
||||
#elif !defined(FE_DEFINE)
|
||||
You;Should;Read;The;Header;For;This;File;Before;Including;Error;Error;Error;
|
||||
#endif
|
||||
|
||||
FE_DEFINE(CreateNewDocWindow, MWContext*, (MWContext * calling_context,URL_Struct * URL))
|
||||
FE_DEFINE(LayoutNewDocument, void, (MWContext *context, URL_Struct *url_struct, int32 *iWidth, int32 *iHeight, int32 *mWidth, int32 *mHeight))
|
||||
FE_DEFINE(SetDocTitle,void, (MWContext * context, char * title))
|
||||
FE_DEFINE(FinishedLayout,void, (MWContext *context))
|
||||
FE_DEFINE(TranslateISOText,char *, (MWContext * context, int charset, char *ISO_Text))
|
||||
FE_DEFINE(GetTextInfo,int, (MWContext * context, LO_TextStruct *text, LO_TextInfo *text_info))
|
||||
#ifdef XP_MAC
|
||||
FE_DEFINE(MeasureText,int, (MWContext * context, LO_TextStruct *text, short *charLocs))
|
||||
#endif
|
||||
#ifndef MOZ_NGLAYOUT
|
||||
FE_DEFINE(GetEmbedSize,void, (MWContext * context, LO_EmbedStruct *embed_struct, NET_ReloadMethod force_reload))
|
||||
#endif
|
||||
FE_DEFINE(GetJavaAppSize,void, (MWContext * context, LO_JavaAppStruct *java_struct, NET_ReloadMethod force_reload))
|
||||
#ifndef MOZ_NGLAYOUT
|
||||
FE_DEFINE(GetFormElementInfo,void, (MWContext * context, LO_FormElementStruct * form_element))
|
||||
FE_DEFINE(GetFormElementValue,void, (MWContext * context, LO_FormElementStruct * form_element, XP_Bool hide, XP_Bool submit))
|
||||
FE_DEFINE(ResetFormElement,void, (MWContext * context, LO_FormElementStruct * form_element))
|
||||
FE_DEFINE(SetFormElementToggle,void, (MWContext * context, LO_FormElementStruct * form_element, XP_Bool toggle))
|
||||
FE_DEFINE(FreeEmbedElement,void, (MWContext *context, LO_EmbedStruct *))
|
||||
FE_DEFINE(FreeBuiltinElement,void, (MWContext *context, LO_BuiltinStruct *))
|
||||
#endif /* MOZ_NGLAYOUT */
|
||||
FE_DEFINE(CreateEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app))
|
||||
FE_DEFINE(SaveEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app))
|
||||
FE_DEFINE(RestoreEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app))
|
||||
FE_DEFINE(DestroyEmbedWindow, void, (MWContext *context, NPEmbeddedApp *app))
|
||||
FE_DEFINE(FreeJavaAppElement,void, (MWContext *context, struct LJAppletData *appletData))
|
||||
FE_DEFINE(HideJavaAppElement,void, (MWContext *context, struct LJAppletData *))
|
||||
#ifndef MOZ_NGLAYOUT
|
||||
FE_DEFINE(FreeEdgeElement,void, (MWContext *context, LO_EdgeStruct *))
|
||||
FE_DEFINE(FormTextIsSubmit,void, (MWContext * context, LO_FormElementStruct * form_element))
|
||||
#endif /* MOZ_NGLAYOUT */
|
||||
FE_DEFINE(DisplaySubtext,void, (MWContext * context, int iLocation, LO_TextStruct *text, int32 start_pos, int32 end_pos, XP_Bool need_bg))
|
||||
FE_DEFINE(DisplayText,void, (MWContext * context, int iLocation, LO_TextStruct *text, XP_Bool need_bg))
|
||||
#ifndef MOZ_NGLAYOUT
|
||||
FE_DEFINE(DisplayEmbed,void, (MWContext * context, int iLocation ,LO_EmbedStruct *embed_struct))
|
||||
FE_DEFINE(DisplayBuiltin,void, (MWContext * context, int iLocation ,LO_BuiltinStruct *builtin_struct))
|
||||
#endif /* MOZ_NGLAYOUT */
|
||||
FE_DEFINE(DisplayJavaApp,void, (MWContext * context, int iLocation ,LO_JavaAppStruct *java_struct))
|
||||
#ifndef MOZ_NGLAYOUT
|
||||
FE_DEFINE(DisplayEdge,void, (MWContext * context, int iLocation ,LO_EdgeStruct *edge_struct))
|
||||
#endif
|
||||
FE_DEFINE(DisplayTable,void, (MWContext * context, int iLocation ,LO_TableStruct *table_struct))
|
||||
FE_DEFINE(DisplayCell,void, (MWContext * context, int iLocation ,LO_CellStruct *cell_struct))
|
||||
#ifdef XP_MAC
|
||||
FE_DEFINE(InvalidateEntireTableOrCell,void, (MWContext * context, LO_Element *element))
|
||||
FE_DEFINE(DisplayAddRowOrColBorder,void, (MWContext * context, void* r ,XP_Bool bErase))
|
||||
#endif
|
||||
FE_DEFINE(DisplaySubDoc,void, (MWContext * context, int iLocation ,LO_SubDocStruct *subdoc_struct))
|
||||
FE_DEFINE(DisplayLineFeed,void, (MWContext * context, int iLocation , LO_LinefeedStruct *line_feed, XP_Bool need_bg))
|
||||
FE_DEFINE(DisplayHR,void, (MWContext * context, int iLocation , LO_HorizRuleStruct *HR_struct))
|
||||
FE_DEFINE(DisplayBullet,void, (MWContext *context, int iLocation, LO_BullettStruct *bullet))
|
||||
#ifndef MOZ_NGLAYOUT
|
||||
FE_DEFINE(DisplayFormElement,void, (MWContext * context, int iLocation, LO_FormElementStruct * form_element))
|
||||
#endif
|
||||
FE_DEFINE(DisplayBorder,void, (MWContext *context, int iLocation, int x, int y, int width, int height, int bw, LO_Color *color, LO_LineStyle style))
|
||||
#ifdef XP_MAC
|
||||
FE_DEFINE(UpdateEnableStates,void, (MWContext *context))
|
||||
#endif
|
||||
FE_DEFINE(DisplayFeedback,void, (MWContext *context, int iLocation, LO_Element *element))
|
||||
FE_DEFINE(ClearView,void, (MWContext * context, int which))
|
||||
FE_DEFINE(SetDocDimension,void, (MWContext *context, int iLocation, int32 iWidth, int32 iLength))
|
||||
FE_DEFINE(SetDocPosition,void, (MWContext *context, int iLocation, int32 iX, int32 iY))
|
||||
FE_DEFINE(GetDocPosition,void, (MWContext *context, int iLocation, int32 *iX, int32 *iY))
|
||||
FE_DEFINE(BeginPreSection,void, (MWContext *context))
|
||||
FE_DEFINE(EndPreSection,void, (MWContext *context))
|
||||
FE_DEFINE(SetProgressBarPercent,void, (MWContext *context, int32 percent))
|
||||
FE_DEFINE(SetBackgroundColor,void, (MWContext *context, uint8 red, uint8 green, uint8 blue))
|
||||
FE_DEFINE(Progress, void, (MWContext * cx, const char *msg))
|
||||
FE_DEFINE(Alert, void, (MWContext * cx, const char *msg))
|
||||
FE_DEFINE(SetCallNetlibAllTheTime, void, (MWContext * win_id))
|
||||
FE_DEFINE(ClearCallNetlibAllTheTime, void, (MWContext * win_id))
|
||||
FE_DEFINE(GraphProgressInit, void, (MWContext *context, URL_Struct *URL_s, int32 content_length))
|
||||
FE_DEFINE(GraphProgressDestroy, void, (MWContext *context, URL_Struct *URL_s, int32 content_length, int32 total_bytes_read))
|
||||
FE_DEFINE(GraphProgress, void, (MWContext *context, URL_Struct *URL_s, int32 bytes_received, int32 bytes_since_last_time, int32 content_length))
|
||||
FE_DEFINE(UseFancyFTP, XP_Bool, (MWContext * window_id))
|
||||
FE_DEFINE(UseFancyNewsgroupListing, XP_Bool, (MWContext *window_id))
|
||||
FE_DEFINE(FileSortMethod, int, (MWContext * window_id))
|
||||
FE_DEFINE(ShowAllNewsArticles, XP_Bool, (MWContext *window_id))
|
||||
FE_DEFINE(Confirm, XP_Bool,(MWContext * context, const char * Msg))
|
||||
FE_DEFINE(CheckConfirm, XP_Bool, (MWContext *pContext, const char *pConfirmMessage, const char *pCheckMessage, const char *pOKMessage, const char *pCancelMessage, XP_Bool *pChecked))
|
||||
FE_DEFINE(SelectDialog, XP_Bool, (MWContext *pContext, const char *pMessage, const char **pList, int16 *pCount))
|
||||
FE_DEFINE(Prompt,char*,(MWContext * context, const char * Msg, const char * dflt))
|
||||
FE_DEFINE(PromptWithCaption,char*,(MWContext * context, const char *caption, const char * Msg, const char * dflt))
|
||||
FE_DEFINE(PromptUsernameAndPassword, XP_Bool, (MWContext *,const char *,char **, char **))
|
||||
FE_DEFINE(PromptPassword,char*,(MWContext * context, const char * Msg))
|
||||
FE_DEFINE(EnableClicking,void,(MWContext*))
|
||||
FE_DEFINE(AllConnectionsComplete,void,(MWContext * context))
|
||||
#ifdef XP_OS2 /* performance */
|
||||
FE_DEFINE(GetMaxWidth,int, (MWContext * context, LO_TextStruct *text))
|
||||
#endif
|
||||
#if 0
|
||||
FE_DEFINE(EraseBackground, void, (MWContext *, int, int32, int32, uint32, uint32, LO_Color *))
|
||||
FE_DEFINE(SetDrawable, void, (MWContext *, CL_Drawable *))
|
||||
FE_DEFINE(GetTextFrame, void, (MWContext *, LO_TextStruct *, int32, int32, void *))
|
||||
#ifdef XP_MAC
|
||||
FE_DEFINE(GetDefaultBackgroundColor, void, (MWContext* context, LO_Color* color))
|
||||
#endif
|
||||
#endif
|
||||
#ifdef TRANSPARENT_APPLET
|
||||
/* these functions are to allow dealyed native window applet creation and transparent applet */
|
||||
FE_DEFINE(HandleClippingView, void, (MWContext *pContext, struct LJAppletData *appletD, int x, int y, int width, int height))
|
||||
FE_DEFINE(DrawJavaApp, void, (MWContext *pContext, int iLocation, LO_JavaAppStruct *pJava))
|
||||
#endif
|
||||
|
||||
#undef FE_DEFINE
|
||||
#undef MAKE_FE_FUNCS_PREFIX
|
||||
#undef MAKE_FE_FUNCS_ASSIGN
|
||||
#undef MAKE_FE_FUNCS_EXTERN
|
||||
#undef MAKE_FE_FUNCS_STRUCT
|
@ -1,49 +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):
|
||||
*/
|
||||
|
||||
/* msgtypes.h --- types for the mail/news reader module.
|
||||
*/
|
||||
|
||||
#ifndef _MSGTYPES_H_
|
||||
#define _MSGTYPES_H_
|
||||
|
||||
/* This file defines types that are used by libmsg. Actually, it's rather
|
||||
underpopulated right now; much more should be moved here from msgcom.h. */
|
||||
|
||||
|
||||
|
||||
|
||||
/* Instances of MSG_Pane are used to represent the various panes in the user
|
||||
interfaces. The FolderPanes and MessagePanes must have a context associated
|
||||
with them, but the ThreadPane generally does not. MSG_Pane is deliberately
|
||||
an opaque type; FE's can't manipulate them except via the calls defined
|
||||
here. */
|
||||
|
||||
#ifdef XP_CPLUSPLUS
|
||||
class MSG_Pane;
|
||||
#else
|
||||
typedef struct MSG_Pane MSG_Pane;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif /* _MSGTYPES_H_ */
|
@ -1,255 +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):
|
||||
*/
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)compat.h 8.13 (Berkeley) 2/21/94
|
||||
*/
|
||||
|
||||
#ifndef _COMPAT_H_
|
||||
#define _COMPAT_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "platform.h"
|
||||
|
||||
/*
|
||||
* If your system doesn't typedef u_long, u_short, or u_char, change
|
||||
* the 0 to a 1.
|
||||
*/
|
||||
/*DSR041497 - these are defined in pmwsock.h, so only need for DOUGSOCK*/
|
||||
#ifdef XP_OS2_DOUGSOCK
|
||||
typedef unsigned char u_char; /* 4.[34]BSD names. */
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
typedef unsigned short u_short;
|
||||
#endif
|
||||
|
||||
/* If your system doesn't typedef size_t, change the 0 to a 1. */
|
||||
#if 0
|
||||
typedef unsigned int size_t; /* POSIX, 4.[34]BSD names. */
|
||||
#endif
|
||||
|
||||
/* If your system doesn't typedef ssize_t, change the 0 to a 1. */
|
||||
#if 0
|
||||
typedef int ssize_t; /* POSIX names. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If your system doesn't have the POSIX type for a signal mask,
|
||||
* change the 0 to a 1.
|
||||
*/
|
||||
#if 0 /* POSIX 1003.1 signal mask type. */
|
||||
typedef unsigned int sigset_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If your system's vsprintf returns a char *, not an int,
|
||||
* change the 0 to a 1.
|
||||
*/
|
||||
#ifdef SUNOS4
|
||||
#define VSPRINTF_CHARSTAR
|
||||
#endif
|
||||
/*
|
||||
* If you don't have POSIX 1003.1 signals, the signal code surrounding the
|
||||
* temporary file creation is intended to block all of the possible signals
|
||||
* long enough to create the file and unlink it. All of this stuff is
|
||||
* intended to use old-style BSD calls to fake POSIX 1003.1 calls.
|
||||
*/
|
||||
#ifdef NO_POSIX_SIGNALS
|
||||
#define sigemptyset(set) (*(set) = 0)
|
||||
#define sigfillset(set) (*(set) = ~(sigset_t)0, 0)
|
||||
#define sigaddset(set,signo) (*(set) |= sigmask(signo), 0)
|
||||
#define sigdelset(set,signo) (*(set) &= ~sigmask(signo), 0)
|
||||
#define sigismember(set,signo) ((*(set) & sigmask(signo)) != 0)
|
||||
|
||||
#define SIG_BLOCK 1
|
||||
#define SIG_UNBLOCK 2
|
||||
#define SIG_SETMASK 3
|
||||
|
||||
static int __sigtemp; /* For the use of sigprocmask */
|
||||
|
||||
/* Repeated test of oset != NULL is to avoid "*0". */
|
||||
#define sigprocmask(how, set, oset) \
|
||||
((__sigtemp = \
|
||||
(((how) == SIG_BLOCK) ? \
|
||||
sigblock(0) | *(set) : \
|
||||
(((how) == SIG_UNBLOCK) ? \
|
||||
sigblock(0) & ~(*(set)) : \
|
||||
((how) == SIG_SETMASK ? \
|
||||
*(set) : sigblock(0))))), \
|
||||
((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : \
|
||||
sigsetmask(__sigtemp)), 0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If your system doesn't have an include file with the appropriate
|
||||
* byte order set, make sure you specify the correct one.
|
||||
*/
|
||||
#ifndef BYTE_ORDER
|
||||
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
|
||||
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
|
||||
#define BYTE_ORDER BIG_ENDIAN /* Set for your system. */
|
||||
#endif
|
||||
|
||||
#if defined(SYSV) || defined(SYSTEM5) || defined(__sun)
|
||||
#define index(a, b) strchr(a, b)
|
||||
#define rindex(a, b) strrchr(a, b)
|
||||
#define bzero(a, b) memset(a, 0, b)
|
||||
#define bcmp(a, b, n) memcmp(a, b, n)
|
||||
#define bcopy(a, b, n) memmove(b, a, n)
|
||||
#endif
|
||||
|
||||
#if defined(BSD) || defined(BSD4_3)
|
||||
#define strchr(a, b) index(a, b)
|
||||
#define strrchr(a, b) rindex(a, b)
|
||||
#define memcmp(a, b, n) bcmp(a, b, n)
|
||||
#define memmove(a, b, n) bcopy(b, a, n)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 32-bit machine. The db routines are theoretically independent of
|
||||
* the size of u_shorts and u_longs, but I don't know that anyone has
|
||||
* ever actually tried it. At a minimum, change the following #define's
|
||||
* if you are trying to compile on a different type of system.
|
||||
*/
|
||||
#ifndef USHRT_MAX
|
||||
#define USHRT_MAX 0xFFFF
|
||||
#define ULONG_MAX 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
#ifndef O_ACCMODE /* POSIX 1003.1 access mode mask. */
|
||||
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 RE limit. */
|
||||
#define _POSIX2_RE_DUP_MAX 255
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If you can't provide lock values in the open(2) call. Note, this
|
||||
* allows races to happen.
|
||||
*/
|
||||
#ifndef O_EXLOCK /* 4.4BSD extension. */
|
||||
#define O_EXLOCK 0
|
||||
#endif
|
||||
|
||||
#ifndef O_SHLOCK /* 4.4BSD extension. */
|
||||
#define O_SHLOCK 0
|
||||
#endif
|
||||
|
||||
#ifndef EFTYPE
|
||||
#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
|
||||
#endif
|
||||
|
||||
#ifndef WCOREDUMP /* 4.4BSD extension */
|
||||
#define WCOREDUMP(a) 0
|
||||
#endif
|
||||
|
||||
#ifndef STDERR_FILENO
|
||||
#define STDIN_FILENO 0 /* ANSI C #defines */
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_SET 0 /* POSIX 1003.1 seek values */
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
|
||||
#define _POSIX_VDISABLE 0 /* Some systems used 0. */
|
||||
#endif
|
||||
|
||||
#ifndef TCSASOFT /* 4.4BSD extension. */
|
||||
#define TCSASOFT 0
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX2_RE_DUP_MAX /* POSIX 1003.2 values. */
|
||||
#define _POSIX2_RE_DUP_MAX 255
|
||||
#endif
|
||||
|
||||
#ifndef NULL /* ANSI C #defines NULL everywhere. */
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef MAX /* Usually found in <sys/param.h>. */
|
||||
#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
|
||||
#endif
|
||||
#ifndef MIN /* Usually found in <sys/param.h>. */
|
||||
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
|
||||
#endif
|
||||
|
||||
/* Default file permissions. */
|
||||
#ifndef DEFFILEMODE /* 4.4BSD extension. */
|
||||
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
||||
#endif
|
||||
|
||||
#ifndef __sun
|
||||
#ifndef S_ISDIR /* POSIX 1003.1 file type tests. */
|
||||
#define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */
|
||||
#define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */
|
||||
#define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */
|
||||
#define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */
|
||||
#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */
|
||||
#endif
|
||||
#ifndef S_ISLNK /* BSD POSIX 1003.1 extensions */
|
||||
#define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */
|
||||
#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */
|
||||
#endif
|
||||
#endif /* __sun */
|
||||
|
||||
/* The type of a va_list. */
|
||||
#ifndef _BSD_VA_LIST_ /* 4.4BSD #define. */
|
||||
#define _BSD_VA_LIST_ char *
|
||||
#endif
|
||||
|
||||
#endif /* !_COMPAT_H_ */
|
2469
include/net.h
2469
include/net.h
File diff suppressed because it is too large
Load Diff
219
include/ntypes.h
219
include/ntypes.h
@ -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 _NetscapeTypes_
|
||||
#define _NetscapeTypes_
|
||||
|
||||
#include "xp_core.h"
|
||||
|
||||
#if XP_MAC
|
||||
/*
|
||||
netlib
|
||||
*/
|
||||
typedef int FO_Present_Types;
|
||||
typedef struct URL_Struct_ URL_Struct;
|
||||
typedef struct _NET_StreamClass NET_StreamClass;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* libi18n
|
||||
*/
|
||||
typedef struct OpaqueCCCDataObject *CCCDataObject;
|
||||
typedef struct OpaqueINTL_CharSetInfo *INTL_CharSetInfo;
|
||||
|
||||
/* This lists the data input policies for the image lib.
|
||||
Note that only the last 3 policies request server validation of
|
||||
image data. These policies are very distinct from the netlib
|
||||
cache attributes, but are used to set the netlib cache attributes
|
||||
for a specific image request.
|
||||
*/
|
||||
typedef enum NET_ReloadMethod
|
||||
{
|
||||
IMG_CACHE_ONLY, /* imgcache, no validation, don't go to netlib cache */
|
||||
IMG_NTWK_SERVER, /* imgcache 1st, netcache 2nd, server 3rd, no initial validation */
|
||||
TV_IMG_NTWK_SERVER, /* test validation, use imgcache first. This is now
|
||||
implemented as TV_NTWK_SERVER_ONLY, since the image cache
|
||||
is not saved once we know we have to check with the server anyway.
|
||||
*/
|
||||
TV_NTWK_SERVER_ONLY, /* test validation, use necko cache first */
|
||||
SERVER_ONLY /* server only, force_reload */
|
||||
} NET_ReloadMethod;
|
||||
|
||||
#if XP_MAC
|
||||
/*
|
||||
plugins
|
||||
*/
|
||||
typedef struct _NPEmbeddedApp NPEmbeddedApp;
|
||||
|
||||
/*
|
||||
history
|
||||
*/
|
||||
typedef struct _History_entry History_entry;
|
||||
typedef struct History_ History;
|
||||
|
||||
/*
|
||||
bookmarks (so shist.h doesn't have to include all of bkmks.h.)
|
||||
|
||||
Note, BM_Entry_struct is defined in bkmks.c. Not good practice
|
||||
since this hides dependency info about the struct i.e., if you
|
||||
change the struct, clients of the struct in other source files
|
||||
will not indirectly recompile.
|
||||
*/
|
||||
|
||||
typedef struct BM_Entry_struct BM_Entry;
|
||||
|
||||
/*
|
||||
parser
|
||||
*/
|
||||
typedef struct _PA_Functions PA_Functions;
|
||||
typedef struct PA_Tag_struct PA_Tag;
|
||||
|
||||
/*
|
||||
layout
|
||||
*/
|
||||
typedef union LO_Element_struct LO_Element;
|
||||
|
||||
typedef struct LO_AnchorData_struct LO_AnchorData;
|
||||
typedef struct LO_Color_struct LO_Color;
|
||||
typedef struct LO_TextAttr_struct LO_TextAttr;
|
||||
typedef struct LO_TextInfo_struct LO_TextInfo;
|
||||
typedef struct LO_TextStruct_struct LO_TextStruct;
|
||||
typedef struct LO_ImageAttr_struct LO_ImageAttr;
|
||||
typedef struct LO_ImageStruct_struct LO_ImageStruct;
|
||||
typedef struct LO_SubDocStruct_struct LO_SubDocStruct;
|
||||
typedef struct LO_CommonPluginStruct_struct LO_CommonPluginStruct;
|
||||
typedef struct LO_EmbedStruct_struct LO_EmbedStruct;
|
||||
typedef struct LO_BuiltinStruct_struct LO_BuiltinStruct;
|
||||
typedef struct LO_JavaAppStruct_struct LO_JavaAppStruct;
|
||||
typedef struct LO_EdgeStruct_struct LO_EdgeStruct;
|
||||
typedef struct LO_ObjectStruct_struct LO_ObjectStruct;
|
||||
|
||||
typedef union LO_FormElementData_struct LO_FormElementData;
|
||||
|
||||
typedef struct lo_FormElementOptionData_struct lo_FormElementOptionData;
|
||||
typedef struct lo_FormElementSelectData_struct lo_FormElementSelectData;
|
||||
typedef struct lo_FormElementTextData_struct lo_FormElementTextData;
|
||||
typedef struct lo_FormElementTextareaData_struct lo_FormElementTextareaData;
|
||||
#ifdef MOZ_ENDER_MIME
|
||||
typedef struct lo_FormElementHtmlareaData_struct lo_FormElementHtmlareaData;
|
||||
#endif /*MOZ_ENDER_MIME*/
|
||||
typedef struct lo_FormElementMinimalData_struct lo_FormElementMinimalData;
|
||||
typedef struct lo_FormElementToggleData_struct lo_FormElementToggleData;
|
||||
typedef struct lo_FormElementObjectData_struct lo_FormElementObjectData;
|
||||
typedef struct lo_FormElementKeygenData_struct lo_FormElementKeygenData;
|
||||
|
||||
typedef struct LO_Any_struct LO_Any;
|
||||
typedef struct LO_FormSubmitData_struct LO_FormSubmitData;
|
||||
typedef struct LO_FormElementStruct_struct LO_FormElementStruct;
|
||||
typedef struct LO_LinefeedStruct_struct LO_LinefeedStruct;
|
||||
typedef struct LO_HorizRuleStruct_struct LO_HorizRuleStruct;
|
||||
typedef struct LO_BulletStruct_struct LO_BulletStruct;
|
||||
/* was misspelled as LO_BullettStruct */
|
||||
#define LO_BullettStruct LO_BulletStruct
|
||||
typedef struct LO_TableStruct_struct LO_TableStruct;
|
||||
typedef struct LO_CellStruct_struct LO_CellStruct;
|
||||
typedef struct LO_Position_struct LO_Position;
|
||||
typedef struct LO_Selection_struct LO_Selection;
|
||||
typedef struct LO_HitLineResult_struct LO_HitLineResult;
|
||||
typedef struct LO_HitElementResult_struct LO_HitElementResult;
|
||||
typedef union LO_HitResult_struct LO_HitResult;
|
||||
|
||||
/* Line style parameter for displaying borders */
|
||||
typedef enum {
|
||||
LO_SOLID,
|
||||
LO_DASH,
|
||||
LO_BEVEL
|
||||
} LO_LineStyle;
|
||||
|
||||
|
||||
typedef struct LO_tabFocus_struct LO_TabFocusData;
|
||||
|
||||
/*
|
||||
XLation
|
||||
*/
|
||||
typedef struct PrintInfo_ PrintInfo;
|
||||
typedef struct PrintSetup_ PrintSetup;
|
||||
|
||||
/*
|
||||
mother of data structures
|
||||
*/
|
||||
typedef struct MWContext_ MWContext;
|
||||
|
||||
/*
|
||||
Chrome structure
|
||||
*/
|
||||
typedef struct _Chrome Chrome;
|
||||
|
||||
/*
|
||||
Editor
|
||||
*/
|
||||
#include "edttypes.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MWContextAny = -1, /* Used as a noopt when searching for a context of a particular type */
|
||||
MWContextBrowser, /* A web browser window */
|
||||
MWContextMail, /* A mail reader window */
|
||||
MWContextNews, /* A news reader window */
|
||||
MWContextMailMsg, /* A window to display a mail msg */
|
||||
MWContextNewsMsg, /* A window to display a news msg */
|
||||
MWContextMessageComposition, /* A news-or-mail message editing window */
|
||||
MWContextSaveToDisk, /* The placeholder window for a download */
|
||||
MWContextText, /* non-window context for text conversion */
|
||||
MWContextPostScript, /* non-window context for PS conversion */
|
||||
MWContextBiff, /* non-window context for background mail
|
||||
notification */
|
||||
MWContextJava, /* non-window context for Java */
|
||||
MWContextBookmarks, /* Context for the bookmarks */
|
||||
MWContextAddressBook, /* Context for the addressbook */
|
||||
MWContextOleNetwork, /* non-window context for the OLE network1 object */
|
||||
MWContextPrint, /* non-window context for printing */
|
||||
MWContextDialog, /* non-browsing dialogs. view-source/security */
|
||||
MWContextMetaFile, /* non-window context for Windows metafile support */
|
||||
MWContextEditor, /* An Editor Window */
|
||||
MWContextSearch, /* a window for modeless search dialog */
|
||||
MWContextSearchLdap, /* a window for modeless LDAP search dialog */
|
||||
MWContextHTMLHelp, /* HTML Help context to load map files */
|
||||
MWContextMailFilters, /* Mail filters context */
|
||||
MWContextHistory, /* A history window */
|
||||
MWContextMailNewsProgress, /* a progress pane for mail/news URLs */
|
||||
MWContextPane, /* Misc browser pane/window in weird parts of
|
||||
* the UI, such as the navigation center */
|
||||
MWContextRDFSlave, /* Slave context for RDF network loads */
|
||||
MWContextProgressModule, /* Progress module (PW_ functions) */
|
||||
MWContextIcon /* Context for loading images as icons */
|
||||
} MWContextType;
|
||||
|
||||
#define MAIL_NEWS_TYPE(x) ( \
|
||||
((x) == MWContextMail) || \
|
||||
((x) == MWContextNews) || \
|
||||
((x) == MWContextMailMsg) || \
|
||||
((x) == MWContextNewsMsg) )
|
||||
|
||||
|
||||
struct LJAppletData;
|
||||
|
||||
#endif /* XP_MAC */
|
||||
|
||||
#endif /* _NetscapeTypes_ */
|
||||
|
431
include/proto.h
431
include/proto.h
@ -1,431 +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):
|
||||
*/
|
||||
|
||||
|
||||
/* This file should contain prototypes of all public functions for all
|
||||
modules in the client library.
|
||||
|
||||
This file will be included automatically when source includes "client.h".
|
||||
By the time this file is included, all global typedefs have been executed.
|
||||
*/
|
||||
|
||||
/* make sure we only include this once */
|
||||
#ifndef _PROTO_H_
|
||||
#define _PROTO_H_
|
||||
|
||||
#include "ntypes.h"
|
||||
|
||||
XP_BEGIN_PROTOS
|
||||
|
||||
/* put your prototypes here..... */
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
* Parser stuff
|
||||
*/
|
||||
|
||||
extern intn PA_ParserInit(PA_Functions *);
|
||||
extern NET_StreamClass *PA_BeginParseMDL(FO_Present_Types, void *,
|
||||
URL_Struct *, MWContext *);
|
||||
extern intn PA_ParseBlock(NET_StreamClass *, const char *, int);
|
||||
extern void PA_MDLComplete(NET_StreamClass *);
|
||||
extern void PA_MDLAbort(NET_StreamClass *, int);
|
||||
extern Bool PA_HasMocha(PA_Tag *tag);
|
||||
extern PA_Tag * PA_CloneMDLTag(PA_Tag * src);
|
||||
extern intn PA_ParseStringToTags(MWContext *, char *, int32, void *);
|
||||
extern const char *PA_TagString(int32);
|
||||
extern int32 PA_TagIndex(char *);
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
* Layout stuff
|
||||
*/
|
||||
|
||||
/*#ifndef NO_TAB_NAVIGATION */
|
||||
|
||||
extern Bool LO_isTabableElement(MWContext *context, LO_TabFocusData *pCurrentFocus );
|
||||
extern Bool LO_isTabableFormElement( LO_FormElementStruct * next_ele );
|
||||
extern Bool LO_isFormElementNeedTextTabFocus( LO_FormElementStruct *pElement );
|
||||
extern LO_Element * LO_getFirstLastElement(MWContext *context, int wantFirst );
|
||||
extern Bool LO_getNextTabableElement( MWContext *context, LO_TabFocusData *currentFocus, int forward );
|
||||
|
||||
/* NO_TAB_NAVIGATION */
|
||||
|
||||
extern LO_FormElementStruct *
|
||||
LO_ReturnNextFormElement(MWContext *context,
|
||||
LO_FormElementStruct *current_element);
|
||||
extern LO_FormElementStruct *
|
||||
LO_ReturnPrevFormElement(MWContext *context,
|
||||
LO_FormElementStruct *current_element);
|
||||
|
||||
/* NO_TAB_NAVIGATION,
|
||||
LO_ReturnNextFormElementInTabGroup() is used to tab through form elements.
|
||||
Since the winfe now has TAB_NAVIGATION, it is not used any more.
|
||||
If mac and Unix don't use it either, it can be removed.
|
||||
*/
|
||||
extern LO_FormElementStruct *
|
||||
LO_ReturnNextFormElementInTabGroup(MWContext *context,
|
||||
LO_FormElementStruct *current_element,
|
||||
XP_Bool go_backwards);
|
||||
|
||||
extern intn LO_ProcessTag(void *, PA_Tag *, intn);
|
||||
extern void LO_RefreshArea(MWContext *context, int32 left, int32 top,
|
||||
uint32 width, uint32 height);
|
||||
extern Bool LO_CheckForUnload(MWContext *context);
|
||||
|
||||
#if 0
|
||||
extern void LO_MoveLayer(CL_Layer *layer, int32 x, int32 y);
|
||||
extern int32 LO_GetLayerXOffset(CL_Layer *layer);
|
||||
extern int32 LO_GetLayerYOffset(CL_Layer *layer);
|
||||
|
||||
extern int32 LO_GetLayerWrapWidth(CL_Layer *layer);
|
||||
extern int32 LO_GetLayerScrollWidth(CL_Layer *layer);
|
||||
extern int32 LO_GetLayerScrollHeight(CL_Layer *layer);
|
||||
extern void LO_SetLayerScrollWidth(CL_Layer *layer, uint32 width);
|
||||
extern void LO_SetLayerScrollHeight(CL_Layer *layer, uint32 height);
|
||||
|
||||
extern void LO_SetLayerBbox(CL_Layer *layer, XP_Rect *bbox);
|
||||
|
||||
#ifdef DOM
|
||||
/* Setters for span contents */
|
||||
extern void LO_SetSpanColor(MWContext *context, void *span, LO_Color *color);
|
||||
extern void LO_SetSpanBackground(MWContext *context, void *span, LO_Color *color);
|
||||
extern void LO_SetSpanFontFamily(MWContext* context, void *span, char *family);
|
||||
extern void LO_SetSpanFontWeight(MWContext* context, void *span, char *weight);
|
||||
extern void LO_SetSpanFontSize(MWContext* context, void *span, int32 size);
|
||||
extern void LO_SetSpanFontSlant(MWContext* context, void *span, char *slant);
|
||||
|
||||
/* Setters for table contents */
|
||||
extern void LO_SetTableCellAttribute(MWContext *context, void *cell,
|
||||
const char *name, const char *value);
|
||||
#endif
|
||||
|
||||
extern void LO_SetLayerBgColor(CL_Layer *layer, LO_Color *color);
|
||||
extern LO_Color * LO_GetLayerBgColor(CL_Layer *layer);
|
||||
extern void LO_SetLayerBackdropURL(CL_Layer *layer, const char *url);
|
||||
extern const char *LO_GetLayerBackdropURL(CL_Layer *layer);
|
||||
extern LO_ImageStruct *LO_GetLayerBackdropImage(CL_Layer *layer);
|
||||
extern void LO_SetImageURL(MWContext *context, IL_GroupContext *mocha_img_cx,
|
||||
LO_ImageStruct *image, const char *url,
|
||||
NET_ReloadMethod reload_policy);
|
||||
extern void LO_SetDocBgColor(MWContext *context, LO_Color *rgb);
|
||||
|
||||
extern void
|
||||
lo_SetLayerClipExpansionPolicy(CL_Layer *layer, int policy);
|
||||
extern int
|
||||
lo_GetLayerClipExpansionPolicy(CL_Layer *layer);
|
||||
|
||||
#ifdef JAVA
|
||||
/* Java Applet layer code */
|
||||
extern void LO_SetJavaAppTransparent(LO_JavaAppStruct *javaData);
|
||||
#endif
|
||||
|
||||
extern void LO_SetEmbedType(LO_EmbedStruct *embed, PRBool is_windowed);
|
||||
extern void LO_SetEmbedSize( MWContext *context, LO_EmbedStruct *embed, int32 width, int32 height );
|
||||
|
||||
extern char* LO_GetBuiltInAttribute (LO_BuiltinStruct *pBuiltin_struct,
|
||||
char* att);
|
||||
|
||||
#ifdef JAVA
|
||||
extern void LO_SetJavaAppTransparent(LO_JavaAppStruct *javaData);
|
||||
#endif
|
||||
|
||||
extern void *LO_GetLayerMochaObjectFromId(MWContext *context, int32 layer_id);
|
||||
extern void *LO_GetLayerMochaObjectFromLayer(MWContext *context,
|
||||
CL_Layer *layer);
|
||||
extern void LO_SetLayerMochaObject(MWContext *context, int32 layer_id,
|
||||
void *mocha_object);
|
||||
extern CL_Layer *LO_GetLayerFromId(MWContext *context, int32 layer_id);
|
||||
extern int32 LO_GetIdFromLayer(MWContext *context, CL_Layer *layer);
|
||||
extern int32 LO_GetNumberOfLayers(MWContext *context);
|
||||
#endif
|
||||
extern NET_ReloadMethod LO_GetReloadMethod(MWContext *context);
|
||||
|
||||
extern LO_Element *LO_XYToElement(MWContext *, int32, int32);
|
||||
extern LO_Element *LO_XYToNearestElement(MWContext *, int32, int32);
|
||||
|
||||
extern void LO_MoveGridEdge(MWContext *context, LO_EdgeStruct *edge,
|
||||
int32 x, int32 y);
|
||||
extern void LO_SetImageInfo(MWContext *context, int32 ele_id,
|
||||
int32 width, int32 height);
|
||||
extern void LO_SetForceLoadImage(char *url, XP_Bool all_images);
|
||||
extern void LO_SetUserOverride(Bool override);
|
||||
extern void LO_SetDefaultBackdrop(char *url);
|
||||
extern void LO_SetDefaultColor(intn type, uint8 red, uint8 green, uint8 blue);
|
||||
extern Bool LO_ParseRGB(char *rgb, uint8 *red, uint8 *green, uint8 *blue);
|
||||
extern Bool LO_ParseStyleSheetRGB(char *rgb, uint8 *red, uint8 *green, uint8 *blue);
|
||||
extern void LO_ClearBackdropBlock(MWContext *context,
|
||||
LO_ImageStruct *image, Bool fg_ok);
|
||||
extern void LO_ClearEmbedBlock(MWContext *context, LO_EmbedStruct *embed);
|
||||
extern Bool LO_BlockedOnImage(MWContext *, LO_ImageStruct *image);
|
||||
extern void LO_CloseAllTags(MWContext *);
|
||||
extern void LO_DiscardDocument(MWContext *);
|
||||
extern LO_FormSubmitData *LO_SubmitForm(MWContext *context,
|
||||
LO_FormElementStruct *form_element);
|
||||
extern LO_FormSubmitData *LO_SubmitImageForm(MWContext *context,
|
||||
LO_ImageStruct *image, int32 x, int32 y);
|
||||
extern void LO_ResetForm(MWContext *context,
|
||||
LO_FormElementStruct *form_element);
|
||||
extern LO_FormElementStruct *
|
||||
LO_FormRadioSet(MWContext *context, LO_FormElementStruct *form_element);
|
||||
extern void LO_SaveFormData(MWContext *context);
|
||||
extern void LO_CloneFormData(SHIST_SavedData *, MWContext *context,
|
||||
URL_Struct *url_struct);
|
||||
extern void LO_HighlightAnchor(MWContext *context, LO_Element *element,Bool on);
|
||||
#ifdef OLD_POS_HIST
|
||||
extern void LO_SetDocumentPosition(MWContext *context, int32 x, int32 y);
|
||||
#endif /* OLD_POS_HIST */
|
||||
extern void LO_SetDocumentDimensions(MWContext *context,
|
||||
int32 width, int32 height);
|
||||
extern void LO_StartSelection(MWContext *context, int32 x, int32 y);
|
||||
|
||||
typedef enum {
|
||||
SMALL_BM_ICON,
|
||||
LARGE_BM_ICON
|
||||
} BMIconType;
|
||||
|
||||
extern char * LO_GetBookmarkIconURLForPage(MWContext *context, BMIconType type);
|
||||
|
||||
/* Re-layout layout elements on resize without destroying them and reloading page
|
||||
from scratch */
|
||||
extern void LO_RelayoutOnResize(MWContext *context, int32 width, int32 height, int32 leftMargin, int32 topMargin);
|
||||
/* Re-layout layout elements when one changes size. */
|
||||
extern void LO_RelayoutFromElement(MWContext *context, LO_Element *element);
|
||||
|
||||
extern void LO_ExtendSelection(MWContext *context, int32 x, int32 y);
|
||||
extern void LO_EndSelection(MWContext *context);
|
||||
extern void LO_ClearSelection(MWContext *context);
|
||||
extern XP_Block LO_GetSelectionText(MWContext *context);
|
||||
extern Bool LO_FindText(MWContext *context, char *text,
|
||||
LO_Element **start_ele_loc, int32 *start_position,
|
||||
LO_Element **end_ele_loc, int32 *end_position,
|
||||
Bool use_case, Bool forward);
|
||||
extern Bool LO_FindGridText(MWContext *context, MWContext **ret_context,
|
||||
char *text,
|
||||
LO_Element **start_ele_loc, int32 *start_position,
|
||||
LO_Element **end_ele_loc, int32 *end_position,
|
||||
Bool use_case, Bool forward);
|
||||
extern Bool LO_SelectAll(MWContext *context);
|
||||
extern void LO_SelectText(MWContext *context, LO_Element *start,int32 start_pos,
|
||||
LO_Element *end, int32 end_pos, int32 *x, int32 *y);
|
||||
extern void LO_RefreshAnchors(MWContext *context);
|
||||
extern Bool LO_HaveSelection(MWContext *context);
|
||||
extern void LO_GetSelectionEndpoints(MWContext *context,
|
||||
LO_Element **start, LO_Element **end, int32 *start_pos, int32 *end_pos, void **sel_layer);
|
||||
extern void LO_FreeSubmitData(LO_FormSubmitData *submit_data);
|
||||
extern void LO_FreeDocumentFormListData(MWContext *context, void *form_data);
|
||||
extern void LO_FreeDocumentEmbedListData(MWContext *context, void *embed_data);
|
||||
extern void LO_FreeDocumentGridData(MWContext *context, void *grid_data);
|
||||
extern void LO_FreeDocumentAppletData(MWContext *context, void *applet_data);
|
||||
extern void LO_RedoFormElements(MWContext *context);
|
||||
extern void LO_InvalidateFontData(MWContext *context);
|
||||
extern void LO_GetDocumentMargins(MWContext *context,
|
||||
int32 *margin_width, int32 *margin_height);
|
||||
extern Bool LO_HasBGImage(MWContext *context);
|
||||
extern Bool LO_LocateNamedAnchor(MWContext *context, URL_Struct *url_struct,
|
||||
int32 *xpos, int32 *ypos);
|
||||
extern int32 LO_EmptyRecyclingBin(MWContext *context);
|
||||
extern LO_AnchorData *LO_MapXYToAreaAnchor(MWContext *context,
|
||||
LO_ImageStruct *image, int32 x, int32 y);
|
||||
extern intn LO_DocumentInfo(MWContext *context, NET_StreamClass *stream);
|
||||
extern intn LO_ChangeFontSize(intn size, char *size_str);
|
||||
extern double LO_GetScalingFactor(int32 scaler);
|
||||
extern int16 LO_WindowWidthInFixedChars(MWContext *context);
|
||||
extern void LO_CleanupGridHistory(MWContext *context);
|
||||
extern void LO_UpdateGridHistory(MWContext *context);
|
||||
extern Bool LO_BackInGrid(MWContext *context);
|
||||
extern Bool LO_ForwardInGrid(MWContext *context);
|
||||
extern Bool LO_GridCanGoForward(MWContext *context);
|
||||
extern Bool LO_GridCanGoBackward(MWContext *context);
|
||||
|
||||
#if defined(SingleSignon)
|
||||
extern void SI_RestoreSignonData
|
||||
(char* URLName, char* name, char** value);
|
||||
extern void SI_RememberSignonData
|
||||
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt);
|
||||
extern void SI_RememberSignonDataFromBrowser
|
||||
(char* URLName, char* username, char* password);
|
||||
extern void SI_RestoreOldSignonDataFromBrowser
|
||||
(MWContext *context, char* URLName, Bool pickFirstUser,
|
||||
char** username, char** password);
|
||||
extern int SI_LoadSignonData(char *filename);
|
||||
extern int SI_SaveSignonData(char *filename);
|
||||
extern void SI_RemoveAllSignonData();
|
||||
extern Bool SI_RemoveUser(char *URLName, char *userName, Bool save);
|
||||
extern int SI_PromptUsernameAndPassword
|
||||
(MWContext *context, char *buf,
|
||||
char **username, char **password, char *URLName);
|
||||
extern char *SI_PromptPassword
|
||||
(MWContext *context, char *prompt, char *URLName, Bool pickFirstUser);
|
||||
extern char * SI_Prompt
|
||||
(MWContext *context, char *prompt, char* defaultUsername, char *URLName);
|
||||
extern void SI_AnonymizeSignons();
|
||||
extern void SI_UnanonymizeSignons();
|
||||
extern void SI_StartOfForm();
|
||||
#endif
|
||||
|
||||
extern Bool LO_Click( MWContext *context, int32 x, int32 y, Bool requireCaret );
|
||||
extern void LO_Hit(MWContext *context, int32 x, int32 y,
|
||||
Bool requireCaret, LO_HitResult *result);
|
||||
/* Similar to lo_Click, but doesn't process click
|
||||
Returns TRUE if line would be selected if user clicked here
|
||||
We only use this in Editor, so we can assume "layer" is NULL
|
||||
*/
|
||||
Bool LO_CanSelectLine(MWContext *context, int32 x, int32 y);
|
||||
|
||||
extern int32 LO_TextElementWidth(MWContext *context, LO_TextStruct *text_ele, int charOffset);
|
||||
|
||||
extern void LO_AddEmbedData(MWContext* context, LO_EmbedStruct* embed, void* data);
|
||||
extern void LO_CopySavedEmbedData(MWContext* context, SHIST_SavedData* newdata);
|
||||
extern NET_StreamClass* LO_NewObjectStream(FO_Present_Types format_out, void* type,
|
||||
URL_Struct* urls, MWContext* context);
|
||||
|
||||
extern void LO_CreateReblockTag(MWContext* context, LO_Element* element);
|
||||
extern void LO_LockLayout(void);
|
||||
extern void LO_UnlockLayout(void);
|
||||
extern Bool LO_VerifyUnlockedLayout();
|
||||
extern void LO_NetlibComplete(MWContext * context);
|
||||
|
||||
extern void LO_UpdateTextData(lo_FormElementTextData * textData, const char * text);
|
||||
|
||||
#ifdef EDITOR
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
* Layout stuff specific to the editor
|
||||
*/
|
||||
|
||||
|
||||
extern void LO_PositionCaret( MWContext *context, int32 x, int32 y );
|
||||
extern void LO_DoubleClick( MWContext *context, int32 x, int32 y );
|
||||
|
||||
void LO_PositionCaretBounded(MWContext *context, int32 x, int32 y,
|
||||
int32 minY, int32 maxY );
|
||||
|
||||
extern ED_Buffer* LO_GetEDBuffer( MWContext *context);
|
||||
extern void LO_GetEffectiveCoordinates( MWContext *pContext, LO_Element *pElement, int32 position,
|
||||
int32* pX, int32* pY, int32* pWidth, int32* pHeight );
|
||||
extern void LO_UpDown( MWContext *pContext, LO_Element *pElement, int32 position, int32 iDesiredX, Bool bSelect, Bool bForward );
|
||||
extern Bool LO_PreviousPosition( MWContext *pContext,LO_Element *pElement, intn iOffset,
|
||||
ED_Element **ppEdElement, intn* pOffset);
|
||||
extern Bool LO_NextPosition( MWContext *pContext,LO_Element *pElement, intn iOffset,
|
||||
ED_Element **ppEdElement, intn* pOffset);
|
||||
extern Bool LO_NavigateChunk( MWContext *pContext, intn chunkType, Bool bSelect, Bool bForward );
|
||||
extern Bool LO_ComputeNewPosition( MWContext *context, intn chunkType,
|
||||
Bool bSelect, Bool bDeselecting, Bool bForward,
|
||||
LO_Element** pElement, int32* pPosition );
|
||||
|
||||
extern LO_Element* LO_BeginOfLine( MWContext *pContext, LO_Element *pElement );
|
||||
extern LO_Element* LO_EndOfLine( MWContext *pContext, LO_Element *pElement);
|
||||
extern LO_Element* LO_FirstElementOnLine( MWContext *pContext,
|
||||
int32 x, int32 y, int32 *pLineNum);
|
||||
extern void LO_StartSelectionFromElement( MWContext *context, LO_Element *eptr,
|
||||
int32 new_pos );
|
||||
extern void LO_ExtendSelectionFromElement( MWContext *context, LO_Element *eptr,
|
||||
int32 position, Bool bFromStart );
|
||||
extern Bool LO_SelectElement( MWContext *context, LO_Element *eptr,
|
||||
int32 position, Bool bFromStart );
|
||||
extern void LO_SelectRegion( MWContext *context, LO_Element *begin,
|
||||
int32 beginPosition, LO_Element *end, int32 endPosition,
|
||||
Bool fromStart, Bool forward );
|
||||
extern Bool LO_IsSelected( MWContext *context );
|
||||
extern Bool LO_IsSelectionStarted( MWContext *context );
|
||||
extern void LO_GetSelectionEndPoints( MWContext *context,
|
||||
LO_Element **ppStart, intn *pStartOffset, LO_Element **ppEnd,
|
||||
intn *pEndOffset, Bool *pbFromStart, Bool *pbSingleElementSelection );
|
||||
extern void LO_GetSelectionNewPoint( MWContext *context,
|
||||
LO_Element **ppNew, intn *pNewOffset);
|
||||
extern LO_Element* LO_PreviousEditableElement( LO_Element *pElement );
|
||||
extern LO_Element* LO_NextEditableElement( LO_Element *pElement );
|
||||
extern LO_ImageStruct* LO_NewImageElement( MWContext* context );
|
||||
extern void LO_SetBackgroundImage( MWContext *context, char *pUrl );
|
||||
extern void LO_RefetchWindowDimensions( MWContext *pContext );
|
||||
extern void LO_Relayout( MWContext *context, ED_TagCursor *pCursor,
|
||||
int32 iLine, int iStartEditOffset, XP_Bool bDisplayTables );
|
||||
|
||||
#endif /*EDITOR*/
|
||||
|
||||
extern void LO_SetBaseURL( MWContext *pContext, char *pURL );
|
||||
extern char* LO_GetBaseURL( MWContext *pContext );
|
||||
|
||||
#if 0
|
||||
extern Bool LO_Click( MWContext *context, int32 x, int32 y, Bool requireCaret );
|
||||
extern void LO_Hit(MWContext *context, int32 x, int32 y, Bool requireCaret, LO_HitResult *result);
|
||||
#endif
|
||||
|
||||
extern void LO_SelectObject( MWContext *context, int32 x, int32 y );
|
||||
|
||||
#ifdef XP_UNIX
|
||||
extern void LO_DisplayFormElement(LO_FormElementStruct *form);
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
/* Allows front ends to test for empty cell.
|
||||
* Used in Composer to display "zero width border"
|
||||
* in cells that layout would normally not display
|
||||
*/
|
||||
XP_Bool LO_IsEmptyCell(LO_CellStruct *cell);
|
||||
|
||||
Bool LO_LayingOut(MWContext * context);
|
||||
|
||||
|
||||
#ifdef DOM
|
||||
/* Returns true if the layout element is enclosed
|
||||
in <SPAN> </SPAN> */
|
||||
Bool LO_IsWithinSpan( LO_Element *ele );
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is probably the wrong place to add this, but tough,
|
||||
* this stuff shouldn't have to exist anyways.
|
||||
*/
|
||||
extern void XP_InitializeContext(MWContext *context);
|
||||
extern MWContext *XP_NewContext(void);
|
||||
extern void XP_DeleteContext(MWContext *context);
|
||||
extern XP_List *XP_GetGlobalContextList(void);
|
||||
extern void XP_AddContextToList(MWContext *context);
|
||||
extern Bool XP_IsContextInList(MWContext *context);
|
||||
extern void XP_RemoveContextFromList(MWContext *context);
|
||||
extern MWContext *XP_GetNonGridContext(MWContext *context);
|
||||
extern Bool XP_IsChildContext(MWContext* parent, MWContext* child);
|
||||
|
||||
extern MWContext *XP_FindNamedContextInList(MWContext * context, char *name);
|
||||
extern MWContext *XP_FindContextOfType(MWContext *, MWContextType);
|
||||
extern MWContext *XP_FindSomeContext(void);
|
||||
extern Bool XP_FindNamedAnchor(MWContext * context, URL_Struct * url,
|
||||
int32 *xpos, int32 *ypos);
|
||||
extern void XP_RefreshAnchors(void);
|
||||
extern void XP_InterruptContext(MWContext * context);
|
||||
extern Bool XP_IsContextBusy(MWContext * context);
|
||||
extern Bool XP_IsContextStoppable(MWContext * context);
|
||||
extern void XP_UpdateParentContext(MWContext * context);
|
||||
extern int XP_GetSecurityStatus(MWContext *pContext);
|
||||
extern int XP_ContextCount(MWContextType cxType, XP_Bool bTopLevel);
|
||||
|
||||
extern char *XP_PromptPassword(MWContext *pContext, const char *pMessage);
|
||||
extern char *XP_Prompt(MWContext *pContext, const char *pMessage, const char * pDef);
|
||||
extern PRBool XP_PromptUsernameAndPassword (MWContext * window_id,
|
||||
const char * message,
|
||||
char ** username,
|
||||
char ** password);
|
||||
extern PRBool XP_Confirm( MWContext * c, const char * msg);
|
||||
|
||||
XP_END_PROTOS
|
||||
|
||||
# endif /* _PROTO_H_ */
|
@ -1,136 +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 SHISTELE_H
|
||||
#define SHISTELE_H
|
||||
|
||||
#include "xp_list.h"
|
||||
|
||||
/*
|
||||
** This structure holds pointer so all saved data in the history. It is
|
||||
** also used by URL_Structs and is ultimately fed to layout.
|
||||
**
|
||||
** Warning: Don't change the names of the fields because they're used by
|
||||
** macros.
|
||||
*/
|
||||
typedef struct SHIST_SavedData {
|
||||
void* FormList; /* layout data to recreate forms */
|
||||
void* EmbedList; /* layout data to recreate embeds and applets */
|
||||
void* Grid; /* layout data to recreate grids */
|
||||
|
||||
void* Window; /* window object for grid being resized */
|
||||
|
||||
/* XXX none of this would be necessary if frameset docs were reparsed */
|
||||
void* OnLoad; /* JavaScript onload event handler source */
|
||||
void* OnUnload; /* JavaScript onunload event handler source */
|
||||
void* OnFocus; /* JavaScript onfocus event handler source */
|
||||
void* OnBlur; /* JavaScript onblur event handler source */
|
||||
void* OnHelp; /* JavaScript onhelp event handler source */
|
||||
void* OnMouseOver; /* JavaScript onmouseover event handler source */
|
||||
void* OnMouseOut; /* JavaScript onmouseout event handler source */
|
||||
void* OnDragDrop; /* JavaScript ondragdrop event handler source */
|
||||
void* OnMove; /* JavaScript onmove event handler source */
|
||||
void* OnResize; /* JavaScript onresize event handler source */
|
||||
void* style_stack; /* JSSS style stack info */
|
||||
|
||||
} SHIST_SavedData;
|
||||
|
||||
/*
|
||||
This structure encapsulates all of the information needed for the
|
||||
session history. It should contain stuff like a list of all of the
|
||||
documents in the current history and a pointer to where the currently
|
||||
viewed document sits in the chain.
|
||||
|
||||
WARNING!! Some slots of this structure are shared with URL_Struct and
|
||||
net_CacheObject. If you add a slot, decide whether it needs to be
|
||||
shared as well.
|
||||
*/
|
||||
|
||||
struct _History_entry {
|
||||
char * title; /* title for this entry */
|
||||
char * address; /* URL address string */
|
||||
char * content_name; /* Server-provided "real name", used for
|
||||
default file name when saving. */
|
||||
int method; /* method of acessing URL */
|
||||
char * referer; /* What document points to this url */
|
||||
char * post_data; /* post data */
|
||||
int32 post_data_size; /* post data size */
|
||||
Bool post_data_is_file; /* is the post data a filename? */
|
||||
char * post_headers; /* content type for posted data */
|
||||
int32 position_tag; /* layout specific data for determining
|
||||
* where in the document the user was
|
||||
*/
|
||||
time_t last_modified; /* time of last modification */
|
||||
time_t last_access; /* time of last access */
|
||||
int history_num; /* special hack to add navigation */
|
||||
|
||||
SHIST_SavedData savedData; /* layout data */
|
||||
|
||||
PRPackedBool
|
||||
is_binary, /* is this a binary object pretending
|
||||
* to be HTML?
|
||||
*/
|
||||
is_active, /* is it an active stream? */
|
||||
is_netsite, /* did it come from netsite? */
|
||||
replace; /* did it come from netsite? */
|
||||
|
||||
int transport_method; /* network, disk cache, memory cache */
|
||||
|
||||
uint32 refresh; /* refresh interval */
|
||||
char *refresh_url; /* URL to refresh */
|
||||
char *wysiwyg_url; /* URL for WYSIWYG printing/saving */
|
||||
|
||||
/* Security information */
|
||||
int security_on; /* is security on? */
|
||||
/* Security info on a connection is opaque */
|
||||
unsigned char *sec_info;
|
||||
|
||||
/* Unique identifier */
|
||||
int32 unique_id;
|
||||
int32 ref_count;
|
||||
|
||||
/* Page services*/
|
||||
char *page_services_url; /* If it supports services, what link is used */
|
||||
|
||||
/* HTTP_11 support*/
|
||||
char *etag; /* Unique entity tag */
|
||||
char *origin_url; /* original referrer of javascript: URL */
|
||||
|
||||
/* Privacy Policy support */
|
||||
char *privacy_policy_url; /* Associated privacy policy, if any */
|
||||
};
|
||||
|
||||
#define SHIST_CAME_FROM_NETWORK 0
|
||||
#define SHIST_CAME_FROM_DISK_CACHE 1
|
||||
#define SHIST_CAME_FROM_MEMORY_CACHE 2
|
||||
|
||||
struct History_ {
|
||||
XP_List * list_ptr; /* pointer to linked list */
|
||||
int cur_doc; /* an index into the list that points to the current document */
|
||||
History_entry *cur_doc_ptr; /* a ptr to the current doc entry */
|
||||
int32 num_entries; /* size of the history list */
|
||||
int32 max_entries; /* maximum size of list; -1 == no limit */
|
||||
};
|
||||
|
||||
|
||||
#endif /* SHISTELE_H */
|
@ -1,481 +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):
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* This file is included by client.h
|
||||
*
|
||||
* It can be included by hand after mcom.h
|
||||
*
|
||||
* All intermodule data structures (i.e. MWContext, etc) should be included
|
||||
* in this file
|
||||
*/
|
||||
#ifndef _STRUCTS_H_
|
||||
#define _STRUCTS_H_
|
||||
|
||||
#include "ntypes.h"
|
||||
#include "xp_mcom.h"
|
||||
|
||||
#include "il_types.h"
|
||||
#include "shistele.h"
|
||||
#include "edttypes.h"
|
||||
|
||||
#ifdef JAVA
|
||||
#include "prlong.h"
|
||||
#include "prclist.h"
|
||||
#endif /* JAVA */
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ============= Typedefs for the global context structure ================ */
|
||||
|
||||
/* will come out of the ctxtfunc.h file eventually
|
||||
*/
|
||||
typedef struct _ContextFuncs ContextFuncs;
|
||||
/*
|
||||
* This stuff is front end specific. Add whatever you need.
|
||||
*/
|
||||
#if defined(OSF1) && defined(__cplusplus)
|
||||
struct fe_ContextData;
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC) && defined(__cplusplus)
|
||||
class NetscapeContext;
|
||||
class CHyperView;
|
||||
|
||||
class CNSContext;
|
||||
class CHTMLView;
|
||||
#endif
|
||||
|
||||
#if ( defined(XP_WIN) || defined(XP_OS2) ) && defined(__cplusplus)
|
||||
class CAbstractCX;
|
||||
class CEditView;
|
||||
class CSaveProgress;
|
||||
#endif
|
||||
|
||||
typedef struct FEstruct_ {
|
||||
#ifndef MOZILLA_CLIENT
|
||||
void * generic_data;
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
#ifdef __cplusplus
|
||||
CAbstractCX *cx;
|
||||
#else
|
||||
void *cx;
|
||||
#endif
|
||||
#elif defined(XP_TEXT)
|
||||
int doc_cols;
|
||||
int doc_lines;
|
||||
int cur_top_line;
|
||||
int num_anchors;
|
||||
int cur_anchor;
|
||||
|
||||
#elif defined(XP_UNIX)
|
||||
struct fe_ContextData *data;
|
||||
#elif defined(XP_MAC)
|
||||
#ifdef __cplusplus
|
||||
class NetscapeContext* realContext;
|
||||
class CHyperView* view;
|
||||
|
||||
class CNSContext* newContext;
|
||||
class CHTMLView* newView;
|
||||
#else
|
||||
void* realContext;
|
||||
void* view;
|
||||
|
||||
void* newContext;
|
||||
void* newView;
|
||||
#endif
|
||||
|
||||
/*
|
||||
** These members are only used by the EDITOR... However, if they
|
||||
** are removed for non-editor builds the MWContext structure
|
||||
** becomes skewed for java (and the rest of DIST)...
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
class CEditView* editview;
|
||||
class CSaveProgress* savedialog;
|
||||
#else
|
||||
void* editview;
|
||||
void* savedialog;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifdef MOZILLA_CLIENT
|
||||
void* webWidget; /* Really a nsIWebWidget */
|
||||
#endif
|
||||
} FEstruct;
|
||||
|
||||
#define FEUNITS_X(x,context) ((int32) ((MWContext *)context)->convertPixX * (x))
|
||||
#define FEUNITS_Y(y,context) ((int32) ((MWContext *)context)->convertPixY * (y))
|
||||
|
||||
struct MessageCopyInfo;
|
||||
|
||||
/*
|
||||
This is a generic context structure. There should be one context
|
||||
per document window. The context will allow assorted modules to
|
||||
pull out things like the URL of the current document as well as
|
||||
giving them a place to hand their window specific stuff.
|
||||
|
||||
*/
|
||||
|
||||
#if defined (OSF1)
|
||||
/* Forward declaration to make compiler happy on OSF1 */
|
||||
struct MSG_SearchFrame;
|
||||
#ifdef XP_CPLUSPLUS
|
||||
class MSG_IMAPFolderInfoMail;
|
||||
class MSG_Master;
|
||||
class MSG_Pane;
|
||||
class TImapServerState;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
class nsITransferListener;
|
||||
#endif
|
||||
|
||||
struct MWContext_ {
|
||||
MWContextType type;
|
||||
|
||||
char *url; /* URL of current document */
|
||||
char * name; /* name of this context */
|
||||
History hist; /* Info needed for the window history module */
|
||||
FEstruct fe; /* Front end specific stuff */
|
||||
PRPackedBool fancyFTP; /* use fancy ftp ? */
|
||||
PRPackedBool fancyNews; /* use fancy news ? */
|
||||
PRPackedBool intrupt; /* the user just interrupted things */
|
||||
PRPackedBool graphProgress; /* should the user get visual feedback */
|
||||
PRPackedBool waitingMode; /* Has a transfer been initiated? Once a */
|
||||
/* transfer is started, the user cannot select another */
|
||||
/* anchor until either the transfer is aborted, has */
|
||||
/* started to layout, or has been recognized as a */
|
||||
/* separate document handled through an external stream/viewer */
|
||||
PRPackedBool reSize; /* the user wants to resize the window once the */
|
||||
/* current transfer is over */
|
||||
int fileSort; /* file sorting method */
|
||||
char * save_as_name; /* name to save current file as */
|
||||
char * title; /* title (if supplied) of current document */
|
||||
Bool is_grid_cell; /* Is this a grid cell */
|
||||
struct MWContext_ *grid_parent; /* pointer to parent of grid cell */
|
||||
XP_List * grid_children; /* grid children of this context */
|
||||
int convertPixX; /* convert from pixels to fe-specific coords */
|
||||
int convertPixY; /* convert from pixels to fe-specific coords */
|
||||
ContextFuncs * funcs; /* function table of display routines */
|
||||
PrintSetup *prSetup; /* Info about print job */
|
||||
PrintInfo *prInfo; /* State information for printing process */
|
||||
|
||||
/* XXXM12N Stuff for the new, modular Image Library. *********************/
|
||||
IL_GroupContext *img_cx; /* Created by Front Ends. Passed into Image
|
||||
Library function calls. */
|
||||
IL_ColorSpace *color_space; /* Colorspace information for images. This
|
||||
should become a part of the FE's display
|
||||
context when MWContext goes away. */
|
||||
IL_IRGB *transparent_pixel; /* Background color to be passed into
|
||||
IL_GetImage. Set by Front Ends (?) */
|
||||
/*************************************************************************/
|
||||
|
||||
int32 images; /* # of distinct images on this page */
|
||||
|
||||
/* ! do not use these ! */
|
||||
/* ! these are going away soon ! */
|
||||
/* instead see intl_csi.h for the i18n accessor functions */
|
||||
int16 do_not_use_win_csid; /* code set ID of current window */
|
||||
int16 do_not_use_doc_csid; /* code set ID of current document */
|
||||
int16 do_not_use_relayout; /* tell conversion to treat relayout case */
|
||||
char *do_not_use_mime_charset; /* MIME charset from URL */
|
||||
|
||||
struct MSG_CompositionFrame *msg_cframe; /* ditto. */
|
||||
struct MSG_SearchFrame *msg_searchFrame; /*state for search, for search contexts*/
|
||||
struct MSG_BiffFrame *biff_frame; /* Biff info for this context, if any. */
|
||||
struct BM_Frame *bmframe; /* Bookmarks info for this context, if any. */
|
||||
|
||||
/* for now, add IMAP mail stuff here */
|
||||
#ifdef XP_CPLUSPLUS
|
||||
class MSG_IMAPFolderInfoMail *currentIMAPfolder;
|
||||
class MSG_Pane *imapURLPane; /* used when updated folders */
|
||||
class MSG_Master *mailMaster;
|
||||
class TNavigatorImapConnection *imapConnection;
|
||||
#else
|
||||
struct MSG_IMAPFolderInfoMail *currentIMAPfolder;
|
||||
struct MSG_Pane *imapURLPane; /* used when updated folders */
|
||||
struct MSG_Master *mailMaster;
|
||||
struct TNavigatorImapConnection *imapConnection;
|
||||
#endif
|
||||
|
||||
/* for now, add message copy info stuff here */
|
||||
struct MessageCopyInfo *msgCopyInfo;
|
||||
|
||||
NPEmbeddedApp *pluginList; /* plugins on this page */
|
||||
void *pluginReconnect; /* yet another full screen hack */
|
||||
|
||||
struct MimeDisplayData *mime_data; /* opaque data used by MIME message
|
||||
parser (not Mail/News specific,
|
||||
since MIME objects can show up
|
||||
in Browser windows too.) */
|
||||
/* Also overloaded by progress module to hold private crap! */
|
||||
|
||||
|
||||
struct JSContext *mocha_context; /* opaque handle to Mocha state */
|
||||
uint32 event_bit; /* sum of all event capturing objects */
|
||||
XP_Bool js_drag_enabled; /* indicates JS drag enabled */
|
||||
int8 js_dragging; /* indicates which button has JS drag in process */
|
||||
XP_List * js_dependent_list; /* lifetime-linked children of this context */
|
||||
MWContext *js_parent;
|
||||
int32 js_timeouts_pending; /* Number of pending JavaScript timeouts */
|
||||
|
||||
|
||||
XP_Bool restricted_target; /* TRUE if window is off-limits for opening links into
|
||||
from mail or other window-grabbing functions.*/
|
||||
|
||||
NPEmbeddedApp *pEmbeddedApp; /* yet another full screen hack */
|
||||
char * defaultStatus; /* What string to show in the status area
|
||||
whenever there's nothing better to show.
|
||||
FE's should implement FE_Progress so that
|
||||
if it is passed NULL or "" it will instead
|
||||
display this string. libmsg changes this
|
||||
string all the time for mail and news
|
||||
contexts. */
|
||||
int32 doc_id; /* unique identifier for generated documents */
|
||||
int32 context_id; /* unique identifier for context */
|
||||
|
||||
void *pHelpInfo; /* pointer to additional help information;
|
||||
see ns/lib/libnet/mkhelp.c [EA] */
|
||||
|
||||
#ifdef JAVA
|
||||
/* See ns/sun-java/netscape/net/netStubs.c for the next 2 items: */
|
||||
|
||||
/*
|
||||
** This mysterious list is used in two ways: (1) If you're a real
|
||||
** window context, it's a list of all dummy java contexts that were
|
||||
** created for java's network connections. (2) If you're a dummy java
|
||||
** context, it's where you're linked into the list of connections for
|
||||
** the real context:
|
||||
*/
|
||||
PRCList javaContexts;
|
||||
|
||||
/*
|
||||
** Second, if you're a dummy java context, you'll need a pointer to
|
||||
** the stream data so that you can shut down the netlib connection:
|
||||
*/
|
||||
struct nsn_JavaStreamData* javaContextStreamData;
|
||||
|
||||
/*
|
||||
** Stuff for GraphProgress. See lj_embed.c
|
||||
*/
|
||||
Bool displayingMeteors;
|
||||
int64 timeOfFirstMeteorShower;
|
||||
int16 numberOfSimultaneousShowers;
|
||||
|
||||
#endif /* JAVA */
|
||||
|
||||
/*
|
||||
** Put the editor stuff at the end so that people can still use the
|
||||
** the Java DLL from the 2.0 dist build with Navigator Gold.
|
||||
*/
|
||||
PRPackedBool is_editor; /* differentiates between Editor and Browser modes */
|
||||
PRPackedBool is_new_document; /* quick access to new doc state (unsaved-no file yet)*/
|
||||
PRPackedBool display_paragraph_marks; /* True if we should display paragraph and hard-return symbols. */
|
||||
PRPackedBool display_table_borders; /* True if we should display dotted lines around tables with invisible borders. */
|
||||
PRPackedBool edit_view_source_hack;
|
||||
PRPackedBool edit_loading_url; /* Hack to let us run the net while in a modal dialog */
|
||||
PRPackedBool edit_saving_url; /* " */
|
||||
PRPackedBool edit_has_backup; /* Editor has made a session backup */
|
||||
PRPackedBool bIsComposeWindow; /* Editor is a compose window */
|
||||
|
||||
/*
|
||||
* Webfonts that were loaded by this context
|
||||
*/
|
||||
void *webfontsList;
|
||||
|
||||
/* web font stuff */
|
||||
/* On Windows, they are initialized to 0 in cxdc.cpp */
|
||||
int16 WebFontDownLoadCount; /* # of download for this doc( one download can have multiple fonts) */
|
||||
int16 MissedFontFace; /* have we missed any font? */
|
||||
|
||||
/* number of pixels per point-size */
|
||||
double XpixelsPerPoint;
|
||||
double YpixelsPerPoint;
|
||||
|
||||
Bool bJavaScriptCalling;
|
||||
/* Allow JavaScript in certain internally generated contexts even
|
||||
* when the "enable javascript" pref is turned off.
|
||||
* This flag will also be inherited by child grid cells.
|
||||
*/
|
||||
PRPackedBool forceJSEnabled;
|
||||
|
||||
/* For increase and decrease font */
|
||||
double fontScalingPercentage;
|
||||
|
||||
int INTL_tag; /* used to tell that we have a valid INTL_CSIInfo */
|
||||
INTL_CharSetInfo INTL_CSIInfo; /* new home of private i18n data */
|
||||
|
||||
/* the current tab focused data */
|
||||
LO_TabFocusData *tab_focus_data;
|
||||
|
||||
void *ncast_channel_context;
|
||||
/* if the window is displaying an XML file, keep a pointer to the XML file structure here */
|
||||
void* xmlfile;
|
||||
Bool anonymous;
|
||||
URL_Struct* modular_data;
|
||||
PRInt32 ref_count;
|
||||
|
||||
/* This gets set to `true' when layout encounters an image with no
|
||||
width or height: layout will proceed to place the image, but
|
||||
the FE will have to do a reflow once all the netlib connections
|
||||
terminate for the page to be correctly displayed. The idea is
|
||||
to get visible content to the user ASAP, even if it means that
|
||||
stuff looks funny for a couple seconds. */
|
||||
PRPackedBool requires_reflow;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
nsITransferListener* progressManager;
|
||||
#else
|
||||
void* progressManager;
|
||||
#endif /* __cplusplus */
|
||||
};
|
||||
|
||||
|
||||
/* This tells libmime.a whether it has the mime_data slot in MWContext
|
||||
(which should always be true eventually, but having this #define here
|
||||
makes life easier for me today.) -- jwz */
|
||||
#define HAVE_MIME_DATA_SLOT
|
||||
|
||||
|
||||
/* this is avialible even in non GOLD builds. */
|
||||
#define EDT_IS_EDITOR(context) (context != NULL && context->is_editor)
|
||||
#define EDT_DISPLAY_PARAGRAPH_MARKS(context) (context && context->is_editor && context->display_paragraph_marks)
|
||||
#define EDT_DISPLAY_TABLE_BORDERS(context) (context && context->is_editor && context->display_table_borders)
|
||||
#define EDT_RELAYOUT_FLAG (0x2)
|
||||
#define EDT_IN_RELAYOUT(context) (context != NULL && ((context->is_editor & EDT_RELAYOUT_FLAG) != 0))
|
||||
|
||||
#ifdef JAVA
|
||||
|
||||
/*
|
||||
** This macro is used to recover the MWContext* from the javaContexts
|
||||
** list pointer:
|
||||
*/
|
||||
#define MWCONTEXT_PTR(context) \
|
||||
((MWContext*) ((char*) (context) - offsetof(MWContext,javaContexts)))
|
||||
|
||||
#endif /* JAVA */
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ====================== NASTY UGLY SHORT TERM HACKS ===================== */
|
||||
|
||||
#define XP_CONTEXTID(ctxt) ((ctxt)->context_id)
|
||||
#define XP_DOCID(ctxt) ((ctxt)->doc_id)
|
||||
#define XP_SET_DOCID(ctxt, id) ((ctxt)->doc_id = (id))
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* ============= Typedefs for the parser module structures ================ */
|
||||
|
||||
/*
|
||||
* I *think* (but am unsure) that these should be forked off into a
|
||||
* parser specific client level include file
|
||||
*
|
||||
*/
|
||||
|
||||
typedef int8 TagType;
|
||||
|
||||
struct PA_Tag_struct {
|
||||
TagType type;
|
||||
PRPackedBool is_end;
|
||||
uint16 newline_count;
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
union { /* use an anonymous union for debugging purposes*/
|
||||
PA_Block data;
|
||||
char* data_str;
|
||||
};
|
||||
#else
|
||||
PA_Block data;
|
||||
#endif
|
||||
int32 data_len;
|
||||
int32 true_len;
|
||||
void *lo_data;
|
||||
struct PA_Tag_struct *next;
|
||||
ED_Element *edit_element;
|
||||
};
|
||||
|
||||
typedef struct _TagList {
|
||||
PA_Tag *tagList;
|
||||
PA_Tag *lastTag;
|
||||
} TagList;
|
||||
|
||||
#define PA_HAS_PDATA( tag ) (tag->pVoid != 0 )
|
||||
|
||||
#ifdef XP_UNIX
|
||||
typedef char *PAAllocate (intn byte_cnt);
|
||||
typedef void PAFree (char *ptr);
|
||||
#else
|
||||
typedef void *PAAllocate (unsigned int byte_cnt);
|
||||
typedef void PAFree (void *ptr);
|
||||
#endif
|
||||
typedef intn PA_OutputFunction (void *data_object, PA_Tag *tags, intn status);
|
||||
|
||||
struct _PA_Functions {
|
||||
PAAllocate *mem_allocate;
|
||||
PAFree *mem_free;
|
||||
PA_OutputFunction *PA_ParsedTag;
|
||||
};
|
||||
|
||||
typedef struct PA_InitData_struct {
|
||||
PA_OutputFunction *output_func;
|
||||
} PA_InitData;
|
||||
|
||||
/* Structure that defines the characteristics of a new window.
|
||||
* Each entry should be structured so that 0 should be the
|
||||
* default normal value. Currently all 0 values
|
||||
* bring up a chromeless MWContextBrowser type window of
|
||||
* arbitrary size.
|
||||
*/
|
||||
struct _Chrome {
|
||||
MWContextType type; /* Must be set to the correct type you want,
|
||||
* if doesn't exist, define one!!!
|
||||
*/
|
||||
Bool show_button_bar; /* TRUE to display button bar */
|
||||
Bool show_url_bar; /* TRUE to show URL entry area */
|
||||
Bool show_directory_buttons; /* TRUE to show directory buttons */
|
||||
Bool show_bottom_status_bar; /* TRUE to show bottom status bar */
|
||||
Bool show_menu; /* TRUE to show menu bar */
|
||||
Bool show_security_bar; /* TRUE to show security bar */
|
||||
Bool hide_title_bar; /* TRUE to hide title bar and window controls */
|
||||
int32 w_hint, h_hint; /* hints for width and height */
|
||||
int32 outw_hint, outh_hint; /* hints for outer window width and height */
|
||||
int32 l_hint, t_hint; /* hints for left and top window positioning */
|
||||
Bool topmost; /* TRUE for window alwaysOnTop */
|
||||
Bool bottommost; /* TRUE for 'desktop' window */
|
||||
Bool z_lock; /* TRUE for window which cannot move within z-order */
|
||||
Bool is_modal; /* TRUE to make window be modal */
|
||||
Bool show_scrollbar; /* TRUE to show scrollbars on window */
|
||||
Bool location_is_chrome; /* TRUE if top or left is specified */
|
||||
Bool allow_resize; /* TRUE to allow resize of windows */
|
||||
Bool allow_close; /* TRUE to allow window to be closed */
|
||||
Bool copy_history; /* TRUE to copy history of prototype context*/
|
||||
Bool dependent; /* TRUE if this window is to be closed with its parent*/
|
||||
Bool disable_commands; /* TRUE if user has set hot-keys / menus off */
|
||||
Bool restricted_target; /* TRUE if window is off-limits for opening links into
|
||||
from mail or other window-grabbing functions.*/
|
||||
void (* close_callback)(void *close_arg); /* called on window close */
|
||||
void *close_arg; /* passed to close_callback */
|
||||
};
|
||||
|
||||
|
||||
#endif /* _STRUCTS_H_ */
|
@ -1,121 +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):
|
||||
*/
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Stuff to fake unix file I/O on windows boxes
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef WINFILE_H
|
||||
#define WINFILE_H
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#if defined(XP_WIN32) || defined(_WIN32)
|
||||
/* 32-bit stuff here */
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys\types.h>
|
||||
#include <sys\stat.h>
|
||||
|
||||
typedef struct DIR_Struct {
|
||||
void * directoryPtr;
|
||||
WIN32_FIND_DATA data;
|
||||
} DIR;
|
||||
|
||||
#define _ST_FSTYPSZ 16
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
typedef unsigned long mode_t;
|
||||
typedef long uid_t;
|
||||
typedef long gid_t;
|
||||
typedef long off_t;
|
||||
typedef unsigned long nlink_t;
|
||||
#endif
|
||||
|
||||
typedef struct timestruc {
|
||||
time_t tv_sec; /* seconds */
|
||||
long tv_nsec; /* and nanoseconds */
|
||||
} timestruc_t;
|
||||
|
||||
|
||||
struct dirent { /* data from readdir() */
|
||||
ino_t d_ino; /* inode number of entry */
|
||||
off_t d_off; /* offset of disk direntory entry */
|
||||
unsigned short d_reclen; /* length of this record */
|
||||
char d_name[_MAX_FNAME]; /* name of file */
|
||||
};
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
#define S_ISDIR(s) ((s) & _S_IFDIR)
|
||||
#endif
|
||||
|
||||
#else /* _WIN32 */
|
||||
/* 16-bit windows stuff */
|
||||
|
||||
#include <sys\types.h>
|
||||
#include <sys\stat.h>
|
||||
#include <dos.h>
|
||||
|
||||
|
||||
|
||||
/* Getting cocky to support multiple file systems */
|
||||
typedef struct dirStruct_tag {
|
||||
struct _find_t file_data;
|
||||
char c_checkdrive;
|
||||
} dirStruct;
|
||||
|
||||
typedef struct DIR_Struct {
|
||||
void * directoryPtr;
|
||||
dirStruct data;
|
||||
} DIR;
|
||||
|
||||
#define _ST_FSTYPSZ 16
|
||||
typedef unsigned long mode_t;
|
||||
typedef long uid_t;
|
||||
typedef long gid_t;
|
||||
typedef long off_t;
|
||||
typedef unsigned long nlink_t;
|
||||
|
||||
typedef struct timestruc {
|
||||
time_t tv_sec; /* seconds */
|
||||
long tv_nsec; /* and nanoseconds */
|
||||
} timestruc_t;
|
||||
|
||||
struct dirent { /* data from readdir() */
|
||||
ino_t d_ino; /* inode number of entry */
|
||||
off_t d_off; /* offset of disk direntory entry */
|
||||
unsigned short d_reclen; /* length of this record */
|
||||
#ifdef XP_WIN32
|
||||
char d_name[_MAX_FNAME]; /* name of file */
|
||||
#else
|
||||
char d_name[20]; /* name of file */
|
||||
#endif
|
||||
};
|
||||
|
||||
#define S_ISDIR(s) ((s) & _S_IFDIR)
|
||||
|
||||
#endif /* 16-bit windows */
|
||||
|
||||
#define CONST const
|
||||
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
#endif /* WINFILE_H */
|
47
include/xp.h
47
include/xp.h
@ -1,47 +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):
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
xp.h
|
||||
|
||||
This file is left around for backwards compatability. Nothing new should
|
||||
be added to this file. Rather, add it to the client specific section or
|
||||
the cross-platform specific area depending on what is appropriate.
|
||||
|
||||
-------------------------------------------------------------------------*/
|
||||
#ifndef _XP_H_
|
||||
#define _XP_H_
|
||||
|
||||
#include "xp_mcom.h"
|
||||
#include "client.h"
|
||||
|
||||
#ifdef HEAPAGENT
|
||||
|
||||
#define MEM_DEBUG 1
|
||||
#define DEFINE_NEW_MACRO 1
|
||||
#include <heapagnt.h>
|
||||
|
||||
#endif /* HEAPAGENT */
|
||||
|
||||
#endif /* !_XP_H_ */
|
||||
|
@ -1,103 +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 _XPGETSTR_H_
|
||||
#define _XPGETSTR_H_
|
||||
#include "prtypes.h"
|
||||
|
||||
XP_BEGIN_PROTOS
|
||||
|
||||
/**@name Platform Independent String Resources */
|
||||
/*@{*/
|
||||
/**
|
||||
* Get a cross platform string resource by ID.
|
||||
*
|
||||
* This function makes localization easier for cross platform strings.
|
||||
* The cross platfrom string resources are defined in allxpstr.h.
|
||||
* You should use XP_GetString when:
|
||||
* <OL>
|
||||
* <LI>Any human readable string that not in front-end
|
||||
* <LI>With the exception of HTML strings (use XP_GetStringForHTML)
|
||||
* <LI>The translator/localizer will then translate the string defined
|
||||
* in allxpstr.h and show the translated version to user.
|
||||
* </OL>
|
||||
* The caller should make a copy of the returned string if it needs to use
|
||||
* it for a while. The same memory buffer will be used to store
|
||||
* another string the next time this function is called. The caller
|
||||
* does not need to free the memory of the returned string.
|
||||
* @param id Specifies the string resource ID
|
||||
* @return Localized (translated) string
|
||||
* @see XP_GetStringForHTML
|
||||
* @see INTL_ResourceCharSet
|
||||
*/
|
||||
PUBLIC char *XP_GetString(int id);
|
||||
|
||||
PUBLIC char *XP_CopyStringInUTF8(int id);
|
||||
PUBLIC char *XP_CopyString(int id);
|
||||
/**
|
||||
* Get a cross platform HTML string resource by ID.
|
||||
*
|
||||
* This function makes localization easier for cross platform strings used
|
||||
* for generating HTML. The cross platfrom string resources are defined in
|
||||
* allxpstr.h. You should use XP_GetStringForHTML when:
|
||||
* <OL>
|
||||
* <LI>Human readable string not defined in front-end
|
||||
* <LI>The code generates HTML page and will go into HTML window
|
||||
* <LI>Only use this when the message will be generated into HTML.
|
||||
* <LI>Only use this if you can access to the winCharSetID.
|
||||
* <LI>This is needed because half of the text is generated from resource
|
||||
* (in resource charset) and half of the text is coming from the net
|
||||
* (in winCharSetID charset). When we meet this kind of mixing charset
|
||||
* condition. We use this function instead of XP_GetString().
|
||||
* </OL>
|
||||
*
|
||||
* The code checks the current CharSetID in the resource and the
|
||||
* CharSetID of the data from the net. If they are equal, it returns the
|
||||
* string defined in the resource, otherwise, it will return the English
|
||||
* version. So a French client can display French if the data from the
|
||||
* net is in the CharSetID of French and it will use half English and half
|
||||
* Japanese if the French client receives Japanese data from the net.
|
||||
*
|
||||
* The caller should make a copy of the returned string if it needs to use
|
||||
* it for a while. The same memory buffer will be used to store
|
||||
* another string the next time this function get called. The caller
|
||||
* does not need to free the memory of the returned string.
|
||||
*
|
||||
* @param id Specifies the string resource ID
|
||||
* @param winCharSetID Specifies the winCharSetID of the HTML
|
||||
* @param english Specifies the English string
|
||||
* @return Localized (translated) string if the winCharSetID
|
||||
* matches the CharSetID of the resource. Otherwise it
|
||||
* returns the English message or the English string
|
||||
* @see XP_GetStringForHTML
|
||||
* @see INTL_ResourceCharSet
|
||||
*/
|
||||
PUBLIC char *XP_GetStringForHTML(
|
||||
int id,
|
||||
int16 winCharSetID,
|
||||
char* english
|
||||
);
|
||||
/*@}*/
|
||||
|
||||
XP_END_PROTOS
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user