diff --git a/cmd/ybfe/src/Document.h b/cmd/ybfe/src/Document.h new file mode 100644 index 000000000000..00339a3df295 --- /dev/null +++ b/cmd/ybfe/src/Document.h @@ -0,0 +1,8 @@ +// Document.h + +#import + +@interface Document : NSDocument { +} + +@end diff --git a/cmd/ybfe/src/Document.m b/cmd/ybfe/src/Document.m new file mode 100644 index 000000000000..259d21695fb1 --- /dev/null +++ b/cmd/ybfe/src/Document.m @@ -0,0 +1,37 @@ +// Document.m + +#import "Document.h" + +@implementation Document + +// ----------------------------------------------------------------------------- +// Override returning the nib file name of the document + +- (NSString *)windowNibName { + // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead. + return @"Mozilla Window"; +} + +// ----------------------------------------------------------------------------- +// Override + +- (void)windowControllerDidLoadNib:(NSWindowController *) aController{ + [super windowControllerDidLoadNib:aController]; + // Add any code here that need to be executed once the windowController has loaded the document's window. +} + +// ----------------------------------------------------------------------------- +// Override + +- (NSData *)dataRepresentationOfType:(NSString *)aType { + return nil; +} + +// ----------------------------------------------------------------------------- +// Override + +- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType { + return YES; +} + +@end diff --git a/cmd/ybfe/src/InfoPanelController.h b/cmd/ybfe/src/InfoPanelController.h new file mode 100644 index 000000000000..0110be2fa9ad --- /dev/null +++ b/cmd/ybfe/src/InfoPanelController.h @@ -0,0 +1,8 @@ +// InfoPanelController.h + +#import + +@interface InfoPanelController : NSWindowController { +} + +@end diff --git a/cmd/ybfe/src/InfoPanelController.m b/cmd/ybfe/src/InfoPanelController.m new file mode 100644 index 000000000000..fcf97586d8d7 --- /dev/null +++ b/cmd/ybfe/src/InfoPanelController.m @@ -0,0 +1,16 @@ +// InfoPanelController.m + +#import "InfoPanelController.h" + +@implementation InfoPanelController + +- (id)init { + return [super initWithWindowNibName:@"InfoPanel"]; +} + +- (IBAction)showWindow:(id)sender { + [[self window] center]; + [super showWindow:sender]; +} + +@end diff --git a/cmd/ybfe/src/Makefile b/cmd/ybfe/src/Makefile new file mode 100644 index 000000000000..f7c148a4b783 --- /dev/null +++ b/cmd/ybfe/src/Makefile @@ -0,0 +1,70 @@ +# +# Generated by the NeXT Project Builder. +# +# NOTE: Do NOT change this file -- Project Builder maintains it. +# +# Put all of your customizations in files called Makefile.preamble +# and Makefile.postamble (both optional), and Makefile will include them. +# + +NAME = mozilla + +PROJECTVERSION = 2.7 +PROJECT_TYPE = Document Based Application +LANGUAGE = English + +NEXTSTEP_APPICON = mozilla.tiff +NEXTSTEP_DOCICONS = mozilla.tiff + +ICONSECTIONS = -sectcreate __ICON app mozilla.tiff \ + -sectcreate __ICON mozilla mozilla.tiff + +LOCAL_RESOURCES = InfoPanel.nib Document.nib mozilla.nib\ + mozilla-windows.nib + +GLOBAL_RESOURCES = mozilla.tiff CustomInfo.plist + +CLASSES = Document.m InfoPanelController.m + +HFILES = Document.h InfoPanelController.h ybform.h + +MFILES = mozilla_main.m + +CFILES = ybbm.c ybctxt.c ybdlgs.c ybedit.c ybenc.c ybform.c ybgrid.c\ + ybhelp.c ybimg.c yblay.c ybloc.c ybmail.c ybplug.c ybps.c\ + ybrdf.c ybrgn.c ybsec.c ybstr.c ybtime.c + +OTHERSRCS = Makefile.preamble Makefile Makefile.postamble m.template\ + h.template java.template + + +MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles +CODE_GEN_STYLE = DYNAMIC +MAKEFILE = app.make +NEXTSTEP_INSTALLDIR = $(HOME)/Apps +WINDOWS_INSTALLDIR = /MyApps +LIBS = +DEBUG_LIBS = $(LIBS) +PROF_LIBS = $(LIBS) + + +HEADER_PATHS = -I../../include -I../../nsprpub/pr/include +FRAMEWORKS = -framework AppKit -framework Foundation + + +NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc +WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc +PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc +NEXTSTEP_JAVA_COMPILER = /usr/bin/javac +WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe +PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac + +include $(MAKEFILEDIR)/platform.make + +-include Makefile.preamble + +include $(MAKEFILEDIR)/$(MAKEFILE) + +-include Makefile.postamble + +-include Makefile.dependencies diff --git a/cmd/ybfe/src/Makefile.mozilla b/cmd/ybfe/src/Makefile.mozilla new file mode 100644 index 000000000000..6c1b6dffe6c5 --- /dev/null +++ b/cmd/ybfe/src/Makefile.mozilla @@ -0,0 +1,90 @@ +DEPTH = ../../.. +MODULE = ybfe + +include $(DEPTH)/config/config.mk + +CSRCS = \ + ybbm.c \ + ybctxt.c \ + ybdlgs.c \ + ybedit.c \ + ybenc.c \ + ybform.c \ + ybgrid.c \ + ybhelp.c \ + ybimg.c \ + yblay.c \ + ybloc.c \ + ybmail.c \ + ybplug.c \ + ybps.c \ + ybrdf.c \ + ybrgn.c \ + ybsec.c \ + ybstr.c \ + ybtime.c \ + $(NULL) + + +#LDFLAGS = + + +REQUIRES = \ + nsprpub \ + js \ + img \ + layer \ + xp \ + util \ + $(NULL) + + +BASIC_LIBS = \ + $(DIST)/lib/libxlate.a \ + $(DIST)/lib/libmimetype.a \ + $(DIST)/lib/libnetcache.a \ + $(DIST)/lib/libnetcnvts.a \ + $(DIST)/lib/libnetwork.a \ + $(DIST)/lib/libnetutil.a \ + $(DIST)/lib/libnetcnvts.a \ + $(DIST)/lib/libcnetinit.a \ + $(DIST)/lib/libabouturl.a \ + $(DIST)/lib/libdataurl.a \ + $(DIST)/lib/libfileurl.a \ + $(DIST)/lib/libftpurl.a \ + $(DIST)/lib/libgophurl.a \ + $(DIST)/lib/libhttpurl.a \ + $(DIST)/lib/libjsurl.a \ + $(DIST)/lib/libmarimurl.a \ + $(DIST)/lib/libremoturl.a \ + $(DIST)/lib/libnetwork.a \ + $(DIST)/lib/lib$(LITE_PREFIX)rdf.a \ + $(DIST)/lib/lib$(LITE_PREFIX)xml.a \ + $(DIST)/lib/lib$(LITE_PREFIX)lay.a \ + $(DIST)/lib/libpng.a \ + $(DIST)/lib/libmariner.a \ + $(DIST)/lib/libimg.a \ + $(DIST)/lib/libprivacy.a \ + $(NULL) + + +TARGETS += $(OBJDIR)/moz-export + +ALL_TARGETS = $(TARGETS) + + +include $(DEPTH)/config/rules.mk + +$(OBJDIR)/moz-export: $(OBJS) + @$(MAKE_OBJDIR) + rm -f $@ + $(CCLD) -o $@ $(LDFLAGS) $(OBJS) $(BASIC_LIBS) -L$(DIST)/bin -L$(DIST)/lib $(DSO_EX_LIBS) $(DNS_LIB) + @$(EXTRA_POST_LINK_CMD) $@ + +install:: $(TARGETS) +ifdef TARGETS + $(INSTALL) $(filter-out tweak_nspr,$(TARGETS)) $(DIST)/bin +endif + + +everything: all $(ALL_TARGETS) diff --git a/cmd/ybfe/src/Makefile.postamble b/cmd/ybfe/src/Makefile.postamble new file mode 100644 index 000000000000..1663b932e0ed --- /dev/null +++ b/cmd/ybfe/src/Makefile.postamble @@ -0,0 +1,112 @@ +############################################################################### +# Makefile.postamble +# Copyright 1997, Apple Computer, Inc. +# +# Use this makefile, which is imported after all other makefiles, to +# override attributes for a project's Makefile environment. This allows you +# to take advantage of the environment set up by the other Makefiles. +# You can also define custom rules at the end of this file. +# +############################################################################### +# +# These variables are exported by the standard makefiles and can be +# used in any customizations you make. They are *outputs* of +# the Makefiles and should be used, not set. +# +# PRODUCTS: products to install. All of these products will be placed in +# the directory $(DSTROOT)$(INSTALLDIR) +# GLOBAL_RESOURCE_DIR: The directory to which resources are copied. +# LOCAL_RESOURCE_DIR: The directory to which localized resources are copied. +# OFILE_DIR: Directory into which .o object files are generated. +# DERIVED_SRC_DIR: Directory used for all other derived files +# +# ALL_CFLAGS: flags to pass when compiling .c files +# ALL_MFLAGS: flags to pass when compiling .m files +# ALL_CCFLAGS: flags to pass when compiling .cc, .cxx, and .C files +# ALL_MMFLAGS: flags to pass when compiling .mm, .mxx, and .M files +# ALL_PRECOMPFLAGS: flags to pass when precompiling .h files +# ALL_LDFLAGS: flags to pass when linking object files +# ALL_LIBTOOL_FLAGS: flags to pass when libtooling object files +# ALL_PSWFLAGS: flags to pass when processing .psw and .pswm (pswrap) files +# ALL_RPCFLAGS: flags to pass when processing .rpc (rpcgen) files +# ALL_YFLAGS: flags to pass when processing .y (yacc) files +# ALL_LFLAGS: flags to pass when processing .l (lex) files +# +# NAME: name of application, bundle, subproject, palette, etc. +# LANGUAGE: langage in which the project is written (default "English") +# LOCAL_RESOURCES: localized resources (e.g. nib's, images) of project +# GLOBAL_RESOURCES: non-localized resources of project +# +# SRCROOT: base directory in which to place the new source files +# SRCPATH: relative path from SRCROOT to present subdirectory +# +# INSTALLDIR: Directory the product will be installed into by 'install' target +# PUBLIC_HDR_INSTALLDIR: where to install public headers. Don't forget +# to prefix this with DSTROOT when you use it. +# PRIVATE_HDR_INSTALLDIR: where to install private headers. Don't forget +# to prefix this with DSTROOT when you use it. +# +# EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows) +# +############################################################################### + +# Some compiler flags can be overridden here for certain build situations. +# +# WARNING_CFLAGS: flag used to set warning level (defaults to -Wmost) +# DEBUG_SYMBOLS_CFLAGS: debug-symbol flag passed to all builds (defaults +# to -g) +# DEBUG_BUILD_CFLAGS: flags passed during debug builds (defaults to -DDEBUG) +# OPTIMIZE_BUILD_CFLAGS: flags passed during optimized builds (defaults +# to -O) +# PROFILE_BUILD_CFLAGS: flags passed during profile builds (defaults +# to -pg -DPROFILE) +# LOCAL_DIR_INCLUDE_DIRECTIVE: flag used to add current directory to +# the include path (defaults to -I.) +# DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags +# passed to ld/libtool (defaults to nothing) + + +# Library and Framework projects only: +# INSTALL_NAME_DIRECTIVE: This directive ensures that executables linked +# against the framework will run against the correct version even if +# the current version of the framework changes. You may override this +# to "" as an alternative to using the DYLD_LIBRARY_PATH during your +# development cycle, but be sure to restore it before installing. + + +# Ownership and permissions of files installed by 'install' target + +#INSTALL_AS_USER = root + # User/group ownership +#INSTALL_AS_GROUP = wheel + # (probably want to set both of these) +#INSTALL_PERMISSIONS = + # If set, 'install' chmod's executable to this + + +# Options to strip. Note: -S strips debugging symbols (executables can be stripped +# down further with -x or, if they load no bundles, with no options at all). + +#STRIPFLAGS = -S + + +######################################################################### +# Put rules to extend the behavior of the standard Makefiles here. Include them in +# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble. +# +# You should avoid redefining things like "install" or "app", as they are +# owned by the top-level Makefile API and no context has been set up for where +# derived files should go. +# + +DEPTH = ../../.. +MODULE = ybfe + +include $(DEPTH)/config/config.mk + +REQUIRES = \ + nsprpub \ + js \ + $(NULL) + +include $(DEPTH)/config/rules.mk diff --git a/cmd/ybfe/src/Makefile.preamble b/cmd/ybfe/src/Makefile.preamble new file mode 100644 index 000000000000..83f25c7615fe --- /dev/null +++ b/cmd/ybfe/src/Makefile.preamble @@ -0,0 +1,123 @@ +############################################################################### +# Makefile.preamble +# Copyright 1997, Apple Computer, Inc. +# +# Use this makefile for configuring the standard application makefiles +# associated with ProjectBuilder. It is included before the main makefile. +# In Makefile.preamble you set attributes for a project, so they are available +# to the project's makefiles. In contrast, you typically write additional rules or +# override built-in behavior in the Makefile.postamble. +# +# Each directory in a project tree (main project plus subprojects) should +# have its own Makefile.preamble and Makefile.postamble. +############################################################################### +# +# Before the main makefile is included for this project, you may set: +# +# MAKEFILEDIR: Directory in which to find $(MAKEFILE) +# MAKEFILE: Top level mechanism Makefile (e.g., app.make, bundle.make) + +# Compiler/linker flags added to the defaults: The OTHER_* variables will be +# inherited by all nested sub-projects, but the LOCAL_ versions of the same +# variables will not. Put your -I, -D, -U, and -L flags in ProjectBuilder's +# Build Attributes inspector if at all possible. To override the default flags +# that get passed to ${CC} (e.g. change -O to -O2), see Makefile.postamble. The +# variables below are *inputs* to the build process and distinct from the override +# settings done (less often) in the Makefile.postamble. +# +# OTHER_CFLAGS, LOCAL_CFLAGS: additional flags to pass to the compiler +# Note that $(OTHER_CFLAGS) and $(LOCAL_CFLAGS) are used for .h, ...c, .m, +# .cc, .cxx, .C, and .M files. There is no need to respecify the +# flags in OTHER_MFLAGS, etc. +# OTHER_MFLAGS, LOCAL_MFLAGS: additional flags for .m files +# OTHER_CCFLAGS, LOCAL_CCFLAGS: additional flags for .cc, .cxx, and ...C files +# OTHER_MMFLAGS, LOCAL_MMFLAGS: additional flags for .mm and .M files +# OTHER_PRECOMPFLAGS, LOCAL_PRECOMPFLAGS: additional flags used when +# precompiling header files +# OTHER_LDFLAGS, LOCAL_LDFLAGS: additional flags passed to ld and libtool +# OTHER_PSWFLAGS, LOCAL_PSWFLAGS: additional flags passed to pswrap +# OTHER_RPCFLAGS, LOCAL_RPCFLAGS: additional flags passed to rpcgen +# OTHER_YFLAGS, LOCAL_YFLAGS: additional flags passed to yacc +# OTHER_LFLAGS, LOCAL_LFLAGS: additional flags passed to lex + +# These variables provide hooks enabling you to add behavior at almost every +# stage of the make: +# +# BEFORE_PREBUILD: targets to build before installing headers for a subproject +# AFTER_PREBUILD: targets to build after installing headers for a subproject +# BEFORE_BUILD_RECURSION: targets to make before building subprojects +# BEFORE_BUILD: targets to make before a build, but after subprojects +# AFTER_BUILD: targets to make after a build +# +# BEFORE_INSTALL: targets to build before installing the product +# AFTER_INSTALL: targets to build after installing the product +# BEFORE_POSTINSTALL: targets to build before postinstalling every subproject +# AFTER_POSTINSTALL: targts to build after postinstalling every subproject +# +# BEFORE_INSTALLHDRS: targets to build before installing headers for a +# subproject +# AFTER_INSTALLHDRS: targets to build after installing headers for a subproject +# BEFORE_INSTALLSRC: targets to build before installing source for a subproject +# AFTER_INSTALLSRC: targets to build after installing source for a subproject +# +# BEFORE_DEPEND: targets to build before building dependencies for a +# subproject +# AFTER_DEPEND: targets to build after building dependencies for a +# subproject +# +# AUTOMATIC_DEPENDENCY_INFO: if YES, then the dependency file is +# updated every time the project is built. If NO, the dependency +# file is only built when the depend target is invoked. + +# Framework-related variables: +# FRAMEWORK_DLL_INSTALLDIR: On Windows platforms, this variable indicates +# where to put the framework's DLL. This variable defaults to +# $(INSTALLDIR)/../Executables + +# Library-related variables: +# PUBLIC_HEADER_DIR: Determines where public exported header files +# should be installed. Do not include $(DSTROOT) in this value -- +# it is prefixed automatically. +# PRIVATE_HEADER_DIR: Determines where private exported header files +# should be installed. Do not include $(DSTROOT) in this value -- +# it is prefixed automatically. +# LIBRARY_STYLE: This may be either STATIC or DYNAMIC, and determines +# whether the libraries produced are statically linked when they +# are used or if they are dynamically loadable. <> +# LIBRARY_DLL_INSTALLDIR: On Windows platforms, this variable indicates +# where to put the library's DLL. This variable defaults to +# $(INSTALLDIR)/../Executables +# +# INSTALL_AS_USER: owner of the intalled products (default root) +# INSTALL_AS_GROUP: group of the installed products (default wheel) +# INSTALL_PERMISSION: permissions of the installed product (default o+rX) +# +# OTHER_RECURSIVE_VARIABLES: The names of variables which you want to be +# passed on the command line to recursive invocations of make. Note that +# the values in OTHER_*FLAGS are inherited by subprojects automatically -- +# you do not have to (and shouldn't) add OTHER_*FLAGS to +# OTHER_RECURSIVE_VARIABLES. + +# Additional headers to export beyond those in the PB.project: +# OTHER_PUBLIC_HEADERS +# OTHER_PROJECT_HEADERS +# OTHER_PRIVATE_HEADERS + +# Additional files for the project's product: <> +# OTHER_RESOURCES: (non-localized) resources for this project +# OTHER_OFILES: relocatables to be linked into this project +# OTHER_LIBS: more libraries to link against +# OTHER_PRODUCT_DEPENDS: other dependencies of this project +# OTHER_SOURCEFILES: other source files maintained by .pre/postamble +# OTHER_GARBAGE: additional files to be removed by `make clean' + +# Set this to YES if you don't want a final libtool call for a library/framework. +# BUILD_OFILES_LIST_ONLY + +# To include a version string, project source must exist in a directory named +# $(NAME).%d[.%d][.%d] and the following line must be uncommented. +# OTHER_GENERATED_OFILES = $(VERS_OFILE) + +# This definition will suppress stripping of debug symbols when an executable +# is installed. By default it is YES. +# STRIP_ON_INSTALL = NO diff --git a/cmd/ybfe/src/mozilla_main.m b/cmd/ybfe/src/mozilla_main.m new file mode 100644 index 000000000000..b9aa107d0f95 --- /dev/null +++ b/cmd/ybfe/src/mozilla_main.m @@ -0,0 +1,27 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + * ybfe main - this is where the app starts + */ + +#import + +int main(int argc, const char *argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/cmd/ybfe/src/ybbm.c b/cmd/ybfe/src/ybbm.c new file mode 100644 index 000000000000..9e71609bb94d --- /dev/null +++ b/cmd/ybfe/src/ybbm.c @@ -0,0 +1,206 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + yb_bm.c --- yb functions dealing with front-end + bookmarks handling. +*/ + +#include "structs.h" +#include "ntypes.h" +#include "bkmks.h" + +/* The list of bookmarks has changed somehow, so any "bookmarks" menu needs to + be recreated. This should be a cheap call, just setting a flag in the FE so + that it knows to recreate the menu later (like, when the user tries to view + it). Recreating it immediately would be bad, because this can get called + much more often than is reasonable. */ +void +BMFE_BookmarkMenuInvalid(MWContext* context) +{ +} + + +/* Edit the given item in the bookmarks property window. If there is no + bookmarks property window currently, then the FE should ignore this call. + If the bookmarks property window is currently displaying some other entry, + then it should save any changes made to that entry (by calling BM_SetName, + etc.) before loading up this entry. */ +void +BMFE_EditItem(MWContext* context, + BM_Entry* entry) +{ +} + +/* Use these to know when to allow refresh */ +void +BMFE_StartBatch(MWContext* context) +{ +} + +void +BMFE_EndBatch(MWContext* context) +{ +} + +/* The given entry is no longer valid (i.e., the user just deleted it). So, + the given pointer is about to become invalid, and the FE should remove any + references to it it may have. In particular, if it is the one being edited + in the bookmarks property window, then the FE should clear that window. */ +void +BMFE_EntryGoingAway(MWContext* context, + BM_Entry* entry) +{ +} + +/* We've finished processing What's Changed. The What's Changed window should + change to display the summary of what happened. It should look something + like this: + + Done checking <157> Bookmarks. + <134> documents were reached. + <27> documents have changed and are marked in blue. + + [ OK ] + + When the user clicks on the OK, the FE should just take down the window. + (It doesn't matter if the FE calls BM_CancelWhatsChanged(); it will be a + no-op in this situtation.) */ + +void +BMFE_FinishedWhatsChanged(MWContext* context, + int32 totalchecked, + int32 numreached, + int32 numchanged) +{ +} + +/* return the clipboard contents */ +void* +BMFE_GetClipContents(MWContext* context, + int32* length) +{ +} + +/* The user has requested to view the given url. Show it to him in, using some + appropriate context. Url may be targeted to a different window */ +void +BMFE_GotoBookmark(MWContext* context, + const char* url, + const char* target) +{ +} + +/* measure the item and assign the width and height required to draw it into + the widget into width and height. This is used only by BM_WidestEntry(); if + you don't need that call, you can just make this an empty yb. */ +void +BMFE_MeasureEntry(MWContext* context, + BM_Entry* entry, + uint32* width, + uint32* height) +{ +} + +/* Create the bookmarks property window. If one already exists, just bring it + to the front. This will always be immediately followed by a call to + BMFE_EditItem(). */ +void +BMFE_OpenBookmarksWindow(MWContext* context) +{ +} + +/* Create the find dialog, and fill it in as specified in the given + structure. When the user hits the "Find" button in the dialog, call + BM_DoFindBookmark. */ +void* +BMFE_OpenFindWindow(MWContext* context, + BM_FindInfo* findInfo) +{ +} + +/* Refresh each cell between and including first and last in the bookmarks + widget (if now is TRUE, the FE is expected to redraw them BEFORE returning, + otherwise the FE can simply invalidate them and wait for the redraw to + happen). If BM_LAST_CELL is passed in as last, then it means paint from + the first to the end. */ +void +BMFE_RefreshCells(MWContext* context, + int32 first, + int32 last, + XP_Bool now) +{ +} + +/* Make sure that the given entry is visible. */ +void +BMFE_ScrollIntoView(MWContext* context, + BM_Entry* entry) +{ +} + +/* Save the given bucket o' bits as the clipboard. This same bucket needs to + be returned later if BMFE_GetClipContents() is called. */ +void +BMFE_SetClipContents(MWContext* context, + void* buffer, + int32 length) +{ +} + +/* Resize the widget to accomodate "visibleCount" number of entries vertically + and the width of widest entry the actual widget should NOT change size, just + the size of the scrollable area under it */ +void +BMFE_SyncDisplay(MWContext* context) +{ +} + +/* We're in the process of doing a What's Changed operation. The What's + Changed window should update to display the URL, the percentage (calculate + as done*100/total), and the total estimated time (given here as a + pre-formatted string). The What's Changed window should end up looking + something like this: + + Checking ... (<13> left) + {===================== } (progress bar) + + Estimated time remaining: <2 hours 13 minutes> + (Remaining time depends on the sites selected and + the network traffic). + + + [ Cancel ] + + It's up to the FE to notice the first time this is called and change its + window to display the info instead of the initial What's Changed screen. + + If the user ever hits Cancel (or does something equivilant, like destroys + the window), the FE must call BM_CancelWhatsChanged(). */ + +void +BMFE_UpdateWhatsChanged(MWContext* context, + const char* url, /* If NULL, just display + "Checking..." */ + int32 done, + int32 total, + const char* totaltime) +{ +} + + diff --git a/cmd/ybfe/src/ybctxt.c b/cmd/ybfe/src/ybctxt.c new file mode 100644 index 000000000000..b5743115e13f --- /dev/null +++ b/cmd/ybfe/src/ybctxt.c @@ -0,0 +1,664 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybctxt.c --- yb fe handling of MWContext initialization. +*/ + +#include "structs.h" +#include "ntypes.h" +#include "xpassert.h" +#include "proto.h" +#include "fe_proto.h" + +#include "ybform.h" + +static MWContext* +YBFE_CreateNewDocWindow(MWContext *calling_context, + URL_Struct *URL) +{ + return NULL; +} + +static void +YBFE_LayoutNewDocument(MWContext *context, + URL_Struct *url_struct, + int32 *iWidth, + int32 *iHeight, + int32 *mWidth, + int32 *mHeight) +{ +} + +static void +YBFE_SetDocTitle (MWContext * context, + char * title) +{ +} + +static void +YBFE_FinishedLayout (MWContext *context) +{ +} + +static char* +YBFE_TranslateISOText (MWContext * context, + int charset, + char *ISO_Text) +{ + return NULL; +} + +static int +YBFE_GetTextInfo (MWContext * context, + LO_TextStruct *text, + LO_TextInfo *text_info) +{ + return -1; +} + +static void +YBFE_GetEmbedSize (MWContext * context, + LO_EmbedStruct *embed_struct, + NET_ReloadMethod force_reload) +{ +} + +static void +YBFE_GetJavaAppSize (MWContext * context, + LO_JavaAppStruct *java_struct, + NET_ReloadMethod force_reload) +{ +} + +static void +YBFE_FreeEmbedElement (MWContext *context, + LO_EmbedStruct *embed) +{ +} + +static void +YBFE_FreeJavaAppElement (MWContext *context, + struct LJAppletData *appletData) +{ +} + +static void +YBFE_HideJavaAppElement (MWContext *context, + struct LJAppletData *java_app) +{ +} + +static void +YBFE_FreeEdgeElement (MWContext *context, + LO_EdgeStruct *edge) +{ +} + +static void +YBFE_FormTextIsSubmit (MWContext * context, + LO_FormElementStruct * form_element) +{ +} + +static void +YBFE_DisplaySubtext (MWContext * context, + int iLocation, + LO_TextStruct *text, + int32 start_pos, + int32 end_pos, + XP_Bool need_bg) +{ +} + +static void +YBFE_DisplayText (MWContext * context, + int iLocation, + LO_TextStruct *text, + XP_Bool need_bg) +{ +} + +static void +YBFE_DisplayEmbed (MWContext * context, + int iLocation, + LO_EmbedStruct *embed_struct) +{ +} + + +static void +YBFE_DisplayJavaApp (MWContext * context, + int iLocation, + LO_JavaAppStruct *java_struct) +{ +} + +static void +YBFE_DisplayEdge (MWContext * context, + int iLocation, + LO_EdgeStruct *edge_struct) +{ +} + +static void +YBFE_DisplayTable (MWContext * context, + int iLocation, + LO_TableStruct *table_struct) +{ +} + +static void +YBFE_DisplayCell (MWContext * context, + int iLocation, + LO_CellStruct *cell_struct) +{ +} + +static void +YBFE_DisplaySubDoc (MWContext * context, + int iLocation, + LO_SubDocStruct *subdoc_struct) +{ +} + +static void +YBFE_DisplayLineFeed (MWContext * context, + int iLocation , + LO_LinefeedStruct *line_feed, + XP_Bool need_bg) +{ +} + +static void +YBFE_DisplayHR (MWContext * context, + int iLocation , + LO_HorizRuleStruct *HR_struct) +{ +} + +static void +YBFE_DisplayBullet (MWContext *context, + int iLocation, + LO_BullettStruct *bullet) +{ +} + +static void +YBFE_DisplayFormElement (MWContext * context, + int iLocation, + LO_FormElementStruct * form_element) +{ +} + +static void +YBFE_DisplayBorder (MWContext *context, + int iLocation, + int x, + int y, + int width, + int height, + int bw, + LO_Color *color, + LO_LineStyle style) +{ +} + +static void +YBFE_DisplayFeedback (MWContext *context, + int iLocation, + LO_Element *element) +{ +} + +static void +YBFE_ClearView (MWContext * context, + int which) +{ +} + +static void +YBFE_SetDocDimension (MWContext *context, + int iLocation, + int32 iWidth, + int32 iLength) +{ +} + +static void +YBFE_SetDocPosition (MWContext *context, + int iLocation, + int32 iX, + int32 iY) +{ +} + +static void +YBFE_GetDocPosition (MWContext *context, + int iLocation, + int32 *iX, + int32 *iY) +{ +} + +static void +YBFE_BeginPreSection (MWContext *context) +{ +} + +static void +YBFE_EndPreSection (MWContext *context) +{ +} + +static void +YBFE_Progress(MWContext *context, + const char *msg) +{ +} + +static void +YBFE_SetProgressBarPercent (MWContext *context, + int32 percent) +{ +} + +static void +YBFE_SetBackgroundColor (MWContext *context, + uint8 red, + uint8 green, + uint8 blue) +{ +} + +static void +YBFE_SetCallNetlibAllTheTime (MWContext * win_id) +{ +} + +static void +YBFE_ClearCallNetlibAllTheTime (MWContext * win_id) +{ +} + +static void +YBFE_GraphProgressInit (MWContext *context, + URL_Struct *URL_s, + int32 content_length) +{ +} + +static void +YBFE_GraphProgressDestroy (MWContext *context, + URL_Struct *URL_s, + int32 content_length, + int32 total_bytes_read) +{ +} + +static void +YBFE_GraphProgress (MWContext *context, + URL_Struct *URL_s, + int32 bytes_received, + int32 bytes_since_last_time, + int32 content_length) +{ +} + +static XP_Bool +YBFE_UseFancyFTP (MWContext * window_id) +{ + return FALSE; +} + +static XP_Bool +YBFE_UseFancyNewsgroupListing (MWContext *window_id) +{ + return FALSE; +} + +static int +YBFE_FileSortMethod (MWContext * window_id) +{ + return -1; +} + +static XP_Bool +YBFE_ShowAllNewsArticles (MWContext *window_id) +{ + return FALSE; +} + +static void +YBFE_Alert(MWContext *context, + const char *msg) +{ +} + +static XP_Bool +YBFE_Confirm(MWContext * context, + const char * Msg) +{ + return FALSE; +} + +static char* +YBFE_Prompt(MWContext * context, + const char * Msg, + const char * dflt) +{ + return NULL; +} + +static char* +YBFE_PromptWithCaption(MWContext * context, + const char *caption, + const char * Msg, + const char * dflt) +{ + return NULL; +} + +static XP_Bool +YBFE_PromptUsernameAndPassword (MWContext *context, + const char * message, + char **username, + char **password) +{ + return FALSE; +} + +static char* +YBFE_PromptPassword(MWContext * context, + const char * Msg) +{ + return NULL; +} + +static void +YBFE_EnableClicking(MWContext* context) +{ +} + +static void +YBFE_AllConnectionsComplete(MWContext * context) +{ +} + +static void +YBFE_EraseBackground (MWContext * context, + int iLocation, + int32 x, + int32 y, + uint32 width, + uint32 height, + LO_Color *bg) +{ +} + +static void +YBFE_SetDrawable (MWContext *context, + CL_Drawable *drawable) +{ +} + +static void +YBFE_GetTextFrame (MWContext *context, + LO_TextStruct *text, + int32 start, + int32 end, + XP_Rect *frame) +{ +} + +/* these functions are to allow dealyed native window applet creation and transparent applet */ +static void +YBFE_HandleClippingView (MWContext *pContext, + struct LJAppletData *appletD, + int x, + int y, + int width, + int height) +{ +} + +static void +YBFE_DrawJavaApp (MWContext *pContext, + int iLocation, + LO_JavaAppStruct *pJava) +{ +} + +static ContextFuncs _ybfe_funcs = { +#define FE_DEFINE(func, returns, args) YBFE##_##func, +#include "mk_cx_fn.h" +}; + +MWContext* +YBFE_CreateMWContext() +{ + MWContext *context = XP_NewContext(); + + XP_ASSERT(context); + if (!context) return NULL; + + context->funcs = &_ybfe_funcs; + + return context; +} + +int32 +FE_GetContextID(MWContext *window_id) +{ +} + +MWContext* +FE_GetInitContext() +{ +} + +MWContext* +FE_MakeNewWindow(MWContext *old_context, + URL_Struct *url, + char *window_name, + Chrome *chrome) +{ +} + +void +FE_DestroyWindow(MWContext *context) +{ +} + +void +FE_UpdateStopState(MWContext *context) +{ +} + +void +FE_UpdateChrome(MWContext *window, + Chrome *chrome) +{ +} + +void +FE_QueryChrome(MWContext *window, + Chrome *chrome) +{ +} + +void +FE_BackCommand(MWContext *context) +{ +} + +void +FE_ForwardCommand(MWContext *context) +{ +} + +void +FE_HomeCommand(MWContext *context) +{ +} + +void +FE_PrintCommand(MWContext *context) +{ +} + +XP_Bool +FE_FindCommand(MWContext *context, + char *text, + XP_Bool case_sensitive, + XP_Bool backwards, + XP_Bool wrap) +{ +} + +void +FE_GetWindowOffset(MWContext *pContext, + int32 *sx, + int32 *sy) +{ +} + +void +FE_GetScreenSize(MWContext *pContext, + int32 *sx, + int32 *sy) +{ +} + +void +FE_GetAvailScreenRect(MWContext *pContext, + int32 *sx, + int32 *sy, + int32 *left, + int32 *top) +{ +} + +void +FE_GetPixelAndColorDepth(MWContext *pContext, + int32 *pixelDepth, + int32 *colorDepth) +{ +} + +void +FE_ShiftImage (MWContext *context, + LO_ImageStruct *lo_image) +{ +} + +void +FE_ScrollDocTo (MWContext *context, + int iLocation, + int32 x, + int32 y) +{ +} + +void +FE_ScrollDocBy (MWContext *context, + int iLocation, + int32 x, + int32 y) +{ +} + +int +FE_GetURL (MWContext *context, + URL_Struct *url) +{ +} + +void +FE_SetRefreshURLTimer(MWContext *context, + uint32 seconds, + char *refresh_url) +{ +} + +int +FE_EnableBackButton(MWContext* context) +{ +} + +int +FE_EnableForwardButton(MWContext* context) +{ +} + +int +FE_DisableBackButton(MWContext* context) +{ +} + +int +FE_DisableForwardButton(MWContext* context) +{ +} + +MWContext * +FE_MakeBlankWindow(MWContext *old_context, + URL_Struct *url, + char *window_name) +{ +} + +void +FE_SetWindowLoading(MWContext *context, + URL_Struct *url, + Net_GetUrlExitFunc **exit_func) +{ +} + +void +FE_RaiseWindow(MWContext *context) +{ +} + +void +FE_ConnectToRemoteHost(MWContext* ctxt, + int url_type, + char* hostname, + char* port, + char* username) +{ +} + +void* +FE_AboutData(const char* which, + char** data_ret, + int32* length_ret, + char** content_type_ret) +{ +} + +void +FE_FreeAboutData(void* data, + const char* which) +{ +} + +XP_Bool +FE_IsNetcasterInstalled() +{ +} diff --git a/cmd/ybfe/src/ybdlgs.c b/cmd/ybfe/src/ybdlgs.c new file mode 100644 index 000000000000..a405ae2682e0 --- /dev/null +++ b/cmd/ybfe/src/ybdlgs.c @@ -0,0 +1,240 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybdlgs.c --- yb fe handling of dialog requests from backend (prompt for + password, alerts, messages, etc.) +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" +#include "fe_proto.h" + +/* +** FE_Alert - put up an alert dialog containing the given msg, over +** context. +** +** This method should return immediately, without waiting for user +** input. +*/ +void +FE_Alert(MWContext *context, + const char *msg) +{ +} + +/* +** FE_Message - put up an information dialog containing the given msg, +** over context. +** +** This method should return immediately, without waiting for user +** input. +*/ +void +FE_Message(MWContext *context, + const char *msg) +{ +} + + +/* +** FE_Confirm - Put up an confirmation dialog (with Yes and No +** buttons) and return TRUE if Yes/Ok was clicked and FALSE if +** No/Cancel was clicked. +** +** This method should not return until the user has clicked on one of +** the buttons. +*/ +Bool +FE_Confirm(MWContext *context, + const char *msg) +{ +} + +/* +** FE_Prompt - Put up a prompt dialog with the given message, a text +** field (with the value defaulted to dflt). The user's response +** should be returned. +** +** This method should not return until the user has clicked Ok (the +** return value should not be NULL) or they clicked Cancel (the return +** value should be NULL.) +*/ +char* +FE_Prompt(MWContext *context, + const char *msg, + const char *dflt) +{ +} + +/* +** FE_PromptPassword - Put up a prompt dialog with the given message, +** a text field. The user's response should be returned. +** +** The text field should not show the characters as the user types them. +** Display them as X's, *'s, spaces, etc. +** +** This method should not return until the user has clicked Ok (the +** return value should not be NULL) or they clicked Cancel (the return +** value should be NULL.) +*/ +char* +FE_PromptPassword(MWContext *context, + const char *msg) +{ +} + +/* +** FE_PromptMessageSubject - Put up a prompt dialog with the given +** message, a text field. The user's response should be returned. +** +** The default value in the text field should be "(No Subject)", +** localized to the user's locale. +** +** This method should not return until the user has clicked Ok (the +** return value should not be NULL) or they clicked Cancel (the return +** value should be NULL.) +*/ +char* +FE_PromptMessageSubject(MWContext *context) +{ +} + +/* +** FE_PromptUsernameAndPassword - Put up a prompt dialog with the given +** message, a two text fields. It should return TRUE if Ok was clicked +** and FALSE if Cancel was clicked. +** +** The password text field should not show the characters as the user +** types them. Display them as X's, *'s, spaces, etc. +** +** This method should not return until the user has clicked Ok or Cancel. +*/ +Bool +FE_PromptUsernameAndPassword(MWContext *context, + const char *msg, + char **username, + char **password) +{ +} + + +/* +** FE_PromptForFileNam - Put up a file selection dialog with the given +** prompt string, +** +** the file selection box should open up viewing default_path. +** +** if file_must_exist_p, the user should not be allowed to close the +** dialog with an invalid path selected. +** +** if directories_allowed_p, directories can be selected. +** +** After the user has clicked ok or cancel or given some other gesture +** to bring down the filesb, the ReadFileNameCallbackFunction should +** be called with the context, the textual path name, and the closure, as in +** 'fn(context, path, closure);' +** +** Lastly, the function should return 0 if the path was acceptable and -1 if it +** was not. +** +** This method should not return until the user has clicked Ok or Cancel. +*/ +int +FE_PromptForFileName(MWContext *context, + const char *prompt_string, + const char *default_path, + XP_Bool file_must_exist_p, + XP_Bool directories_allowed_p, + ReadFileNameCallbackFunction fn, + void *closure) +{ +} + +/* +** FE_SaveDialog - Put up a dialog that basically says "I'm saving +** right now", cancel? +** +** This function should not block, but should return after putting up the dialog. +** +** If the user clicks cancel, the callback should call EDT_SaveCancel. +** +** Note: This function has been overloaded for use in publishing as well. There +** are three instances where this function will be called: +** 1) Saving remote files to disk. +** 2) Preparing to publish files remotely. +** 3) Publishing files to a remote server. +*/ +void +FE_SaveDialogCreate(MWContext *context, + int file_count, + ED_SaveDialogType save_type) +{ +} + +/* +** FE_SaveDialogSetFilename - for a save dialog that has been put up above the given +** context, set the filename being saved/published. +*/ +void +FE_SaveDialogSetFilename(MWContext *context, + char *filename) +{ +} + +/* +** FE_SaveDialogDestroy - the backend calls this function to let us +** know that the save/publish operation has completed. We should +** destroy the save dialog that has been used above the given context. +*/ +void +FE_SaveDialogDestroy(MWContext *context, + int status, + char *filename) +{ +} + +/* +** FE_SaveFileExistsDialog - put up the standard dialog saying: +** " exists - overwrite?" Yes to All, Yes, No, No to All. +** +** return ED_SAVE_OVERWRITE_THIS if the user clicks Yes. +** return ED_SAVE_OVERWRITE_ALL if the user clicks Yes to All. +** return ED_SAVE_DONT_OVERWRITE_THIS if the user clicks No. +** return ED_SAVE_DONT_OVERWRITE_ALL if the user clicks No to All. +*/ +ED_SaveOption +FE_SaveFileExistsDialog(MWContext *context, + char *filename) +{ +} + +/* +** FE_SaveErrorContinueDialog - put up a dialog that gives some +** textual represenation of the error status, and allow the user +** to decide if they want to continue or not. +** +** Return TRUE if we should continue, and FALSE if we shouldn't. +*/ +Bool +FE_SaveErrorContinueDialog(MWContext *context, + char *filename, + ED_FileError error) +{ +} diff --git a/cmd/ybfe/src/ybedit.c b/cmd/ybfe/src/ybedit.c new file mode 100644 index 000000000000..2a7fd0123879 --- /dev/null +++ b/cmd/ybfe/src/ybedit.c @@ -0,0 +1,158 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybedit.c --- yb functions for fe + specific editor stuff. +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" +#include "edttypes.h" +#include "edt.h" + +void +FE_DisplayTextCaret(MWContext* context, + int loc, + LO_TextStruct* text_data, + int char_offset) +{ +} + +void +FE_DisplayImageCaret(MWContext* context, + LO_ImageStruct* pImageData, + ED_CaretObjectPosition caretPos) +{ +} + +void +FE_DisplayGenericCaret(MWContext* context, + LO_Any* pLoAny, + ED_CaretObjectPosition caretPos) +{ +} + +Bool +FE_GetCaretPosition(MWContext* context, + LO_Position* where, + int32* caretX, + int32* caretYLow, + int32* caretYHigh) +{ +} + +void +FE_DestroyCaret(MWContext* pContext) +{ +} + +void +FE_ShowCaret(MWContext* pContext) +{ +} + +void +FE_DocumentChanged(MWContext* context, + int32 iStartY, + int32 iHeight) +{ +} + +MWContext* +FE_CreateNewEditWindow(MWContext* pContext, + URL_Struct* pURL) +{ +} + +char* +FE_URLToLocalName(char* url) +{ +} + +void +FE_EditorDocumentLoaded(MWContext* context) +{ +} + +void +FE_GetDocAndWindowPosition(MWContext * context, + int32 *pX, + int32 *pY, + int32 *pWidth, + int32 *pHeight) +{ +} + +void +FE_SetNewDocumentProperties(MWContext* context) +{ +} + +Bool +FE_CheckAndSaveDocument(MWContext* context) +{ +} + +Bool +FE_CheckAndAutoSaveDocument(MWContext *context) +{ +} + +void +FE_FinishedSave(MWContext* context, + int status, + char *pDestURL, + int iFileNumber) +{ +} + +char * +XP_BackupFileName (const char *url) +{ +} + +Bool +XP_ConvertUrlToLocalFile (const char *url, + char **localName) +{ +} + +void +FE_ImageLoadDialog(MWContext* context) +{ +} + +void +FE_ImageLoadDialogDestroy(MWContext* context) +{ +} + +void +FE_DisplayAddRowOrColBorder(MWContext * pMWContext, + XP_Rect *pRect, + XP_Bool bErase) +{ +} + +void +FE_DisplayEntireTableOrCell(MWContext * pMWContext, + LO_Element * pLoElement) +{ +} diff --git a/cmd/ybfe/src/ybenc.c b/cmd/ybfe/src/ybenc.c new file mode 100644 index 000000000000..bcaa9b671196 --- /dev/null +++ b/cmd/ybfe/src/ybenc.c @@ -0,0 +1,23 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybenc.c --- encoding stuff specific to the yb fe. +*/ + +char **fe_encoding_extensions = 0; /* gag. used by mkcache.c. */ diff --git a/cmd/ybfe/src/ybform.c b/cmd/ybfe/src/ybform.c new file mode 100644 index 000000000000..13ba2546ba97 --- /dev/null +++ b/cmd/ybfe/src/ybform.c @@ -0,0 +1,199 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybform.c --- yb functions dealing with front-end + handling of form elements. +*/ + +#include "ybform.h" + +/* +** FE_GetFormElementInfo - create the FE representation of a form +** element. +** +** Note : This method can be called more than once for the same front +** end form element. +** +** In those cases we don't reallocate the FEData*, and also don't +** recreate the widget, but we do set the form and context pointers in +** FEData, and we call the get_size method. +** +** Two cases I know of where layout calls this function more than once +** are: 1) when laying out a table with form elements in it -- layout +** moves our fe data over to a new LO_FormElementStruct. So, you +** should always sync up pointers to the LO_FormElementStruct +** contained in your fe data. 2) when we're on a page with frames in +** it and the user goes back and forth. In this case, the context is +** different, so you always need to sync that up as well. +** +** Also, layout could have told us to hide the widget without freeing +** our fe_data* (this happens when hide is TRUE in +** FE_GetFormElementValue.) In this case, we need to do anything +** necessary to show the widget again. +** +** Also, this routine is responsible for setting the initial value of +** the form element. +** +** yuck. :) +*/ +void +YBFE_GetFormElementInfo (MWContext * context, + LO_FormElementStruct * form_element) +{ +} + + +/* +** FE_GetFormElementValue - copy the value inside the fe +** representation into the FormElementStruct. +** +** if hide is TRUE, hide the form element after doing the copy. In +** the XFE, hide is taken to mean "delete" - so, if hide is TRUE, the +** XFE deletes the form element widget. This is not strictly +** necessary, as you are guaranteed to have FE_FreeFormElement if the +** form element is *really* going away. +** +** But, given that this is called with hide == TRUE in the face of +** going back and forth in frame documents, it's probably safer to +** always delete the widget when hide == TRUE, as the widget's parent +** is destroyed and recreated. +*/ +void +YBFE_GetFormElementValue (MWContext * context, + LO_FormElementStruct * form_element, + XP_Bool hide) +{ +} + +/* +** FE_ResetFormElement - reset the value of the form element to the default +** value stored in the LO_FormElementStruct. +*/ +void +YBFE_ResetFormElement (MWContext * context, + LO_FormElementStruct * form_element) +{ +} + +/* +** FE_SetFormElementToggle - set the toggle or radio button's state to +** the toggle parameter. +** +** only called on CHECKBOX and RADIO form elements. +*/ +void +YBFE_SetFormElementToggle (MWContext * context, + LO_FormElementStruct * form_element, + XP_Bool toggle) +{ +} + +/* +** FE_FreeFormElement - free up all memory associated with the front +** end representation for this form element. +*/ +void +FE_FreeFormElement(MWContext *context, + LO_FormElementData *form) +{ +} + +/* +** FE_BlurInputElement - force input to be defocused from the given +** element. It's ok if the element didn't have the input focus. +*/ +void +FE_BlurInputElement(MWContext *context, + LO_Element *element) +{ +} + +/* +** FE_FocusInputElement - force input to be focused on the given element. +** It's ok if the element already has the input focus. +*/ +void +FE_FocusInputElement(MWContext *context, + LO_Element *element) +{ +} + +/* +** FE_SelectInputElement - select the contents of a form element. +** +** Only called on TEXT, TEXTAREA, PASSWORD, and FILE form elements (anything +** with text in it.) +** +** This function should select the entire text contained in the FE widget. +*/ +void +FE_SelectInputElement(MWContext *context, + LO_Element *element) +{ +} + +/* +** FE_ClickInputElement - Simulate a click on a form element. +** +** Note: This function also handles clicks on HREF anchored LO_IMAGE +** and LO_TEXT LO_Elements. In these cases, this function should +** simulate a user clicking on the LO_Element in question. +*/ +void +FE_ClickInputElement(MWContext *context, + LO_Element *element) +{ +} + +/* +** FE_ChangeInputElement - handle change in form element value(s) +** +** This function should update the front end value for a given form +** element, including (in the case of TEXT-like elements) just the +** value, or (in the case of SELECT elements) both the list of +** allowable values as well as the selected value. +*/ +void +FE_ChangeInputElement(MWContext *context, + LO_Element *element) +{ +} + +/* +** FE_SubmitInputElement - +** +** Tell the FE that a form is being submitted without a UI gesture indicating +** that fact, i.e., in a Mocha-automated fashion ("document.myform.submit()"). +** The FE is responsible for emulating whatever happens when the user hits the +** submit button, or auto-submits by typing Enter in a single-field form. +*/ +void +FE_SubmitInputElement(MWContext *context, + LO_Element *element) +{ +} + +int +FE_ClickAnyElement(MWContext *context, + LO_Element *element, + int haveXY, + int32 xx, + int32 yy) +{ +} diff --git a/cmd/ybfe/src/ybform.h b/cmd/ybfe/src/ybform.h new file mode 100644 index 000000000000..b0b74b5259e9 --- /dev/null +++ b/cmd/ybfe/src/ybform.h @@ -0,0 +1,32 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" + +XP_BEGIN_PROTOS + +extern void YBFE_GetFormElementInfo (MWContext * context, LO_FormElementStruct * form_element); +extern void YBFE_GetFormElementValue (MWContext * context, LO_FormElementStruct * form_element, + XP_Bool hide); +extern void YBFE_ResetFormElement (MWContext * context, LO_FormElementStruct * form_element); +extern void YBFE_SetFormElementToggle (MWContext * context, LO_FormElementStruct * form_element, + XP_Bool toggle); + +XP_END_PROTOS diff --git a/cmd/ybfe/src/ybgrid.c b/cmd/ybfe/src/ybgrid.c new file mode 100644 index 000000000000..c2ec9f18f4a4 --- /dev/null +++ b/cmd/ybfe/src/ybgrid.c @@ -0,0 +1,79 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybgrid.c --- yb fe handling of Grid windows + (FRAMESET's and FRAME). +*/ + +#include "structs.h" +#include "ntypes.h" +#include "xpassert.h" +#include "proto.h" +#include "fe_proto.h" + +void +FE_LoadGridCellFromHistory(MWContext *context, + void *hist, + NET_ReloadMethod force_reload) +{ +} + +void* +FE_FreeGridWindow(MWContext *context, + XP_Bool save_history) +{ +} + +void +FE_RestructureGridWindow(MWContext *context, + int32 x, + int32 y, + int32 width, + int32 height) +{ +} + +MWContext * +FE_MakeGridWindow(MWContext *old_context, + void *hist_list, + void *history, + int32 x, + int32 y, + int32 width, + int32 height, + char *url_str, + char *window_name, + int8 scrolling, + NET_ReloadMethod force_reload, + Bool no_edge) +{ +} + +void +FE_GetFullWindowSize(MWContext *context, + int32 *width, + int32 *height) +{ +} + +void +FE_GetEdgeMinSize(MWContext *context, + int32 *size) +{ +} diff --git a/cmd/ybfe/src/ybhelp.c b/cmd/ybfe/src/ybhelp.c new file mode 100644 index 000000000000..ab0faa2c2922 --- /dev/null +++ b/cmd/ybfe/src/ybhelp.c @@ -0,0 +1,34 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* + ybhelp.c --- yb fe stuff for NetHelp. +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" + +char * +FE_GetNetHelpDir() +{ +} + +MWContext * +FE_GetNetHelpContext() +{ +} diff --git a/cmd/ybfe/src/ybimg.c b/cmd/ybfe/src/ybimg.c new file mode 100644 index 000000000000..5f3ebb234e6c --- /dev/null +++ b/cmd/ybfe/src/ybimg.c @@ -0,0 +1,92 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybimg.c --- yb functions for fe + specific images stuff. +*/ + +#define JMC_INIT_IMGCB_ID + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" + +#include "libimg.h" +#include "il_util.h" +#include "prtypes.h" + +JMC_PUBLIC_API(void) +_IMGCB_init(struct IMGCB* self, JMCException* *exception) +{ +} + +JMC_PUBLIC_API(void*) +_IMGCB_getBackwardCompatibleInterface(struct IMGCB* self, + const JMCInterfaceID* iid, + JMCException* *exception) +{ +} + +JMC_PUBLIC_API(void) +_IMGCB_NewPixmap(IMGCB* img_cb, jint op, void *dpy_cx, jint width, jint height, + IL_Pixmap *image, IL_Pixmap *mask) +{ +} + +JMC_PUBLIC_API(void) +_IMGCB_UpdatePixmap(IMGCB* img_cb, jint op, void* dpy_cx, IL_Pixmap* pixmap, + jint x_offset, jint y_offset, jint width, jint height) +{ +} + +JMC_PUBLIC_API(void) +_IMGCB_ControlPixmapBits(IMGCB* img_cb, jint op, void* dpy_cx, + IL_Pixmap* pixmap, IL_PixmapControl message) +{ +} + +JMC_PUBLIC_API(void) +_IMGCB_DestroyPixmap(IMGCB* img_cb, jint op, void* dpy_cx, IL_Pixmap* pixmap) +{ +} + +JMC_PUBLIC_API(void) +_IMGCB_DisplayPixmap(IMGCB* img_cb, jint op, void* dpy_cx, IL_Pixmap* image, + IL_Pixmap* mask, jint x, jint y, jint x_offset, + jint y_offset, jint width, jint height) +{ +} + +JMC_PUBLIC_API(void) +_IMGCB_GetIconDimensions(IMGCB* img_cb, jint op, void* dpy_cx, int* width, + int* height, jint icon_number) +{ +} +JMC_PUBLIC_API(void) +_IMGCB_DisplayIcon(IMGCB* img_cb, jint op, void* dpy_cx, jint x, jint y, + jint icon_number) +{ +} + +/* Mocha image group observer callback. */ +void +FE_MochaImageGroupObserver(XP_Observable observable, XP_ObservableMsg message, + void *message_data, void *closure) +{ +} diff --git a/cmd/ybfe/src/yblay.c b/cmd/ybfe/src/yblay.c new file mode 100644 index 000000000000..9d702bf63300 --- /dev/null +++ b/cmd/ybfe/src/yblay.c @@ -0,0 +1,49 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybedit.c --- yb functions for fe + specific editor stuff. +*/ + +#include "libimg.h" /* Image Library public API. */ +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" +#include "lo_ele.h" + +void +FE_ReleaseTextAttrFeData(MWContext *context, + LO_TextAttr *attr) +{ +} + +PRBool +FE_HandleLayerEvent(MWContext *context, + CL_Layer *layer, + CL_Event *event) +{ +} + +PRBool +FE_HandleEmbedEvent(MWContext *context, + LO_EmbedStruct *embed, + CL_Event *event) +{ +} + diff --git a/cmd/ybfe/src/ybloc.c b/cmd/ybfe/src/ybloc.c new file mode 100644 index 000000000000..4cbdcb64f7cb --- /dev/null +++ b/cmd/ybfe/src/ybloc.c @@ -0,0 +1,108 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybloc.c --- yb fe handling of locale specific stuff. +*/ + +#include "xplocale.h" + +#include "structs.h" +#include "ntypes.h" +#include "xpassert.h" +#include "proto.h" +#include "fe_proto.h" + +#include "libi18n.h" + +#include "csid.h" + +/* +** FE_StrfTime - format a struct tm to a character string, depending +** on the value of the format parameter. +** +** Values for format (and their mapping to unix strftime format +** strings) include: +** +** XP_TIME_FORMAT - "%H:%M" +** XP_WEEKDAY_TIME_FORMAT - "%a %H:%M" +** XP_DATE_TIME_FORMAT - "%x %H:%M" +** XP_LONG_DATE_TIME_FORMAT - "%c" +** anything else - "%c" +*/ +size_t +FE_StrfTime(MWContext *context, + char *result, + size_t maxsize, + int format, + const struct tm *timeptr) +{ +} + +/* +** FE_StrColl - call into the platform specific strcoll function. +** +** Make sure strcoll() or equivalent works properly. For example, +** the XFE has a check to make sure it does work, and if it doesn't +** it defaults to strcasecmp. +*/ +int +FE_StrColl(const char *s1, const char *s2) +{ +} + +/* +** INTL_ResourceCharSet - return the ascii name for the locale's +** character set id. +** +** Use INTL_CharSetIDToName to retrieve the name given a CSID. +** +** Note: This is a silly function, IMO. It should just return the +** CSID, and the libi18n stuff could convert it to a name if it wants +** to. +*/ +char * +INTL_ResourceCharSet() +{ +} + +/* +** INTL_DefaultDocCharSetID - return the default character set id for +** a given context. +** +** It should first try to extract the csid from the document being shown in +** the context. using LO_GetDocumentCharacterSetInfo and INTL_GetCSIDocCSID. +** +** If this fails, and the user has specified an encoding (using the View|Encoding +** menu, is should return the CSID for that. +** +** Otherwise, it should return the FE's default preference for CSID. +*/ +int16 +INTL_DefaultDocCharSetID(MWContext *cxt) +{ +} + +/* +** INTL_Relayout - relayout a given context, as the character encoding +** has changed. +*/ +void +INTL_Relayout(MWContext *pContext) +{ +} diff --git a/cmd/ybfe/src/ybmail.c b/cmd/ybfe/src/ybmail.c new file mode 100644 index 000000000000..0f16f45892b9 --- /dev/null +++ b/cmd/ybfe/src/ybmail.c @@ -0,0 +1,203 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybmail.c --- yb functions for fe + specific mail/news stuff. +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" +#include "msgcom.h" +#include "addrbook.h" +#include "dirprefs.h" + +const char* +FE_UsersMailAddress() +{ +} + +const char* +FE_UsersFullName() +{ +} + +const char * +FE_UsersOrganization() +{ +} + +const char* +FE_UsersSignature() +{ +} + +void +FE_ListChangeStarting(MSG_Pane* pane, + XP_Bool asynchronous, + MSG_NOTIFY_CODE notify, + MSG_ViewIndex where, + int32 num) +{ +} + +void +FE_ListChangeFinished(MSG_Pane* pane, + XP_Bool asynchronous, + MSG_NOTIFY_CODE notify, + MSG_ViewIndex where, + int32 num) +{ +} + +void +FE_PaneChanged(MSG_Pane *pane, + XP_Bool asynchronous, + MSG_PANE_CHANGED_NOTIFY_CODE notify_code, + int32 value) +{ +} + +char* +FE_GetTempFileFor(MWContext* context, + const char* fname, + XP_FileType ftype, + XP_FileType* rettype) +{ +} + +void +FE_UpdateBiff(MSG_BIFF_STATE state) +{ +} + +uint32 +FE_DiskSpaceAvailable (MWContext* context, + const char* dir) +{ +} + +MSG_Pane* +FE_CreateCompositionPane(MWContext* old_context, + MSG_CompositionFields* fields, + const char* initialText, + MSG_EditorType editorType) +{ +} + +void +FE_UpdateCompToolbar(MSG_Pane* comppane) +{ +} + +void +FE_DestroyMailCompositionContext(MWContext* context) +{ +} + +MWContext* +FE_GetAddressBookContext(MSG_Pane* pane, + XP_Bool viewnow) +{ +} + +ABook* +FE_GetAddressBook(MSG_Pane* pane) +{ +} + +int +FE_ShowPropertySheetFor (MWContext* context, + ABID entryID, + PersonEntry* pPerson) +{ +} + +XP_List* +FE_GetDirServers(void) +{ +} + +MSG_Master* +FE_GetMaster() +{ +} + +XP_Bool +FE_IsAltMailUsed(MWContext* context) +{ +} + +int +FE_PromptIMAPSubscriptionUpgrade(MWContext* context) +{ +} + +XP_Bool +FE_CreateSubscribePaneOnHost(MSG_Master* master, + MWContext* parentContext, + MSG_Host* host) +{ +} + +const char * +FE_UsersRealMailAddress() +{ +} + +void +FE_RememberPopPassword(MWContext* context, + const char* password) +{ +} + +XP_Bool +FE_NewsDownloadPrompt(MWContext *context, + int32 numMessagesToDownload, + XP_Bool *downloadAll) +{ +} + +void +FE_MsgShowHeaders(MSG_Pane *pPane, + MSG_HEADER_SET mhsHeaders) +{ +} + +/* If we're set up to deliver mail/news by running a program rather + than by talking to SMTP/NNTP, this does it. + + Returns positive if delivery via program was successful; + Returns negative if delivery failed; + Returns 0 if delivery was not attempted (in which case we + should use SMTP/NNTP instead.) + + $NS_MSG_DELIVERY_HOOK names a program which is invoked with one argument, + a tmp file containing a message. (Lines are terminated with CRLF.) + This program is expected to parse the To, CC, BCC, and Newsgroups headers, + and effect delivery to mail and/or news. It should exit with status 0 + iff successful. + + #### This really wants to be defined in libmsg, but it wants to + be able to use fe_perror, so... + */ +int +msg_DeliverMessageExternally(MWContext *context, const char *msg_file) +{ +} diff --git a/cmd/ybfe/src/ybplug.c b/cmd/ybfe/src/ybplug.c new file mode 100644 index 000000000000..fbfaa93e23e2 --- /dev/null +++ b/cmd/ybfe/src/ybplug.c @@ -0,0 +1,65 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybplug.c --- yb functions for fe + specific plugin stuff. +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" +#include "nppg.h" + +void +FE_RegisterPlugins() +{ +} + +NPPluginFuncs* +FE_LoadPlugin(void *plugin, + NPNetscapeFuncs *funcs, + struct _np_handle* handle) +{ +} + +void +FE_UnloadPlugin(void *plugin) +{ +} + +void +FE_EmbedURLExit(URL_Struct *urls, + int status, + MWContext *cx) +{ +} + +void +FE_ShowScrollBars(MWContext *context, + XP_Bool show) +{ +} + +NPError +FE_PluginGetValue(void *pdesc, + NPNVariable variable, + void *r_value) +{ +} + diff --git a/cmd/ybfe/src/ybps.c b/cmd/ybfe/src/ybps.c new file mode 100644 index 000000000000..0ef1ce9653aa --- /dev/null +++ b/cmd/ybfe/src/ybps.c @@ -0,0 +1,42 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybps.c --- yb functions for fe + specific ps printing stuff. +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" + +/* Get the dimensions of an icon in pixels for the PostScript front end. */ +extern void +FE_GetPSIconDimensions(int icon_number, + int *width, + int *height) +{ +} + +/* Fill in the bits of an icon for the PostScript front end. */ +extern XP_Bool +FE_GetPSIconData(int icon_number, + IL_Pixmap *image, + IL_Pixmap *mask) +{ +} diff --git a/cmd/ybfe/src/ybrdf.c b/cmd/ybfe/src/ybrdf.c new file mode 100644 index 000000000000..8f4f735941fc --- /dev/null +++ b/cmd/ybfe/src/ybrdf.c @@ -0,0 +1,31 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* + ybrdf.c --- yb functions for fe + specific rdf stuff. +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" + +MWContext* +FE_GetRDFContext() +{ +} diff --git a/cmd/ybfe/src/ybrgn.c b/cmd/ybfe/src/ybrgn.c new file mode 100644 index 000000000000..ff04b81af236 --- /dev/null +++ b/cmd/ybfe/src/ybrgn.c @@ -0,0 +1,123 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* ybrgn.c --- yb functions dealing with front-end */ + +#include "fe_rgn.h" + +FE_Region +FE_CreateRegion() +{ +} + +FE_Region +FE_CreateRectRegion(XP_Rect *rect) +{ +} + +void +FE_DestroyRegion(FE_Region region) +{ +} + +FE_Region +FE_CopyRegion(FE_Region src, + FE_Region dst) +{ +} + +FE_Region +FE_SetRectRegion(FE_Region region, + XP_Rect *rect) +{ +} + +void +FE_IntersectRegion(FE_Region src1, + FE_Region src2, + FE_Region dst) +{ +} + +void +FE_UnionRegion(FE_Region src1, + FE_Region src2, + FE_Region dst) +{ +} + +void +FE_SubtractRegion(FE_Region src1, + FE_Region src2, + FE_Region dst) +{ +} + +XP_Bool +FE_IsEmptyRegion(FE_Region region) +{ +} + +void +FE_GetRegionBoundingBox(FE_Region region, + XP_Rect *bbox) +{ +} + +XP_Bool +FE_IsEqualRegion(FE_Region rgn1, + FE_Region rgn2) +{ +} + +void +FE_OffsetRegion(FE_Region region, + int32 xOffset, + int32 yOffset) +{ +} + +XP_Bool +FE_RectInRegion(FE_Region region, + XP_Rect *rect) +{ +} + +/* For each rectangle that makes up this region, call the func */ +void +FE_ForEachRectInRegion(FE_Region region, + FE_RectInRegionFunc func, + void * closure) +{ +} + +#ifdef DEBUG +void +FE_HighlightRect(void *context, + XP_Rect *rect, + int how_much) +{ +} + +void +FE_HighlightRegion(void *context, + FE_Region region, + int how_much) +{ +} +#endif /* DEBUG */ diff --git a/cmd/ybfe/src/ybsec.c b/cmd/ybfe/src/ybsec.c new file mode 100644 index 000000000000..c157c198b85b --- /dev/null +++ b/cmd/ybfe/src/ybsec.c @@ -0,0 +1,42 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* ybsec.c --- yb fe handling of FE security related stuff. */ + +#include "structs.h" +#include "ntypes.h" +#include "xpassert.h" +#include "proto.h" +#include "fe_proto.h" + +Bool +FE_SecurityDialog(MWContext* context, + int message, + XP_Bool* prefs_toggle) +{ +} + +void +FE_SecurityOptionsChanged(MWContext *context) +{ +} + +void +FE_SetPasswordEnabled(MWContext *context, PRBool usePW) +{ +} diff --git a/cmd/ybfe/src/ybstr.c b/cmd/ybfe/src/ybstr.c new file mode 100644 index 000000000000..025430dfcd6e --- /dev/null +++ b/cmd/ybfe/src/ybstr.c @@ -0,0 +1,28 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* ybstr.c --- yb fe handling of string id's */ + +#include "ntypes.h" + +extern char *XP_GetBuiltinString(int16 i); + +char * +XP_GetString(int16 i) +{ +} diff --git a/cmd/ybfe/src/ybtime.c b/cmd/ybfe/src/ybtime.c new file mode 100644 index 000000000000..bdfd79eca352 --- /dev/null +++ b/cmd/ybfe/src/ybtime.c @@ -0,0 +1,52 @@ +/* -*- 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.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ +/* ybtime.c --- yb functions dealing with front-end + timers and timeouts. +*/ + +#include "xp_core.h" +#include "structs.h" +#include "ntypes.h" +#include "fe_proto.h" + +/* +** FE_SetTimeout - Do whatever needs to be done to register a timeout to happen +** after msecs milliseconds. +** +** This function should return some unique ID for the timeout, or NULL +** if some operation fails. +** +** once the timeout has fired, it should not be fired again until +** re-registered. That is, if the FE maintains a list of timeouts, it +** should remove the timeout after it's fired. +*/ +void* +FE_SetTimeout(TimeoutCallbackFunction func, + void *closure, + uint32 msecs) +{ +} + +/* +** FE_ClearTimeout - Do whatever needs to happen to unregister a +** timeout, given it's ID. +*/ +void +FE_ClearTimeout(void *timer_id) +{ +}