Commit 91597620 authored by Yuri N. Sedunov's avatar Yuri N. Sedunov Committed by Girar Builder robot

2.9.4-alt1

- first build for Sisyphus
parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

tar.gz: abiword name=abiword-2.9.4
%define _name abiword
%define abi_ver 3.0
%define ver_major 2.9
%def_enable spell
%def_without goffice
%def_with champlain
%def_with libical
%def_without eds
Name: %_name-%abi_ver
Version: %ver_major.4
Release: alt1
Summary: Lean and fast full-featured word processor
Group: Office
License: GPL
Url: http://www.abisource.com/
Source: http://www.abisource.com/downloads/abiword/%version/source/%_name-%version.tar.gz
Obsoletes: abisuite, abisuite-koi8, abisuite-cp1251, abisuite-iso8859-8
Conflicts: %_name %_name-light
BuildRequires: gcc-c++ boost-devel
BuildRequires: libgtk+3-devel librsvg-devel libfribidi-devel
BuildRequires: libwpd-devel libwv-devel libgsf-devel bzlib-devel
BuildRequires: libjpeg-devel
%{?_enable_spell:BuildRequires: libenchant-devel}
%{?_with_goffice:BuildRequires: libgnomeoffice0.10-devel}
%{?_with_champlain:BuildRequires: libchamplain-gtk3-devel}
%{?_with_libical:BuildRequires: libical-devel}
%{?_with_eds:BuildRequires: evolution-data-server-devel}
%description
AbiWord is a cross-platform, Open Source Word Processor developed
by the people at AbiSource, Inc. and by developers from around the world.
(http://www.abisource.com)
It is a lean and fast full-featured word processor. It works on Microsoft
Windows and most Unix Systems. Features include:
* Basic character formatting (bold, underline, italics, etc.)
* Paragraph alignment
* Spell-check
* Import of Word97 and RTF documents
* Export to RTF, Text, HTML, and LaTeX formats
* Document Templates
* Interactive rulers and tabs
* Styles
* Unlimited undo/redo
* Multiple column control
* Widow/orphan control
* Find/Replace
* Images
and much more...
%package devel
Group: Development/C++
Summary: Headers for Abiword plugins
Requires: %name = %version-%release
%description devel
Headers and pkgconfig support for Abiword plugin building.
Conflicts: %_name-devel %_name-light-devel
%prep
%setup -n %_name-%version
%build
%autoreconf
%configure \
--enable-print \
--enable-plugins \
--enable-templates \
--enable-clipart \
%{subst_enable spell} \
%{subst_with goffice} \
%{subst_with champlain} \
%{subst_with libical} \
%{?_without_eds:--without-evolution-data-server} \
--disable-static
%make_build
%install
%make_install DESTDIR=%buildroot install
%files
%_bindir/%_name
%_libdir/lib%_name-%ver_major.so
%dir %_libdir/%_name-%ver_major
%dir %_libdir/%_name-%ver_major/plugins
%_libdir/%_name-%ver_major/plugins/*.so
%_iconsdir/hicolor/*/*/*
%_datadir/%_name-%ver_major
%_desktopdir/%_name.desktop
%_man1dir/*
%exclude %_libdir/abiword-%ver_major/plugins/*.la
%files devel
%_includedir/*
%_pkgconfigdir/*
%changelog
* Thu Nov 29 2012 Yuri N. Sedunov <aris@altlinux.org> 2.9.4-alt1
- first build for Sisyphus
This diff is collapsed. Click to expand it.
Please see the documentation in the docs/build directory. Thank you.
This file contains instructions on building, using and developing
AbiWord with bidi-rectional support and is maintained by Tomas Frydrych
<tomas@frydrych.uklinux.net> to whom comments, suggestions, and bug
fixes of the BiDi features should be directed.
Enabling BiDi during build
--------------------------
Bidi is now enabled by default.
Using BiDi
----------
The BiDi algorithm is Unicode-based, so that text is correctly
arranged as it is typed in. It uses the FriBidi library to calculate
the layout, which in turn follows the Unicode bidirectional algorithm.
When the user requires the text to be handled differently than the
Unicode algorithm prescribes, he or she can force any segment of the
text into a particular direction using two toolbar buttons (the three
bidi buttons are now located on the Extra toolbar).
The dominant direction of the paragraph can be selected either
using a third toolbar button, or from the Format->Paragraph
dialogue.
The 'Other' tab of the Preferences dialogue allows to change
the default direction; however, this change will only take place
when a new document is created or AbiWord restarted.
The other two bidi checkboxes in the preferences allow to turn
the shaping engine on and off, and to specify whether when
the shaping engine is used, it should only change the visual
output, or the actual document.
It should be noted that while the shaping engine supports Arabic,
in the Unix version this will only work under utf-8 locale with
Unicode fonts (see UnixLocale.txt and UnixFonts.txt); those wishing
to use Arabic with AW under an 8-bit locale will have to switch the
shaping engine off (as mentioned in the previous paragraph) and put
up with the basic letter forms (the shaping engine is very basic, and
will one day be replaced by something better, probably Pango).
TECHNICAL NOTES
===============
Brief Introduction to the BiDi Problem
--------------------------------------
Let's say that the user inputs a string 'abcd XYZ UVW klm' where
small letters represent text that is from left to right (ltr) while
capitals represent text that is right to left (rtl), and that the
overall direction of the document is ltr. The visual representation
of the string on the screen will need to be
'abcd WVU ZYX klm'
that is, the visual order is different than the order in which the
text was input, the logical order. The algorithm that is used to
work out the visual ordering is straight forward, but cannot be
applied to an arbitrary segment of the text. Rather it has to take into
account always an entire line, and this causes problem for software
that does not draw text in whole lines, such as AbiWord.
A chunk of text which has uniform attributes, such as font or colour,
is in AbiWord terminology called run. In BiDi mode, text in a run
has to be also of consistent direction, with three possible options:
ltr, rtl, and neutral. The last of these applies basically to whitespace,
which derives its actual direction from the context. The direction of
the run is worked out automatically from the Unicode value of a
character, but can be overridden by the user.
The heart of BiDi in AbiWord is built into fp_Line class (guess why?).
Each run of text stores its direction, and this is used by the function
fp_Line::_createMapOfRuns() to calculate the order of the runs belonging
to the particular line. The order is stored in an array that is used
to translate logical coordinates to visual ones and vice versa. Any
operations on the actual text buffer have to use logical order, while
any operations on the screen have to use visual order.
Each paragraph has also a new property, in AW called dom-dir (dominant
direction). This can be either ltr or rtl. The string of text we used
in the illustration earlier ('abcd XYZ UVW klm') will look differently,
if the overall direction is ltr, say an English document with a Hebrew
quote in it ('abcd WVU ZYX klm') or rtl, such as Hebrew document with
an English quote ('klm WVU ZYX abcd'). This paragraph property is in AW
always explicitly specified by the user, we do not use any heuristic
algorithm that would try to guess.
This really is all there is to BiDi, just sometimes it makes life more
complicated than this introduction might lead you to believe. For instance
the insertion point can appear on two places on the screen at the same time,
because the visual position of the next character to be input is the
function of the direction of this character, which we do not know, since
it has not been typed in yet :-). Or, things are more complicated if you
want to display say rtl quote in an ltr paragraph, but the quote itself
contains another ltr quote. Fortunately, the bulk of this work is done for
us by the well tested FriBidi library.
Developing BiDi
---------------
<This section was mostly obsolete, now that all builds are bidi builds>
Any new code should be 'littered' with asserts, because these
are great help in tracing bugs. In particular, put an assert in
before dereferencing any pointers; virtually all SIGSEGVs I have
experienced with BiDi in AW had to do with dereferencing 0 (we
often need to refer to things earlier than the non-BiDi version,
so sometimes these things do not exist yet).
This diff is collapsed. Click to expand it.
This tree contains copyrighted source code from a variety of sources.
In each instance, the copyright holder has released that source code
under some kind of license.
AbiWord's source code is distributed under the terms of the GNU General
Public License, a copy of which is included in the file called COPYING.
You should read this license carefully, as it defines your specific
rights regarding the use of covered source code, as well as the conditions
under which those rights are given to you.
This diff is collapsed. Click to expand it.
ACLOCAL_AMFLAGS = -I .
DIST_SUBDIRS = goffice-bits goffice-bits2 src plugins po user
if WITH_GOFFICE_BUILTIN
if TOOLKIT_GTK2
SUBDIRS = goffice-bits2
else
SUBDIRS = goffice-bits
endif
else
SUBDIRS =
endif
SUBDIRS += src plugins po user
if TOOLKIT_GTK_ALL
if !EMBEDDED_HILDON
desktopdir = $(datadir)/applications
desktop_DATA = abiword.desktop
endif
mimedir = @ABIWORD_DATADIR@/mime-info
mime_DATA = abiword.keys
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = abiword-$(ABIWORD_SERIES).pc
dist_man1_MANS = abiword.1
endif
if TOOLKIT_GTK
DISTCHECK_CONFIGURE_FLAGS = \
--enable-introspection=auto \
--with-gir-dir=\$${datadir}/gir-1.0 \
--with-typelib-dir=\$${libdir}/girepository-1.0
endif
icondir= $(ABIWORD_ICONDIR)
icon_DATA = abiword.png
EXTRA_DIST = \
AUTHORS \
BiDiReadme.txt \
BUILD.TXT \
COPYING \
COPYRIGHT.TXT \
INSTALL \
NEWS \
README \
ChangeLog \
abiword.desktop \
abiword.keys \
abiword.png \
libabiword.pc.in \
compile-resource \
lt-compile-resource
DISTCLEANFILES = \
abiword-$(ABIWORD_SERIES).pc \
plugin-builtin.m4 \
plugin-configure.m4 \
plugin-list.m4 \
plugin-makefiles.m4
abiword-$(ABIWORD_SERIES).pc: libabiword.pc
cp $< $@
if TOOLKIT_WIN
zip:
rm -rf $(PACKAGE)-$(VERSION)
make DESTDIR=$(abs_builddir)/zip install
mv zip$(prefix) $(PACKAGE)-$(VERSION)
cd $(PACKAGE)-$(VERSION)
zip -r $(PACKAGE)-$(VERSION).zip $(PACKAGE)-$(VERSION) -x \*.a \*.la
rm -rf $(PACKAGE)-$(VERSION) ./zip
endif
# needed to make sure we don't include .svn directories.
dist-hook:
rm -rf `find $(distdir) -name .svn`
This is the source tree for the AbiSource desktop productivity tools,
namely the AbiWord word processor.
Everything contained here is copyrighted and is available for your use
and redistribution under certain license terms. Please read
COPYRIGHT.TXT and TRADEMARK.TXT for more information.
Current information is available at http://www.abisource.com/.
This tree contains the following top-level subdirectories:
src
All source code is under here, including applications,
library modules, and third-party source code.
ac-helpers
Autoconf macros used by the autoconfiscated build system (configure).
docs
Documents related to the project. Includes specifications,
design documents, and the like. You should also find instructions
for how to build the tree in here, within the "build" subdirectory.
po
Localized strings for each locale we support, in PO format, as well
as scripts for conversion to and from Abi's native .strings files,
which are the files actually used directly by the program(s). PO
files are maintained as a convenience for translators, many of whom
are already accustomed to working with them (as opposed to .strings).
regtest
Regression testing tools (scripts, documents, and the like) reside
here.
test
Test files for AbiWord (not explicitly part of regression testing).
user
Support files, other than code, which need to be installed
on the user's machine, are stored in here. Items which
are too large to be practical do not necessarily go here,
such as the fonts.
.\" -*- nroff -*-
.\" vim:set tw=78 noet:
.\" Copyright 1998-2004 AbiSource, Inc.
.\" AbiWord and AbiSource are trademarks of
.\" AbiSource, Inc.
.\"
.\" AbiWord is free software; you can redistribute it
.\" and/or modify it under the terms of the GNU General
.\" Public License as published by the Free Software
.\" Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the
.\" implied warranty of MERCHANTABILITY or FITNESS
.\" FOR A PARTICULAR PURPOSE. See the GNU General
.\" Public License for more details.
.\"
.\" Copyright 2009 Patrik Fimml
.
.TH ABIWORD 1 "2012-04-26" "AbiWord 2.9"
.
.SH NAME
abiword \(em flexible cross-platform word processor
.
.SH SYNOPSIS
.B abiword
.RI [ OPTIONS ]
.RI [ FILENAME... ]
.
.SH DESCRIPTION
AbiWord is a full-featured, efficient word processing application suitable for
a wide range of word processing tasks, and extensible with a variety of
plugins. It integrates with
.BR enchant (1)
to provide spell-checking.
.
.SH OPTIONS
.TP
.BI "\-g " W\fRx\fIH\fR[+\fIX\fR+\fIY\fR] "\fR,\fB \-\-geometry=" W\fRx\fIH\fR[+\fIX\fR+\fIY\fR]
Specifies window geometry at startup.
.TP
.BI "\-E " PLUGIN "\fR,\fB \-\-plugin=" PLUGIN
Execute the specified plugin instead of the main application.
.TP
.BI \-\-import\-extension= EXT
Import the given file as if it had extension \fIEXT\fR, overriding automatic
file type detection.
.TP
.BI "\-u " PROFILE "\fR,\fB \-\-userprofile=" PROFILE
Use \fIPROFILE\fR to read and store settings instead of the default
.BR XDG_CONFIG_HOME /abiword/profile.
.TP
.BI "\-t " DEST "\fR,\fB \-\-to=" DEST
Convert the given file to another format, writing the result to
.IR DEST .
The format of
.I DEST
is determined by its extension.
.br
See also \fB\-\-to=\fIFORMAT\fR and \fB\-\-to\-name\fR.
.TP
.BI "\-t " FORMAT "\fR,\fB \-\-to=" FORMAT
Convert the given files(s) to the given format. Unless explicitly specified
with \fB\-\-to\-name\fR, the original filename will be used (with a different
extension, if necessary). See also \fBEXAMPLES\fR.
.RS
.TP
The more popular values for \fIFORMAT\fR include:
.TS
lb lx.
abw T{
Abiword XML format (\fBzabw\fR for gzip, \fBbzabw\fR for bzip2 compression)
T}
dbk DocBook XML
doc Microsoft Word binary format
docx T{
Office Open XML (newer Microsoft Word versions)
T}
html Hypertext Markup Language
kwd KWord
odt OpenDocument Text
pdf Portable Document Format
rtf Rich Text Format
sxw OpenOffice.org Writer 1.0
txt Plain text
.TE
.RE
.TP
.BI \-\-to\-name= DEST
Only useful in conjunction with
.BI \-\-to= FORMAT \fR.
Specifies where the converted document shall be written to.
.TP
.BI \-\-verbose= LEVEL
Set level of verbosity [0\-2], 2 giving the most detailed output.
.TP
.B \-h\fR,\fB \-\-help
Display a short help message and exit.
.TP
.B \-\-version
Report the version of AbiWord.
.
.SH ENVIRONMENT VARIABLES
.TP
.B HOME
Defines the user's home directory.
.TP
.B XDG_CONFIG_HOME
Defines the base directory relative to which user specific configuration
files should be stored. (See the
.I XDG Base Directory Specification
for details.)
.
.SH FILES
.TP
.B XDG_CONFIG_HOME/abiword/profile
The default user profile file. (If \fBXDG_CONFIG_HOME\fR is either not set or
empty, a default equal to
.BR HOME "/.config will be used.)"
.
.SH EXAMPLES
To convert the document \fIexample.abw\fR to RTF:
.in +4n
abiword \-\-to=rtf example.abw
.in
The resulting file will be named \fIexample.rtf\fR.
.P
To print a document:
.in +4n
abiword \-\-to=ps \-\-to\-name=fd://1 \fIFILENAME\fR | lp
.in
.
.SH REPORTING BUGS
Report bugs to the Bugzilla bug tracking system at
.RI < http://bugzilla.abisource.com >.
.SH SEE ALSO
.BR enchant (1)
.SH HISTORY
AbiWord was started in 1998 by AbiSource Inc., a company founded by SourceGear
corporation. The initial plan was to build a free office suite named AbiSuite,
encompassing word processing, spreadsheet and presentation applications. As
they didn't have a usable product when their venture capital was up, the code
already developed (namely AbiWord) was made open source. AbiWord development
was subsequently taken over by volunteers and is driven by the community to
date.
[Desktop Entry]
Exec=abiword %U
Icon=abiword
Terminal=false
Type=Application
Categories=Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base;
StartupNotify=true
X-Desktop-File-Install-Version=0.9
MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;
Name=AbiWord
GenericName=Word Processor
Comment=Compose, edit, and view documents
Comment[de]=AbiWord Textverarbeitung
GenericName[es]=Procesador de textos
Comment[es]=Procesador de textos Abiword
GenericName[fr]=Traitement de texte
Comment[fr]=Traitement de texte de Gnome Office
Comment[nb]=AbiWord Tekstbehandling
Comment[nl]=AbiWord tekstverwerker
Comment[nn]=AbiWord Tekstbehandling
Comment[no]=AbiWord Tekstbehandler
Comment[pl]=Edytor tekstu AbiWord
Comment[pt]=AbiWord Processador de Texto
GenericName[ru]=Текстовый редактор
Comment[ru]=Обработка форматированных текстовых документов
Comment[ja]=AbiWord ワードプロセッサ
application/x-abiword:
open=abiword %f
view=abiword %f
application/msword:
open=abiword %f
view=abiword %f
application/rtf:
open=abiword %f
view=abiword %f
#!/bin/sh
# Script to compile a resource file for a DLL if there is a .rc file
# for it. The resource source file is supposed to contain a version
# info section, that uses the string BUILDNUMBER as the least
# significant part of the version numbers. This script replaces that
# string with a "build number" before compiling the binary resource
# file. The build number is kept between builds in a "stamp" file, and
# incremented each time. (If there is no stamp file, build number 0 is
# used.) The intention is that only the "official" maintainer of a DLL
# keeps such a stamp file, and thus the DLLs he releases have
# increasing version number resources, which can be used by an
# installer program to decide whether to replace an existing DLL with
# the same name.
# This is just my (tml@iki.fi) idea, if somebody comes up with a
# better way to generate version number resources, don't hesitate to
# suggest.
# The command line arguments are:
# $1: the name of the .rc file to check
# $2: the name of the resource object file to produce, if the rc file exists
# Check if we have a resource file for this DLL.
rcfile=$1
resfile=$2
if [ -f $rcfile ]; then
# Check if we have a build number stamp file.
basename=`basename $rcfile .rc`
if [ -f $basename-build.stamp ]; then
read number <$basename-build.stamp
buildnumber=$[number]
echo Build number $buildnumber
rm -rf $basename-build.stamp
else
echo Using zero as build number
buildnumber=0
fi
m4 -DBUILDNUMBER=$buildnumber <$rcfile >$$.rc &&
echo "${WINDRES-windres} ${CPPFLAGS} $$.rc $resfile" &&
${WINDRES-windres} ${CPPFLAGS} $$.rc $resfile &&
rm $$.rc
else
# Return failure
exit 1
fi
/* config.h.in. Generated from configure.in by autoheader. */
/* major.minor */
#undef ABIWORD_SERIES
/* Define to enable debugging functionality */
#undef DEBUG
/* Define to prevent symbols from being exported dynamically */
#undef DISABLE_EXPORTS
/* Whether we are building for embedded device */
#undef EMBEDDED_TARGET
/* Generic embedded platform */
#undef EMBEDDED_TARGET_GENERIC
/* Hildon embedded platform */
#undef EMBEDDED_TARGET_HILDON
/* Poky embedded platform */
#undef EMBEDDED_TARGET_POKY
/* Define to enable include emacs-compatible keyboard commands */
#undef ENABLE_EMACS_KEYBINDING
/* Define if building menu button support */
#undef ENABLE_MENUBUTTON
/* Define if building printing support */
#undef ENABLE_PRINT
/* Define if building spell checking support */
#undef ENABLE_SPELL
/* Define if building status bar */
#undef ENABLE_STATUSBAR
/* Define to enable include vi-compatible keyboard commands */
#undef ENABLE_VI_KEYBINDING
/* Define to 1 if you have the <asio.hpp> header file. */
#undef HAVE_ASIO_HPP
/* define if the Boost library is available */
#undef HAVE_BOOST
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <eps/eps.h> header file. */
#undef HAVE_EPS_EPS_H
/* Use gcrypt for the cryptos */
#undef HAVE_GCRYPT
/* GSF has GIO support */
#undef HAVE_GSF_GIO
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
#undef HAVE_LIBJPEG
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <tidy/tidy.h> header file. */
#undef HAVE_TIDY_TIDY_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
#undef HAVE_VALGRIND_MEMCHECK_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to disable debugging functionality */
#undef NDEBUG
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The platform that is compiled for */
#undef PLATFORM
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* The toolkit that is used */
#undef TOOLKIT
/* Build cocoa user interface */
#undef TOOLKIT_COCOA
/* Build gtk+ user interface */
#undef TOOLKIT_GTK
/* Build gtk+ user interface */
#undef TOOLKIT_GTK2
/* Build gtk+ user interface */
#undef TOOLKIT_GTK_ALL
/* Build win32 user interface */
#undef TOOLKIT_WIN
/* Build a full unicode AbiWord */
#undef UNICODE
/* Version number of package */
#undef VERSION
/* Using Cairo */
#undef WITH_CAIRO
/* Using champlain */
#undef WITH_CHAMPLAIN
/* use Dom's enchanting spell checker abstraction library */
#undef WITH_ENCHANT
/* Using evolution_data_server */
#undef WITH_EVOLUTION_DATA_SERVER
/* Define if using GIO */
#undef WITH_GIO
/* Define if using gnome-vfs */
#undef WITH_GNOMEVFS
/* Define if using goffice */
#undef WITH_GOFFICE
/* Using libical */
#undef WITH_LIBICAL
/* Using redland */
#undef WITH_REDLAND
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#undef YYTEXT_POINTER
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
#undef _UINT32_T
/* minimal comctl.dll v4.70 for toolbars */
#undef _WIN32_IE
/* support collaboration plugin in Windows 2000 or higher */
#undef _WIN32_WINNT
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* Define to the type of an unsigned integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
#undef uint32_t
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
Jody Goldberg, maintainer.
Jean Brefort, Core charting engine.
Emmanuel Pacaud, Many plot types for charting engine.
Morten Welinder, Gnumeric hacker and leak plugging demi-god.
Chris Lahey, number format engine, and powerpoint/escher code
NOTE : Keep this in sync with the about dialog and the webpage.
NOTE : Get an about dialog and a webpage :-)
This source diff could not be displayed because it is too large. You can view the blob instead.
noinst_LTLIBRARIES = libgoffice.la
AM_CPPFLAGS = \
$(DEPS_CFLAGS)
libgoffice_la_SOURCES = \
goffice/goffice-config.h \
goffice/goffice-features.h \
goffice/goffice-priv.h \
goffice/goffice.h \
goffice/goffice.c \
goffice/app/goffice-app.h \
goffice/app/go-cmd-context.h \
goffice/app/go-cmd-context.c \
goffice/app/go-cmd-context-impl.h \
goffice/app/error-info.c \
goffice/app/error-info.h \
goffice/gtk/goffice-gtk.h \
goffice/gtk/goffice-gtk.c \
goffice/gtk/go-color-palette.h \
goffice/gtk/go-color-palette.h \
goffice/gtk/go-color-palette.c \
goffice/gtk/go-color-group.h \
goffice/gtk/go-color-group.c \
goffice/gtk/go-combo-box.h \
goffice/gtk/go-combo-box.c \
goffice/gtk/go-combo-color.h \
goffice/gtk/go-combo-color.c \
goffice/utils/goffice-utils.h \
goffice/utils/go-glib-extras.h \
goffice/utils/go-glib-extras.c \
goffice/utils/go-image.h \
goffice/utils/go-image.c \
goffice/utils/go-marshalers.h \
goffice/utils/go-marshalers.c \
goffice/utils/go-file.h \
goffice/utils/go-file.c \
goffice/utils/go-locale.c \
goffice/utils/go-locale.h \
goffice/utils/go-cairo.c \
goffice/utils/go-cairo.h \
goffice/utils/go-color.h \
goffice/utils/go-color.c
BUILT_SOURCES = goffice-paths.h
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
AUTHORS \
ChangeLog \
COPYING \
README \
README.abiword
# Depends on this Makefile, because it uses make variables.
goffice-paths.h: Makefile
@echo 'creating $@'
@( \
echo '/* This file has been automatically generated. Do not edit. */'; \
echo ''; \
echo '#ifndef GOFFICE_PATHS_H'; \
echo '#define GOFFICE_PATHS_H'; \
echo ''; \
echo '#define GOFFICE_DATADIR "$(goffice_datadir)"'; \
echo '#define GOFFICE_LIBDIR "$(goffice_libdir)"'; \
echo '#define GOFFICE_ICONDIR "$(goffice_icondir)"'; \
echo '#define GOFFICE_LOCALEDIR "$(goffice_localedir)"'; \
echo ''; \
echo '#endif /* GOFFICE_PATHS_H */'; \
) >$@
GOffice -- A glib/gtk set of document centric objects and utilities
Jody Goldberg <jody@gnome.org>
There are common operations for document centric applications that are
conceptually simple, but complex to implement fully.
- plugins
- load/save documents
- undo/redo
To report goffice bugs, please visit bugzilla.gnome.org.
goffice is licensed under the terms of the GNU GPL included in the
file COPYING.
Requirements
------------
You need: Debian package name
glib >= 2.6.0 libglib2.0-dev
gtk+ >= 2.6.0 libgtk2.0-dev
pango >= 1.8.1 libpango1.0-dev
libgnomeprint >= 2.8.2 libgnomeprint2.2-dev
libgsf >= 1.13.3 libgsf-1-dev
libglade >= 2.3.6 libglade2-dev
gnome-xml >= 2.4.12 libxml2-dev
libart >= 2.3.11 libart-2.0-dev
NOTE: gnome-xml is also known as libxml
Mailing lists
-------------
There is a mailing list used to discuss Gnumeric, to subscribe
send a mail to:
gnumeric-list-request@gnome.org
And in the body of the message write "subscribe"
An archive of the mailing lists is available in:
http://mail.gnome.org/archives/gnumeric-list/
This directory contains some code from the goffice library.
When adding stuff maintain goffice's directory structure so switching
between this builtin and the system version doesn't break.
- Rob
/*
* error-info.c: GOErrorInfo structure.
*
* Author:
* Zbigniew Chyla (cyba@gnome.pl)
*/
#include <goffice/goffice-config.h>
#include <goffice/app/error-info.h>
#include <stdio.h>
#include <errno.h>
struct _GOErrorInfo {
gchar *msg;
GOSeverity severity;
GSList *details; /* list of GOErrorInfo */
};
GOErrorInfo *
go_error_info_new_str (char const *msg)
{
GOErrorInfo *error = g_new (GOErrorInfo, 1);
error->msg = g_strdup (msg);
error->severity = GO_ERROR;
error->details = NULL;
return error;
}
GOErrorInfo *
go_error_info_new_vprintf (GOSeverity severity, char const *msg_format,
va_list args)
{
GOErrorInfo *error;
g_return_val_if_fail (severity >= GO_WARNING, NULL);
g_return_val_if_fail (severity <= GO_ERROR, NULL);
error = g_new (GOErrorInfo, 1);
error->msg = g_strdup_vprintf (msg_format, args);
error->severity = severity;
error->details = NULL;
return error;
}
GOErrorInfo *
go_error_info_new_printf (char const *msg_format, ...)
{
GOErrorInfo *error;
va_list args;
va_start (args, msg_format);
error = go_error_info_new_vprintf (GO_ERROR, msg_format, args);
va_end (args);
return error;
}
GOErrorInfo *
go_error_info_new_str_with_details (char const *msg, GOErrorInfo *details)
{
GOErrorInfo *error = go_error_info_new_str (msg);
go_error_info_add_details (error, details);
return error;
}
GOErrorInfo *
go_error_info_new_str_with_details_list (char const *msg, GSList *details)
{
GOErrorInfo *error = go_error_info_new_str (msg);
go_error_info_add_details_list (error, details);
return error;
}
GOErrorInfo *
go_error_info_new_from_error_list (GSList *errors)
{
GOErrorInfo *error;
switch (g_slist_length (errors)) {
case 0:
error = NULL;
break;
case 1:
error = (GOErrorInfo *) errors->data;
g_slist_free (errors);
break;
default:
error = go_error_info_new_str_with_details_list (NULL, errors);
break;
}
return error;
}
GOErrorInfo *
go_error_info_new_from_errno (void)
{
return go_error_info_new_str (g_strerror (errno));
}
void
go_error_info_add_details (GOErrorInfo *error, GOErrorInfo *details)
{
g_return_if_fail (error != NULL);
if (details == NULL)
;
else if (details->msg == NULL) {
error->details = g_slist_concat (error->details, details->details);
g_free (details);
} else
error->details = g_slist_append (error->details, details);
}
void
go_error_info_add_details_list (GOErrorInfo *error, GSList *details)
{
GSList *new_details_list, *l, *ll;
g_return_if_fail (error != NULL);
new_details_list = NULL;
for (l = details; l != NULL; l = l->next) {
GOErrorInfo *details_error = l->data;
if (details_error->msg == NULL) {
for (ll = details_error->details; ll != NULL; ll = ll->next)
new_details_list = g_slist_prepend (new_details_list, l->data);
g_free (details_error);
} else
new_details_list = g_slist_prepend (new_details_list, details_error);
}
g_slist_free (details);
new_details_list = g_slist_reverse (new_details_list);
error->details = g_slist_concat (error->details, new_details_list);
}
void
go_error_info_free (GOErrorInfo *error)
{
GSList *l;
if (error == NULL)
return;
g_free (error->msg);
for (l = error->details; l != NULL; l = l->next)
go_error_info_free ((GOErrorInfo *) l->data);
g_slist_free (error->details);
g_free(error);
}
static void
go_error_info_print_with_offset (GOErrorInfo *error, gint offset)
{
GSList *l;
g_return_if_fail (error != NULL);
if (error->msg != NULL) {
char c = 'E';
if (error->severity == GO_WARNING)
c = 'W';
g_printerr ("%*s%c %s\n", offset, "", c, error->msg);
offset += 2;
}
for (l = error->details; l != NULL; l = l->next)
go_error_info_print_with_offset ((GOErrorInfo *) l->data, offset);
}
void
go_error_info_print (GOErrorInfo *error)
{
g_return_if_fail (error != NULL);
go_error_info_print_with_offset (error, 0);
}
char const *
go_error_info_peek_message (GOErrorInfo *error)
{
g_return_val_if_fail (error != NULL, NULL);
return error->msg;
}
GSList *
go_error_info_peek_details (GOErrorInfo *error)
{
g_return_val_if_fail (error != NULL, NULL);
return error->details;
}
GOSeverity
go_error_info_peek_severity (GOErrorInfo *error)
{
g_return_val_if_fail (error != NULL, GO_ERROR);
return error->severity;
}
#ifndef GO_ERROR_INFO_H
#define GO_ERROR_INFO_H
#include <goffice/app/goffice-app.h>
#include <glib.h>
G_BEGIN_DECLS
typedef enum {
GO_WARNING = 1,
GO_ERROR
} GOSeverity;
GOErrorInfo *go_error_info_new_str (char const *msg);
GOErrorInfo *go_error_info_new_printf (char const *msg_format, ...) G_GNUC_PRINTF (1, 2);
GOErrorInfo *go_error_info_new_vprintf (GOSeverity severity,
char const *msg_format,
va_list args);
GOErrorInfo *go_error_info_new_str_with_details (char const *msg, GOErrorInfo *details);
GOErrorInfo *go_error_info_new_str_with_details_list (char const *msg, GSList *details);
GOErrorInfo *go_error_info_new_from_error_list (GSList *errors);
GOErrorInfo *go_error_info_new_from_errno (void);
void go_error_info_add_details (GOErrorInfo *error, GOErrorInfo *details);
void go_error_info_add_details_list (GOErrorInfo *error, GSList *details);
void go_error_info_free (GOErrorInfo *error);
void go_error_info_print (GOErrorInfo *error);
char const*go_error_info_peek_message (GOErrorInfo *error);
GSList *go_error_info_peek_details (GOErrorInfo *error);
GOSeverity go_error_info_peek_severity (GOErrorInfo *error);
#define GO_INIT_RET_ERROR_INFO(ret_error) \
G_STMT_START { \
g_assert (ret_error != NULL); \
*ret_error = NULL; \
} G_STMT_END
G_END_DECLS
#endif /* GO_ERROR_INFO_H */
#ifndef GO_CMD_CONTEXT_IMPL_H
#define GO_CMD_CONTEXT_IMPL_H
#include <goffice/app/go-cmd-context.h>
G_BEGIN_DECLS
typedef struct {
GTypeInterface base;
char * (*get_password) (GOCmdContext *gcc,
char const *filename);
void (*set_sensitive) (GOCmdContext *gcc,
gboolean sensitive);
struct {
void (*error) (GOCmdContext *gcc, GError *err);
void (*error_info) (GOCmdContext *gcc, GOErrorInfo *err);
} error;
void (*progress_set) (GOCmdContext *gcc, double val);
void (*progress_message_set) (GOCmdContext *gcc, gchar const *msg);
/* This should really go into the error struct! */
void (*error_info_list) (GOCmdContext *gcc, GSList *errs);
} GOCmdContextClass;
#define GO_CMD_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GO_TYPE_CMD_CONTEXT, GOCmdContextClass))
#define GO_IS_CMD_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GO_TYPE_CMD_CONTEXT))
/* protected, these do not really belong here, they are associated with io-context */
void go_cmd_context_progress_set (GOCmdContext *gcc, double f);
void go_cmd_context_progress_message_set (GOCmdContext *gcc, char const *msg);
G_END_DECLS
#endif /* GO_CMD_CONTEXT_IMPL_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-cmd-context.c : Error dispatch utilities.
*
* Author:
* Jody Goldberg <jody@gnome.org>
*
* (C) 1999-2004 Jody Goldberg
*/
#include <goffice/goffice-config.h>
#include "go-cmd-context-impl.h"
#include <goffice/app/goffice-app.h>
#include <gsf/gsf-impl-utils.h>
#include <glib/gi18n-lib.h>
#define GCC_CLASS(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GO_TYPE_CMD_CONTEXT, GOCmdContextClass))
static GError *
format_message (GQuark id, char const *message)
{
char const *msg = message ? message : "";
return g_error_new_literal (id, 0, msg);
}
void
go_cmd_context_error (GOCmdContext *context, GError *err)
{
g_return_if_fail (GO_IS_CMD_CONTEXT (context));
GCC_CLASS (context)->error.error (context, err);
}
void
go_cmd_context_error_info (GOCmdContext *context, GOErrorInfo *stack)
{
g_return_if_fail (GO_IS_CMD_CONTEXT (context));
GCC_CLASS (context)->error.error_info (context, stack);
}
void
go_cmd_context_error_info_list (GOCmdContext *cc, GSList *stack)
{
g_return_if_fail (GO_IS_CMD_CONTEXT (cc));
GCC_CLASS (cc)->error_info_list (cc, stack);
}
void
go_cmd_context_error_system (GOCmdContext *context, char const *message)
{
GError *err = format_message (go_error_system (), message);
go_cmd_context_error (context, err);
g_error_free (err);
}
void
go_cmd_context_error_import (GOCmdContext *context, char const *message)
{
GError *err = format_message (go_error_import (), message);
go_cmd_context_error (context, err);
g_error_free (err);
}
void
go_cmd_context_error_export (GOCmdContext *context, char const *message)
{
GError *err = format_message (go_error_export (), message);
go_cmd_context_error (context, err);
g_error_free (err);
}
void
go_cmd_context_error_invalid (GOCmdContext *context, char const *msg, char const *val)
{
GError *err = g_error_new (go_error_invalid(), 0, _("Invalid %s: '%s'"), msg, val);
go_cmd_context_error (context, err);
g_error_free (err);
}
GQuark
go_error_system (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_system");
return quark;
}
GQuark
go_error_import (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_import");
return quark;
}
GQuark
go_error_export (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_export");
return quark;
}
GQuark
go_error_invalid (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_invalid");
return quark;
}
void
go_cmd_context_progress_set (GOCmdContext *context, double f)
{
g_return_if_fail (GO_IS_CMD_CONTEXT (context));
if (GCC_CLASS (context)->progress_set)
GCC_CLASS (context)->progress_set (context, f);
}
void
go_cmd_context_progress_message_set (GOCmdContext *context, gchar const *msg)
{
g_return_if_fail (GO_IS_CMD_CONTEXT (context));
if (msg == NULL)
msg = " ";
if (GCC_CLASS (context)->progress_message_set)
GCC_CLASS (context)->progress_message_set (context, msg);
}
char *
go_cmd_context_get_password (GOCmdContext *cc, char const *filename)
{
g_return_val_if_fail (GO_IS_CMD_CONTEXT (cc), NULL);
return GCC_CLASS (cc)->get_password
? GCC_CLASS (cc)->get_password (cc, filename)
: NULL;
}
void
go_cmd_context_set_sensitive (GOCmdContext *cc, gboolean sensitive)
{
g_return_if_fail (GO_IS_CMD_CONTEXT (cc));
if (GCC_CLASS (cc)->set_sensitive)
GCC_CLASS (cc)->set_sensitive (cc, sensitive);
}
static void
go_cmd_context_error_info_list_default (GOCmdContext *gcc, GSList *errs)
{
if (errs == NULL)
go_cmd_context_error_info (gcc, NULL);
else
go_cmd_context_error_info (gcc, g_slist_last (errs)->data);
}
static void
go_cmd_context_base_init (GOCmdContextClass *class)
{
class->error_info_list = go_cmd_context_error_info_list_default;
}
GType
go_cmd_context_get_type (void)
{
static GType go_cmd_context_type = 0;
if (!go_cmd_context_type) {
static GTypeInfo const go_cmd_context_info = {
sizeof (GOCmdContextClass), /* class_size */
(GBaseInitFunc) go_cmd_context_base_init, /* base_init */
NULL, /* base_finalize */
NULL, NULL, NULL, 0, 0, NULL, NULL
};
go_cmd_context_type = g_type_register_static (G_TYPE_INTERFACE,
"GOCmdContext", &go_cmd_context_info, 0);
}
return go_cmd_context_type;
}
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-cmd-context.h:
*
* Copyright (C) 2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GO_CMD_CONTEXT_H
#define GO_CMD_CONTEXT_H
#include <goffice/app/goffice-app.h>
#include <glib-object.h>
G_BEGIN_DECLS
#define GO_TYPE_CMD_CONTEXT (go_cmd_context_get_type ())
#define GO_CMD_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_CMD_CONTEXT, GOCmdContext))
#define GO_IS_CMD_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_CMD_CONTEXT))
GType go_cmd_context_get_type (void);
void go_cmd_context_error (GOCmdContext *cc, GError *err);
char *go_cmd_context_get_password (GOCmdContext *cc, char const *fname);
void go_cmd_context_set_sensitive (GOCmdContext *cc, gboolean flag);
/* utility routines for common errors */
void go_cmd_context_error_system (GOCmdContext *cc, char const *msg);
void go_cmd_context_error_import (GOCmdContext *cc, char const *msg);
void go_cmd_context_error_export (GOCmdContext *cc, char const *msg);
void go_cmd_context_error_invalid (GOCmdContext *cc,
char const *msg, char const *val);
void go_cmd_context_error_info (GOCmdContext *cc, GOErrorInfo *stack);
void go_cmd_context_error_info_list (GOCmdContext *cc, GSList *stack);
/* An initial set of std errors */
GQuark go_error_system (void);
GQuark go_error_import (void);
GQuark go_error_export (void);
GQuark go_error_invalid (void);
G_END_DECLS
#endif /* GO_CMD_CONTEXT_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice-app.h:
*
* Copyright (C) 2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GOFFICE_APP_H
#define GOFFICE_APP_H
#include <glib.h>
G_BEGIN_DECLS
typedef struct _GOApp GOApp;
typedef struct _GODoc GODoc;
typedef struct _GODocControl GODocControl;
typedef struct _GOCmdContext GOCmdContext;
typedef struct _GOPlugin GOPlugin;
typedef struct _GOPluginService GOPluginService;
typedef struct _GOPluginLoader GOPluginLoader;
/* temporary */
typedef struct _ErrorInfo ErrorInfo;
typedef struct _GOErrorInfo GOErrorInfo;
typedef struct _GOFileSaver GOFileSaver;
typedef struct _GOFileOpener GOFileOpener;
typedef struct _IOContext IOContext;
/*
* File probe level tells file opener (its probe method to be exact), how
* hard it should try to recognize the type of the file. File openers may
* ignore this or support only some probe levels, but if specifies
* "reccomened" behaviour.
* Before opening any file we detect its type by calling probe for
* every registered file opener (in order of priority) and passing
* FILE_PROBE_FILE_NAME as probe level. If none of them recogizes the file,
* we increase probe level and try again...
*/
typedef enum {
FILE_PROBE_FILE_NAME, /* Test only file name, don't read file contents */
FILE_PROBE_CONTENT, /* Read the whole file if it's necessary */
FILE_PROBE_LAST
} FileProbeLevel;
#include <goffice/app/go-cmd-context.h>
#include <goffice/app/error-info.h>
G_END_DECLS
#endif /* GOFFICE_GRAPH_H */
/* goffice/goffice-config.h. Generated by configure. */
/* goffice/goffice-config.h.in. Generated from configure.in by autoheader. */
/* always defined to indicate that i18n is enabled */
#define ENABLE_NLS 1
/* The package name, for gettext */
#define GETTEXT_PACKAGE "goffice-0.3.1"
/* Define if G Office supplies acosh. */
/* #undef GOFFICE_SUPPLIED_ACOSH */
/* Define if G Office supplies asinh. */
/* #undef GOFFICE_SUPPLIED_ASINH */
/* Define if G Office supplies atanh. */
/* #undef GOFFICE_SUPPLIED_ATANH */
/* Define if G Office supplies expm1. */
/* #undef GOFFICE_SUPPLIED_EXPM1 */
/* Define if G Office supplies frexpl. */
/* #undef GOFFICE_SUPPLIED_FREXPL */
/* Define if G Office supplies ldexpl. */
/* #undef GOFFICE_SUPPLIED_LDEXPL */
/* Define if G Office supplies log1p. */
/* #undef GOFFICE_SUPPLIED_LOG1P */
/* Define if G Office supplies modfl. */
/* #undef GOFFICE_SUPPLIED_MODFL */
/* Define if G Office supplies strtold. */
#define GOFFICE_SUPPLIED_STRTOLD 1
/* The version number of this release, possibly with additional suffix */
#define GOFFICE_VERSION "0.3.1"
/* Define if goffice use cairo */
/* #undef GOFFICE_WITH_CAIRO */
/* Define if GNOME extensions are available */
/* #undef GOFFICE_WITH_GNOME */
/* Define if UI is built */
#define GOFFICE_WITH_GTK 1
/* Define if G Office supports long double. */
#define GOFFICE_WITH_LONG_DOUBLE 1
/* The Epoch of this release */
#define GO_VERSION_EPOCH 0
/* Extra, possibly empty tag for this release */
#define GO_VERSION_EXTRA ""
/* The Major version number of this release */
#define GO_VERSION_MAJOR 3
/* The Minor version number of this release */
#define GO_VERSION_MINOR 1
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
/* Define to 1 if you have the `dcgettext' function. */
#define HAVE_DCGETTEXT 1
/* Define to 1 if you have the `decimal_to_quadruple' function. */
/* #undef HAVE_DECIMAL_TO_QUADRUPLE */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `drand48' function. */
#define HAVE_DRAND48 1
/* Define if the finite function is available */
#define HAVE_FINITE 1
/* Define to 1 if you have the <floatingpoint.h> header file. */
/* #undef HAVE_FLOATINGPOINT_H */
/* Define if the GNU gettext() function is already present or preinstalled. */
#define HAVE_GETTEXT 1
/* Define if the gettimeofday function is available */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1
/* Define to 1 if you have the `gtk_dialog_get_response_for_widget' function.
*/
#define HAVE_GTK_DIALOG_GET_RESPONSE_FOR_WIDGET 1
/* Define if g_access is available as macro or function */
#define HAVE_G_ACCESS 1
/* Define if g_chmod is available as macro or function */
#define HAVE_G_CHMOD 1
/* Define to 1 if you have the <ieee754.h> header file. */
#define HAVE_IEEE754_H 1
/* Define to 1 if you have the <ieeefp.h> header file. */
/* #undef HAVE_IEEEFP_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define if the isfinite() macro is available */
#define HAVE_ISFINITE 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define if your <locale.h> file defines LC_MESSAGES. */
#define HAVE_LC_MESSAGES 1
/* Define to 1 if you have the `intl' library (-lintl). */
/* #undef HAVE_LIBINTL */
/* Define to 1 if you have the `m' library (-lm). */
/* #undef HAVE_LIBM */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if the log function is available */
#define HAVE_LOG 1
/* Define to 1 if long double works and has more range or precision than
double. */
#define HAVE_LONG_DOUBLE 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkdtemp' function. */
#define HAVE_MKDTEMP 1
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define if libXrender is available. */
#define HAVE_RENDER 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `string_to_decimal' function. */
/* #undef HAVE_STRING_TO_DECIMAL */
/* Define to 1 if you have the `strtold' function. */
#define HAVE_STRTOLD 1
/* Define to 1 if you have the `strtoll' function. */
#define HAVE_STRTOLL 1
/* Define to 1 if you have the `strtoq' function. */
#define HAVE_STRTOQ 1
/* Define to 1 if you have the <sunmath.h> header file. */
/* #undef HAVE_SUNMATH_H */
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `times' function. */
#define HAVE_TIMES 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "goffice"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=libgoffice"
/* Define to the full name of this package. */
#define PACKAGE_NAME "goffice"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "goffice 0.3.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "goffice"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.1"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.3.1"
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#define YYTEXT_POINTER 1
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Don't include goffice-features.h, it's a subset of goffice-config.h. */
#define GOFFICE_FEATURES_H
/* goffice/goffice-features.h. Generated by configure. */
/*
* goffice-features.h.in:
*
* Copyright (C) 2005 Morten Welinder (terra@gnome.org)
*/
#ifndef GOFFICE_FEATURES_H
#define GOFFICE_FEATURES_H
/* Define if G Office supports long double. */
#define GOFFICE_WITH_LONG_DOUBLE 1
/* Define if G Office supplies acosh. */
/* #undef GOFFICE_SUPPLIED_ACOSH */
/* Define if G Office supplies asinh. */
/* #undef GOFFICE_SUPPLIED_ASINH */
/* Define if G Office supplies atanh. */
/* #undef GOFFICE_SUPPLIED_ATANH */
/* Define if G Office supplies expm1. */
/* #undef GOFFICE_SUPPLIED_EXPM1 */
/* Define if G Office supplies frexpl. */
/* #undef GOFFICE_SUPPLIED_FREXPL */
/* Define if G Office supplies ldexpl. */
/* #undef GOFFICE_SUPPLIED_LDEXPL */
/* Define if G Office supplies modfl. */
/* #undef GOFFICE_SUPPLIED_MODFL */
/* Define if G Office supplies strtold. */
#define GOFFICE_SUPPLIED_STRTOLD 1
/* The version number of this release, possibly with additional suffix */
#define GOFFICE_VERSION "0.3.1"
/* The Epoch of this release */
#define GO_VERSION_EPOCH 0
/* The Major version number of this release */
#define GO_VERSION_MAJOR 3
/* The Minor version number of this release */
#define GO_VERSION_MINOR 1
/* Extra, possibly empty tag for this release */
#define GO_VERSION_EXTRA ""
/* Define if GOffice uses Cairo */
/* #undef GOFFICE_WITH_CAIRO */
/* Define if GOffice uses Gtk+ */
#define GOFFICE_WITH_GTK 1
/* Define if GOffice uses Gnome */
/* #undef GOFFICE_WITH_GNOME */
#endif /* GOFFICE_FEATURES_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice-priv.h :
*
* Copyright (C) 2005 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GOFFICE_PRIV_H
#define GOFFICE_PRIV_H
#include <glib.h>
G_BEGIN_DECLS
gchar const *go_sys_data_dir (void);
gchar const *go_sys_icon_dir (void);
gchar const *go_sys_lib_dir (void);
G_END_DECLS
#endif /* GOFFICE_PRIV_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice.c : a bogus little init file to pull all the parts together
*
* Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#include <goffice/goffice-config.h>
#include <goffice/goffice.h>
#include <goffice/goffice-priv.h>
/* standalone
#include <goffice/graph/gog-series.h>
#include <goffice/graph/gog-plot.h>
#include <goffice/graph/gog-plot-engine.h>
#include <goffice/graph/gog-chart.h>
#include <goffice/graph/gog-graph.h>
#include <goffice/graph/gog-axis.h>
#include <goffice/graph/gog-legend.h>
#include <goffice/graph/gog-label.h>
#include <goffice/graph/gog-grid.h>
#include <goffice/graph/gog-grid-line.h>
#include <goffice/graph/gog-theme.h>
#include <goffice/graph/gog-error-bar.h>
#include <goffice/graph/gog-series-lines.h>
#include <goffice/data/go-data-simple.h>
#include <goffice/utils/go-format.h>
#include <goffice/utils/go-font.h>
#include <goffice/utils/go-math.h>
#include <goffice/app/go-plugin-service.h>
#include <goffice/component/go-component-factory.h>
*/
#include <gsf/gsf-utils.h>
#include "goffice-paths.h"
#include <libintl.h>
int goffice_graph_debug_level = 0;
static char const *libgoffice_data_dir = GOFFICE_DATADIR;
static char const *libgoffice_icon_dir = GOFFICE_ICONDIR;
static char const *libgoffice_locale_dir = GOFFICE_LOCALEDIR;
static char const *libgoffice_lib_dir = GOFFICE_LIBDIR;
gchar const *
go_sys_data_dir (void)
{
return libgoffice_data_dir;
}
gchar const *
go_sys_icon_dir (void)
{
return libgoffice_icon_dir;
}
gchar const *
go_sys_lib_dir (void)
{
return libgoffice_lib_dir;
}
void
libgoffice_init (void)
{
static gboolean initialized = FALSE;
if (initialized)
return;
#ifdef G_OS_WIN32
{
gchar *dir = g_win32_get_package_installation_directory (NULL, "libgoffice-0-3.dll");
libgoffice_data_dir = g_build_filename (dir,
"share", "goffice", GOFFICE_VERSION, NULL);
libgoffice_icon_dir = g_build_filename (dir,
"share", "pixmaps", "goffice", NULL);
libgoffice_locale_dir = g_build_filename (dir,
"share", "locale", NULL);
libgoffice_lib_dir = g_build_filename (dir,
"lib", "goffice", GOFFICE_VERSION, NULL);
g_free (dir);
}
#endif
bindtextdomain (GETTEXT_PACKAGE, libgoffice_locale_dir);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
/* standalone
go_fonts_init ();
go_math_init ();
gsf_init ();
plugin_services_init ();
gog_plugin_services_init ();
goc_plugin_services_init ();
(void) GOG_GRAPH_TYPE;
(void) GOG_CHART_TYPE;
(void) GOG_PLOT_TYPE;
(void) GOG_SERIES_TYPE;
(void) GOG_SERIES_ELEMENT_TYPE;
(void) GOG_LEGEND_TYPE;
(void) GOG_AXIS_TYPE;
(void) GOG_AXIS_LINE_TYPE;
(void) GOG_LABEL_TYPE;
(void) GOG_GRID_TYPE;
(void) GOG_GRID_LINE_TYPE;
(void) GOG_ERROR_BAR_TYPE;
(void) GOG_REG_EQN_TYPE;
(void) GOG_SERIES_LINES_TYPE;
(void) GO_DATA_SCALAR_VAL_TYPE;
(void) GO_DATA_SCALAR_STR_TYPE;
gog_themes_init ();
go_number_format_init ();
go_currency_date_format_init ();
*/
initialized = TRUE;
}
void
libgoffice_shutdown (void)
{
/* standalone
gog_themes_shutdown ();
go_fonts_shutdown ();
goc_plugin_services_shutdown ();
gog_plugin_services_shutdown ();
go_currency_date_format_shutdown ();
go_number_format_shutdown ();
*/
#ifdef G_OS_WIN32
g_free (libgoffice_data_dir);
g_free (libgoffice_icon_dir);
g_free (libgoffice_locale_dir);
g_free (libgoffice_lib_dir);
#endif
}
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice.h :
*
* Copyright (C) 2003-2005 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GOFFICE_H
#define GOFFICE_H
#include <glib.h>
G_BEGIN_DECLS
void libgoffice_init (void);
void libgoffice_shutdown (void);
#ifndef GO_VAR_DECL
# ifdef WIN32
# ifdef GOFFICE_COMPILATION
# define GO_VAR_DECL __declspec(dllexport)
# else
# define GO_VAR_DECL extern __declspec(dllimport)
# endif
# else
# define GO_VAR_DECL extern
# endif
#endif /* GO_VAR_DECL */
G_END_DECLS
#include <goffice/app/goffice-app.h>
#include <goffice/utils/goffice-utils.h>
#include <goffice/gtk/goffice-gtk.h>
#endif /* GOFFICE_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* color-group.c - Utility to keep a shared memory of custom colors
* between arbitrary widgets.
* Copyright 2000, Michael Levy
* Copyright 2001, Almer S. Tigelaar
* Copyright 2004, Jody Goldberg
*
* Authors:
* Michael Levy (mlevy@genoscope.cns.fr)
* Revised and polished by:
* Almer S. Tigelaar <almer@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA.
*/
#include <goffice/goffice-config.h>
#include <goffice/goffice.h>
#include <gsf/gsf-impl-utils.h>
#include <string.h>
typedef struct {
GObjectClass base;
void (*history_changed) (GOColorGroup *group);
} GOColorGroupClass;
enum {
HISTORY_CHANGED,
LAST_SIGNAL
};
static GObjectClass *go_color_group_parent_class;
static guint go_color_group_signals [LAST_SIGNAL] = { 0 };
static GHashTable *go_color_groups = NULL;
static void
go_color_group_finalize (GObject *obj)
{
GOColorGroup *cg = GO_COLOR_GROUP (obj);
/* make this name available */
if (cg->name) {
g_hash_table_remove (go_color_groups, cg);
g_free (cg->name);
cg->name = NULL;
}
(go_color_group_parent_class->finalize) (obj);
}
static void
go_color_group_class_init (GOColorGroupClass *klass)
{
GObjectClass *object_class;
object_class = (GObjectClass*) klass;
object_class->finalize = &go_color_group_finalize;
go_color_group_parent_class = g_type_class_peek (G_TYPE_OBJECT);
go_color_group_signals [HISTORY_CHANGED] =
g_signal_new ("history-changed",
GO_TYPE_COLOR_GROUP,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GOColorGroupClass, history_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
static void
go_color_group_init (GOColorGroup *cg)
{
int i;
cg->name = NULL;
cg->context = NULL;
for (i = 0 ; i < GO_COLOR_GROUP_HISTORY_SIZE ; i++)
cg->history[i] = GO_COLOR_BLACK;
}
GSF_CLASS (GOColorGroup, go_color_group,
go_color_group_class_init, go_color_group_init,
G_TYPE_OBJECT)
/**
* go_color_group_find :
* @name : target name
* @context : an arbitrary id to identify what context to search in
*
* No reference is added if it is found.
* Returns: Look up the name/context specific color-group.
* %NULL if it is not found.
**/
GOColorGroup *
go_color_group_find (char const *name, gpointer context)
{
GOColorGroup tmp_key;
if (go_color_groups == NULL)
return NULL;
g_return_val_if_fail(name != NULL, NULL);
tmp_key.name = (char *)name;
tmp_key.context = context;
return (GOColorGroup *) g_hash_table_lookup (go_color_groups, &tmp_key);
}
static guint
cg_hash (GOColorGroup const *key)
{
return g_str_hash (key->name);
}
static gint
cg_equal (GOColorGroup const *a, GOColorGroup const *b)
{
if (a == b)
return TRUE;
if (a->context != b->context)
return FALSE;
return g_str_equal (a->name, b->name);
}
/**
* go_color_group_fetch :
* @name : target name
* @context : identifying context
*
* if name is NULL or a name not currently in use by another group
* then a new group is created and returned. If name was NULL
* then the new group is given a unique name prefixed by "__cg_autogen_name__"
* (thereby insuring namespace separation).
* If name was already used by a group then the reference count is
* incremented and a pointer to the group is returned.
*
* Returns: A #GOColorGroup
**/
GOColorGroup *
go_color_group_fetch (char const *name, gpointer context)
{
GOColorGroup *cg;
gchar *new_name;
if (go_color_groups == NULL)
go_color_groups = g_hash_table_new (
(GHashFunc) cg_hash, (GEqualFunc) cg_equal);
if (name == NULL) {
static gint count = 0;
while (1) {
new_name = g_strdup_printf("color_group_number_%i", count++);
if (go_color_group_find (new_name, context) == NULL)
break;
g_free (new_name);
}
} else {
new_name = g_strdup (name);
cg = go_color_group_find (new_name, context);
if (cg != NULL) {
g_free (new_name);
g_object_ref (G_OBJECT (cg));
return cg;
}
}
cg = g_object_new (go_color_group_get_type (), NULL);
g_return_val_if_fail(cg != NULL, NULL);
cg->name = new_name;
cg->context = context;
/* lastly register this name */
g_hash_table_insert (go_color_groups, cg, cg);
return cg;
}
/**
* go_color_group_add_color :
* @cg : #GOColorGroup
* @c : the color
*
* Potentially slide the history to add the new colour. If it was already in
* the history reorder.
**/
void
go_color_group_add_color (GOColorGroup *cg, GOColor c)
{
unsigned i;
g_return_if_fail (GO_IS_COLOR_GROUP (cg));
for (i = GO_COLOR_GROUP_HISTORY_SIZE - 1 ; i > 0; i--)
if (cg->history[i] == c)
break;
for ( ; i < GO_COLOR_GROUP_HISTORY_SIZE-1 ; i++)
cg->history [i] = cg->history [i+1];
cg->history [GO_COLOR_GROUP_HISTORY_SIZE-1] = c;
g_signal_emit (G_OBJECT (cg),
go_color_group_signals [HISTORY_CHANGED], 0);
}
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-color-group.h - Utility to keep a shared memory of custom colors
* between arbitrary widgets.
* Copyright 2000, Michael Levy
* Copyright 2001, Almer S. Tigelaar
*
* Authors:
* Michael Levy (mlevy@genoscope.cns.fr)
* Revised and polished by:
* Almer S. Tigelaar <almer@gnome.org>
* Rewritten yet again by
* Jody Goldberg <jody@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA.
*/
#ifndef _GO_COLOR_GROUP_H_
#define _GO_COLOR_GROUP_H_
#include <goffice/goffice.h>
G_BEGIN_DECLS
#define GO_COLOR_GROUP_HISTORY_SIZE 8
typedef struct {
GObject parent;
char *name;
gpointer context;
GOColor history[GO_COLOR_GROUP_HISTORY_SIZE];
} GOColorGroup;
#define GO_TYPE_COLOR_GROUP (go_color_group_get_type ())
#define GO_COLOR_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GO_TYPE_COLOR_GROUP, GOColorGroup))
#define GO_IS_COLOR_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GO_TYPE_COLOR_GROUP))
GType go_color_group_get_type (void);
GOColorGroup *go_color_group_find (char const *name, gpointer context);
GOColorGroup *go_color_group_fetch (char const *name, gpointer context);
void go_color_group_add_color (GOColorGroup *cg, GOColor c);
G_END_DECLS
#endif /* _GO_COLOR_GROUP_H_ */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-color-palette.h - A color selector palette
* Copyright 2000-2004, Ximian, Inc.
*
* Authors:
* This code was extracted from widget-color-combo.c
* written by Miguel de Icaza (miguel@kernel.org) and
* Dom Lachowicz (dominicl@seas.upenn.edu). The extracted
* code was re-packaged into a separate object by
* Michael Levy (mlevy@genoscope.cns.fr)
* And later revised and polished by
* Almer S. Tigelaar (almer@gnome.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA.
*/
#ifndef _GO_COLOR_PALETTE_H_
#define _GO_COLOR_PALETTE_H_
#include <goffice/goffice.h>
G_BEGIN_DECLS
typedef struct _GOColorPalette GOColorPalette;
#define GO_TYPE_COLOR_PALETTE (go_color_palette_get_type ())
#define GO_COLOR_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GO_TYPE_COLOR_PALETTE, GOColorPalette))
#define GO_COLOR_PALETTE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST(k), GO_TYPE_COLOR_PALETTE)
#define GO_IS_COLOR_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GO_TYPE_COLOR_PALETTE))
GType go_color_palette_get_type (void);
GtkWidget *go_color_palette_new (char const *no_color_label,
GOColor default_color,
GOColorGroup *cg);
GtkWidget *go_color_palette_make_menu (char const *no_color_label,
GOColor default_color,
GOColorGroup *cg,
char const *custom_dialog_title,
GOColor current_color);
void go_color_palette_set_title (GOColorPalette *p, char const *title);
void go_color_palette_set_group (GOColorPalette *p, GOColorGroup *cg);
void go_color_palette_set_current_color (GOColorPalette *p, GOColor color);
void go_color_palette_set_color_to_default (GOColorPalette *p);
GOColor go_color_palette_get_current_color (GOColorPalette *p,
gboolean *is_default, gboolean *is_custom);
void go_color_palette_set_allow_alpha (GOColorPalette *p, gboolean allow_alpha);
G_END_DECLS
#endif /* __GO_COLOR_PALETTE_H__ */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* gtk-combo-box.h - a customizable combobox
* Copyright 2000, 2001, Ximian, Inc.
*
* Authors:
* Miguel de Icaza <miguel@ximian.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA.
*/
#ifndef _GO_COMBO_BOX_H_
#define _GO_COMBO_BOX_H_
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GO_TYPE_COMBO_BOX (go_combo_box_get_type())
#define GO_COMBO_BOX(o) G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_COMBO_BOX, GOComboBox)
#define GO_IS_COMBO_BOX(o) G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_COMBO_BOX)
#define GO_COMBO_BOX_CLASS(k) G_TYPE_CHECK_CLASS_CAST ((k), GO_TYPE_COMBO_BOX, GOComboBoxClass)
typedef struct _GOComboBox GOComboBox;
typedef struct _GOComboBoxPrivate GOComboBoxPrivate;
typedef struct _GOComboBoxClass GOComboBoxClass;
struct _GOComboBox {
GtkHBox hbox;
GOComboBoxPrivate *priv;
};
struct _GOComboBoxClass {
GtkHBoxClass base;
/* virtual */
void (*set_title) (GOComboBox *cbox, char const *title);
/* invoked when the popup has been hidden, if the signal
* returns TRUE, it means it should be killed */
gboolean (*pop_down_done) (GOComboBox *cbox, GtkWidget *);
};
/* public */
GType go_combo_box_get_type (void);
void go_combo_box_set_tooltip (GOComboBox *combo, void *tips,
char const *text, char const *priv_text);
void go_combo_box_set_relief (GOComboBox *combo, GtkReliefStyle relief);
void go_combo_box_set_title (GOComboBox *combo, char const *title);
char const *go_combo_box_get_title (GOComboBox *combo);
void go_combo_box_set_tearable (GOComboBox *combo, gboolean tearable);
/* protected */
void go_combo_box_construct (GOComboBox *combo,
GtkWidget *display_widget,
GtkWidget *popdown_container,
GtkWidget *popdown_focus);
void go_combo_box_get_pos (GOComboBox *combo, int *x, int *y);
void go_combo_box_popup_hide (GOComboBox *combo);
void go_combo_box_popup_display (GOComboBox *combo);
void go_combo_box_set_display (GOComboBox *combo,
GtkWidget *display_widget);
gboolean _go_combo_is_updating (GOComboBox const *combo);
G_END_DECLS
#endif /* _GO_COMBO_BOX_H_ */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-combo-color.h - A color selector combo box
* Copyright 2000, 2001, Ximian, Inc.
*
* Authors:
* Miguel de Icaza (miguel@kernel.org)
* Dom Lachowicz (dominicl@seas.upenn.edu)
*
* Reworked and split up into a separate ColorPalette object:
* Michael Levy (mlevy@genoscope.cns.fr)
*
* And later revised and polished by:
* Almer S. Tigelaar (almer@gnome.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA.
*/
#ifndef _GO_COMBO_COLOR_H_
#define _GO_COMBO_COLOR_H_
#include <goffice/goffice.h>
G_BEGIN_DECLS
#define GO_TYPE_COMBO_COLOR (go_combo_color_get_type ())
#define GO_COMBO_COLOR(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GO_TYPE_COMBO_COLOR, GOComboColor))
#define GO_IS_COMBO_COLOR(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GO_TYPE_COMBO_COLOR))
#define GO_COMBO_COLOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST(k), GO_TYPE_COMBO_COLOR)
typedef struct _GOComboColor GOComboColor;
GType go_combo_color_get_type (void);
GtkWidget *go_combo_color_new (GdkPixbuf *icon,
char const *no_color_label,
GOColor default_color,
GOColorGroup *color_group);
GOColor go_combo_color_get_color (GOComboColor *cc, gboolean *is_default);
void go_combo_color_set_color (GOComboColor *cc, GOColor color);
void go_combo_color_set_color_to_default (GOComboColor *cc);
void go_combo_color_set_color_gdk (GOComboColor *cc, GdkRGBA *color);
void go_combo_color_set_allow_alpha (GOComboColor *cc, gboolean allow_alpha);
void go_combo_color_set_instant_apply (GOComboColor *cc, gboolean active);
G_END_DECLS
#endif /* _GO_COMBO_COLOR_H_ */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice-gtk.h - Misc GTK+ utilities
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA.
*/
#ifndef _GOFFICE_GTK_H_
#define _GOFFICE_GTK_H_
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <goffice/app/goffice-app.h>
#include <goffice/utils/go-image.h>
G_BEGIN_DECLS
void go_gtk_editable_enters (GtkWindow *window, GtkWidget *w);
GdkPixbuf *go_pixbuf_new_from_file (char const *filename);
GdkPixbuf *go_pixbuf_intelligent_scale (GdkPixbuf *pixbuf,
guint width, guint height);
int go_pango_measure_string (PangoContext *context,
PangoFontDescription const *font_desc,
char const *str);
gint go_gtk_dialog_run (GtkDialog *dialog, GtkWindow *parent);
GtkWidget *go_gtk_dialog_add_button (GtkDialog *dialog, char const *text, char const *stock_id,
gint response_id);
void go_gtk_notice_dialog (GtkWindow *parent, GtkMessageType type,
const gchar *format, ...);
void go_gtk_notice_nonmodal_dialog (GtkWindow *parent, GtkWidget **ref,
GtkMessageType type, const gchar *format, ...);
gboolean go_gtk_query_yes_no (GtkWindow *toplevel, gboolean default_answer,
const gchar *format, ...);
GtkWidget *go_gtk_button_new_with_stock (char const *text,
char const *stock_id);
void go_gtk_widget_disable_focus (GtkWidget *w);
void go_gtk_window_set_transient (GtkWindow *parent, GtkWindow *window);
void go_gtk_help_button_init (GtkWidget *w, char const *data_dir,
char const *app, char const *link);
void go_gtk_nonmodal_dialog (GtkWindow *toplevel, GtkWindow *dialog);
gboolean go_gtk_file_sel_dialog (GtkWindow *toplevel, GtkWidget *w);
char *go_gtk_select_image (GtkWindow *toplevel, const char *initial);
gboolean go_gtk_url_is_writeable (GtkWindow *parent, char const *url,
gboolean overwrite_by_default);
void go_atk_setup_label (GtkWidget *label, GtkWidget *target);
void go_dialog_guess_alternative_button_order (GtkDialog *dialog);
#include <goffice/gtk/go-color-group.h>
#include <goffice/gtk/go-color-palette.h>
G_END_DECLS
#endif /* _GOFFICE_GTK_H_ */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-cairo.c
*
* Copyright (C) 2007 Emmanuel Pacaud <emmanuel.pacaud@lapp.in2p3.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#include <goffice/utils/go-cairo.h>
#include <math.h>
static void
skip_spaces (char **path)
{
while (**path == ' ')
(*path)++;
}
static void
skip_comma_and_spaces (char **path)
{
while (**path == ' ' || **path == ',')
(*path)++;
}
static gboolean
parse_value (char **path, double *x)
{
char *end, *c;
gboolean integer_part = FALSE;
gboolean fractional_part = FALSE;
gboolean exponent_part = FALSE;
double mantissa = 0.0;
double exponent =0.0;
double divisor;
gboolean mantissa_sign = 1.0;
gboolean exponent_sign = 1.0;
c = *path;
if (*c == '-') {
mantissa_sign = -1.0;
c++;
} else if (*c == '+')
c++;
if (*c >= '0' && *c <= '9') {
integer_part = TRUE;
mantissa = *c - '0';
c++;
while (*c >= '0' && *c <= '9') {
mantissa = mantissa * 10.0 + *c - '0';
c++;
}
}
if (*c == '.')
c++;
else if (!integer_part)
return FALSE;
if (*c >= '0' && *c <= '9') {
fractional_part = TRUE;
mantissa += (*c - '0') * 0.1;
divisor = 0.01;
c++;
while (*c >= '0' && *c <= '9') {
mantissa += (*c - '0') * divisor;
divisor *= 0.1;
c++;
}
}
if (!fractional_part && !integer_part)
return FALSE;
end = c;
if (*c == 'E' || *c == 'e') {
c++;
if (*c == '-') {
exponent_sign = -1.0;
c++;
} else if (*c == '+')
c++;
if (*c >= '0' && *c <= '9') {
exponent_part = TRUE;
exponent = *c - '0';
c++;
while (*c >= '0' && *c <= '9') {
exponent = exponent * 10.0 + *c - '0';
c++;
}
}
}
if (exponent_part) {
end = c;
*x = mantissa_sign * mantissa * pow (10.0, exponent_sign * exponent);
} else
*x = mantissa_sign * mantissa;
*path = end;
return TRUE;
}
static gboolean
parse_values (char **path, unsigned int n_values, double *values)
{
char *ptr = *path;
unsigned int i;
skip_comma_and_spaces (path);
for (i = 0; i < n_values; i++) {
if (!parse_value (path, &values[i])) {
*path = ptr;
return FALSE;
}
skip_comma_and_spaces (path);
}
return TRUE;
}
static void
emit_function_2 (char **path, cairo_t *cr,
void (*cairo_func) (cairo_t *, double, double))
{
double values[2];
skip_spaces (path);
while (parse_values (path, 2, values))
cairo_func (cr, values[0], values[1]);
}
static void
emit_function_6 (char **path, cairo_t *cr,
void (*cairo_func) (cairo_t *, double, double, double ,double, double, double))
{
double values[6];
skip_spaces (path);
while (parse_values (path, 6, values))
cairo_func (cr, values[0], values[1], values[2], values[3], values[4], values[5]);
}
/**
* go_cairo_emit_svg_path:
* @cr: a cairo context
* @path: a SVG path
*
* Emits a path described as a SVG path string (d property of path elements) to
* a cairo context.
**/
void
go_cairo_emit_svg_path (cairo_t *cr, char const *path)
{
char *ptr;
if (path == NULL)
return;
ptr = (char *) path;
skip_spaces (&ptr);
while (*ptr != '\0') {
if (*ptr == 'M') {
ptr++;
emit_function_2 (&ptr, cr, cairo_move_to);
} else if (*ptr == 'm') {
ptr++;
emit_function_2 (&ptr, cr, cairo_rel_move_to);
} else if (*ptr == 'L') {
ptr++;
emit_function_2 (&ptr, cr, cairo_line_to);
} else if (*ptr == 'l') {
ptr++;
emit_function_2 (&ptr, cr, cairo_rel_line_to);
} else if (*ptr == 'C') {
ptr++;
emit_function_6 (&ptr, cr, cairo_curve_to);
} else if (*ptr == 'c') {
ptr++;
emit_function_6 (&ptr, cr, cairo_rel_curve_to);
} else if (*ptr == 'Z' || *ptr == 'z') {
ptr++;
cairo_close_path (cr);
} else
ptr++;
}
}
gboolean
go_cairo_surface_is_vector (cairo_surface_t const *surface)
{
cairo_surface_type_t type;
type = cairo_surface_get_type ((cairo_surface_t *) surface);
return (type == CAIRO_SURFACE_TYPE_SVG ||
type == CAIRO_SURFACE_TYPE_PDF ||
type == CAIRO_SURFACE_TYPE_PS);
}
/**
* go_cairo_convert_data_from_pixbuf:
* @src: a pointer to pixel data in pixbuf format
* @dst: a pointer to pixel data in cairo format
* @width: image width
* @height: image height
* @rowstride: data rowstride
*
* Converts the pixel data stored in @src in GDK_COLORSPACE_RGB pixbuf
* format to CAIRO_FORMAT_ARGB32 cairo format and move them
* to @dst. If @src == @dst, pixel are converted in place.
**/
void
go_cairo_convert_data_from_pixbuf (unsigned char *dst, unsigned char const *src,
int width, int height, int rowstride)
{
int i,j;
unsigned int t;
g_return_if_fail (dst != NULL);
#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x7f; d = ((t >> 8) + t) >> 8; } G_STMT_END
if (src == dst || src == NULL) {
unsigned char a, b, c;
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
MULT(a, dst[2], dst[3], t);
MULT(b, dst[1], dst[3], t);
MULT(c, dst[0], dst[3], t);
dst[0] = a;
dst[1] = b;
dst[2] = c;
#else
MULT(a, dst[2], dst[3], t);
MULT(b, dst[1], dst[3], t);
MULT(c, dst[0], dst[3], t);
dst[0] = dst[3];
dst[3] = a;
dst[2] = b;
dst[1] = c;
#endif
dst += 4;
}
dst += rowstride - width * 4;
}
} else {
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
MULT(dst[0], src[2], src[3], t);
MULT(dst[1], src[1], src[3], t);
MULT(dst[2], src[0], src[3], t);
dst[3] = src[3];
#else
MULT(dst[3], src[2], src[3], t);
MULT(dst[2], src[1], src[3], t);
MULT(dst[1], src[0], src[3], t);
dst[0] = src[3];
#endif
src += 4;
dst += 4;
}
src += rowstride - width * 4;
dst += rowstride - width * 4;
}
}
#undef MULT
}
/**
* go_cairo_convert_data_to_pixbuf:
* @src: a pointer to pixel data in cairo format
* @dst: a pointer to pixel data in pixbuf format
* @width: image width
* @height: image height
* @rowstride: data rowstride
*
* Converts the pixel data stored in @src in CAIRO_FORMAT_ARGB32 cairo format
* to GDK_COLORSPACE_RGB pixbuf format and move them
* to @dst. If @src == @dst, pixel are converted in place.
**/
void
go_cairo_convert_data_to_pixbuf (unsigned char *dst, unsigned char const *src,
int width, int height, int rowstride)
{
int i,j;
unsigned int t;
unsigned char a, b, c;
g_return_if_fail (dst != NULL);
#define MULT(d,c,a,t) G_STMT_START { t = (a)? c * 255 / a: 0; d = t;} G_STMT_END
if (src == dst || src == NULL) {
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
MULT(a, dst[2], dst[3], t);
MULT(b, dst[1], dst[3], t);
MULT(c, dst[0], dst[3], t);
dst[0] = a;
dst[1] = b;
dst[2] = c;
#else
MULT(a, dst[1], dst[0], t);
MULT(b, dst[2], dst[0], t);
MULT(c, dst[3], dst[0], t);
dst[3] = dst[0];
dst[0] = a;
dst[1] = b;
dst[2] = c;
#endif
dst += 4;
}
dst += rowstride - width * 4;
}
} else {
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
MULT(dst[0], src[2], src[3], t);
MULT(dst[1], src[1], src[3], t);
MULT(dst[2], src[0], src[3], t);
dst[3] = src[3];
#else
MULT(dst[0], src[1], src[0], t);
MULT(dst[1], src[2], src[0], t);
MULT(dst[2], src[3], src[0], t);
dst[3] = src[0];
#endif
src += 4;
dst += 4;
}
src += rowstride - width * 4;
dst += rowstride - width * 4;
}
}
#undef MULT
}
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-cairo.c
*
* Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org)
* Copyright (C) 2000 Eazel, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*
* Author: Raph Levien <raph@artofcode.com>
*/
#ifndef GO_CAIRO_H
#define GO_CAIRO_H
#include <cairo.h>
#include <glib.h>
#include <math.h>
G_BEGIN_DECLS
/* This is a workaround for a cairo bug, due to its internal
* handling of coordinates (16.16 fixed point). */
#define GO_CAIRO_CLAMP(x) CLAMP((x),-15000,15000)
#define GO_CAIRO_CLAMP_SNAP(x,even) GO_CAIRO_CLAMP(even ? floor (x + .5):floor (x) + .5)
void go_cairo_emit_svg_path (cairo_t *cr, char const *path);
gboolean go_cairo_surface_is_vector (cairo_surface_t const *surface);
void go_cairo_convert_data_to_pixbuf (unsigned char *dst, unsigned char const *src,
int width, int height, int rowstride);
void go_cairo_convert_data_from_pixbuf (unsigned char *dst, unsigned char const *src,
int width, int height, int rowstride);
G_END_DECLS
#endif /* GO_CAIRO_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* gog-color.c :
*
* Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#include <goffice/goffice-config.h>
#include "go-color.h"
#include <stdio.h>
/**
* go_color_from_str :
* @str :
* @res :
*
* Returns: TRUE if @str can be parsed as a color of the form R:G:B:A and the
* result is stored in @res.
**/
gboolean
go_color_from_str (gchar const *str, GOColor *res)
{
unsigned r, g, b, a;
if (sscanf (str, "%X:%X:%X:%X", &r, &g, &b, &a) == 4) {
*res = GO_COLOR_FROM_RGBA (r, g, b, a);
return TRUE;
}
#ifdef GOFFICE_WITH_GTK
else {
GdkRGBA color;
if (gdk_rgba_parse (&color, str)) {
*res = GO_COLOR_FROM_GDK_RGBA (color);
return TRUE;
}
}
#endif
return FALSE;
}
gchar *
go_color_as_str (GOColor color)
{
unsigned r, g, b, a;
GO_COLOR_TO_RGBA (color, &r, &g, &b, &a);
return g_strdup_printf ("%X:%X:%X:%X", r, g, b, a);
}
PangoAttribute *
go_color_to_pango (GOColor color, gboolean is_fore)
{
guint16 r, g, b;
r = GO_COLOR_UINT_R (color);
r |= (r << 8);
g = GO_COLOR_UINT_G (color);
g |= (g << 8);
b = GO_COLOR_UINT_B (color);
b |= (b << 8);
if (is_fore)
return pango_attr_foreground_new (r, g, b);
else
return pango_attr_background_new (r, g, b);
}
#ifdef GOFFICE_WITH_GTK
#include <gdk/gdk.h>
GdkRGBA *
go_color_to_gdk_rgba (GOColor color, GdkRGBA *res)
{
res->red = GO_COLOR_DOUBLE_R (color);
res->green = GO_COLOR_DOUBLE_G (color);
res->blue = GO_COLOR_DOUBLE_B (color);
res->alpha = GO_COLOR_DOUBLE_A (color);
return res;
}
#endif /* GOFFICE_WITH_GTK */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-color.h
*
* Copyright (C) 1999, 2000 EMC Capital Management, Inc.
*
* Developed by Jon Trowbridge <trow@gnu.org> and
* Havoc Pennington <hp@pobox.com>.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GO_COLOR_H
#define GO_COLOR_H
#include <goffice/goffice.h>
G_BEGIN_DECLS
typedef struct {
GOColor color;
char const *name; /* english name - eg. "white" */
} GONamedColor;
/*
Some convenient macros for drawing into an RGB buffer.
Beware of side effects, code-bloat, and all of the other classic
cpp-perils...
*/
#define GO_COLOR_FROM_GDK_RGBA(c) GO_COLOR_FROM_RGBA((int)((c).red * 255.), (int)((c).green * 255.), (int)((c).blue * 255.), (int)((c).alpha * 255.))
#define GO_COLOR_FROM_RGB(r,g,b) ((((guint)(r&0xff))<<24)|(((guint)(g&0xff))<<16)|((guint)(b&0xff)<<8)|0xff)
#define GO_COLOR_FROM_RGBA(r,g,b,a) ((((guint)(r&0xff))<<24)|(((guint)(g&0xff))<<16)|((guint)(b&0xff)<<8)|(guint)(a&0xff))
#define GO_COLOR_WHITE GO_COLOR_FROM_RGB(0xff, 0xff, 0xff)
#define GO_COLOR_BLACK GO_COLOR_FROM_RGB(0x00, 0x00, 0x00)
#define GO_COLOR_RED GO_COLOR_FROM_RGB(0xff, 0x00, 0x00)
#define GO_COLOR_GREEN GO_COLOR_FROM_RGB(0x00, 0xff, 0x00)
#define GO_COLOR_BLUE GO_COLOR_FROM_RGB(0x00, 0x00, 0xff)
#define GO_COLOR_YELLOW GO_COLOR_FROM_RGB(0xff, 0xff, 0x00)
#define GO_COLOR_VIOLET GO_COLOR_FROM_RGB(0xff, 0x00, 0xff)
#define GO_COLOR_CYAN GO_COLOR_FROM_RGB(0x00, 0xff, 0xff)
#define GO_COLOR_GREY(x) GO_COLOR_FROM_RGB(x,x,x)
#define GO_COLOR_UINT_R(x) (((guint)(x))>>24)
#define GO_COLOR_UINT_G(x) ((((guint)(x))>>16)&0xff)
#define GO_COLOR_UINT_B(x) ((((guint)(x))>>8)&0xff)
#define GO_COLOR_UINT_A(x) (((guint)(x))&0xff)
#define GO_COLOR_CHANGE_R(x, r) (((x)&(~(0xff<<24)))|(((r)&0xff)<<24))
#define GO_COLOR_CHANGE_G(x, g) (((x)&(~(0xff<<16)))|(((g)&0xff)<<16))
#define GO_COLOR_CHANGE_B(x, b) (((x)&(~(0xff<<8)))|(((b)&0xff)<<8))
#define GO_COLOR_CHANGE_A(x, a) (((x)&(~0xff))|((a)&0xff))
#define GO_COLOR_TO_RGB(u,r,g,b) \
{ (*(r)) = ((u)>>24)&0xff; (*(g)) = ((u)>>16)&0xff; (*(b)) = ((u)>>8)&0xff; }
#define GO_COLOR_TO_RGBA(u,r,g,b,a) \
{GO_COLOR_TO_RGB((u),r,g,b); (*(a)) = (u)&0xff; }
#define GO_COLOR_MONO_INTERPOLATE(v1, v2, t) ((gint)go_rint((v2)*(t)+(v1)*(1-(t))))
#define GO_COLOR_INTERPOLATE(c1, c2, t) \
GO_COLOR_FROM_RGBA( GO_COLOR_MONO_INTERPOLATE(GO_COLOR_UINT_R(c1), GO_COLOR_UINT_R(c2), t), \
GO_COLOR_MONO_INTERPOLATE(GO_COLOR_UINT_G(c1), GO_COLOR_UINT_G(c2), t), \
GO_COLOR_MONO_INTERPOLATE(GO_COLOR_UINT_B(c1), GO_COLOR_UINT_B(c2), t), \
GO_COLOR_MONO_INTERPOLATE(GO_COLOR_UINT_A(c1), GO_COLOR_UINT_A(c2), t) )
#define GO_COLOR_DOUBLE_R(x) (GO_COLOR_UINT_R(x)/255.0)
#define GO_COLOR_DOUBLE_G(x) (GO_COLOR_UINT_G(x)/255.0)
#define GO_COLOR_DOUBLE_B(x) (GO_COLOR_UINT_B(x)/255.0)
#define GO_COLOR_DOUBLE_A(x) (GO_COLOR_UINT_A(x)/255.0)
#define GO_COLOR_TO_CAIRO(x) GO_COLOR_DOUBLE_R(x),GO_COLOR_DOUBLE_G(x),GO_COLOR_DOUBLE_B(x),GO_COLOR_DOUBLE_A(x)
gboolean go_color_from_str (char const *str, GOColor *res);
gchar *go_color_as_str (GOColor color);
PangoAttribute *go_color_to_pango (GOColor color, gboolean is_fore);
#ifdef GOFFICE_WITH_GTK
GdkRGBA *go_color_to_gdk_rgba (GOColor color, GdkRGBA *res);
#endif
G_END_DECLS
#endif /* GO_COLOR_H */
/*
* go-file.h :
*
* Copyright (C) 2004 Morten Welinder (terra@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GO_FILE_H
#define GO_FILE_H
#include <goffice/goffice.h>
#include <gsf/gsf.h>
#include <time.h>
G_BEGIN_DECLS
typedef struct _GOFilePermissions GOFilePermissions;
struct _GOFilePermissions {
gboolean owner_read;
gboolean owner_write;
gboolean owner_execute;
gboolean group_read;
gboolean group_write;
gboolean group_execute;
gboolean others_read;
gboolean others_write;
gboolean others_execute;
};
typedef enum {
GO_DOTDOT_SYNTACTIC, /* Assume no symlinks. */
GO_DOTDOT_TEST, /* Check. */
GO_DOTDOT_LEAVE /* Leave alone. */
} GODotDot;
#ifndef R_OK
# define F_OK 0
# define X_OK 1
# define W_OK 2
# define R_OK 4
#endif
char *go_filename_simplify (const char *filename, GODotDot dotdot, gboolean make_absolute);
char *go_url_simplify (const char *uri);
char *go_filename_from_uri (const char *uri);
char *go_filename_to_uri (const char *filename);
char *go_url_resolve_relative (const char *ref_uri, const char *rel_uri);
char *go_url_make_relative (const char *uri, const char *ref_uri);
char *go_shell_arg_to_uri (const char *arg);
char *go_basename_from_uri (const char *uri);
char *go_dirname_from_uri (const char *uri, gboolean brief);
gchar const **go_shell_argv_to_glib_encoding (gint argc, gchar const **argv);
void go_shell_argv_to_glib_encoding_free (void);
GsfInput *go_file_open (char const *uri, GError **err);
GsfOutput *go_file_create (char const *uri, GError **err);
GSList *go_file_split_urls (char const *data);
#if 0
gchar *go_file_get_owner_name (char const *uri);
gchar *go_file_get_group_name (char const *uri);
#endif
GOFilePermissions *go_get_file_permissions (char const *uri);
void go_set_file_permissions (char const *uri, GOFilePermissions * file_permissions);
time_t go_file_get_date_accessed (char const *uri);
time_t go_file_get_date_modified (char const *uri);
time_t go_file_get_date_changed (char const *uri);
gint go_file_access (char const *uri, gint mode);
gchar *go_url_decode (gchar const *text);
gchar *go_url_encode (gchar const *text, int type);
GError *go_url_show (gchar const *url);
#if 0
gboolean go_url_check_extension (gchar const *uri,
gchar const *std_ext,
gchar **new_uri);
#endif
gchar *go_get_mime_type (gchar const *uri);
gchar *go_get_mime_type_for_data (gconstpointer data, int data_size);
gchar *go_mime_type_get_description (gchar const *mime_type);
G_END_DECLS
#endif /* GO_FILE_H */
#ifndef GO_GLIB_EXTRAS_H
#define GO_GLIB_EXTRAS_H
#include <goffice/goffice.h>
G_BEGIN_DECLS
/* Misc convenience routines that would be nice to have in glib */
typedef gpointer (*GOMapFunc) (gpointer value);
void go_ptr_array_insert (GPtrArray *array, gpointer value, int index);
GSList *go_hash_keys (GHashTable *hash);
GSList *go_hash_values (GHashTable *hash);
GSList *go_slist_map (GSList const *list, GOMapFunc map_func);
GSList *go_slist_create (gpointer item1, ...);
void go_slist_free_custom (GSList *list, GFreeFunc free_func);
#define go_string_slist_copy(list) go_slist_map (list, (GOMapFunc) g_strdup)
GSList *go_strsplit_to_slist (char const *str, gchar delimiter);
#define GO_SLIST_FOREACH(list,valtype,val,stmnt) \
G_STMT_START { \
GSList const *go_l; \
for (go_l = (list); go_l != NULL; go_l = go_l->next) { \
valtype *val = go_l->data; \
stmnt \
; \
} \
} G_STMT_END
#define GO_SLIST_PREPEND(list,item) \
(list = g_slist_prepend (list, item))
#define GO_SLIST_APPEND(list,item) \
(list = g_slist_append (list, item))
#define GO_SLIST_REMOVE(list,item) \
(list = g_slist_remove (list, item))
#define GO_SLIST_CONCAT(list_a,list_b) \
(list_a = g_slist_concat (list_a, list_b))
#define GO_SLIST_REVERSE(list) \
(list = g_slist_reverse (list))
#define GO_SLIST_SORT(list,cmp_func) \
(list = g_slist_sort (list, cmp_func))
gint go_list_index_custom (GList *list, gpointer data, GCompareFunc cmp_func);
void go_list_free_custom (GList *list, GFreeFunc free_func);
#define GO_LIST_FOREACH(list,valtype,val,stmnt) \
G_STMT_START { \
GList *go_l; \
for (go_l = (list); go_l != NULL; go_l = go_l->next) { \
valtype *val = go_l->data; \
stmnt \
; \
} \
} G_STMT_END
#define GO_LIST_PREPEND(list,item) \
(list = g_list_prepend (list, item))
#define GO_LIST_APPEND(list,item) \
(list = g_list_append (list, item))
#define GO_LIST_REMOVE(list,item) \
(list = g_list_remove (list, item))
#define GO_LIST_CONCAT(list_a,list_b) \
(list_a = g_list_concat (list_a, list_b))
#define GO_LIST_REVERSE(list) \
(list = g_list_reverse (list))
#define GO_LIST_SORT(list,cmp_func) \
(list = g_list_sort (list, cmp_func))
int go_str_compare (void const *x, void const *y);
guint go_ascii_strcase_hash (gconstpointer v);
gint go_ascii_strcase_equal (gconstpointer v, gconstpointer v2);
gint go_utf8_collate_casefold (char const *a, char const *b);
char *go_utf8_strcapital (char const *p, gssize len);
void go_strescape (GString *target, char const *str);
char const *go_strunescape (GString *target, char const *str);
void go_string_append_gstring (GString *target, const GString *src);
void go_string_append_c_n (GString *target, char c, gsize n);
void go_string_replace (GString *target,
gsize pos, gssize oldlen,
const char *txt, gssize newlen);
char const *go_guess_encoding (char const *raw, gsize len,
char const *user_guess,
char **utf8_str);
char const *go_get_real_name (void);
void go_destroy_password (char *passwd);
GOMemChunk *go_mem_chunk_new (char const *name, gsize user_atom_size, gsize chunk_size);
void go_mem_chunk_destroy (GOMemChunk *chunk, gboolean expect_leaks);
gpointer go_mem_chunk_alloc (GOMemChunk *chunk);
gpointer go_mem_chunk_alloc0 (GOMemChunk *chunk);
void go_mem_chunk_free (GOMemChunk *chunk, gpointer mem);
void go_mem_chunk_foreach_leak (GOMemChunk *chunk, GFunc cb, gpointer user);
void go_object_toggle (gpointer object,
const gchar *property_name);
gboolean go_object_set_property (GObject *obj, const char *property_name,
const char *user_prop_name, const char *value,
GError **err,
const char *error_template);
GSList *go_object_properties_collect (GObject *obj);
void go_object_properties_apply (GObject *obj,
GSList *props,
gboolean changed_only);
void go_object_properties_free (GSList *props);
typedef gboolean (*GOParseKeyValueFunc) (const char *name,
const char *value,
GError **err,
gpointer user);
gboolean go_parse_key_value (const char *options,
GError **err,
GOParseKeyValueFunc handler,
gpointer user);
G_END_DECLS
#endif /* GO_GLIB_EXTRAS_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-image.h - Image formats
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License, version 2, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA.
*/
#ifndef GO_IMAGE_H
#define GO_IMAGE_H
#include <goffice/goffice.h>
#include <gsf/gsf-libxml.h>
#include <cairo.h>
#ifdef GOFFICE_WITH_GTK
# include <gdk-pixbuf/gdk-pixbuf.h>
#endif
G_BEGIN_DECLS
typedef enum {
GO_IMAGE_FORMAT_SVG,
GO_IMAGE_FORMAT_PNG,
GO_IMAGE_FORMAT_JPG,
GO_IMAGE_FORMAT_PDF,
GO_IMAGE_FORMAT_PS,
GO_IMAGE_FORMAT_EMF,
GO_IMAGE_FORMAT_WMF,
GO_IMAGE_FORMAT_EPS,
GO_IMAGE_FORMAT_UNKNOWN
} GOImageFormat;
typedef struct {
GOImageFormat format;
char *name;
char *desc;
char *ext;
gboolean has_pixbuf_saver;
gboolean is_dpi_useful;
gboolean alpha_support;
} GOImageFormatInfo;
char *go_mime_to_image_format (char const *mime_type);
char *go_image_format_to_mime (char const *format);
GOImageFormatInfo const *go_image_get_format_info (GOImageFormat format);
GOImageFormat go_image_get_format_from_name (char const *name);
GSList *go_image_get_formats_with_pixbuf_saver (void);
/******************
* GOImage object *
******************/
#define GO_TYPE_IMAGE (go_image_get_type ())
#define GO_IMAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_IMAGE, GOImage))
#define GO_IS_IMAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_IMAGE))
GType go_image_get_type (void);
cairo_t *go_image_get_cairo (GOImage *image);
cairo_pattern_t *go_image_create_cairo_pattern (GOImage *image);
#ifdef GOFFICE_WITH_GTK
GOImage *go_image_new_from_pixbuf (GdkPixbuf *pixbuf);
GdkPixbuf *go_image_get_pixbuf (GOImage *image);
GdkPixbuf *go_image_get_thumbnail (GOImage *image);
#endif
GOImage *go_image_new_from_file (const char *filename, GError **error);
guint8 *go_image_get_pixels (GOImage *image);
int go_image_get_rowstride (GOImage *image);
void go_image_fill (GOImage *image, GOColor color);
void go_image_set_name (GOImage *image, char const *name);
char const *go_image_get_name (GOImage *image);
gboolean go_image_same_pixbuf (GOImage *first, GOImage *second);
void go_image_save (GOImage *image, GsfXMLOut *output);
void go_image_load_attrs (GOImage *image, GsfXMLIn *xin, xmlChar const **attrs);
void go_image_load_data (GOImage *image, GsfXMLIn *xin);
G_END_DECLS
#endif /* GO_IMAGE_H */
/*
* go-locale.h:
*
* Copyright (C) 2007 Morten Welinder (terra@gnome.org)
* Copyright (C) 2003-2005 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GO_LOCALE_H
#define GO_LOCALE_H
#include <glib.h>
#include <locale.h>
G_BEGIN_DECLS
char const * go_setlocale (int category, char const *val);
void go_locale_untranslated_booleans (void);
char const * go_locale_boolean_name (gboolean b);
GString const *go_locale_get_currency (gboolean *precedes, gboolean *space_sep);
char go_locale_get_arg_sep (void);
char go_locale_get_col_sep (void);
char go_locale_get_row_sep (void);
GString const *go_locale_get_thousand (void);
GString const *go_locale_get_decimal (void);
int go_locale_month_before_day (void);
gboolean go_locale_24h (void);
GString const *go_locale_get_date_format (void);
GString const *go_locale_get_time_format (void);
void _go_locale_shutdown (void);
G_END_DECLS
#endif /* GO_LOCALE_H */
/* This file has been automatically generated. Do not edit. */
#include <goffice/goffice-config.h>
#include "go-marshalers.h"
#include <glib-object.h>
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
#define g_marshal_value_peek_char(v) g_value_get_char (v)
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
#define g_marshal_value_peek_int(v) g_value_get_int (v)
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
#define g_marshal_value_peek_long(v) g_value_get_long (v)
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
#define g_marshal_value_peek_float(v) g_value_get_float (v)
#define g_marshal_value_peek_double(v) g_value_get_double (v)
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
#define g_marshal_value_peek_param(v) g_value_get_param (v)
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
#define g_marshal_value_peek_object(v) g_value_get_object (v)
#else /* !G_ENABLE_DEBUG */
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
* Do not access GValues directly in your code. Instead, use the
* g_value_get_*() functions
*/
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
#define g_marshal_value_peek_char(v) (v)->data[0].v_int
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
#define g_marshal_value_peek_int(v) (v)->data[0].v_int
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
#define g_marshal_value_peek_long(v) (v)->data[0].v_long
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_float(v) (v)->data[0].v_float
#define g_marshal_value_peek_double(v) (v)->data[0].v_double
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
#endif /* !G_ENABLE_DEBUG */
/* BOOLEAN:OBJECT (../../../../goffice/goffice/utils/go-marshalers.list:23) */
void
go__BOOLEAN__OBJECT (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
G_GNUC_UNUSED gpointer invocation_hint,
gpointer marshal_data)
{
typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT) (gpointer data1,
gpointer arg_1,
gpointer data2);
register GMarshalFunc_BOOLEAN__OBJECT callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
gboolean v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 2);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_BOOLEAN__OBJECT) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1,
g_marshal_value_peek_object (param_values + 1),
data2);
g_value_set_boolean (return_value, v_return);
}
/* BOOLEAN:POINTER (../../../../goffice/goffice/utils/go-marshalers.list:24) */
void
go__BOOLEAN__POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
G_GNUC_UNUSED gpointer invocation_hint,
gpointer marshal_data)
{
typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER) (gpointer data1,
gpointer arg_1,
gpointer data2);
register GMarshalFunc_BOOLEAN__POINTER callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
gboolean v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 2);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_BOOLEAN__POINTER) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1,
g_marshal_value_peek_pointer (param_values + 1),
data2);
g_value_set_boolean (return_value, v_return);
}
/* STRING:POINTER (../../../../goffice/goffice/utils/go-marshalers.list:25) */
void
go__STRING__POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
G_GNUC_UNUSED gpointer invocation_hint,
gpointer marshal_data)
{
typedef gchar* (*GMarshalFunc_STRING__POINTER) (gpointer data1,
gpointer arg_1,
gpointer data2);
register GMarshalFunc_STRING__POINTER callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
gchar* v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 2);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_STRING__POINTER) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1,
g_marshal_value_peek_pointer (param_values + 1),
data2);
g_value_take_string (return_value, v_return);
}
/* VOID:INT,BOOLEAN,BOOLEAN,BOOLEAN (../../../../goffice/goffice/utils/go-marshalers.list:26) */
void
go__VOID__INT_BOOLEAN_BOOLEAN_BOOLEAN (GClosure *closure,
G_GNUC_UNUSED GValue *return_value,
guint n_param_values,
const GValue *param_values,
G_GNUC_UNUSED gpointer invocation_hint,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__INT_BOOLEAN_BOOLEAN_BOOLEAN) (gpointer data1,
gint arg_1,
gboolean arg_2,
gboolean arg_3,
gboolean arg_4,
gpointer data2);
register GMarshalFunc_VOID__INT_BOOLEAN_BOOLEAN_BOOLEAN callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 5);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__INT_BOOLEAN_BOOLEAN_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_int (param_values + 1),
g_marshal_value_peek_boolean (param_values + 2),
g_marshal_value_peek_boolean (param_values + 3),
g_marshal_value_peek_boolean (param_values + 4),
data2);
}
#ifndef __go__MARSHAL_H__
#define __go__MARSHAL_H__
#include <glib-object.h>
G_BEGIN_DECLS
/* BOOLEAN:OBJECT (../../../../goffice/goffice/utils/go-marshalers.list:23) */
extern void go__BOOLEAN__OBJECT (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* BOOLEAN:POINTER (../../../../goffice/goffice/utils/go-marshalers.list:24) */
extern void go__BOOLEAN__POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* STRING:POINTER (../../../../goffice/goffice/utils/go-marshalers.list:25) */
extern void go__STRING__POINTER (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* VOID:INT,BOOLEAN,BOOLEAN,BOOLEAN (../../../../goffice/goffice/utils/go-marshalers.list:26) */
extern void go__VOID__INT_BOOLEAN_BOOLEAN_BOOLEAN (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
G_END_DECLS
#endif /* __go__MARSHAL_H__ */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice-utils.h:
*
* Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GOFFICE_UTILS_H
#define GOFFICE_UTILS_H
#include <glib.h>
#include <pango/pango.h>
#include <gdk/gdk.h>
G_BEGIN_DECLS
typedef guint32 GOColor;
typedef struct _GOEditor GOEditor;
typedef struct _GOFont GOFont;
typedef struct _GOFontMetrics GOFontMetrics;
typedef struct _GOPattern GOPattern;
typedef struct _GOMarker GOMarker;
typedef struct _GOFormat GOFormat;
typedef struct _GODateConventions GODateConventions;
typedef struct _GOImage GOImage;
typedef struct _GOPath GOPath;
typedef struct _GOString GOString;
typedef struct _GOStyle GOStyle;
typedef struct _GOStyledObject GOStyledObject;
/* rename this */
typedef struct _GOMemChunk GOMemChunk;
typedef const char *(*GOTranslateFunc)(char const *path, gpointer func_data);
typedef enum {
GO_LINE_NONE,
GO_LINE_SOLID,
GO_LINE_S_DOT,
GO_LINE_S_DASH_DOT,
GO_LINE_S_DASH_DOT_DOT,
GO_LINE_DASH_DOT_DOT_DOT,
GO_LINE_DOT,
GO_LINE_S_DASH,
GO_LINE_DASH,
GO_LINE_LONG_DASH,
GO_LINE_DASH_DOT,
GO_LINE_DASH_DOT_DOT,
GO_LINE_MAX
} GOLineDashType;
typedef enum {
GO_LINE_INTERPOLATION_LINEAR,
GO_LINE_INTERPOLATION_SPLINE,
GO_LINE_INTERPOLATION_CLOSED_SPLINE,
GO_LINE_INTERPOLATION_CUBIC_SPLINE,
GO_LINE_INTERPOLATION_PARABOLIC_CUBIC_SPLINE,
GO_LINE_INTERPOLATION_CUBIC_CUBIC_SPLINE,
GO_LINE_INTERPOLATION_CLAMPED_CUBIC_SPLINE,
GO_LINE_INTERPOLATION_STEP_START,
GO_LINE_INTERPOLATION_STEP_END,
GO_LINE_INTERPOLATION_STEP_CENTER_X,
GO_LINE_INTERPOLATION_STEP_CENTER_Y,
GO_LINE_INTERPOLATION_MAX
} GOLineInterpolation;
typedef enum
{
GO_ANCHOR_CENTER,
GO_ANCHOR_NORTH,
GO_ANCHOR_NORTH_WEST,
GO_ANCHOR_NORTH_EAST,
GO_ANCHOR_SOUTH,
GO_ANCHOR_SOUTH_WEST,
GO_ANCHOR_SOUTH_EAST,
GO_ANCHOR_WEST,
GO_ANCHOR_EAST,
GO_ANCHOR_N = GO_ANCHOR_NORTH,
GO_ANCHOR_NW = GO_ANCHOR_NORTH_WEST,
GO_ANCHOR_NE = GO_ANCHOR_NORTH_EAST,
GO_ANCHOR_S = GO_ANCHOR_SOUTH,
GO_ANCHOR_SW = GO_ANCHOR_SOUTH_WEST,
GO_ANCHOR_SE = GO_ANCHOR_SOUTH_EAST,
GO_ANCHOR_W = GO_ANCHOR_WEST,
GO_ANCHOR_E = GO_ANCHOR_EAST
} GOAnchorType;
G_END_DECLS
#include <goffice/goffice.h>
#include <goffice/utils/go-color.h>
#include <goffice/utils/go-file.h>
//#include <goffice/utils/go-format.h>
#include <goffice/utils/go-image.h>
#endif /* GOFFICE_UTILS_H */
Jody Goldberg, maintainer.
Jean Brefort, Core charting engine.
Emmanuel Pacaud, Many plot types for charting engine.
Morten Welinder, Gnumeric hacker and leak plugging demi-god.
Chris Lahey, number format engine, and powerpoint/escher code
NOTE : Keep this in sync with the about dialog and the webpage.
NOTE : Get an about dialog and a webpage :-)
This source diff could not be displayed because it is too large. You can view the blob instead.
noinst_LTLIBRARIES = libgoffice.la
AM_CPPFLAGS = \
$(DEPS_CFLAGS)
libgoffice_la_SOURCES = \
goffice/goffice-config.h \
goffice/goffice-features.h \
goffice/goffice-priv.h \
goffice/goffice.h \
goffice/goffice.c \
goffice/app/goffice-app.h \
goffice/app/go-cmd-context.h \
goffice/app/go-cmd-context.c \
goffice/app/go-cmd-context-impl.h \
goffice/gtk/goffice-gtk.h \
goffice/gtk/goffice-gtk.c \
goffice/gtk/go-color-palette.h \
goffice/gtk/go-color-palette.h \
goffice/gtk/go-color-palette.c \
goffice/gtk/go-color-group.h \
goffice/gtk/go-color-group.c \
goffice/gtk/go-combo-box.h \
goffice/gtk/go-combo-box.c \
goffice/gtk/go-combo-color.h \
goffice/gtk/go-combo-color.c \
goffice/utils/goffice-utils.h \
goffice/utils/go-glib-extras.h \
goffice/utils/go-glib-extras.c \
goffice/utils/go-image.h \
goffice/utils/go-image.c \
goffice/utils/go-marshalers.h \
goffice/utils/go-marshalers.c \
goffice/utils/go-file.h \
goffice/utils/go-file.c \
goffice/utils/go-color.h \
goffice/utils/go-color.c
BUILT_SOURCES = goffice-paths.h
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
AUTHORS \
ChangeLog \
COPYING \
README \
README.abiword
# Depends on this Makefile, because it uses make variables.
goffice-paths.h: Makefile
@echo 'creating $@'
@( \
echo '/* This file has been automatically generated. Do not edit. */'; \
echo ''; \
echo '#ifndef GOFFICE_PATHS_H'; \
echo '#define GOFFICE_PATHS_H'; \
echo ''; \
echo '#define GOFFICE_DATADIR "$(goffice_datadir)"'; \
echo '#define GOFFICE_LIBDIR "$(goffice_libdir)"'; \
echo '#define GOFFICE_ICONDIR "$(goffice_icondir)"'; \
echo '#define GOFFICE_LOCALEDIR "$(goffice_localedir)"'; \
echo ''; \
echo '#endif /* GOFFICE_PATHS_H */'; \
) >$@
GOffice -- A glib/gtk set of document centric objects and utilities
Jody Goldberg <jody@gnome.org>
There are common operations for document centric applications that are
conceptually simple, but complex to implement fully.
- plugins
- load/save documents
- undo/redo
To report goffice bugs, please visit bugzilla.gnome.org.
goffice is licensed under the terms of the GNU GPL included in the
file COPYING.
Requirements
------------
You need: Debian package name
glib >= 2.6.0 libglib2.0-dev
gtk+ >= 2.6.0 libgtk2.0-dev
pango >= 1.8.1 libpango1.0-dev
libgnomeprint >= 2.8.2 libgnomeprint2.2-dev
libgsf >= 1.13.3 libgsf-1-dev
libglade >= 2.3.6 libglade2-dev
gnome-xml >= 2.4.12 libxml2-dev
libart >= 2.3.11 libart-2.0-dev
NOTE: gnome-xml is also known as libxml
Mailing lists
-------------
There is a mailing list used to discuss Gnumeric, to subscribe
send a mail to:
gnumeric-list-request@gnome.org
And in the body of the message write "subscribe"
An archive of the mailing lists is available in:
http://mail.gnome.org/archives/gnumeric-list/
This directory contains some code from the goffice library.
When adding stuff maintain goffice's directory structure so switching
between this builtin and the system version doesn't break.
- Rob
#ifndef GO_CMD_CONTEXT_IMPL_H
#define GO_CMD_CONTEXT_IMPL_H
#include <goffice/app/go-cmd-context.h>
G_BEGIN_DECLS
typedef struct {
GTypeInterface base;
char * (*get_password) (GOCmdContext *gcc,
char const *filename);
void (*set_sensitive) (GOCmdContext *gcc,
gboolean sensitive);
struct {
void (*error) (GOCmdContext *gcc, GError *err);
void (*error_info) (GOCmdContext *gcc, ErrorInfo *err);
} error;
void (*progress_set) (GOCmdContext *gcc, float val);
void (*progress_message_set) (GOCmdContext *gcc, gchar const *msg);
} GOCmdContextClass;
#define GO_CMD_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GO_CMD_CONTEXT_TYPE, GOCmdContextClass))
#define IS_GO_CMD_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GO_CMD_CONTEXT_TYPE))
/* protected, these do not really belong here, they are associated with io-context */
void go_cmd_context_progress_set (GOCmdContext *gcc, float f);
void go_cmd_context_progress_message_set (GOCmdContext *gcc, char const *msg);
G_END_DECLS
#endif /* GO_CMD_CONTEXT_IMPL_H */
/*
* go-cmd-context.c : Error dispatch utilities.
*
* Author:
* Jody Goldberg <jody@gnome.org>
*
* (C) 1999-2004 Jody Goldberg
*/
#include <goffice/goffice-config.h>
#include "go-cmd-context-impl.h"
#include <goffice/app/goffice-app.h>
#include <gsf/gsf-impl-utils.h>
#include <glib/gi18n-lib.h>
#define GCC_CLASS(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GO_CMD_CONTEXT_TYPE, GOCmdContextClass))
static GError *
format_message (GQuark id, char const *message)
{
char const *msg = message ? message : "";
return g_error_new_literal (id, 0, msg);
}
void
go_cmd_context_error (GOCmdContext *context, GError *err)
{
g_return_if_fail (IS_GO_CMD_CONTEXT (context));
GCC_CLASS (context)->error.error (context, err);
}
void
go_cmd_context_error_info (GOCmdContext *context, ErrorInfo *stack)
{
g_return_if_fail (IS_GO_CMD_CONTEXT (context));
GCC_CLASS (context)->error.error_info (context, stack);
}
void
go_cmd_context_error_system (GOCmdContext *context, char const *message)
{
GError *err = format_message (go_error_system (), message);
go_cmd_context_error (context, err);
g_error_free (err);
}
void
go_cmd_context_error_import (GOCmdContext *context, char const *message)
{
GError *err = format_message (go_error_import (), message);
go_cmd_context_error (context, err);
g_error_free (err);
}
void
go_cmd_context_error_export (GOCmdContext *context, char const *message)
{
GError *err = format_message (go_error_export (), message);
go_cmd_context_error (context, err);
g_error_free (err);
}
void
go_cmd_context_error_invalid (GOCmdContext *context, char const *msg, char const *val)
{
GError *err = g_error_new (go_error_invalid(), 0, "Invalid %s : '%s'", msg, val);
go_cmd_context_error (context, err);
g_error_free (err);
}
GQuark
go_error_system (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_system");
return quark;
}
GQuark
go_error_import (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_import");
return quark;
}
GQuark
go_error_export (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_export");
return quark;
}
GQuark
go_error_invalid (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("go_error_invalid");
return quark;
}
void
go_cmd_context_progress_set (GOCmdContext *context, gfloat f)
{
g_return_if_fail (IS_GO_CMD_CONTEXT (context));
GCC_CLASS (context)->progress_set (context, f);
}
void
go_cmd_context_progress_message_set (GOCmdContext *context, gchar const *msg)
{
g_return_if_fail (IS_GO_CMD_CONTEXT (context));
if (msg == NULL)
msg = " ";
GCC_CLASS (context)->progress_message_set (context, msg);
}
char *
go_cmd_context_get_password (GOCmdContext *cc, char const *filename)
{
g_return_val_if_fail (IS_GO_CMD_CONTEXT (cc), NULL);
return GCC_CLASS (cc)->get_password (cc, filename);
}
void
go_cmd_context_set_sensitive (GOCmdContext *cc, gboolean sensitive)
{
g_return_if_fail (IS_GO_CMD_CONTEXT (cc));
GCC_CLASS (cc)->set_sensitive (cc, sensitive);
}
GType
go_cmd_context_get_type (void)
{
static GType go_cmd_context_type = 0;
if (!go_cmd_context_type) {
static GTypeInfo const go_cmd_context_info = {
sizeof (GOCmdContextClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
NULL, NULL, NULL, 0, 0, NULL, NULL
};
go_cmd_context_type = g_type_register_static (G_TYPE_INTERFACE,
"GOCmdContext", &go_cmd_context_info, 0);
}
return go_cmd_context_type;
}
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* go-cmd-context.h:
*
* Copyright (C) 2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GO_CMD_CONTEXT_H
#define GO_CMD_CONTEXT_H
#include <goffice/app/goffice-app.h>
#include <glib-object.h>
G_BEGIN_DECLS
#define GO_CMD_CONTEXT_TYPE (go_cmd_context_get_type ())
#define GO_CMD_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_CMD_CONTEXT_TYPE, GOCmdContext))
#define IS_GO_CMD_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_CMD_CONTEXT_TYPE))
GType go_cmd_context_get_type (void);
void go_cmd_context_error (GOCmdContext *cc, GError *err);
char *go_cmd_context_get_password (GOCmdContext *cc, char const *fname);
void go_cmd_context_set_sensitive (GOCmdContext *cc, gboolean flag);
/* utility routines for common errors */
void go_cmd_context_error_system (GOCmdContext *cc, char const *msg);
void go_cmd_context_error_import (GOCmdContext *cc, char const *msg);
void go_cmd_context_error_export (GOCmdContext *cc, char const *msg);
void go_cmd_context_error_invalid (GOCmdContext *cc,
char const *msg, char const *val);
void go_cmd_context_error_info (GOCmdContext *cc, ErrorInfo *stack);
/* An initial set of std errors */
GQuark go_error_system (void);
GQuark go_error_import (void);
GQuark go_error_export (void);
GQuark go_error_invalid (void);
G_END_DECLS
#endif /* GO_CMD_CONTEXT_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice-app.h:
*
* Copyright (C) 2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GOFFICE_APP_H
#define GOFFICE_APP_H
#include <glib.h>
G_BEGIN_DECLS
typedef struct _GOApp GOApp;
typedef struct _GODoc GODoc;
typedef struct _GODocControl GODocControl;
typedef struct _GOCmdContext GOCmdContext;
typedef struct _GOPlugin GOPlugin;
typedef struct _GOPluginService GOPluginService;
typedef struct _GOPluginLoader GOPluginLoader;
/* temporary */
typedef struct _ErrorInfo ErrorInfo;
typedef struct _GOFileSaver GOFileSaver;
typedef struct _GOFileOpener GOFileOpener;
typedef struct _IOContext IOContext;
/*
* File probe level tells file opener (its probe method to be exact), how
* hard it should try to recognize the type of the file. File openers may
* ignore this or support only some probe levels, but if specifies
* "reccomened" behaviour.
* Before opening any file we detect its type by calling probe for
* every registered file opener (in order of priority) and passing
* FILE_PROBE_FILE_NAME as probe level. If none of them recogizes the file,
* we increase probe level and try again...
*/
typedef enum {
FILE_PROBE_FILE_NAME, /* Test only file name, don't read file contents */
FILE_PROBE_CONTENT, /* Read the whole file if it's necessary */
FILE_PROBE_LAST
} FileProbeLevel;
G_END_DECLS
#endif /* GOFFICE_GRAPH_H */
/* goffice/goffice-config.h. Generated by configure. */
/* goffice/goffice-config.h.in. Generated from configure.in by autoheader. */
/* always defined to indicate that i18n is enabled */
#define ENABLE_NLS 1
/* The package name, for gettext */
#define GETTEXT_PACKAGE "goffice-0.3.1"
/* Define if G Office supplies acosh. */
/* #undef GOFFICE_SUPPLIED_ACOSH */
/* Define if G Office supplies asinh. */
/* #undef GOFFICE_SUPPLIED_ASINH */
/* Define if G Office supplies atanh. */
/* #undef GOFFICE_SUPPLIED_ATANH */
/* Define if G Office supplies expm1. */
/* #undef GOFFICE_SUPPLIED_EXPM1 */
/* Define if G Office supplies frexpl. */
/* #undef GOFFICE_SUPPLIED_FREXPL */
/* Define if G Office supplies ldexpl. */
/* #undef GOFFICE_SUPPLIED_LDEXPL */
/* Define if G Office supplies log1p. */
/* #undef GOFFICE_SUPPLIED_LOG1P */
/* Define if G Office supplies modfl. */
/* #undef GOFFICE_SUPPLIED_MODFL */
/* Define if G Office supplies strtold. */
#define GOFFICE_SUPPLIED_STRTOLD 1
/* The version number of this release, possibly with additional suffix */
#define GOFFICE_VERSION "0.3.1"
/* Define if goffice use cairo */
/* #undef GOFFICE_WITH_CAIRO */
/* Define if GNOME extensions are available */
/* #undef GOFFICE_WITH_GNOME */
/* Define if UI is built */
#define GOFFICE_WITH_GTK 1
/* Define if G Office supports long double. */
#define GOFFICE_WITH_LONG_DOUBLE 1
/* The Epoch of this release */
#define GO_VERSION_EPOCH 0
/* Extra, possibly empty tag for this release */
#define GO_VERSION_EXTRA ""
/* The Major version number of this release */
#define GO_VERSION_MAJOR 3
/* The Minor version number of this release */
#define GO_VERSION_MINOR 1
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
/* Define to 1 if you have the `dcgettext' function. */
#define HAVE_DCGETTEXT 1
/* Define to 1 if you have the `decimal_to_quadruple' function. */
/* #undef HAVE_DECIMAL_TO_QUADRUPLE */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `drand48' function. */
#define HAVE_DRAND48 1
/* Define if the finite function is available */
#define HAVE_FINITE 1
/* Define to 1 if you have the <floatingpoint.h> header file. */
/* #undef HAVE_FLOATINGPOINT_H */
/* Define if the GNU gettext() function is already present or preinstalled. */
#define HAVE_GETTEXT 1
/* Define if the gettimeofday function is available */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1
/* Define to 1 if you have the `gtk_dialog_get_response_for_widget' function.
*/
#define HAVE_GTK_DIALOG_GET_RESPONSE_FOR_WIDGET 1
/* Define if g_access is available as macro or function */
#define HAVE_G_ACCESS 1
/* Define if g_chmod is available as macro or function */
#define HAVE_G_CHMOD 1
/* Define to 1 if you have the <ieee754.h> header file. */
#define HAVE_IEEE754_H 1
/* Define to 1 if you have the <ieeefp.h> header file. */
/* #undef HAVE_IEEEFP_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define if the isfinite() macro is available */
#define HAVE_ISFINITE 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define if your <locale.h> file defines LC_MESSAGES. */
#define HAVE_LC_MESSAGES 1
/* Define to 1 if you have the `intl' library (-lintl). */
/* #undef HAVE_LIBINTL */
/* Define to 1 if you have the `m' library (-lm). */
/* #undef HAVE_LIBM */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if the log function is available */
#define HAVE_LOG 1
/* Define to 1 if long double works and has more range or precision than
double. */
#define HAVE_LONG_DOUBLE 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkdtemp' function. */
#define HAVE_MKDTEMP 1
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
/* Define if libXrender is available. */
#define HAVE_RENDER 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `string_to_decimal' function. */
/* #undef HAVE_STRING_TO_DECIMAL */
/* Define to 1 if you have the `strtold' function. */
#define HAVE_STRTOLD 1
/* Define to 1 if you have the `strtoll' function. */
#define HAVE_STRTOLL 1
/* Define to 1 if you have the `strtoq' function. */
#define HAVE_STRTOQ 1
/* Define to 1 if you have the <sunmath.h> header file. */
/* #undef HAVE_SUNMATH_H */
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `times' function. */
#define HAVE_TIMES 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Name of package */
#define PACKAGE "goffice"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=libgoffice"
/* Define to the full name of this package. */
#define PACKAGE_NAME "goffice"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "goffice 0.3.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "goffice"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.1"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.3.1"
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
#define YYTEXT_POINTER 1
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Don't include goffice-features.h, it's a subset of goffice-config.h. */
#define GOFFICE_FEATURES_H
/* goffice/goffice-features.h. Generated by configure. */
/*
* goffice-features.h.in:
*
* Copyright (C) 2005 Morten Welinder (terra@gnome.org)
*/
#ifndef GOFFICE_FEATURES_H
#define GOFFICE_FEATURES_H
/* Define if G Office supports long double. */
#define GOFFICE_WITH_LONG_DOUBLE 1
/* Define if G Office supplies acosh. */
/* #undef GOFFICE_SUPPLIED_ACOSH */
/* Define if G Office supplies asinh. */
/* #undef GOFFICE_SUPPLIED_ASINH */
/* Define if G Office supplies atanh. */
/* #undef GOFFICE_SUPPLIED_ATANH */
/* Define if G Office supplies expm1. */
/* #undef GOFFICE_SUPPLIED_EXPM1 */
/* Define if G Office supplies frexpl. */
/* #undef GOFFICE_SUPPLIED_FREXPL */
/* Define if G Office supplies ldexpl. */
/* #undef GOFFICE_SUPPLIED_LDEXPL */
/* Define if G Office supplies modfl. */
/* #undef GOFFICE_SUPPLIED_MODFL */
/* Define if G Office supplies strtold. */
#define GOFFICE_SUPPLIED_STRTOLD 1
/* The version number of this release, possibly with additional suffix */
#define GOFFICE_VERSION "0.3.1"
/* The Epoch of this release */
#define GO_VERSION_EPOCH 0
/* The Major version number of this release */
#define GO_VERSION_MAJOR 3
/* The Minor version number of this release */
#define GO_VERSION_MINOR 1
/* Extra, possibly empty tag for this release */
#define GO_VERSION_EXTRA ""
/* Define if GOffice uses Cairo */
/* #undef GOFFICE_WITH_CAIRO */
/* Define if GOffice uses Gtk+ */
#define GOFFICE_WITH_GTK 1
/* Define if GOffice uses Gnome */
/* #undef GOFFICE_WITH_GNOME */
#endif /* GOFFICE_FEATURES_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice-priv.h :
*
* Copyright (C) 2005 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#ifndef GOFFICE_PRIV_H
#define GOFFICE_PRIV_H
#include <glib.h>
G_BEGIN_DECLS
gchar const *go_sys_data_dir (void);
gchar const *go_sys_icon_dir (void);
gchar const *go_sys_lib_dir (void);
G_END_DECLS
#endif /* GOFFICE_PRIV_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* goffice.c : a bogus little init file to pull all the parts together
*
* Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#include <goffice/goffice-config.h>
#include <goffice/goffice.h>
#include <goffice/goffice-priv.h>
/* standalone
#include <goffice/graph/gog-series.h>
#include <goffice/graph/gog-plot.h>
#include <goffice/graph/gog-plot-engine.h>
#include <goffice/graph/gog-chart.h>
#include <goffice/graph/gog-graph.h>
#include <goffice/graph/gog-axis.h>
#include <goffice/graph/gog-legend.h>
#include <goffice/graph/gog-label.h>
#include <goffice/graph/gog-grid.h>
#include <goffice/graph/gog-grid-line.h>
#include <goffice/graph/gog-theme.h>
#include <goffice/graph/gog-error-bar.h>
#include <goffice/graph/gog-series-lines.h>
#include <goffice/data/go-data-simple.h>
#include <goffice/utils/go-format.h>
#include <goffice/utils/go-font.h>
#include <goffice/utils/go-math.h>
#include <goffice/app/go-plugin-service.h>
#include <goffice/component/go-component-factory.h>
*/
#include <gsf/gsf-utils.h>
#include "goffice-paths.h"
#include <libintl.h>
int goffice_graph_debug_level = 0;
static char const *libgoffice_data_dir = GOFFICE_DATADIR;
static char const *libgoffice_icon_dir = GOFFICE_ICONDIR;
static char const *libgoffice_locale_dir = GOFFICE_LOCALEDIR;
static char const *libgoffice_lib_dir = GOFFICE_LIBDIR;
gchar const *
go_sys_data_dir (void)
{
return libgoffice_data_dir;
}
gchar const *
go_sys_icon_dir (void)
{
return libgoffice_icon_dir;
}
gchar const *
go_sys_lib_dir (void)
{
return libgoffice_lib_dir;
}
void
libgoffice_init (void)
{
static gboolean initialized = FALSE;
if (initialized)
return;
#ifdef G_OS_WIN32
{
gchar *dir = g_win32_get_package_installation_directory (NULL, "libgoffice-0-3.dll");
libgoffice_data_dir = g_build_filename (dir,
"share", "goffice", GOFFICE_VERSION, NULL);
libgoffice_icon_dir = g_build_filename (dir,
"share", "pixmaps", "goffice", NULL);
libgoffice_locale_dir = g_build_filename (dir,
"share", "locale", NULL);
libgoffice_lib_dir = g_build_filename (dir,
"lib", "goffice", GOFFICE_VERSION, NULL);
g_free (dir);
}
#endif
bindtextdomain (GETTEXT_PACKAGE, libgoffice_locale_dir);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
/* standalone
go_fonts_init ();
go_math_init ();
gsf_init ();
plugin_services_init ();
gog_plugin_services_init ();
goc_plugin_services_init ();
(void) GOG_GRAPH_TYPE;
(void) GOG_CHART_TYPE;
(void) GOG_PLOT_TYPE;
(void) GOG_SERIES_TYPE;
(void) GOG_SERIES_ELEMENT_TYPE;
(void) GOG_LEGEND_TYPE;
(void) GOG_AXIS_TYPE;
(void) GOG_AXIS_LINE_TYPE;
(void) GOG_LABEL_TYPE;
(void) GOG_GRID_TYPE;
(void) GOG_GRID_LINE_TYPE;
(void) GOG_ERROR_BAR_TYPE;
(void) GOG_REG_EQN_TYPE;
(void) GOG_SERIES_LINES_TYPE;
(void) GO_DATA_SCALAR_VAL_TYPE;
(void) GO_DATA_SCALAR_STR_TYPE;
gog_themes_init ();
go_number_format_init ();
go_currency_date_format_init ();
*/
initialized = TRUE;
}
void
libgoffice_shutdown (void)
{
/* standalone
gog_themes_shutdown ();
go_fonts_shutdown ();
goc_plugin_services_shutdown ();
gog_plugin_services_shutdown ();
go_currency_date_format_shutdown ();
go_number_format_shutdown ();
*/
#ifdef G_OS_WIN32
g_free (libgoffice_data_dir);
g_free (libgoffice_icon_dir);
g_free (libgoffice_locale_dir);
g_free (libgoffice_lib_dir);
#endif
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment