summaryrefslogtreecommitdiffstats
path: root/kjsembed/tools
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit90825e2392b2d70e43c7a25b8a3752299a933894 (patch)
treee33aa27f02b74604afbfd0ea4f1cfca8833d882a /kjsembed/tools
downloadtdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz
tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kjsembed/tools')
-rw-r--r--kjsembed/tools/Doxyfile824
-rw-r--r--kjsembed/tools/README3
-rw-r--r--kjsembed/tools/coverage/README2
-rw-r--r--kjsembed/tools/coverage/allqobjects.txt145
-rw-r--r--kjsembed/tools/coverage/classes.js5
-rw-r--r--kjsembed/tools/coverage/coverage.sh7
-rw-r--r--kjsembed/tools/coverage/supported.txt71
-rw-r--r--kjsembed/tools/coverage/unsupported.js11
-rw-r--r--kjsembed/tools/coverage/unsupported.txt95
-rwxr-xr-xkjsembed/tools/create_bindings.sh23
-rw-r--r--kjsembed/tools/doxygen2cons_cpp.xsl99
-rw-r--r--kjsembed/tools/doxygen2cons_h.xsl79
-rw-r--r--kjsembed/tools/doxygen2imp_cpp.xsl299
-rw-r--r--kjsembed/tools/doxygen2imp_h.xsl86
-rw-r--r--kjsembed/tools/headers/qbrush.h91
-rw-r--r--kjsembed/tools/headers/qcanvas.h806
-rw-r--r--kjsembed/tools/headers/qdir.h246
-rw-r--r--kjsembed/tools/headers/qpen.h99
-rw-r--r--kjsembed/tools/headers/qtimer.h88
-rw-r--r--kjsembed/tools/xml/DO_NOT_PRUNE0
20 files changed, 3079 insertions, 0 deletions
diff --git a/kjsembed/tools/Doxyfile b/kjsembed/tools/Doxyfile
new file mode 100644
index 00000000..e2686a09
--- /dev/null
+++ b/kjsembed/tools/Doxyfile
@@ -0,0 +1,824 @@
+# Doxyfile 1.2.9.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = KJSEmbed
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
+# German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
+# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
+
+OUTPUT_LANGUAGE = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these class will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = YES
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = NO
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH =
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a class diagram (in Html and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off.
+
+CLASS_DIAGRAMS = YES
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower case letters. If set to YES upper case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# reimplements.
+
+INHERIT_DOCS = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consist of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT =
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = headers
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+FILE_PATTERNS = *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE = doxygen_fakes.h
+#EXCLUDE = customobject_imp.h jsfactory_imp.h jsproxy_imp.h \
+# kjsembedpart_imp.h jsbuiltin_imp.h \
+# jsobjectproxy_imp.h jsvalueproxy_imp.h \
+# doxygen_fakes.h
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS = *.moc.*
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse.
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX = KJSEmbed
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = NO
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = .
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript and frames is required (for instance Netscape 4.0+
+# or Internet explorer 4.0+).
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT =
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimised for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT =
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assigments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT =
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION =
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_XML = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = YES
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED = Q_PROPERTY()=
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermedate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
+
+# The CGI_NAME tag should be the name of the CGI script that
+# starts the search engine (doxysearch) with the correct parameters.
+# A script with this name will be generated by doxygen.
+
+CGI_NAME =
+
+# The CGI_URL tag should be the absolute URL to the directory where the
+# cgi binaries are located. See the documentation of your http daemon for
+# details.
+
+CGI_URL =
+
+# The DOC_URL tag should be the absolute URL to the directory where the
+# documentation is located. If left blank the absolute path to the
+# documentation, with file:// prepended to it, will be used.
+
+DOC_URL =
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the
+# documentation is located. If left blank the directory on the local machine
+# will be used.
+
+DOC_ABSPATH =
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
+# is installed.
+
+BIN_ABSPATH =
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to
+# documentation generated for other projects. This allows doxysearch to search
+# the documentation for these projects as well.
+
+EXT_DOC_PATHS =
diff --git a/kjsembed/tools/README b/kjsembed/tools/README
new file mode 100644
index 00000000..6cb7547e
--- /dev/null
+++ b/kjsembed/tools/README
@@ -0,0 +1,3 @@
+This directory contains work that will hopefully lead to automatic generation
+of the bindings.
+
diff --git a/kjsembed/tools/coverage/README b/kjsembed/tools/coverage/README
new file mode 100644
index 00000000..e6b57569
--- /dev/null
+++ b/kjsembed/tools/coverage/README
@@ -0,0 +1,2 @@
+A simplistic way to check which objects are supported by kjsembed and which
+are missing.
diff --git a/kjsembed/tools/coverage/allqobjects.txt b/kjsembed/tools/coverage/allqobjects.txt
new file mode 100644
index 00000000..853e9e1d
--- /dev/null
+++ b/kjsembed/tools/coverage/allqobjects.txt
@@ -0,0 +1,145 @@
+QAccel
+QAccessibleObject
+QAction
+QActionGroup
+QApplication
+QAquaStyle
+QAssistantClient
+QAxObject
+QAxWidget
+QBoxLayout
+QButton
+QButtonGroup
+QCDEStyle
+QCanvas
+QCanvasView
+QCheckBox
+QClipboard
+QColorDialog
+QColorDrag
+QComboBox
+QCommonStyle
+QCopChannel
+QDataBrowser
+QDataPump
+QDataTable
+QDataView
+QDateEdit
+QDateTimeEdit
+QDateTimeEditBase
+QDesktopWidget
+QDial
+QDialog
+QDns
+QDockArea
+QDockWindow
+QDoubleValidator
+QDragObject
+QEditorFactory
+QErrorMessage
+QEventLoop
+QFileDialog
+QFileIconProvider
+QFontDialog
+QFrame
+QFtp
+QGLWidget
+QGrid
+QGridLayout
+QGridView
+QGroupBox
+QHBox
+QHBoxLayout
+QHButtonGroup
+QHGroupBox
+QHeader
+QHttp
+QIconDrag
+QIconView
+QImageDrag
+QInputDialog
+QIntValidator
+QLCDNumber
+QLabel
+QLayout
+QLineEdit
+QListBox
+QListView
+QLocalFs
+QMacStyle
+QMainWindow
+QMenuBar
+QMessageBox
+QMotif
+QMotifDialog
+QMotifPlusStyle
+QMotifStyle
+QMotifWidget
+QMultiLineEdit
+QNPInstance
+QNPWidget
+QNetworkOperation
+QNetworkProtocol
+QObject
+QObjectCleanupHandler
+QPlatinumStyle
+QPopupMenu
+QProcess
+QProgressBar
+QProgressDialog
+QPushButton
+QRadioButton
+QRegExpValidator
+QSGIStyle
+QScrollBar
+QScrollView
+QServerSocket
+QSessionManager
+QSignal
+QSignalMapper
+QSizeGrip
+QSlider
+QSocket
+QSocketNotifier
+QSound
+QSpinBox
+QSplashScreen
+QSplitter
+QSqlDatabase
+QSqlDriver
+QSqlEditorFactory
+QSqlForm
+QStatusBar
+QStoredDrag
+QStyle
+QStyleSheet
+QTabBar
+QTabDialog
+QTabWidget
+QTable
+QTextBrowser
+QTextDrag
+QTextEdit
+QTextView
+QTimeEdit
+QTimer
+QToolBar
+QToolBox
+QToolButton
+QToolTipGroup
+QTranslator
+QUriDrag
+QUrlOperator
+QVBox
+QVBoxLayout
+QVButtonGroup
+QVGroupBox
+QValidator
+QWSKeyboardHandler
+QWidget
+QWidgetStack
+QWindowsStyle
+QWindowsXPStyle
+QWizard
+QWorkspace
+QXtWidget
diff --git a/kjsembed/tools/coverage/classes.js b/kjsembed/tools/coverage/classes.js
new file mode 100644
index 00000000..acd7206e
--- /dev/null
+++ b/kjsembed/tools/coverage/classes.js
@@ -0,0 +1,5 @@
+var classes = Factory.constructors().sort();
+
+// Print out the supported classes
+for ( var i=0 ; i < classes.length ; i++ )
+ print( classes[i]+'\n' );
diff --git a/kjsembed/tools/coverage/coverage.sh b/kjsembed/tools/coverage/coverage.sh
new file mode 100644
index 00000000..3b181bb3
--- /dev/null
+++ b/kjsembed/tools/coverage/coverage.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+KJSCMD='../../kjscmd'
+
+$KJSCMD classes.js > supported.txt
+$KJSCMD unsupported.js < allqobjects.txt > unsupported.txt
+
diff --git a/kjsembed/tools/coverage/supported.txt b/kjsembed/tools/coverage/supported.txt
new file mode 100644
index 00000000..dbf96951
--- /dev/null
+++ b/kjsembed/tools/coverage/supported.txt
@@ -0,0 +1,71 @@
+Config
+Dcop
+EvalError
+Image
+Line
+Movie
+NetAccess
+Painter
+Pen
+Pixmap
+PixmapLabel
+QBoxLayout
+QButtonGroup
+QCanvasView
+QCheckBox
+QComboBox
+QDataBrowser
+QDataTable
+QDataView
+QDateEdit
+QDateTimeEdit
+QDial
+QDialog
+QFrame
+QGrid
+QGroupBox
+QHBox
+QHBoxLayout
+QIconView
+QLCDNumber
+QLabel
+QLayout
+QLayoutWidget
+QLineEdit
+QListBox
+QListView
+QMainWindow
+QMultiLineEdit
+QObject
+QPopupMenu
+QProgressBar
+QPushButton
+QRadioButton
+QScrollBar
+QScrollView
+QSlider
+QSpinBox
+QSplitter
+QTabWidget
+QTable
+QTextBrowser
+QTextEdit
+QTextView
+QTimeEdit
+QTimer
+QToolBox
+QToolButton
+QVBox
+QVBoxLayout
+QWidget
+QWidgetStack
+QWizard
+RangeError
+ReferenceError
+SqlDatabase
+SqlQuery
+SyntaxError
+TextLabel
+TextStream
+TypeError
+URIError
diff --git a/kjsembed/tools/coverage/unsupported.js b/kjsembed/tools/coverage/unsupported.js
new file mode 100644
index 00000000..331849e2
--- /dev/null
+++ b/kjsembed/tools/coverage/unsupported.js
@@ -0,0 +1,11 @@
+
+var line = readLine();
+while ( line != null ) {
+ line = line.replace( /^ */g, '' );
+ line = line.replace( / *$/g, '' );
+
+ if ( !Factory.isSupported( line ) )
+ print( line + ' MISSING\n' );
+
+ line = readLine();
+}
diff --git a/kjsembed/tools/coverage/unsupported.txt b/kjsembed/tools/coverage/unsupported.txt
new file mode 100644
index 00000000..1ea2eb7b
--- /dev/null
+++ b/kjsembed/tools/coverage/unsupported.txt
@@ -0,0 +1,95 @@
+QAccel MISSING
+QAccessibleObject MISSING
+QAction MISSING
+QActionGroup MISSING
+QApplication MISSING
+QAquaStyle MISSING
+QAssistantClient MISSING
+QAxObject MISSING
+QAxWidget MISSING
+QButton MISSING
+QCDEStyle MISSING
+QCanvas MISSING
+QClipboard MISSING
+QColorDialog MISSING
+QColorDrag MISSING
+QCommonStyle MISSING
+QCopChannel MISSING
+QDataPump MISSING
+QDateTimeEditBase MISSING
+QDesktopWidget MISSING
+QDns MISSING
+QDockArea MISSING
+QDockWindow MISSING
+QDoubleValidator MISSING
+QDragObject MISSING
+QEditorFactory MISSING
+QErrorMessage MISSING
+QEventLoop MISSING
+QFileDialog MISSING
+QFileIconProvider MISSING
+QFontDialog MISSING
+QFtp MISSING
+QGLWidget MISSING
+QGridLayout MISSING
+QGridView MISSING
+QHButtonGroup MISSING
+QHGroupBox MISSING
+QHeader MISSING
+QHttp MISSING
+QIconDrag MISSING
+QImageDrag MISSING
+QInputDialog MISSING
+QIntValidator MISSING
+QLocalFs MISSING
+QMacStyle MISSING
+QMenuBar MISSING
+QMessageBox MISSING
+QMotif MISSING
+QMotifDialog MISSING
+QMotifPlusStyle MISSING
+QMotifStyle MISSING
+QMotifWidget MISSING
+QNPInstance MISSING
+QNPWidget MISSING
+QNetworkOperation MISSING
+QNetworkProtocol MISSING
+QObjectCleanupHandler MISSING
+QPlatinumStyle MISSING
+QProcess MISSING
+QProgressDialog MISSING
+QRegExpValidator MISSING
+QSGIStyle MISSING
+QServerSocket MISSING
+QSessionManager MISSING
+QSignal MISSING
+QSignalMapper MISSING
+QSizeGrip MISSING
+QSocket MISSING
+QSocketNotifier MISSING
+QSound MISSING
+QSplashScreen MISSING
+QSqlDatabase MISSING
+QSqlDriver MISSING
+QSqlEditorFactory MISSING
+QSqlForm MISSING
+QStatusBar MISSING
+QStoredDrag MISSING
+QStyle MISSING
+QStyleSheet MISSING
+QTabBar MISSING
+QTabDialog MISSING
+QTextDrag MISSING
+QToolBar MISSING
+QToolTipGroup MISSING
+QTranslator MISSING
+QUriDrag MISSING
+QUrlOperator MISSING
+QVButtonGroup MISSING
+QVGroupBox MISSING
+QValidator MISSING
+QWSKeyboardHandler MISSING
+QWindowsStyle MISSING
+QWindowsXPStyle MISSING
+QWorkspace MISSING
+QXtWidget MISSING
diff --git a/kjsembed/tools/create_bindings.sh b/kjsembed/tools/create_bindings.sh
new file mode 100755
index 00000000..54c65965
--- /dev/null
+++ b/kjsembed/tools/create_bindings.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+function bind_class()
+{
+ xsltproc doxygen2imp_h.xsl "xml/class$1.xml" > "$2_imp.h"
+ xsltproc doxygen2imp_cpp.xsl "xml/class$1.xml" > "$2_imp.cpp"
+ xsltproc doxygen2cons_h.xsl "xml/class$1.xml" > "$2_cons.h"
+ xsltproc doxygen2cons_cpp.xsl "xml/class$1.xml" > "$2_cons.cpp"
+}
+
+doxygen
+
+bind_class QComboBox qcombobox
+bind_class Qt qnamespace
+bind_class KPopupTitle kpopupmenu
+
+#bind_class QDir qdir
+#bind_class QListViewItem qlistview
+
+#bind_class QTimer qtimer
+#bind_class QBrush qbrush
+#bind_class QPen qpen
+#bind_class QPainter qpainter
diff --git a/kjsembed/tools/doxygen2cons_cpp.xsl b/kjsembed/tools/doxygen2cons_cpp.xsl
new file mode 100644
index 00000000..e352246f
--- /dev/null
+++ b/kjsembed/tools/doxygen2cons_cpp.xsl
@@ -0,0 +1,99 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text" />
+
+<xsl:template match="/doxygen/compounddef">
+<xsl:variable name="clazz" select="compoundname" />
+<xsl:variable name="consmeth" select="sectiondef/memberdef[@kind='function' and @prot='public']" />
+
+#include &lt;klocale.h>
+#include &lt;kjs/object.h>
+
+#include &lt;<xsl:value-of select="includes" />>
+#include "<xsl:value-of select="substring-before(includes,'.h')"/>_imp.h"
+
+/**
+ * Namespace containing the KJSEmbed library.
+ */
+namespace KJSEmbed {
+
+<!-- Select and invoke the correct constructor. -->
+KJS::Object <xsl:value-of select="$clazz" />Cons::construct( KJS::ExecState *exec, KJS::Object &amp;obj, const KJS::List &amp;args )
+{
+ switch( id ) {
+<xsl:for-each select="$consmeth">
+ <xsl:choose>
+ <xsl:when test="name = $clazz">
+ <xsl:variable name="cons_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:variable name="cons_id">Constructor_<xsl:value-of select="$cons_name" /></xsl:variable>
+ case <xsl:value-of select="$cons_id" />:
+ return <xsl:value-of select="$cons_name" />( exec, obj, args );
+ break;
+ </xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+ default:
+ break;
+ }
+
+ QString msg = i18n("<xsl:value-of select="$clazz" />Cons has no constructor with id '%1'").arg(id);
+ KJS::Object err = KJS::Error::create( exec, KJS::ReferenceError, msg.utf8() );
+ exec->setException( err );
+ return err;
+}
+
+<!-- Implementations of the constructors. -->
+<xsl:for-each select="$consmeth">
+ <xsl:choose>
+ <xsl:when test="name = $clazz">
+ <xsl:variable name="cons_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:variable name="cons_id">Constructor_<xsl:value-of select="$cons_name" /></xsl:variable>
+KJS::Object <xsl:value-of select="$clazz" />Cons::<xsl:value-of select="$cons_name" />( KJS::ExecState *exec, KJS::Object &amp;obj, const KJS::List &amp;args )
+{
+ <xsl:for-each select="param/type">
+ <xsl:choose>
+ <xsl:when test=". = 'QString'">
+ QString arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toString(exec).qstring() : QString::null;
+ </xsl:when>
+ <xsl:when test=". = 'const QString &amp;'">
+ QString arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toString(exec).qstring() : QString::null;
+ </xsl:when>
+ <xsl:when test=". = 'const char *'">
+ const char *arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toString(exec).ascii() : 0;
+ </xsl:when>
+ <xsl:when test=". = 'int'">
+ int arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toInteger(exec) : -1;
+ </xsl:when>
+ <xsl:when test=". = 'uint'">
+ uint arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toInteger(exec) : -1;
+ </xsl:when>
+ <xsl:when test=". = 'double'">
+ double arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toInteger(exec) : -1;
+ </xsl:when>
+ <xsl:when test=". = 'bool'">
+ bool arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toBoolean(exec) : false;
+ </xsl:when>
+ <xsl:when test=". = 'const QStringList &amp;'">
+ QStringList arg<xsl:value-of select="position()-1" />;
+ if ( args.size() >= <xsl:value-of select="position()" /> ) {
+ // TODO: populate the list
+ }
+ </xsl:when>
+ <xsl:otherwise>
+ // Unsupported parameter <xsl:value-of select="." />
+ return KJS::Value();
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+}
+ </xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+
+} // namespace KJSEmbed
+
+// Local Variables:
+// c-basic-offset: 4
+// End:
+
+</xsl:template>
+</xsl:stylesheet>
diff --git a/kjsembed/tools/doxygen2cons_h.xsl b/kjsembed/tools/doxygen2cons_h.xsl
new file mode 100644
index 00000000..8140d52e
--- /dev/null
+++ b/kjsembed/tools/doxygen2cons_h.xsl
@@ -0,0 +1,79 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text" />
+
+<xsl:template match="/doxygen/compounddef">
+
+<xsl:variable name="clazz" select="compoundname" />
+<xsl:variable name="consmeth" select="sectiondef/memberdef[@kind='function' and @prot='public']" />
+
+#ifndef KJSEMBED_<xsl:value-of select="$clazz" />_H
+#define KJSEMBED_<xsl:value-of select="$clazz" />_H
+
+#include &lt;kjs/interpreter.h&gt;
+#include &lt;kjs/object.h&gt;
+
+#include &lt;kjsembed/jsobjectproxy_imp.h&gt;
+
+class <xsl:value-of select="$clazz" />;
+
+/**
+ * Namespace containing the KJSEmbed library.
+ */
+namespace KJSEmbed {
+
+/**
+ * Wrapper class for <xsl:value-of select="$clazz" /> constructors.
+ *
+ * @author Richard Moore, rich@kde.org
+ */
+class <xsl:value-of select="$clazz" />Cons : public JSProxyImp
+{
+public:
+ /** Enumerates the constructors supported by this class. */
+ enum Constructors {
+<xsl:for-each select="$consmeth">
+ <xsl:choose>
+ <xsl:when test="name = $clazz">
+ <xsl:variable name="cons_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:variable name="cons_id">Constructor_<xsl:value-of select="$cons_name" /></xsl:variable>
+ <xsl:text> </xsl:text><xsl:value-of select="$cons_id" />,
+</xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+ LastConstuctor = -1
+ };
+
+ //
+ // Constructors implemented by this class.
+ //
+<xsl:for-each select="$consmeth">
+ <xsl:variable name="cons_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="name = $clazz">
+ KJS::Object <xsl:value-of select="$cons_name" />( KJS::ExecState *exec, KJS::Object &amp;obj, const KJS::List &amp;args );</xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+
+ //
+ // JS binding code.
+ //
+
+ /** Returns true iff this object implements the construct function. */
+ virtual bool implementsConstruct() const { return true; }
+
+ /** Invokes the construct function. */
+ virtual KJS::Value construct( KJS::ExecState *exec, KJS::Object &amp;self, const KJS::List &amp;args );
+private:
+ int id;
+};
+
+} // namespace KJSEmbed
+
+#endif // KJSEMBED_<xsl:value-of select="compoundname" />_H
+
+// Local Variables:
+// c-basic-offset: 4
+// End:
+
+</xsl:template>
+</xsl:stylesheet>
diff --git a/kjsembed/tools/doxygen2imp_cpp.xsl b/kjsembed/tools/doxygen2imp_cpp.xsl
new file mode 100644
index 00000000..4e8d73bf
--- /dev/null
+++ b/kjsembed/tools/doxygen2imp_cpp.xsl
@@ -0,0 +1,299 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text" />
+
+<xsl:template match="/doxygen/compounddef">
+
+<xsl:variable name="clazz" select="compoundname" />
+<xsl:variable name="consmeth" select="sectiondef/memberdef[@kind='function' and @prot='public']" />
+<xsl:variable name="enums" select="sectiondef/memberdef[@kind='enum' and @prot='public']" />
+
+#include &lt;qpalette.h>
+#include &lt;qpixmap.h>
+#include &lt;qfont.h>
+
+#include &lt;klocale.h>
+#include &lt;kjs/object.h>
+#include &lt;kdebug.h>
+
+#include &lt;kjsembed/jsobjectproxy.h>
+#include &lt;kjsembed/jsopaqueproxy.h>
+#include &lt;kjsembed/jsbinding.h>
+
+#include &lt;<xsl:value-of select="includes" />>
+#include "<xsl:value-of select="substring-before(includes,'.h')"/>_imp.h"
+
+/**
+ * Namespace containing the KJSEmbed library.
+ */
+namespace KJSEmbed {
+
+<xsl:value-of select="$clazz" />Imp::<xsl:value-of select="$clazz" />Imp( KJS::ExecState *exec, int id )
+ : JSProxyImp(exec), mid(id)
+{
+}
+
+<xsl:value-of select="$clazz" />Imp::~<xsl:value-of select="$clazz" />Imp()
+{
+}
+
+void <xsl:value-of select="$clazz" />Imp::addBindings( KJS::ExecState *exec, KJS::Object &amp;object )
+{
+ JSProxy::MethodTable methods[] = {
+<xsl:for-each select="$consmeth">
+ <xsl:variable name="method_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:variable name="method_id">Method_<xsl:value-of select="$method_name" /></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="not(starts-with( name, 'operator' ) or starts-with( name, '~' ) or starts-with( name, $clazz ))">
+ { <xsl:value-of select="$method_id" />, "<xsl:value-of select="name" />" },</xsl:when></xsl:choose>
+</xsl:for-each>
+ { 0, 0 }
+ };
+
+ int idx = 0;
+ do {
+ <xsl:value-of select="$clazz" />Imp *meth = new <xsl:value-of select="$clazz" />Imp( exec, methods[idx].id );
+ object.put( exec , methods[idx].name, KJS::Object(meth) );
+ ++idx;
+ } while( methods[idx].id );
+
+<xsl:if test="count($enums) != 0">
+ //
+ // Define the enum constants
+ //
+ struct EnumValue {
+ const char *id;
+ int val;
+ };
+
+ EnumValue enums[] = {
+<xsl:for-each select="$enums">
+ // enum <xsl:value-of select="./name" />
+ <xsl:for-each select="./enumvalue">
+ { "<xsl:value-of select="./name" />", <xsl:value-of select="$clazz" />::<xsl:value-of select="./name" /> },</xsl:for-each>
+</xsl:for-each>
+ { 0, 0 }
+ };
+
+ int enumidx = 0;
+ do {
+ object.put( exec, enums[enumidx].id, KJS::Number(enums[enumidx].val), KJS::ReadOnly );
+ ++enumidx;
+ } while( enums[enumidx].id );
+</xsl:if>
+}
+
+<xsl:value-of select="$clazz" /> *<xsl:value-of select="$clazz" />Imp::to<xsl:value-of select="$clazz" />( KJS::Object &amp;self )
+{
+ JSObjectProxy *ob = JSProxy::toObjectProxy( self.imp() );
+ if ( ob ) {
+ QObject *obj = ob->object();
+ if ( obj )
+ return dynamic_cast&lt;QComboBox *>( obj );
+ }
+
+ JSOpaqueProxy *op = JSProxy::toOpaqueProxy( self.imp() );
+ if ( !op )
+ return 0;
+
+ if ( op->typeName() != "<xsl:value-of select="$clazz" />" )
+ return 0;
+
+ return (<xsl:value-of select="$clazz" /> *)( op->toVoidStar() );
+}
+
+<!-- Select and invoke the correct method. -->
+KJS::Value <xsl:value-of select="$clazz" />Imp::call( KJS::ExecState *exec, KJS::Object &amp;self, const KJS::List &amp;args )
+{
+ instance = <xsl:value-of select="$clazz" />Imp::to<xsl:value-of select="$clazz" />( self );
+
+ switch( mid ) {
+<xsl:for-each select="$consmeth">
+ <xsl:variable name="method_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:variable name="method_id">Method_<xsl:value-of select="$method_name" /></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="not(starts-with( name, 'operator' ) or starts-with( name, '~' ) or starts-with( name, $clazz ))">
+ case <xsl:value-of select="$method_id" />:
+ return <xsl:value-of select="$method_name" />( exec, self, args );
+ break;
+ </xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+ default:
+ break;
+ }
+
+ QString msg = i18n( "<xsl:value-of select="$clazz" />Imp has no method with id '%1'" ).arg( mid );
+ KJS::Object err = KJS::Error::create( exec, KJS::ReferenceError, msg.utf8() );
+ exec->setException( err );
+ return err;
+}
+
+<!-- Create the implementation for each method. -->
+<xsl:for-each select="$consmeth">
+<xsl:variable name="method">
+<xsl:value-of select="$clazz" />Imp::<xsl:value-of select="name" />_<xsl:value-of select="position()" />
+</xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="(name != $clazz) and not(starts-with(name, 'operator') or starts-with(name, '~'))">
+<!-- Binding defined for a specific method. -->
+KJS::Value <xsl:value-of select="$method" />( KJS::ExecState *exec, KJS::Object &amp;obj, const KJS::List &amp;args )
+{
+ <xsl:for-each select="param/type">
+ <xsl:choose>
+ <xsl:when test=". = 'QString'">
+ QString arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toString(exec).qstring() : QString::null;
+ </xsl:when>
+ <xsl:when test=". = 'const QString &amp;'">
+ QString arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toString(exec).qstring() : QString::null;
+ </xsl:when>
+ <xsl:when test=". = 'const char *'">
+ const char *arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toString(exec).ascii() : 0;
+ </xsl:when>
+ <xsl:when test=". = 'int'">
+ int arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toInteger(exec) : -1;
+ </xsl:when>
+ <xsl:when test=". = 'uint'">
+ uint arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toInteger(exec) : -1;
+ </xsl:when>
+ <xsl:when test=". = 'double'">
+ double arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toInteger(exec) : -1;
+ </xsl:when>
+ <xsl:when test=". = 'bool'">
+ bool arg<xsl:value-of select="position()-1" /> = (args.size() >= <xsl:value-of select="position()" />) ? args[<xsl:value-of select="position()-1" />].toBoolean(exec) : false;
+ </xsl:when>
+ <xsl:when test=". = 'const QFont &amp;'">
+ QFont arg<xsl:value-of select="position()-1" />; // TODO
+ </xsl:when>
+ <xsl:when test=". = 'const QPalette &amp;'">
+ QPalette arg<xsl:value-of select="position()-1" />; // TODO
+ </xsl:when>
+ <xsl:when test=". = 'const QStringList &amp;'">
+ QStringList arg<xsl:value-of select="position()-1" /> = extractQStringList(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'const QStrList &amp;'">
+ QStrList arg<xsl:value-of select="position()-1" />;
+ if ( args.size() >= <xsl:value-of select="position()" /> ) {
+ // TODO: populate the list
+ }
+ </xsl:when>
+ <xsl:when test=". = 'const QRect &amp;'">
+ QRect arg<xsl:value-of select="position()-1" /> = extractQRect(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'const QSize &amp;'">
+ QSize arg<xsl:value-of select="position()-1" /> = extractQSize(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'const QPixmap &amp;'">
+ QPixmap arg<xsl:value-of select="position()-1" /> = extractQPixmap(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'const QColor &amp;'">
+ QColor arg<xsl:value-of select="position()-1" /> = extractQColor(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'const QDate &amp;'">
+ QDate arg<xsl:value-of select="position()-1" /> = extractQDate(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'const QTime &amp;'">
+ QTime arg<xsl:value-of select="position()-1" /> = extractQTime(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'const QDateTime &amp;'">
+ QDateTime arg<xsl:value-of select="position()-1" /> = extractQDateTime(exec, args, <xsl:value-of select="position()-1" />);
+ </xsl:when>
+ <xsl:when test=". = 'Policy'">
+ QComboBox::Policy arg<xsl:value-of select="position()-1" />; // TODO (hack for combo box)
+ </xsl:when>
+ <xsl:otherwise>
+ // Unsupported parameter <xsl:value-of select="." />
+ return KJS::Value();
+
+ <xsl:value-of select="." />arg<xsl:value-of select="position()-1" />; // Dummy
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <!-- Specifies the return type -->
+ <xsl:variable name="rettype">
+ <xsl:choose>
+ <xsl:when test="starts-with(type,'virtual ')">
+ <xsl:value-of select="substring-after(type,'virtual ')" />
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="type" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+
+ <xsl:when test="$rettype = 'bool'">
+ bool ret;
+ ret = instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::Boolean( ret );
+ </xsl:when>
+
+ <xsl:when test="$rettype = 'int'">
+ int ret;
+ ret = instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::Number( ret );
+ </xsl:when>
+
+ <xsl:when test="$rettype = 'uint'">
+ uint ret;
+ ret = instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::Number( ret );
+ </xsl:when>
+
+ <xsl:when test="$rettype = 'double'">
+ double ret;
+ ret = instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::Number( ret );
+ </xsl:when>
+
+ <xsl:when test="$rettype = 'QString'">
+ QString ret;
+ ret = instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::String( ret );
+ </xsl:when>
+
+ <xsl:when test="$rettype = 'const char *'">
+ const char *ret;
+ ret = instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::String( ret );
+ </xsl:when>
+
+ <xsl:when test="$rettype = 'QStringList'">
+ QStringList ret;
+ ret = instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+
+ return convertToValue( exec, ret );
+ </xsl:when>
+
+ <xsl:when test="$rettype = 'void'">
+ instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::Value(); // Returns void
+ </xsl:when>
+
+ <xsl:otherwise>
+ instance-><xsl:value-of select="name" />( <xsl:for-each select="param">
+ arg<xsl:value-of select="position()-1" /><xsl:if test="position() != count(../param)">,</xsl:if></xsl:for-each> );
+ return KJS::Value(); // Returns '<xsl:value-of select="$rettype" />'
+ </xsl:otherwise>
+ </xsl:choose>
+}
+ </xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+
+} // namespace KJSEmbed
+
+// Local Variables:
+// c-basic-offset: 4
+// End:
+
+</xsl:template>
+</xsl:stylesheet>
diff --git a/kjsembed/tools/doxygen2imp_h.xsl b/kjsembed/tools/doxygen2imp_h.xsl
new file mode 100644
index 00000000..ce00e7a1
--- /dev/null
+++ b/kjsembed/tools/doxygen2imp_h.xsl
@@ -0,0 +1,86 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text" />
+
+<xsl:template match="/doxygen/compounddef">
+
+<xsl:variable name="clazz" select="compoundname" />
+<xsl:variable name="consmeth" select="sectiondef/memberdef[@kind='function' and @prot='public']" />
+
+#ifndef KJSEMBED_<xsl:value-of select="$clazz" />_H
+#define KJSEMBED_<xsl:value-of select="$clazz" />_H
+
+#include &lt;kjs/interpreter.h&gt;
+#include &lt;kjs/object.h&gt;
+
+#include &lt;kjsembed/jsobjectproxy_imp.h&gt;
+
+class <xsl:value-of select="$clazz" />;
+
+/**
+ * Namespace containing the KJSEmbed library.
+ */
+namespace KJSEmbed {
+
+/**
+ * Wrapper class for <xsl:value-of select="$clazz" /> methods.
+ *
+ * @author Richard Moore, rich@kde.org
+ */
+class <xsl:value-of select="$clazz" />Imp : public JSProxyImp
+{
+public:
+ /** Enumerates the methods supported by this class. */
+ enum Methods {
+<xsl:for-each select="$consmeth">
+ <xsl:variable name="method_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="not(starts-with( name, 'operator' ) or starts-with( name, '~' ) or starts-with( name, $clazz ))">
+ Method_<xsl:value-of select="$method_name" />,</xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+ Method_Last = -1
+ };
+
+ <xsl:value-of select="$clazz" />Imp( KJS::ExecState *exec, int id );
+ ~<xsl:value-of select="$clazz" />Imp();
+
+ static void addBindings( KJS::ExecState *exec, KJS::Object &amp;object );
+
+ static <xsl:value-of select="$clazz" /> *to<xsl:value-of select="$clazz" />( KJS::Object &amp;object );
+
+ //
+ // Methods implemented by this class.
+ //
+<xsl:for-each select="$consmeth">
+ <xsl:variable name="method_name"><xsl:value-of select="name" />_<xsl:value-of select="position()" /></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="not(starts-with( name, 'operator' ) or starts-with( name, '~' ) or starts-with( name, $clazz ))">
+ KJS::Value <xsl:value-of select="$method_name" />( KJS::ExecState *exec, KJS::Object &amp;obj, const KJS::List &amp;args );</xsl:when>
+ </xsl:choose>
+</xsl:for-each>
+
+ //
+ // JS binding code.
+ //
+
+ /** Returns true iff this object implements the call function. */
+ virtual bool implementsCall() const { return true; }
+
+ /** Invokes the call function. */
+ virtual KJS::Value call( KJS::ExecState *exec, KJS::Object &amp;self, const KJS::List &amp;args );
+
+private:
+ <xsl:value-of select="$clazz" /> *instance; // Temp
+ int mid;
+};
+
+} // namespace KJSEmbed
+
+#endif // KJSEMBED_<xsl:value-of select="compoundname" />_H
+
+// Local Variables:
+// c-basic-offset: 4
+// End:
+
+</xsl:template>
+</xsl:stylesheet>
diff --git a/kjsembed/tools/headers/qbrush.h b/kjsembed/tools/headers/qbrush.h
new file mode 100644
index 00000000..16e4f3db
--- /dev/null
+++ b/kjsembed/tools/headers/qbrush.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+**
+** Definition of QBrush class
+**
+** Created : 940112
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QBRUSH_H
+#define QBRUSH_H
+
+#ifndef QT_H
+#include "qcolor.h"
+#include "qshared.h"
+#endif // QT_H
+
+
+class Q_EXPORT QBrush: public Qt
+{
+friend class QPainter;
+public:
+ QBrush();
+ QBrush( BrushStyle );
+ QBrush( const QColor &, BrushStyle=SolidPattern );
+ QBrush( const QColor &, const QPixmap & );
+ QBrush( const QBrush & );
+ ~QBrush();
+ QBrush &operator=( const QBrush & );
+
+ BrushStyle style() const { return data->style; }
+ void setStyle( BrushStyle );
+ const QColor &color()const { return data->color; }
+ void setColor( const QColor & );
+ QPixmap *pixmap() const { return data->pixmap; }
+ void setPixmap( const QPixmap & );
+
+ bool operator==( const QBrush &p ) const;
+ bool operator!=( const QBrush &b ) const
+ { return !(operator==(b)); }
+
+private:
+ QBrush copy() const;
+ void detach();
+ void init( const QColor &, BrushStyle );
+ struct QBrushData : public QShared { // brush data
+ BrushStyle style;
+ QColor color;
+ QPixmap *pixmap;
+ } *data;
+};
+
+
+/*****************************************************************************
+ QBrush stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QBrush & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QBrush & );
+#endif
+
+#endif // QBRUSH_H
diff --git a/kjsembed/tools/headers/qcanvas.h b/kjsembed/tools/headers/qcanvas.h
new file mode 100644
index 00000000..62a33b65
--- /dev/null
+++ b/kjsembed/tools/headers/qcanvas.h
@@ -0,0 +1,806 @@
+/**********************************************************************
+**
+**
+** Definition of QCanvas classes
+**
+** Created : 991211
+**
+** Copyright (C) 1999-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the canvas module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCANVAS_H
+#define QCANVAS_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qpixmap.h"
+#include "qptrlist.h"
+#include "qbrush.h"
+#include "qpen.h"
+#include "qvaluelist.h"
+#include "qpointarray.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_CANVAS ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_CANVAS )
+#define QM_EXPORT_CANVAS
+#define QM_TEMPLATE_EXTERN_CANVAS
+#else
+#define QM_EXPORT_CANVAS Q_EXPORT
+#define QM_TEMPLATE_EXTERN_CANVAS Q_TEMPLATE_EXTERN
+#endif
+
+#ifndef QT_NO_CANVAS
+
+
+class QCanvasSprite;
+class QCanvasPolygonalItem;
+class QCanvasRectangle;
+class QCanvasPolygon;
+class QCanvasEllipse;
+class QCanvasText;
+class QCanvasLine;
+class QCanvasChunk;
+class QCanvas;
+class QCanvasItem;
+class QCanvasView;
+class QCanvasPixmap;
+
+
+class QM_EXPORT_CANVAS QCanvasItemList : public QValueList<QCanvasItem*> {
+public:
+ void sort();
+ void drawUnique( QPainter& painter );
+};
+
+
+class QCanvasItemExtra;
+
+class QM_EXPORT_CANVAS QCanvasItem : public Qt
+{
+public:
+ QCanvasItem(QCanvas* canvas);
+ virtual ~QCanvasItem();
+
+ double x() const
+ { return myx; }
+ double y() const
+ { return myy; }
+ double z() const
+ { return myz; } // (depth)
+
+ virtual void moveBy(double dx, double dy);
+ void move(double x, double y);
+ void setX(double a) { move(a,y()); }
+ void setY(double a) { move(x(),a); }
+ void setZ(double a) { myz=a; changeChunks(); }
+
+ bool animated() const;
+ virtual void setAnimated(bool y);
+ virtual void setVelocity( double vx, double vy);
+ void setXVelocity( double vx ) { setVelocity(vx,yVelocity()); }
+ void setYVelocity( double vy ) { setVelocity(xVelocity(),vy); }
+ double xVelocity() const;
+ double yVelocity() const;
+ virtual void advance(int stage);
+
+ virtual bool collidesWith( const QCanvasItem* ) const=0;
+
+ QCanvasItemList collisions(bool exact /* NO DEFAULT */ ) const;
+
+ virtual void setCanvas(QCanvas*);
+
+ virtual void draw(QPainter&)=0;
+
+ void show();
+ void hide();
+
+ virtual void setVisible(bool yes);
+ bool isVisible() const
+ { return (bool)vis; }
+ virtual void setSelected(bool yes);
+ bool isSelected() const
+ { return (bool)sel; }
+ virtual void setEnabled(bool yes);
+ bool isEnabled() const
+ { return (bool)ena; }
+ virtual void setActive(bool yes);
+ bool isActive() const
+ { return (bool)act; }
+#ifndef QT_NO_COMPAT
+ bool visible() const
+ { return (bool)vis; }
+ bool selected() const
+ { return (bool)sel; }
+ bool enabled() const
+ { return (bool)ena; }
+ bool active() const
+ { return (bool)act; }
+#endif
+
+ enum RttiValues {
+ Rtti_Item = 0,
+ Rtti_Sprite = 1,
+ Rtti_PolygonalItem = 2,
+ Rtti_Text = 3,
+ Rtti_Polygon = 4,
+ Rtti_Rectangle = 5,
+ Rtti_Ellipse = 6,
+ Rtti_Line = 7,
+ Rtti_Spline = 8
+ };
+
+ virtual int rtti() const;
+ static int RTTI;
+
+ virtual QRect boundingRect() const=0;
+ virtual QRect boundingRectAdvanced() const;
+
+ QCanvas* canvas() const
+ { return cnv; }
+
+protected:
+ void update() { changeChunks(); }
+
+private:
+ // For friendly subclasses...
+
+ friend class QCanvasPolygonalItem;
+ friend class QCanvasSprite;
+ friend class QCanvasRectangle;
+ friend class QCanvasPolygon;
+ friend class QCanvasEllipse;
+ friend class QCanvasText;
+ friend class QCanvasLine;
+
+ virtual QPointArray chunks() const;
+ virtual void addToChunks();
+ virtual void removeFromChunks();
+ virtual void changeChunks();
+ virtual bool collidesWith( const QCanvasSprite*,
+ const QCanvasPolygonalItem*,
+ const QCanvasRectangle*,
+ const QCanvasEllipse*,
+ const QCanvasText* ) const = 0;
+ // End of friend stuff
+
+ QCanvas* cnv;
+ static QCanvas* current_canvas;
+ double myx,myy,myz;
+ QCanvasItemExtra *ext;
+ QCanvasItemExtra& extra();
+ uint ani:1;
+ uint vis:1;
+ uint val:1;
+ uint sel:1;
+ uint ena:1;
+ uint act:1;
+};
+
+
+class QCanvasData;
+
+class QM_EXPORT_CANVAS QCanvas : public QObject
+{
+ Q_OBJECT
+public:
+ QCanvas( QObject* parent = 0, const char* name = 0 );
+ QCanvas(int w, int h);
+ QCanvas( QPixmap p, int h, int v, int tilewidth, int tileheight );
+
+ virtual ~QCanvas();
+
+ virtual void setTiles( QPixmap tiles, int h, int v,
+ int tilewidth, int tileheight );
+ virtual void setBackgroundPixmap( const QPixmap& p );
+ QPixmap backgroundPixmap() const;
+
+ virtual void setBackgroundColor( const QColor& c );
+ QColor backgroundColor() const;
+
+ virtual void setTile( int x, int y, int tilenum );
+ int tile( int x, int y ) const
+ { return grid[x+y*htiles]; }
+
+ int tilesHorizontally() const
+ { return htiles; }
+ int tilesVertically() const
+ { return vtiles; }
+
+ int tileWidth() const
+ { return tilew; }
+ int tileHeight() const
+ { return tileh; }
+
+ virtual void resize(int width, int height);
+ int width() const
+ { return awidth; }
+ int height() const
+ { return aheight; }
+ QSize size() const
+ { return QSize(awidth,aheight); }
+ QRect rect() const
+ { return QRect( 0, 0, awidth, aheight ); }
+ bool onCanvas( int x, int y ) const
+ { return x>=0 && y>=0 && x<awidth && y<aheight; }
+ bool onCanvas( const QPoint& p ) const
+ { return onCanvas(p.x(),p.y()); }
+ bool validChunk( int x, int y ) const
+ { return x>=0 && y>=0 && x<chwidth && y<chheight; }
+ bool validChunk( const QPoint& p ) const
+ { return validChunk(p.x(),p.y()); }
+
+ int chunkSize() const
+ { return chunksize; }
+ virtual void retune(int chunksize, int maxclusters=100);
+
+ bool sameChunk(int x1, int y1, int x2, int y2) const
+ { return x1/chunksize==x2/chunksize && y1/chunksize==y2/chunksize; }
+ virtual void setChangedChunk(int i, int j);
+ virtual void setChangedChunkContaining(int x, int y);
+ virtual void setAllChanged();
+ virtual void setChanged(const QRect& area);
+ virtual void setUnchanged(const QRect& area);
+
+ // These call setChangedChunk.
+ void addItemToChunk(QCanvasItem*, int i, int j);
+ void removeItemFromChunk(QCanvasItem*, int i, int j);
+ void addItemToChunkContaining(QCanvasItem*, int x, int y);
+ void removeItemFromChunkContaining(QCanvasItem*, int x, int y);
+
+ QCanvasItemList allItems();
+ QCanvasItemList collisions( const QPoint&) const;
+ QCanvasItemList collisions( const QRect&) const;
+ QCanvasItemList collisions( const QPointArray& pa, const QCanvasItem* item,
+ bool exact) const;
+
+ void drawArea(const QRect&, QPainter* p, bool double_buffer=FALSE);
+
+ // These are for QCanvasView to call
+ virtual void addView(QCanvasView*);
+ virtual void removeView(QCanvasView*);
+ void drawCanvasArea(const QRect&, QPainter* p=0, bool double_buffer=TRUE);
+ void drawViewArea( QCanvasView* view, QPainter* p, const QRect& r, bool dbuf );
+
+ // These are for QCanvasItem to call
+ virtual void addItem(QCanvasItem*);
+ virtual void addAnimation(QCanvasItem*);
+ virtual void removeItem(QCanvasItem*);
+ virtual void removeAnimation(QCanvasItem*);
+
+ virtual void setAdvancePeriod(int ms);
+ virtual void setUpdatePeriod(int ms);
+
+ virtual void setDoubleBuffering(bool y);
+
+signals:
+ void resized();
+
+public slots:
+ virtual void advance();
+ virtual void update();
+
+protected:
+ virtual void drawBackground(QPainter&, const QRect& area);
+ virtual void drawForeground(QPainter&, const QRect& area);
+
+private:
+ void init(int w, int h, int chunksze=16, int maxclust=100);
+
+ QCanvasChunk& chunk(int i, int j) const;
+ QCanvasChunk& chunkContaining(int x, int y) const;
+
+ QRect changeBounds(const QRect& inarea);
+ void drawChanges(const QRect& inarea);
+
+ void ensureOffScrSize( int osw, int osh );
+ QPixmap offscr;
+ int awidth,aheight;
+ int chunksize;
+ int maxclusters;
+ int chwidth,chheight;
+ QCanvasChunk* chunks;
+
+ QCanvasData* d;
+
+ void initTiles(QPixmap p, int h, int v, int tilewidth, int tileheight);
+ ushort *grid;
+ ushort htiles;
+ ushort vtiles;
+ ushort tilew;
+ ushort tileh;
+ bool oneone;
+ QPixmap pm;
+ QTimer* update_timer;
+ QColor bgcolor;
+ bool debug_redraw_areas;
+ bool dblbuf;
+
+ friend void qt_unview(QCanvas* c);
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+ QCanvas( const QCanvas & );
+ QCanvas &operator=( const QCanvas & );
+#endif
+};
+
+class QCanvasViewData;
+
+class QM_EXPORT_CANVAS QCanvasView : public QScrollView
+{
+ Q_OBJECT
+public:
+
+ QCanvasView(QWidget* parent=0, const char* name=0, WFlags f=0);
+ QCanvasView(QCanvas* viewing, QWidget* parent=0, const char* name=0, WFlags f=0);
+ ~QCanvasView();
+
+ QCanvas* canvas() const
+ { return viewing; }
+ void setCanvas(QCanvas* v);
+
+ const QWMatrix &worldMatrix() const;
+ const QWMatrix &inverseWorldMatrix() const;
+ bool setWorldMatrix( const QWMatrix & );
+
+protected:
+ void drawContents( QPainter*, int cx, int cy, int cw, int ch );
+ QSize sizeHint() const;
+
+private:
+ void drawContents( QPainter* );
+ QCanvas* viewing;
+ QCanvasViewData* d;
+ friend void qt_unview(QCanvas* c);
+
+private slots:
+ void cMoving(int,int);
+ void updateContentsSize();
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+ QCanvasView( const QCanvasView & );
+ QCanvasView &operator=( const QCanvasView & );
+#endif
+};
+
+
+class QM_EXPORT_CANVAS QCanvasPixmap : public QPixmap
+{
+public:
+#ifndef QT_NO_IMAGEIO
+ QCanvasPixmap(const QString& datafilename);
+#endif
+ QCanvasPixmap(const QImage& image);
+ QCanvasPixmap(const QPixmap&, const QPoint& hotspot);
+ ~QCanvasPixmap();
+
+ int offsetX() const
+ { return hotx; }
+ int offsetY() const
+ { return hoty; }
+ void setOffset(int x, int y) { hotx = x; hoty = y; }
+
+private:
+#if defined(Q_DISABLE_COPY)
+ QCanvasPixmap( const QCanvasPixmap & );
+ QCanvasPixmap &operator=( const QCanvasPixmap & );
+#endif
+ void init(const QImage&);
+ void init(const QPixmap& pixmap, int hx, int hy);
+
+ friend class QCanvasSprite;
+ friend class QCanvasPixmapArray;
+ friend bool qt_testCollision(const QCanvasSprite* s1, const QCanvasSprite* s2);
+
+ int hotx,hoty;
+
+ QImage* collision_mask;
+};
+
+
+class QM_EXPORT_CANVAS QCanvasPixmapArray
+{
+public:
+ QCanvasPixmapArray();
+#ifndef QT_NO_IMAGEIO
+ QCanvasPixmapArray(const QString& datafilenamepattern, int framecount=0);
+#endif
+ // this form is deprecated
+ QCanvasPixmapArray(QPtrList<QPixmap>, QPtrList<QPoint> hotspots);
+
+ QCanvasPixmapArray(QValueList<QPixmap>, QPointArray hotspots = QPointArray() );
+ ~QCanvasPixmapArray();
+
+#ifndef QT_NO_IMAGEIO
+ bool readPixmaps(const QString& datafilenamepattern, int framecount=0);
+ bool readCollisionMasks(const QString& filenamepattern);
+#endif
+
+ // deprecated
+ bool operator!(); // Failure check.
+ bool isValid() const;
+
+ QCanvasPixmap* image(int i) const
+ { return img ? img[i] : 0; }
+ void setImage(int i, QCanvasPixmap* p);
+ uint count() const
+ { return (uint)framecount; }
+
+private:
+#if defined(Q_DISABLE_COPY)
+ QCanvasPixmapArray( const QCanvasPixmapArray & );
+ QCanvasPixmapArray &operator=( const QCanvasPixmapArray & );
+#endif
+#ifndef QT_NO_IMAGEIO
+ bool readPixmaps(const QString& datafilenamepattern, int framecount, bool maskonly);
+#endif
+
+ void reset();
+ int framecount;
+ QCanvasPixmap** img;
+};
+
+
+class QM_EXPORT_CANVAS QCanvasSprite : public QCanvasItem
+{
+public:
+ QCanvasSprite(QCanvasPixmapArray* array, QCanvas* canvas);
+
+ void setSequence(QCanvasPixmapArray* seq);
+
+ virtual ~QCanvasSprite();
+
+ void move(double x, double y);
+ virtual void move(double x, double y, int frame);
+ void setFrame(int);
+ enum FrameAnimationType { Cycle, Oscillate };
+ virtual void setFrameAnimation(FrameAnimationType=Cycle, int step=1, int state=0);
+ int frame() const
+ { return frm; }
+ int frameCount() const
+ { return images->count(); }
+
+ int rtti() const;
+ static int RTTI;
+
+ bool collidesWith( const QCanvasItem* ) const;
+
+ QRect boundingRect() const;
+
+ // is there a reason for these to be protected? Lars
+//protected:
+
+ int width() const;
+ int height() const;
+
+ int leftEdge() const;
+ int topEdge() const;
+ int rightEdge() const;
+ int bottomEdge() const;
+
+ int leftEdge(int nx) const;
+ int topEdge(int ny) const;
+ int rightEdge(int nx) const;
+ int bottomEdge(int ny) const;
+ QCanvasPixmap* image() const
+ { return images->image(frm); }
+ virtual QCanvasPixmap* imageAdvanced() const;
+ QCanvasPixmap* image(int f) const
+ { return images->image(f); }
+ virtual void advance(int stage);
+
+public:
+ void draw(QPainter& painter);
+
+private:
+#if defined(Q_DISABLE_COPY)
+ QCanvasSprite( const QCanvasSprite & );
+ QCanvasSprite &operator=( const QCanvasSprite & );
+#endif
+ void addToChunks();
+ void removeFromChunks();
+ void changeChunks();
+
+ int frm;
+ ushort anim_val;
+ uint anim_state:2;
+ uint anim_type:14;
+ bool collidesWith( const QCanvasSprite*,
+ const QCanvasPolygonalItem*,
+ const QCanvasRectangle*,
+ const QCanvasEllipse*,
+ const QCanvasText* ) const;
+
+ friend bool qt_testCollision( const QCanvasSprite* s1,
+ const QCanvasSprite* s2 );
+
+ QCanvasPixmapArray* images;
+};
+
+class QPolygonalProcessor;
+
+class QM_EXPORT_CANVAS QCanvasPolygonalItem : public QCanvasItem
+{
+public:
+ QCanvasPolygonalItem(QCanvas* canvas);
+ virtual ~QCanvasPolygonalItem();
+
+ bool collidesWith( const QCanvasItem* ) const;
+
+ virtual void setPen(QPen p);
+ virtual void setBrush(QBrush b);
+
+ QPen pen() const
+ { return pn; }
+ QBrush brush() const
+ { return br; }
+
+ virtual QPointArray areaPoints() const=0;
+ virtual QPointArray areaPointsAdvanced() const;
+ QRect boundingRect() const;
+
+ int rtti() const;
+ static int RTTI;
+
+protected:
+ void draw(QPainter &);
+ virtual void drawShape(QPainter &) = 0;
+
+ bool winding() const;
+ void setWinding(bool);
+
+ void invalidate();
+ bool isValid() const
+ { return (bool)val; }
+
+private:
+ void scanPolygon( const QPointArray& pa, int winding,
+ QPolygonalProcessor& process ) const;
+ QPointArray chunks() const;
+
+ bool collidesWith( const QCanvasSprite*,
+ const QCanvasPolygonalItem*,
+ const QCanvasRectangle*,
+ const QCanvasEllipse*,
+ const QCanvasText* ) const;
+
+ QBrush br;
+ QPen pn;
+ uint wind:1;
+};
+
+
+class QM_EXPORT_CANVAS QCanvasRectangle : public QCanvasPolygonalItem
+{
+public:
+ QCanvasRectangle(QCanvas* canvas);
+ QCanvasRectangle(const QRect&, QCanvas* canvas);
+ QCanvasRectangle(int x, int y, int width, int height, QCanvas* canvas);
+
+ ~QCanvasRectangle();
+
+ int width() const;
+ int height() const;
+ void setSize(int w, int h);
+ QSize size() const
+ { return QSize(w,h); }
+ QPointArray areaPoints() const;
+ QRect rect() const
+ { return QRect(int(x()),int(y()),w,h); }
+
+ bool collidesWith( const QCanvasItem* ) const;
+
+ int rtti() const;
+ static int RTTI;
+
+protected:
+ void drawShape(QPainter &);
+ QPointArray chunks() const;
+
+private:
+ bool collidesWith( const QCanvasSprite*,
+ const QCanvasPolygonalItem*,
+ const QCanvasRectangle*,
+ const QCanvasEllipse*,
+ const QCanvasText* ) const;
+
+ int w, h;
+};
+
+
+class QM_EXPORT_CANVAS QCanvasPolygon : public QCanvasPolygonalItem
+{
+public:
+ QCanvasPolygon(QCanvas* canvas);
+ ~QCanvasPolygon();
+ void setPoints(QPointArray);
+ QPointArray points() const;
+ void moveBy(double dx, double dy);
+
+ QPointArray areaPoints() const;
+
+ int rtti() const;
+ static int RTTI;
+
+protected:
+ void drawShape(QPainter &);
+ QPointArray poly;
+};
+
+
+class QM_EXPORT_CANVAS QCanvasSpline : public QCanvasPolygon
+{
+public:
+ QCanvasSpline(QCanvas* canvas);
+ ~QCanvasSpline();
+
+ void setControlPoints(QPointArray, bool closed=TRUE);
+ QPointArray controlPoints() const;
+ bool closed() const;
+
+ int rtti() const;
+ static int RTTI;
+
+private:
+ void recalcPoly();
+ QPointArray bez;
+ bool cl;
+};
+
+
+class QM_EXPORT_CANVAS QCanvasLine : public QCanvasPolygonalItem
+{
+public:
+ QCanvasLine(QCanvas* canvas);
+ ~QCanvasLine();
+ void setPoints(int x1, int y1, int x2, int y2);
+
+ QPoint startPoint() const
+ { return QPoint(x1,y1); }
+ QPoint endPoint() const
+ { return QPoint(x2,y2); }
+
+ int rtti() const;
+ static int RTTI;
+
+ void setPen(QPen p);
+
+protected:
+ void drawShape(QPainter &);
+ QPointArray areaPoints() const;
+
+private:
+ int x1,y1,x2,y2;
+};
+
+
+class QM_EXPORT_CANVAS QCanvasEllipse : public QCanvasPolygonalItem
+{
+
+public:
+ QCanvasEllipse( QCanvas* canvas );
+ QCanvasEllipse( int width, int height, QCanvas* canvas );
+ QCanvasEllipse( int width, int height, int startangle, int angle,
+ QCanvas* canvas );
+
+ ~QCanvasEllipse();
+
+ int width() const;
+ int height() const;
+ void setSize(int w, int h);
+ void setAngles(int start, int length);
+ int angleStart() const
+ { return a1; }
+ int angleLength() const
+ { return a2; }
+ QPointArray areaPoints() const;
+
+ bool collidesWith( const QCanvasItem* ) const;
+
+ int rtti() const;
+ static int RTTI;
+
+protected:
+ void drawShape(QPainter &);
+
+private:
+ bool collidesWith( const QCanvasSprite*,
+ const QCanvasPolygonalItem*,
+ const QCanvasRectangle*,
+ const QCanvasEllipse*,
+ const QCanvasText* ) const;
+ int w, h;
+ int a1, a2;
+};
+
+
+class QCanvasTextExtra;
+
+class QM_EXPORT_CANVAS QCanvasText : public QCanvasItem
+{
+public:
+ QCanvasText(QCanvas* canvas);
+ QCanvasText(const QString&, QCanvas* canvas);
+ QCanvasText(const QString&, QFont, QCanvas* canvas);
+
+ virtual ~QCanvasText();
+
+ void setText( const QString& );
+ void setFont( const QFont& );
+ void setColor( const QColor& );
+ QString text() const;
+ QFont font() const;
+ QColor color() const;
+
+ void moveBy(double dx, double dy);
+
+ int textFlags() const
+ { return flags; }
+ void setTextFlags(int);
+
+ QRect boundingRect() const;
+
+ bool collidesWith( const QCanvasItem* ) const;
+
+ int rtti() const;
+ static int RTTI;
+
+protected:
+ virtual void draw(QPainter&);
+
+private:
+#if defined(Q_DISABLE_COPY)
+ QCanvasText( const QCanvasText & );
+ QCanvasText &operator=( const QCanvasText & );
+#endif
+ void addToChunks();
+ void removeFromChunks();
+ void changeChunks();
+
+ void setRect();
+ QRect brect;
+ QString txt;
+ int flags;
+ QFont fnt;
+ QColor col;
+ QCanvasTextExtra* extra;
+
+ bool collidesWith( const QCanvasSprite*,
+ const QCanvasPolygonalItem*,
+ const QCanvasRectangle*,
+ const QCanvasEllipse*,
+ const QCanvasText* ) const;
+};
+
+#define Q_DEFINED_QCANVAS
+#include "qwinexport.h"
+#endif // QT_NO_CANVAS
+
+#endif // QCANVAS_H
diff --git a/kjsembed/tools/headers/qdir.h b/kjsembed/tools/headers/qdir.h
new file mode 100644
index 00000000..b5e1f5d0
--- /dev/null
+++ b/kjsembed/tools/headers/qdir.h
@@ -0,0 +1,246 @@
+/****************************************************************************
+**
+**
+** Definition of QDir class
+**
+** Created : 950427
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDIR_H
+#define QDIR_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qstrlist.h"
+#include "qfileinfo.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_DIR
+typedef QPtrList<QFileInfo> QFileInfoList;
+typedef QPtrListIterator<QFileInfo> QFileInfoListIterator;
+class QStringList;
+template <class T> class QDeepCopy;
+
+
+class Q_EXPORT QDir
+{
+public:
+ enum FilterSpec { Dirs = 0x001,
+ Files = 0x002,
+ Drives = 0x004,
+ NoSymLinks = 0x008,
+ All = 0x007,
+ TypeMask = 0x00F,
+
+ Readable = 0x010,
+ Writable = 0x020,
+ Executable = 0x040,
+ RWEMask = 0x070,
+
+ Modified = 0x080,
+ Hidden = 0x100,
+ System = 0x200,
+ AccessMask = 0x3F0,
+
+ DefaultFilter = -1 };
+
+ enum SortSpec { Name = 0x00,
+ Time = 0x01,
+ Size = 0x02,
+ Unsorted = 0x03,
+ SortByMask = 0x03,
+
+ DirsFirst = 0x04,
+ Reversed = 0x08,
+ IgnoreCase = 0x10,
+ DefaultSort = -1 };
+
+ QDir();
+ QDir( const QString &path, const QString &nameFilter = QString::null,
+ int sortSpec = Name | IgnoreCase, int filterSpec = All );
+ QDir( const QDir & );
+
+ virtual ~QDir();
+
+ QDir &operator=( const QDir & );
+ QDir &operator=( const QString &path );
+
+ virtual void setPath( const QString &path );
+ virtual QString path() const;
+ virtual QString absPath() const;
+ virtual QString canonicalPath() const;
+
+ virtual QString dirName() const;
+ virtual QString filePath( const QString &fileName,
+ bool acceptAbsPath = TRUE ) const;
+ virtual QString absFilePath( const QString &fileName,
+ bool acceptAbsPath = TRUE ) const;
+
+ static QString convertSeparators( const QString &pathName );
+
+ virtual bool cd( const QString &dirName, bool acceptAbsPath = TRUE );
+ virtual bool cdUp();
+
+ QString nameFilter() const;
+ virtual void setNameFilter( const QString &nameFilter );
+ FilterSpec filter() const;
+ virtual void setFilter( int filterSpec );
+ SortSpec sorting() const;
+ virtual void setSorting( int sortSpec );
+
+ bool matchAllDirs() const;
+ virtual void setMatchAllDirs( bool );
+
+ uint count() const;
+ QString operator[]( int ) const;
+
+ virtual QStrList encodedEntryList( int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual QStrList encodedEntryList( const QString &nameFilter,
+ int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual QStringList entryList( int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual QStringList entryList( const QString &nameFilter,
+ int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+
+ virtual const QFileInfoList *entryInfoList( int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual const QFileInfoList *entryInfoList( const QString &nameFilter,
+ int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+
+ static const QFileInfoList *drives();
+
+ virtual bool mkdir( const QString &dirName,
+ bool acceptAbsPath = TRUE ) const;
+ virtual bool rmdir( const QString &dirName,
+ bool acceptAbsPath = TRUE ) const;
+
+ virtual bool isReadable() const;
+ virtual bool exists() const;
+ virtual bool isRoot() const;
+
+ virtual bool isRelative() const;
+ virtual void convertToAbs();
+
+ virtual bool operator==( const QDir & ) const;
+ virtual bool operator!=( const QDir & ) const;
+
+ virtual bool remove( const QString &fileName,
+ bool acceptAbsPath = TRUE );
+ virtual bool rename( const QString &name, const QString &newName,
+ bool acceptAbsPaths = TRUE );
+ virtual bool exists( const QString &name,
+ bool acceptAbsPath = TRUE );
+
+ static char separator();
+
+ static bool setCurrent( const QString &path );
+ static QDir current();
+ static QDir home();
+ static QDir root();
+ static QString currentDirPath();
+ static QString homeDirPath();
+ static QString rootDirPath();
+
+ static bool match( const QStringList &filters, const QString &fileName );
+ static bool match( const QString &filter, const QString &fileName );
+ static QString cleanDirPath( const QString &dirPath );
+ static bool isRelativePath( const QString &path );
+ void refresh() const;
+
+private:
+#ifdef Q_OS_MAC
+ typedef struct FSSpec FSSpec;
+ static FSSpec *make_spec(const QString &);
+#endif
+ void init();
+ virtual bool readDirEntries( const QString &nameFilter,
+ int FilterSpec, int SortSpec );
+
+ static void slashify( QString & );
+
+ QString dPath;
+ QStringList *fList;
+ QFileInfoList *fiList;
+ QString nameFilt;
+ FilterSpec filtS;
+ SortSpec sortS;
+ uint dirty : 1;
+ uint allDirs : 1;
+
+ void detach();
+ friend class QDeepCopy< QDir >;
+};
+
+
+inline QString QDir::path() const
+{
+ return dPath;
+}
+
+inline QString QDir::nameFilter() const
+{
+ return nameFilt;
+}
+
+inline QDir::FilterSpec QDir::filter() const
+{
+ return filtS;
+}
+
+inline QDir::SortSpec QDir::sorting() const
+{
+ return sortS;
+}
+
+inline bool QDir::matchAllDirs() const
+{
+ return allDirs;
+}
+
+inline bool QDir::operator!=( const QDir &d ) const
+{
+ return !(*this == d);
+}
+
+
+struct QDirSortItem {
+ QString filename_cache;
+ QFileInfo* item;
+};
+
+#endif // QT_NO_DIR
+#endif // QDIR_H
diff --git a/kjsembed/tools/headers/qpen.h b/kjsembed/tools/headers/qpen.h
new file mode 100644
index 00000000..38befc90
--- /dev/null
+++ b/kjsembed/tools/headers/qpen.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+**
+** Definition of QPen class
+**
+** Created : 940112
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPEN_H
+#define QPEN_H
+
+#ifndef QT_H
+#include "qcolor.h"
+#include "qshared.h"
+#endif // QT_H
+
+
+class Q_EXPORT QPen: public Qt
+{
+public:
+ QPen();
+ QPen( PenStyle );
+ QPen( const QColor &color, uint width=0, PenStyle style=SolidLine );
+ QPen( const QColor &cl, uint w, PenStyle s, PenCapStyle c, PenJoinStyle j);
+ QPen( const QPen & );
+ ~QPen();
+ QPen &operator=( const QPen & );
+
+ PenStyle style() const { return data->style; }
+ void setStyle( PenStyle );
+ uint width() const { return data->width; }
+ void setWidth( uint );
+ const QColor &color() const { return data->color; }
+ void setColor( const QColor & );
+ PenCapStyle capStyle() const;
+ void setCapStyle( PenCapStyle );
+ PenJoinStyle joinStyle() const;
+ void setJoinStyle( PenJoinStyle );
+
+ bool operator==( const QPen &p ) const;
+ bool operator!=( const QPen &p ) const
+ { return !(operator==(p)); }
+
+private:
+ friend class QPainter;
+#ifdef Q_WS_WIN
+ friend class QFontEngineWin;
+#endif
+
+ QPen copy() const;
+ void detach();
+ void init( const QColor &, uint, uint );
+ struct QPenData : public QShared { // pen data
+ PenStyle style;
+ uint width;
+ QColor color;
+ Q_UINT16 linest;
+ } *data;
+};
+
+
+/*****************************************************************************
+ QPen stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QPen & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QPen & );
+#endif
+
+#endif // QPEN_H
diff --git a/kjsembed/tools/headers/qtimer.h b/kjsembed/tools/headers/qtimer.h
new file mode 100644
index 00000000..b662470d
--- /dev/null
+++ b/kjsembed/tools/headers/qtimer.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+**
+** Definition of QTimer class
+**
+** Created : 931111
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTIMER_H
+#define QTIMER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+
+
+class Q_EXPORT QTimer : public QObject
+{
+ Q_OBJECT
+public:
+ QTimer( QObject *parent=0, const char *name=0 );
+ ~QTimer();
+
+ bool isActive() const;
+
+ int start( int msec, bool sshot = FALSE );
+ void changeInterval( int msec );
+ void stop();
+
+ static void singleShot( int msec, QObject *receiver, const char *member );
+
+ int timerId() const { return id; }
+
+signals:
+ void timeout();
+
+protected:
+ bool event( QEvent * );
+
+private:
+ int id;
+ uint single : 1;
+ uint nulltimer : 1;
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QTimer( const QTimer & );
+ QTimer &operator=( const QTimer & );
+#endif
+};
+
+
+inline bool QTimer::isActive() const
+{
+ return id >= 0;
+}
+
+
+#endif // QTIMER_H
diff --git a/kjsembed/tools/xml/DO_NOT_PRUNE b/kjsembed/tools/xml/DO_NOT_PRUNE
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/kjsembed/tools/xml/DO_NOT_PRUNE