gtkextra-3.2.0/0000755000076400001440000000000012604172532010350 500000000000000gtkextra-3.2.0/gtkextra-3.0.spec.in0000644000076400001440000000502512603754176013713 00000000000000 %define name gtkextra3 %define major @GTK_EXTRA_MAJOR_VERSION@ %define minor @GTK_EXTRA_MINOR_VERSION@ %define micro @GTK_EXTRA_MICRO_VERSION@ %define ver %major.%minor.%micro %define rel 1 Summary: A library of gtk+ widgets Name: %name Version: %ver Release: %rel%{?dist} License: LGPL Group: System Environment/Libraries Source: http://gtkextra.sourceforge.net/src/gtkextra-%version.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://gtkextra.sourceforge.net Requires: gtk2 >= 2.12.0 Requires: glib2 >= 2.12.0 Requires: pango Requires: atk BuildRequires: gtk2-devel BuildRequires: glib2-devel BuildRequires: pango-devel BuildRequires: atk-devel %description A library of dynamically linked gtk+ widgets including: GtkSheet, GtkPlot, and GtkIconList %package devel Summary: A library of gtk+ widgets Group: Development/Libraries Requires: %name = %{version} Requires: gtk2-devel Requires: glib2-devel Requires: pango-devel Requires: atk-devel %description devel The gtk+extra-devel package includes the static libraries, header files, and documentation for compiling programs that use gtk+extra widgets. %prep %setup -q -n gtkextra-%{version} %build export CFLAGS="$RPM_OPT_FLAGS" %configure --disable-tests make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc INSTALL README docs/*.ChangeLog %{_libdir}/libgtkextra*.so.* %files devel %defattr(-, root, root) %{_libdir}/*so %{_libdir}/*a %{_libdir}/pkgconfig/* %{_includedir}/* %{_datadir}/gtk-doc/html/gtkextra-3/* %changelog * Fri May 29 2015 Tom Schoonjans - Renamed doc folder * Wed Apr 17 2013 Tom Schoonjans - Modified spec file in order to make it compatible with the latest RPM building recommendations * Fri Jan 21 2005 Adrian E. Feiguin - First version for gtkextra-2 * Fri Dec 20 2002 Toby D. Reeves - Make the rpm name a variable. - Set rpm name to gtk+extra allowing both 0.99.x and 1.1.x to be installed. * Mon Jul 22 2002 Toby D. Reeves - Corrected for use of pkg-config * Wed Jul 17 2002 Toby D. Reeves - Corrected -install to use DESTDIR - Make gtk+extra-devel package require gtk+extra - Added *.so to devel files * Wed Mar 15 2000 Conrad Steenberg - First spec file gtkextra-3.2.0/glade/0000755000076400001440000000000012604172532011424 500000000000000gtkextra-3.2.0/glade/Makefile.am0000644000076400001440000000214612603754176013414 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = pixmaps glademoduledir = @GLADE_MODULE_DIR@ gladecatalogdir = @GLADE_CATALOG_DIR@ gladepixmapdir = @GLADE_PIXMAP_DIR@ libgladegtkextra = $(top_builddir)/glade/libgladegtkextra.la GLADEUI_LIBS = `pkg-config --libs gladeui-1.0` # activate this to install into glade-3 modules dir glademodule_LTLIBRARIES = libgladegtkextra.la # or activate this to install into gtkextra libdir #lib_LTLIBRARIES = libgladegtkextra.la libgladegtkextra_la_CPPLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) \ $(AM_CPPFLAGS) libgladegtkextra_la_CFLAGS = \ -DG_LOG_DOMAIN=\"GladeUI-GTKExtra\" \ -I$(top_srcdir) \ -I$(top_builddir) \ $(CFLAGS) \ @GLADE_CFLAGS@ \ $(PLUGINS_WARN_CFLAGS) \ $(AM_CFLAGS) libgladegtkextra_la_SOURCES = glade-gtksheet-editor.c libgladegtkextra_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS) $(GLADEUI_LIBS) libgladegtkextra_la_LIBADD = ../gtkextra/@gtkextratargetlib@ if PLATFORM_WIN32 libgladegtkextra_la_LDFLAGS += -no-undefined endif # catalog data gladecatalog_DATA = gtk+extra-catalog.xml EXTRA_DIST = gtk+extra-catalog.xml gtkextra-3.2.0/glade/gtk+extra-catalog.xml.in0000644000076400001440000002702012603754176016021 00000000000000 gtkextra glade_gtk_sheet_action_activate glade_gtk_sheet_get_children glade_gtk_sheet_get_children glade_gtk_sheet_add_child glade_gtk_sheet_remove_child glade_gtk_sheet_replace_child gtkextra-3.2.0/glade/Makefile.in0000644000076400001440000006611412604172272013422 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined subdir = glade DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/gtk+extra-catalog.xml.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gtk+extra-catalog.xml CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(glademoduledir)" \ "$(DESTDIR)$(gladecatalogdir)" LTLIBRARIES = $(glademodule_LTLIBRARIES) libgladegtkextra_la_DEPENDENCIES = ../gtkextra/@gtkextratargetlib@ am_libgladegtkextra_la_OBJECTS = \ libgladegtkextra_la-glade-gtksheet-editor.lo libgladegtkextra_la_OBJECTS = $(am_libgladegtkextra_la_OBJECTS) libgladegtkextra_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libgladegtkextra_la_CFLAGS) $(CFLAGS) \ $(libgladegtkextra_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libgladegtkextra_la_SOURCES) DIST_SOURCES = $(libgladegtkextra_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive DATA = $(gladecatalog_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLADE_CATALOG_DIR = @GLADE_CATALOG_DIR@ GLADE_CFLAGS = @GLADE_CFLAGS@ GLADE_LIBS = @GLADE_LIBS@ GLADE_MODULE_DIR = @GLADE_MODULE_DIR@ GLADE_PIXMAP_DIR = @GLADE_PIXMAP_DIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_EXTRA_MAJOR_VERSION = @GTK_EXTRA_MAJOR_VERSION@ GTK_EXTRA_MICRO_VERSION = @GTK_EXTRA_MICRO_VERSION@ GTK_EXTRA_MINOR_VERSION = @GTK_EXTRA_MINOR_VERSION@ GTK_EXTRA_VERSION = @GTK_EXTRA_VERSION@ GTK_EXTRA_VERSION_SHORT = @GTK_EXTRA_VERSION_SHORT@ GTK_LIBS = @GTK_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGTKEXTRA_SO_VERSION = @LIBGTKEXTRA_SO_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gdktarget = @gdktarget@ gtkextratargetlib = @gtkextratargetlib@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgladegtkextra_soname = @libgladegtkextra_soname@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ms_librarian = @ms_librarian@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = pixmaps glademoduledir = @GLADE_MODULE_DIR@ gladecatalogdir = @GLADE_CATALOG_DIR@ gladepixmapdir = @GLADE_PIXMAP_DIR@ libgladegtkextra = $(top_builddir)/glade/libgladegtkextra.la GLADEUI_LIBS = `pkg-config --libs gladeui-1.0` # activate this to install into glade-3 modules dir glademodule_LTLIBRARIES = libgladegtkextra.la # or activate this to install into gtkextra libdir #lib_LTLIBRARIES = libgladegtkextra.la libgladegtkextra_la_CPPLAGS = \ -I$(top_srcdir) \ -I$(top_builddir) \ $(AM_CPPFLAGS) libgladegtkextra_la_CFLAGS = \ -DG_LOG_DOMAIN=\"GladeUI-GTKExtra\" \ -I$(top_srcdir) \ -I$(top_builddir) \ $(CFLAGS) \ @GLADE_CFLAGS@ \ $(PLUGINS_WARN_CFLAGS) \ $(AM_CFLAGS) libgladegtkextra_la_SOURCES = glade-gtksheet-editor.c libgladegtkextra_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS) \ $(GLADEUI_LIBS) $(am__append_1) libgladegtkextra_la_LIBADD = ../gtkextra/@gtkextratargetlib@ # catalog data gladecatalog_DATA = gtk+extra-catalog.xml EXTRA_DIST = gtk+extra-catalog.xml all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glade/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign glade/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gtk+extra-catalog.xml: $(top_builddir)/config.status $(srcdir)/gtk+extra-catalog.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-glademoduleLTLIBRARIES: $(glademodule_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(glademoduledir)" || $(MKDIR_P) "$(DESTDIR)$(glademoduledir)" @list='$(glademodule_LTLIBRARIES)'; test -n "$(glademoduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(glademoduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(glademoduledir)"; \ } uninstall-glademoduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(glademodule_LTLIBRARIES)'; test -n "$(glademoduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(glademoduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(glademoduledir)/$$f"; \ done clean-glademoduleLTLIBRARIES: -test -z "$(glademodule_LTLIBRARIES)" || rm -f $(glademodule_LTLIBRARIES) @list='$(glademodule_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgladegtkextra.la: $(libgladegtkextra_la_OBJECTS) $(libgladegtkextra_la_DEPENDENCIES) $(libgladegtkextra_la_LINK) -rpath $(glademoduledir) $(libgladegtkextra_la_OBJECTS) $(libgladegtkextra_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgladegtkextra_la-glade-gtksheet-editor.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libgladegtkextra_la-glade-gtksheet-editor.lo: glade-gtksheet-editor.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgladegtkextra_la_CFLAGS) $(CFLAGS) -MT libgladegtkextra_la-glade-gtksheet-editor.lo -MD -MP -MF $(DEPDIR)/libgladegtkextra_la-glade-gtksheet-editor.Tpo -c -o libgladegtkextra_la-glade-gtksheet-editor.lo `test -f 'glade-gtksheet-editor.c' || echo '$(srcdir)/'`glade-gtksheet-editor.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libgladegtkextra_la-glade-gtksheet-editor.Tpo $(DEPDIR)/libgladegtkextra_la-glade-gtksheet-editor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glade-gtksheet-editor.c' object='libgladegtkextra_la-glade-gtksheet-editor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgladegtkextra_la_CFLAGS) $(CFLAGS) -c -o libgladegtkextra_la-glade-gtksheet-editor.lo `test -f 'glade-gtksheet-editor.c' || echo '$(srcdir)/'`glade-gtksheet-editor.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-gladecatalogDATA: $(gladecatalog_DATA) @$(NORMAL_INSTALL) test -z "$(gladecatalogdir)" || $(MKDIR_P) "$(DESTDIR)$(gladecatalogdir)" @list='$(gladecatalog_DATA)'; test -n "$(gladecatalogdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladecatalogdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(gladecatalogdir)" || exit $$?; \ done uninstall-gladecatalogDATA: @$(NORMAL_UNINSTALL) @list='$(gladecatalog_DATA)'; test -n "$(gladecatalogdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gladecatalogdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gladecatalogdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(glademoduledir)" "$(DESTDIR)$(gladecatalogdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-glademoduleLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-gladecatalogDATA \ install-glademoduleLTLIBRARIES install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-gladecatalogDATA \ uninstall-glademoduleLTLIBRARIES .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ clean-glademoduleLTLIBRARIES clean-libtool ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-gladecatalogDATA \ install-glademoduleLTLIBRARIES install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-gladecatalogDATA uninstall-glademoduleLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gtkextra-3.2.0/glade/glade-gtksheet-editor.c0000644000076400001440000004377512603754176015715 00000000000000/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Copyright (C) 2008 Tristan Van Berkom. * * This library is free software; you can redistribute it and/or it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Authors: * Tristan Van Berkom * Fredy Paquet (adopted for GtkSheet) */ #include "config.h" #include #include #include #include "glade-gtksheet-editor.h" #include "gtkextra/gtksheet.h" #undef GTK_SHEET_EDITOR_DEBUG #ifdef DEBUG # define GTK_SHEET_EDITOR_DEBUG 1 /* define to activate debug output */ #endif #ifdef GTK_SHEET_EDITOR_DEBUG # define GTK_SHEET_EDITOR_DEBUG_CHILDREN 0 # define GTK_SHEET_EDITOR_DEBUG_LAYOUT 0 #endif static void glade_sheet_editor_finalize(GObject *object); static void glade_sheet_editor_editable_init(GladeEditableIface *iface); static void glade_sheet_editor_realize(GtkWidget *widget); static void glade_sheet_editor_grab_focus(GtkWidget *widget); G_DEFINE_TYPE_WITH_CODE ( GladeSheetEditor, glade_sheet_editor, GTK_TYPE_HBOX, G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_sheet_editor_editable_init) ); static void glade_sheet_editor_class_init (GladeSheetEditorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); object_class->finalize = glade_sheet_editor_finalize; widget_class->realize = glade_sheet_editor_realize; widget_class->grab_focus = glade_sheet_editor_grab_focus; } static void glade_sheet_editor_init (GladeSheetEditor *self) { } static void project_changed (GladeProject *project, GladeCommand *command, gboolean execute, GladeSheetEditor *view_editor) { if (!GTK_WIDGET_MAPPED (view_editor)) return; /* Reload on all commands */ glade_editable_load (GLADE_EDITABLE (view_editor), view_editor->loaded_widget); } static void project_finalized (GladeSheetEditor *view_editor, GladeProject *where_project_was) { view_editor->loaded_widget = NULL; glade_editable_load (GLADE_EDITABLE (view_editor), NULL); } static GladeWidget * get_model_widget (GladeWidget *view) { return NULL; } static void glade_sheet_editor_load (GladeEditable *editable, GladeWidget *widget) { GladeSheetEditor *view_editor = GLADE_SHEET_EDITOR (editable); GladeWidget *model_widget; /* Since we watch the project*/ if (view_editor->loaded_widget) { g_signal_handlers_disconnect_by_func (G_OBJECT (view_editor->loaded_widget->project), G_CALLBACK (project_changed), view_editor); /* The widget could die unexpectedly... */ g_object_weak_unref (G_OBJECT (view_editor->loaded_widget->project), (GWeakNotify)project_finalized, view_editor); } /* Mark our widget... */ view_editor->loaded_widget = widget; if (view_editor->loaded_widget) { /* This fires for undo/redo */ g_signal_connect (G_OBJECT (view_editor->loaded_widget->project), "changed", G_CALLBACK (project_changed), view_editor); /* The widget/project could die unexpectedly... */ g_object_weak_ref (G_OBJECT (view_editor->loaded_widget->project), (GWeakNotify) project_finalized, view_editor); } /* load the embedded editable... */ if (view_editor->embed) glade_editable_load (GLADE_EDITABLE (view_editor->embed), widget); if (view_editor->embed_list_store && view_editor->embed_tree_store) { gtk_widget_hide (view_editor->no_model_message); gtk_widget_hide (view_editor->embed_list_store); gtk_widget_hide (view_editor->embed_tree_store); glade_editable_load (GLADE_EDITABLE (view_editor->embed_list_store), NULL); glade_editable_load (GLADE_EDITABLE (view_editor->embed_tree_store), NULL); /* Finalize safe code here... */ if (widget && (model_widget = get_model_widget (widget))) { if (GTK_IS_LIST_STORE (model_widget->object)) { gtk_widget_show (view_editor->embed_list_store); glade_editable_load (GLADE_EDITABLE (view_editor->embed_list_store), model_widget); } else if (GTK_IS_TREE_STORE (model_widget->object)) { gtk_widget_show (view_editor->embed_tree_store); glade_editable_load (GLADE_EDITABLE (view_editor->embed_tree_store), model_widget); } else gtk_widget_show (view_editor->no_model_message); } else gtk_widget_show (view_editor->no_model_message); } } static void glade_sheet_editor_set_show_name (GladeEditable *editable, gboolean show_name) { GladeSheetEditor *view_editor = GLADE_SHEET_EDITOR (editable); glade_editable_set_show_name (GLADE_EDITABLE (view_editor->embed), show_name); } static void glade_sheet_editor_editable_init (GladeEditableIface *iface) { iface->load = glade_sheet_editor_load; iface->set_show_name = glade_sheet_editor_set_show_name; } static void glade_sheet_editor_finalize (GObject *object) { GladeSheetEditor *view_editor = GLADE_SHEET_EDITOR (object); view_editor->embed_tree_store = NULL; view_editor->embed_list_store = NULL; view_editor->embed = NULL; glade_editable_load (GLADE_EDITABLE (object), NULL); G_OBJECT_CLASS (glade_sheet_editor_parent_class)->finalize (object); } static void glade_sheet_editor_realize (GtkWidget *widget) { GladeSheetEditor *view_editor = GLADE_SHEET_EDITOR (widget); GTK_WIDGET_CLASS (glade_sheet_editor_parent_class)->realize (widget); glade_editable_load (GLADE_EDITABLE (view_editor), view_editor->loaded_widget); } static void glade_sheet_editor_grab_focus (GtkWidget *widget) { GladeSheetEditor *view_editor = GLADE_SHEET_EDITOR (widget); gtk_widget_grab_focus (view_editor->embed); } GtkWidget * glade_sheet_editor_new (GladeWidgetAdaptor *adaptor, GladeEditable *embed) { GladeSheetEditor *view_editor; GtkWidget *vbox, *separator; gchar *str; g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL); g_return_val_if_fail (GLADE_IS_EDITABLE (embed), NULL); view_editor = g_object_new (GLADE_TYPE_SHEET_EDITOR, NULL); view_editor->embed = GTK_WIDGET (embed); /* Pack the parent on the left... */ gtk_box_pack_start (GTK_BOX (view_editor), GTK_WIDGET (embed), TRUE, TRUE, 8); separator = gtk_vseparator_new (); gtk_box_pack_start (GTK_BOX (view_editor), separator, FALSE, FALSE, 0); /* ...and the vbox with datastore/label on the right */ vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (view_editor), vbox, TRUE, TRUE, 8); str = g_strdup_printf ("%s", _("XXX Choose a Data Model and define some\n" "columns in the data store first")); view_editor->no_model_message = gtk_label_new (str); gtk_label_set_use_markup (GTK_LABEL (view_editor->no_model_message), TRUE); gtk_label_set_justify (GTK_LABEL (view_editor->no_model_message), GTK_JUSTIFY_CENTER); g_free (str); gtk_box_pack_start (GTK_BOX (vbox), view_editor->no_model_message, TRUE, TRUE, 0); view_editor->embed_list_store = (GtkWidget *) glade_widget_adaptor_create_editable( glade_widget_adaptor_get_by_type (GTK_TYPE_LIST_STORE), GLADE_PAGE_GENERAL); glade_editable_set_show_name (GLADE_EDITABLE (view_editor->embed_list_store), FALSE); gtk_box_pack_start (GTK_BOX (vbox), view_editor->embed_list_store, TRUE, TRUE, 0); view_editor->embed_tree_store = (GtkWidget *)glade_widget_adaptor_create_editable( glade_widget_adaptor_get_by_type (GTK_TYPE_TREE_STORE), GLADE_PAGE_GENERAL); glade_editable_set_show_name (GLADE_EDITABLE (view_editor->embed_tree_store), FALSE); gtk_box_pack_start (GTK_BOX (vbox), view_editor->embed_tree_store, TRUE, TRUE, 0); gtk_widget_show_all (GTK_WIDGET (view_editor)); return GTK_WIDGET (view_editor); } static gboolean glade_gtk_sheet_layout_move_child (GladeBaseEditor *editor, GladeWidget *gparent, GladeWidget *gchild, gpointer data) { GObject *parent = glade_widget_get_object (gparent); GObject *child = glade_widget_get_object (gchild); GList list = { 0,}; #if GTK_SHEET_EDITOR_DEBUG_LAYOUT > 0 g_debug("glade_gtk_sheet_layout_move_child: called"); #endif if (GTK_IS_SHEET(parent) && !GTK_IS_SHEET_COLUMN (child)) return FALSE; if (GTK_IS_CELL_LAYOUT(parent) && !GTK_IS_CELL_RENDERER (child)) return FALSE; if (GTK_IS_CELL_RENDERER(parent)) return FALSE; if (gparent != glade_widget_get_parent (gchild)) { list.data = gchild; glade_command_dnd(&list, gparent, NULL); } return TRUE; } static void glade_gtk_sheet_layout_child_selected (GladeBaseEditor *editor, GladeWidget *gchild, gpointer data) { GObject *child = glade_widget_get_object (gchild); #if GTK_SHEET_EDITOR_DEBUG_LAYOUT > 0 g_debug("glade_gtk_sheet_layout_child_selected: called"); #endif glade_base_editor_add_label (editor, GTK_IS_SHEET_COLUMN (child) ? _("GtkSheet Column") : _("Unknown")); glade_base_editor_add_default_properties (editor, gchild); glade_base_editor_add_label (editor, GTK_IS_SHEET_COLUMN (child) ? _("Properties") : _("Properties and Attributes")); glade_base_editor_add_editable (editor, gchild, GLADE_PAGE_GENERAL); if (GTK_IS_CELL_RENDERER (child)) { glade_base_editor_add_label (editor, _("Common Properties and Attributes")); glade_base_editor_add_editable (editor, gchild, GLADE_PAGE_COMMON); } } static gchar * glade_gtk_sheet_layout_get_display_name (GladeBaseEditor *editor, GladeWidget *gchild, gpointer user_data) { GObject *child = glade_widget_get_object (gchild); gchar *name; if (GTK_IS_TREE_VIEW_COLUMN (child)) glade_widget_property_get (gchild, "title", &name); else name = gchild->name; #if GTK_SHEET_EDITOR_DEBUG_LAYOUT > 0 g_debug("glade_gtk_sheet_layout_get_display_name: called <%s>", name ? name : "NULL"); #endif return g_strdup (name); } static void glade_gtk_sheet_launch_editor(GObject *sheet) { GladeWidget *widget = glade_widget_get_from_gobject (sheet); GladeBaseEditor *editor; GladeEditable *sheet_editor; GtkWidget *window; sheet_editor = glade_widget_adaptor_create_editable (widget->adaptor, GLADE_PAGE_GENERAL); sheet_editor = (GladeEditable *) glade_sheet_editor_new (widget->adaptor, sheet_editor); /* Editor */ editor = glade_base_editor_new (sheet, sheet_editor, _("Column"), G_TYPE_SHEET_COLUMN, NULL); /* glade_base_editor_append_types (editor, GTK_TYPE_TREE_VIEW_COLUMN, _("Text"), GTK_TYPE_CELL_RENDERER_TEXT, _("Accelerator"), GTK_TYPE_CELL_RENDERER_ACCEL, _("Combo"), GTK_TYPE_CELL_RENDERER_COMBO, _("Spin"), GTK_TYPE_CELL_RENDERER_SPIN, _("Pixbuf"), GTK_TYPE_CELL_RENDERER_PIXBUF, _("Progress"), GTK_TYPE_CELL_RENDERER_PROGRESS, _("Toggle"), GTK_TYPE_CELL_RENDERER_TOGGLE, NULL); */ g_signal_connect (editor, "get-display-name", G_CALLBACK (glade_gtk_sheet_layout_get_display_name), NULL); g_signal_connect (editor, "child-selected", G_CALLBACK (glade_gtk_sheet_layout_child_selected), NULL); g_signal_connect (editor, "move-child", G_CALLBACK (glade_gtk_sheet_layout_move_child), NULL); gtk_widget_show (GTK_WIDGET (editor)); window = glade_base_editor_pack_new_window (editor, _("GtkSheet Editor"), NULL); gtk_widget_show (window); } void glade_gtk_sheet_action_activate (GladeWidgetAdaptor *adaptor, GObject *object, const gchar *action_path) { if (strcmp (action_path, "launch_editor") == 0) { glade_gtk_sheet_launch_editor (object); } else GWA_GET_CLASS (GTK_TYPE_CONTAINER)->action_activate (adaptor, object, action_path); } /** * Glade-3 - child widget adaptor interface * */ extern void gtk_sheet_buildable_add_child_internal(GtkSheet *sheet, GtkSheetColumn *child, char *name); /* static void gtk_sheet_children_callback (GtkWidget *widget, gpointer client_data) { GList **children; children = (GList**) client_data; *children = g_list_prepend (*children, widget); } */ GList * glade_gtk_sheet_get_children(GladeWidgetAdaptor *adaptor, GtkContainer *container) { GList *children = NULL; GtkSheet *sheet; gint col; #if GTK_SHEET_EDITOR_DEBUG_CHILDREN > 0 g_debug("glade_gtk_sheet_get_children: called"); #endif g_return_val_if_fail (GTK_IS_SHEET (container), NULL); sheet = GTK_SHEET(container); /* gtk_container_forall (container, gtk_sheet_children_callback, &children); */ for (col=0; col<=sheet->maxcol; col++) { children = g_list_append(children, sheet->column[col]); } /* Is the children list already reversed? */ return children; } void glade_gtk_sheet_add_child(GladeWidgetAdaptor *adaptor, GObject *object, GObject *child) { GtkSheet *sheet; GtkSheetColumn *newcol; GladeWidget *child_widget = glade_widget_get_from_gobject (child); const gchar *name = glade_widget_get_name(child_widget); g_return_if_fail (GTK_IS_SHEET (object)); g_return_if_fail (GTK_IS_WIDGET (child)); #if GTK_SHEET_EDITOR_DEBUG_CHILDREN > 0 g_debug("glade_gtk_sheet_add_child: %s %d", name ? name : "NULL", GLADE_IS_WIDGET(child) ); #endif sheet = GTK_SHEET(object); newcol = GTK_SHEET_COLUMN(child); gtk_sheet_buildable_add_child_internal(sheet, newcol, name); } void glade_gtk_sheet_remove_child(GladeWidgetAdaptor *adaptor, GObject *object, GObject *child) { gint col; GtkSheet *sheet; GtkSheetColumn *oldcol; #if GTK_SHEET_EDITOR_DEBUG_CHILDREN > 0 g_debug("glade_gtk_sheet_remove_child: called"); #endif g_return_if_fail (GTK_IS_SHEET (object)); g_return_if_fail (GTK_IS_WIDGET (child)); sheet = GTK_SHEET(object); oldcol = GTK_SHEET_COLUMN(child); for (col=0; col<=sheet->maxcol; col++) { if (oldcol == sheet->column[col]) { gtk_sheet_delete_columns(sheet, col, 1); return; } } g_warning("glade_gtk_sheet_remove_child: couldn't remove child %p", child); } void glade_gtk_sheet_replace_child( GladeWidgetAdaptor *adaptor, GObject *object, GObject *old_obj, GObject *new_obj) { gint col; GtkSheet *sheet; GtkSheetColumn *oldcol, *newcol; #if GTK_SHEET_EDITOR_DEBUG_CHILDREN > 0 g_debug("glade_gtk_sheet_replace_child: called %p -> %p", old_obj, new_obj); #endif g_return_if_fail (GTK_IS_SHEET (object)); g_return_if_fail (GTK_IS_WIDGET (old_obj)); if (GLADE_IS_PLACEHOLDER (new_obj)) { glade_gtk_sheet_remove_child (adaptor, object, old_obj); return; } g_return_if_fail (GTK_IS_WIDGET (new_obj)); sheet = GTK_SHEET(object); oldcol = GTK_SHEET_COLUMN(old_obj); newcol = GTK_SHEET_COLUMN(new_obj); for (col=0; col<=sheet->maxcol; col++) { if (oldcol == sheet->column[col]) { g_object_unref(sheet->column[col]); sheet->column[col] = newcol; return; } } g_warning("glade_gtk_sheet_replace_child: couldn't replace child %p by %p", old_obj, new_obj); } #if 0 void glade_gtk_sheet_column_set_property( GladeWidgetAdaptor *adaptor, GObject *object, const gchar *property_name, const GValue *value) { #ifdef GTK_SHEET_EDITOR_DEBUG g_debug("glade_gtk_sheet_column_set_property: called %p %s", object, property_name); #endif } void glade_gtk_sheet_column_get_property( GladeWidgetAdaptor *adaptor, GObject *object, const gchar *property_name, GValue *value) { #ifdef GTK_SHEET_EDITOR_DEBUG g_debug("glade_gtk_sheet_column_get_property: called %p %s", object, property_name); #endif } #endif gtkextra-3.2.0/glade/gtk+extra-catalog.xml0000644000076400001440000002701212604172300015375 00000000000000 gtkextra glade_gtk_sheet_action_activate glade_gtk_sheet_get_children glade_gtk_sheet_get_children glade_gtk_sheet_add_child glade_gtk_sheet_remove_child glade_gtk_sheet_replace_child gtkextra-3.2.0/glade/pixmaps/0000755000076400001440000000000012604172532013105 500000000000000gtkextra-3.2.0/glade/pixmaps/hicolor/0000755000076400001440000000000012604172532014544 500000000000000gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/0000755000076400001440000000000012604172532015323 500000000000000gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/0000755000076400001440000000000012604172532016763 500000000000000gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/widget-gtkextra-gtkcombobutton.png0000644000076400001440000000044012603754176025571 00000000000000PNG  IHDRĴl;sRGB pHYs  tIME !28tEXtCommentCreated with GIMPWIDAT8 E EwbNLxC"`?R>~"e@)z6qDmU)L;Bz081ƹ|)$PiS^"?>3@fk`S_zYw^;7 ,bIENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/widget-gtkextra-gtkcolorcombo.png0000644000076400001440000000041412603754176025375 00000000000000PNG  IHDRĴl;sRGB pHYs  tIME $A0tEXtCommentCreated with GIMPWyIDAT8픻 0glDODrLGwf$^ D"bƥR BAX,\.ssm#L"0 Hr)$ 0Lf;xԱZ"麎p8Zqxik0aJ:Wd2JӞp^1( zv9w?Ȗ'/%7:һp],&2>AxrjHxKZ׿|>誯ev" bSu^,btN. !K{IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/widget-gtkextra-gtkfontcombo.png0000644000076400001440000000065412603754176025233 00000000000000PNG  IHDRĴl;sRGB pHYs  tIME 9ҸtEXtCommentCreated with GIMPWIDAT8=@{eNR\6.AU\EJYZ9 ~FxCxEʙ< ;0aX̼I۫M8MSbf*~'qȲ,2M.U<*`&a3kT>Sa"c8NqM,eY^J gn7<0 y+a)J),8um#뺛UH)WT e Mж-iZk{ EryHװ+IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/widget-gtkextra-gtkplotpolar.png0000644000076400001440000000122712603754176025256 00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME(\tEXtCommentCreated with GIMPWIDAT8˭@_11zVV$&^ ޅ `-͉6X[BBxzX8lfgfw~qL~kN$Xժq *(I\.8 MS0t"iy0 nkȲ,FQ1"$Rak>v:2s,K#a___B"I˲~ö* m۶x<i;zGt>*S8 0Qqw&@%,TJٙ$Iu@s]/(XD]?t](ф5#Uf~gMU͈$a'RMz RJͨiHmn|6DYBtG@Jb~mS^&=MJ! $I/gmgu_IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/widget-gtkextra-gtkplotcanvas.png0000644000076400001440000000132212603754176025410 00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME 4]2tEXtCommentCreated with GIMPW-IDAT8˭Oh`ƟMڅ:Y+ԡE!Av RţEAЛ7񠇉u*gViL.6sz{y/Lj1|XVb<]E%qB 48chx!o,6q>y7aϸۄFSCXVS>l=Cn!c8.@hvƷ!2'?Hh,= oH_[>eiʒq L+xAMa&:?-& -e_n;(b!Lu7/C5=cԒ2xV繞@oYӅ5Vޘ!ŕ$Uҍ,HTJY)""phQ6nN3}*p3Bqw r&q+6=| |{n8fBv%k mٲf{VR ls{`%8Cb7 ]9: w^y5i5 4G%ZIENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/widget-gtkextra-gtkplotaxis.png0000644000076400001440000000046612603754176025111 00000000000000PNG  IHDRĴl;sRGBbKGD pHYs  tIME jdztEXtCommentCreated with GIMPWIDAT81 EGw;{A9CNX W6P Ss2^OXgnxt"p94ݔRb|S=kA1Bo@xo IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/22x22/actions/widget-gtkextra-gtkplotcandle.png0000644000076400001440000000046412603754176025371 00000000000000PNG  IHDRĴl;sRGBbKGDC pHYs  tIME pbtEXtCommentCreated with GIMPWIDAT8ŕ wX?J<ŁnPDDk:$f{Q0L{Q tGY44t-̿Dan='2C\|7Por=. b+<-u?jҍ|X @%P{ZNe-# .ttH==n 4ݑѢ?}IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkiconlist.png0000644000076400001440000000037712603754176025101 00000000000000PNG  IHDRasRGBbKGDC pHYs  tIME 'lK'tEXtCommentCreated with GIMPWZIDAT8cd``@`a```<3(X k(qt $$" gê8#$Fca#ٙʊ$}IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkplotbubble.png0000644000076400001440000000042112603754176025375 00000000000000PNG  IHDRh6sRGB pHYs  tIME tEXtCommentCreated with GIMPW~IDAT(c?###A0AT#60l a6\)n=L $Ft?@rjD, ?yzY$6~@v2hlx@2xbg(4h 8 ?d?]45IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkitementry.png0000644000076400001440000000032012603754176025261 00000000000000PNG  IHDRh6sRGB pHYs  tIME ":J<tEXtCommentCreated with GIMPW=IDAT(c?) B122WW8l` I602 C {P"?dzzd% * Ø(IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkbordercombo.png0000644000076400001440000000041612603754176025544 00000000000000PNG  IHDRasRGBbKGD pHYs  tIME _tEXtCommentCreated with GIMPWiIDAT8ݒ [/^Ryp>!؛$PW;@s$6 buVUyג8ߝ\m{,/`۶(L9u{$ZkQML$m M&0 e }g*X9IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkplotcanvas.png0000644000076400001440000000116112603754176025417 00000000000000PNG  IHDRasRGBbKGD pHYs  tIME ( J.tEXtCommentCreated with GIMPWIDAT8˥?hA]rFSQO,Q&i`!"("XHM@-R!#<&GӅfgvY$F׽o7އH^ȥے"P"/{b×4w*9ͅ xs|1n..zq|cq"4KDԹV{aStolz AxV}gOaox 9]EoGG}Ci02 yvr2Z!J)ۑefg|fQp? qdP.72鞬^C[|iD^9uM].FŎۃAxmljǛZxhH(t;sL8Ҥ=h`.UdϒRU6S ~I,Ն?7rjĿ։,\ =w(IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkcheckitem.png0000644000076400001440000000050512603754176025202 00000000000000PNG  IHDRasRGB pHYs  tIME H5%tEXtCommentCreated with GIMPWIDAT8˥1 @EgX "9P<`/xHn00?X]H=ly0;Pאm}*{X C: @Q@?a 2#@AUA@&ճ9sYׯRUVJQ?eѡ4o]NLKIENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkplotcandle.png0000644000076400001440000000036512603754176025377 00000000000000PNG  IHDRh6sRGB pHYs  tIME 2tEXtCommentCreated with GIMPWbIDAT(ϥR1!k? Qu"Z ibuE mf%e5")xD|>6SMnD4ֈu5Cj0_yO`#4@IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtksheetcolumn.png0000644000076400001440000000033612603754176025576 00000000000000PNG  IHDRh6sRGB pHYs  tIME*׍tEXtCommentCreated with GIMPWKIDAT(O 0 ^SJBI[P "F݃3#if# ET=&nW6t6t mzƗ-IENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkcharselection.png0000644000076400001440000000034012603754176026066 00000000000000PNG  IHDRasRGBbKGD pHYs  tIME `IDAT8;0 C?auh~FH n]s1wZY5{K!BZ))fIx';M/&[DIENDB`gtkextra-3.2.0/glade/pixmaps/hicolor/16x16/actions/widget-gtkextra-gtkfilelist.png0000644000076400001440000000041712603754176025063 00000000000000PNG  IHDRh6sRGB pHYs  tIME ,-atEXtCommentCreated with GIMPW|IDAT(c` 0200XՌL6( kTʼnFFFb\łzm8=IgD/ r~I?t]2|3.} ]@jf1:|TmIENDB`gtkextra-3.2.0/glade/pixmaps/Makefile.am0000644000076400001440000000425612603754176015101 00000000000000## Process this file with automake to produce Makefile.in gladepixmapdir = @GLADE_PIXMAP_DIR@ P16DIR = hicolor/16x16/actions P22DIR = hicolor/22x22/actions gladepixmap16dir = @GLADE_PIXMAP_DIR@/$(P16DIR) gladepixmap22dir = @GLADE_PIXMAP_DIR@/$(P22DIR) PIXMAPS_16 = \ $(P16DIR)/widget-gtkextra-gtkbordercombo.png \ $(P16DIR)/widget-gtkextra-gtkcharselection.png \ $(P16DIR)/widget-gtkextra-gtkcheckitem.png \ $(P16DIR)/widget-gtkextra-gtkcolorcombo.png \ $(P16DIR)/widget-gtkextra-gtkcombobutton.png \ $(P16DIR)/widget-gtkextra-gtkfilelist.png \ $(P16DIR)/widget-gtkextra-gtkfontcombo.png \ $(P16DIR)/widget-gtkextra-gtkiconlist.png \ $(P16DIR)/widget-gtkextra-gtkitementry.png \ $(P16DIR)/widget-gtkextra-gtkplotbubble.png \ $(P16DIR)/widget-gtkextra-gtkplotcandle.png \ $(P16DIR)/widget-gtkextra-gtkplotcanvas.png \ $(P16DIR)/widget-gtkextra-gtkplotpolar.png \ $(P16DIR)/widget-gtkextra-gtksheet.png \ $(P16DIR)/widget-gtkextra-gtksheetcolumn.png \ $(P16DIR)/widget-gtkextra-gtktogglecombo.png PIXMAPS_22 = \ $(P22DIR)/widget-gtkextra-gtkbordercombo.png \ $(P22DIR)/widget-gtkextra-gtkcharselection.png \ $(P22DIR)/widget-gtkextra-gtkcheckitem.png \ $(P22DIR)/widget-gtkextra-gtkcolorcombo.png \ $(P22DIR)/widget-gtkextra-gtkcombobutton.png \ $(P22DIR)/widget-gtkextra-gtkfilelist.png \ $(P22DIR)/widget-gtkextra-gtkfontcombo.png \ $(P22DIR)/widget-gtkextra-gtkiconlist.png \ $(P22DIR)/widget-gtkextra-gtkitementry.png \ $(P22DIR)/widget-gtkextra-gtkplot.png \ $(P22DIR)/widget-gtkextra-gtkplotaxis.png \ $(P22DIR)/widget-gtkextra-gtkplotbox.png \ $(P22DIR)/widget-gtkextra-gtkplotbubble.png \ $(P22DIR)/widget-gtkextra-gtkplotcandle.png \ $(P22DIR)/widget-gtkextra-gtkplotcanvas.png \ $(P22DIR)/widget-gtkextra-gtkplotflux.png \ $(P22DIR)/widget-gtkextra-gtkplotpixmap.png \ $(P22DIR)/widget-gtkextra-gtkplotpolar.png \ $(P22DIR)/widget-gtkextra-gtksheet.png \ $(P22DIR)/widget-gtkextra-gtksheetcolumn.png \ $(P22DIR)/widget-gtkextra-gtktogglecombo.png gladepixmap16_DATA = $(PIXMAPS_16) gladepixmap22_DATA = $(PIXMAPS_22) EXTRA_DIST = $(PIXMAPS_16) $(PIXMAPS_22) gtkextra-3.2.0/glade/pixmaps/Makefile.in0000644000076400001440000004055612604172273015106 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = glade/pixmaps DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(gladepixmap16dir)" \ "$(DESTDIR)$(gladepixmap22dir)" DATA = $(gladepixmap16_DATA) $(gladepixmap22_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLADE_CATALOG_DIR = @GLADE_CATALOG_DIR@ GLADE_CFLAGS = @GLADE_CFLAGS@ GLADE_LIBS = @GLADE_LIBS@ GLADE_MODULE_DIR = @GLADE_MODULE_DIR@ GLADE_PIXMAP_DIR = @GLADE_PIXMAP_DIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_EXTRA_MAJOR_VERSION = @GTK_EXTRA_MAJOR_VERSION@ GTK_EXTRA_MICRO_VERSION = @GTK_EXTRA_MICRO_VERSION@ GTK_EXTRA_MINOR_VERSION = @GTK_EXTRA_MINOR_VERSION@ GTK_EXTRA_VERSION = @GTK_EXTRA_VERSION@ GTK_EXTRA_VERSION_SHORT = @GTK_EXTRA_VERSION_SHORT@ GTK_LIBS = @GTK_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGTKEXTRA_SO_VERSION = @LIBGTKEXTRA_SO_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gdktarget = @gdktarget@ gtkextratargetlib = @gtkextratargetlib@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgladegtkextra_soname = @libgladegtkextra_soname@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ms_librarian = @ms_librarian@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ gladepixmapdir = @GLADE_PIXMAP_DIR@ P16DIR = hicolor/16x16/actions P22DIR = hicolor/22x22/actions gladepixmap16dir = @GLADE_PIXMAP_DIR@/$(P16DIR) gladepixmap22dir = @GLADE_PIXMAP_DIR@/$(P22DIR) PIXMAPS_16 = \ $(P16DIR)/widget-gtkextra-gtkbordercombo.png \ $(P16DIR)/widget-gtkextra-gtkcharselection.png \ $(P16DIR)/widget-gtkextra-gtkcheckitem.png \ $(P16DIR)/widget-gtkextra-gtkcolorcombo.png \ $(P16DIR)/widget-gtkextra-gtkcombobutton.png \ $(P16DIR)/widget-gtkextra-gtkfilelist.png \ $(P16DIR)/widget-gtkextra-gtkfontcombo.png \ $(P16DIR)/widget-gtkextra-gtkiconlist.png \ $(P16DIR)/widget-gtkextra-gtkitementry.png \ $(P16DIR)/widget-gtkextra-gtkplotbubble.png \ $(P16DIR)/widget-gtkextra-gtkplotcandle.png \ $(P16DIR)/widget-gtkextra-gtkplotcanvas.png \ $(P16DIR)/widget-gtkextra-gtkplotpolar.png \ $(P16DIR)/widget-gtkextra-gtksheet.png \ $(P16DIR)/widget-gtkextra-gtksheetcolumn.png \ $(P16DIR)/widget-gtkextra-gtktogglecombo.png PIXMAPS_22 = \ $(P22DIR)/widget-gtkextra-gtkbordercombo.png \ $(P22DIR)/widget-gtkextra-gtkcharselection.png \ $(P22DIR)/widget-gtkextra-gtkcheckitem.png \ $(P22DIR)/widget-gtkextra-gtkcolorcombo.png \ $(P22DIR)/widget-gtkextra-gtkcombobutton.png \ $(P22DIR)/widget-gtkextra-gtkfilelist.png \ $(P22DIR)/widget-gtkextra-gtkfontcombo.png \ $(P22DIR)/widget-gtkextra-gtkiconlist.png \ $(P22DIR)/widget-gtkextra-gtkitementry.png \ $(P22DIR)/widget-gtkextra-gtkplot.png \ $(P22DIR)/widget-gtkextra-gtkplotaxis.png \ $(P22DIR)/widget-gtkextra-gtkplotbox.png \ $(P22DIR)/widget-gtkextra-gtkplotbubble.png \ $(P22DIR)/widget-gtkextra-gtkplotcandle.png \ $(P22DIR)/widget-gtkextra-gtkplotcanvas.png \ $(P22DIR)/widget-gtkextra-gtkplotflux.png \ $(P22DIR)/widget-gtkextra-gtkplotpixmap.png \ $(P22DIR)/widget-gtkextra-gtkplotpolar.png \ $(P22DIR)/widget-gtkextra-gtksheet.png \ $(P22DIR)/widget-gtkextra-gtksheetcolumn.png \ $(P22DIR)/widget-gtkextra-gtktogglecombo.png gladepixmap16_DATA = $(PIXMAPS_16) gladepixmap22_DATA = $(PIXMAPS_22) EXTRA_DIST = $(PIXMAPS_16) $(PIXMAPS_22) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glade/pixmaps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign glade/pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-gladepixmap16DATA: $(gladepixmap16_DATA) @$(NORMAL_INSTALL) test -z "$(gladepixmap16dir)" || $(MKDIR_P) "$(DESTDIR)$(gladepixmap16dir)" @list='$(gladepixmap16_DATA)'; test -n "$(gladepixmap16dir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladepixmap16dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(gladepixmap16dir)" || exit $$?; \ done uninstall-gladepixmap16DATA: @$(NORMAL_UNINSTALL) @list='$(gladepixmap16_DATA)'; test -n "$(gladepixmap16dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gladepixmap16dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gladepixmap16dir)" && rm -f $$files install-gladepixmap22DATA: $(gladepixmap22_DATA) @$(NORMAL_INSTALL) test -z "$(gladepixmap22dir)" || $(MKDIR_P) "$(DESTDIR)$(gladepixmap22dir)" @list='$(gladepixmap22_DATA)'; test -n "$(gladepixmap22dir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gladepixmap22dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(gladepixmap22dir)" || exit $$?; \ done uninstall-gladepixmap22DATA: @$(NORMAL_UNINSTALL) @list='$(gladepixmap22_DATA)'; test -n "$(gladepixmap22dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gladepixmap22dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gladepixmap22dir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(gladepixmap16dir)" "$(DESTDIR)$(gladepixmap22dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-gladepixmap16DATA install-gladepixmap22DATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-gladepixmap16DATA uninstall-gladepixmap22DATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-gladepixmap16DATA \ install-gladepixmap22DATA install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-gladepixmap16DATA uninstall-gladepixmap22DATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gtkextra-3.2.0/Makefile.am0000644000076400001440000000207612603754176012342 00000000000000## Makefile.am for gtk+extra ACLOCAL_AMFLAGS = -I m4 if ENABLE_GLADE GLADE_SUBDIR = glade endif SRC_SUBDIRS = gtkextra $(GLADE_SUBDIR) SUBDIRS = $(SRC_SUBDIRS) docs # require automake 1.7 #AUTOMAKE_OPTIONS = 1.7 EXTRA_DIST = \ TODO \ gtkextra-3.0.m4 \ makecopyright \ gtkextra-3.0.spec pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA= gtkextra-3.0.pc .PHONY: files release sanity snapshot files: @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ echo $$p; \ done @for subdir in $(SUBDIRS); do \ files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \ for file in $$files; do \ echo $$subdir/$$file; \ done; \ done release: rm -rf .deps */.deps $(MAKE) distcheck sanity: ./sanity_check $(VERSION) snapshot: $(MAKE) dist distdir=$(PACKAGE)-`date +"%y%m%d"` ChangeLog.cvs: cvs log | perl mkchlog > ChangeLog.cvs DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds #DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds gtkextra-3.2.0/acinclude.m40000644000076400001440000000465612603754176012505 00000000000000# autoconf 2.13 / 2.50 compatibility macro # GLIB_AC_DIVERT_BEFORE_HELP(STUFF) # --------------------------------- # Put STUFF early enough so that they are available for $ac_help expansion. # Handle both classic (<= v2.13) and modern autoconf AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP], [ifdef([m4_divert_text], [m4_divert_text([NOTICE],[$1])], [ifdef([AC_DIVERT], [AC_DIVERT([NOTICE],[$1])], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl $1 AC_DIVERT_POP()])])]) # GTK_ADD_LIB(VAR,LIBNAME) # --------------------------------- # Helper macro to add a -lBlah to a variable, avoiding repeats # Note that this needs to be quoted when used in an enclosing macro AC_DEFUN([GTK_ADD_LIB], [ case "$$1 " in *-l$2[[\ \ ]]*) ;; *) $1="-l$2 $$1" ;; esac ]) # Checks the location of the XML Catalog # Usage: # JH_PATH_XML_CATALOG([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # Defines XMLCATALOG and XML_CATALOG_FILE substitutions AC_DEFUN([JH_PATH_XML_CATALOG], [ # check for the presence of the XML catalog AC_ARG_WITH([xml-catalog], AC_HELP_STRING([--with-xml-catalog=CATALOG], [path to xml catalog to use]),, [with_xml_catalog=/etc/xml/catalog]) jh_found_xmlcatalog=true XML_CATALOG_FILE="$with_xml_catalog" AC_SUBST([XML_CATALOG_FILE]) AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)]) if test -f "$XML_CATALOG_FILE"; then AC_MSG_RESULT([found]) else jh_found_xmlcatalog=false AC_MSG_RESULT([not found]) fi # check for the xmlcatalog program AC_PATH_PROG(XMLCATALOG, xmlcatalog, no) if test "x$XMLCATALOG" = xno; then jh_found_xmlcatalog=false fi if $jh_found_xmlcatalog; then ifelse([$1],,[:],[$1]) else ifelse([$2],,[AC_MSG_ERROR([could not find XML catalog])],[$2]) fi ]) # Checks if a particular URI appears in the XML catalog # Usage: # JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) AC_DEFUN([JH_CHECK_XML_CATALOG], [ AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) if $jh_found_xmlcatalog && \ AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then AC_MSG_RESULT([found]) ifelse([$3],,,[$3 ])dnl else AC_MSG_RESULT([not found]) ifelse([$4],, [AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])], [$4]) fi ]) gtkextra-3.2.0/AUTHORS0000644000076400001440000000043212603754176011350 00000000000000Adrian E. Feiguin Address: National High Magnetic Field Laboratory Florida State University 1800 E. Paul Dirac Dr. Tallahassee, Florida 32310 U.S.A INSTITUTO DE FISICA ROSARIO Bvs 27 de Febrero 210 Bis 2000 - Rosario ARGENTINA gtkextra-3.2.0/gtkextra-3.0.spec0000644000076400001440000000471512604172300013273 00000000000000 %define name gtkextra3 %define major 3 %define minor 2 %define micro 0 %define ver %major.%minor.%micro %define rel 1 Summary: A library of gtk+ widgets Name: %name Version: %ver Release: %rel%{?dist} License: LGPL Group: System Environment/Libraries Source: http://gtkextra.sourceforge.net/src/gtkextra-%version.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) URL: http://gtkextra.sourceforge.net Requires: gtk2 >= 2.12.0 Requires: glib2 >= 2.12.0 Requires: pango Requires: atk BuildRequires: gtk2-devel BuildRequires: glib2-devel BuildRequires: pango-devel BuildRequires: atk-devel %description A library of dynamically linked gtk+ widgets including: GtkSheet, GtkPlot, and GtkIconList %package devel Summary: A library of gtk+ widgets Group: Development/Libraries Requires: %name = %{version} Requires: gtk2-devel Requires: glib2-devel Requires: pango-devel Requires: atk-devel %description devel The gtk+extra-devel package includes the static libraries, header files, and documentation for compiling programs that use gtk+extra widgets. %prep %setup -q -n gtkextra-%{version} %build export CFLAGS="$RPM_OPT_FLAGS" %configure --disable-tests make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc INSTALL README docs/*.ChangeLog %{_libdir}/libgtkextra*.so.* %files devel %defattr(-, root, root) %{_libdir}/*so %{_libdir}/*a %{_libdir}/pkgconfig/* %{_includedir}/* %{_datadir}/gtk-doc/html/gtkextra-3/* %changelog * Fri May 29 2015 Tom Schoonjans - Renamed doc folder * Wed Apr 17 2013 Tom Schoonjans - Modified spec file in order to make it compatible with the latest RPM building recommendations * Fri Jan 21 2005 Adrian E. Feiguin - First version for gtkextra-2 * Fri Dec 20 2002 Toby D. Reeves - Make the rpm name a variable. - Set rpm name to gtk+extra allowing both 0.99.x and 1.1.x to be installed. * Mon Jul 22 2002 Toby D. Reeves - Corrected for use of pkg-config * Wed Jul 17 2002 Toby D. Reeves - Corrected -install to use DESTDIR - Make gtk+extra-devel package require gtk+extra - Added *.so to devel files * Wed Mar 15 2000 Conrad Steenberg - First spec file gtkextra-3.2.0/build-aux/0000755000076400001440000000000012604172531012241 500000000000000gtkextra-3.2.0/build-aux/missing0000755000076400001440000002623312604172272013570 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gtkextra-3.2.0/build-aux/depcomp0000755000076400001440000004426712604172273013556 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gtkextra-3.2.0/build-aux/config.sub0000755000076400001440000010316712604172272014156 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gtkextra-3.2.0/build-aux/config.guess0000755000076400001440000012761512604172272014517 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file 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 Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gtkextra-3.2.0/build-aux/ltmain.sh0000755000076400001440000073306012604172267014023 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION=2.2.6b TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 gtkextra-3.2.0/build-aux/install-sh0000755000076400001440000003253712604172272014201 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gtkextra-3.2.0/makecopyright0000755000076400001440000000303112603754176013072 00000000000000#!/bin/sh copyright_gtkextra () { cat << EOF /* GTK+Extra - Library of useful widgets for programming with GTK+ * Copyright (C) 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ EOF } for file in `find . -name "*.[ch]" -print`; do exclude=`echo $exclude_files | grep $file` if test "x$exclude" = "x"; then dir=`dirname $file` if test "x$dir" != "x."; then subdir=`basename $dir` grepout=`grep Copyright $file` if test "x$grepout" = "x"; then backup_dir="$dir/bak" if test ! -d $backup_dir; then echo "making directory: $backup_dir" mkdir $backup_dir fi echo $file filename=`basename $file` cp $file $backup_dir/$filename copyright_$subdir > $file cat $backup_dir/$filename >> $file fi fi fi done gtkextra-3.2.0/docs/0000755000076400001440000000000012604172532011300 500000000000000gtkextra-3.2.0/docs/gtksheet-9.0.ChangeLog0000644000076400001440000002412412603754176015127 00000000000000GtkSheet-9.0 ============ - Fixes in row/column deletion and text editing. Thanks to Matias Mutchinick for his patches, Kevin Handy for his examples . - Fixes in gtk_sheet_range_set_font Thanks Ralf Forsberg for his report and examples . - Fixes in GtkItemEntry, GtkColorCombo and GtkBorderCombo. Tanks to Andreas Voegele - Fixes in gtk_sheet_map/realize/destroy/finalize/size_allocate Thanks to Mario Motta for his bug report. - Fixes in delete/insert rows/columns for the attached widgets Thanks to Striker for pointing me out the bug. - Fixes in gtksheet.h Thanks to Aaron Lehman - New feature: gtk_sheet_set_selection_mode Use GTK_SELECTION_SINGLE to select single rows/columns/cells GtkSheet-8.0 ============ - GtkSheetEntry changed by GtkItemEntry (cast using GTK_IENTRY now) - Improvements in look and feel, mainly in GtkItemEntry - "Unlimited" text size. - Bugfixes. Many thanks to Brad Pepers who read the code carefully and pointed me out lots of details. Thanks to Kevin Handy , Ralf Forsberg , Tom Sobota , and of course, Bob Lissner and the Quicklist team. GtkSheet-7.10 ============= - New functions: * gtk_sheet_cell_delete * gtk_sheet_range_delete (They remove cell contents and links, while gtk_sheet_cell/range_clear remove only contents) * gtk_sheet_remove_link * gtk_sheet_row_button_justify * gtk_sheet_column_button_justify (justify row/column button label) - Some small fixes. GtkSheet-7.9 ============ - Bugfix release. * gtk_sheet_get_link patched by Bob Lissner. GtkSheet-7.8 ============ - Bugfix release. * GtkSheetEntry was grabbing focus with button presses. Now it doesn't do that with right button to avoid problems with popups. (Thanks to Scott Dattalo and Brad Pepers ) GtkSheet-7.7 ============ - Bugfix release. * Key presses: events propagation * Hiding rows/columns Both patched by Sam Phillips from the quicklist team. * gtk_sheet_link_cell, gtk_sheet_get_link, patched by Bob Lissner from the quicklist team. * sheet's entry creation warnings Patched by Heath Martin GtkSheet-7.6 ============ - This is mainly a bug-fix release. Thanks again to the quicklist team. List of fixed bugs: * Ctrl+Key. * row/column deletion. * flashing range scrolling. * child widgets scrolling. * auto scrolling. (If you click on the last cell of a row/column, the sheet scrolls to show the entire cell.) * selection DnD. * selection highlighting (patched by Sam Phillips from the quicklist team ) * hiding titles when the widget is not realized. (Thanks to Glenn Trigg -- www.linuxfan.com/~gtk/privtool.html) GtkSheet-7.5 ============ - New field in the GtkSheetCell struct : gpointer link; - You can link a cell to an object using: gtk_sheet_link_cell(GtkSheet *sheet, gint row, gint col, gpointer link); gtk_sheet_get_link(GtkSheet *sheet, gint row, gint col); The only efect is making cell->link point to the given object. - New signal "clear cell" - Bug fix in column shifts when they are deleted Thanks to Nick Slobodsky GtkSheet-7.4 ============ * Rows/Columns insertion/deletion optimized. * Improvements in scrollbars * Improvements in dragging and resizing selections * Features added: - Multiline button labels. ("this is\na multiline\nlabel") - Themeable button gadgets. - gtk_sheet_attach (GtkSheet *sheet, GtkWidget *child, gint row, gint column, gfloat x_align, gfloat y_align); Attaches a child widget to the given cell with the given alignments. The child is reallocated each time the column or row changes, keeping attached to the same cell. - GTK_SHEET_ADJUST_TEXT flag renamed as GTK_SHEET_CLIP_TEXT Thanks to Jan Fedak for his comments, and to the quicklist team for their perseverance (www.quicklist.org). GtkSheet-7.3 ============ Silly but big bug fixed on previous version. GtkSheet-7.2 ============ More silly bugs fixed. Thanks again to Sam and Bob. (gtk_sheet_set_column_width/row_height, gtksheet_row/column_set_sensitivity) Thanks to Erwan Corvellec for his patches and bug reports. Twitching scrollbars aren't anymore. Makefile builds libGtkSheet.a GtkSheet-7.1 ============ Maily a bug fix release, and some new features: * About a dozen of "invisible" bugs fixed thanks to Quicklist team (www.quicklist.com). Special thanks to Bob Lissner and Sam Philips . GtkSheet is being used by Quicklist, and these guys made a lot of tests for it. * Features added: - gtk_sheet_set_column_titles_height(GtkSheet *sheet, gint height); - gtk_sheet_set_row_titles_width(GtkSheet *sheet, gint width); - gtk_sheet_column_set_justification(GtkSheet *sheet, gint column, gint justification); If column->justification != GTK_JUSTIFY_FILL (default value) it will always win over individual cells' justifications. - New flag: GTK_SHEET_AUTO_SCROLL. For default this flag is on. If you turn it off, gtksheet won't scroll automatically to keep the active cell in the viewport. GtkSheet-7.0 ============ GtkSheet has moved to gtk+-1.2 and new features have been added. This version has been tested with gtk+-1.2.0 * GtkSheet is a self scrolling widget a la GtkClist and GtkLayout. You have to add it to a scrolled window to display it propertly. Shadow borders will be fixed with the patch added to gtkscrolledwindow. * Container features implemented. Adding widgets to the sheet is very easy with: gtk_sheet_put (GtkSheet *sheet, GtkWidget *child, gint x, gint y); * Move it with gtk_sheet_move_child (GtkSheet *sheet, GtkWidget *widget, gint x, gint y); * Remove it with gtk_container_remove(GTK_CONTAINER(sheet), GtkWidget *child); * Some signals have been renamed: "activate_cell" -> "activate" "deactivate_cell" -> "deactivate" * Rejection option for activation/deactivation of the active cell. * New signals: "new_column_width" "new_row_height" * new function gtk_sheet_set_cell_text(GtkSheet *sheet, gint row, gint col, gchar *text); (you don't have to set the justification) * Some minor bugs fixed. GtkSheet-5.3 ============ The graphic interface is nicer and more friendly. The appeareance is more familiar and I added some new features: You can make a selection and move it dragging the border. You can resize the selection dragging the bottom-right corner. You can store the selection on the clipboard. (All this functions emit a signal. You can cutomize your application connecting a signal handler in order to do the desired action) NOTE: the selection handler has not been implemented yet. GtkSheet-5.4 ============ Following Mario Motta's suggestions I added a new feature: You can hide/show row and/or column titles (see Example 2 in the demo program) and I patched gtksheet.h for C++ compatibility. I fixed a couple of bugs: multiple emission of the "activate_cell" signal; problems when selecting a row/column and moving with the cursor keys. NOTE: All versions of GtkSheet compile fine with gtk+-1.0.6 GtkSheet-5.5 ============ Many bugs fixed, mainly reported by Mario Motta. All warnings fixed. Signals: "changed" is emited when typing into the active cell, changing its contents. "set_cell" is emited when changing current cell's position. "activate_cell" is emited when the new cell is activated. NOTE: gtksheet crashes on Solaris. I couldn't fix this, yet. GtkSheet-5.6 ============ GtkSheet now allows font handling with gtk_sheet_range_set_font (GtkSheet *sheet, GtkSheetRange range, GdkFont *font) Problems with Solaris have been fixed. Steven Rostedt fixed a bug when adding rows/columns. Some little changes in the demo to show the new features and to avoid the redraw in the example 1. Other bugs fixed. GtkSheet-5.7 ============ Function added by Steven Rostedt: gint gtk_sheet_get_state (GtkSheet *sheet) Resizing rows and columns improved. Bug fixes, including two bugs causing crash when the widget is destroyed (style bug patched in part by Steve) ANNOUNCE: GtkSheet is moving to Gtk+-1.2 GtkSheet-6.0 ============ GtkSheet has move to gtk+-1.2 and new features have been added. The new distribution includes a set of new widgets. GtkSheetEntry has been updated. Now, it is a GtkEntry subclass. The main diferences with GtkEntry are: - It doesn't draw the border. - It is dinamically resized when the text is typed. - It allows right/left/center text justification. (gtk_entry_size_allocate & entry_adjust_scroll) GtkSheet can be created with a custom entry widget. You can use GtkEntry or a GtkEntry subclass (e.g. GtkSheetEntry, GtkSpinButton) or a box or table containing a GtkEntry subclass (e.g. GtkCombo) gtk_sheet_new_with_custom_entry (gint nrows, gint ncols, GtkType *entry_type); Example: sheet = gtk_sheet_new_with_custom_entry(10, 10, gtk_combo_get_type()); The entry can be changed on the fly with: gtk_sheet_change_entry(GtkSheet *sheet, GtkType *entry_type); New signals policy: - "activate_cell" is emited when the entry enters to a new cell. - "deactivate_cell" is emited whent the entry is deactivated before moving to another cell or starting a selection. - "traverse" is emited before "deactivate_cell" and allows to veto the movement. In such case, the entry will remain in the site, and the other signals will not be emited. GtkSheet-6.0 has been tested with gtk+-1.1.12 without problems. gtkextra-3.2.0/docs/Makefile.am0000644000076400001440000000025512603754176013267 00000000000000SUBDIRS = reference tutorial EXTRA_DIST = \ COPYING \ HELP \ README \ TODO \ VERSION \ gtksheet-9.0.ChangeLog \ gtkplot-5.0.ChangeLog \ gtkiconlist-2.0.ChangeLog gtkextra-3.2.0/docs/AUTHORS0000644000076400001440000000011512603754176012276 00000000000000 Documentation author is Victor Mierla and others. gtkextra-3.2.0/docs/reference/0000755000076400001440000000000012604172532013236 500000000000000gtkextra-3.2.0/docs/reference/gtkextra-sections.txt0000644000076400001440000010667312604172532017412 00000000000000 gtkextra.h
gtkbordercombo GtkBorderCombo GtkBorderCombo gtk_border_combo_new GTK_BORDER_COMBO GTK_IS_BORDER_COMBO GTK_BORDER_COMBO_CLASS GtkBorderComboClass gtk_border_combo_get_type
gtkcharsel GtkCharSelection GtkCharSelection gtk_char_selection_new gtk_char_selection_set_selection gtk_char_selection_get_selection GTK_CHAR_SELECTION GTK_IS_CHAR_SELECTION G_TYPE_CHAR_SELECTION GTK_CHAR_SELECTION_CLASS GTK_IS_CHAR_SELECTION_CLASS GtkCharSelectionClass gtk_char_selection_get_type
gtkcheckitem GtkCheckItem GtkCheckItem gtk_check_item_new gtk_check_item_new_with_label gtk_check_item_construct_with_label GTK_CHECK_ITEM GTK_IS_CHECK_ITEM G_TYPE_CHECK_ITEM GTK_CHECK_ITEM_CLASS GTK_IS_CHECK_ITEM_CLASS GTK_CHECK_ITEM_GET_CLASS GtkCheckItemClass gtk_check_item_get_type
gtkcolorcombo GtkColorCombo GtkColorCombo gtk_color_combo_new gtk_color_combo_new_with_values gtk_color_combo_construct gtk_color_combo_construct_with_values gtk_color_combo_get_color_at gtk_color_combo_find_color gtk_color_combo_get_selection GTK_COLOR_COMBO GTK_IS_COLOR_COMBO GTK_COLOR_COMBO_CLASS GtkColorComboClass gtk_color_combo_get_type
gtkcombobutton GtkComboButton GtkComboButton gtk_combo_button_new gtk_combo_button_hide_popdown_window GTK_COMBO_BUTTON GTK_IS_COMBO_BUTTON GTK_COMBO_BUTTON_CLASS GtkComboButtonClass gtk_combo_button_get_type
gtkdataentry GtkDataEntry GtkDataEntry gtk_data_entry_new gtk_data_entry_get_description gtk_data_entry_set_description gtk_data_entry_get_data_type gtk_data_entry_set_data_type gtk_data_entry_get_data_format gtk_data_entry_set_data_format gtk_data_entry_get_text gtk_data_entry_set_text gtk_data_entry_get_max_length_bytes gtk_data_entry_set_max_length_bytes GTK_DATA_ENTRY GTK_DATA_ENTRY_CLASS GTK_DATA_ENTRY_GET_CLASS GTK_IS_DATA_ENTRY GTK_IS_DATA_ENTRY_CLASS GTK_TYPE_DATA_ENTRY GtkDataEntryClass gtk_data_entry_get_type
gtkdatatextview GtkDataTextView GtkDataTextView gtk_data_text_view_new gtk_data_text_view_get_description gtk_data_text_view_get_max_length gtk_data_text_view_get_max_length_bytes gtk_data_text_view_set_description gtk_data_text_view_set_max_length gtk_data_text_view_set_max_length_bytes GTK_DATA_TEXT_VIEW GTK_DATA_TEXT_VIEW_CLASS GTK_DATA_TEXT_VIEW_GET_CLASS GTK_IS_DATA_TEXT_VIEW GTK_IS_DATA_TEXT_VIEW_CLASS GTK_TYPE_DATA_TEXT_VIEW GtkDataTextViewClass gtk_data_text_view_get_type
gtkdirtree GtkDirTree GtkDirTree GtkDirTreeNode gtk_dir_tree_new gtk_dir_tree_open_dir GTK_DIR_TREE GTK_IS_DIR_TREE G_TYPE_DIR_TREE GTK_DIR_TREE_CLASS GTK_IS_DIR_TREE_CLASS GtkDirTreeClass gtk_dir_tree_get_type
gtkfilelist GtkFileList GtkFileList GtkFileListItem GtkFileListType gtk_file_list_new gtk_file_list_construct gtk_file_list_set_filter gtk_file_list_open_dir gtk_file_list_get_path gtk_file_list_get_filename gtk_file_list_get_filetype gtk_file_list_add_type gtk_file_list_add_type_with_pixmap gtk_file_list_add_type_filter GTK_FILE_LIST GTK_IS_FILE_LIST G_TYPE_FILE_LIST GTK_FILE_LIST_CLASS GTK_IS_FILE_LIST_CLASS GtkFileListClass gtk_file_list_get_type
gtkfontcombo GtkFontCombo GtkFontCombo gtk_font_combo_new gtk_font_combo_select gtk_font_combo_select_nth gtk_font_combo_get_font_height gtk_font_combo_get_psfont gtk_font_combo_get_font_description gtk_font_combo_get_gdkfont GTK_FONT_COMBO GTK_IS_FONT_COMBO GTK_FONT_COMBO_CLASS GtkFontComboClass gtk_font_combo_get_type
gtkiconfilesel GtkIconFileSel GtkIconFileSel gtk_icon_file_selection_new gtk_icon_file_selection_construct gtk_icon_file_selection_show_tree gtk_icon_file_selection_open_dir gtk_icon_file_selection_show_hidden gtk_icon_file_selection_set_filter gtk_icon_file_selection_get_selection GTK_ICON_FILESEL GTK_IS_ICON_FILESEL G_TYPE_ICON_FILESEL GTK_ICON_FILESEL_CLASS GTK_IS_ICON_FILESEL_CLASS GtkIconFileSelClass gtk_icon_file_selection_get_type
gtkiconlist GtkIconList GtkIconList GtkIconListMode GtkIconListItem gtk_icon_list_new gtk_icon_list_construct gtk_icon_list_set_mode gtk_icon_list_get_mode gtk_icon_list_set_editable gtk_icon_list_is_editable gtk_icon_list_set_row_spacing gtk_icon_list_get_row_spacing gtk_icon_list_set_col_spacing gtk_icon_list_get_col_spacing gtk_icon_list_set_text_space gtk_icon_list_get_text_space gtk_icon_list_set_icon_border gtk_icon_list_get_icon_border gtk_icon_list_set_icon_width gtk_icon_list_get_icon_width gtk_icon_list_freeze gtk_icon_list_thaw gtk_icon_list_set_background gtk_icon_list_add_from_pixmap gtk_icon_list_add_from_data gtk_icon_list_add gtk_icon_list_get_nth gtk_icon_list_get_index gtk_icon_list_remove gtk_icon_list_set_active_icon gtk_icon_list_remove_nth gtk_icon_list_update gtk_icon_list_clear gtk_icon_list_link gtk_icon_list_get_link gtk_icon_list_get_icon_from_link gtk_icon_list_get_icon_at gtk_icon_list_get_active_icon gtk_icon_list_get_entry gtk_icon_list_get_pixmap gtk_icon_list_set_pixmap gtk_icon_list_set_label gtk_icon_list_set_selection_mode gtk_icon_list_select_icon gtk_icon_list_unselect_icon gtk_icon_list_unselect_all GTK_ICON_LIST GTK_IS_ICON_LIST G_TYPE_ICON_LIST GTK_ICON_LIST_CLASS G_TYPE_ICON_LIST_ITEM GtkIconListClass gtk_icon_list_get_type gtk_icon_list_item_get_type
gtkitementry GtkItemEntry GtkItemEntry gtk_item_entry_new gtk_item_entry_new_with_max_length gtk_item_entry_set_text gtk_item_entry_set_justification gtk_item_entry_get_max_length_bytes gtk_item_entry_set_max_length_bytes gtk_item_entry_get_cursor_visible gtk_item_entry_set_cursor_visible GTK_ITEM_ENTRY GTK_IS_ITEM_ENTRY G_TYPE_ITEM_ENTRY GTK_ITEM_ENTRY_CLASS GTK_IS_ITEM_ENTRY_CLASS GtkItemEntryClass gtk_item_entry_get_type
gtkplot GtkPlot GtkPlot GtkPlotAxis GtkPlotText GtkPlotLine GtkPlotSymbol GtkPlotTick GtkPlotTicks GtkPlotVector GtkPlotMarker GtkPlotFunc GtkPlotFunc3D GtkPlotIterator GtkPlotScale GtkPlotSymbolType GtkPlotSymbolStyle GtkPlotBorderStyle GtkPlotLineStyle GtkPlotConnector GtkPlotLabelPos GtkPlotError GtkPlotOrientation GtkPlotAxisPos GtkPlotLabelStyle GtkPlotTicksPos GtkPlotTicksAutoscaleFunc GtkPlotTicksInverseFunc GtkPlotTicksRecalcFunc GtkPlotTicksTransformFunc GtkPlotParseLabelFunc gtk_plot_new gtk_plot_new_with_size gtk_plot_construct gtk_plot_construct_with_size gtk_plot_set_drawable gtk_plot_get_drawable gtk_plot_set_pc gtk_plot_set_background_pixmap gtk_plot_set_transparent gtk_plot_is_transparent gtk_plot_get_position gtk_plot_get_size gtk_plot_get_internal_allocation gtk_plot_set_background gtk_plot_paint gtk_plot_refresh gtk_plot_move gtk_plot_resize gtk_plot_set_magnification gtk_plot_move_resize gtk_plot_get_pixel gtk_plot_get_point gtk_plot_clip_data gtk_plot_set_xrange gtk_plot_set_yrange gtk_plot_set_range gtk_plot_autoscale gtk_plot_get_xrange gtk_plot_get_yrange gtk_plot_set_xscale gtk_plot_set_yscale gtk_plot_get_xscale gtk_plot_get_yscale gtk_plot_reflect_x gtk_plot_reflect_y gtk_plot_is_x_reflected gtk_plot_is_y_reflected gtk_plot_put_text gtk_plot_remove_text gtk_plot_text_get_size gtk_plot_text_get_area gtk_plot_text_set_attributes gtk_plot_text_set_border gtk_plot_draw_line gtk_plot_draw_text gtk_plot_set_ticks gtk_plot_set_major_ticks gtk_plot_set_minor_ticks gtk_plot_set_ticks_limits gtk_plot_unset_ticks_limits gtk_plot_set_break gtk_plot_remove_break gtk_plot_axis_new gtk_plot_axis_construct gtk_plot_get_axis gtk_plot_axis_set_visible gtk_plot_axis_visible gtk_plot_axis_set_title gtk_plot_axis_show_title gtk_plot_axis_hide_title gtk_plot_axis_move_title gtk_plot_axis_justify_title gtk_plot_axis_set_attributes gtk_plot_axis_get_attributes gtk_plot_axis_set_ticks gtk_plot_axis_set_major_ticks gtk_plot_axis_set_minor_ticks gtk_plot_axis_set_ticks_length gtk_plot_axis_set_ticks_width gtk_plot_axis_show_ticks gtk_plot_axis_set_ticks_limits gtk_plot_axis_unset_ticks_limits gtk_plot_axis_set_tick_labels gtk_plot_axis_set_break gtk_plot_axis_remove_break gtk_plot_axis_show_labels gtk_plot_axis_title_set_attributes gtk_plot_axis_set_labels_attributes gtk_plot_axis_set_labels_numbers gtk_plot_axis_set_labels_style gtk_plot_axis_set_labels_offset gtk_plot_axis_get_labels_offset gtk_plot_axis_use_custom_tick_labels gtk_plot_axis_set_labels_suffix gtk_plot_axis_set_labels_prefix gtk_plot_axis_get_labels_suffix gtk_plot_axis_get_labels_prefix gtk_plot_axis_ticks_recalc gtk_plot_axis_ticks_autoscale gtk_plot_axis_ticks_transform gtk_plot_axis_ticks_inverse gtk_plot_axis_parse_label gtk_plot_x0_set_visible gtk_plot_x0_visible gtk_plot_y0_set_visible gtk_plot_y0_visible gtk_plot_grids_set_on_top gtk_plot_grids_on_top gtk_plot_grids_set_visible gtk_plot_grids_visible gtk_plot_y0line_set_attributes gtk_plot_x0line_set_attributes gtk_plot_major_vgrid_set_attributes gtk_plot_minor_vgrid_set_attributes gtk_plot_major_hgrid_set_attributes gtk_plot_minor_hgrid_set_attributes gtk_plot_show_legends gtk_plot_hide_legends gtk_plot_set_legends_border gtk_plot_legends_move gtk_plot_legends_get_position gtk_plot_legends_get_allocation gtk_plot_legends_set_attributes gtk_plot_set_line_attributes gtk_plot_add_data gtk_plot_remove_data gtk_plot_add_function GTK_PLOT GTK_IS_PLOT G_TYPE_PLOT GTK_PLOT_AXIS GTK_PLOT_CLASS G_TYPE_PLOT_AXIS GTK_IS_PLOT_AXIS GtkPlotClass GtkPlotAxisClass gtk_plot_get_type gtk_plot_axis_get_type
gtkplot3d GtkPlot3D GtkPlot3D GtkPlotPlane GtkPlotSide gtk_plot3d_new gtk_plot3d_new_with_size gtk_plot3d_construct gtk_plot3d_construct_with_size gtk_plot3d_autoscale gtk_plot3d_rotate gtk_plot3d_rotate_vector gtk_plot3d_reset_angles gtk_plot3d_rotate_x gtk_plot3d_rotate_y gtk_plot3d_rotate_z gtk_plot3d_get_pixel gtk_plot3d_set_xrange gtk_plot3d_set_yrange gtk_plot3d_set_zrange gtk_plot3d_set_xfactor gtk_plot3d_set_yfactor gtk_plot3d_set_zfactor gtk_plot3d_get_xfactor gtk_plot3d_get_yfactor gtk_plot3d_get_zfactor gtk_plot3d_plane_set_color gtk_plot3d_plane_set_visible gtk_plot3d_plane_visible gtk_plot3d_corner_set_visible gtk_plot3d_corner_visible gtk_plot3d_corner_set_attributes gtk_plot3d_corner_get_attributes gtk_plot3d_frame_set_attributes gtk_plot3d_frame_get_attributes gtk_plot3d_get_axis gtk_plot3d_get_side gtk_plot3d_show_major_ticks gtk_plot3d_show_minor_ticks gtk_plot3d_show_labels gtk_plot3d_show_title gtk_plot3d_hide_title gtk_plot3d_set_ticks gtk_plot3d_set_major_ticks gtk_plot3d_set_minor_ticks gtk_plot3d_set_ticks_length gtk_plot3d_set_ticks_width gtk_plot3d_show_ticks gtk_plot3d_set_titles_offset gtk_plot3d_get_titles_offset gtk_plot3d_set_scale gtk_plot3d_get_scale gtk_plot3d_major_grids_set_visible gtk_plot3d_minor_grids_set_visible gtk_plot3d_major_grids_visible gtk_plot3d_minor_grids_visible gtk_plot3d_major_zgrid_set_attributes gtk_plot3d_major_zgrid_get_attributes gtk_plot3d_minor_zgrid_set_attributes gtk_plot3d_minor_zgrid_get_attributes GTK_PLOT3D GTK_IS_PLOT3D G_TYPE_PLOT3D GTK_PLOT3D_FLAGS GTK_PLOT3D_SET_FLAGS GTK_PLOT3D_UNSET_FLAGS GTK_PLOT3D_TRANSPARENT GTK_PLOT3D_CLASS GtkPlot3DClass gtk_plot3d_get_type
gtkplotarray GtkPlotArray GtkPlotArray GtkPlotArrayList gtk_plot_array_new gtk_plot_array_set gtk_plot_array_set_label gtk_plot_array_set_description gtk_plot_array_set_scale gtk_plot_array_set_required gtk_plot_array_set_independent gtk_plot_array_get_data_type gtk_plot_array_get_name gtk_plot_array_get_label gtk_plot_array_get_description gtk_plot_array_required gtk_plot_array_independent gtk_plot_array_get_scale gtk_plot_array_get_size gtk_plot_array_get_float gtk_plot_array_get_double gtk_plot_array_get_int gtk_plot_array_get_bool gtk_plot_array_get_string gtk_plot_array_get_pointer gtk_plot_array_free gtk_plot_array_list_new gtk_plot_array_list_add gtk_plot_array_list_remove gtk_plot_array_list_get gtk_plot_array_list_clear GTK_PLOT_ARRAY_LIST GTK_IS_PLOT_ARRAY_LIST G_TYPE_PLOT_ARRAY_LIST GTK_PLOT_ARRAY_LIST_CLASS GTK_PLOT_ARRAY G_TYPE_PLOT_ARRAY GTK_PLOT_ARRAY_CLASS GTK_IS_PLOT_ARRAY GtkPlotArrayClass GtkPlotArrayListClass gtk_plot_array_get_type gtk_plot_array_list_get_type
gtkplotbar GtkPlotBar GtkPlotBar GtkPlotBarUnits gtk_plot_bar_new gtk_plot_bar_construct gtk_plot_bar_set_width gtk_plot_bar_get_width GTK_PLOT_BAR GTK_IS_PLOT_BAR G_TYPE_PLOT_BAR GTK_PLOT_BAR_CLASS GtkPlotBarClass gtk_plot_bar_get_type
gtkplotbox GtkPlotBox GtkPlotBox gtk_plot_box_new gtk_plot_box_construct GTK_PLOT_BOX GTK_IS_PLOT_BOX G_TYPE_PLOT_BOX GTK_PLOT_BOX_CLASS GtkPlotBoxClass gtk_plot_box_get_type
gtkplotbubble GtkPlotBubble GtkPlotBubble gtk_plot_bubble_new gtk_plot_bubble_show_scale gtk_plot_bubble_set_scale_max gtk_plot_bubble_set_size_max gtk_plot_bubble_set_labels_precision gtk_plot_bubble_set_labels_style gtk_plot_bubble_set_labels_prefix gtk_plot_bubble_set_labels_suffix GTK_PLOT_BUBBLE GTK_IS_PLOT_BUBBLE G_TYPE_PLOT_BUBBLE GTK_PLOT_BUBBLE_CLASS GtkPlotBubbleClass gtk_plot_bubble_get_type
gtkplotcairo GtkPlotCairo GtkPlotCairo gtk_plot_cairo_new gtk_plot_cairo_new_with_drawable gtk_plot_cairo_construct gtk_plot_cairo_set_cairo GTK_PLOT_CAIRO GTK_IS_PLOT_CAIRO G_TYPE_PLOT_CAIRO GTK_PLOT_CAIRO_CLASS GtkPlotCairoClass gtk_plot_cairo_get_type
gtkplotcandle GtkPlotCandle GtkPlotCandle gtk_plot_candle_new GTK_PLOT_CANDLE GTK_IS_PLOT_CANDLE G_TYPE_PLOT_CANDLE GTK_PLOT_CANDLE_CLASS GtkPlotCandleClass gtk_plot_candle_get_type
gtkplotcanvas GtkPlotCanvas GtkPlotCanvas GtkPlotCanvasFlags GtkPlotCanvasAction GtkPlotCanvasFlag GtkPlotCanvasSelection GtkPlotCanvasSelectionMode GtkPlotCanvasPos GtkPlotCanvasChild GtkPlotCanvasChildFlags gtk_plot_canvas_new gtk_plot_canvas_construct gtk_plot_canvas_flags gtk_plot_canvas_set_flags gtk_plot_canvas_unset_flags gtk_plot_canvas_set_pc gtk_plot_canvas_paint gtk_plot_canvas_refresh gtk_plot_canvas_freeze gtk_plot_canvas_thaw gtk_plot_canvas_grid_set_visible gtk_plot_canvas_grid_set_step gtk_plot_canvas_grid_set_attributes gtk_plot_canvas_cancel_action gtk_plot_canvas_unselect gtk_plot_canvas_get_active_item gtk_plot_canvas_set_size gtk_plot_canvas_set_magnification gtk_plot_canvas_set_transparent gtk_plot_canvas_transparent gtk_plot_canvas_set_background gtk_plot_canvas_get_pixel gtk_plot_canvas_get_position gtk_plot_canvas_put_child gtk_plot_canvas_remove_child gtk_plot_canvas_child_move gtk_plot_canvas_child_move_resize gtk_plot_canvas_child_set_selection gtk_plot_canvas_child_set_selection_mode gtk_plot_canvas_child_get_position gtk_plot_canvas_set_line_attributes GTK_PLOT_CANVAS GTK_PLOT_CANVAS_CLASS GTK_PLOT_CANVAS_DND_FLAGS GTK_PLOT_CANVAS_FLAGS GTK_PLOT_CANVAS_SET_FLAGS GTK_PLOT_CANVAS_UNSET_FLAGS GTK_PLOT_CANVAS_CAN_DND_POINT GTK_PLOT_CANVAS_CAN_DND GTK_PLOT_CANVAS_CAN_SELECT_POINT GTK_PLOT_CANVAS_CAN_SELECT_ITEM GTK_PLOT_CANVAS_CAN_SELECT GTK_PLOT_CANVAS_CHILD GTK_PLOT_CANVAS_CHILD_CLASS GTK_IS_PLOT_CANVAS GTK_IS_PLOT_CANVAS_CHILD G_TYPE_PLOT_CANVAS G_TYPE_PLOT_CANVAS_CHILD GtkPlotCanvasClass GtkPlotCanvasChildClass gtk_plot_canvas_get_type gtk_plot_canvas_child_get_type
gtkplotcanvasellipse GtkPlotCanvasEllipse GtkPlotCanvasEllipse gtk_plot_canvas_ellipse_new gtk_plot_canvas_ellipse_set_attributes GTK_PLOT_CANVAS_ELLIPSE GTK_IS_PLOT_CANVAS_ELLIPSE G_TYPE_PLOT_CANVAS_ELLIPSE GTK_PLOT_CANVAS_ELLIPSE_CLASS GtkPlotCanvasEllipseClass gtk_plot_canvas_ellipse_get_type
gtkplotcanvasline GtkPlotCanvasLine GtkPlotCanvasLine GtkPlotCanvasArrow gtk_plot_canvas_line_new gtk_plot_canvas_line_set_attributes gtk_plot_canvas_line_set_arrow GTK_PLOT_CANVAS_LINE GTK_IS_PLOT_CANVAS_LINE G_TYPE_PLOT_CANVAS_LINE GTK_PLOT_CANVAS_LINE_CLASS GtkPlotCanvasLineClass gtk_plot_canvas_line_get_type
gtkplotcanvaspixmap GtkPlotCanvasPixmap GtkPlotCanvasPixmap gtk_plot_canvas_pixmap_new GTK_PLOT_CANVAS_PIXMAP GTK_IS_PLOT_CANVAS_PIXMAP G_TYPE_PLOT_CANVAS_PIXMAP GTK_PLOT_CANVAS_PIXMAP_CLASS GtkPlotCanvasPixmapClass gtk_plot_canvas_pixmap_get_type
gtkplotcanvasplot GtkPlotCanvasPlot GtkPlotCanvasPlot GtkPlotCanvasPlotFlags GtkPlotCanvasPlotPos gtk_plot_canvas_plot_new gtk_plot_canvas_plot_flags gtk_plot_canvas_plot_set_flags gtk_plot_canvas_plot_unset_flags GTK_PLOT_CANVAS_PLOT GTK_IS_PLOT_CANVAS_PLOT G_TYPE_PLOT_CANVAS_PLOT GTK_PLOT_CANVAS_PLOT_CLASS GTK_PLOT_CANVAS_PLOT_SELECT_POINT GTK_PLOT_CANVAS_PLOT_DND_POINT GTK_PLOT_CANVAS_PLOT_FLAGS GTK_PLOT_CANVAS_PLOT_SET_FLAGS GTK_PLOT_CANVAS_PLOT_UNSET_FLAGS GtkPlotCanvasPlotClass gtk_plot_canvas_plot_get_type
gtkplotcanvasrectangle GtkPlotCanvasRectangle GtkPlotCanvasRectangle gtk_plot_canvas_rectangle_new gtk_plot_canvas_rectangle_set_attributes GTK_PLOT_CANVAS_RECTANGLE GTK_IS_PLOT_CANVAS_RECTANGLE G_TYPE_PLOT_CANVAS_RECTANGLE GTK_PLOT_CANVAS_RECTANGLE_CLASS GtkPlotCanvasRectangleClass gtk_plot_canvas_rectangle_get_type
gtkplotcanvastext GtkPlotCanvasText GtkPlotCanvasText gtk_plot_canvas_text_new gtk_plot_canvas_text_set_attributes GTK_PLOT_CANVAS_TEXT GTK_IS_PLOT_CANVAS_TEXT G_TYPE_PLOT_CANVAS_TEXT GTK_PLOT_CANVAS_TEXT_CLASS GtkPlotCanvasTextClass gtk_plot_canvas_text_get_type
gtkplotcsurface GtkPlotCSurface GtkPlotCSurface GtkPlotProjection gtk_plot_csurface_new gtk_plot_csurface_new_function gtk_plot_csurface_construct_function gtk_plot_csurface_set_lines_visible gtk_plot_csurface_get_lines_visible gtk_plot_csurface_set_projection gtk_plot_csurface_projection gtk_plot_csurface_set_levels_attributes gtk_plot_csurface_set_sublevels_attributes gtk_plot_csurface_get_levels_attributes gtk_plot_csurface_get_sublevels_attributes GTK_PLOT_CSURFACE GTK_IS_PLOT_CSURFACE G_TYPE_PLOT_CSURFACE GTK_PLOT_CSURFACE_CLASS GtkPlotCSurfaceClass gtk_plot_csurface_get_type
gtkplotdata GtkPlotData GtkPlotData gtk_plot_data_new gtk_plot_data_new_function gtk_plot_data_construct_function gtk_plot_data_new_iterator gtk_plot_data_construct_iterator gtk_plot_data_clone gtk_plot_data_add_dimension gtk_plot_data_remove_dimension gtk_plot_data_find_dimension gtk_plot_data_required_dimensions gtk_plot_data_independent_dimensions gtk_plot_data_paint gtk_plot_data_update gtk_plot_data_draw_points gtk_plot_data_draw_symbol gtk_plot_data_dimension_set_points gtk_plot_data_dimension_set_array gtk_plot_data_dimension_get_array gtk_plot_data_dimension_set_scale gtk_plot_data_dimension_get_scale gtk_plot_data_set_points gtk_plot_data_get_points gtk_plot_data_get_point gtk_plot_data_set_x gtk_plot_data_set_y gtk_plot_data_set_z gtk_plot_data_set_a gtk_plot_data_set_dx gtk_plot_data_set_dy gtk_plot_data_set_dz gtk_plot_data_set_da gtk_plot_data_set_a_scale gtk_plot_data_set_labels gtk_plot_data_get_x gtk_plot_data_get_y gtk_plot_data_get_z gtk_plot_data_get_a gtk_plot_data_get_dx gtk_plot_data_get_dy gtk_plot_data_get_dz gtk_plot_data_get_da gtk_plot_data_get_a_scale gtk_plot_data_get_labels gtk_plot_data_show_labels gtk_plot_data_labels_set_attributes gtk_plot_data_set_numpoints gtk_plot_data_get_numpoints gtk_plot_data_set_symbol gtk_plot_data_get_symbol gtk_plot_data_set_connector gtk_plot_data_get_connector gtk_plot_data_set_line_attributes gtk_plot_data_get_line_attributes gtk_plot_data_set_x_attributes gtk_plot_data_set_y_attributes gtk_plot_data_set_z_attributes gtk_plot_data_show_xerrbars gtk_plot_data_show_yerrbars gtk_plot_data_show_zerrbars gtk_plot_data_hide_xerrbars gtk_plot_data_hide_yerrbars gtk_plot_data_hide_zerrbars gtk_plot_data_fill_area gtk_plot_data_area_is_filled gtk_plot_data_show_legend gtk_plot_data_hide_legend gtk_plot_data_set_legend gtk_plot_data_set_legend_precision gtk_plot_data_get_legend_precision gtk_plot_data_set_name gtk_plot_data_gradient gtk_plot_data_get_gradient_allocation gtk_plot_data_move_gradient gtk_plot_data_set_gradient_size gtk_plot_data_reset_gradient gtk_plot_data_reset_gradient_colors gtk_plot_data_gradient_use_custom_colors gtk_plot_data_gradient_custom_colors gtk_plot_data_set_gradient_mask gtk_plot_data_get_gradient_mask gtk_plot_data_gradient_set_visible gtk_plot_data_gradient_visible gtk_plot_data_gradient_autoscale_a gtk_plot_data_gradient_autoscale_da gtk_plot_data_gradient_autoscale_z gtk_plot_data_set_gradient_colors gtk_plot_data_get_gradient_colors gtk_plot_data_set_gradient_nth_color gtk_plot_data_get_gradient_nth_color gtk_plot_data_set_gradient_outer_colors gtk_plot_data_get_gradient_outer_colors gtk_plot_data_set_gradient gtk_plot_data_get_gradient gtk_plot_data_get_gradient_level gtk_plot_data_gradient_set_style gtk_plot_data_gradient_set_scale gtk_plot_data_set_link gtk_plot_data_get_link gtk_plot_data_remove_link gtk_plot_data_add_marker gtk_plot_data_remove_marker gtk_plot_data_remove_markers gtk_plot_data_show_markers gtk_plot_data_markers_visible GTK_PLOT_DATA GTK_IS_PLOT_DATA G_TYPE_PLOT_DATA GTK_PLOT_DATA_CLASS GtkPlotDataClass gtk_plot_data_get_type gtk_plot_marker_get_type
gtkplotdt GtkPlotDT GtkPlotDT GtkPlotDTnode GtkPlotDTsegment GtkPlotDTtriangle GtkPlotDTprogressbarFunc gtk_plot_dt_new gtk_plot_dt_set_quadrilateral gtk_plot_dt_set_subsampling gtk_plot_dt_add_node gtk_plot_dt_get_node gtk_plot_dt_triangulate gtk_plot_dt_clear GTK_PLOT_DT GTK_IS_PLOT_DT G_TYPE_PLOT_DT GTK_PLOT_DT_CLASS GtkPlotDTClass gtk_plot_dt_get_type
gtkplotflux GtkPlotFlux GtkPlotFlux gtk_plot_flux_new gtk_plot_flux_set_arrow gtk_plot_flux_get_arrow gtk_plot_flux_center gtk_plot_flux_is_centered gtk_plot_flux_show_scale gtk_plot_flux_set_scale_max gtk_plot_flux_set_size_max gtk_plot_flux_set_labels_precision gtk_plot_flux_set_labels_style gtk_plot_flux_set_labels_prefix gtk_plot_flux_set_labels_suffix GTK_PLOT_FLUX GTK_IS_PLOT_FLUX G_TYPE_PLOT_FLUX GTK_PLOT_FLUX_CLASS GtkPlotFluxClass gtk_plot_flux_get_type
gtkplotpc GtkPlotPC GtkPlotPC GtkPlotPageSize GtkPlotPageOrientation GtkPlotUnits GtkPlotPoint gtk_plot_pc_new gtk_plot_pc_init gtk_plot_pc_leave gtk_plot_pc_set_viewport gtk_plot_pc_gsave gtk_plot_pc_grestore gtk_plot_pc_clip gtk_plot_pc_clip_mask gtk_plot_pc_set_color gtk_plot_pc_set_lineattr gtk_plot_pc_set_dash gtk_plot_pc_draw_point gtk_plot_pc_draw_line gtk_plot_pc_draw_lines gtk_plot_pc_draw_rectangle gtk_plot_pc_draw_polygon gtk_plot_pc_draw_ellipse gtk_plot_pc_draw_circle gtk_plot_pc_set_font gtk_plot_pc_draw_string gtk_plot_pc_draw_pixmap GTK_PLOT_PC GTK_IS_PLOT_PC GTK_TYPE_PLOT_PC GTK_PLOT_PC_CLASS GTK_PLOT_LETTER_W GTK_PLOT_LETTER_H GTK_PLOT_LEGAL_W GTK_PLOT_LEGAL_H GTK_PLOT_A4_W GTK_PLOT_A4_H GTK_PLOT_EXECUTIVE_W GTK_PLOT_EXECUTIVE_H GtkPlotPCClass gtk_plot_pc_get_type
gtkplotgdk GtkPlotGdk GtkPlotGdk gtk_plot_gdk_new gtk_plot_gdk_construct gtk_plot_gdk_set_drawable GTK_PLOT_GDK GTK_IS_PLOT_GDK G_TYPE_PLOT_GDK GTK_PLOT_GDK_CLASS GtkPlotGdkClass gtk_plot_gdk_get_type
gtkplotpixmap GtkPlotPixmap GtkPlotPixmap gtk_plot_pixmap_new gtk_plot_pixmap_construct gtk_plot_pixmap_get_pixmap gtk_plot_pixmap_get_mask GTK_PLOT_PIXMAP GTK_IS_PLOT_PIXMAP G_TYPE_PLOT_PIXMAP GTK_PLOT_PIXMAP_CLASS GtkPlotPixmapClass gtk_plot_pixmap_get_type
gtkplotpolar GtkPlotPolar GtkPlotPolar gtk_plot_polar_new gtk_plot_polar_new_with_size gtk_plot_polar_construct gtk_plot_polar_construct_with_size gtk_plot_polar_rotate gtk_plot_polar_get_angle GTK_PLOT_POLAR GTK_IS_PLOT_POLAR G_TYPE_PLOT_POLAR GTK_PLOT_POLAR_CLASS GTK_PLOT_POLAR_FLAGS GTK_PLOT_POLAR_SET_FLAGS GTK_PLOT_POLAR_UNSET_FLAGS GTK_PLOT_POLAR_TRANSPARENT GtkPlotPolarClass gtk_plot_polar_get_type
gtkplotps GtkPlotPS GtkPlotPS gtk_plot_ps_new gtk_plot_ps_new_with_size gtk_plot_ps_construct gtk_plot_ps_construct_with_size gtk_plot_ps_set_size gtk_plot_ps_set_scale GTK_PLOT_PS GTK_IS_PLOT_PS G_TYPE_PLOT_PS GTK_PLOT_PS_CLASS GtkPlotPSClass gtk_plot_ps_get_type
gtkplotsegment GtkPlotSegment GtkPlotSegment GtkPlotArrow gtk_plot_segment_new gtk_plot_segment_set_relative gtk_plot_segment_relative gtk_plot_segment_set_arrow gtk_plot_segment_get_arrow gtk_plot_segment_set_arrow_mask gtk_plot_segment_get_arrow_mask gtk_plot_segment_center gtk_plot_segment_is_centered GTK_PLOT_SEGMENT GTK_IS_PLOT_SEGMENT G_TYPE_PLOT_SEGMENT GTK_PLOT_SEGMENT_CLASS GtkPlotSegmentClass gtk_plot_segment_get_type
gtkplotsurface GtkPlotSurface GtkPlotSurface GtkPlotPolygon gtk_plot_surface_new gtk_plot_surface_new_function gtk_plot_surface_construct_function gtk_plot_surface_set_color gtk_plot_surface_set_shadow gtk_plot_surface_set_grid_foreground gtk_plot_surface_set_grid_background gtk_plot_surface_set_grid_visible gtk_plot_surface_get_grid_visible gtk_plot_surface_set_mesh_visible gtk_plot_surface_get_mesh_visible gtk_plot_surface_set_light gtk_plot_surface_set_ambient gtk_plot_surface_use_height_gradient gtk_plot_surface_use_amplitud gtk_plot_surface_set_transparent gtk_plot_surface_set_points gtk_plot_surface_get_points gtk_plot_surface_set_x gtk_plot_surface_set_y gtk_plot_surface_set_z gtk_plot_surface_set_dx gtk_plot_surface_set_dy gtk_plot_surface_set_dz gtk_plot_surface_get_x gtk_plot_surface_get_y gtk_plot_surface_get_z gtk_plot_surface_get_dx gtk_plot_surface_get_dy gtk_plot_surface_get_dz gtk_plot_surface_set_nx gtk_plot_surface_set_ny gtk_plot_surface_get_nx gtk_plot_surface_get_ny gtk_plot_surface_set_xstep gtk_plot_surface_set_ystep gtk_plot_surface_get_xstep gtk_plot_surface_get_ystep gtk_plot_surface_build_mesh gtk_plot_surface_recalc_nodes GTK_PLOT_SURFACE GTK_IS_PLOT_SURFACE G_TYPE_PLOT_SURFACE GTK_PLOT_SURFACE_CLASS GtkPlotSurfaceClass gtk_plot_surface_get_type
gtksheet GtkSheet GtkSheet GtkSheetChild GtkSheetRow GtkSheetCell GtkSheetRange GtkSheetButton GtkSheetCellAttr GtkSheetCellBorder GtkSheetAttrType GtkSheetState GtkSheetEntryType GtkSheetVerticalJustification gtk_sheet_new gtk_sheet_construct gtk_sheet_new_browser gtk_sheet_construct_browser gtk_sheet_new_with_custom_entry gtk_sheet_construct_with_custom_entry gtk_sheet_change_entry gtk_sheet_get_entry_type gtk_sheet_get_entry gtk_sheet_get_entry_widget gtk_sheet_get_entry_text gtk_sheet_set_entry_text gtk_sheet_set_entry_editable gtk_sheet_entry_signal_connect_changed gtk_sheet_entry_signal_disconnect_by_func gtk_sheet_entry_select_region gtk_sheet_get_state gtk_sheet_get_attributes gtk_sheet_get_rows_count gtk_sheet_get_visible_range gtk_sheet_set_selection_mode gtk_sheet_autoresize gtk_sheet_autoresize_columns gtk_sheet_set_autoresize_columns gtk_sheet_autoresize_rows gtk_sheet_set_autoresize_rows gtk_sheet_set_autoresize gtk_sheet_autoscroll gtk_sheet_set_autoscroll gtk_sheet_clip_text gtk_sheet_set_clip_text gtk_sheet_justify_entry gtk_sheet_set_justify_entry gtk_sheet_get_vjustification gtk_sheet_set_vjustification gtk_sheet_locked gtk_sheet_set_locked gtk_sheet_set_title gtk_sheet_get_description gtk_sheet_set_description gtk_sheet_is_frozen gtk_sheet_freeze gtk_sheet_thaw gtk_sheet_moveto gtk_sheet_set_background gtk_sheet_set_grid gtk_sheet_grid_visible gtk_sheet_show_grid gtk_sheet_get_hadjustment gtk_sheet_set_hadjustment gtk_sheet_get_vadjustment gtk_sheet_set_vadjustment gtk_sheet_in_clip gtk_sheet_clip_range gtk_sheet_unclip_range gtk_sheet_get_active_cell gtk_sheet_set_active_cell gtk_sheet_set_tab_direction gtk_sheet_get_selection gtk_sheet_select_row gtk_sheet_select_range gtk_sheet_unselect_range gtk_sheet_get_tooltip_markup gtk_sheet_set_tooltip_markup gtk_sheet_get_tooltip_text gtk_sheet_set_tooltip_text gtk_sheet_add_row gtk_sheet_insert_rows gtk_sheet_delete_rows gtk_sheet_row_titles_visible gtk_sheet_show_row_titles gtk_sheet_hide_row_titles gtk_sheet_get_row_title gtk_sheet_set_row_title gtk_sheet_set_row_titles_width gtk_sheet_set_row_height gtk_sheet_row_button_get_label gtk_sheet_row_button_add_label gtk_sheet_row_button_justify gtk_sheet_row_sensitive gtk_sheet_row_set_sensitivity gtk_sheet_rows_set_sensitivity gtk_sheet_rows_resizable gtk_sheet_rows_set_resizable gtk_sheet_row_visible gtk_sheet_row_set_visibility gtk_sheet_row_label_set_visibility gtk_sheet_rows_labels_set_visibility gtk_sheet_row_get_tooltip_markup gtk_sheet_row_set_tooltip_markup gtk_sheet_row_get_tooltip_text gtk_sheet_row_set_tooltip_text gtk_sheet_set_cell gtk_sheet_set_cell_text gtk_sheet_cell_get_text gtk_sheet_cell_clear gtk_sheet_cell_delete gtk_sheet_cell_get_state gtk_sheet_cell_get_tooltip_markup gtk_sheet_cell_set_tooltip_markup gtk_sheet_cell_get_tooltip_text gtk_sheet_cell_set_tooltip_text gtk_sheet_get_cell_area gtk_sheet_get_pixel_info gtk_sheet_get_link gtk_sheet_link_cell gtk_sheet_remove_link gtk_sheet_range_clear gtk_sheet_range_delete gtk_sheet_range_set_background gtk_sheet_range_set_foreground gtk_sheet_range_set_justification gtk_sheet_range_set_editable gtk_sheet_range_set_visible gtk_sheet_range_set_border gtk_sheet_range_set_border_color gtk_sheet_range_set_font gtk_sheet_put gtk_sheet_attach gtk_sheet_attach_floating gtk_sheet_attach_default gtk_sheet_move_child gtk_sheet_get_child_at gtk_sheet_button_attach G_TYPE_SHEET GTK_SHEET GTK_IS_SHEET GTK_SHEET_CLASS GTK_SHEET_GET_CLASS GTK_IS_SHEET_CLASS G_TYPE_SHEET_RANGE GTK_SHEET_IS_LOCKED GTK_SHEET_ROW_FROZEN GTK_SHEET_COLUMN_FROZEN GTK_SHEET_AUTORESIZE GTK_SHEET_CLIP_TEXT GTK_SHEET_ROW_TITLES_VISIBLE GTK_SHEET_COL_TITLES_VISIBLE GTK_SHEET_AUTO_SCROLL GTK_SHEET_JUSTIFY_ENTRY GtkSheetClass gtk_sheet_get_type gtk_sheet_range_get_type gtk_widget_get_mapped gtk_widget_get_realized gtk_widget_get_requisition gtk_widget_set_mapped_false gtk_widget_set_mapped_true gtk_widget_set_realized_false gtk_widget_set_realized_true GDK_KEY_BackSpace GDK_KEY_Control_L GDK_KEY_Control_R GDK_KEY_Down GDK_KEY_End GDK_KEY_Escape GDK_KEY_Home GDK_KEY_ISO_Left_Tab GDK_KEY_KP_Enter GDK_KEY_Left GDK_KEY_Page_Down GDK_KEY_Page_Up GDK_KEY_Return GDK_KEY_Right GDK_KEY_Shift_L GDK_KEY_Shift_R GDK_KEY_Tab GDK_KEY_Up GTK_SHEET_OPTIMIZE_COLUMN_DRAW
gtksheetcolumn GtkSheetColumn GtkSheetColumn gtk_sheet_add_column gtk_sheet_insert_columns gtk_sheet_delete_columns gtk_sheet_get_columns_count gtk_sheet_column_get gtk_sheet_column_get_index gtk_sheet_select_column gtk_sheet_column_titles_visible gtk_sheet_show_column_titles gtk_sheet_hide_column_titles gtk_sheet_get_column_title gtk_sheet_set_column_title gtk_sheet_set_column_titles_height gtk_sheet_column_sensitive gtk_sheet_column_set_sensitivity gtk_sheet_columns_set_sensitivity gtk_sheet_columns_resizable gtk_sheet_columns_set_resizable gtk_sheet_column_visible gtk_sheet_column_set_visibility gtk_sheet_column_label_set_visibility gtk_sheet_columns_labels_set_visibility gtk_sheet_get_column_width gtk_sheet_set_column_width gtk_sheet_column_get_justification gtk_sheet_column_set_justification gtk_sheet_column_get_vjustification gtk_sheet_column_set_vjustification gtk_sheet_column_button_get_label gtk_sheet_column_button_add_label gtk_sheet_column_button_justify gtk_sheet_column_get_tooltip_markup gtk_sheet_column_set_tooltip_markup gtk_sheet_column_get_tooltip_text gtk_sheet_column_set_tooltip_text gtk_sheet_column_get_datatype gtk_sheet_column_set_datatype gtk_sheet_column_get_description gtk_sheet_column_set_description gtk_sheet_column_get_format gtk_sheet_column_set_format gtk_sheet_column_get_iskey gtk_sheet_column_set_iskey gtk_sheet_column_get_entry_type gtk_sheet_column_set_entry_type gtk_sheet_column_get_readonly gtk_sheet_column_set_readonly G_TYPE_SHEET_COLUMN GTK_SHEET_COLUMN GTK_IS_SHEET_COLUMN GTK_SHEET_COLUMN_CLASS GTK_SHEET_COLUMN_GET_CLASS GTK_IS_SHEET_COLUMN_CLASS GtkSheetColumnClass gtk_sheet_column_get_type GTK_SHEET_COLUMN_DEFAULT_JUSTIFICATION GTK_SHEET_COLUMN_DEFAULT_WIDTH GTK_SHEET_COLUMN_IS_SENSITIVE GTK_SHEET_COLUMN_IS_VISIBLE GTK_SHEET_COLUMN_MIN_WIDTH GTK_SHEET_COLUMN_SET_SENSITIVE GTK_SHEET_COLUMN_SET_VISIBLE
gtktogglecombo GtkToggleCombo GtkToggleCombo gtk_toggle_combo_new gtk_toggle_combo_construct gtk_toggle_combo_get_nrows gtk_toggle_combo_get_ncols gtk_toggle_combo_select gtk_toggle_combo_get_selection GTK_TOGGLE_COMBO GTK_IS_TOGGLE_COMBO GTK_TOGGLE_COMBO_CLASS GtkToggleComboClass gtk_toggle_combo_get_type
gtkplotdtriangle GtkPlotDTriangle triangulate
gtkplotprint GtkPlotPrint gtk_plot_export_ps gtk_plot_export_ps_with_size gtk_plot_canvas_export_ps gtk_plot_canvas_export_ps_with_size gtk_plot_canvas_export_cairo
gtkpsfont GtkPSFont GtkPSFont gtk_psfont_init gtk_psfont_unref gtk_psfont_get_by_name gtk_psfont_get_by_family gtk_psfont_get_gdkfont gtk_psfont_get_font_description gtk_psfont_get_psfontname gtk_psfont_add_font gtk_psfont_add_i18n_font gtk_psfont_get_families gtk_psfont_get_char_size
gtkdataformat GtkDataFormat gtk_data_format gtk_data_format_remove
gtkextrafeatures GtkExtra Versioning GTKEXTRA_MAJOR_VERSION GTKEXTRA_MINOR_VERSION GTKEXTRA_MICRO_VERSION GTKEXTRA_BINARY_AGE GTKEXTRA_INTERFACE_AGE GTKEXTRA_CHECK_VERSION gtkextra_major_version gtkextra_minor_version gtkextra_micro_version gtkextra_binary_age gtkextra_interface_age gtkextra_check_version
gtkextra-3.2.0/docs/reference/resources.sgml0000644000076400001440000000611212603754176016065 00000000000000 Mailing lists and bug reports 3 Mailing lists and bug reports Mailing lists and bug reports Getting help with GtkExtra Filing a bug report or feature request If you encounter a bug, misfeature, or missing feature in GTK+, please file a bug report on http://gtkextra.sourceforge.net. We'd also appreciate any support for fixing incomplete or misleading information in the GtkExtra documentation. Don't hesitate to file a bug report, even if you think we may know about it already, or aren't sure of the details. Just give us as much information as you have, and if it's already fixed or has already been discussed, we'll add a note to that effect in the report. Submitting Patches If you develop a bugfix or enhancement for GtkExtra, please attach the patch generated by the diff utility, using the option to make the patch more readable. All patches must be offered under the terms of the GNU GPL license, so be sure you are authorized to give us the patch under those terms. If you want to discuss your patch before or after developing it, mail scigraphica-gtkextra@lists.sourceforge.net. Mailing lists You can subscribe or view the archives of these lists on http://gtkextra.sourceforge.net. You must be subscribed to the list in order to post. scigraphica-gtkextra@lists.sourceforge.net This is the lists oriented towards developing GtkExtra, the widget set used by SciGraphica. scigraphica-devel@lists.sourceforge.net This is the lists oriented towards developing SciGraphica. It joins developers to discuss code and it's not focused to answer common questions. However, there is no documentation or FAQ yet, and meanwhile, you can ask about installation problems and general use. scigraphica-announce@lists.sourceforge.net Subscribe to recieve the announcement of new releases! This is a very low traffic list. gtkextra-3.2.0/docs/reference/Makefile.am0000644000076400001440000000576512603754176015240 00000000000000## Process this file with automake to produce Makefile.in # We require automake 1.6 at least. #AUTOMAKE_OPTIONS = 1.6 # The name of the module, e.g. 'glib'. DOC_MODULE=gtkextra DOC_MODULE_VERSION=$(GTK_EXTRA_MAJOR_VERSION) # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. DOC_SOURCE_DIR=$(top_builddir)/gtkextra # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS= # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB=$(top_srcdir)/gtkextra/*.h CFILE_GLOB=$(top_srcdir)/gtkextra/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES= \ pixmaps.h \ icons.h \ gtkextra-marshal.h \ gtkextra-marshal.list \ gtkextratypebuiltins.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= \ pics/gtkbordercombo.jpg \ pics/gtkcharsel.jpg \ pics/gtkcolorcombo.jpg \ pics/gtkfilelist.jpg \ pics/gtkiconlist.jpg # $(top_srcdir)/docs/reference/pics/gtkiconlist.jpg # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files= version.xml \ compiling.sgml \ resources.sgml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files # e.g. expand_content_files=running.sgml expand_content_files= \ version.xml \ compiling.sgml \ resources.sgml # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) AM_CPPFLAGS =-I$(top_srcdir) -I$(top_srcdir)/gtkextra -I$(top_builddir) $(GTK_CFLAGS) GTKDOC_LIBS=$(top_builddir)/gtkextra/libgtkextra-x11-3.0.la $(GTK_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST += gtkextra-3.2.0/docs/reference/html/0000755000076400001440000000000012604172532014202 500000000000000gtkextra-3.2.0/docs/reference/html/GtkItemEntry.html0000644000076400001440000004077512604172532017413 00000000000000 GtkItemEntry

GtkItemEntry

GtkItemEntry — An item entry widget.

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkEntry
                           +----GtkItemEntry

Implemented Interfaces

GtkItemEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.

Description

Originally GtkSheetEntry. This widget allows to change colors and justification and can be dinamically resized.

Details

GtkItemEntry

typedef struct _GtkItemEntry GtkItemEntry;

The GtkItemEntry struct contains only private data. It should only be accessed through the functions described below.


gtk_item_entry_new ()

GtkWidget *         gtk_item_entry_new                  (void);

Returns :


gtk_item_entry_new_with_max_length ()

GtkWidget *         gtk_item_entry_new_with_max_length  (gint max);

Creates a new GtkItemEntry with the maximum allowed number of characters in the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit.

max :

the maximum character length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.

Returns :

the newly-created GtkItemEntry widget.

gtk_item_entry_set_text ()

void                gtk_item_entry_set_text             (GtkItemEntry *entry,
                                                         const gchar *text,
                                                         GtkJustification justification);

Sets the text in the widget to the given value, replacing the current contents.

entry :

a GtkItemEntry

text :

the new text

justification :

a GtkJustification : GTK_JUSTIFY_LEFT,GTK_JUSTIFY_RIGHT,GTK_JUSTIFY_CENTER,GTK_JUSTIFY_FILL

gtk_item_entry_set_justification ()

void                gtk_item_entry_set_justification    (GtkItemEntry *entry,
                                                         GtkJustification just);

Sets justification of the widget to the given value, replacing the current one.

entry :

a GtkItemEntry

just :

a GtkJustification : GTK_JUSTIFY_LEFT,GTK_JUSTIFY_RIGHT,GTK_JUSTIFY_CENTER,GTK_JUSTIFY_FILL

gtk_item_entry_get_max_length_bytes ()

gint                gtk_item_entry_get_max_length_bytes (GtkItemEntry *item_entry);

Retrieves the maximum byte length for the contents of GtkItemEntry.

item_entry :

a GtkItemEntry

Returns :

maximum byte length or 0.

Since 3.0.6


gtk_item_entry_set_max_length_bytes ()

void                gtk_item_entry_set_max_length_bytes (GtkItemEntry *item_entry,
                                                         gint max_length_bytes);

Sets the maximum byte length for the contents of the GtkItemEntry. Existing content will not be truncted.

item_entry :

a GtkItemEntry

max_length_bytes :

maximum byte length or 0

Since 3.0.6


gtk_item_entry_get_cursor_visible ()

gboolean            gtk_item_entry_get_cursor_visible   (GtkItemEntry *entry);

entry :

Returns :


gtk_item_entry_set_cursor_visible ()

void                gtk_item_entry_set_cursor_visible   (GtkItemEntry *entry,
                                                         gboolean visible);

entry :

visible :

gtkextra-3.2.0/docs/reference/html/GtkPlotCanvasPixmap.html0000644000076400001440000001664712604172532020725 00000000000000 GtkPlotCanvasPixmap

GtkPlotCanvasPixmap

GtkPlotCanvasPixmap

Synopsis


#include <gtkextra.h>

                    GtkPlotCanvasPixmap;
GtkPlotCanvasChild * gtk_plot_canvas_pixmap_new         (GdkPixmap *_pixmap,
                                                         GdkBitmap *mask);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotCanvasChild
                     +----GtkPlotCanvasPixmap

Properties

  "mask-bitmap"              gpointer              : Read / Write
  "pixmap"                   gpointer              : Read / Write

Description

FIXME:: need long description

Details

GtkPlotCanvasPixmap

typedef struct _GtkPlotCanvasPixmap GtkPlotCanvasPixmap;

The GtkPlotCanvasPixmap struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_canvas_pixmap_new ()

GtkPlotCanvasChild * gtk_plot_canvas_pixmap_new         (GdkPixmap *_pixmap,
                                                         GdkBitmap *mask);

_pixmap :

a GdkPixmap.

mask :

Returns :

Property Details

The "mask-bitmap" property

  "mask-bitmap"              gpointer              : Read / Write

Mask.


The "pixmap" property

  "pixmap"                   gpointer              : Read / Write

Pixmap.

gtkextra-3.2.0/docs/reference/html/GtkToggleCombo.html0000644000076400001440000004600312604172532017662 00000000000000 GtkToggleCombo

GtkToggleCombo

GtkToggleCombo — A toggle combo widget for GTK.

Synopsis


#include <gtkextra.h>

                    GtkToggleCombo;
GtkWidget*          gtk_toggle_combo_new                (gint nrows,
                                                         gint ncols);
void                gtk_toggle_combo_construct          (GtkToggleCombo *toggle_combo,
                                                         gint nrows,
                                                         gint ncols);
gint                gtk_toggle_combo_get_nrows          (GtkToggleCombo *combo);
gint                gtk_toggle_combo_get_ncols          (GtkToggleCombo *combo);
void                gtk_toggle_combo_select             (GtkToggleCombo *toggle_combo,
                                                         gint new_row,
                                                         gint new_col);
void                gtk_toggle_combo_get_selection      (GtkToggleCombo *combo,
                                                         gint *row,
                                                         gint *col);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----GtkComboButton
                                             +----GtkToggleCombo

Implemented Interfaces

GtkToggleCombo implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Signals

  "changed"                                        : Run First

Description

A GtkToggleCombo is a GtkCombo which will remain 'pressed-in' when clicked. Clicking it again will cause the toggle combo to return to it's normal state. A toggle combo is created by calling gtk_toggle_combo_new(). The number of rows/columns may be find out by calling gtk_toggle_combo_get_nrows() or gtk_toggle_combo_get_ncols(). A combo row may be selected with gtk_toggle_combo_select().The current selection is returned by gtk_toggle_combo_get_selection().

Details

GtkToggleCombo

typedef struct _GtkToggleCombo GtkToggleCombo;

The GtkToggleCombo struct contains only private data. It should only be accessed through the functions described below.


gtk_toggle_combo_new ()

GtkWidget*          gtk_toggle_combo_new                (gint nrows,
                                                         gint ncols);

Creates a new GtkToggleCombo widget with nrows rows and ncols columns.

nrows :

number of rows

ncols :

number of columns

Returns :

the newly-created GtkToggleCombo widget.

gtk_toggle_combo_construct ()

void                gtk_toggle_combo_construct          (GtkToggleCombo *toggle_combo,
                                                         gint nrows,
                                                         gint ncols);

Initializes the GtkToggleCombo with nrows rows and ncols columns.

toggle_combo :

a GtkToggleCombo

nrows :

number of rows

ncols :

number of columns

gtk_toggle_combo_get_nrows ()

gint                gtk_toggle_combo_get_nrows          (GtkToggleCombo *combo);

Get the number of rows in GtkToggleCombo.

combo :

a GtkToggleCombo

Returns :

number of rows

gtk_toggle_combo_get_ncols ()

gint                gtk_toggle_combo_get_ncols          (GtkToggleCombo *combo);

Get the number of columns in GtkToggleCombo.

combo :

a GtkToggleCombo

Returns :

number of columns

gtk_toggle_combo_select ()

void                gtk_toggle_combo_select             (GtkToggleCombo *toggle_combo,
                                                         gint new_row,
                                                         gint new_col);

Select the cell(row,col) from GtkToggleCombo.

toggle_combo :

a GtkToggleCombo

new_row :

number of row

new_col :

number of column

gtk_toggle_combo_get_selection ()

void                gtk_toggle_combo_get_selection      (GtkToggleCombo *combo,
                                                         gint *row,
                                                         gint *col);

Get the current selection(row,col) in GtkToggleCombo.

combo :

a GtkToggleCombo

row :

number of row

col :

number of column

Signal Details

The "changed" signal

void                user_function                      (GtkToggleCombo *toggle_combo,
                                                        gint            row,
                                                        gint            col,
                                                        gpointer        user_data)         : Run First

Emmited when the row,col are selected in GtkToggleCombo

toggle_combo :

the GtkToggleCombo object that received the signal

row :

row number

col :

column number

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/GtkPlotPixmap.html0000644000076400001440000003025512604172532017560 00000000000000 GtkPlotPixmap

GtkPlotPixmap

GtkPlotPixmap — Pixmap plots widget.

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotPixmap

Implemented Interfaces

GtkPlotPixmap implements AtkImplementorIface and GtkBuildable.

Properties

  "mask-bitmap"              gpointer              : Read / Write
  "pixmap"                   gpointer              : Read / Write

Description

FIXME:: Need long description.

Details

GtkPlotPixmap

typedef struct _GtkPlotPixmap GtkPlotPixmap;

The GtkPlotPixmap struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_pixmap_new ()

GtkWidget*          gtk_plot_pixmap_new                 (GdkPixmap *pixmap,
                                                         GdkBitmap *mask);

pixmap :

a GdkPixmap.

mask :

Returns :

a new GtkWidget.

gtk_plot_pixmap_construct ()

void                gtk_plot_pixmap_construct           (GtkPlotPixmap *data,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *mask);

data :

pixmap :

a GdkPixmap

mask :


gtk_plot_pixmap_get_pixmap ()

GdkPixmap*          gtk_plot_pixmap_get_pixmap          (GtkPlotPixmap *pixmap);

Get pixmap from GtkPlotPixmap.

pixmap :

a GdkPlotPixmap

Returns :

(transfer none) the GdkPixmap

gtk_plot_pixmap_get_mask ()

GdkBitmap*          gtk_plot_pixmap_get_mask            (GtkPlotPixmap *pixmap);

Get mask bitmap from GtkPlotPixmap.

pixmap :

a GdkPlotPixmap

Returns :

(transfer none) the GdkBitmap

Property Details

The "mask-bitmap" property

  "mask-bitmap"              gpointer              : Read / Write

Mask.


The "pixmap" property

  "pixmap"                   gpointer              : Read / Write

Pixmap.

gtkextra-3.2.0/docs/reference/html/ch04.html0000644000076400001440000000450212604172532015547 00000000000000 Data Formatter

Data Formatter

GtkDataFormat — a data formatting library
gtkextra-3.2.0/docs/reference/html/ch02.html0000644000076400001440000001432012604172532015544 00000000000000 Widget Gallery gtkextra-3.2.0/docs/reference/html/GtkPlotArray.html0000644000076400001440000012750312604172532017403 00000000000000 GtkPlotArray

GtkPlotArray

GtkPlotArray

Synopsis


#include <gtkextra.h>

                    GtkPlotArray;
                    GtkPlotArrayList;
GObject*            gtk_plot_array_new                  (const gchar *name,
                                                         gpointer array,
                                                         gint size,
                                                         GType type,
                                                         gboolean own_data);
void                gtk_plot_array_set                  (GtkPlotArray *array,
                                                         gpointer data_array,
                                                         gint size,
                                                         GType type);
void                gtk_plot_array_set_label            (GtkPlotArray *array,
                                                         const gchar *label);
void                gtk_plot_array_set_description      (GtkPlotArray *array,
                                                         const gchar *desc);
void                gtk_plot_array_set_scale            (GtkPlotArray *array,
                                                         gdouble scale);
void                gtk_plot_array_set_required         (GtkPlotArray *array,
                                                         gboolean required);
void                gtk_plot_array_set_independent      (GtkPlotArray *array,
                                                         gboolean independent);
GType               gtk_plot_array_get_data_type        (GtkPlotArray *array);
const gchar *       gtk_plot_array_get_name             (GtkPlotArray *array);
const gchar *       gtk_plot_array_get_label            (GtkPlotArray *array);
const gchar *       gtk_plot_array_get_description      (GtkPlotArray *array);
gboolean            gtk_plot_array_required             (GtkPlotArray *array);
gboolean            gtk_plot_array_independent          (GtkPlotArray *array);
gdouble             gtk_plot_array_get_scale            (GtkPlotArray *array);
gint                gtk_plot_array_get_size             (GtkPlotArray *array);
gfloat*             gtk_plot_array_get_float            (GtkPlotArray *array);
gdouble*            gtk_plot_array_get_double           (GtkPlotArray *array);
gint*               gtk_plot_array_get_int              (GtkPlotArray *array);
gboolean*           gtk_plot_array_get_bool             (GtkPlotArray *array);
gchar**             gtk_plot_array_get_string           (GtkPlotArray *array);
gpointer*           gtk_plot_array_get_pointer          (GtkPlotArray *array);
void                gtk_plot_array_free                 (GtkPlotArray *array);
GObject*            gtk_plot_array_list_new             (void);
void                gtk_plot_array_list_add             (GtkPlotArrayList *set,
                                                         GtkPlotArray *array);
void                gtk_plot_array_list_remove          (GtkPlotArrayList *set,
                                                         GtkPlotArray *array);
GtkPlotArray*       gtk_plot_array_list_get             (GtkPlotArrayList *set,
                                                         const gchar *name);
void                gtk_plot_array_list_clear           (GtkPlotArrayList *set);

Object Hierarchy

  GObject
   +----GtkPlotArray

Properties

  "array-data"               gpointer              : Read / Write
  "description"              gchar*                : Read / Write
  "independent"              gboolean              : Read / Write
  "label"                    gchar*                : Read / Write
  "name"                     gchar*                : Read / Write
  "own-data"                 gboolean              : Read / Write
  "required"                 gboolean              : Read / Write
  "scale"                    gdouble               : Read / Write
  "size"                     gint                  : Read / Write
  "type"                     gint                  : Read / Write

Description

Details

GtkPlotArray

typedef struct _GtkPlotArray GtkPlotArray;

The GtkPlotArray struct contains only private data. It should only be accessed through the functions described below.


GtkPlotArrayList

typedef struct {
} GtkPlotArrayList;

The GtkPlotArrayList struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_array_new ()

GObject*            gtk_plot_array_new                  (const gchar *name,
                                                         gpointer array,
                                                         gint size,
                                                         GType type,
                                                         gboolean own_data);

name :

array :

size :

type :

own_data :

Returns :


gtk_plot_array_set ()

void                gtk_plot_array_set                  (GtkPlotArray *array,
                                                         gpointer data_array,
                                                         gint size,
                                                         GType type);

array :

data_array :

size :

type :


gtk_plot_array_set_label ()

void                gtk_plot_array_set_label            (GtkPlotArray *array,
                                                         const gchar *label);

array :

label :


gtk_plot_array_set_description ()

void                gtk_plot_array_set_description      (GtkPlotArray *array,
                                                         const gchar *desc);

array :

desc :


gtk_plot_array_set_scale ()

void                gtk_plot_array_set_scale            (GtkPlotArray *array,
                                                         gdouble scale);

array :

scale :


gtk_plot_array_set_required ()

void                gtk_plot_array_set_required         (GtkPlotArray *array,
                                                         gboolean required);

array :

required :


gtk_plot_array_set_independent ()

void                gtk_plot_array_set_independent      (GtkPlotArray *array,
                                                         gboolean independent);

array :

independent :


gtk_plot_array_get_data_type ()

GType               gtk_plot_array_get_data_type        (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_name ()

const gchar *       gtk_plot_array_get_name             (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_label ()

const gchar *       gtk_plot_array_get_label            (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_description ()

const gchar *       gtk_plot_array_get_description      (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_required ()

gboolean            gtk_plot_array_required             (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_independent ()

gboolean            gtk_plot_array_independent          (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_scale ()

gdouble             gtk_plot_array_get_scale            (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_size ()

gint                gtk_plot_array_get_size             (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_float ()

gfloat*             gtk_plot_array_get_float            (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_double ()

gdouble*            gtk_plot_array_get_double           (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_int ()

gint*               gtk_plot_array_get_int              (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_bool ()

gboolean*           gtk_plot_array_get_bool             (GtkPlotArray *array);

array :

Returns :


gtk_plot_array_get_string ()

gchar**             gtk_plot_array_get_string           (GtkPlotArray *array);

array :

the GtkPlotArray

Returns :

(transfer none) the data string array

gtk_plot_array_get_pointer ()

gpointer*           gtk_plot_array_get_pointer          (GtkPlotArray *array);

array :

the GtkPlotArray

Returns :

(transfer none) the data pointer array

gtk_plot_array_free ()

void                gtk_plot_array_free                 (GtkPlotArray *array);

array :


gtk_plot_array_list_new ()

GObject*            gtk_plot_array_list_new             (void);

Returns :


gtk_plot_array_list_add ()

void                gtk_plot_array_list_add             (GtkPlotArrayList *set,
                                                         GtkPlotArray *array);

set :

array :


gtk_plot_array_list_remove ()

void                gtk_plot_array_list_remove          (GtkPlotArrayList *set,
                                                         GtkPlotArray *array);

set :

array :


gtk_plot_array_list_get ()

GtkPlotArray*       gtk_plot_array_list_get             (GtkPlotArrayList *set,
                                                         const gchar *name);

set :

a GtkPlotArrayList

name :

the name to be searched for

Returns :

(transfer none) the named GtkPlotArray or NULL

gtk_plot_array_list_clear ()

void                gtk_plot_array_list_clear           (GtkPlotArrayList *set);

set :

Property Details

The "array-data" property

  "array-data"               gpointer              : Read / Write

Data.


The "description" property

  "description"              gchar*                : Read / Write

Description.

Default value: NULL


The "independent" property

  "independent"              gboolean              : Read / Write

Independent.

Default value: FALSE


The "label" property

  "label"                    gchar*                : Read / Write

Label.

Default value: NULL


The "name" property

  "name"                     gchar*                : Read / Write

Name.

Default value: NULL


The "own-data" property

  "own-data"                 gboolean              : Read / Write

Specifies if data should be freed when the array is destroyed.

Default value: FALSE


The "required" property

  "required"                 gboolean              : Read / Write

Required.

Default value: FALSE


The "scale" property

  "scale"                    gdouble               : Read / Write

Scale.

Allowed values: >= 0

Default value: 1


The "size" property

  "size"                     gint                  : Read / Write

Size.

Allowed values: >= 0

Default value: 0


The "type" property

  "type"                     gint                  : Read / Write

Type.

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/GtkIconList.html0000644000076400001440000025357012604172532017216 00000000000000 GtkIconList

GtkIconList

GtkIconList — A file icon list widget for GTK.

Synopsis


#include <gtkextra.h>

                    GtkIconList;
enum                GtkIconListMode;
                    GtkIconListItem;
GtkWidget*          gtk_icon_list_new                   (guint icon_width,
                                                         GtkIconListMode mode);
void                gtk_icon_list_construct             (GtkIconList *iconlist,
                                                         guint icon_width,
                                                         GtkIconListMode mode);
void                gtk_icon_list_set_mode              (GtkIconList *iconlist,
                                                         GtkIconListMode mode);
GtkIconListMode     gtk_icon_list_get_mode              (GtkIconList *iconlist);
void                gtk_icon_list_set_editable          (GtkIconList *iconlist,
                                                         gboolean editable);
gboolean            gtk_icon_list_is_editable           (GtkIconList *iconlist);
void                gtk_icon_list_set_row_spacing       (GtkIconList *iconlist,
                                                         guint spacing);
guint               gtk_icon_list_get_row_spacing       (GtkIconList *iconlist);
void                gtk_icon_list_set_col_spacing       (GtkIconList *iconlist,
                                                         guint spacing);
guint               gtk_icon_list_get_col_spacing       (GtkIconList *iconlist);
void                gtk_icon_list_set_text_space        (GtkIconList *iconlist,
                                                         guint text_space);
guint               gtk_icon_list_get_text_space        (GtkIconList *iconlist);
void                gtk_icon_list_set_icon_border       (GtkIconList *iconlist,
                                                         guint border);
guint               gtk_icon_list_get_icon_border       (GtkIconList *iconlist);
void                gtk_icon_list_set_icon_width        (GtkIconList *iconlist,
                                                         guint width);
guint               gtk_icon_list_get_icon_width        (GtkIconList *iconlist);
void                gtk_icon_list_freeze                (GtkIconList *iconlist);
void                gtk_icon_list_thaw                  (GtkIconList *iconlist);
void                gtk_icon_list_set_background        (GtkIconList *iconlist,
                                                         GdkColor *color);
GtkIconListItem *   gtk_icon_list_add_from_pixmap       (GtkIconList *icon_list,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *bitmap_mask,
                                                         const gchar *label,
                                                         gpointer link);
GtkIconListItem *   gtk_icon_list_add_from_data         (GtkIconList *iconlist,
                                                         gchar **data,
                                                         const gchar *label,
                                                         gpointer link);
GtkIconListItem *   gtk_icon_list_add                   (GtkIconList *iconlist,
                                                         const gchar *pixmap_file,
                                                         const gchar *label,
                                                         gpointer link);
GtkIconListItem *   gtk_icon_list_get_nth               (GtkIconList *iconlist,
                                                         guint n);
gint                gtk_icon_list_get_index             (GtkIconList *iconlist,
                                                         GtkIconListItem *item);
void                gtk_icon_list_remove                (GtkIconList *iconlist,
                                                         GtkIconListItem *item);
void                gtk_icon_list_set_active_icon       (GtkIconList *iconlist,
                                                         GtkIconListItem *icon);
void                gtk_icon_list_remove_nth            (GtkIconList *iconlist,
                                                         guint n);
void                gtk_icon_list_update                (GtkIconList *iconlist);
void                gtk_icon_list_clear                 (GtkIconList *iconlist);
void                gtk_icon_list_link                  (GtkIconListItem *item,
                                                         gpointer data);
gpointer            gtk_icon_list_get_link              (GtkIconListItem *item);
GtkIconListItem *   gtk_icon_list_get_icon_from_link    (GtkIconList *iconlist,
                                                         gpointer data);
GtkIconListItem *   gtk_icon_list_get_icon_at           (GtkIconList *iconlist,
                                                         gint x,
                                                         gint y);
GtkIconListItem *   gtk_icon_list_get_active_icon       (GtkIconList *iconlist);
GtkWidget *         gtk_icon_list_get_entry             (GtkIconListItem *item);
GtkWidget *         gtk_icon_list_get_pixmap            (GtkIconListItem *item);
void                gtk_icon_list_set_pixmap            (GtkIconListItem *item,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *bitmap_mask);
void                gtk_icon_list_set_label             (GtkIconList *iconlist,
                                                         GtkIconListItem *item,
                                                         const gchar *label);
void                gtk_icon_list_set_selection_mode    (GtkIconList *iconlist,
                                                         gint mode);
void                gtk_icon_list_select_icon           (GtkIconList *iconlist,
                                                         GtkIconListItem *item);
void                gtk_icon_list_unselect_icon         (GtkIconList *iconlist,
                                                         GtkIconListItem *item);
void                gtk_icon_list_unselect_all          (GtkIconList *iconlist);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkFixed
                                 +----GtkIconList
                                       +----GtkFileList

Implemented Interfaces

GtkIconList implements AtkImplementorIface and GtkBuildable.

Signals

  "activate-icon"                                  : Run Last
  "click-event"                                    : Run Last
  "deactivate-icon"                                : Run Last
  "select-icon"                                    : Run Last
  "text-changed"                                   : Run Last
  "unselect-icon"                                  : Run First

Description

GtkIconList is a GtkFixed subclass that allows you to display a table of xpm icons with editable labels. It's completely designed from scratch with some ideas borrowed from gnome-icon-list. It contains almost all of its features and more. It can be used for file browsers and as a replacement of gnome-icon-list (without the need of using gnome libraries). Like GtkSheet, it uses the widget GtkItemEntry to edit the text fields.

Details

GtkIconList

typedef struct _GtkIconList GtkIconList;

The GtkIconList structure contains only private data. It should only be accessed through the functions described below.


enum GtkIconListMode

typedef enum
{
  GTK_ICON_LIST_ICON,
  GTK_ICON_LIST_TEXT_RIGHT,
  GTK_ICON_LIST_TEXT_BELOW,
} GtkIconListMode;


GtkIconListItem

typedef struct {
} GtkIconListItem;

The GtkIconListItem structure contains only private data. It should only be accessed through the functions described below.


gtk_icon_list_new ()

GtkWidget*          gtk_icon_list_new                   (guint icon_width,
                                                         GtkIconListMode mode);

Creates a new GtkIconList widget.

icon_width :

the width of the icon

mode :

GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW

Returns :

the newly-created GtkIconList widget.

gtk_icon_list_construct ()

void                gtk_icon_list_construct             (GtkIconList *iconlist,
                                                         guint icon_width,
                                                         GtkIconListMode mode);

Initialize iconlist structure.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

icon_width :

the width of the icon

mode :

GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW

gtk_icon_list_set_mode ()

void                gtk_icon_list_set_mode              (GtkIconList *iconlist,
                                                         GtkIconListMode mode);

Set the icons display mode .

iconlist :

GtkIconList widget created with gtk_icon_list_new().

mode :

GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW

gtk_icon_list_get_mode ()

GtkIconListMode     gtk_icon_list_get_mode              (GtkIconList *iconlist);

Get the icons display mode .

iconlist :

a GtkIconList widget created with gtk_icon_list_new().

Returns :

GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW

gtk_icon_list_set_editable ()

void                gtk_icon_list_set_editable          (GtkIconList *iconlist,
                                                         gboolean editable);

Set if the user can edit the text in the editable widget or not.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

editable :

TUE or FALSE

gtk_icon_list_is_editable ()

gboolean            gtk_icon_list_is_editable           (GtkIconList *iconlist);

Get the editable status of icon list.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Returns :

TRUE or FALSE

gtk_icon_list_set_row_spacing ()

void                gtk_icon_list_set_row_spacing       (GtkIconList *iconlist,
                                                         guint spacing);

Set the icon spacing between rows.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

spacing :

spacing between rows in pixels.

gtk_icon_list_get_row_spacing ()

guint               gtk_icon_list_get_row_spacing       (GtkIconList *iconlist);

Get the spacing between rows.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Returns :

spacing between rows in pixels.

gtk_icon_list_set_col_spacing ()

void                gtk_icon_list_set_col_spacing       (GtkIconList *iconlist,
                                                         guint spacing);

Set the icon spacing between columns.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

spacing :

spacing between columns in pixels.

gtk_icon_list_get_col_spacing ()

guint               gtk_icon_list_get_col_spacing       (GtkIconList *iconlist);

Get the spacing between columns.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Returns :

spacing between columns in pixels.

gtk_icon_list_set_text_space ()

void                gtk_icon_list_set_text_space        (GtkIconList *iconlist,
                                                         guint text_space);

Set the text max size in pixels.

iconlist :

a GtkIconList widget created with gtk_icon_list_new().

text_space :

distance in pixels.

gtk_icon_list_get_text_space ()

guint               gtk_icon_list_get_text_space        (GtkIconList *iconlist);

Get the text maximum size in pixels.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Returns :

text maximum size distance in pixels.

gtk_icon_list_set_icon_border ()

void                gtk_icon_list_set_icon_border       (GtkIconList *iconlist,
                                                         guint border);

Set the icon border.

iconlist :

a GtkIconList widget created with gtk_icon_list_new().

border :

icon border in pixels.

gtk_icon_list_get_icon_border ()

guint               gtk_icon_list_get_icon_border       (GtkIconList *iconlist);

Get the icon border width.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Returns :

icon border width in pixels.

gtk_icon_list_set_icon_width ()

void                gtk_icon_list_set_icon_width        (GtkIconList *iconlist,
                                                         guint width);

Set the icon width.

iconlist :

a GtkIconList widget created with gtk_icon_list_new().

width :

icon width in pixels.

gtk_icon_list_get_icon_width ()

guint               gtk_icon_list_get_icon_width        (GtkIconList *iconlist);

Get the icon width.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Returns :

icon width in pixels.

gtk_icon_list_freeze ()

void                gtk_icon_list_freeze                (GtkIconList *iconlist);

Freeze icon list.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

gtk_icon_list_thaw ()

void                gtk_icon_list_thaw                  (GtkIconList *iconlist);

Thaw(unfreeze) icon list.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

gtk_icon_list_set_background ()

void                gtk_icon_list_set_background        (GtkIconList *iconlist,
                                                         GdkColor *color);

Set the iconlist background color.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

color :

a GdkColor

gtk_icon_list_add_from_pixmap ()

GtkIconListItem *   gtk_icon_list_add_from_pixmap       (GtkIconList *icon_list,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *bitmap_mask,
                                                         const gchar *label,
                                                         gpointer link);

Add a icon to the icon list.

icon_list :

a GtkIconList widget created with gtk_icon_list_new().

pixmap :

a GdkPixmap

bitmap_mask :

a GdkBitmap

label :

label of the icon

link :

a gpointer link to some data

Returns :

the icon pointer

gtk_icon_list_add_from_data ()

GtkIconListItem *   gtk_icon_list_add_from_data         (GtkIconList *iconlist,
                                                         gchar **data,
                                                         const gchar *label,
                                                         gpointer link);

Add a icon to the icon list.

iconlist :

a GtkIconList widget created with gtk_icon_list_new().

data :

pointer to the xpm data string

label :

label of the icon

link :

a data pointer

Returns :

the icon pointer

gtk_icon_list_add ()

GtkIconListItem *   gtk_icon_list_add                   (GtkIconList *iconlist,
                                                         const gchar *pixmap_file,
                                                         const gchar *label,
                                                         gpointer link);

Add a icon to the icon list.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

pixmap_file :

from #include "file.xpm"

label :

label of the icon

link :

link

Returns :

the icon pointer

gtk_icon_list_get_nth ()

GtkIconListItem *   gtk_icon_list_get_nth               (GtkIconList *iconlist,
                                                         guint n);

Get nth icon from the icon list.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

n :

icon index number.

Returns :

a GtkIconListItem

gtk_icon_list_get_index ()

gint                gtk_icon_list_get_index             (GtkIconList *iconlist,
                                                         GtkIconListItem *item);

Get the index number of the icon specified by its GtkIconListItem pointer.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

item :

a GtkIconListItem

Returns :

icon index number

gtk_icon_list_remove ()

void                gtk_icon_list_remove                (GtkIconList *iconlist,
                                                         GtkIconListItem *item);

Remove the icon from the iconlist.

iconlist :

a GtkIconList widget created with gtk_icon_list_new().

item :

a GtkIconListItem

gtk_icon_list_set_active_icon ()

void                gtk_icon_list_set_active_icon       (GtkIconList *iconlist,
                                                         GtkIconListItem *icon);

Set an active icon in the icon list.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

icon :

a GtkIconListItem

gtk_icon_list_remove_nth ()

void                gtk_icon_list_remove_nth            (GtkIconList *iconlist,
                                                         guint n);

Remove nth icon from the iconlist.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

n :

icon index number

gtk_icon_list_update ()

void                gtk_icon_list_update                (GtkIconList *iconlist);

Update the icon list widget..

iconlist :

GtkIconList widget created with gtk_icon_list_new().

gtk_icon_list_clear ()

void                gtk_icon_list_clear                 (GtkIconList *iconlist);

Clear the icon list widget.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

gtk_icon_list_link ()

void                gtk_icon_list_link                  (GtkIconListItem *item,
                                                         gpointer data);

Add a gpointer link to a icon from the iconlist.

item :

GtkIconListItem

data :

a gpointer to some data

gtk_icon_list_get_link ()

gpointer            gtk_icon_list_get_link              (GtkIconListItem *item);

Add a gpointer link to a icon from the iconlist.

item :

a GtkIconListItem

Returns :

(transfer none) a gpointer to some data sed with gtk_icon_list_link().

gtk_icon_list_get_icon_from_link ()

GtkIconListItem *   gtk_icon_list_get_icon_from_link    (GtkIconList *iconlist,
                                                         gpointer data);

Gets the icon pointer from the link attached to it.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

data :

a gpointer to some data

Returns :

a GtkIconListItem

gtk_icon_list_get_icon_at ()

GtkIconListItem *   gtk_icon_list_get_icon_at           (GtkIconList *iconlist,
                                                         gint x,
                                                         gint y);

Get the icon situated at x,y coordinates in icon list.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

x :

x coordindate

y :

y coordinate

Returns :

the icon pointer

gtk_icon_list_get_active_icon ()

GtkIconListItem *   gtk_icon_list_get_active_icon       (GtkIconList *iconlist);

Set the iconlist background color.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Returns :

the icon pointer

gtk_icon_list_get_entry ()

GtkWidget *         gtk_icon_list_get_entry             (GtkIconListItem *item);

Get the item->entry.

item :

a GtkIconListItem

Returns :

(transfer none) a GtkWidget

gtk_icon_list_get_pixmap ()

GtkWidget *         gtk_icon_list_get_pixmap            (GtkIconListItem *item);

Get the icon pixmap.

item :

a GtkIconListItem

Returns :

(transfer none) a GtkWidget

gtk_icon_list_set_pixmap ()

void                gtk_icon_list_set_pixmap            (GtkIconListItem *item,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *bitmap_mask);

Set the icon pixmap.

item :

a GtkIconListItem

pixmap :

a GdkPixmap

bitmap_mask :

a GdkBitmap

gtk_icon_list_set_label ()

void                gtk_icon_list_set_label             (GtkIconList *iconlist,
                                                         GtkIconListItem *item,
                                                         const gchar *label);

Set the icon label.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

item :

a GtkIconListItem

label :

icon label

gtk_icon_list_set_selection_mode ()

void                gtk_icon_list_set_selection_mode    (GtkIconList *iconlist,
                                                         gint mode);

Set the icon selection mode.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

mode :

GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW

gtk_icon_list_select_icon ()

void                gtk_icon_list_select_icon           (GtkIconList *iconlist,
                                                         GtkIconListItem *item);

Select the icon specified by pointer.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

item :

a GtkIconListItem

gtk_icon_list_unselect_icon ()

void                gtk_icon_list_unselect_icon         (GtkIconList *iconlist,
                                                         GtkIconListItem *item);

Unselect the icon specified by pointer.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

item :

a GtkIconListItem

gtk_icon_list_unselect_all ()

void                gtk_icon_list_unselect_all          (GtkIconList *iconlist);

Unselect all icons.

iconlist :

GtkIconList widget created with gtk_icon_list_new().

Signal Details

The "activate-icon" signal

gboolean            user_function                      (GtkIconList     *iconlist,
                                                        GtkIconListItem *arg1,
                                                        gpointer         user_data)      : Run Last

iconlist :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

Returns :


The "click-event" signal

void                user_function                      (GtkIconList *iconlist,
                                                        GdkEvent    *event,
                                                        gpointer     user_data)      : Run Last

iconlist :

the object which received the signal.

event :

user_data :

user data set when the signal handler was connected.

The "deactivate-icon" signal

gboolean            user_function                      (GtkIconList     *iconlist,
                                                        GtkIconListItem *arg1,
                                                        gpointer         user_data)      : Run Last

iconlist :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

Returns :


The "select-icon" signal

gboolean            user_function                      (GtkIconList     *iconlist,
                                                        GtkIconListItem *arg1,
                                                        GdkEvent        *event,
                                                        gpointer         user_data)      : Run Last

iconlist :

the object which received the signal.

arg1 :

event :

user_data :

user data set when the signal handler was connected.

Returns :


The "text-changed" signal

gboolean            user_function                      (GtkIconList     *iconlist,
                                                        GtkIconListItem *arg1,
                                                        gchar           *arg2,
                                                        gpointer         user_data)      : Run Last

iconlist :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

Returns :


The "unselect-icon" signal

void                user_function                      (GtkIconList     *iconlist,
                                                        GtkIconListItem *arg1,
                                                        GdkEvent        *event,
                                                        gpointer         user_data)      : Run First

iconlist :

the object which received the signal.

arg1 :

event :

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/GtkPlotPolar.html0000644000076400001440000003541612604172532017403 00000000000000 GtkPlotPolar

GtkPlotPolar

GtkPlotPolar

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkMisc
                           +----GtkPlot
                                 +----GtkPlotPolar

Implemented Interfaces

GtkPlotPolar implements AtkImplementorIface and GtkBuildable.

Properties

  "rotation"                 gdouble               : Read / Write

Description

FIXME:: Need long description.

Details

GtkPlotPolar

typedef struct _GtkPlotPolar GtkPlotPolar;

The GtkPlotPolar struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_polar_new ()

GtkWidget*          gtk_plot_polar_new                  (GdkDrawable *drawable);

drawable :

Returns :


gtk_plot_polar_new_with_size ()

GtkWidget*          gtk_plot_polar_new_with_size        (GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);

drawable :

width :

height :

Returns :


gtk_plot_polar_construct ()

void                gtk_plot_polar_construct            (GtkPlotPolar *plot,
                                                         GdkDrawable *drawable);

plot :

a GtkPlotPolar widget.

drawable :


gtk_plot_polar_construct_with_size ()

void                gtk_plot_polar_construct_with_size  (GtkPlotPolar *plot,
                                                         GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);

plot :

a GtkPlotPolar widget.

drawable :

width :

height :


gtk_plot_polar_rotate ()

void                gtk_plot_polar_rotate               (GtkPlotPolar *plot,
                                                         gdouble angle);

plot :

a GtkPlotPolar widget.

angle :


gtk_plot_polar_get_angle ()

gdouble             gtk_plot_polar_get_angle            (GtkPlotPolar *plot);

plot :

a GtkPlotPolar widget.

Returns :

Property Details

The "rotation" property

  "rotation"                 gdouble               : Read / Write

Default value: 0

gtkextra-3.2.0/docs/reference/html/gtkextra-GtkPlotPrint.html0000644000076400001440000004261412604172532021247 00000000000000 GtkPlotPrint

GtkPlotPrint

GtkPlotPrint

Synopsis


#include <gtkextra.h>

gboolean            gtk_plot_export_ps                  (GtkPlot *plot,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotPageSize page_size);
gboolean            gtk_plot_export_ps_with_size        (GtkPlot *plot,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotUnits units,
                                                         gint width,
                                                         gint height);
gboolean            gtk_plot_canvas_export_ps           (GtkPlotCanvas *canvas,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotPageSize page_size);
gboolean            gtk_plot_canvas_export_ps_with_size (GtkPlotCanvas *canvas,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotUnits units,
                                                         gint width,
                                                         gint height);
gboolean            gtk_plot_canvas_export_cairo        (GtkPlotCanvas *canvas,
                                                         cairo_t *cairo);

Description

FIXME:: Need long description.

Details

gtk_plot_export_ps ()

gboolean            gtk_plot_export_ps                  (GtkPlot *plot,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotPageSize page_size);

plot :

a GtkPlot

file_name :

orient :

epsflag :

page_size :

Returns :


gtk_plot_export_ps_with_size ()

gboolean            gtk_plot_export_ps_with_size        (GtkPlot *plot,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotUnits units,
                                                         gint width,
                                                         gint height);

plot :

a GtkPlot

file_name :

orient :

epsflag :

units :

width :

height :

Returns :


gtk_plot_canvas_export_ps ()

gboolean            gtk_plot_canvas_export_ps           (GtkPlotCanvas *canvas,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotPageSize page_size);

canvas :

a GtkPlotCanvas .

file_name :

orient :

epsflag :

page_size :

Returns :


gtk_plot_canvas_export_ps_with_size ()

gboolean            gtk_plot_canvas_export_ps_with_size (GtkPlotCanvas *canvas,
                                                         char *file_name,
                                                         GtkPlotPageOrientation orient,
                                                         gboolean epsflag,
                                                         GtkPlotUnits units,
                                                         gint width,
                                                         gint height);

canvas :

a GtkPlotCanvas .

file_name :

orient :

epsflag :

units :

width :

height :

Returns :


gtk_plot_canvas_export_cairo ()

gboolean            gtk_plot_canvas_export_cairo        (GtkPlotCanvas *canvas,
                                                         cairo_t *cairo);

canvas :

a GtkPlotCanvas .

cairo :

Returns :

gtkextra-3.2.0/docs/reference/html/gtkcolorcombo.jpg0000644000076400001440000003461212604172532017476 00000000000000JFIFHHCreated with The GIMPC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222 "V 1!A"46DUau2QRSTVq#$357CWdsBctbfgr/ 1AQ!S"2Baqё# ?Z-}EܿVSğDoעm҃_=qϦrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]dT@Lp v~<՚jeL?,-ߺC7k\Dwۦ~^b+휳sz{<&+kh&PHΡCKe CI-~@[Z[YdNT+L;1RJQQNM~<Ϙ(:ɐ[wלP5qn=t8T.+f-uqUtO,NDL6Dt[*ӗcOES c`ߓd)ɯgb"^>>>;νdox"4*@]DuLsQnɺJ6n U>QL J@l`&♟1P5qn=z=?rϏϿ*U[l3" (C@X"!G)Dda X9dsm/Iԍ2n ١^PݧS_<Ϙ{g^2snzF";m?gWtTٚxg-&æ$: RE.iQDQBQ`.P8( f|Qb+휳sz8&@{nm/N1f HM-NC1ɔSG/v@,0A(Muzg"dla( 05LA b^@&♟1F";m?gGgYuͫF&y1;νd7k\Dwۦ~]wjѵyɯgg#W9gqG׶Lۼ^jӓ_LϘE #Z音֐% r5GeA +uy39{V礁6~I;tӓ_<ϘŮ(:ɐ[wלP5qn=uݫF&♟1{_/l[g^2snzWNM~3>c97k\Dwۦ~^b+휳szWNM~>c9w{dͻ(oָL+]F\s|seܓNM~3>c9"^>>>;νdԭ:#p~nِ͞6I7$ιr30Yy2&Ͱ#»nţ}yɛ.S_LϘ>(oָLW9g|p)0|V9NՓ - t ^B80 @BjjD$L[6LLALӸs95Qu =6؛R O-\@/ 1ܬ-GHt2rb6a LN@M{0X͡KdS s "pjr+JLob.^l\2ۂf)DPP9G+xv1U&mĶ yȉ@.QPܣ;8h)Uߋ,p]e֣ҕ$!l8@ s,!)V]܋IEpRtTrDK4@k }:s8*K Ҧ`Wcţ,Z0_M *%reDnXd d*IB|լ+Qt&b?&(e9d7<!:Ə/N-iEupMS*<"##9#>-ye?>#YFUpW+.:)`@ ˦ Q0MZrSP| sPq;m;'a)Ϸ|Z8}IK9PEDJ!Js>yL몗8qvԎ1;>ud%u&22yţ,@lNQo]ET*˷L*@p!@ /( sAH,S"*p1Q)8D b{JaFwkMEU5[xjH gٽ"*sHDNSF^@ iѴꗋGYO:-ye?>iѴ~KEx 2O۪ u1nk}EXU2m̙J' `@9>z6=Rh)Tx[ [.ݽ#Yt(ܝB@;ƀ|(o{ƯE}J*bZ̸Sv(*| 7|m>z[Ѹl_FҮmF{E}J(n=*묠&|m>z[Ѹl_FҮmZJ͕9rr CH0 !h/qW]eؾǥ]uhY8(gO]E˫SB*j&H!JXf<5-QutȲbQ2J r(!B<-zUYGh/qW]eK;1c>QNqO*)!2Vͱ[Kc7j\2Py7!y9 \(sj[Ѹl_FҮAk`e6Nf!HsB%Mϐ0ADk# K\n6gkeΦСf 0 n=*묣[ѸdפKfc5jv3\T w=dQHSSXa @"#y[b5uo>)^gEzh߉W @)) ܀@@W !!@t]z[ u+U;\p+vΔ0 iA # nq5X}Z( (((( (((G0m&g6O~1c|yѳ^sy;*G(ٱPh&Bm)Jrr@wrDѯgϊpǙhv?J]ZÉ^̢Iݓ0đ%zˉ/]{a/˛7Es+"}rl1*Qml(p&P$;#CoGGP$YG pp+u;$tzE}ȝ:=YJf7EG9tvGEw`@tr1OI)H DfDu6li}LIm>K~w}ZWnv艦s@2L皵W\YC!"4DPnĄ1'>\yLc~NH _Fw'dCoGGP˭- AQv:>NXoG>/mo"vH܇QPQla$'[f*@c &HF$Gx5X}Z}ȝ:=l֛p&4X: [1#;(E"qsqoG0-PtR'w?y^ޏ5E"qsqoG0-PtR'w?y^ޏ5E"qsqoG0-PtR]\N CߓygE2b'W<#δh *q?{֝m#δh *q?{֝m#δh((%q!wjnn4eϑۃDcп_]3ys_(Ӆgk[cmٲg0cL&'tRx"pjmq.|D0gXMklg. kdj+wte7nnL`A29rq9_ +b&ܕn!T7\.zZei˟!D011)3+]&~Ѯ}<܉ghfG$]-]E ID&3LHS+KWclB`bc|R]L$ޒ|g. kdjrr[e9^[ƺ^[@M63 1B}[? ,mK^KDžROi7*>x"pjmq.|D>3_wto~FF?\kC-vk1ٷZ49IKr`R yEs(O6\ &\UkWt?q\#Un<H7m*+זּuYn܎sQR pVQ?V{JQ{vHj۷((9wh :eBuKw-ѵZPu6AP&l&d \^-NLb^.Jt˃҄Z탫6vwfV]S=®`.Cu"܈t!%3M–]-G1G6m%Ha")br Hr k9PMIv~^{촠QYocvPQs\gA 3%N{yyWIeqrjk]i˟#HvHU[ҜcԽXݾZތl݂"oǫMƞ×>Cu&7u+ͻW fFsdQ,Ą6k\.X&]9ILiHWFx"pjmq.|D[iOŦs)mѦf]2tN`%d8'Tbrm![zPEyۍ#""[\NsQB@qI5~şypl(S.l%I^ݾ2yEs(O6\ &T!:QOLvmkZcۉ^4U{S\ o1Dj"剁ͻW fFsdQ,Ą]6,7UebTUrs+b(T@$)q祫QƞlM⯏*eИxw-2x IBrL|DLDWOHMH۲C3Ak dpr\ a.IH&3LHTOi[ͻW fFsdQ,Ą^cyrj|E0n<b\v68͗>B`bc|Rl؃vΔS+}Lθ o j12)9E1*aX@$J04ypl(S.l%KŷmYX\Js0(0& bx"pjmq.|DIt-T%t9/g^[&\GN4 11_$n١KaܤPfɜY0 ]N˅' UWw خ]-2ɜY 4Ņ N7]OX=-]4eϐh.?Q\zՏ|<螹? {E7 _w)8bSĊ&6\-[cee͓9Di9w"^}{n3tܠFrj@0` L=&~Kܶ8"KE1u)$Q lbP] kpxD9',NGO;(N;l2P =\'_Gh uh :eBuo~ɱD)H2j3 yumP']YBz嘹\9]B(he@M_WcAvU $Q3&)! !Z˥'_ܘEX>r^#vj r*hA9GǟIBLKL:vvT=' R6Pʊr' <+ 7j.e&1r 3 d$URVzD0j[oۦ_bSV"{Úk+pݰ=* "k}A,f9&'w%#q$*]=mtnS֎eՏﯩ0V?I5įѮ}qk}݋+W)8OhAכw خ]-2ɜY 5j`3d":k_kNXIVݩ߼miel.l.Qpb%n9 m5 V 2+c8gRTǝRom5.1Ѯ}6\-[cee͓9DjAgESķ#C.m,$ޒLg. kdj68UzbdRr+qciU°H`in{٫6Q\3K1!1;n3c?q\#UQu[mW&E'(1R6P +@&6\-[cee͓9Dhd¦T/'i|/zI-t"N]ԶX?6!*N4\fʠv#LqѮ}WX۸^pjmo6LHLN餾/.xtaطFw'&Ygǭg M~FF;\JZ4HKy&PF',L 8m/b[5t7˛&rf$&'t2lKcW*£?}}$>o_cч԰khC\CMBEaZr-d))-0;BS.RP+-5~_ݏM_Wc8QٮڲNSs>vp<9LZM_WcWU*$^Ed (x#ݮzZzV>7ִYvTvɪS#)7KI 1!OX=-]4eϐhmli] =b[+`/&O*5S?;kVɈ6,7U* E1u*` QD`LWBL}*򸾹mMiye!\yEs(O6\ &J^o3}sIu3'O}Yvc[ Xّ%Nc(bB7\.zZei˟!D011+9-L:|~FFWNܧ)Rv| PꛆsddDVrs;b(R !0&{zI^{2Zm.q=2܊Zm.YЯ7\.zZei˟!D011*oFY?q\#UzzUpwТs|0{gPns#r9]UJP( bCu[n<b\v68͗>B`bc|Uf(TL=* =_Oȝ9OEtP~ygPns#r9]EJP( bCu\U>%ZL=*[-syEs(O6\ &T=!:QOg. kdjv;XtB..1>+U* E1u*` QD`LyEs(O6\ &J2zJѮ}5ƹe1j1)qsӤԍ%>U4M7Rn'%c4ą&H~zI'Zz׷oNЮzw[1dQEc$(((96kfS.lݸ,ĄO6nF\v77Wy`bc|UWnW PElʨM.%s #2/ɭzS.n\:Vl'B19b`in{٫6Q\3K1!1;pԮlȊQncq1]E @D&yEs(O6\ &V#.ɺ,ܵA 峢NV$*VPa( bo"zUOBG{q[27#TE$7W;<-=̷ދͻW fFsdQ,ĄT&Fǂ,W GyQ4L Lo^Gt ] :x~$oB_&S3:HE1)V,L 5m/b[5t7˛&rf$&'tc Z-Pns!rP.L (1!7\.zZei˟!D011+&Vӎy&F_痭~7U53#\یCMBV,L n#%TzLOzjvwf`Trs+b(T@$+U슭Njk_c^FjP~}ypl(S.l%U(͟x"pjmq.|D1(~Nȶgο4olwOo7MTm!ͤT {ͻW fFsdQ,Ą]6,7U* E1u*` QD`LyEs(O6\ &Q:-·ܱqo%go-Z:)OW_l鼼[7(89Q6P +D~DtQom 򠫔[܎sQB@1!:Km[/o6\-[cee͓9DjCgE}yEs(O6\ &H|gܾ4#u5|j,%7GBj,>U:02 9E1*aX@$J04ypl(S.l%I {&=Y6X[)7c uRL A1bB7\.zZei˟!D011* jVcD^,xZtiꑷcW?f&Nm3"剁8^}CG2fI2rqPLiHVЮzw6^uӽj +!EPQ@QEn,MZ5ML۸_ݭ[c}Lgvj痭~WCw"qԤye)Ӷ3z5ϲ5QNᩜٝ\Nbj"ĉb`in{٫6Q\3K1!1;Ǜt.Jk&OxVS*%MfA1*a\$fՓ]KQo6,ˮPix71Ѯ}6\-[cee͓9DkSCyb*MuVGr ~-뮿FofX*ahx\A> N _]؎PprmP6P +D6\-[cee͓9Dkk݃*߷%"٩Khz3zJxnJ|E`:;r2 9E1*aX@$J05ʲ+Ii4g +c5'ٖ8\A>WL7w خ]-2ɜY 5A 峢6D)Gg ~o]uвzJ1Ѯ}NV$*VPa(+WKll}Lg(bBbwMS25(6iUwW&W~&cIVb?-ں)OWfnWwyI. Tm!T "P [eW(4Y2 =vͻW fFsdQ,ĄCFV/3׾._֟I3^~FFVޢM o1Dg)EQNw خ]-2ɜY 52ɹNd'8ݟ+7{bS>!VĮYCuF&"`kkjl ۷zHkSeW^ݽ;֭ (QEQP%zoF̟Wu?5̟Wtl%zoO=BD-d6+ܬncnA)&(圡?_-LrҞ+i%kپ.‚Zy0[2 C0(( bCulUmm6I둲% F(@Af9/ޒaiU;/$~u{U1{E2ksJ#يB`bc|V:>WS =du];J(ic9A̅C0(PĆܼx"pjmq.|Dq~5QsS\f b_"zUO7B,Q dnG9S8 Hn:_I%ZPɱ&rk˲SIe+KWclB`bc|Tx>5sQ5J7vlaKը$ P53\9˪8 Hn[^ '+#UC_ڛ/Bޑ )E\rafO+:ַ\^QP%zoF̟Wurj*?MٓJΟ{QE(8+:mw[{yH8A#!SLg ~&[] T]Sec=ažKkc{ K{7nPprHciU$g`I'c&&d.DS ڢ\y|37wHv:gLDDs?[;jU47w خ]-2ɜY 5/򽏢U|37wžKk++hiȢ-*si*E¹$H0;rn{٫6Q\3K1!1; Mǥqo~ڕlD4TpN%էl=|z-n3tܠFrj@0` L Mǥqo~ƹI# ƭ=cypl(S.l%Z;&)͟U Mǥ27Z̮ImqԑZ^-nG(89QCIR"@ Vw خ]-2ɜY 5gn=.ﭣ|37w;LkQZKؓvS*5pٛdriciU¸H`wgn=.ﭣ|37wվo6\-[cee͓9Dk[&+ŗU Mǥqo~ڪ.V GtkBorderCombo

GtkBorderCombo

GtkBorderCombo — A border combo widget

Synopsis


#include <gtkextra.h>

                    GtkBorderCombo;
GtkWidget *         gtk_border_combo_new                (void);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----GtkComboButton
                                             +----GtkBorderCombo

Implemented Interfaces

GtkBorderCombo implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Signals

  "changed"                                        : Run First

Description

It is a GtkComboBox subclass with a variety of border styles in the popdown window arranged in a table of togglebuttons.

Details

GtkBorderCombo

typedef struct _GtkBorderCombo GtkBorderCombo;

The GtkBorderCombo struct contains only private data. It should only be accessed through the functions described below.


gtk_border_combo_new ()

GtkWidget *         gtk_border_combo_new                (void);

Returns :

Signal Details

The "changed" signal

void                user_function                      (GtkBorderCombo *border_combo,
                                                        gint            selection,
                                                        gpointer        user_data)         : Run First

Emmited when the GtkBorderCombo's state is changed

border_combo :

the GtkBorderCombo object that received the signal

selection :

the number of selected item

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/gtkextrabase.html0000644000076400001440000002241112604172532017474 00000000000000 Part II. GtkExtra Widgets and Objects

Part II. GtkExtra Widgets and Objects

Table of Contents

Object Hierarchy
Widget Gallery
Widgets
GtkBorderCombo — A border combo widget
GtkCharSelection — Character selection dialog
GtkCheckItem — Check item widget for Gtk
GtkColorCombo — A color combo widget for GTK.
GtkComboButton — A combo button widget for GTK
GtkDataEntry — a data entry widget, based on GtkEntry
GtkDataTextView — a data textview widget, based on GtkTextView
GtkDirTree — A directory tree widget for GTK.
GtkFileList — A file list widget fot GTK
GtkFontCombo — A font combo widget for GTK.
GtkIconFileSel — A file selection dialog widget for GTK.
GtkIconList — A file icon list widget for GTK.
GtkItemEntry — An item entry widget.
GtkPlot — 2d scientific plots widget
GtkPlot3D — 3d scientific plots widget
GtkPlotArray
GtkPlotBar — 3d scientific plots widget for GTK.
GtkPlotBox
GtkPlotBubble
GtkPlotCairo — Cairo drawing backend.
GtkPlotCandle
GtkPlotCSurface
GtkPlotCanvas
GtkPlotCanvasEllipse
GtkPlotCanvasLine
GtkPlotCanvasRectangle
GtkPlotCanvasPixmap
GtkPlotCanvasText
GtkPlotCanvasPlot
GtkPlotData
GtkPlotDT
GtkPlotDTriangle
GtkPlotFlux
GtkPlotGdk — GDK drawing backend (mapped to Cairo)
GtkPlotPC — Plot Context
GtkPlotPixmap — Pixmap plots widget.
GtkPlotPolar
GtkPlotPrint
GtkPlotPS — postscript driver
GtkPlotSegment
GtkPlotSurface
GtkPSFont — PostScript Fonts handling.
GtkSheet — A spreadsheet widget for Gtk+
GtkSheetColumn — A spreadsheet column widget for GtkSheet
GtkToggleCombo — A toggle combo widget for GTK.
Data Formatter
GtkDataFormat — a data formatting library
GtkExtra Versioning
GtkExtra Versioning
gtkextra-3.2.0/docs/reference/html/left.png0000644000076400001440000000071312604172532015563 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1&[(XIDATx!OPE*ID%~ꊯ"p'ŏ`sܖrKf hmiIz}ܯI.p\`x l?l[,Hk<#c%\AUx[S7n6rzEs1j@NL$ݤi0 5/}\EKIo͓$a0jdFbkIAh>WlC'?tk;|/t*INZ^`y4Nr]׮ J<ڐt`X1@p䀸dZ')hK $V?%]+LsgUK"w53OIENDB`gtkextra-3.2.0/docs/reference/html/gtkcharsel.jpg0000644000076400001440000002264712604172532016766 00000000000000PNG  IHDR@@< IDATx߫G]E]XN&zJ 8-]LEz('AtUtowojh 9%qp1 IHRwavܴ[{!cI#H> cth>F|f~~sTŃi_LO>i`ywfXwv_Ic_y/} &` &o9jg^BիW/\wׯzFQONÁ(>8gysL0L07{w}W_y䤜Ot<8õwoE-EP޽lv5m36pI,X{w[f~7+ \z tDފO6lmE~M,R@*ծ?τp{u؛WF=\(KGaUNYW,l|5gwиF` &`Nxjj?=Sιz'>k OWze٫Z~eYS-3>[ܣEn|•{>_@B# 0L0&*P:s#oʉwS]_kcWrK/ԱsF{3ԥaUXݻՎ[@0Jo _׿.'?T e^z+ߕNΟBfY9HˮݮkJNK\E_y{؅(?4P@UbRX̩Cneٍ\L0K?p.\x…1<~]ȩ ޫ\Zzv2aueީUa hB&` &XD믿v+P_|+oo޼ wJֱ=p SvC;* ~?Vr˗/_~=p9J*ፕ[Y-<*346%-t{Zau| lƇh[ q;.ov] ΰ;igׯ[+m{5>P+~BF` &`NNNNr;z B # 0L0&S =ٳ>J+~{Q`>\ VKxf@U .}pp}{?]y޽G,"LJ5 4p9^E(,{'|zxcVgvLLIsc 0%˲r'am uF'>a*`G2 %t2q7KØNpO?y~wϩ$wIX@?v={.'[~S]INk_pbjs}&)T^f>uQGR1D g?kk-7޽{ssٳw3x6GR(z\y ƨ#5ܹܰs;$Dv l+o/o,#rc8[9Qq|=[7ay \yvh'k.'~.Ewf0OG)`I_ݹsgp|Tg_b9_jX=`Q;ځ0ީXŻep]{۴>#[o/})*5 uhl|+~5gsهl:Jx7.^c3Bo񆟾xbJ7v̙~x>iTnm\}pMXRJsovݾ}㺧w2Z[gk9wŖ7i|YZ{=p\yfJWua:ۿF퍿\N?C Eu8?:p,<=:Ciq ۠^-v7q[pjhmدkz}(!O'Zn<ɾθ6E-WZNܸqPaJ*m u4p_*\ ܋/oM[^;𷕨a~4pwrrr<]rQy@ 7Ʒa:Us<4p| "?~wOOO1 3jxa6X4}]vf?7uF>qd6`M ˗U@gm2o qxxh*`M Wsi|l @bhCbXVߧPubʕ+׈,6͋׾Y.\k!H(Is . QDEQDe0ȷ^O$ 14pH( \E&;QDEQDE2v+iNQDEQD]FkeEQDEQD-#jGoDEQDEQˈڅ8"("(Q0GQDEQDe4jF"("(FQDEQDEѨ]8"("(Q=pDEQDEQFvOi$ 14pH @bhsf}Uo39/$EQDEQ֢zɜsEQl<ϏZf]Vpl^_V9`ȲlٴSjyy>dnT]ɐkh("("( bH @bhC9eY6w =8USjT%eYT~L$_%d4wI*:Gqzl>x OeEQrb}CcT%y*\]hW2 ٣UU+&:2G#^(\W%ɟA&Yj}n2| {KjnmiO6Kyfp, K'9R'=#ߥHA?+v$~vnzSI#s<ՙJUzBϧ4;M^H+N 9YIt]N}TWb.UfXK3uSKxZP{Q{`wwKx*1&00LuE]81 -xC2$$VbTC¨x ^p16Qg\ACg4ll~vT1!k+J҅1 oAE>U_gj݅̚ەA ɥ~e7pw,L\#Nw蓔g◱ܴ$\bv \܂yG|pQ]^l~CTUk  kOGY&.&g^8SO~ULe٦$j ڈbb/?x4Un3j鍷έB]6%8X@dH. އ8X@h8(8$ 1CFXDEQDEQD{mGGG-Vz}xx8Um{f2O٪y9P3+k"("(|T/$ 14pH @b|全,Eϲ,&!DUωMUX=gpxi1* /2"k,]Ҙi568MPb88gXTާ*l1$ܴbr\|SNTeYV.׸L||1nǦܑ)_.Ua NZWEw7t6[cZLvXd$UU8K<2D}]׈z*-rߙ{B5cւ|%?REOXHi]-Xfgs*;Q[P+.cn,,fV-`xao`xοk,k lGҮ;ũuoƴa+6%UCcܡ>UX֬V'/s}"2zIɳHvjo|/ty ’iJr$j5^ C jо2/j_S _hMmWG . p=mObO0FOU;d{nנAc}dN~e-^'t]eBFa4F*~'288aUadxU#ה fZ FZWhMGɇ߄}j0M|H}zp1ҚTBI488A^vcpkTkL$d=.& vȮwNepT$UiŜeޕ HPDэR]c-!QxՎR h(c<%Gq0*P9fsQ1xj^vuPRۼ=,P @bh3cEQDEQDOl<ϏZf]VpB]lͦeUwG.1kUd RiUr³"blnQ `c&gmfHMkP5Fɋ Kr^#mGG*|(<6WO;ѧhܵ·ejA>F82HJrST˨=;g#ؽ.w4´Ud+!Z-AҸ ʣ$q6oLjLSasP#;>3xRvC#K=qxM?!|޲|}ٍb&C-~wZ.oN3Ud8 8$f5pǪ'("("ny̺ZT򳽛ͦeU<<6PEeͦeU)k~Qf M b))Y{bTs \{ϔp+׼"-=z ]US >iNKƭ&*JSa>㎯YꖜqRH S1-A q LU%5 G }wik7} U{Q5֎;c\ijOiAI=Ui;U͍!p7VZclN֎b$+E;Eo+Qa` UFڮL7p@>O:xN0 &9 ʍwRڒ"QnٛmU?8&|7%j O IiJb_4,ǟ2x9>\v3ueV`e[ZMXըb_FhLNˏ-Ga Jo07ΛZ# LUZc"QMH f.fj|/83{HcbB~jBP/c㞊0%nT68Ƚ>}cc؋8̅@RGlTN%:2wd!ԙT (POU^٨eolT}LE]WBeTXQPdwbm FcN): Ч4%%P8jVFw0-ru5JUÎ~(fڷ(yZ!B17Cް(FzCT%02gQ"Hw0qb"j.m (fڷ(yZr|e1j%jcgLsC,L'*/񧶲@tucammGnFQ%X#jl\ըC/Ӯj7ҵRk|E5DMU9 .f 6;$Q"{QVЩKZыx&LrjKULC 6_Ոbֳ(t4[[,دU16Q<VT=aX`-/ѾZvz^ac.'+˻OTY^ϕ \eK)Z21E&3.+o^3U DM]N_Sr Qtc?h/Nd=U YvTe;&o9vէ{upQ%!0\Fy/(^Z>Jrgo6Nڌ.8jz_$5eK7҆׈`Dc)-ٻŠX`18 8$f5pǪ'("("ߞn+w瘪(cL %Usp$j꙳EQa[{QO L2U.BŸlkx_$nÈiAF"B#ӟB< cد$ 14pr "("(Wm<ϏZf]VpB[ͦeU<~#pW\rJ\ү;fףk4*@bhC8ǫ`]|=8`<=$ 14pHL?fbݻw^x k4p'.dj|f odmt={]]@k 8L'?9w 6`.F;8Lx%hG 9Xh01k &0bmiƜΝ;y'YVnE 9=3oܹs᏾ry}a&^]4p0ܹ>ʝ;wy;wgEd <18'^c4p0NC߿s򗿴pY| e,ϟ?_s;#p psMSFeJx7_Do &>_9w…rb^9l7z.\8xh0ar?۷.x#p.]Kwҥja6έ[.]t- /p֭R}E] [8x] :7o Ꮝ]͛cKصbWEeΖ%B ӜqF#޸qR@)Ieab [n{.Ӡ _ak &#Xh01k &0bmƜBv4pSюG?zbjԧogmtA]o}k*qڵ-.hӳ>l FGC8$ 14pH @bh_b|:ٳJ;; vS龸 14pHL;:: t~0w_%:IENDB`gtkextra-3.2.0/docs/reference/html/GtkPlotPC.html0000644000076400001440000014261012604172532016623 00000000000000 GtkPlotPC

GtkPlotPC

GtkPlotPC — Plot Context

Synopsis


#include <gtkextra.h>

                    GtkPlotPC;
enum                GtkPlotPageSize;
enum                GtkPlotPageOrientation;
enum                GtkPlotUnits;
                    GtkPlotPoint;
GtkObject *         gtk_plot_pc_new                     (void);
gboolean            gtk_plot_pc_init                    (GtkPlotPC *pc);
void                gtk_plot_pc_leave                   (GtkPlotPC *pc);
void                gtk_plot_pc_set_viewport            (GtkPlotPC *pc,
                                                         gdouble w,
                                                         gdouble h);
void                gtk_plot_pc_gsave                   (GtkPlotPC *pc);
void                gtk_plot_pc_grestore                (GtkPlotPC *pc);
void                gtk_plot_pc_clip                    (GtkPlotPC *pc,
                                                         GdkRectangle *area);
void                gtk_plot_pc_clip_mask               (GtkPlotPC *pc,
                                                         gdouble x,
                                                         gdouble y,
                                                         GdkBitmap *mask);
void                gtk_plot_pc_set_color               (GtkPlotPC *pc,
                                                         GdkColor *color);
void                gtk_plot_pc_set_lineattr            (GtkPlotPC *pc,
                                                         gfloat line_width,
                                                         GdkLineStyle line_style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style);
void                gtk_plot_pc_set_dash                (GtkPlotPC *pc,
                                                         gdouble offset_,
                                                         gdouble *values,
                                                         gint num_values);
void                gtk_plot_pc_draw_point              (GtkPlotPC *pc,
                                                         gdouble x,
                                                         gdouble y);
void                gtk_plot_pc_draw_line               (GtkPlotPC *pc,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);
void                gtk_plot_pc_draw_lines              (GtkPlotPC *pc,
                                                         GtkPlotPoint *points,
                                                         gint numpoints);
void                gtk_plot_pc_draw_rectangle          (GtkPlotPC *pc,
                                                         gboolean filled,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot_pc_draw_polygon            (GtkPlotPC *pc,
                                                         gint filled,
                                                         GtkPlotPoint *points,
                                                         gint numpoints);
void                gtk_plot_pc_draw_ellipse            (GtkPlotPC *pc,
                                                         gboolean filled,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot_pc_draw_circle             (GtkPlotPC *pc,
                                                         gint filled,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble size);
void                gtk_plot_pc_set_font                (GtkPlotPC *pc,
                                                         GtkPSFont *psfont,
                                                         gint height);
void                gtk_plot_pc_draw_string             (GtkPlotPC *pc,
                                                         gint x,
                                                         gint y,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         gint border,
                                                         gint border_space,
                                                         gint border_width,
                                                         gint shadow_width,
                                                         const gchar *font,
                                                         gint height,
                                                         GtkJustification just,
                                                         const gchar *text);
void                gtk_plot_pc_draw_pixmap             (GtkPlotPC *pc,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *mask,
                                                         gint xsrc,
                                                         gint ysrc,
                                                         gint xdest,
                                                         gint ydest,
                                                         gint width,
                                                         gint height,
                                                         gdouble scale_x,
                                                         gdouble scale_y);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotPC
                     +----GtkPlotCairo
                     +----GtkPlotGdk
                     +----GtkPlotPS

Description

Base Class for GtkPlotCairo, GtkPlotGdk and GtkPlotPS.

Details

GtkPlotPC

typedef struct _GtkPlotPC GtkPlotPC;


enum GtkPlotPageSize

typedef enum{
     GTK_PLOT_LETTER	,
     GTK_PLOT_LEGAL	,
     GTK_PLOT_A4	,
     GTK_PLOT_EXECUTIVE	,
     GTK_PLOT_CUSTOM	
} GtkPlotPageSize;


enum GtkPlotPageOrientation

typedef enum{
     GTK_PLOT_PORTRAIT	,
     GTK_PLOT_LANDSCAPE	
} GtkPlotPageOrientation;


enum GtkPlotUnits

typedef enum{
     GTK_PLOT_PSPOINTS	,
     GTK_PLOT_MM	,
     GTK_PLOT_CM	,
     GTK_PLOT_INCHES	
} GtkPlotUnits;


GtkPlotPoint

typedef struct {
} GtkPlotPoint;

The GtkPlotPoint struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_pc_new ()

GtkObject *         gtk_plot_pc_new                     (void);

Returns :


gtk_plot_pc_init ()

gboolean            gtk_plot_pc_init                    (GtkPlotPC *pc);

pc :

Returns :


gtk_plot_pc_leave ()

void                gtk_plot_pc_leave                   (GtkPlotPC *pc);

pc :


gtk_plot_pc_set_viewport ()

void                gtk_plot_pc_set_viewport            (GtkPlotPC *pc,
                                                         gdouble w,
                                                         gdouble h);

pc :

w :

h :


gtk_plot_pc_gsave ()

void                gtk_plot_pc_gsave                   (GtkPlotPC *pc);

pc :


gtk_plot_pc_grestore ()

void                gtk_plot_pc_grestore                (GtkPlotPC *pc);

pc :


gtk_plot_pc_clip ()

void                gtk_plot_pc_clip                    (GtkPlotPC *pc,
                                                         GdkRectangle *area);

pc :

area :


gtk_plot_pc_clip_mask ()

void                gtk_plot_pc_clip_mask               (GtkPlotPC *pc,
                                                         gdouble x,
                                                         gdouble y,
                                                         GdkBitmap *mask);

pc :

x :

y :

mask :


gtk_plot_pc_set_color ()

void                gtk_plot_pc_set_color               (GtkPlotPC *pc,
                                                         GdkColor *color);

pc :

color :


gtk_plot_pc_set_lineattr ()

void                gtk_plot_pc_set_lineattr            (GtkPlotPC *pc,
                                                         gfloat line_width,
                                                         GdkLineStyle line_style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style);

pc :

line_width :

line_style :

cap_style :

join_style :


gtk_plot_pc_set_dash ()

void                gtk_plot_pc_set_dash                (GtkPlotPC *pc,
                                                         gdouble offset_,
                                                         gdouble *values,
                                                         gint num_values);

pc :

offset_ :

values :

num_values :


gtk_plot_pc_draw_point ()

void                gtk_plot_pc_draw_point              (GtkPlotPC *pc,
                                                         gdouble x,
                                                         gdouble y);

pc :

x :

y :


gtk_plot_pc_draw_line ()

void                gtk_plot_pc_draw_line               (GtkPlotPC *pc,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);

pc :

x1 :

y1 :

x2 :

y2 :


gtk_plot_pc_draw_lines ()

void                gtk_plot_pc_draw_lines              (GtkPlotPC *pc,
                                                         GtkPlotPoint *points,
                                                         gint numpoints);

pc :

points :

numpoints :


gtk_plot_pc_draw_rectangle ()

void                gtk_plot_pc_draw_rectangle          (GtkPlotPC *pc,
                                                         gboolean filled,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble width,
                                                         gdouble height);

pc :

filled :

x :

y :

width :

height :


gtk_plot_pc_draw_polygon ()

void                gtk_plot_pc_draw_polygon            (GtkPlotPC *pc,
                                                         gint filled,
                                                         GtkPlotPoint *points,
                                                         gint numpoints);

pc :

filled :

points :

numpoints :


gtk_plot_pc_draw_ellipse ()

void                gtk_plot_pc_draw_ellipse            (GtkPlotPC *pc,
                                                         gboolean filled,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble width,
                                                         gdouble height);

pc :

filled :

x :

y :

width :

height :


gtk_plot_pc_draw_circle ()

void                gtk_plot_pc_draw_circle             (GtkPlotPC *pc,
                                                         gint filled,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble size);

pc :

filled :

x :

y :

size :


gtk_plot_pc_set_font ()

void                gtk_plot_pc_set_font                (GtkPlotPC *pc,
                                                         GtkPSFont *psfont,
                                                         gint height);

pc :

psfont :

height :


gtk_plot_pc_draw_string ()

void                gtk_plot_pc_draw_string             (GtkPlotPC *pc,
                                                         gint x,
                                                         gint y,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         gint border,
                                                         gint border_space,
                                                         gint border_width,
                                                         gint shadow_width,
                                                         const gchar *font,
                                                         gint height,
                                                         GtkJustification just,
                                                         const gchar *text);

pc :

x :

y :

angle :

fg :

bg :

transparent :

border :

border_space :

border_width :

shadow_width :

font :

height :

just :

text :


gtk_plot_pc_draw_pixmap ()

void                gtk_plot_pc_draw_pixmap             (GtkPlotPC *pc,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *mask,
                                                         gint xsrc,
                                                         gint ysrc,
                                                         gint xdest,
                                                         gint ydest,
                                                         gint width,
                                                         gint height,
                                                         gdouble scale_x,
                                                         gdouble scale_y);

pc :

pixmap :

mask :

xsrc :

ysrc :

xdest :

ydest :

width :

height :

scale_x :

scale_y :

gtkextra-3.2.0/docs/reference/html/right.png0000644000076400001440000000073012604172532015745 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2 I%=eIDATx!o@.'**M0$$?1~vIeEuLl&4䝠Bݛ|>$ݶoc gtkextra-3.2.0/docs/reference/html/gtkextra-GtkPlotDTriangle.html0000644000076400001440000001045212604172532022017 00000000000000 GtkPlotDTriangle

GtkPlotDTriangle

GtkPlotDTriangle

Synopsis


#include <gtkextra.h>

void                triangulate                         (char *,
                                                         struct triangulateio *,
                                                         struct triangulateio *,
                                                         struct triangulateio *);

Description

Details

triangulate ()

void                triangulate                         (char *,
                                                         struct triangulateio *,
                                                         struct triangulateio *,
                                                         struct triangulateio *);

Param1 :

Param2 :

Param3 :

Param4 :

gtkextra-3.2.0/docs/reference/html/GtkColorCombo.html0000644000076400001440000005236612604172532017530 00000000000000 GtkColorCombo

GtkColorCombo

GtkColorCombo — A color combo widget for GTK.

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----GtkComboButton
                                             +----GtkColorCombo

Implemented Interfaces

GtkColorCombo implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Signals

  "changed"                                        : Run First

Description

A GtkColorCombo is a GtkCOmbo which contains all kinds of colors.

Details

GtkColorCombo

typedef struct _GtkColorCombo GtkColorCombo;

The GtkColorCombo struct contains only private data. It should only be accessed through the functions described below.


gtk_color_combo_new ()

GtkWidget *         gtk_color_combo_new                 (void);

Returns :


gtk_color_combo_new_with_values ()

GtkWidget *         gtk_color_combo_new_with_values     (gint nrows,
                                                         gint ncols,
                                                         GdkColor *colors);

Creates a new GtkColorCombo widget having nrows rows and ncols columns with GdkColor color.

nrows :

number of rows in GtkColorCombo.

ncols :

number of columns in GtkColorCombo.

colors :

GdkColor color.

Returns :

the newly-created GtkColorCombo widget.

gtk_color_combo_construct ()

void                gtk_color_combo_construct           (GtkColorCombo *color_combo);

Initialize a GtkColorCombo object.

color_combo :

the GtkColorCombo widget.

gtk_color_combo_construct_with_values ()

void                gtk_color_combo_construct_with_values
                                                        (GtkColorCombo *color_combo,
                                                         gint nrows,
                                                         gint ncols,
                                                         GdkColor *colors);

Initialize a GtkColorCombo object with specified values.

color_combo :

the GtkColorCombo widget.

nrows :

number of rows in GtkColorCombo.

ncols :

number of columns in GtkColorCombo.

colors :

GdkColor color.

gtk_color_combo_get_color_at ()

GdkColor            gtk_color_combo_get_color_at        (GtkColorCombo *color_combo,
                                                         gint row,
                                                         gint col);

Get the color in the combo at the specified row,column.

color_combo :

a GtkColorCombo widget.

row :

row number in GtkColorCombo.

col :

column number in GtkColorCombo.

Returns :

a GdkColor at row,col in color_combo

gtk_color_combo_find_color ()

void                gtk_color_combo_find_color          (GtkColorCombo *color_combo,
                                                         GdkColor *color,
                                                         gint *row,
                                                         gint *col);

Find the best match for a given color.

color_combo :

a GtkColorCombo widget.

color :

a GdkColor object.

row :

row number in GtkColorCombo.

col :

column number in GtkColorCombo.

gtk_color_combo_get_selection ()

GdkColor            gtk_color_combo_get_selection       (GtkColorCombo *combo);

Get the color in the combo at selection .

combo :

a GtkColorCombo widget.

Returns :

a GdkColor of the selection.

Signal Details

The "changed" signal

void                user_function                      (GtkColorCombo *colorcombo,
                                                        gint           arg1,
                                                        GdkColor      *arg2,
                                                        gpointer       user_data)       : Run First

colorcombo :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/ch01.html0000644000076400001440000002057612604172532015555 00000000000000 Object Hierarchy gtkextra-3.2.0/docs/reference/html/GtkPlotCanvasRectangle.html0000644000076400001440000003611412604172532021362 00000000000000 GtkPlotCanvasRectangle

GtkPlotCanvasRectangle

GtkPlotCanvasRectangle

Synopsis


#include <gtkextra.h>

                    GtkPlotCanvasRectangle;
GtkPlotCanvasChild * gtk_plot_canvas_rectangle_new      (GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         GtkPlotBorderStyle border,
                                                         gboolean fill);
void                gtk_plot_canvas_rectangle_set_attributes
                                                        (GtkPlotCanvasRectangle *rectangle,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         GtkPlotBorderStyle border,
                                                         gboolean fill);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotCanvasChild
                     +----GtkPlotCanvasRectangle

Properties

  "border"                   gint                  : Read / Write
  "color-bg"                 gpointer              : Read / Write
  "filled"                   gboolean              : Read / Write
  "line"                     gpointer              : Read / Write
  "shadow-width"             gint                  : Read / Write

Description

FIXME:: need long description

Details

GtkPlotCanvasRectangle

typedef struct _GtkPlotCanvasRectangle GtkPlotCanvasRectangle;

The GtkPlotCanvasRectangle struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_canvas_rectangle_new ()

GtkPlotCanvasChild * gtk_plot_canvas_rectangle_new      (GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         GtkPlotBorderStyle border,
                                                         gboolean fill);

style :

width :

fg :

bg :

border :

fill :

Returns :


gtk_plot_canvas_rectangle_set_attributes ()

void                gtk_plot_canvas_rectangle_set_attributes
                                                        (GtkPlotCanvasRectangle *rectangle,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         GtkPlotBorderStyle border,
                                                         gboolean fill);

rectangle :

a GtkPlotCanvasRectangle

style :

width :

fg :

bg :

border :

fill :

Property Details

The "border" property

  "border"                   gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "color-bg" property

  "color-bg"                 gpointer              : Read / Write

Filling Color.


The "filled" property

  "filled"                   gboolean              : Read / Write

Default value: FALSE


The "line" property

  "line"                     gpointer              : Read / Write


The "shadow-width" property

  "shadow-width"             gint                  : Read / Write

Shadow Width.

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/resources.html0000644000076400001440000001242212604172532017023 00000000000000 Mailing lists and bug reports

Mailing lists and bug reports

Mailing lists and bug reports — Getting help with GtkExtra

Filing a bug report or feature request

If you encounter a bug, misfeature, or missing feature in GTK+, please file a bug report on http://gtkextra.sourceforge.net. We'd also appreciate any support for fixing incomplete or misleading information in the GtkExtra documentation.

Don't hesitate to file a bug report, even if you think we may know about it already, or aren't sure of the details. Just give us as much information as you have, and if it's already fixed or has already been discussed, we'll add a note to that effect in the report.

Submitting Patches

If you develop a bugfix or enhancement for GtkExtra, please attach the patch generated by the diff utility, using the -u option to make the patch more readable. All patches must be offered under the terms of the GNU GPL license, so be sure you are authorized to give us the patch under those terms.

If you want to discuss your patch before or after developing it, mail scigraphica-gtkextra@lists.sourceforge.net.

Mailing lists

You can subscribe or view the archives of these lists on http://gtkextra.sourceforge.net. You must be subscribed to the list in order to post.

scigraphica-gtkextra@lists.sourceforge.net

This is the lists oriented towards developing GtkExtra, the widget set used by SciGraphica.

scigraphica-devel@lists.sourceforge.net

This is the lists oriented towards developing SciGraphica. It joins developers to discuss code and it's not focused to answer common questions. However, there is no documentation or FAQ yet, and meanwhile, you can ask about installation problems and general use.

scigraphica-announce@lists.sourceforge.net

Subscribe to recieve the announcement of new releases! This is a very low traffic list.

gtkextra-3.2.0/docs/reference/html/GtkFileList.html0000644000076400001440000006171612604172532017204 00000000000000 GtkFileList

GtkFileList

GtkFileList — A file list widget fot GTK

Synopsis


#include <gtkextra.h>

                    GtkFileList;
                    GtkFileListItem;
                    GtkFileListType;
GtkWidget*          gtk_file_list_new                   (guint icon_width,
                                                         gint mode,
                                                         const gchar *path);
void                gtk_file_list_construct             (GtkFileList *file_list,
                                                         guint icon_width,
                                                         gint mode,
                                                         const gchar *path);
void                gtk_file_list_set_filter            (GtkFileList *file_list,
                                                         const gchar *filter);
gboolean            gtk_file_list_open_dir              (GtkFileList *file_list,
                                                         const gchar *dir_path);
const gchar*        gtk_file_list_get_path              (GtkFileList *file_list);
const gchar*        gtk_file_list_get_filename          (GtkFileList *file_list);
gint                gtk_file_list_get_filetype          (GtkFileList *file_list);
gint                gtk_file_list_add_type              (GtkFileList *file_list,
                                                         const gchar **pixmap_data);
gint                gtk_file_list_add_type_with_pixmap  (GtkFileList *file_list,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *mask);
void                gtk_file_list_add_type_filter       (GtkFileList *file_list,
                                                         gint type,
                                                         const gchar *filter);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkFixed
                                 +----GtkIconList
                                       +----GtkFileList

Implemented Interfaces

GtkFileList implements AtkImplementorIface and GtkBuildable.

Description

It is a GtkIconList subclass that displays the contents of a given directory using fancy icons for different types of files

Details

GtkFileList

typedef struct _GtkFileList GtkFileList;

The GtkFileList structure contains only private data. It should only be accessed through the functions described below.


GtkFileListItem

typedef struct {
} GtkFileListItem;

The GtkFileListItem structure contains only private data. It should only be accessed through the functions described below.


GtkFileListType

typedef struct {
} GtkFileListType;

The GtkFileListType structure contains only private data. It should only be accessed through the functions described below.


gtk_file_list_new ()

GtkWidget*          gtk_file_list_new                   (guint icon_width,
                                                         gint mode,
                                                         const gchar *path);

Create a newfile list widget. Remark for the 2nd open file window you must use: gtk_icon_file_selection_show_tree(GTK_ICON_FILESEL(filesel), TRUE);

icon_width :

the width of the icon

mode :

GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE

path :

the path to the files to be be opened in GtkFileList widget.

Returns :

the newly-created GtkFileList widget.

gtk_file_list_construct ()

void                gtk_file_list_construct             (GtkFileList *file_list,
                                                         guint icon_width,
                                                         gint mode,
                                                         const gchar *path);

Initializes newfile list widget with specified values.

file_list :

GtkFileList widget

icon_width :

the width of the icon

mode :

GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE

path :

the path to the files to be be opened in GtkFileList widget.

gtk_file_list_set_filter ()

void                gtk_file_list_set_filter            (GtkFileList *file_list,
                                                         const gchar *filter);

Sets a filter for files displayed in Open window.

file_list :

the GtkFileList widget.

filter :

filter applied to files

gtk_file_list_open_dir ()

gboolean            gtk_file_list_open_dir              (GtkFileList *file_list,
                                                         const gchar *dir_path);

Opens the content of specified directory in GtkFileList widget.

file_list :

a GtkFileList widget

dir_path :

path of directory to be opened in GtkFileList widget

Returns :

TRUE(succes) or FALSE(failure)

gtk_file_list_get_path ()

const gchar*        gtk_file_list_get_path              (GtkFileList *file_list);

Get the path of the files shown in filelist

file_list :

the GtkFileList widget.

Returns :

the path of files.

gtk_file_list_get_filename ()

const gchar*        gtk_file_list_get_filename          (GtkFileList *file_list);

Get the path of the files shown in filelist

file_list :

the GtkFileList widget.

Returns :

the filename

gtk_file_list_get_filetype ()

gint                gtk_file_list_get_filetype          (GtkFileList *file_list);

Get the GtkFileListType of selected file in File List.

file_list :

the GtkFileList widget. GTK_FILE_LIST_FILE, GTK_FILE_LIST_HTML, GTK_FILE_LIST_TEXT, GTK_FILE_LIST_DOC, GTK_FILE_LIST_PDF, GTK_FILE_LIST_C, GTK_FILE_LIST_CPP, GTK_FILE_LIST_H, GTK_FILE_LIST_F, GTK_FILE_LIST_JAVA, GTK_FILE_LIST_EXEC, GTK_FILE_LIST_IMG, GTK_FILE_LIST_ARCH, GTK_FILE_LIST_PKG, GTK_FILE_LIST_DEB, GTK_FILE_LIST_RPM, GTK_FILE_LIST_CAT, GTK_FILE_LIST_SOUND, GTK_FILE_LIST_MOVIE, GTK_FILE_LIST_CORE)

Returns :

The GtkFileListType ( GTK_FILE_LIST_FOLDER,

gtk_file_list_add_type ()

gint                gtk_file_list_add_type              (GtkFileList *file_list,
                                                         const gchar **pixmap_data);

Add a new file type in a GtkFileList structure.

file_list :

the GtkFileList widget.

pixmap_data :

Pointer to a string containing the XPM data.(last argument of gdk_pixmap_create_from_xpm_d() ).

Returns :

the identification number given to the added filetype

gtk_file_list_add_type_with_pixmap ()

gint                gtk_file_list_add_type_with_pixmap  (GtkFileList *file_list,
                                                         GdkPixmap *pixmap,
                                                         GdkBitmap *mask);

Add a new file type in a GtkFileList structure.

file_list :

the GtkFileList widget.

pixmap :

a GdkPixmap object.

mask :

a GdkBitmap mask.

Returns :

the identification number given to the added filetype

gtk_file_list_add_type_filter ()

void                gtk_file_list_add_type_filter       (GtkFileList *file_list,
                                                         gint type,
                                                         const gchar *filter);

Add a filter for specified file type in a GtkFileList structure.

file_list :

the GtkFileList widget.

type :

file type.

filter :

filter for specified type.
gtkextra-3.2.0/docs/reference/html/GtkPlotBubble.html0000644000076400001440000005017112604172532017514 00000000000000 GtkPlotBubble

GtkPlotBubble

GtkPlotBubble

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotBubble

Implemented Interfaces

GtkPlotBubble implements AtkImplementorIface and GtkBuildable.

Properties

  "labels-precision"         gint                  : Read / Write
  "labels-prefix"            gchar*                : Read / Write
  "labels-style"             gint                  : Read / Write
  "labels-suffix"            gchar*                : Read / Write
  "scale-max"                gdouble               : Read / Write
  "show-scale"               gboolean              : Read / Write
  "size-max"                 gint                  : Read / Write

Description

FIXME:: Need long description.

Details

GtkPlotBubble

typedef struct _GtkPlotBubble GtkPlotBubble;

The GtkPlotBubble struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_bubble_new ()

GtkWidget*          gtk_plot_bubble_new                 (void);

Returns :


gtk_plot_bubble_show_scale ()

void                gtk_plot_bubble_show_scale          (GtkPlotBubble *bubble,
                                                         gboolean show);

bubble :

a GtkPlotBubble.

show :


gtk_plot_bubble_set_scale_max ()

void                gtk_plot_bubble_set_scale_max       (GtkPlotBubble *bubble,
                                                         gdouble scale_max);

bubble :

a GtkPlotBubble.

scale_max :


gtk_plot_bubble_set_size_max ()

void                gtk_plot_bubble_set_size_max        (GtkPlotBubble *bubble,
                                                         guint size_max);

bubble :

a GtkPlotBubble.

size_max :


gtk_plot_bubble_set_labels_precision ()

void                gtk_plot_bubble_set_labels_precision
                                                        (GtkPlotBubble *bubble,
                                                         gint precision);

bubble :

a GtkPlotBubble.

precision :


gtk_plot_bubble_set_labels_style ()

void                gtk_plot_bubble_set_labels_style    (GtkPlotBubble *bubble,
                                                         GtkPlotLabelStyle style);

bubble :

a GtkPlotBubble.

style :


gtk_plot_bubble_set_labels_prefix ()

void                gtk_plot_bubble_set_labels_prefix   (GtkPlotBubble *bubble,
                                                         const gchar *prefix);

bubble :

a GtkPlotBubble.

prefix :


gtk_plot_bubble_set_labels_suffix ()

void                gtk_plot_bubble_set_labels_suffix   (GtkPlotBubble *bubble,
                                                         const gchar *suffix);

bubble :

a GtkPlotBubble.

suffix :

Property Details

The "labels-precision" property

  "labels-precision"         gint                  : Read / Write

Labels Precision.

Allowed values: >= 0

Default value: 0


The "labels-prefix" property

  "labels-prefix"            gchar*                : Read / Write

Labels Prefix.

Default value: NULL


The "labels-style" property

  "labels-style"             gint                  : Read / Write

Labels Style.

Allowed values: >= 0

Default value: 0


The "labels-suffix" property

  "labels-suffix"            gchar*                : Read / Write

Labels Suffix.

Default value: NULL


The "scale-max" property

  "scale-max"                gdouble               : Read / Write

Scale Max.

Allowed values: >= 0

Default value: 0


The "show-scale" property

  "show-scale"               gboolean              : Read / Write

Show scale in gradient legend.

Default value: FALSE


The "size-max" property

  "size-max"                 gint                  : Read / Write

Size Max.

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/style.css0000644000076400001440000000460112604172532015775 00000000000000.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } /* this is needed so that the local anchors are displayed below the naviagtion */ @media screen { sup a.footnote { position: relative; top: 0em ! important; } div.refnamediv a[name], div.refsect1 a[name] { position: relative; top: -4.5em; } table.navigation#top { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; position: fixed; top: 0; left: 0; height: 2em; z-index: 1; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } td.shortcuts { color: #770000; font-size: 80%; white-space: nowrap; } div.refentry, div.chapter, div.reference, div.part, div.book, div.glossary, div.sect1, div.appendix, div.preface { position: relative; top: 3em; z-index: 0; } div.glossary, div.index { position: relative; top: 2em; z-index: 0; } div.refnamediv { margin-top: 2em; } body { padding-bottom: 20em; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 2em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a { text-decoration: none; } a:hover { text-decoration: underline; color: #FF0000; } div.table table { border-collapse: collapse; border-spacing: 0px; border-style: solid; border-color: #777777; border-width: 1px; } div.table table td, div.table table th { border-style: solid; border-color: #777777; border-width: 1px; padding: 3px; vertical-align: top; } div.table table th { background-color: #eeeeee; } hr { color: #777777; background: #777777; border: 0; height: 1px; clear: both; } .footer { padding-top: 3.5em; color: #777777; text-align: center; font-size: 80%; } gtkextra-3.2.0/docs/reference/html/GtkPlotSegment.html0000644000076400001440000005464512604172532017735 00000000000000 GtkPlotSegment

GtkPlotSegment

GtkPlotSegment

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotSegment

Implemented Interfaces

GtkPlotSegment implements AtkImplementorIface and GtkBuildable.

Properties

  "arrow-mask"               gint                  : Read / Write
  "centered"                 gboolean              : Read / Write
  "length"                   gint                  : Read / Write
  "relative"                 gboolean              : Read / Write
  "style"                    gint                  : Read / Write
  "width"                    gint                  : Read / Write

Description

FIXME:: need long description

Details

GtkPlotSegment

typedef struct _GtkPlotSegment GtkPlotSegment;

The GtkPlotSegment struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotArrow

typedef enum
{
      GTK_PLOT_ARROW_NONE            = 0,
      GTK_PLOT_ARROW_ORIGIN          = 1 << 0,
      GTK_PLOT_ARROW_END             = 1 << 1
} GtkPlotArrow;


gtk_plot_segment_new ()

GtkWidget*          gtk_plot_segment_new                (void);

Returns :


gtk_plot_segment_set_relative ()

void                gtk_plot_segment_set_relative       (GtkPlotSegment *segment,
                                                         gboolean set);

segment :

a GtkPlotSegment widget.

set :


gtk_plot_segment_relative ()

gboolean            gtk_plot_segment_relative           (GtkPlotSegment *segment);

segment :

a GtkPlotSegment widget.

Returns :


gtk_plot_segment_set_arrow ()

void                gtk_plot_segment_set_arrow          (GtkPlotSegment *segment,
                                                         gint arrow_length,
                                                         gint arrow_width,
                                                         GtkPlotSymbolStyle arrow_style);

segment :

a GtkPlotSegment widget.

arrow_length :

arrow_width :

arrow_style :


gtk_plot_segment_get_arrow ()

void                gtk_plot_segment_get_arrow          (GtkPlotSegment *segment,
                                                         gint *arrow_length,
                                                         gint *arrow_width,
                                                         GtkPlotSymbolStyle *arrow_style);

segment :

a GtkPlotSegment widget.

arrow_length :

arrow_width :

arrow_style :


gtk_plot_segment_set_arrow_mask ()

void                gtk_plot_segment_set_arrow_mask     (GtkPlotSegment *segment,
                                                         GtkPlotArrow mask);

segment :

a GtkPlotSegment widget.

mask :


gtk_plot_segment_get_arrow_mask ()

guint               gtk_plot_segment_get_arrow_mask     (GtkPlotSegment *segment);

segment :

a GtkPlotSegment widget.

Returns :


gtk_plot_segment_center ()

void                gtk_plot_segment_center             (GtkPlotSegment *segment,
                                                         gboolean center);

segment :

a GtkPlotSegment widget.

center :


gtk_plot_segment_is_centered ()

gboolean            gtk_plot_segment_is_centered        (GtkPlotSegment *segment);

segment :

a GtkPlotSegment widget.

Returns :

Property Details

The "arrow-mask" property

  "arrow-mask"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "centered" property

  "centered"                 gboolean              : Read / Write

Default value: FALSE


The "length" property

  "length"                   gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "relative" property

  "relative"                 gboolean              : Read / Write

Default value: FALSE


The "style" property

  "style"                    gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "width" property

  "width"                    gint                  : Read / Write

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/up.png0000644000076400001440000000062612604172532015260 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME2.E#IDATx=J@Fo] !+2[Z<@/9|t$D9nnBjBRIsI:H8UPN1fcsN95M㧖ɵ 束1~pEe$I 7nrDf!;`'ykI䲤sI_]y^^I>O>?YBIENDB`gtkextra-3.2.0/docs/reference/html/ch05.html0000644000076400001440000000454012604172532015552 00000000000000 GtkExtra Versioning

GtkExtra Versioning

gtkextra-3.2.0/docs/reference/html/index.html0000644000076400001440000002234612604172532016126 00000000000000 GtkExtra Reference Manual

for GtkExtra 3


I. GtkExtra Overview
Compiling GtkExtra Applications — How to compile your GtkExtra+ application
Mailing lists and bug reports — Getting help with GtkExtra
II. GtkExtra Widgets and Objects
Object Hierarchy
Widget Gallery
Widgets
GtkBorderCombo — A border combo widget
GtkCharSelection — Character selection dialog
GtkCheckItem — Check item widget for Gtk
GtkColorCombo — A color combo widget for GTK.
GtkComboButton — A combo button widget for GTK
GtkDataEntry — a data entry widget, based on GtkEntry
GtkDataTextView — a data textview widget, based on GtkTextView
GtkDirTree — A directory tree widget for GTK.
GtkFileList — A file list widget fot GTK
GtkFontCombo — A font combo widget for GTK.
GtkIconFileSel — A file selection dialog widget for GTK.
GtkIconList — A file icon list widget for GTK.
GtkItemEntry — An item entry widget.
GtkPlot — 2d scientific plots widget
GtkPlot3D — 3d scientific plots widget
GtkPlotArray
GtkPlotBar — 3d scientific plots widget for GTK.
GtkPlotBox
GtkPlotBubble
GtkPlotCairo — Cairo drawing backend.
GtkPlotCandle
GtkPlotCSurface
GtkPlotCanvas
GtkPlotCanvasEllipse
GtkPlotCanvasLine
GtkPlotCanvasRectangle
GtkPlotCanvasPixmap
GtkPlotCanvasText
GtkPlotCanvasPlot
GtkPlotData
GtkPlotDT
GtkPlotDTriangle
GtkPlotFlux
GtkPlotGdk — GDK drawing backend (mapped to Cairo)
GtkPlotPC — Plot Context
GtkPlotPixmap — Pixmap plots widget.
GtkPlotPolar
GtkPlotPrint
GtkPlotPS — postscript driver
GtkPlotSegment
GtkPlotSurface
GtkPSFont — PostScript Fonts handling.
GtkSheet — A spreadsheet widget for Gtk+
GtkSheetColumn — A spreadsheet column widget for GtkSheet
GtkToggleCombo — A toggle combo widget for GTK.
Data Formatter
GtkDataFormat — a data formatting library
GtkExtra Versioning
GtkExtra Versioning
gtkextra-3.2.0/docs/reference/html/gtkfilelist.jpg0000644000076400001440000011643112604172532017153 00000000000000JFIFHHCreated with The GIMPC  &/"$&81;:7165=EXK=ATB56MiNT[^cdc]!t5Hs]!t5Hs]!t5Hs]tghvghvLa(N*J*g6ƺ,z3o&3^hs]IwIܘc=9jѕs5J^ ``XGGC=:`ڭf4U<4'WN3,;esB1eViUzj#é_ʽ**62ؠ^ͤ:|}'l8A'@s/?7xfpj#6n>~YheVhڋy DN-1fju[Y,7#'7'vr؂+b@bBK\ H{L[Uj-uj3jg5kDs97'v9=a:C69}Es2f n#(N*EV[U:ub;}+Es.i>Yg27[`sa]W": w68nuGYA@0FQ!۔8*p d' Djee7î**EMܞ"jϩOƬϣ%_^Tɫ*_/_}^5g3͇K_Ñ`m=%e~1OG]J@`C=:`ڭ[QmG6s&^]s}?;e{ȎuxVi0i.UsAgQ E^ʈD*U>]sy%ΣLۥcl{K:W+۟\rޏ"^)w3`F[5nW7.vu]Acȣc[# Ե#QDthj%/^)w3bQktӱZVuͫr{cެGȑ+UW dF]r9\^5_gQ\5#,bvfۓ֓f[r+̼RfHY(BDDA\kQlb[KQ e+(OgQbvAt7PSc*$EXƪ82K?a|'[.vu]N񙘮j\{kʍolG9eb{ck]ؿ9;ڣjb\HYX7E25ZeaFy%Σ>2'Qg:"9=X$nި_̼Rfx?W; Xߣ%rauȒ#5 s6I7aHwo$aqv;G|%"G5TTT/^)w3gl;:.'hϓjkQȩ#_'es6#r7+l;:.'hϓ|nc([B12LT_̼RfçbmL_&UJ1_&_ӱZVuͫUWƮj}kFW]8^Qs+ǵW1H+ TH[c6DDB+Zj2}GW"" z52CeVkhOIvó{;qFsX%F#R5ቑ+z#r7 /O귒]8D`"0D6ո"0Gv"0D`KaA!LF"?C6.djj6Klremr5=,ѢĹoPdj9ʒLG̍fVW3Wmə}5Ku{!-vtJ9:\,.V+FBHk~߈ۻIɅ"HHoN=7, jo$aqv;G|J94񌉌wo?o$aqv;G1c6͑u %FL+mmbq\\o$aqv;G$Jղ{&Ugԟ!ֺc52:|U(|grX:v+Z=cV&9ls-cL$**agQ9hGZ"VUD|.mȨC6DDB+Zj2ZҞ~㣫tW=[Z kUƥ,emhj%7]8|{3Q Xz5Xڷ݁h\V9Q? 쬍m2ֵ/O귒]8|>C#~]D.ɕvFhD{ecѲ9r}25R5V5LGdj&mY\fee7#U[y%Σ>2(ETA:\䑮R%sW*n4t*־VrK-vtJ9:\,.V+ީ؜VH+owi90Ik(Z1$}ml;:.'hԷ V1Tlmk(kvZ䤫.l9gQ%zTL%2Jd)S$IL%2Jd)S$IL%2Jd)S$IL%2Jd)S$IL%2Jd)S$IL%2Jd)Q˶GxdȱV*TR}M_MJ*T+ l+}===================V2;]34tRdWB|"= Y# '0N`=R s '0NB1ur dQzyzY=gzY=gzY=gzY=gzY=bĎT{H[ac-RKe-RKe-Q[vó6FG"XE h4BA h4F!B4 7MDi4h4F#MDi4h4F#MDi4h5*TWEZTQ%ϹU]$wv֧sյeXYo|./?;uJ=M\iVԩR|DaKF:DK/RK/RK/RK/RK/RK/RK/RK/RK$Y_y*Bd+!Y VB$uDaKo#UUOa7CDi4h4F#MDi4h4F#MDi4h4F#MDi4h4F#MDMm!#F(Q1Db!IvóAUem??/椎4m;9cZWԨ]%F;/RK/RK/RK/RK/RK/RK/RK/RK/e|}~EQDD*Tl; 20# 20# 20# 20# 20# 20# 20# 20# 20#{f#4Fh3Df#4Fh3Df#4Chhhhhca#4FhTrKWDb#F(Q1Db#F(6$Zt VEFsld 1Db#F(Q1Db!bڕ*TRJ*TS*YUʈٮ26*TRJ*TR[ί_UJ*TRJ*TVQQX#VƵ4RJ*TRJ:N:*TRJ*TQcJ=,V%k5J*TRJ*T.vJ̑+z, :Π, :Π, :Π, :Π, :Π, :Π, :Π, :Π, :ΠdO&)1ILRb&)1ILRb&)1ILRb&)1ILRb&"jlJ^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^G":=lbuݮDk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF*cS%Q!P 1@2`0A?sAz|I.6MI)؎_7{rnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\rs pV8lS^p#;ypW E^_Kٳf͛7ҹ7C$ !1@P"0Q`p?"n{DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDOw_ǑB';֯ӮoxL'%=.c=_Mc-s|m\*wJRm@9̧TDDGZp- E:#֧4RX^"Hpjii$P*B=hPaZYQ5Miތ:&u KA+.#& q7QM=WȨE&Z %&ik#l Ja5ƞ T{NutTٮh,v kJ65iԅ1 18*&&?ĺ@6}  .|jѩLMgf\>k@N4UEƀ!M&9jB)N\L&ҁ  (4hl fփLlZfg6! N(g m lc K0KLx)P Ŧ1iحB!⑬Qb  ƙuANkXtPhe"@kR@jLےev2~2;VeP]­;VeVeDߌߌ;W>.{C/p_}Iw yeΦ*Aw ʄ]«~2ߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌ9PW&:IQ"SiN{aӧS>K(:D`*1:9މst0}M[T# D3lN3 LzC9DOPFlS2 nAMJ' V#|n0Osa;< .):b3]كR.?P1tР "D>S|ԙݵN4+Hq)\JpW>|7UU(F S B1dTdtQ|MU+ЮB%8+N S%8+N U:p|tRl; #HW2ħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)4Rgv< psF8#042x!$4\cVmьcքb` :vF02f0ɻ?skZpV+\ kZpV+\ 쒽@jLڼGQ sԘɅz(7B3۹}J ЮZ ͮ3}Jt\TXb#S=S?P Rq97b͂Ѡ`i nVGi+rEB +PFGfܒ@jLڼGQiaI潡i8=mWރEfO2m611GvALx 6ac v}ےWIW6ة0PGZ@;Il ӓvozRgv<#3C?I]cWWR1|}GԜb+D9N.h*Mi1"{1L l:8v&lx*! :?zRgv<&{afiءk4PChT * sU~NR[t݊.LO +ӳ!τ]IHVr!6iC[ Nt"b`dsd*S:F&F.t"d<\ h/HGEGQc.=i|>^נ_5&wm^#(rfI89M֘.<) 0Js 65gP3g5Q0]5T&.0Fi2Jv&'FVHkCƵtD6SD4 mPM& sU#@2cfꂄARЃK@b4W+ yV3 m3xo9-S{af1Sҝ MLM C"s[ b-NPC醲5)HE E%;Il ӓv~%QY^נ_5&wm^#(rfF}pѽuz.5 cNL|P9)NR[t݊K6 SFF`rd=AMj4jU)TӱCLHDƀ#R֦Ɲ 6gzRgv<+vd|4*ڡ*PfW鍁4M֤Ѡ6E3 )WVD(844~Nl \Qd+kPfxy@TiRꤶɻ2&ȃXt 4f<ضL0igP.ݐ=4f14ԙU.N--Ol_tD>ItfSZr@jLڼGQñagS`HQj Jv&+ yV65aG2wTӦQB3zΎ_t`z-?rn̟#סgWߤ#סgW@jLڼGQña݊,xث愙hT)];U%'NMْP2;2Jarxg٢*L(x'U(0D4)M$R$h(0D4~x:BlsRnq.՜45І3t72H9Qiq!=i|?k/;9IaV|h*/1#Nyc=R]Zʕ7GJn̑JAh ֨hP:h:lkP'DCe;C@(Pm5Ё DTMM_WIWr$K!$#R![M:SA4AQ cW^ϰ=JtSvdT~%QY^נ_5&wm^#Y@MjYsiڬ@MjYVxDKx3PT*YVxLhk97Ak Zs-Ҩ;2NdɃ椶ɻ2xA.jфaD @:kS) 4x"").H6b)< dǮfG@x AnsiЁK;J6`MHU5.u360ԟU.Mvl(oS6{0MpNub'Flv!Tָ;k/;l9[%0 S=09"4Bl[6JkSP{CZ1uAEJqcgk4N֥!&+ y@Iw`4@*FΎ%Ml贈GYV]:0ktCv&+ yFE"*MΛR0.+oIɥ8&5(N(_S=Sj R'&+ y@ bua`VsHQ~iNR&HW|k/; a]%v|~1rWlFhsA "]Hi>Jq_L4BIВd}JMcOBh1c)_ɱy(}6ُf>J+cُf>J+c"FYN%AC%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1O.cA_5&wmOسlTCSfίYUgUVwYUgyM*;ʬ*O^[hԸi(vL1L,66:B^Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+v- >kmd,FЧ}.!\y! S+!] W|B W|Bw+!1XWHQa}8O!G!A&ٲFBOC:¸WJ\y+%q<ǒWJ\y+%q<ǒWJ\y+%q<ǒWJ\y+%q<ǒWJ\y+%q<ǒUuH4 +B*psVۃն歷5m9m[njpsVۃs 0~jLD'S%C?iLq*vҦDU;U;F8:ʩȪNiS~q0CaT}Rgvȹj:]h޼h͇TZ\ٚ5Л4AŒyz'I:h"սg0*DS*-u))CH!pI! 4 X؏v@ae;G{'~[e64;ʦS`~jL2DJ$3V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33Nd " ?Eºv𮝼+o ºv𮝼+o ºv6RgvRgv:Y*D1tKGHNi]3WL0t!]3WL0t!]3Rh@P>ߚ;BKhf֨MѷB%*K?O)9\(vipQI@LLRgvٔMa!h+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>̚8B%;%j(JіS`~jLےwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzNpU1+bWįY^f%zJ1+bWįY^f%zJ1+bWįYF@ \B_q !U/긅W?Yn 1+bQ!|ԙݵ=]3 f+a Bf+a Bf+a Bf$С*M'PfI!E-vƅ8ȵDْq 0+a Bf+a Bf+a Bf#LG}0LS’ex6u:{~|ԙݵ=K'ja>4͊":;X H,׹SNkaL?1_g;lCa5GN?#\ L`N~y^ߠ_5&wmNfjMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ54BS1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rNI06Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7DC@V\jUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUVsD+!1AQaq0 @P`?!0cJEK2NjpO XAb &``p6QٝBL3afb_]5 82fWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWT0 ?qV?hH ff_h @[$ՙ3D"rhBEtNs˂2P`ru0 4>t}"v$)aCF Y,X^#0.<6ErM&r\h.I\$.Km%6ErM&r\h.I\$.Km%6ErM(`{Y̛L-dži4 ]+FWʾU _*WʾU|_*WJUҮ|]*WJUt]*WʺUүt_*WJUҮ|]*WJUt]*WʺUүt_*WJUҮ|IǸ\ Lb(5]rp+?آgg(&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&OB9aCsWZ!?L! $ ت)If@g߿ B<}0Ȑ꧈ H7@(x =p@}fRAC$CWqB,@w"s$h_B4hTLNML9P\ W#^#;"НrEϛ=9"U Ļ"N#TMIŤQcCaxcL 1Cy0'" %џ~MOB>NZ2 B|D/OTgvt̰6$?'M`?TdɊqȅS'kp9~TL.;^Cbj{K'pLS#Byf#?GAreD0(n tbg($8;Ⱔ0B d=cU4LEfh2B.1b$SpE1 +!c L(c!8&'B "i UHһ6-sW%{T+b5yWJI>yWF,94p @`I'ځ3@@A#j=L~L~?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?(ЏHb2>ׄ"A98.}##p}" F:`YXm"gn-<20.. NDj$hXK(DK4hʎHV{2s`V2BZE6Tʼn#,FJ!'0}xϥ-SS*?9aL! fG s qQ1L9P05pB.dE!Ӭ#˃u(ڃ&H T2~sLHPܜ,3hrS,ť("(AKrdpRd 0>leP%*ix% Z{-:=S cr W@d~L2YWPcjʺ-le[/}쉀fɇ$SS  ;J(8-le[/}_e-le[/}_e-le[/}_e-le[/}_e-le[/}_e-le[/},X*>pY"VnyL;h[1` hIq{)(8Fe|$-F#!9Nd0NX4Ǟ|&zs]hQszܗ@ $@N , *+J+J+J+H2A, }:sW %mf᧟(K6:(r200CSB du@)b8$&%)"hunKB•eF. &!BKpY#F*4@ 1dvX9*!?X2GqCUxGQB7TbD!$0 #=#8O>T+JGppY"VnyMr{[qL T &;)qHDM"Zsm+J8mc`'`*qxs.<ꊒ, YV Q&* !#10j8LCApv fePa=Sɱf~3T\.*9$ ꁀ1 AlNT)"i"p^h( ݡSDEd$:*Krd|+k7 <|tJp&({Ob##aK7)D$9Na0`Ty $k!Li=@/8L.vHQ ;Pg0}Ng۲V @ $@N Krd|+k7 <|%d(.E `[T|vż>J 事LODX6x"@H2E^$U5d/Ns d`R&FO(3 ^0_JԿO@` 9|E:&7$F",09="Ӂ8ӉHgei AX*brz b<,19=?Ӫ>pY"Vny 3 3xF MOHxD%LgGX 00F0aN.<&qcЀs(rlTř" Al2sLHȼqR *  LkO+3T ۲V ||sܙMPܠ&qyiT8(E9jTd8vd&_!(Yp ߊS#wUT0Ÿ(3F]jx' ~Z@:W]%ol?Ӫ>pY"Vny 3 3x S*rKuB 29R W<ݒh?Krd|+k7 <|JO?X*Z}"2X ̑#'Ѭ~UMX+ ;앃EA}@ fdTgN\%g[Yi,0v"Vny 3 3xPI M7kZgu|^۲V |vT4SLA,^ G~긒KI:S;8pÆ4Md/8h,a^pvT4Shq'TT dyJ y 'F! ! *zflK읇i'U08qN\%g}̸}z#e6h}nʫ4_A@ $@N I@/Ӫ>pYWI]$XIgtF0LI'tb$9?UWI]%tlt.LԉLy7#D@ ª+HKw}nʫ4_Ab4@G7Cd`li͜,09=b!u !t8?2;h,((58q1! 6/Q`莩 8vQf$3jt L򏢱gm)5P\68H O ?EOdAc>_Krd|+k7 <|JO?ᅐ$} hP=̠÷*',`ӂ|bO框hDnn}FCf@ 1huM1pg =)LD9qv'~Ȇjf^Y<}BnȆamH(Z r\(wTb3&C.1 $,b!Ha  ODHihi_Hrwb*;+|UӪ>pY"Vny 3 3x?"S!w<Վ 0_AϹ\2Vz>H> o)FFéjȨ @ 0r~uOꦈ;nW+Aȭ1]w<}nʫ4_AdTgA}@ fϹ\2Vz>H> o*""-٦i5#M2/8h FXI9ǂt6!:sW %mf᧟π`07[Yi|<tee6Bq2QPDL1*onEC)VuEF  L?@p@`rȌL%!Qb "o"y"ʫ4_ABhH |b? EQ5H=V* Y.)Q8Bd'KgT0:3T\.*9$ ꀅar2 dcSN``|9"SV* Y.)T@Ϲ\2Vz>H> o 4O.Nèv]sfLfh!!5 \r7/C "ƒSbu 2LNOD{pQ CwXP|ĀD}+ Ky`J`@1̀h2LNOOϹ\2Vz>H> o$N-U <,M @,hSj󆚡XW i(F=5I(B8?s8Ag ^"h g E$@lOC^w)"Bp MCPC G4f%tM0IDMtGvPi m^N }#((dL6!8?d(J/C{a>T+JGp0YaMa/BCh #EEŲLP3U'0<0CL$vEx:1 Al q[vJU.}ᒳD4gA i,#P&8CNH ,Ђ>hI! Kݟ61V'w<Q}Ӫ>pY"VnyX0'mFIl}M|Grrɩީb HVh ۂ|AHF }Ӫ>pY"VnyUqE G WQr$P@JAkk Ay_K?T+JZt!0L-І( 9gc2TT!( B@q"@bBf* P$ə"$n t&MЛ7BH`AA55It&MЛ7Bn t&MЛ7Bn t&MЛ7Bn t&MЛ7Bn t&MЛ7Bn t&MЛ7B0Bq<*\$D |lL jybV}ϹY*HLu+>gܬrV}ȉ#TX/P?&Xg?%9'L /(`GCTQ(cc [Ek?n-S廪|uO>[wTn-S廪|uO>[wTn-S廪|uO>[wTn-S廪|uO>[wTn-S廪|uO>[-*NtU R9|J>p  =`'ثA܃ݪݪݪݪݪݪ|ZZZZZZAu-r sh .!R H|5:ZwjKP'&7}\^qz/_u}\^qz/_u}\^qz/_u}\^qz/_u}\^qzuB#4@SK&JϹ\2ۉ]f2ndɹs&M̛72ndzXʾr4+_־ud;4AQs: sD@9X>QAfX>UX>PA98}UX>PA 88}UX>UX>UX>UX>UX>UX>UX>UX>UX>UX>UX>PE7`>lY" ITt*W!@nODԹ+_ڐ C cc*^FYV.VppG(s4tRD.~fylCIx'غ(:9a``  4F8nM@H(7H P$zP"YI2g,!0AV}bTbSֈ܆ez(X D!95.}b! `EQ @ @ @ @ .j~O^:#*****) >\.}Kre ?N!A_E"7`V`V`V`V`V`V`V`V`V`V`V`V`V`V`V`V`V@8$$@G]=M4M4BP?>p3: , dV= _+_v,N?6,ϏG9 !̿*tD`FU aځͭɢp~6bsW @, @ @ @ @Yu'CSb[DbL"TXQ sϹ\2Dmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[q l[!l[!l[!l[!l[!3 1$˓Eg՟V~jY?5gAG> d-%.sW K((()ȃׂANÌ" %  @D#)pYA@EQEQEQEŠZ~e?2O̧S)~e?2O̧Qp ěf9#rڬ. 諳W4  5)~e?2O̧S)~e?2DKrdp1#Ѐ_0(N 24<19FPԳ&/(AD8fn`t9sI- !EA Rjhj?< \$b(mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmSd(IU{&M7odɽ{&M7odɽ{&M7odɽ{&M7odɽ{&@倄xT&?9s9s9s9s9s9s9s9s9s9QI ȡ\2-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[r.P0YXj !$0¼}X{2dɓ&L2dɓ&L2d_ )JR)JR)E#!a1Q0@ qAP`p?I<13+"'Ah4 Ah4 Ah4 Ah4 @~)E?:$tWEtWEtWEtWCMsAyB?k6[2x%^򾊧!"Q;㹞97IJ(Y6N)~?YX T/j+++&t\M]6rf|y4)j$_9|ҟrU O+6W'|w3ѢCoI)0cnOq1dywܪwH1owr6J$F8ɨ$9.i5}&@X }NȈCqYP$Pݯ"嗸P` `1&a)i&L8Iq # ;_fEz=^2+"ّ^|v9̊{ȽdWE"~r/mk{lȯG;_fEz=^2+"ّ^|v9̊{ȽdWE"~r/mk{lȯG;_fEz=^2+"ّ^|ZLuMoEj U4Akc)5jpF𰌇~9sf(Zq{;ߎw~9s{;ߎw?~9ss;w~9ss;w?~9s{;ߎw?~9ss;w~9ss;w?~9s{;ߎw?~9s@bNy! ϛ h,@CctӧN:tӧN:tӧN:tӧN:tӧN:tӧN:tӧN:tӧNDI@ C?@ Ċ4./p@@BȫXQ53DtNx/BPFC24Xnᐸ6B2-4TLSqPםB"$ʹ*!iFa -ځkMrW֎] ,#!rLEDfؼe &@"`QYR=/@wa`J `IdVе(VP # #mF2lnXRKu"H$)Rt$;ML 00d @@ ( R/0f p!)K pRX*cx*uN woPXs0%0ȥ3d&#=@X 4a(Dz1,V*I WF !Za$pbb(I! P7P:gnO=G0$HL1X<@Rz&Ak>&4@&.PQ%R=HC!be bb.$tPp3@s\!fAy 6-bb( "eBETPRȄr`Σ-ŋ癏OgsH@hV"hG)PIѐ& 0Zh=ܥq]T*#ADF :r /$}>^\R^rY)"xJla>fP0JBUh])狎ἄ0M'? /$b;&$ѰJqBbtCBn03c hHKCx4HƩ!&Z\PIB.!U"☈)HF P"a6\vWj\MH&Ćm8ޓ JԩբTi! [/)"0\̵vhphN"l$Ѳ^KdjԂ 2w'z=:N:AfP5X+Ft}ZH빊j21b0&O N(DdyBSnɫySC&jimI8ƱٴK  OFʖ֡( t# z[(Jx11rq+0:VQhu`)!f .IܒXeAX9Ԣgsۀm^՛|~n0:YZ0< *(􇡯5&($E+zMdB'C Ё,3bE*b%'x. HmM1aIM0^s3PϔB40h5ACZ&dԃ5 bz]'*h.Q-oc #ʇb=`8 Tb`8D*ۣb*FqFp5Ҵk1z ExFC F )5,+!$YKk sA E=Yu5kLOHz cd Tnd/۶qŢHud"\!3. =!kQ"D; pSID!RZr>q-{맇^[~|e+^&.Df`@Rˀ%ΦH!9TKq0,K V/|" }R1!C#)Ea b6q1<91I|~6P&3J&'K_R)2IZ•mJT!$%J#a2 4\pHҌHY:/9HH!^ARu2A<* bc $2 sH=qGlFI $=/q;?7 CZb|\zC׃9@I<`8K~JP%^&yKNRt`b9SI*^bQdTS#HHV \m:a Edk@lp% GhFB0I)$(J:$̡2 FP)Sf;Nw޸<`8Be,q%遑Q6ObMOBgV q PZLyZcD C@Lp*F<;\w E=Yu5kLOHzt֡1>!(m ! A >A a> N^"I ɮSz}$@Ł*:?|㧅v'îx5"i'GEaϩσ3-33}eWQ;h.6#`~ JZhOF?e#& D Đ%a/!&@9ljH7cizfm2hт bDWlɏՃ TFLT\< 4M£ j37-dAb!y>GLu FD(GC GCB+)"h  ^rWCo$ 9SAtl<~ x@QT8 Lp-@Jdy>o\J"tW\A2nC-jܝB4^՛|}Q;h.9237_|>ϩw)`!_Xky$bZ#2H\&L2",ׇC xH ^S(g32EԈΌ"VξF@!OO׷x5:x7P P‰0uڸu (:fg{0! A 6ӳL&ʑk;Ok; J Yg{3LTfÚwp_u%MPL"*Y€(g{3LIX;G]㧄}@%Lm[b$.* *z*@Q"i:;FGEL䈜1p#4N#NDK+".Df`@Rˀ%Φ&I6 XRY_IUjC$ Dl6^6\FAN Q'S%1ID3 TΦW"@n!EhtD$!HBI,f dAKЅ9̵9OJB@:Y"qкΚ5'QQG= xMB:kP֘Ңu!rvPcc@I*=i<¼EP X/% Zb8ٍq% bCK%v<VC,4VlhtHꤨP%T®Wo u@6`B2(oEk{&B) ؄b(:yl2R(`CIT6-[ԐAI5f *7u : c`@J(ޚ1Wa_D:jxzsZ>fx5:x/Q86 '3 ݓV$61-mP1K y ÊU % eAJ+&ulV9 WSe͍&(R=j8,8F&[eu}!AHg8d%6욷1$<xQnԓk H2+e,XB _u:+DnYa)tP`e[ a N66"\ $0!@,i}sV*P,A<^՛|~n0:YZ0< *(􇡯 ]gMj!,Q*%C+7{AdRĀCJLNd ^I.&ABtF$ ĦR%8 늭" ! '"-nS(zOO_ɌcqwHrQ5y|G #:"w` @!Euń[z9E+ٷ@lr~p >R݂@ӕ4O ෈1TeC1XI|t H:T Gc4`f$t_KzB+)"h  R4dB} j4ft֡1>. =!kgJI(1aAZ4}q_xŸ<)ʼnϞkE,-Sxdu su栜SL*4,-IybZ!@1f4(H*@O2E1k"·C BFx Rl^ohf<9ҏ"T] " QnJ ;OpQ"u?nW'Sp"qкΚ5'QQG= xMB:kP֘"@ U1gcsR/~ӝ;O KЙ$ -aJIe}%T]U-A4T'eU**Duv18b$FiF $ ,LF(%&WD \(deWveT*%C|S"4 bE$0 qYA10qR)2IZ•mJT!$%J#a2 4\pHҌHY:lFI $=CDdSHHMZ :-bDlD+þ fD &IvzR$CLKx`y.P&d2C"qкΚ5'QQG= xвܠO%HȫP"iiX xK$8Nw 4*)0ZtvbrdE,K"X^j4Bbq9βDQH")@ɶ$J$EV$lA  h )I .N>{Mؔ錔ְDaPTBDchT5Nۓr)fUnt}+Uښ5Y @ȡ# ݇]b +/ \=/ ],4@J(ޚ1Wa_@k-$<ɩFTEA È*xTK 8Œ ;A@T@#pzG7ySF^K!H7ψ!BRlB1IQ<6Z)0!ުJkBaDy?LPb,$ JdLbcl Ѣ| hTQYHc_I%$6i7 rY(Oq:ft֡1>j ` ~utS3Pl#0",Ds(lfshmJ;*;U/ԑeא$*"S;O"qкΚ5'4CЉ`1 @“ h7%H Lpug j! t*bHNP1;x^ՎDBa:>'ϠmiaOHOshYh덆4DD0JQnKfQwTYLciexz(3[_V,JWO>|MY,\`?N~]:cx'>|ϟ>|ϟ>|ϟ>|ϟ>|ϟ>|π-6da+l̋ Q?F4/HPaIEQDtȝA():VB Pr"}KOd’.ùtÓxy+ |<` I8p&L2dɓ&L2dɓ&L2dɓ&L2ÇTV /Ca9A-^Ֆ` }\yPz:cTE/t2AǛ \l0`*,hr4T L#F>v$".!@_1mb?fM0%s`#r1#<3#<3#<3#<3#<3#<3#<3#<3#r1 't񢒍)(,OĔg+ӧN:tO %/qA%L>XPI%m[:r*K}pO\$_->tMW@%kŧHjjQ#ӧN:tӧN:tӧNY 0=#?7'0 `)Eݎęh{R7| zuDB"DD%1Fu$-LX?Xf샔RH%su5,Ct8)ff, Rh&j0jXD "1HY"*`, $z\[&0@NPq2!h*6R̹1 BW-w $f/- 7k{oVB_MN "j`\!= W#:P4j` SP^AŻ0 ZO>|ϟ>|ϟ>|ϟ>|ϟs/"K$x+?/qJgc]ϟ>|ϟ>|ϟ>|ϟ>|zxō+z lbAU XA5(DP%K%oh교@a |ǫgk{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{ )og;;;;;;;;;;;;;;;;;;;;Me8sz\ޮoW7sC d/;;;4Sha=wwwwwwwwwwwww@T&^E&IQ8nV2"x~Xiʲ23:L_EaU!tqEʴcN@=Lr䳳x$9N|$9N|$9N|$○MF/3Hִ?rCAm}0[_?b(gM{`!S=`)#B&y>N|$9N|$9N|$9N||{V 2!^zמ=y^zמʞ<ñ8=g F1^]1FṛhK/qQu:.@SHd)k%[ n6د%:ꭏ^zמ=y^zמb7מ=y^zמ=yB3R('+P6>RPGA규Y?c& HuF5ˌCg:՗mMX7tO=y^zמ=y^z׎S z\B϶-y2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5.Psy.\r˗.\r˗.\r˗.\r˗.\!<'`&|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3yL<,*~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/[gvsZ 3gtkextra-3.2.0/docs/reference/html/gtkiconlist.jpg0000644000076400001440000010323012604172532017155 00000000000000JFIFHHCreated with The GIMPC  &/"$&81;:7165=EXK=ATB56MiNT[^cdcFSaiiiil>:44444FcQKAAAAA&/I W66;yf(mW;Ybnu'cy2y.I7KrE9"+7ܛv_%3[7:Gr;ȏyblUյTȒŒ\Vl*%M< ljE}=,~_/kydR^[R}|x6[q-"|ނt|B~oW˾Ub֯o>jC#b,U)ulSeQD!Aš^I0݁ A V~yv2ޢX!w&U҉&$udj<73tOZh{BoTHV,5?j[" 7663f)Y̽ZPi k-I9yqzZ;0LnQn. ,1 K\4W9](3,ӹTغ=NUKxdyڰ|,% }5gFQE&9#ᓱ`2ޢXhڦⷅ mN2U ; 766;yf(m- [PEqٽ~_B>] h 76638+ >f;!!د*%Mrj](o8@@gXMf3ss7JKJ-*چVbZh{BoTNVZUEeQDq<45nJej= k-I9yY1V+Y'2@>:fecV_Ϊ{I~z[\F&v%/pdjK! 3=Be xfxB=neQD5YMo @1 =ڝeweToQ,mmvQ]/+IeTZA`'2y.I7KrpZTRbPq#SR jydGz6*^Pʣzcol?C8C+9vSХՒ]`ghz)0Z.;'G-gU[F((eQD!Aš^I0݁ A V~ToQ,mmлW*DyǍ^:2k5takP'4z̽ء7q'j-*Jӎ2ޢX8Ͽ{ݚ|g2k5CI2̖ԓ^'V -ԿםU >=Áft @*%M^ԖB@f{{m>3#(~"zʣzcol 766ʣzcoqlAlAlAlAlAlAlAlAlAlAlAlAlAlAàuy")!$0134"# 2P@$B.vjvTC4Pf^ő@0b0egywywywywywywywywyw1\gW|ح֨淎گD3kDemJ쑻&;!j䢥>[Uխ-u“' N)8RpH(W~t3 M::ZK\k-stΖ:ZKTk-StΖ:ZKTj-stN:ZK\j-StN:ZKTk-StΖp L?vӟÒr0' 1 Z!1p3nSYc88Nj%Vڿԭc-oZܓrNI9'$XNj5S-Dn'RIԤRu):JN'RIԤRu):JN'RIԤRu):JN'RIԤRu):JN'RIԤRu):JN'RIԤRu):Jw,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 5 _ޟ-NJp_3pZC2KPP; TZSCabJxO:=ez= ܛ@dr>:t{O zQ7- ٴ }6Ylf+^N쀮aݒWkI jer\يi_ޟnp;FDBȷ)#RY*J+ RTVĨe8}a,l+kY"EK ׾,yӔl۳xGvE%2jm\WLوiV,o5=nWbnW sDzU+}GSmȋeMJ*ԨU|L7(afUS]f_?j1AzߨN[!IӍKr}ō\[~@h%%aO/b",36+CQڏC_?kÍ! PEU_OV(V}&UpkFjQF"ĪX(*@_C_?knԵVJҥ3<Ԁfg-żuIlJS7ۖaLN̸?GvE%2jm\WLوiV,oMOw:؛LS!5XohbMlaA$/OڌqP^,iRtaܢba&ci7oXSFz~ׇCRv+ P0L֌-HԣZu /OږVVU_U!hB(*-zQ)5 +rnZim+V*5 R5(ևu Ux7v>nkHfZP_j aJ^Jhl,@ܛ@dr>J,3u/^'Wgv@WUnkJ3Nz=ST+z~a҇7+ "ܦ{ ePKUdm*S;k&.d:Z%C)ě pʰ'f\I ?GvE%2jm\WLوiV,oڮ~ vGTڽ;tHk/=Ȣz~cQ`CJH 5L KlJŸ5 8UU\h L\RheWajFӯ_ޟz~__ޟr 7fy'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ryb,Wܦr.a9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9s3w?%Q 10!@P`2p?UtT3#6:̙3b~gVٝ[3fulέճ:gVٝ[3fulέճ:gVٝ[3fulέճ:gVٝ[oTْI6g]I$N9ME/%fJrG&$rnDiI_Io:I"vI|9 Y?ɸIîigzmQo:No$nyxc:<" 0!1P`@Qp?K&!? lF95CSTk?,n'066Cwe9 QNIt?9%FBT|>T_Ne$jPzƨ':fwnccoJBrK0J=az !X^C|VCJ=s^G<  !1A"2Qaq0B #3@PRrb?z=%f+Zf%CA;4fSAhz9! %L:5p#z7|R)7f̭&ʆ0(@tg8(nPP 1 ɁCZ-Od4m f(Κ|[?%IsHu!u&pSlwrh~.I X(V?ffɘ"SHipYSTZ@qlɊE=ce3sVLHu!i7_vI`jnEP2nh!ϝ`oWp_vLעy,-='CߢOe9A絮D{efͻDNP58fWGV` =Ԡ1ddLrL`ګzɵ-ڠ$)hb(5Bl޲@0'nI =!=6.F.pt" i|fYntS qYK ~ mmsY/;-ܓ0dN+,6YB G])*1H8"EnIL}mNͳ[bٱ$fi+as#ޚ($+62vLlj5NJ5Y8'; ָ@Bqq6;!@1mLҴ֬BGq:t;_ RB֏c@wٙ΁+2Z&ɉ(\\$vdk?od!4 `BlDV{[]|NHY#K䀈N;Ӂ$Z6DDv5f(=2FkJlL»W20xH¼Sc'`Y>̶ƪZ$\K"s.۽}  q޳}p6doWp_v^e>Z3NJt #hl'ڊ@Cv&0V" @Fg"CK zڿQ̍ w/׆Ew;cѱTl0)v5;4v+ 0 0\γZ+6ڃP3}a%']tNfM@KZ%xjnuͦ_FEw;eiJ{`@I\pqq沶{(kBd1u&Ns.sDAX1ó8സ-. Kസv$N- g9O{Yc<¥& G}nZ\ipZ\" w.$ԲnENTMGzq-n4@K~^vk,cZ`M] nCiNqC411Nv?e8Mb}^VDֲ11LF$ܤD5DvGصh/ mõj6vWMjFp;#\!d)P w.7BxiB;'{I8H>\v;ٷh xgqt+Oj M${AK>cE5$)]hퟳ3e- VehMPHո $V~Biq& MHgwk 7+/ܻ S2T$b)u)zp9DCfڝfLcHiMWwF5PI8Wld 'ޙٖZkDk)r6qNxwaB=N;ouF̍ w.ĶF}INm⍑d;QThn*dWQHqcsYW1]|NȮ'r}6*-fE `ۣ"zٮ{YA&3a 9kEfPPs?Fs4ℹS@.{ɵH)kZջ UmҾδu<|Ȯ'r "Ol6Z\55 n18`.x ȝh7 8{"$ԅެಇ)`p#:l|_T￲MKസ-. K]]|ND:T Ⱦ ʒɨoN3e oՕrkL Mw0 1uf&7)#fq:NXWwQ5:':ELLjS-yv44\bՓ]&z ؙ jъ 8^ۇkmYIJ5$&vFB.RȮ'r3t'D,0YQP[R{ND{sk\ !8c͛vk\"b>ȃiZ|tukVZo#8J^H;N4w+ɖ k'䟱3e- VehMPHո $V~Biq& MHߜg])*1H8"EnIL}mNͳ[bٱ$fi+as#ޚ($+62vLlj5NJ5Y8'm@6qFȉ2}m47bhc`Mph+ dnp($8D׬፫UȮ'rxoWp_v>N"0_mQsSM]lbܬؙ{0Μ5k(]9 9yqB\u)Aidڌ ^y~ _|Z:hi|oudoWp_vZt -. yԚܜ0k+j|!I#Rhqh$20<dN=DBoVpYC8Ց6>/*_ra{dw&ipZ\ipR.Ȯ'r"HK* d_@IdDj5Цd;3I7߻8' \;R"&5y)<.1RKkjɮNpnHY7 S-Z1Ag ›p`yڍk)7ݩUfyڄ6Y8T)[]|NfO 23c^Yt``~>; ָ@Bqq6;!@戲ȃiZ|tukVZo#8J^H;N4w+ɖ 2n*;t 1Yա6LLoYB V$C]Y{'Q Ę(k5!v"˰%<%BF"Q9œwH6mމ>ٶktP{6d`^;\ExN}雽mUI@—#k'D]zF#f=[wTmȮ'r4|gޝmFѮ(&OMM ` Ep@P,%D(0:1~*]_ w/׆Ew;"ῑ]|NȮ6GEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtW:r`WpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpX,*!1AQaq0 @P?!얰9 +pjg @ 8ސ$c&ǐ9ڈ9#P>09Ok6Yk(&;$^TnBlyuTzǫz=]cuWXGzǪ=]c=QWXuTzǫz=]c dӋ"()F608UK0 w.g1kU7 Z+B/UͿŠKU,piۿX4`LTٖk5p(nY($"+US1B:E :؂,^i ϩkRʁRu("`UEQ U"'(((((((((((($mU5&5J1.`A RLmc>/ yOsn?~7l߹~,Yc tWʤ( 73|73t7L3|7L3t73t7L3|7L3t73t7L3|7L3t*IaH #uݤ Xnhe SK0 PV cB!!]B&o(LUU! AKnV){B 6[|5*m9Oȕ uB0GUh;B&6IQs1 V@Q ĆRb80_),3",ŘbY1fQ##'E &@E"hZ-@E"hZ-@E"hZ-@E"hZ-@E"hZ-@E"hZ"2.Pu,P b <, <, <, <, <, <, <, <, <, <, <, <, <, <, <, VvRlt AkhDtD1(CIPS{5u{cY];.Q Us'o@,aC1  )r^+ Xx@NIr#R۪G@ K@:֑ kԦBHĜi YIX N''c0j5W1kfȤq9StMқ- *=U jκB(`aw=rɎA CB1`+@#7Jn)StzXL" xdHxd@jj5cЃZUF (32#: StMқ7J<ݰ'Jƒ-r/Icwǩ^(1gT*`Z(&9K"[ ذU3ϸd. ,}/$ xAcU )W5aTkUv sHc*QewǨtZbCJ_!g$Ʌ .vz+d6aVC""O(?"cBpK@ '<ԋ@ZbZWW+ǂ)Ŕ2gK 9؎.u.[E2="}~wϠ&FR5ZlGpLG(hh5I|ƥ$^dyM/BemU'!j X m8hejbcw YIra~qJrFK78AuErڱ{f/cU^ZlT$AQMc0T-GT3xgZƦc]Ohe Բ]e%h`☸bÒ{g0ke#\$.e@8jq `T/gJMq ꀀ47v*g4bn0YlLSX/kvnѹ χV֚7./M8DGc P:H @w,bh Ѝ-$AV OgJMVvRlt AkhDtD1(CIPS{5u{cY];.Q Us'o@,aC1  )r^+ Xx@NIr#R۪G@ K@:֑ kԦBHĜi YIX N''c0j5W1kfȤq9C.X=T$KA:eSl1e&8:g9 @ŀxjĂeQ\h`n'2Eh &B-WQ?>Pb5`EYїO *Eal RBX(`Kzq?1(8׎ŗ%ge&OMʢ~YP3jVU^"x8_+TxFQK /J"G9@4ou(}֛-1BDJc&uBmBj`-QbiW,$0peEr1 #1 ВJ"\}>AU4 M(W Lbx֤_ Һy^<M,:]PX"`GZhejbc0$p%\j[ V,* Rl_38d1ISbЙd[UIǁA!i[ae[8VvRltc({6+߶pcR9G2*]gQ\6^ًnc[(U bkGX#$l Q) *rօqt÷bS,!yhBu,YIAG~C.+j :h, YPC%@` c!\A5: !b  LF'&;ī0mݹtnH!a`ą%5wKm,N$$X@T +!K6ب4#@FàAuDՅx@cp= @"CaPZ( J Pz^;_ ]D18thwKil(<*=`c#uăFCJ\)0*lA4yDT5Op=%zkhNaBv3 K[fUz1xYhlIa#`ZiMfSǶδ+M0#\a 6@7edJ =]Op=y  wa hoTh*`1>0->0/6%^l^ãrA m`,$/(4n+\^h!bp!$"Ƿ{{%ge&OH`GDJ4;zWWQ N'55(3@[ 2v X3} ѐҗ%x5 G,"9^Q:U. %ge&OI`zd8|pPR^r$Fa)"qcP-뭔"* N yx s,d !@?* =ZtMқ7Jnʢ*PO(dLZ&v\~|V=5_jŠ?/B37Jn)StJM D y\ fԭXD$(DpULWX،@^ D1rh).Q <7xZb!1 V?_^(1gT*`Z(&9K"[ ذU3ϸd. ,}/$ xAcU )W5ar"-i<&_Q!PEgk *_UP1XNb oIq 2KzT^" %sVA?c,}UiL8š56e`@5[ް 6X%z3$* WhRMu:-{1h!^/ĒdÅ;=20ăBI+WG'LkmS0L_)Z.,1Hߘ4%uxx+,YC&t1#"]Rnl$Z^E5p='*J́7ԧ*QalD}3 YW(aͽb[6:XeVBD3B{Jmu@7=u\jh0:5^`9ZK(%RPnQ{h_`;XC}nsF&SɄh0|*%bnFXl{k/X!`q!~ E` iq]A I $y=%ge&O+;)6:z@D":"P@()ҽvbq=D(*P9 xUz0F!/S`< T'$؂9fiҩpk+;)6:zK$ 3М„fԷuFc&003 pL'?hxKǪh5g]lQPjq̓0LdS Y !ToXL" xdHxd@jj5cЃZUF (32#: StMқ7J; T@ל>JmJՊB@"O Tu=`)dRH(Mϰ:w(H>NbzaJc&uBmBj`-Q]LUTƙR0JtPkxNF;ID^ҧh ̖P;VvRlt0 )S^F¦̬kwQPZX9z&+DUBdEW8A!EeY!kو GY *~x$&,P!لf$IZ}@u@@Xs9JqQBP5]-I?)Z.,1Hߘ4%uxx+,YC&t1#"]Rnl$Z^FŇ|JML`%f{jS~(0F@YZ +0Ջ1|tڬp2իe " Bhkdj=6N_:Ю54vCp{E/0-߈N|])(7(v=VvRlt4 /X݇T,QS9pd`|@ؕx {[#w,6|=8Ѹqzm$<cp= @"CaPZ( J Pz^;_ ]D18thwKil(<*=`c#uăFCJ\)0*lA4yDT5Op=%zkhNaBv3 K[fUz1xYhlI]0w(4N5 " 8eU>~w; 14laZAd(S0uMX3r72sBMV"L0pCƷecEf -1d4xL^pg@CfhI%j >}bq *RDU? ZIVZ<ԋ@ZbZWW+ǂ)Ŕ2gK 9؎.u.[EE%ge&OIʦ0`bg 5)ʿcq[# Q,L`usoj혾VMmV8xjղP!F}52FPқ]P/mhWL;p`F! u=mo'R>.uzg+;)6:zX,ê(AۀщTdb}a0Z}L `_lJ cؽۑF> XH_QXZhWt6BBIEo YIJMVvRltcp?{Fق@Vk)JR)JR)JR)JR)JR)JR)JR(56N#&>&hg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xa* у Z!)瞷Nx:玹D,fQS 0}}}}}y08 0 0 0 0 0 < 0Ì0 0L0 0O0 X3BvpW $P* XiiZ/0&;rV*%t cBP^m%[WJTV q1J-ث6!|F&L&5FҢa&LVMF]AKE _~ֲ L$I%DΉ[km%^MDjWaʊBGwnv(SEo~Օ#vd/ܹ{jE&L(z$P*}k(pDM[km%^MDjWaʊst6XSUo)!1a AQq0@P`p?DM:)RR'vpN 8'pN 8'pN 8'pN 6-k<"9: 4ϖ*x-[ d*V?$7MD4DMǷEMdWJi])*O*m=یAE:D3wj%~;D{&J!ks)*!1AQaq0 @P?2Xja(,:qo)6Jޑ<56UxET 8%P:Αp7cۊ# )-*Ţ%P8FEI3 s\!徛ϖ7?/t/g&<91vϯ&vɏ'}y3Ly?ɝrcx^LOlgm;gׇ_ڪ WB]/o#h@\0Z+1cPJt0,t.`/{oЊ.88lfPA(xItE96(M12ֳ̔y|P߅UD2<22}+?neU\ĸйQh͎yJq4-.2)c A4u9rW9^+xąqM^3ؿ/1Dŵk<$H"D$H"D$H"D$H"D$H"D$H"DYAX qbK ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> yo7}<UL=/N,Wa!9EnH1l# hNr«iR_q4! \9agc}ִxČgpjXc{qDXo  uØضe (*vf1}#E3vʌXDMCE3)L4J=a\,賙mC+GU"o7}>Š7[D-z 2aUNjmu1X&XPcx;Zӕ>6< NtDg\qk]t4B HT+(B j A(BT6Un " ,\@àn%:Ʊ 918F3`E_J,.7.s:(`[槐TY v"4JK&dFXU%=! . }L0\;7Da"wbs:)L}HĬ3?vwӭW d&2\DO7Jmr'א5Ĕؐ9f9Q2)o+ NU Jf7S:Ȭ " 9ùE["VYpvnP9)Wڳ.Ԙ ".A9pb0oKk)8s`*0gˠIUR 3\Hb`29엦in\fFuY@"fN!j݅e!gx\zX 04|ϵػy%,CU^ f@3BM9Kud)BC[a)X2e p5$|,7ngR ߏw`ȢupQ`bbiSdFQ\ep x~kT brR5vUxCr<ӱdԆ$Bi\` gw.nOUSKӇ0%mHNQ[ qvu7!lZ&?ܰZTWM7GHBc,BC2~81#vxs$l9emCf0-Yv4; :p6sHL0DPLJS' w8i>W!%:,q|f?gsP'6 /=HO x tLXE;hfGcLy, &֣4OH(V@$ Qq״ X^%z0UE0qI xh >󏡥oQgBlZ/(x.V0ɬ^748ETo^0ZYH$Xi$m+QhKX\EazۑBvMuk)m^S j sP b6 ,vLJwŽ@Yg !%~b(J=MiEZQ(Mw#Jp/V)S0D.t+?w4a;ߊą@-XxV5GL3@ёucԥB, J<[a#8ZDep<8j0 /qBv0S2IוA0_؄I4Fu}wCD!āHd*аN4 pAx?E.h* шåtRXfHfg[ Y/sX\n\%u;ZPO =hEfi,LB>DJ^{_oьB]@a :wn2D63;o7}<:ߵ|p/a`Jbc!eDބњ,Rpy C\IH ^Öc(r`rm`P@fcz3 ;dX̡u)jjVxM>B I;r(X XA&+SpF6#q$U"5}&##zi)|6̾ΖntgY)dVXI"VwUI]IR5Ufd=$$ӝԷPNBm@( Xd5q /LmU*_]wRA w`H0 "zvu+ 0ۮ~'QG )i/6(FU0Dm h[ WǏw통@v'),CWj\7)d;KnjW+s M;MHk L*o5{~b]j^U08{([]Ԅ] g]|0na; K?mtt&0 r!;c!Z1GgYa1jbMCP,1c`Kb%cC\,ٚSi4w*1c4E ]aESAÛ"=Bv*'56ͺnj,Xc,(MQFiʟ;s.P,C@H9'ti `5 K`,a}CK*ޣ/sش_:N]{s9z{އmBQN\UaYni$p ؊޼`HvHWhЖ#ָ+ "+"*egN{އ=C{s9KOEPziw= Z ʬjfL"53| эtk9w1R S:Z m!P a(%] Nط\+־Ht iST- !I9[.'J-QE-)ZHN\Ubb@EE)x^@%2_9d^=>/l=;r#\ Z1!On"io!"6z/ᶫDF|@x]7'&d?ogc0AXp,M4kZ"Su26VU<: bl̦)M2 bb8й3 :Yo='pրF3bE1ArShJ*EDq5D6ӏAR *CJ2L%akCZ‘O.RPF:ȅݠW~'b$kZ}5 U" -B®FZ98JU= @q!/06[xqa !*(C?_mvwӭW d&2\DO7Jmr'א5Ĕؐ9f9Q2)o+ NU Jf7S:Ȭ " 9ùE["VYpvnP9)Wڳ.Ԙ ".A9pb0oKk)8s`*0gˠIUR 3\=IR5Ufd=$$ӝԷPNBm@( Xd5q /LmU*_]wRA w`H0 "zvu+ 0ۮ~'QG )i/6(FU0Dm h[ WǏwػyԽazpQf +pA.λf`$-Dv\ Jj~ۉL`CvC;$c8SVێb "ě~m,X-cŶK.Ƈ|YAS44Qi)Tb"h)o7}>Š7[D-z 2aUNjmu1X&XPcx;Zӕ>6UG ^5 ht>»7Ǟ{s9z.2✹Z#&1xH!Qxie a쑴E,GacpWlDWnE UbΜ{އ=C{s5y3=(y6iGi7o`BӉ܎I)(TF XNp4A@Ьߦ|M~({8aX< 0=˜ FDkfjBijfw)DpP)U6eje AVG. 'pp[_$:WêwVfym-œW%QS+ J~m Z*('EvLI-6@$"xdەxŖRщ D{t`Myn9}5P0ѭ}Ox2rfCFy3 LqBOQ醰%7S+Ce`%PCà!j`po N/p+ ,c c0q5vxК/K`EmNou?|Wo*TKi$`gN> J<誺F)+Dq0" UsqA k E<.fկ /;&θ43]>ﱮh8"WQl^r2AƂP9lDY|@!Kuc !rcB Ax}O(GN_ X.p@YqAQǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ b'_|3φ}x,gtkextra-3.2.0/docs/reference/html/GtkPlotBox.html0000644000076400001440000002033112604172532017044 00000000000000 GtkPlotBox

GtkPlotBox

GtkPlotBox

Synopsis


#include <gtkextra.h>

                    GtkPlotBox;
GtkWidget*          gtk_plot_box_new                    (GtkOrientation orientation);
void                gtk_plot_box_construct              (GtkPlotBox *box,
                                                         GtkOrientation orientation);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotBox

Implemented Interfaces

GtkPlotBox implements AtkImplementorIface and GtkBuildable.

Properties

  "orientation"              GtkOrientation        : Read / Write

Description

FIXME:: need long description.

Details

GtkPlotBox

typedef struct _GtkPlotBox GtkPlotBox;

The GtkPlotBox struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_box_new ()

GtkWidget*          gtk_plot_box_new                    (GtkOrientation orientation);

Create a new GtkPlotBox widget.

orientation :

GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL.

Returns :

a new GtkWidget.

gtk_plot_box_construct ()

void                gtk_plot_box_construct              (GtkPlotBox *box,
                                                         GtkOrientation orientation);

Initializes a GtkPlotBar structure.

box :

a GtkPlotBox widget.

orientation :

GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL.

Property Details

The "orientation" property

  "orientation"              GtkOrientation        : Read / Write

Orientation.

Default value: GTK_ORIENTATION_HORIZONTAL

gtkextra-3.2.0/docs/reference/html/GtkPlot3D.html0000644000076400001440000041010712604172532016566 00000000000000 GtkPlot3D

GtkPlot3D

GtkPlot3D — 3d scientific plots widget

Synopsis


#include <gtkextra.h>

                    GtkPlot3D;
enum                GtkPlotPlane;
enum                GtkPlotSide;
GtkWidget*          gtk_plot3d_new                      (GdkDrawable *drawable);
GtkWidget*          gtk_plot3d_new_with_size            (GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot3d_construct                (GtkPlot3D *plot,
                                                         GdkDrawable *drawable);
void                gtk_plot3d_construct_with_size      (GtkPlot3D *plot,
                                                         GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot3d_autoscale                (GtkPlot3D *plot);
void                gtk_plot3d_rotate                   (GtkPlot3D *plot,
                                                         gdouble angle_x,
                                                         gdouble angle_y,
                                                         gdouble angle_z);
void                gtk_plot3d_rotate_vector            (GtkPlot3D *plot,
                                                         GtkPlotVector *vector,
                                                         gdouble a1,
                                                         gdouble a2,
                                                         gdouble a3);
void                gtk_plot3d_reset_angles             (GtkPlot3D *plot);
void                gtk_plot3d_rotate_x                 (GtkPlot3D *plot,
                                                         gdouble angle);
void                gtk_plot3d_rotate_y                 (GtkPlot3D *plot,
                                                         gdouble angle);
void                gtk_plot3d_rotate_z                 (GtkPlot3D *plot,
                                                         gdouble angle);
void                gtk_plot3d_get_pixel                (GtkPlot3D *plot,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble z,
                                                         gdouble *px,
                                                         gdouble *py,
                                                         gdouble *pz);
void                gtk_plot3d_set_xrange               (GtkPlot3D *plot,
                                                         gdouble min,
                                                         gdouble max);
void                gtk_plot3d_set_yrange               (GtkPlot3D *plot,
                                                         gdouble min,
                                                         gdouble max);
void                gtk_plot3d_set_zrange               (GtkPlot3D *plot,
                                                         gdouble min,
                                                         gdouble max);
void                gtk_plot3d_set_xfactor              (GtkPlot3D *plot,
                                                         gdouble xfactor);
void                gtk_plot3d_set_yfactor              (GtkPlot3D *plot,
                                                         gdouble yfactor);
void                gtk_plot3d_set_zfactor              (GtkPlot3D *plot,
                                                         gdouble zfactor);
gdouble             gtk_plot3d_get_xfactor              (GtkPlot3D *plot);
gdouble             gtk_plot3d_get_yfactor              (GtkPlot3D *plot);
gdouble             gtk_plot3d_get_zfactor              (GtkPlot3D *plot);
void                gtk_plot3d_plane_set_color          (GtkPlot3D *plot,
                                                         GtkPlotPlane plane,
                                                         const GdkColor *color);
void                gtk_plot3d_plane_set_visible        (GtkPlot3D *plot,
                                                         GtkPlotPlane plane,
                                                         gboolean visible);
gboolean            gtk_plot3d_plane_visible            (GtkPlot3D *plot,
                                                         GtkPlotPlane plane);
void                gtk_plot3d_corner_set_visible       (GtkPlot3D *plot,
                                                         gboolean visible);
gboolean            gtk_plot3d_corner_visible           (GtkPlot3D *plot);
void                gtk_plot3d_corner_set_attributes    (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot3d_corner_get_attributes    (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);
void                gtk_plot3d_frame_set_attributes     (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot3d_frame_get_attributes     (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);
GtkPlotAxis *       gtk_plot3d_get_axis                 (GtkPlot3D *plot,
                                                         GtkPlotOrientation orientation);
GtkPlotAxis *       gtk_plot3d_get_side                 (GtkPlot3D *plot,
                                                         GtkPlotSide side);
void                gtk_plot3d_show_major_ticks         (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint ticks_mask);
void                gtk_plot3d_show_minor_ticks         (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint ticks_mask);
void                gtk_plot3d_show_labels              (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint label_mask);
void                gtk_plot3d_show_title               (GtkPlot3D *plot,
                                                         GtkPlotSide side);
void                gtk_plot3d_hide_title               (GtkPlot3D *plot,
                                                         GtkPlotSide side);
void                gtk_plot3d_set_ticks                (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gdouble major_step,
                                                         gint nminor);
void                gtk_plot3d_set_major_ticks          (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gdouble major_step);
void                gtk_plot3d_set_minor_ticks          (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gint nminor);
void                gtk_plot3d_set_ticks_length         (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gint length);
void                gtk_plot3d_set_ticks_width          (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gfloat width);
void                gtk_plot3d_show_ticks               (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint major_mask,
                                                         gint minor_mask);
void                gtk_plot3d_set_titles_offset        (GtkPlot3D *plot,
                                                         gint offset);
gint                gtk_plot3d_get_titles_offset        (GtkPlot3D *plot);
void                gtk_plot3d_set_scale                (GtkPlot3D *plot,
                                                         GtkPlotOrientation axis,
                                                         GtkPlotScale scale);
GtkPlotScale        gtk_plot3d_get_scale                (GtkPlot3D *plot,
                                                         GtkPlotOrientation axis);
void                gtk_plot3d_major_grids_set_visible  (GtkPlot3D *plot,
                                                         gboolean x,
                                                         gboolean y,
                                                         gboolean z);
void                gtk_plot3d_minor_grids_set_visible  (GtkPlot3D *plot,
                                                         gboolean x,
                                                         gboolean y,
                                                         gboolean z);
void                gtk_plot3d_major_grids_visible      (GtkPlot3D *plot,
                                                         gboolean *x,
                                                         gboolean *y,
                                                         gboolean *z);
void                gtk_plot3d_minor_grids_visible      (GtkPlot3D *plot,
                                                         gboolean *x,
                                                         gboolean *y,
                                                         gboolean *z);
void                gtk_plot3d_major_zgrid_set_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot3d_major_zgrid_get_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);
void                gtk_plot3d_minor_zgrid_set_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot3d_minor_zgrid_get_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkMisc
                           +----GtkPlot
                                 +----GtkPlot3D

Implemented Interfaces

GtkPlot3D implements AtkImplementorIface and GtkBuildable.

Properties

  "a1"                       gdouble               : Read / Write
  "a2"                       gdouble               : Read / Write
  "a3"                       gdouble               : Read / Write
  "center-vector"            gpointer              : Read / Write
  "color-xy"                 gpointer              : Read / Write
  "color-yz"                 gpointer              : Read / Write
  "color-zx"                 gpointer              : Read / Write
  "corner-line"              gpointer              : Read / Write
  "corner-visible"           gboolean              : Read / Write
  "e1-vector"                gpointer              : Read / Write
  "e2-vector"                gpointer              : Read / Write
  "e3-vector"                gpointer              : Read / Write
  "frame-line"               gpointer              : Read / Write
  "origin-vector"            gpointer              : Read / Write
  "titles-offset"            gint                  : Read / Write
  "xfactor"                  gdouble               : Read / Write
  "xy-label-mask"            gint                  : Read / Write
  "xy-major-mask"            gint                  : Read / Write
  "xy-minor-mask"            gint                  : Read / Write
  "xy-title-visible"         gboolean              : Read / Write
  "xy-visible"               gboolean              : Read / Write
  "xz-label-mask"            gint                  : Read / Write
  "xz-major-mask"            gint                  : Read / Write
  "xz-minor-mask"            gint                  : Read / Write
  "xz-title-visible"         gboolean              : Read / Write
  "yfactor"                  gdouble               : Read / Write
  "yx-label-mask"            gint                  : Read / Write
  "yx-major-mask"            gint                  : Read / Write
  "yx-minor-mask"            gint                  : Read / Write
  "yx-title-visible"         gboolean              : Read / Write
  "yz-label-mask"            gint                  : Read / Write
  "yz-major-mask"            gint                  : Read / Write
  "yz-minor-mask"            gint                  : Read / Write
  "yz-title-visible"         gboolean              : Read / Write
  "yz-visible"               gboolean              : Read / Write
  "zfactor"                  gdouble               : Read / Write
  "zmax"                     gdouble               : Read / Write
  "zmin"                     gdouble               : Read / Write
  "zscale"                   gint                  : Read / Write
  "zx-label-mask"            gint                  : Read / Write
  "zx-major-mask"            gint                  : Read / Write
  "zx-minor-mask"            gint                  : Read / Write
  "zx-title-visible"         gboolean              : Read / Write
  "zx-visible"               gboolean              : Read / Write
  "zy-label-mask"            gint                  : Read / Write
  "zy-major-mask"            gint                  : Read / Write
  "zy-minor-mask"            gint                  : Read / Write
  "zy-title-visible"         gboolean              : Read / Write

Description

FIXME:: Need long description.

Details

GtkPlot3D

typedef struct _GtkPlot3D GtkPlot3D;

The GtkPlot3D struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotPlane

typedef enum
{
  GTK_PLOT_PLANE_XY	= 0,
  GTK_PLOT_PLANE_YX	= 0,
  GTK_PLOT_PLANE_XZ	= 1,
  GTK_PLOT_PLANE_ZX	= 1,
  GTK_PLOT_PLANE_YZ	= 2,
  GTK_PLOT_PLANE_ZY	= 2,
} GtkPlotPlane;


enum GtkPlotSide

typedef enum
{
  GTK_PLOT_SIDE_XY	= 1 << 0 ,
  GTK_PLOT_SIDE_XZ	= 1 << 1 ,
  GTK_PLOT_SIDE_YX	= 1 << 2 ,
  GTK_PLOT_SIDE_YZ	= 1 << 3 ,
  GTK_PLOT_SIDE_ZX	= 1 << 4 ,
  GTK_PLOT_SIDE_ZY	= 1 << 5 ,
} GtkPlotSide;


gtk_plot3d_new ()

GtkWidget*          gtk_plot3d_new                      (GdkDrawable *drawable);

drawable :

a Gdk drawable.

Returns :


gtk_plot3d_new_with_size ()

GtkWidget*          gtk_plot3d_new_with_size            (GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);

drawable :

a Gdk drawable.

width :

height :

Returns :


gtk_plot3d_construct ()

void                gtk_plot3d_construct                (GtkPlot3D *plot,
                                                         GdkDrawable *drawable);

plot :

a GtkPlot3D widget.

drawable :

a Gdk drawable.

gtk_plot3d_construct_with_size ()

void                gtk_plot3d_construct_with_size      (GtkPlot3D *plot,
                                                         GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);

plot :

a GtkPlot3D widget.

drawable :

a Gdk drawable.

width :

height :


gtk_plot3d_autoscale ()

void                gtk_plot3d_autoscale                (GtkPlot3D *plot);

plot :

a GtkPlot3D widget.

gtk_plot3d_rotate ()

void                gtk_plot3d_rotate                   (GtkPlot3D *plot,
                                                         gdouble angle_x,
                                                         gdouble angle_y,
                                                         gdouble angle_z);

plot :

a GtkPlot3D widget.

angle_x :

angle_y :

angle_z :


gtk_plot3d_rotate_vector ()

void                gtk_plot3d_rotate_vector            (GtkPlot3D *plot,
                                                         GtkPlotVector *vector,
                                                         gdouble a1,
                                                         gdouble a2,
                                                         gdouble a3);

plot :

a GtkPlot3D widget.

vector :

a1 :

a2 :

a3 :


gtk_plot3d_reset_angles ()

void                gtk_plot3d_reset_angles             (GtkPlot3D *plot);

plot :

a GtkPlot3D widget.

gtk_plot3d_rotate_x ()

void                gtk_plot3d_rotate_x                 (GtkPlot3D *plot,
                                                         gdouble angle);

plot :

a GtkPlot3D widget.

angle :


gtk_plot3d_rotate_y ()

void                gtk_plot3d_rotate_y                 (GtkPlot3D *plot,
                                                         gdouble angle);

plot :

a GtkPlot3D widget.

angle :


gtk_plot3d_rotate_z ()

void                gtk_plot3d_rotate_z                 (GtkPlot3D *plot,
                                                         gdouble angle);

plot :

a GtkPlot3D widget.

angle :


gtk_plot3d_get_pixel ()

void                gtk_plot3d_get_pixel                (GtkPlot3D *plot,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble z,
                                                         gdouble *px,
                                                         gdouble *py,
                                                         gdouble *pz);

plot :

a GtkPlot3D widget.

x :

y :

z :

px :

py :

pz :


gtk_plot3d_set_xrange ()

void                gtk_plot3d_set_xrange               (GtkPlot3D *plot,
                                                         gdouble min,
                                                         gdouble max);

plot :

a GtkPlot3D widget.

min :

max :


gtk_plot3d_set_yrange ()

void                gtk_plot3d_set_yrange               (GtkPlot3D *plot,
                                                         gdouble min,
                                                         gdouble max);

plot :

a GtkPlot3D widget.

min :

max :


gtk_plot3d_set_zrange ()

void                gtk_plot3d_set_zrange               (GtkPlot3D *plot,
                                                         gdouble min,
                                                         gdouble max);

plot :

a GtkPlot3D widget.

min :

max :


gtk_plot3d_set_xfactor ()

void                gtk_plot3d_set_xfactor              (GtkPlot3D *plot,
                                                         gdouble xfactor);

plot :

a GtkPlot3D widget.

xfactor :


gtk_plot3d_set_yfactor ()

void                gtk_plot3d_set_yfactor              (GtkPlot3D *plot,
                                                         gdouble yfactor);

plot :

a GtkPlot3D widget.

yfactor :


gtk_plot3d_set_zfactor ()

void                gtk_plot3d_set_zfactor              (GtkPlot3D *plot,
                                                         gdouble zfactor);

plot :

a GtkPlot3D widget.

zfactor :


gtk_plot3d_get_xfactor ()

gdouble             gtk_plot3d_get_xfactor              (GtkPlot3D *plot);

plot :

a GtkPlot3D widget.

Returns :


gtk_plot3d_get_yfactor ()

gdouble             gtk_plot3d_get_yfactor              (GtkPlot3D *plot);

plot :

a GtkPlot3D widget.

Returns :


gtk_plot3d_get_zfactor ()

gdouble             gtk_plot3d_get_zfactor              (GtkPlot3D *plot);

plot :

a GtkPlot3D widget.

Returns :


gtk_plot3d_plane_set_color ()

void                gtk_plot3d_plane_set_color          (GtkPlot3D *plot,
                                                         GtkPlotPlane plane,
                                                         const GdkColor *color);

plot :

plane :

color :


gtk_plot3d_plane_set_visible ()

void                gtk_plot3d_plane_set_visible        (GtkPlot3D *plot,
                                                         GtkPlotPlane plane,
                                                         gboolean visible);

plot :

plane :

visible :


gtk_plot3d_plane_visible ()

gboolean            gtk_plot3d_plane_visible            (GtkPlot3D *plot,
                                                         GtkPlotPlane plane);

plot :

a GtkPlot3D widget.

plane :

Returns :


gtk_plot3d_corner_set_visible ()

void                gtk_plot3d_corner_set_visible       (GtkPlot3D *plot,
                                                         gboolean visible);

plot :

a GtkPlot3D widget.

visible :


gtk_plot3d_corner_visible ()

gboolean            gtk_plot3d_corner_visible           (GtkPlot3D *plot);

plot :

a GtkPlot3D widget.

Returns :


gtk_plot3d_corner_set_attributes ()

void                gtk_plot3d_corner_set_attributes    (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot3D widget.

style :

width :

color :


gtk_plot3d_corner_get_attributes ()

void                gtk_plot3d_corner_get_attributes    (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);

plot :

style :

width :

color :


gtk_plot3d_frame_set_attributes ()

void                gtk_plot3d_frame_set_attributes     (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot3D widget.

style :

width :

color :


gtk_plot3d_frame_get_attributes ()

void                gtk_plot3d_frame_get_attributes     (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);

plot :

a GtkPlot3D widget.

style :

width :

color :


gtk_plot3d_get_axis ()

GtkPlotAxis *       gtk_plot3d_get_axis                 (GtkPlot3D *plot,
                                                         GtkPlotOrientation orientation);

plot :

a GtkPlot3D widget.

orientation :

of axis to be returned

Returns :

(transfer none) the GtkPlotAxis with given orientation

gtk_plot3d_get_side ()

GtkPlotAxis *       gtk_plot3d_get_side                 (GtkPlot3D *plot,
                                                         GtkPlotSide side);

plot :

a GtkPlot3D widget.

side :

GtkPlotSide of the wanted axis

Returns :

transfer none. transfer none.

gtk_plot3d_show_major_ticks ()

void                gtk_plot3d_show_major_ticks         (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint ticks_mask);

plot :

a GtkPlot3D widget.

side :

ticks_mask :


gtk_plot3d_show_minor_ticks ()

void                gtk_plot3d_show_minor_ticks         (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint ticks_mask);

plot :

a GtkPlot3D widget.

side :

ticks_mask :


gtk_plot3d_show_labels ()

void                gtk_plot3d_show_labels              (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint label_mask);

plot :

a GtkPlot3D widget.

side :

label_mask :


gtk_plot3d_show_title ()

void                gtk_plot3d_show_title               (GtkPlot3D *plot,
                                                         GtkPlotSide side);

plot :

a GtkPlot3D widget.

side :


gtk_plot3d_hide_title ()

void                gtk_plot3d_hide_title               (GtkPlot3D *plot,
                                                         GtkPlotSide side);

plot :

a GtkPlot3D widget.

side :


gtk_plot3d_set_ticks ()

void                gtk_plot3d_set_ticks                (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gdouble major_step,
                                                         gint nminor);

plot :

a GtkPlot3D widget.

direction :

major_step :

nminor :


gtk_plot3d_set_major_ticks ()

void                gtk_plot3d_set_major_ticks          (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gdouble major_step);

plot :

a GtkPlot3D widget.

direction :

major_step :


gtk_plot3d_set_minor_ticks ()

void                gtk_plot3d_set_minor_ticks          (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gint nminor);

plot :

a GtkPlot3D widget.

direction :

nminor :


gtk_plot3d_set_ticks_length ()

void                gtk_plot3d_set_ticks_length         (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gint length);

plot :

a GtkPlot3D widget.

direction :

length :


gtk_plot3d_set_ticks_width ()

void                gtk_plot3d_set_ticks_width          (GtkPlot3D *plot,
                                                         GtkPlotOrientation direction,
                                                         gfloat width);

plot :

a GtkPlot3D widget.

direction :

width :


gtk_plot3d_show_ticks ()

void                gtk_plot3d_show_ticks               (GtkPlot3D *plot,
                                                         GtkPlotSide side,
                                                         gint major_mask,
                                                         gint minor_mask);

plot :

a GtkPlot3D widget.

side :

major_mask :

minor_mask :


gtk_plot3d_set_titles_offset ()

void                gtk_plot3d_set_titles_offset        (GtkPlot3D *plot,
                                                         gint offset);

plot :

a GtkPlot3D widget. offset

offset :


gtk_plot3d_get_titles_offset ()

gint                gtk_plot3d_get_titles_offset        (GtkPlot3D *plot);

plot :

a GtkPlot3D widget.

Returns :


gtk_plot3d_set_scale ()

void                gtk_plot3d_set_scale                (GtkPlot3D *plot,
                                                         GtkPlotOrientation axis,
                                                         GtkPlotScale scale);

plot :

a GtkPlot3D widget.

axis :

scale :


gtk_plot3d_get_scale ()

GtkPlotScale        gtk_plot3d_get_scale                (GtkPlot3D *plot,
                                                         GtkPlotOrientation axis);

plot :

a GtkPlot3D widget.

axis :

Returns :


gtk_plot3d_major_grids_set_visible ()

void                gtk_plot3d_major_grids_set_visible  (GtkPlot3D *plot,
                                                         gboolean x,
                                                         gboolean y,
                                                         gboolean z);

plot :

a GtkPlot3D widget.

x :

y :

z :


gtk_plot3d_minor_grids_set_visible ()

void                gtk_plot3d_minor_grids_set_visible  (GtkPlot3D *plot,
                                                         gboolean x,
                                                         gboolean y,
                                                         gboolean z);

plot :

a GtkPlot3D widget.

x :

y :

z :


gtk_plot3d_major_grids_visible ()

void                gtk_plot3d_major_grids_visible      (GtkPlot3D *plot,
                                                         gboolean *x,
                                                         gboolean *y,
                                                         gboolean *z);

plot :

a GtkPlot3D widget.

x :

y :

z :


gtk_plot3d_minor_grids_visible ()

void                gtk_plot3d_minor_grids_visible      (GtkPlot3D *plot,
                                                         gboolean *x,
                                                         gboolean *y,
                                                         gboolean *z);

plot :

a GtkPlot3D widget.

x :

y :

z :


gtk_plot3d_major_zgrid_set_attributes ()

void                gtk_plot3d_major_zgrid_set_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot3D widget.

style :

width :

color :


gtk_plot3d_major_zgrid_get_attributes ()

void                gtk_plot3d_major_zgrid_get_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);

plot :

a GtkPlot3D widget.

style :

width :

color :


gtk_plot3d_minor_zgrid_set_attributes ()

void                gtk_plot3d_minor_zgrid_set_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot3D widget.

style :

width :

color :


gtk_plot3d_minor_zgrid_get_attributes ()

void                gtk_plot3d_minor_zgrid_get_attributes
                                                        (GtkPlot3D *plot,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);

plot :

a GtkPlot3D widget.

style :

width :

color :

Property Details

The "a1" property

  "a1"                       gdouble               : Read / Write

Default value: 0


The "a2" property

  "a2"                       gdouble               : Read / Write

Default value: 0


The "a3" property

  "a3"                       gdouble               : Read / Write

Default value: 0


The "center-vector" property

  "center-vector"            gpointer              : Read / Write

Position of the center point.


The "color-xy" property

  "color-xy"                 gpointer              : Read / Write

Color of XY Plane.


The "color-yz" property

  "color-yz"                 gpointer              : Read / Write

Color of YZ Plane.


The "color-zx" property

  "color-zx"                 gpointer              : Read / Write

Color of ZX Plane.


The "corner-line" property

  "corner-line"              gpointer              : Read / Write

Corner Line.


The "corner-visible" property

  "corner-visible"           gboolean              : Read / Write

Draw the entire cube.

Default value: FALSE


The "e1-vector" property

  "e1-vector"                gpointer              : Read / Write

Vector e1.


The "e2-vector" property

  "e2-vector"                gpointer              : Read / Write

Vector e2.


The "e3-vector" property

  "e3-vector"                gpointer              : Read / Write

Vector e3.


The "frame-line" property

  "frame-line"               gpointer              : Read / Write

Frame Line.


The "origin-vector" property

  "origin-vector"            gpointer              : Read / Write

Position of the origin.


The "titles-offset" property

  "titles-offset"            gint                  : Read / Write

Titles distance from the axes.

Allowed values: >= -2147483647

Default value: 0


The "xfactor" property

  "xfactor"                  gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "xy-label-mask" property

  "xy-label-mask"            gint                  : Read / Write

XY label mask.

Allowed values: [0,3]

Default value: 0


The "xy-major-mask" property

  "xy-major-mask"            gint                  : Read / Write

XY major mask.

Allowed values: [0,3]

Default value: 0


The "xy-minor-mask" property

  "xy-minor-mask"            gint                  : Read / Write

XY minor mask.

Allowed values: [0,3]

Default value: 0


The "xy-title-visible" property

  "xy-title-visible"         gboolean              : Read / Write

XY title Visible.

Default value: FALSE


The "xy-visible" property

  "xy-visible"               gboolean              : Read / Write

XY Plane visible.

Default value: FALSE


The "xz-label-mask" property

  "xz-label-mask"            gint                  : Read / Write

XZ label mask.

Allowed values: [0,3]

Default value: 0


The "xz-major-mask" property

  "xz-major-mask"            gint                  : Read / Write

XZ major mask.

Allowed values: [0,3]

Default value: 0


The "xz-minor-mask" property

  "xz-minor-mask"            gint                  : Read / Write

XZ minor mask.

Allowed values: [0,3]

Default value: 0


The "xz-title-visible" property

  "xz-title-visible"         gboolean              : Read / Write

XZ title Visible.

Default value: FALSE


The "yfactor" property

  "yfactor"                  gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "yx-label-mask" property

  "yx-label-mask"            gint                  : Read / Write

YX label mask.

Allowed values: [0,3]

Default value: 0


The "yx-major-mask" property

  "yx-major-mask"            gint                  : Read / Write

YX major mask.

Allowed values: [0,3]

Default value: 0


The "yx-minor-mask" property

  "yx-minor-mask"            gint                  : Read / Write

YX minor mask.

Allowed values: [0,3]

Default value: 0


The "yx-title-visible" property

  "yx-title-visible"         gboolean              : Read / Write

YX title Visible.

Default value: FALSE


The "yz-label-mask" property

  "yz-label-mask"            gint                  : Read / Write

YZ label mask.

Allowed values: [0,3]

Default value: 0


The "yz-major-mask" property

  "yz-major-mask"            gint                  : Read / Write

YZ major mask.

Allowed values: [0,3]

Default value: 0


The "yz-minor-mask" property

  "yz-minor-mask"            gint                  : Read / Write

YZ minor mask.

Allowed values: [0,3]

Default value: 0


The "yz-title-visible" property

  "yz-title-visible"         gboolean              : Read / Write

YZ title Visible.

Default value: FALSE


The "yz-visible" property

  "yz-visible"               gboolean              : Read / Write

YZ Plane visible.

Default value: FALSE


The "zfactor" property

  "zfactor"                  gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "zmax" property

  "zmax"                     gdouble               : Read / Write

Default value: 0


The "zmin" property

  "zmin"                     gdouble               : Read / Write

Default value: 0


The "zscale" property

  "zscale"                   gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "zx-label-mask" property

  "zx-label-mask"            gint                  : Read / Write

ZX label mask.

Allowed values: [0,3]

Default value: 0


The "zx-major-mask" property

  "zx-major-mask"            gint                  : Read / Write

ZX major mask.

Allowed values: [0,3]

Default value: 0


The "zx-minor-mask" property

  "zx-minor-mask"            gint                  : Read / Write

ZX minor mask.

Allowed values: [0,3]

Default value: 0


The "zx-title-visible" property

  "zx-title-visible"         gboolean              : Read / Write

ZX title Visible.

Default value: FALSE


The "zx-visible" property

  "zx-visible"               gboolean              : Read / Write

ZX Plane visible.

Default value: FALSE


The "zy-label-mask" property

  "zy-label-mask"            gint                  : Read / Write

ZY label mask.

Allowed values: [0,3]

Default value: 0


The "zy-major-mask" property

  "zy-major-mask"            gint                  : Read / Write

ZY major mask.

Allowed values: [0,3]

Default value: 0


The "zy-minor-mask" property

  "zy-minor-mask"            gint                  : Read / Write

ZY minor mask.

Allowed values: [0,3]

Default value: 0


The "zy-title-visible" property

  "zy-title-visible"         gboolean              : Read / Write

ZY title Visible.

Default value: FALSE

gtkextra-3.2.0/docs/reference/html/GtkPlot.html0000644000076400001440000103162112604172532016400 00000000000000 GtkPlot

GtkPlot

GtkPlot — 2d scientific plots widget

Synopsis


#include <gtkextra.h>

                    GtkPlot;
                    GtkPlotAxis;
                    GtkPlotText;
                    GtkPlotLine;
                    GtkPlotSymbol;
                    GtkPlotTick;
                    GtkPlotTicks;
                    GtkPlotVector;
                    GtkPlotMarker;
gdouble             (*GtkPlotFunc)                      (GtkPlot *plot,
                                                         GtkPlotData *data,
                                                         gdouble x,
                                                         gboolean *error);
gdouble             (*GtkPlotFunc3D)                    (GtkPlot *plot,
                                                         GtkPlotData *data,
                                                         gdouble x,
                                                         gdouble y,
                                                         gboolean *error);
void                (*GtkPlotIterator)                  (GtkPlot *plot,
                                                         GtkPlotData *data,
                                                         gint iter,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *z,
                                                         gdouble *a,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gdouble *dz,
                                                         gdouble *da,
                                                         gchar **label,
                                                         gboolean *error);
enum                GtkPlotScale;
enum                GtkPlotSymbolType;
enum                GtkPlotSymbolStyle;
enum                GtkPlotBorderStyle;
enum                GtkPlotLineStyle;
enum                GtkPlotConnector;
enum                GtkPlotLabelPos;
enum                GtkPlotError;
enum                GtkPlotOrientation;
enum                GtkPlotAxisPos;
enum                GtkPlotLabelStyle;
enum                GtkPlotTicksPos;
void                (*GtkPlotTicksAutoscaleFunc)        (GtkPlotAxis *axis,
                                                         gdouble xmin,
                                                         gdouble xmax,
                                                         gint *precision);
gdouble             (*GtkPlotTicksInverseFunc)          (GtkPlotAxis *axis,
                                                         gdouble y);
void                (*GtkPlotTicksRecalcFunc)           (GtkPlotAxis *axis);
gdouble             (*GtkPlotTicksTransformFunc)        (GtkPlotAxis *axis,
                                                         gdouble y);
void                (*GtkPlotParseLabelFunc)            (GtkPlotAxis *axis,
                                                         gdouble val,
                                                         gint precision,
                                                         gint style,
                                                         gchar *label);
GtkWidget *         gtk_plot_new                        (GdkDrawable *drawable);
GtkWidget *         gtk_plot_new_with_size              (GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot_construct                  (GtkPlot *plot,
                                                         GdkDrawable *drawable);
void                gtk_plot_construct_with_size        (GtkPlot *plot,
                                                         GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot_set_drawable               (GtkPlot *plot,
                                                         GdkDrawable *drawable);
GdkDrawable *       gtk_plot_get_drawable               (GtkPlot *plot);
void                gtk_plot_set_pc                     (GtkPlot *plot,
                                                         GtkPlotPC *pc);
void                gtk_plot_set_background_pixmap      (GtkPlot *plot,
                                                         GdkPixmap *pixmap);
void                gtk_plot_set_transparent            (GtkPlot *plot,
                                                         gboolean transparent);
gboolean            gtk_plot_is_transparent             (GtkPlot *plot);
void                gtk_plot_get_position               (GtkPlot *plot,
                                                         gdouble *x,
                                                         gdouble *y);
void                gtk_plot_get_size                   (GtkPlot *plot,
                                                         gdouble *width,
                                                         gdouble *height);
GtkAllocation       gtk_plot_get_internal_allocation    (GtkPlot *plot);
void                gtk_plot_set_background             (GtkPlot *plot,
                                                         const GdkColor *bg_color);
void                gtk_plot_paint                      (GtkPlot *plot);
void                gtk_plot_refresh                    (GtkPlot *plot,
                                                         GdkRectangle *drawing_area);
void                gtk_plot_move                       (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y);
void                gtk_plot_resize                     (GtkPlot *plot,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot_set_magnification          (GtkPlot *plot,
                                                         gdouble magnification);
void                gtk_plot_move_resize                (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot_get_pixel                  (GtkPlot *plot,
                                                         gdouble xx,
                                                         gdouble yy,
                                                         gdouble *x,
                                                         gdouble *y);
void                gtk_plot_get_point                  (GtkPlot *plot,
                                                         gint x,
                                                         gint y,
                                                         gdouble *xx,
                                                         gdouble *yy);
void                gtk_plot_clip_data                  (GtkPlot *plot,
                                                         gboolean clip);
void                gtk_plot_set_xrange                 (GtkPlot *plot,
                                                         gdouble xmin,
                                                         gdouble xmax);
void                gtk_plot_set_yrange                 (GtkPlot *plot,
                                                         gdouble ymin,
                                                         gdouble ymax);
void                gtk_plot_set_range                  (GtkPlot *plot,
                                                         gdouble xmin,
                                                         gdouble xmax,
                                                         gdouble ymin,
                                                         gdouble ymax);
void                gtk_plot_autoscale                  (GtkPlot *plot);
void                gtk_plot_get_xrange                 (GtkPlot *plot,
                                                         gdouble *xmin,
                                                         gdouble *xmax);
void                gtk_plot_get_yrange                 (GtkPlot *plot,
                                                         gdouble *ymin,
                                                         gdouble *ymax);
void                gtk_plot_set_xscale                 (GtkPlot *plot,
                                                         GtkPlotScale scale_type);
void                gtk_plot_set_yscale                 (GtkPlot *plot,
                                                         GtkPlotScale scale_type);
GtkPlotScale        gtk_plot_get_xscale                 (GtkPlot *plot);
GtkPlotScale        gtk_plot_get_yscale                 (GtkPlot *plot);
void                gtk_plot_reflect_x                  (GtkPlot *plot,
                                                         gboolean reflect);
void                gtk_plot_reflect_y                  (GtkPlot *plot,
                                                         gboolean reflect);
gboolean            gtk_plot_is_x_reflected             (GtkPlot *plot);
gboolean            gtk_plot_is_y_reflected             (GtkPlot *plot);
GtkPlotText *       gtk_plot_put_text                   (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *text);
gint                gtk_plot_remove_text                (GtkPlot *plot,
                                                         GtkPlotText *text);
void                gtk_plot_text_get_size              (const gchar *text,
                                                         gint angle,
                                                         const gchar *text_font,
                                                         gint text_height,
                                                         gint *width,
                                                         gint *height,
                                                         gint *ascent,
                                                         gint *descent);
void                gtk_plot_text_get_area              (const gchar *text,
                                                         gint angle,
                                                         GtkJustification just,
                                                         const gchar *font_name,
                                                         gint font_size,
                                                         gint *x,
                                                         gint *y,
                                                         gint *width,
                                                         gint *height);
void                gtk_plot_text_set_attributes        (GtkPlotText *text_attr,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *text);
void                gtk_plot_text_set_border            (GtkPlotText *text,
                                                         GtkPlotBorderStyle border,
                                                         gint border_space,
                                                         gint border_width,
                                                         gint shadow_width);
void                gtk_plot_draw_line                  (GtkPlot *plot,
                                                         GtkPlotLine line,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);
void                gtk_plot_draw_text                  (GtkPlot *plot,
                                                         GtkPlotText text);
void                gtk_plot_set_ticks                  (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble major_step,
                                                         gint nminor);
void                gtk_plot_set_major_ticks            (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble major_step);
void                gtk_plot_set_minor_ticks            (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gint nminor);
void                gtk_plot_set_ticks_limits           (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble begin,
                                                         gdouble end);
void                gtk_plot_unset_ticks_limits         (GtkPlot *plot,
                                                         GtkPlotOrientation orientation);
void                gtk_plot_set_break                  (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble min,
                                                         gdouble max,
                                                         gdouble step_after,
                                                         gint nminor_after,
                                                         GtkPlotScale scale_after,
                                                         gdouble pos);
void                gtk_plot_remove_break               (GtkPlot *plot,
                                                         GtkPlotOrientation orientation);
GtkObject *         gtk_plot_axis_new                   (GtkPlotOrientation orientation);
void                gtk_plot_axis_construct             (GtkPlotAxis *axis,
                                                         GtkPlotOrientation orientation);
GtkPlotAxis *       gtk_plot_get_axis                   (GtkPlot *plot,
                                                         GtkPlotAxisPos axis);
void                gtk_plot_axis_set_visible           (GtkPlotAxis *axis,
                                                         gboolean visible);
gboolean            gtk_plot_axis_visible               (GtkPlotAxis *axis);
void                gtk_plot_axis_set_title             (GtkPlotAxis *axis,
                                                         const gchar *title);
void                gtk_plot_axis_show_title            (GtkPlotAxis *axis);
void                gtk_plot_axis_hide_title            (GtkPlotAxis *axis);
void                gtk_plot_axis_move_title            (GtkPlotAxis *axis,
                                                         gint angle,
                                                         gdouble x,
                                                         gdouble y);
void                gtk_plot_axis_justify_title         (GtkPlotAxis *axis,
                                                         GtkJustification justification);
void                gtk_plot_axis_set_attributes        (GtkPlotAxis *axis,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_axis_get_attributes        (GtkPlotAxis *axis,
                                                         gfloat *width,
                                                         GdkColor *color);
void                gtk_plot_axis_set_ticks             (GtkPlotAxis *axis,
                                                         gdouble major_step,
                                                         gint nminor);
void                gtk_plot_axis_set_major_ticks       (GtkPlotAxis *axis,
                                                         gdouble major_step);
void                gtk_plot_axis_set_minor_ticks       (GtkPlotAxis *axis,
                                                         gint nminor);
void                gtk_plot_axis_set_ticks_length      (GtkPlotAxis *axis,
                                                         gint length);
void                gtk_plot_axis_set_ticks_width       (GtkPlotAxis *axis,
                                                         gfloat width);
void                gtk_plot_axis_show_ticks            (GtkPlotAxis *axis,
                                                         gint major_mask,
                                                         gint minor_mask);
void                gtk_plot_axis_set_ticks_limits      (GtkPlotAxis *axis,
                                                         gdouble begin,
                                                         gdouble end);
void                gtk_plot_axis_unset_ticks_limits    (GtkPlotAxis *axis);
void                gtk_plot_axis_set_tick_labels       (GtkPlotAxis *axis,
                                                         GtkPlotArray *array);
void                gtk_plot_axis_set_break             (GtkPlotAxis *axis,
                                                         gdouble min,
                                                         gdouble max,
                                                         gdouble step_after,
                                                         gint nminor_after,
                                                         GtkPlotScale scale_after,
                                                         gdouble pos);
void                gtk_plot_axis_remove_break          (GtkPlotAxis *axis);
void                gtk_plot_axis_show_labels           (GtkPlotAxis *axis,
                                                         gint labels_mask);
void                gtk_plot_axis_title_set_attributes  (GtkPlotAxis *axis,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification);
void                gtk_plot_axis_set_labels_attributes (GtkPlotAxis *axis,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification);
#define             gtk_plot_axis_set_labels_numbers
void                gtk_plot_axis_set_labels_style      (GtkPlotAxis *axis,
                                                         GtkPlotLabelStyle style,
                                                         gint precision);
void                gtk_plot_axis_set_labels_offset     (GtkPlotAxis *axis,
                                                         gint offset);
gint                gtk_plot_axis_get_labels_offset     (GtkPlotAxis *axis);
void                gtk_plot_axis_use_custom_tick_labels
                                                        (GtkPlotAxis *axis,
                                                         gboolean use);
void                gtk_plot_axis_set_labels_suffix     (GtkPlotAxis *axis,
                                                         const gchar *text);
void                gtk_plot_axis_set_labels_prefix     (GtkPlotAxis *axis,
                                                         const gchar *text);
gchar *             gtk_plot_axis_get_labels_suffix     (GtkPlotAxis *axis);
gchar *             gtk_plot_axis_get_labels_prefix     (GtkPlotAxis *axis);
void                gtk_plot_axis_ticks_recalc          (GtkPlotAxis *axis);
void                gtk_plot_axis_ticks_autoscale       (GtkPlotAxis *axis,
                                                         gdouble xmin,
                                                         gdouble xmax,
                                                         gint *precision);
gdouble             gtk_plot_axis_ticks_transform       (GtkPlotAxis *axis,
                                                         gdouble y);
gdouble             gtk_plot_axis_ticks_inverse         (GtkPlotAxis *axis,
                                                         gdouble x);
void                gtk_plot_axis_parse_label           (GtkPlotAxis *axis,
                                                         gdouble val,
                                                         gint precision,
                                                         gint style,
                                                         gchar *label);
void                gtk_plot_x0_set_visible             (GtkPlot *plot,
                                                         gboolean visible);
gboolean            gtk_plot_x0_visible                 (GtkPlot *plot);
void                gtk_plot_y0_set_visible             (GtkPlot *plot,
                                                         gboolean visible);
gboolean            gtk_plot_y0_visible                 (GtkPlot *plot);
void                gtk_plot_grids_set_on_top           (GtkPlot *plot,
                                                         gboolean on_top);
gboolean            gtk_plot_grids_on_top               (GtkPlot *plot);
void                gtk_plot_grids_set_visible          (GtkPlot *plot,
                                                         gboolean vmajor,
                                                         gboolean vminor,
                                                         gboolean hmajor,
                                                         gboolean hminor);
void                gtk_plot_grids_visible              (GtkPlot *plot,
                                                         gboolean *vmajor,
                                                         gboolean *vminor,
                                                         gboolean *hmajor,
                                                         gboolean *hminor);
void                gtk_plot_y0line_set_attributes      (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_x0line_set_attributes      (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_major_vgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_minor_vgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_major_hgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_minor_hgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_show_legends               (GtkPlot *plot);
void                gtk_plot_hide_legends               (GtkPlot *plot);
void                gtk_plot_set_legends_border         (GtkPlot *plot,
                                                         GtkPlotBorderStyle legends_border,
                                                         gint shadow_width);
void                gtk_plot_legends_move               (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y);
void                gtk_plot_legends_get_position       (GtkPlot *plot,
                                                         gdouble *x,
                                                         gdouble *y);
GtkAllocation       gtk_plot_legends_get_allocation     (GtkPlot *plot);
void                gtk_plot_legends_set_attributes     (GtkPlot *plot,
                                                         const gchar *font,
                                                         gint height,
                                                         const GdkColor *foreground,
                                                         const GdkColor *background);
void                gtk_plot_set_line_attributes        (GtkPlot *plot,
                                                         GtkPlotLine line);
void                gtk_plot_add_data                   (GtkPlot *plot,
                                                         GtkPlotData *data);
gint                gtk_plot_remove_data                (GtkPlot *plot,
                                                         GtkPlotData *dataset);
GtkPlotData *       gtk_plot_add_function               (GtkPlot *plot,
                                                         GtkPlotFunc function);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkMisc
                           +----GtkPlot
                                 +----GtkPlot3D
                                 +----GtkPlotPolar
  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotAxis

Implemented Interfaces

GtkPlot implements AtkImplementorIface and GtkBuildable.

Properties

  "allocation-height"        gint                  : Read / Write
  "allocation-width"         gint                  : Read / Write
  "allocation-x"             gint                  : Read / Write
  "allocation-y"             gint                  : Read / Write
  "bg-color"                 gpointer              : Read / Write
  "bg-pixmap"                gpointer              : Read / Write
  "bottom-align"             gdouble               : Read / Write
  "bottom-axis"              GtkPlotAxis*          : Read
  "clip-data"                gboolean              : Read / Write
  "grids-on-top"             gboolean              : Read / Write
  "height"                   gdouble               : Read / Write
  "left-align"               gdouble               : Read / Write
  "left-axis"                GtkPlotAxis*          : Read
  "legends-attr-text"        gpointer              : Read / Write
  "legends-border"           gint                  : Read / Write
  "legends-border-width"     gint                  : Read / Write
  "legends-height"           gint                  : Read / Write
  "legends-line-width"       gint                  : Read / Write
  "legends-shadow-width"     gint                  : Read / Write
  "legends-show"             gboolean              : Read / Write
  "legends-transparent"      gboolean              : Read / Write
  "legends-width"            gint                  : Read / Write
  "legends-x"                gdouble               : Read / Write
  "legends-y"                gdouble               : Read / Write
  "magnification"            gdouble               : Read / Write
  "reflect-x"                gboolean              : Read / Write
  "reflect-y"                gboolean              : Read / Write
  "right-align"              gdouble               : Read / Write
  "right-axis"               GtkPlotAxis*          : Read
  "show-x0"                  gboolean              : Read / Write
  "show-y0"                  gboolean              : Read / Write
  "top-align"                gdouble               : Read / Write
  "top-axis"                 GtkPlotAxis*          : Read
  "transparent"              gboolean              : Read / Write
  "use-pixmap"               gboolean              : Read / Write
  "width"                    gdouble               : Read / Write
  "x"                        gdouble               : Read / Write
  "x0-line"                  gpointer              : Read / Write
  "xmax"                     gdouble               : Read / Write
  "xmin"                     gdouble               : Read / Write
  "xscale"                   gint                  : Read / Write
  "y"                        gdouble               : Read / Write
  "y0-line"                  gpointer              : Read / Write
  "ymax"                     gdouble               : Read / Write
  "ymin"                     gdouble               : Read / Write
  "yscale"                   gint                  : Read / Write

Signals

  "add-data"                                       : Run Last
  "axis-changed"                                   : Run Last
  "changed"                                        : Run Last
  "moved"                                          : Run Last
  "resized"                                        : Run Last
  "update"                                         : Run Last

Description

GtkPlot allows to draw high quality scientific plots in two dimensions with a look and feel very similar to Microcal Origin for Windows. The distribution includes GtkPlotCanvas subclass, and a demo program showing two layered plots with different kind of curves. You can choose between a number of symbol types, lines, connectors -straight lines, steps, splines-, and change their attributes -color, size, width. You can also plot functions, add error bars, edit legends, rotate and move axis titles, change axis properties, etc.

Details

GtkPlot

typedef struct _GtkPlot GtkPlot;


GtkPlotAxis

typedef struct _GtkPlotAxis GtkPlotAxis;

The GtkPlotAxis struct contains only private data. It should only be accessed through the functions described below.


GtkPlotText

typedef struct {
} GtkPlotText;

The GtkPlotText struct contains only private data. It should only be accessed through the functions described below.


GtkPlotLine

typedef struct {
} GtkPlotLine;

The GtkPlotLine struct contains only private data. It should only be accessed through the functions described below.


GtkPlotSymbol

typedef struct {
} GtkPlotSymbol;

The GtkPlotSymbol struct contains only private data. It should only be accessed through the functions described below.


GtkPlotTick

typedef struct {
} GtkPlotTick;

The GtkPlotTick struct contains only private data. It should only be accessed through the functions described below.


GtkPlotTicks

typedef struct {
} GtkPlotTicks;

The GtkPlotTicks struct contains only private data. It should only be accessed through the functions described below.


GtkPlotVector

typedef struct {
} GtkPlotVector;

The GtkPlotVector struct contains only private data. It should only be accessed through the functions described below.


GtkPlotMarker

typedef struct {
} GtkPlotMarker;

The GtkPlotMarker struct contains only private data. It should only be accessed through the functions described below.


GtkPlotFunc ()

gdouble             (*GtkPlotFunc)                      (GtkPlot *plot,
                                                         GtkPlotData *data,
                                                         gdouble x,
                                                         gboolean *error);

plot :

data :

x :

error :

Returns :


GtkPlotFunc3D ()

gdouble             (*GtkPlotFunc3D)                    (GtkPlot *plot,
                                                         GtkPlotData *data,
                                                         gdouble x,
                                                         gdouble y,
                                                         gboolean *error);

plot :

data :

x :

y :

error :

Returns :


GtkPlotIterator ()

void                (*GtkPlotIterator)                  (GtkPlot *plot,
                                                         GtkPlotData *data,
                                                         gint iter,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *z,
                                                         gdouble *a,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gdouble *dz,
                                                         gdouble *da,
                                                         gchar **label,
                                                         gboolean *error);

plot :

data :

iter :

x :

y :

z :

a :

dx :

dy :

dz :

da :

label :

error :


enum GtkPlotScale

typedef enum
{
    GTK_PLOT_SCALE_LINEAR,
    GTK_PLOT_SCALE_LOG10
} GtkPlotScale;


enum GtkPlotSymbolType

typedef enum
{
    GTK_PLOT_SYMBOL_NONE,
    GTK_PLOT_SYMBOL_SQUARE,
    GTK_PLOT_SYMBOL_CIRCLE,
    GTK_PLOT_SYMBOL_UP_TRIANGLE,
    GTK_PLOT_SYMBOL_DOWN_TRIANGLE,
    GTK_PLOT_SYMBOL_RIGHT_TRIANGLE,
    GTK_PLOT_SYMBOL_LEFT_TRIANGLE,
    GTK_PLOT_SYMBOL_DIAMOND,
    GTK_PLOT_SYMBOL_PLUS,
    GTK_PLOT_SYMBOL_CROSS,
    GTK_PLOT_SYMBOL_STAR,
    GTK_PLOT_SYMBOL_DOT,
    GTK_PLOT_SYMBOL_IMPULSE,
} GtkPlotSymbolType;


enum GtkPlotSymbolStyle

typedef enum
{
    GTK_PLOT_SYMBOL_EMPTY,
    GTK_PLOT_SYMBOL_FILLED,
    GTK_PLOT_SYMBOL_OPAQUE
} GtkPlotSymbolStyle;


enum GtkPlotBorderStyle

typedef enum
{
    GTK_PLOT_BORDER_NONE,
    GTK_PLOT_BORDER_LINE,
    GTK_PLOT_BORDER_SHADOW,
} GtkPlotBorderStyle;


enum GtkPlotLineStyle

typedef enum
{
    GTK_PLOT_LINE_NONE,
    GTK_PLOT_LINE_SOLID,
    GTK_PLOT_LINE_DOTTED,
    GTK_PLOT_LINE_DASHED,
    GTK_PLOT_LINE_DOT_DASH,
    GTK_PLOT_LINE_DOT_DOT_DASH,
    GTK_PLOT_LINE_DOT_DASH_DASH
} GtkPlotLineStyle;


enum GtkPlotConnector

typedef enum
{
    GTK_PLOT_CONNECT_NONE,
    GTK_PLOT_CONNECT_STRAIGHT,
    GTK_PLOT_CONNECT_SPLINE,
    GTK_PLOT_CONNECT_HV_STEP,
    GTK_PLOT_CONNECT_VH_STEP,
    GTK_PLOT_CONNECT_MIDDLE_STEP
} GtkPlotConnector;


enum GtkPlotLabelPos

typedef enum
{
    GTK_PLOT_LABEL_NONE    	= 0,
    GTK_PLOT_LABEL_IN 	   	= 1 << 0,
    GTK_PLOT_LABEL_OUT    	= 1 << 1,
}GtkPlotLabelPos;


enum GtkPlotError

typedef enum
{
    GTK_PLOT_ERROR_DIV_ZERO,
    GTK_PLOT_ERROR_LOG_NEG
} GtkPlotError;


enum GtkPlotOrientation

typedef enum
{
    GTK_PLOT_AXIS_X,
    GTK_PLOT_AXIS_Y,
    GTK_PLOT_AXIS_Z,
} GtkPlotOrientation;


enum GtkPlotAxisPos

typedef enum
{
    GTK_PLOT_AXIS_LEFT,
    GTK_PLOT_AXIS_RIGHT,
    GTK_PLOT_AXIS_TOP,
    GTK_PLOT_AXIS_BOTTOM
} GtkPlotAxisPos;


enum GtkPlotLabelStyle

typedef enum
{
    GTK_PLOT_LABEL_FLOAT,
    GTK_PLOT_LABEL_EXP,
    GTK_PLOT_LABEL_POW
} GtkPlotLabelStyle;


enum GtkPlotTicksPos

typedef enum
{
    GTK_PLOT_TICKS_NONE		= 0,
    GTK_PLOT_TICKS_IN		= 1 << 0,
    GTK_PLOT_TICKS_OUT		= 1 << 1
} GtkPlotTicksPos;


GtkPlotTicksAutoscaleFunc ()

void                (*GtkPlotTicksAutoscaleFunc)        (GtkPlotAxis *axis,
                                                         gdouble xmin,
                                                         gdouble xmax,
                                                         gint *precision);

axis :

xmin :

xmax :

precision :


GtkPlotTicksInverseFunc ()

gdouble             (*GtkPlotTicksInverseFunc)          (GtkPlotAxis *axis,
                                                         gdouble y);

axis :

y :

Returns :


GtkPlotTicksRecalcFunc ()

void                (*GtkPlotTicksRecalcFunc)           (GtkPlotAxis *axis);

axis :


GtkPlotTicksTransformFunc ()

gdouble             (*GtkPlotTicksTransformFunc)        (GtkPlotAxis *axis,
                                                         gdouble y);

axis :

y :

Returns :


GtkPlotParseLabelFunc ()

void                (*GtkPlotParseLabelFunc)            (GtkPlotAxis *axis,
                                                         gdouble val,
                                                         gint precision,
                                                         gint style,
                                                         gchar *label);

axis :

val :

precision :

style :

label :


gtk_plot_new ()

GtkWidget *         gtk_plot_new                        (GdkDrawable *drawable);

drawable :

a Gdk drawable

Returns :


gtk_plot_new_with_size ()

GtkWidget *         gtk_plot_new_with_size              (GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);

drawable :

a Gdk drawable

width :

plot widget width

height :

plot widget height

Returns :

the plot widget

gtk_plot_construct ()

void                gtk_plot_construct                  (GtkPlot *plot,
                                                         GdkDrawable *drawable);

plot :

a GtkPlot widget

drawable :

a Gdk drawable

gtk_plot_construct_with_size ()

void                gtk_plot_construct_with_size        (GtkPlot *plot,
                                                         GdkDrawable *drawable,
                                                         gdouble width,
                                                         gdouble height);

plot :

a GtkPlot widget

drawable :

a Gdk drawable

width :

height :


gtk_plot_set_drawable ()

void                gtk_plot_set_drawable               (GtkPlot *plot,
                                                         GdkDrawable *drawable);

plot :

a GtkPlot widget

drawable :

a Gdk drawable

gtk_plot_get_drawable ()

GdkDrawable *       gtk_plot_get_drawable               (GtkPlot *plot);

plot :

a GtkPlot widget

Returns :

(transfer none) the GdkDrawable of the plot

gtk_plot_set_pc ()

void                gtk_plot_set_pc                     (GtkPlot *plot,
                                                         GtkPlotPC *pc);

plot :

a GtkPlot widget

pc :

a GtkPlotPc

gtk_plot_set_background_pixmap ()

void                gtk_plot_set_background_pixmap      (GtkPlot *plot,
                                                         GdkPixmap *pixmap);

plot :

a GtkPlot widget

pixmap :

a Gdk pixmap

gtk_plot_set_transparent ()

void                gtk_plot_set_transparent            (GtkPlot *plot,
                                                         gboolean transparent);

plot :

a GtkPlot widget

transparent :


gtk_plot_is_transparent ()

gboolean            gtk_plot_is_transparent             (GtkPlot *plot);

plot :

a GtkPlot widget

Returns :


gtk_plot_get_position ()

void                gtk_plot_get_position               (GtkPlot *plot,
                                                         gdouble *x,
                                                         gdouble *y);

plot :

a GtkPlot widget.

x :

y

y :


gtk_plot_get_size ()

void                gtk_plot_get_size                   (GtkPlot *plot,
                                                         gdouble *width,
                                                         gdouble *height);

plot :

width :

height :


gtk_plot_get_internal_allocation ()

GtkAllocation       gtk_plot_get_internal_allocation    (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :

(transfer none) internal_allocation

gtk_plot_set_background ()

void                gtk_plot_set_background             (GtkPlot *plot,
                                                         const GdkColor *bg_color);

plot :

a GtkPlot widget.

bg_color :


gtk_plot_paint ()

void                gtk_plot_paint                      (GtkPlot *plot);

plot :

a GtkPlot widget

gtk_plot_refresh ()

void                gtk_plot_refresh                    (GtkPlot *plot,
                                                         GdkRectangle *drawing_area);

plot :

a GtkPlot widget

drawing_area :

a GdkRectangle

gtk_plot_move ()

void                gtk_plot_move                       (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y);

plot :

x :

y :


gtk_plot_resize ()

void                gtk_plot_resize                     (GtkPlot *plot,
                                                         gdouble width,
                                                         gdouble height);

plot :

a GtkPlot widget.a GtkPlot widget.

width :

height :


gtk_plot_set_magnification ()

void                gtk_plot_set_magnification          (GtkPlot *plot,
                                                         gdouble magnification);

plot :

a GtkPlot widget.

magnification :


gtk_plot_move_resize ()

void                gtk_plot_move_resize                (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble width,
                                                         gdouble height);

plot :

a GtkPlot widget.

x :

y :

width :

height :


gtk_plot_get_pixel ()

void                gtk_plot_get_pixel                  (GtkPlot *plot,
                                                         gdouble xx,
                                                         gdouble yy,
                                                         gdouble *x,
                                                         gdouble *y);

plot :

a GtkPlot widget.

xx :

yy :

x :

y :


gtk_plot_get_point ()

void                gtk_plot_get_point                  (GtkPlot *plot,
                                                         gint x,
                                                         gint y,
                                                         gdouble *xx,
                                                         gdouble *yy);

plot :

a GtkPlot widget.

x :

y :

xx :

yy :


gtk_plot_clip_data ()

void                gtk_plot_clip_data                  (GtkPlot *plot,
                                                         gboolean clip);

plot :

a GtkPlot widget.

clip :


gtk_plot_set_xrange ()

void                gtk_plot_set_xrange                 (GtkPlot *plot,
                                                         gdouble xmin,
                                                         gdouble xmax);

plot :

a GtkPlot widget.

xmin :

xmax :


gtk_plot_set_yrange ()

void                gtk_plot_set_yrange                 (GtkPlot *plot,
                                                         gdouble ymin,
                                                         gdouble ymax);

plot :

a GtkPlot widget.

ymin :

ymax :


gtk_plot_set_range ()

void                gtk_plot_set_range                  (GtkPlot *plot,
                                                         gdouble xmin,
                                                         gdouble xmax,
                                                         gdouble ymin,
                                                         gdouble ymax);

plot :

a GtkPlot widget.

xmin :

xmax :

ymin :

ymax :


gtk_plot_autoscale ()

void                gtk_plot_autoscale                  (GtkPlot *plot);

plot :

a GtkPlot widget.

gtk_plot_get_xrange ()

void                gtk_plot_get_xrange                 (GtkPlot *plot,
                                                         gdouble *xmin,
                                                         gdouble *xmax);

plot :

a GtkPlot widget.

xmin :

xmax :


gtk_plot_get_yrange ()

void                gtk_plot_get_yrange                 (GtkPlot *plot,
                                                         gdouble *ymin,
                                                         gdouble *ymax);

plot :

a GtkPlot widget.

ymin :

ymax :


gtk_plot_set_xscale ()

void                gtk_plot_set_xscale                 (GtkPlot *plot,
                                                         GtkPlotScale scale_type);

plot :

a GtkPlot widget.

scale_type :


gtk_plot_set_yscale ()

void                gtk_plot_set_yscale                 (GtkPlot *plot,
                                                         GtkPlotScale scale_type);

plot :

a GtkPlot widget.

scale_type :


gtk_plot_get_xscale ()

GtkPlotScale        gtk_plot_get_xscale                 (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :


gtk_plot_get_yscale ()

GtkPlotScale        gtk_plot_get_yscale                 (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :


gtk_plot_reflect_x ()

void                gtk_plot_reflect_x                  (GtkPlot *plot,
                                                         gboolean reflect);

plot :

a GtkPlot widget.

reflect :


gtk_plot_reflect_y ()

void                gtk_plot_reflect_y                  (GtkPlot *plot,
                                                         gboolean reflect);

plot :

a GtkPlot widget.

reflect :


gtk_plot_is_x_reflected ()

gboolean            gtk_plot_is_x_reflected             (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :


gtk_plot_is_y_reflected ()

gboolean            gtk_plot_is_y_reflected             (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :


gtk_plot_put_text ()

GtkPlotText *       gtk_plot_put_text                   (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *text);

plot :

a GtkPlot widget.

x :

y :

font :

height :

angle :

fg :

bg :

transparent :

justification :

text :

Returns :

(transfer none) the GtkPlotText

gtk_plot_remove_text ()

gint                gtk_plot_remove_text                (GtkPlot *plot,
                                                         GtkPlotText *text);

plot :

a GtkPlot widget.

text :

Returns :


gtk_plot_text_get_size ()

void                gtk_plot_text_get_size              (const gchar *text,
                                                         gint angle,
                                                         const gchar *text_font,
                                                         gint text_height,
                                                         gint *width,
                                                         gint *height,
                                                         gint *ascent,
                                                         gint *descent);

text :

angle :

text_font :

text_height :

width :

height :

ascent :

descent :


gtk_plot_text_get_area ()

void                gtk_plot_text_get_area              (const gchar *text,
                                                         gint angle,
                                                         GtkJustification just,
                                                         const gchar *font_name,
                                                         gint font_size,
                                                         gint *x,
                                                         gint *y,
                                                         gint *width,
                                                         gint *height);

text :

angle :

just :

font_name :

font_size :

x :

y :

width :

height :


gtk_plot_text_set_attributes ()

void                gtk_plot_text_set_attributes        (GtkPlotText *text_attr,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *text);

text_attr :

font :

height :

angle :

fg :

bg :

transparent :

justification :

text :


gtk_plot_text_set_border ()

void                gtk_plot_text_set_border            (GtkPlotText *text,
                                                         GtkPlotBorderStyle border,
                                                         gint border_space,
                                                         gint border_width,
                                                         gint shadow_width);

text :

border :

border_space :

border_width :

shadow_width :


gtk_plot_draw_line ()

void                gtk_plot_draw_line                  (GtkPlot *plot,
                                                         GtkPlotLine line,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);

plot :

a GtkPlot widget

line :

x1 :

y1 :

x2 :

y2 :


gtk_plot_draw_text ()

void                gtk_plot_draw_text                  (GtkPlot *plot,
                                                         GtkPlotText text);

plot :

text :


gtk_plot_set_ticks ()

void                gtk_plot_set_ticks                  (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble major_step,
                                                         gint nminor);

plot :

a GtkPlot widget.

orientation :

major_step :

nminor :


gtk_plot_set_major_ticks ()

void                gtk_plot_set_major_ticks            (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble major_step);

plot :

a GtkPlot widget.

orientation :

major_step :


gtk_plot_set_minor_ticks ()

void                gtk_plot_set_minor_ticks            (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gint nminor);

plot :

a GtkPlot widget.

orientation :

nminor :


gtk_plot_set_ticks_limits ()

void                gtk_plot_set_ticks_limits           (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble begin,
                                                         gdouble end);

plot :

a GtkPlot widget.

orientation :

begin :

end :


gtk_plot_unset_ticks_limits ()

void                gtk_plot_unset_ticks_limits         (GtkPlot *plot,
                                                         GtkPlotOrientation orientation);

plot :

a GtkPlot widget.

orientation :


gtk_plot_set_break ()

void                gtk_plot_set_break                  (GtkPlot *plot,
                                                         GtkPlotOrientation orientation,
                                                         gdouble min,
                                                         gdouble max,
                                                         gdouble step_after,
                                                         gint nminor_after,
                                                         GtkPlotScale scale_after,
                                                         gdouble pos);

plot :

a GtkPlot widget.

orientation :

min :

max :

step_after :

nminor_after :

scale_after :

pos :


gtk_plot_remove_break ()

void                gtk_plot_remove_break               (GtkPlot *plot,
                                                         GtkPlotOrientation orientation);

plot :

a GtkPlot widget.

orientation :


gtk_plot_axis_new ()

GtkObject *         gtk_plot_axis_new                   (GtkPlotOrientation orientation);

orientation :

Returns :


gtk_plot_axis_construct ()

void                gtk_plot_axis_construct             (GtkPlotAxis *axis,
                                                         GtkPlotOrientation orientation);

axis :

orientation :


gtk_plot_get_axis ()

GtkPlotAxis *       gtk_plot_get_axis                   (GtkPlot *plot,
                                                         GtkPlotAxisPos axis);

plot :

a GtkPlot widget.

axis :

a GtkPlotAxis.

Returns :

(transfer none) the GtkPlotAxis at the given position

gtk_plot_axis_set_visible ()

void                gtk_plot_axis_set_visible           (GtkPlotAxis *axis,
                                                         gboolean visible);

axis :

a GtkPlotAxis.

visible :


gtk_plot_axis_visible ()

gboolean            gtk_plot_axis_visible               (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

Returns :


gtk_plot_axis_set_title ()

void                gtk_plot_axis_set_title             (GtkPlotAxis *axis,
                                                         const gchar *title);

axis :

a GtkPlotAxis. title

title :


gtk_plot_axis_show_title ()

void                gtk_plot_axis_show_title            (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

gtk_plot_axis_hide_title ()

void                gtk_plot_axis_hide_title            (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

gtk_plot_axis_move_title ()

void                gtk_plot_axis_move_title            (GtkPlotAxis *axis,
                                                         gint angle,
                                                         gdouble x,
                                                         gdouble y);

axis :

a GtkPlotAxis.

angle :

x :

y :


gtk_plot_axis_justify_title ()

void                gtk_plot_axis_justify_title         (GtkPlotAxis *axis,
                                                         GtkJustification justification);

axis :

a GtkPlotAxis.

justification :


gtk_plot_axis_set_attributes ()

void                gtk_plot_axis_set_attributes        (GtkPlotAxis *axis,
                                                         gfloat width,
                                                         const GdkColor *color);

axis :

a GtkPlotAxis.

width :

color :


gtk_plot_axis_get_attributes ()

void                gtk_plot_axis_get_attributes        (GtkPlotAxis *axis,
                                                         gfloat *width,
                                                         GdkColor *color);

axis :

a GtkPlotAxis.

width :

color:

color :


gtk_plot_axis_set_ticks ()

void                gtk_plot_axis_set_ticks             (GtkPlotAxis *axis,
                                                         gdouble major_step,
                                                         gint nminor);

axis :

a GtkPlotAxis.

major_step :

nminor :


gtk_plot_axis_set_major_ticks ()

void                gtk_plot_axis_set_major_ticks       (GtkPlotAxis *axis,
                                                         gdouble major_step);

axis :

a GtkPlotAxis.

major_step :


gtk_plot_axis_set_minor_ticks ()

void                gtk_plot_axis_set_minor_ticks       (GtkPlotAxis *axis,
                                                         gint nminor);

axis :

a GtkPlotAxis.

nminor :


gtk_plot_axis_set_ticks_length ()

void                gtk_plot_axis_set_ticks_length      (GtkPlotAxis *axis,
                                                         gint length);

axis :

a GtkPlotAxis.

length :


gtk_plot_axis_set_ticks_width ()

void                gtk_plot_axis_set_ticks_width       (GtkPlotAxis *axis,
                                                         gfloat width);

axis :

a GtkPlotAxis.

width :


gtk_plot_axis_show_ticks ()

void                gtk_plot_axis_show_ticks            (GtkPlotAxis *axis,
                                                         gint major_mask,
                                                         gint minor_mask);

axis :

a GtkPlotAxis.

major_mask :

minor_mask :


gtk_plot_axis_set_ticks_limits ()

void                gtk_plot_axis_set_ticks_limits      (GtkPlotAxis *axis,
                                                         gdouble begin,
                                                         gdouble end);

axis :

a GtkPlotAxis.

begin :

end :


gtk_plot_axis_unset_ticks_limits ()

void                gtk_plot_axis_unset_ticks_limits    (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

gtk_plot_axis_set_tick_labels ()

void                gtk_plot_axis_set_tick_labels       (GtkPlotAxis *axis,
                                                         GtkPlotArray *array);

axis :

array :


gtk_plot_axis_set_break ()

void                gtk_plot_axis_set_break             (GtkPlotAxis *axis,
                                                         gdouble min,
                                                         gdouble max,
                                                         gdouble step_after,
                                                         gint nminor_after,
                                                         GtkPlotScale scale_after,
                                                         gdouble pos);

axis :

a GtkPlotAxis.

min :

max :

step_after :

nminor_after :

scale_after :

pos :


gtk_plot_axis_remove_break ()

void                gtk_plot_axis_remove_break          (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

gtk_plot_axis_show_labels ()

void                gtk_plot_axis_show_labels           (GtkPlotAxis *axis,
                                                         gint labels_mask);

axis :

a GtkPlotAxis.

labels_mask :


gtk_plot_axis_title_set_attributes ()

void                gtk_plot_axis_title_set_attributes  (GtkPlotAxis *axis,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification);

axis :

a GtkPlotAxis.

font :

height :

angle :

fg :

bg :

transparent :

justification :


gtk_plot_axis_set_labels_attributes ()

void                gtk_plot_axis_set_labels_attributes (GtkPlotAxis *axis,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification);

axis :

a GtkPlotAxis.

font :

height :

angle :

fg :

bg :

transparent :

justification :


gtk_plot_axis_set_labels_numbers

#define gtk_plot_axis_set_labels_numbers gtk_plot_axis_set_labels_style


gtk_plot_axis_set_labels_style ()

void                gtk_plot_axis_set_labels_style      (GtkPlotAxis *axis,
                                                         GtkPlotLabelStyle style,
                                                         gint precision);

axis :

a GtkPlotAxis.

style :

precision :


gtk_plot_axis_set_labels_offset ()

void                gtk_plot_axis_set_labels_offset     (GtkPlotAxis *axis,
                                                         gint offset);

axis :

a GtkPlotAxis.

offset :


gtk_plot_axis_get_labels_offset ()

gint                gtk_plot_axis_get_labels_offset     (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

Returns :


gtk_plot_axis_use_custom_tick_labels ()

void                gtk_plot_axis_use_custom_tick_labels
                                                        (GtkPlotAxis *axis,
                                                         gboolean use);

axis :

use :


gtk_plot_axis_set_labels_suffix ()

void                gtk_plot_axis_set_labels_suffix     (GtkPlotAxis *axis,
                                                         const gchar *text);

axis :

a GtkPlotAxis.

text :


gtk_plot_axis_set_labels_prefix ()

void                gtk_plot_axis_set_labels_prefix     (GtkPlotAxis *axis,
                                                         const gchar *text);

axis :

a GtkPlotAxis.

text :


gtk_plot_axis_get_labels_suffix ()

gchar *             gtk_plot_axis_get_labels_suffix     (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

Returns :


gtk_plot_axis_get_labels_prefix ()

gchar *             gtk_plot_axis_get_labels_prefix     (GtkPlotAxis *axis);

axis :

a GtkPlotAxis.

Returns :


gtk_plot_axis_ticks_recalc ()

void                gtk_plot_axis_ticks_recalc          (GtkPlotAxis *axis);

axis :


gtk_plot_axis_ticks_autoscale ()

void                gtk_plot_axis_ticks_autoscale       (GtkPlotAxis *axis,
                                                         gdouble xmin,
                                                         gdouble xmax,
                                                         gint *precision);

axis :

xmin :

xmax :

precision :


gtk_plot_axis_ticks_transform ()

gdouble             gtk_plot_axis_ticks_transform       (GtkPlotAxis *axis,
                                                         gdouble y);

axis :

y :

Returns :


gtk_plot_axis_ticks_inverse ()

gdouble             gtk_plot_axis_ticks_inverse         (GtkPlotAxis *axis,
                                                         gdouble x);

axis :

x :

Returns :


gtk_plot_axis_parse_label ()

void                gtk_plot_axis_parse_label           (GtkPlotAxis *axis,
                                                         gdouble val,
                                                         gint precision,
                                                         gint style,
                                                         gchar *label);

axis :

val :

precision :

style :

label :


gtk_plot_x0_set_visible ()

void                gtk_plot_x0_set_visible             (GtkPlot *plot,
                                                         gboolean visible);

plot :

a GtkPlot widget.

visible :


gtk_plot_x0_visible ()

gboolean            gtk_plot_x0_visible                 (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :


gtk_plot_y0_set_visible ()

void                gtk_plot_y0_set_visible             (GtkPlot *plot,
                                                         gboolean visible);

plot :

a GtkPlot widget.

visible :


gtk_plot_y0_visible ()

gboolean            gtk_plot_y0_visible                 (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :


gtk_plot_grids_set_on_top ()

void                gtk_plot_grids_set_on_top           (GtkPlot *plot,
                                                         gboolean on_top);

plot :

a GtkPlot widget.

on_top :


gtk_plot_grids_on_top ()

gboolean            gtk_plot_grids_on_top               (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :


gtk_plot_grids_set_visible ()

void                gtk_plot_grids_set_visible          (GtkPlot *plot,
                                                         gboolean vmajor,
                                                         gboolean vminor,
                                                         gboolean hmajor,
                                                         gboolean hminor);

plot :

a GtkPlot widget.

vmajor :

vminor :

hmajor :

hminor :


gtk_plot_grids_visible ()

void                gtk_plot_grids_visible              (GtkPlot *plot,
                                                         gboolean *vmajor,
                                                         gboolean *vminor,
                                                         gboolean *hmajor,
                                                         gboolean *hminor);

plot :

a GtkPlot widget.

vmajor :

vminor :

hmajor :

hminor :


gtk_plot_y0line_set_attributes ()

void                gtk_plot_y0line_set_attributes      (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot widget.

line_style :

width :

color :


gtk_plot_x0line_set_attributes ()

void                gtk_plot_x0line_set_attributes      (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

line_style :

width :

color :


gtk_plot_major_vgrid_set_attributes ()

void                gtk_plot_major_vgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

style :

width :

color :


gtk_plot_minor_vgrid_set_attributes ()

void                gtk_plot_minor_vgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot widget.

line_style :

width :

color :


gtk_plot_major_hgrid_set_attributes ()

void                gtk_plot_major_hgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot widget.

line_style :

width :

color :


gtk_plot_minor_hgrid_set_attributes ()

void                gtk_plot_minor_hgrid_set_attributes (GtkPlot *plot,
                                                         GtkPlotLineStyle line_style,
                                                         gfloat width,
                                                         const GdkColor *color);

plot :

a GtkPlot widget.

line_style :

width :

color :


gtk_plot_show_legends ()

void                gtk_plot_show_legends               (GtkPlot *plot);

plot :

a GtkPlot widget.

gtk_plot_hide_legends ()

void                gtk_plot_hide_legends               (GtkPlot *plot);

plot :

a GtkPlot widget.

gtk_plot_set_legends_border ()

void                gtk_plot_set_legends_border         (GtkPlot *plot,
                                                         GtkPlotBorderStyle legends_border,
                                                         gint shadow_width);

plot :

a GtkPlot widget.

legends_border :

shadow_width :


gtk_plot_legends_move ()

void                gtk_plot_legends_move               (GtkPlot *plot,
                                                         gdouble x,
                                                         gdouble y);

plot :

a GtkPlot widget.

x :

y :


gtk_plot_legends_get_position ()

void                gtk_plot_legends_get_position       (GtkPlot *plot,
                                                         gdouble *x,
                                                         gdouble *y);

plot :

a GtkPlot widget.

x :

y :


gtk_plot_legends_get_allocation ()

GtkAllocation       gtk_plot_legends_get_allocation     (GtkPlot *plot);

plot :

a GtkPlot widget.

Returns :

(transfer full) the GtkAllocation

gtk_plot_legends_set_attributes ()

void                gtk_plot_legends_set_attributes     (GtkPlot *plot,
                                                         const gchar *font,
                                                         gint height,
                                                         const GdkColor *foreground,
                                                         const GdkColor *background);

plot :

a GtkPlot widget.

font :

height :

foreground :

background :


gtk_plot_set_line_attributes ()

void                gtk_plot_set_line_attributes        (GtkPlot *plot,
                                                         GtkPlotLine line);

plot :

a GtkPlot widget

line :


gtk_plot_add_data ()

void                gtk_plot_add_data                   (GtkPlot *plot,
                                                         GtkPlotData *data);

plot :

data :


gtk_plot_remove_data ()

gint                gtk_plot_remove_data                (GtkPlot *plot,
                                                         GtkPlotData *dataset);

plot :

a GtkPlot widget.

dataset :

Returns :


gtk_plot_add_function ()

GtkPlotData *       gtk_plot_add_function               (GtkPlot *plot,
                                                         GtkPlotFunc function);

plot :

a GtkPlot widget.

function :

the dataset generation function. scope async.

Returns :

(transfer none) the GtkPlotData

Property Details

The "allocation-height" property

  "allocation-height"        gint                  : Read / Write

Allowed values: >= -2147483647

Default value: 0


The "allocation-width" property

  "allocation-width"         gint                  : Read / Write

Allowed values: >= -2147483647

Default value: 0


The "allocation-x" property

  "allocation-x"             gint                  : Read / Write

Allowed values: >= -2147483647

Default value: 0


The "allocation-y" property

  "allocation-y"             gint                  : Read / Write

Allowed values: >= -2147483647

Default value: 0


The "bg-color" property

  "bg-color"                 gpointer              : Read / Write


The "bg-pixmap" property

  "bg-pixmap"                gpointer              : Read / Write


The "bottom-align" property

  "bottom-align"             gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "bottom-axis" property

  "bottom-axis"              GtkPlotAxis*          : Read


The "clip-data" property

  "clip-data"                gboolean              : Read / Write

Default value: FALSE


The "grids-on-top" property

  "grids-on-top"             gboolean              : Read / Write

Default value: FALSE


The "height" property

  "height"                   gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "left-align" property

  "left-align"               gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "left-axis" property

  "left-axis"                GtkPlotAxis*          : Read


The "legends-attr-text" property

  "legends-attr-text"        gpointer              : Read / Write


The "legends-border" property

  "legends-border"           gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "legends-border-width" property

  "legends-border-width"     gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "legends-height" property

  "legends-height"           gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "legends-line-width" property

  "legends-line-width"       gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "legends-shadow-width" property

  "legends-shadow-width"     gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "legends-show" property

  "legends-show"             gboolean              : Read / Write

Default value: FALSE


The "legends-transparent" property

  "legends-transparent"      gboolean              : Read / Write

Default value: FALSE


The "legends-width" property

  "legends-width"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "legends-x" property

  "legends-x"                gdouble               : Read / Write

Default value: 0


The "legends-y" property

  "legends-y"                gdouble               : Read / Write

Default value: 0


The "magnification" property

  "magnification"            gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "reflect-x" property

  "reflect-x"                gboolean              : Read / Write

Default value: FALSE


The "reflect-y" property

  "reflect-y"                gboolean              : Read / Write

Default value: FALSE


The "right-align" property

  "right-align"              gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "right-axis" property

  "right-axis"               GtkPlotAxis*          : Read


The "show-x0" property

  "show-x0"                  gboolean              : Read / Write

Default value: FALSE


The "show-y0" property

  "show-y0"                  gboolean              : Read / Write

Default value: FALSE


The "top-align" property

  "top-align"                gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "top-axis" property

  "top-axis"                 GtkPlotAxis*          : Read


The "transparent" property

  "transparent"              gboolean              : Read / Write

Default value: FALSE


The "use-pixmap" property

  "use-pixmap"               gboolean              : Read / Write

Default value: FALSE


The "width" property

  "width"                    gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "x" property

  "x"                        gdouble               : Read / Write

Default value: 0


The "x0-line" property

  "x0-line"                  gpointer              : Read / Write


The "xmax" property

  "xmax"                     gdouble               : Read / Write

Default value: 0


The "xmin" property

  "xmin"                     gdouble               : Read / Write

Default value: 0


The "xscale" property

  "xscale"                   gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "y" property

  "y"                        gdouble               : Read / Write

Default value: 0


The "y0-line" property

  "y0-line"                  gpointer              : Read / Write


The "ymax" property

  "ymax"                     gdouble               : Read / Write

Default value: 0


The "ymin" property

  "ymin"                     gdouble               : Read / Write

Default value: 0


The "yscale" property

  "yscale"                   gint                  : Read / Write

Allowed values: >= 0

Default value: 0

Signal Details

The "add-data" signal

gboolean            user_function                      (GtkPlot     *plot,
                                                        GtkPlotData *arg1,
                                                        gpointer     user_data)      : Run Last

plot :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

Returns :


The "axis-changed" signal

gboolean            user_function                      (GtkPlot     *plot,
                                                        GtkPlotAxis *arg1,
                                                        gpointer     user_data)      : Run Last

plot :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

Returns :


The "changed" signal

void                user_function                      (GtkPlot *plot,
                                                        gpointer user_data)      : Run Last

plot :

a GtkPlot widget.

user_data :

user data set when the signal handler was connected.

The "moved" signal

gboolean            user_function                      (GtkPlot *plot,
                                                        gpointer x,
                                                        gpointer y,
                                                        gpointer user_data)      : Run Last

plot :

a GtkPlot widget.

x :

y :

user_data :

user data set when the signal handler was connected.

Returns :


The "resized" signal

gboolean            user_function                      (GtkPlot *plot,
                                                        gpointer width,
                                                        gpointer height,
                                                        gpointer user_data)      : Run Last

plot :

a GtkPlot widget.

width :

height :

user_data :

user data set when the signal handler was connected.

Returns :


The "update" signal

void                user_function                      (GtkPlot *plot,
                                                        gboolean new_range,
                                                        gpointer user_data)      : Run Last

plot :

a GtkPlot widget.

new_range :

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/GtkPlotFlux.html0000644000076400001440000006764312604172532017253 00000000000000 GtkPlotFlux

GtkPlotFlux

GtkPlotFlux

Synopsis


#include <gtkextra.h>

                    GtkPlotFlux;
GtkWidget*          gtk_plot_flux_new                   (void);
void                gtk_plot_flux_set_arrow             (GtkPlotFlux *flux,
                                                         gint arrow_length,
                                                         gint arrow_width,
                                                         GtkPlotSymbolStyle arrow_style);
void                gtk_plot_flux_get_arrow             (GtkPlotFlux *flux,
                                                         gint *arrow_length,
                                                         gint *arrow_width,
                                                         GtkPlotSymbolStyle *arrow_style);
void                gtk_plot_flux_center                (GtkPlotFlux *flux,
                                                         gboolean center);
gboolean            gtk_plot_flux_is_centered           (GtkPlotFlux *flux);
void                gtk_plot_flux_show_scale            (GtkPlotFlux *flux,
                                                         gboolean show);
void                gtk_plot_flux_set_scale_max         (GtkPlotFlux *flux,
                                                         gdouble scale_max);
void                gtk_plot_flux_set_size_max          (GtkPlotFlux *flux,
                                                         guint size_max);
void                gtk_plot_flux_set_labels_precision  (GtkPlotFlux *flux,
                                                         gint precision);
void                gtk_plot_flux_set_labels_style      (GtkPlotFlux *flux,
                                                         GtkPlotLabelStyle style);
void                gtk_plot_flux_set_labels_prefix     (GtkPlotFlux *flux,
                                                         const gchar *prefix);
void                gtk_plot_flux_set_labels_suffix     (GtkPlotFlux *flux,
                                                         const gchar *suffix);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotFlux

Implemented Interfaces

GtkPlotFlux implements AtkImplementorIface and GtkBuildable.

Properties

  "centered"                 gboolean              : Read / Write
  "labels-precision"         gint                  : Read / Write
  "labels-prefix"            gchar*                : Read / Write
  "labels-style"             gint                  : Read / Write
  "labels-suffix"            gchar*                : Read / Write
  "length"                   gint                  : Read / Write
  "scale-max"                gdouble               : Read / Write
  "show-scale"               gboolean              : Read / Write
  "size-max"                 gint                  : Read / Write
  "style"                    gint                  : Read / Write
  "width"                    gint                  : Read / Write

Description

FIXME:: Need long description.

Details

GtkPlotFlux

typedef struct _GtkPlotFlux GtkPlotFlux;

The GtkPlotFlux struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_flux_new ()

GtkWidget*          gtk_plot_flux_new                   (void);

Returns :


gtk_plot_flux_set_arrow ()

void                gtk_plot_flux_set_arrow             (GtkPlotFlux *flux,
                                                         gint arrow_length,
                                                         gint arrow_width,
                                                         GtkPlotSymbolStyle arrow_style);

flux :

arrow_length :

arrow_width :

arrow_style :


gtk_plot_flux_get_arrow ()

void                gtk_plot_flux_get_arrow             (GtkPlotFlux *flux,
                                                         gint *arrow_length,
                                                         gint *arrow_width,
                                                         GtkPlotSymbolStyle *arrow_style);

flux :

arrow_length :

arrow_width :

arrow_style :


gtk_plot_flux_center ()

void                gtk_plot_flux_center                (GtkPlotFlux *flux,
                                                         gboolean center);

flux :

center :


gtk_plot_flux_is_centered ()

gboolean            gtk_plot_flux_is_centered           (GtkPlotFlux *flux);

flux :

Returns :


gtk_plot_flux_show_scale ()

void                gtk_plot_flux_show_scale            (GtkPlotFlux *flux,
                                                         gboolean show);

flux :

show :


gtk_plot_flux_set_scale_max ()

void                gtk_plot_flux_set_scale_max         (GtkPlotFlux *flux,
                                                         gdouble scale_max);

flux :

scale_max :


gtk_plot_flux_set_size_max ()

void                gtk_plot_flux_set_size_max          (GtkPlotFlux *flux,
                                                         guint size_max);

flux :

size_max :


gtk_plot_flux_set_labels_precision ()

void                gtk_plot_flux_set_labels_precision  (GtkPlotFlux *flux,
                                                         gint precision);

flux :

precision :


gtk_plot_flux_set_labels_style ()

void                gtk_plot_flux_set_labels_style      (GtkPlotFlux *flux,
                                                         GtkPlotLabelStyle style);

flux :

style :


gtk_plot_flux_set_labels_prefix ()

void                gtk_plot_flux_set_labels_prefix     (GtkPlotFlux *flux,
                                                         const gchar *prefix);

flux :

prefix :


gtk_plot_flux_set_labels_suffix ()

void                gtk_plot_flux_set_labels_suffix     (GtkPlotFlux *flux,
                                                         const gchar *suffix);

flux :

suffix :

Property Details

The "centered" property

  "centered"                 gboolean              : Read / Write

Default value: FALSE


The "labels-precision" property

  "labels-precision"         gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-prefix" property

  "labels-prefix"            gchar*                : Read / Write

Default value: NULL


The "labels-style" property

  "labels-style"             gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-suffix" property

  "labels-suffix"            gchar*                : Read / Write

Default value: NULL


The "length" property

  "length"                   gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "scale-max" property

  "scale-max"                gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "show-scale" property

  "show-scale"               gboolean              : Read / Write

Default value: FALSE


The "size-max" property

  "size-max"                 gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "style" property

  "style"                    gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "width" property

  "width"                    gint                  : Read / Write

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/GtkPlotData.html0000644000076400001440000075535012604172532017205 00000000000000 GtkPlotData

GtkPlotData

GtkPlotData

Synopsis


#include <gtkextra.h>

                    GtkPlotData;
GtkWidget*          gtk_plot_data_new                   (void);
GtkWidget*          gtk_plot_data_new_function          (GtkPlotFunc function);
void                gtk_plot_data_construct_function    (GtkPlotData *data,
                                                         GtkPlotFunc function);
GtkWidget*          gtk_plot_data_new_iterator          (GtkPlotIterator iterator,
                                                         gint npoints,
                                                         guint16 mask);
void                gtk_plot_data_construct_iterator    (GtkPlotData *data,
                                                         GtkPlotIterator iterator,
                                                         gint npoints,
                                                         guint16 mask);
void                gtk_plot_data_clone                 (GtkPlotData *data,
                                                         GtkPlotData *copy);
void                gtk_plot_data_add_dimension         (GtkPlotData *data,
                                                         const gchar *name,
                                                         const gchar *label,
                                                         const gchar *desc,
                                                         GType value_type,
                                                         gboolean required,
                                                         gboolean independent);
void                gtk_plot_data_remove_dimension      (GtkPlotData *data,
                                                         const gchar *name);
GtkPlotArray *      gtk_plot_data_find_dimension        (GtkPlotData *data,
                                                         const gchar *name);
guint               gtk_plot_data_required_dimensions   (GtkPlotData *data);
guint               gtk_plot_data_independent_dimensions
                                                        (GtkPlotData *data);
void                gtk_plot_data_paint                 (GtkPlotData *data);
void                gtk_plot_data_update                (GtkPlotData *data);
void                gtk_plot_data_draw_points           (GtkPlotData *data,
                                                         gint npoints);
void                gtk_plot_data_draw_symbol           (GtkPlotData *data,
                                                         gdouble px,
                                                         gdouble py);
GtkPlotArray *      gtk_plot_data_dimension_set_points  (GtkPlotData *data,
                                                         const gchar *name,
                                                         gdouble *points);
void                gtk_plot_data_dimension_set_array   (GtkPlotData *data,
                                                         const gchar *name,
                                                         GtkPlotArray *array);
GtkPlotArray *      gtk_plot_data_dimension_get_array   (GtkPlotData *data,
                                                         const gchar *name);
void                gtk_plot_data_dimension_set_scale   (GtkPlotData *data,
                                                         const gchar *name,
                                                         gdouble scale);
gdouble             gtk_plot_data_dimension_get_scale   (GtkPlotData *data,
                                                         const gchar *name);
void                gtk_plot_data_set_points            (GtkPlotData *data,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gint num_points);
void                gtk_plot_data_get_points            (GtkPlotData *dataset,
                                                         gdouble **x,
                                                         gdouble **y,
                                                         gdouble **dx,
                                                         gdouble **dy,
                                                         gint *num_points);
void                gtk_plot_data_get_point             (GtkPlotData *dataset,
                                                         gint n,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *z,
                                                         gdouble *a,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gdouble *dz,
                                                         gdouble *da,
                                                         gchar **label,
                                                         gboolean *error);
GtkPlotArray *      gtk_plot_data_set_x                 (GtkPlotData *data,
                                                         gdouble *x);
GtkPlotArray *      gtk_plot_data_set_y                 (GtkPlotData *data,
                                                         gdouble *y);
GtkPlotArray *      gtk_plot_data_set_z                 (GtkPlotData *data,
                                                         gdouble *z);
GtkPlotArray *      gtk_plot_data_set_a                 (GtkPlotData *data,
                                                         gdouble *a);
GtkPlotArray *      gtk_plot_data_set_dx                (GtkPlotData *data,
                                                         gdouble *dx);
GtkPlotArray *      gtk_plot_data_set_dy                (GtkPlotData *data,
                                                         gdouble *dy);
GtkPlotArray *      gtk_plot_data_set_dz                (GtkPlotData *data,
                                                         gdouble *dz);
GtkPlotArray *      gtk_plot_data_set_da                (GtkPlotData *data,
                                                         gdouble *da);
void                gtk_plot_data_set_a_scale           (GtkPlotData *data,
                                                         gdouble a_scale);
GtkPlotArray *      gtk_plot_data_set_labels            (GtkPlotData *data,
                                                         gchar **labels);
gdouble *           gtk_plot_data_get_x                 (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble *           gtk_plot_data_get_y                 (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble *           gtk_plot_data_get_z                 (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble *           gtk_plot_data_get_a                 (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble *           gtk_plot_data_get_dx                (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble *           gtk_plot_data_get_dy                (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble *           gtk_plot_data_get_dz                (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble *           gtk_plot_data_get_da                (GtkPlotData *dataset,
                                                         gint *num_points);
gdouble             gtk_plot_data_get_a_scale           (GtkPlotData *dataset);
gchar **            gtk_plot_data_get_labels            (GtkPlotData *dataset,
                                                         gboolean *show_labels);
void                gtk_plot_data_show_labels           (GtkPlotData *dataset,
                                                         gboolean show_labels);
void                gtk_plot_data_labels_set_attributes (GtkPlotData *data,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg);
void                gtk_plot_data_set_numpoints         (GtkPlotData *dataset,
                                                         gint num_points);
gint                gtk_plot_data_get_numpoints         (GtkPlotData *data);
void                gtk_plot_data_set_symbol            (GtkPlotData *dataset,
                                                         GtkPlotSymbolType type,
                                                         GtkPlotSymbolStyle style,
                                                         gint size,
                                                         gfloat line_width,
                                                         const GdkColor *color,
                                                         const GdkColor *border_color);
void                gtk_plot_data_get_symbol            (GtkPlotData *dataset,
                                                         GtkPlotSymbolType *type,
                                                         GtkPlotSymbolStyle *style,
                                                         gint *size,
                                                         gfloat *line_width,
                                                         GdkColor *color,
                                                         GdkColor *border_color);
void                gtk_plot_data_set_connector         (GtkPlotData *dataset,
                                                         GtkPlotConnector connector);
gint                gtk_plot_data_get_connector         (GtkPlotData *dataset);
void                gtk_plot_data_set_line_attributes   (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_data_get_line_attributes   (GtkPlotData *dataset,
                                                         GtkPlotLineStyle *style,
                                                         GdkCapStyle *cap_style,
                                                         GdkJoinStyle *join_style,
                                                         gfloat *width,
                                                         GdkColor *color);
void                gtk_plot_data_set_x_attributes      (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_data_set_y_attributes      (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_data_set_z_attributes      (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);
void                gtk_plot_data_show_xerrbars         (GtkPlotData *dataset);
void                gtk_plot_data_show_yerrbars         (GtkPlotData *dataset);
void                gtk_plot_data_show_zerrbars         (GtkPlotData *dataset);
void                gtk_plot_data_hide_xerrbars         (GtkPlotData *dataset);
void                gtk_plot_data_hide_yerrbars         (GtkPlotData *dataset);
void                gtk_plot_data_hide_zerrbars         (GtkPlotData *dataset);
void                gtk_plot_data_fill_area             (GtkPlotData *dataset,
                                                         gboolean fill);
gboolean            gtk_plot_data_area_is_filled        (GtkPlotData *dataset);
void                gtk_plot_data_show_legend           (GtkPlotData *data);
void                gtk_plot_data_hide_legend           (GtkPlotData *dataset);
void                gtk_plot_data_set_legend            (GtkPlotData *dataset,
                                                         const gchar *legend);
void                gtk_plot_data_set_legend_precision  (GtkPlotData *dataset,
                                                         gint precision);
gint                gtk_plot_data_get_legend_precision  (GtkPlotData *data);
void                gtk_plot_data_set_name              (GtkPlotData *dataset,
                                                         const gchar *name);
GtkPlotAxis *       gtk_plot_data_gradient              (GtkPlotData *data);
GtkAllocation       gtk_plot_data_get_gradient_allocation
                                                        (GtkPlotData *data);
void                gtk_plot_data_move_gradient         (GtkPlotData *data,
                                                         gdouble x,
                                                         gdouble y);
void                gtk_plot_data_set_gradient_size     (GtkPlotData *data,
                                                         gint size);
void                gtk_plot_data_reset_gradient        (GtkPlotData *data);
void                gtk_plot_data_reset_gradient_colors (GtkPlotData *data);
void                gtk_plot_data_gradient_use_custom_colors
                                                        (GtkPlotData *data,
                                                         gboolean custom);
gboolean            gtk_plot_data_gradient_custom_colors
                                                        (GtkPlotData *data);
void                gtk_plot_data_set_gradient_mask     (GtkPlotData *data,
                                                         gint mask);
gint                gtk_plot_data_get_gradient_mask     (GtkPlotData *data);
void                gtk_plot_data_gradient_set_visible  (GtkPlotData *data,
                                                         gboolean visible);
gboolean            gtk_plot_data_gradient_visible      (GtkPlotData *data);
void                gtk_plot_data_gradient_autoscale_a  (GtkPlotData *data);
void                gtk_plot_data_gradient_autoscale_da (GtkPlotData *data);
void                gtk_plot_data_gradient_autoscale_z  (GtkPlotData *data);
void                gtk_plot_data_set_gradient_colors   (GtkPlotData *data,
                                                         const GdkColor *min,
                                                         const GdkColor *max);
void                gtk_plot_data_get_gradient_colors   (GtkPlotData *data,
                                                         GdkColor *min,
                                                         GdkColor *max);
void                gtk_plot_data_set_gradient_nth_color
                                                        (GtkPlotData *data,
                                                         guint level,
                                                         GdkColor *color);
const GdkColor *    gtk_plot_data_get_gradient_nth_color
                                                        (GtkPlotData *data,
                                                         guint level);
void                gtk_plot_data_set_gradient_outer_colors
                                                        (GtkPlotData *data,
                                                         const GdkColor *min,
                                                         const GdkColor *max);
void                gtk_plot_data_get_gradient_outer_colors
                                                        (GtkPlotData *data,
                                                         GdkColor *min,
                                                         GdkColor *max);
void                gtk_plot_data_set_gradient          (GtkPlotData *data,
                                                         gdouble min,
                                                         gdouble max,
                                                         gint nlevels,
                                                         gint nsublevels);
void                gtk_plot_data_get_gradient          (GtkPlotData *data,
                                                         gdouble *min,
                                                         gdouble *max,
                                                         gint *nlevels,
                                                         gint *nsublevels);
void                gtk_plot_data_get_gradient_level    (GtkPlotData *data,
                                                         gdouble level,
                                                         GdkColor *color);
void                gtk_plot_data_gradient_set_style    (GtkPlotData *data,
                                                         GtkPlotLabelStyle style,
                                                         gint precision);
void                gtk_plot_data_gradient_set_scale    (GtkPlotData *data,
                                                         GtkPlotScale scale);
void                gtk_plot_data_set_link              (GtkPlotData *dataset,
                                                         gpointer link);
gpointer            gtk_plot_data_get_link              (GtkPlotData *dataset);
void                gtk_plot_data_remove_link           (GtkPlotData *dataset);
GtkPlotMarker *     gtk_plot_data_add_marker            (GtkPlotData *data,
                                                         guint point);
gboolean            gtk_plot_data_remove_marker         (GtkPlotData *data,
                                                         GtkPlotMarker *marker);
void                gtk_plot_data_remove_markers        (GtkPlotData *data);
void                gtk_plot_data_show_markers          (GtkPlotData *data,
                                                         gboolean show);
gboolean            gtk_plot_data_markers_visible       (GtkPlotData *data);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotBar
                           +----GtkPlotBox
                           +----GtkPlotBubble
                           +----GtkPlotCandle
                           +----GtkPlotSurface
                           +----GtkPlotFlux
                           +----GtkPlotPixmap
                           +----GtkPlotSegment

Implemented Interfaces

GtkPlotData implements AtkImplementorIface and GtkBuildable.

Properties

  "bottom-axis"              GtkPlotAxis*          : Read
  "color-gt-max"             gpointer              : Read / Write
  "color-lt-min"             gpointer              : Read / Write
  "color-max"                gpointer              : Read / Write
  "color-min"                gpointer              : Read / Write
  "fill-area"                gboolean              : Read / Write
  "gradient-break"           gboolean              : Read / Write
  "gradient-break-max"       gdouble               : Read / Write
  "gradient-break-min"       gdouble               : Read / Write
  "gradient-break-nminor"    gint                  : Read / Write
  "gradient-break-position"  gdouble               : Read / Write
  "gradient-break-scale"     gint                  : Read / Write
  "gradient-break-step"      gdouble               : Read / Write
  "gradient-custom"          gboolean              : Read / Write
  "gradient-mask"            gint                  : Read / Write
  "gradient-max"             gdouble               : Read / Write
  "gradient-min"             gdouble               : Read / Write
  "gradient-nmajor"          gint                  : Read / Write
  "gradient-nminor"          gint                  : Read / Write
  "gradient-scale"           gint                  : Read / Write
  "gradient-show-lt-gt"      gboolean              : Read / Write
  "gradient-step"            gdouble               : Read / Write
  "is-function"              gboolean              : Read / Write
  "is-iterator"              gboolean              : Read / Write
  "iterator-mask"            gint                  : Read / Write
  "labels-angle"             gint                  : Read / Write
  "labels-bg-color"          gpointer              : Read / Write
  "labels-border"            gint                  : Read / Write
  "labels-border-shadow"     gint                  : Read / Write
  "labels-border-space"      gint                  : Read / Write
  "labels-border-width"      gint                  : Read / Write
  "labels-fg-color"          gpointer              : Read / Write
  "labels-font"              gchar*                : Read / Write
  "labels-offset"            gint                  : Read / Write
  "labels-size"              gint                  : Read / Write
  "labels-text"              gchar*                : Read / Write
  "labels-transparent"       gboolean              : Read / Write
  "legend"                   gchar*                : Read / Write
  "legends-precision"        gint                  : Read / Write
  "legends-style"            gint                  : Read / Write
  "line-cap"                 gint                  : Read / Write
  "line-color"               gpointer              : Read / Write
  "line-connector"           gint                  : Read / Write
  "line-join"                gint                  : Read / Write
  "line-style"               gint                  : Read / Write
  "line-width"               gdouble               : Read / Write
  "name"                     gchar*                : Read / Write
  "num-points"               gint                  : Read / Write
  "show-gradient"            gboolean              : Read / Write
  "show-labels"              gboolean              : Read / Write
  "show-legends"             gboolean              : Read / Write
  "show-xerrbars"            gboolean              : Read / Write
  "show-yerrbars"            gboolean              : Read / Write
  "show-zerrbars"            gboolean              : Read / Write
  "symbol-border-color"      gpointer              : Read / Write
  "symbol-border-width"      gdouble               : Read / Write
  "symbol-color"             gpointer              : Read / Write
  "symbol-size"              gint                  : Read / Write
  "symbol-style"             gint                  : Read / Write
  "symbol-type"              gint                  : Read / Write
  "xerrbar-caps"             gint                  : Read / Write
  "xerrbar-width"            gint                  : Read / Write
  "xline-cap"                gint                  : Read / Write
  "xline-color"              gpointer              : Read / Write
  "xline-join"               gint                  : Read / Write
  "xline-style"              gint                  : Read / Write
  "xline-width"              gdouble               : Read / Write
  "xstep"                    gdouble               : Read / Write
  "yerrbar-caps"             gint                  : Read / Write
  "yerrbar-width"            gint                  : Read / Write
  "yline-cap"                gint                  : Read / Write
  "yline-color"              gpointer              : Read / Write
  "yline-join"               gint                  : Read / Write
  "yline-style"              gint                  : Read / Write
  "yline-width"              gdouble               : Read / Write
  "ystep"                    gdouble               : Read / Write
  "zerrbar-caps"             gint                  : Read / Write
  "zerrbar-width"            gint                  : Read / Write
  "zline-cap"                gint                  : Read / Write
  "zline-color"              gpointer              : Read / Write
  "zline-join"               gint                  : Read / Write
  "zline-style"              gint                  : Read / Write
  "zline-width"              gdouble               : Read / Write
  "zstep"                    gdouble               : Read / Write

Signals

  "add-to-plot"                                    : Run Last
  "draw-data"                                      : Run First
  "gradient-changed"                               : Run Last
  "gradient-colors-changed"                        : Run Last
  "update"                                         : Run Last

Description

A GtkPlotData object contains multiple dimensions of data for GtkPlots. Each dimension has a name, a label, a description and an array of typed values. Each GtkPlot can display multiple GtkPlotData sets.

Predefined dimension names are: "x" for X values, "y" for Y values, "z" for Z values, "a" for Symbol size, "dx" for X error, "dy" for Y error, "dz" for Z error, "da" for amplitude values, "labels" for value labels

Details

GtkPlotData

typedef struct _GtkPlotData GtkPlotData;

The GtkPlotData struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_data_new ()

GtkWidget*          gtk_plot_data_new                   (void);

Returns :


gtk_plot_data_new_function ()

GtkWidget*          gtk_plot_data_new_function          (GtkPlotFunc function);

function :

a GtkPlotFunc.. scope async.

Returns :

the GtkPlotData Widget. transfer none.

gtk_plot_data_construct_function ()

void                gtk_plot_data_construct_function    (GtkPlotData *data,
                                                         GtkPlotFunc function);

data :

a GtkPlotData widget.

function :

a GtkPlotFunc.. scope notified.

gtk_plot_data_new_iterator ()

GtkWidget*          gtk_plot_data_new_iterator          (GtkPlotIterator iterator,
                                                         gint npoints,
                                                         guint16 mask);

iterator :

a GtkPlotIterator.. scope async.

npoints :

mask :

Returns :

(transfer full) a new GtkPlotData.

gtk_plot_data_construct_iterator ()

void                gtk_plot_data_construct_iterator    (GtkPlotData *data,
                                                         GtkPlotIterator iterator,
                                                         gint npoints,
                                                         guint16 mask);

data :

a GtkPlotData widget.

iterator :

a GtkPlotIterator.. scope async.

npoints :

mask :


gtk_plot_data_clone ()

void                gtk_plot_data_clone                 (GtkPlotData *data,
                                                         GtkPlotData *copy);

data :

a GtkPlotData widget.

copy :


gtk_plot_data_add_dimension ()

void                gtk_plot_data_add_dimension         (GtkPlotData *data,
                                                         const gchar *name,
                                                         const gchar *label,
                                                         const gchar *desc,
                                                         GType value_type,
                                                         gboolean required,
                                                         gboolean independent);

data :

a GtkPlotData widget.

name :

label :

desc :

value_type :

required :

independent :


gtk_plot_data_remove_dimension ()

void                gtk_plot_data_remove_dimension      (GtkPlotData *data,
                                                         const gchar *name);

data :

a GtkPlotData widget.

name :


gtk_plot_data_find_dimension ()

GtkPlotArray *      gtk_plot_data_find_dimension        (GtkPlotData *data,
                                                         const gchar *name);

data :

a GtkPlotData widget.

name :

dimension name to be searched for

Returns :

(transfer none) the GtkPlotArray with the given name

gtk_plot_data_required_dimensions ()

guint               gtk_plot_data_required_dimensions   (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :


gtk_plot_data_independent_dimensions ()

guint               gtk_plot_data_independent_dimensions
                                                        (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :


gtk_plot_data_paint ()

void                gtk_plot_data_paint                 (GtkPlotData *data);

data :


gtk_plot_data_update ()

void                gtk_plot_data_update                (GtkPlotData *data);

data :

a GtkPlotData widget.

gtk_plot_data_draw_points ()

void                gtk_plot_data_draw_points           (GtkPlotData *data,
                                                         gint npoints);

data :

a GtkPlotData widget.

npoints :


gtk_plot_data_draw_symbol ()

void                gtk_plot_data_draw_symbol           (GtkPlotData *data,
                                                         gdouble px,
                                                         gdouble py);

data :

a GtkPlotData widget.

px :

py :


gtk_plot_data_dimension_set_points ()

GtkPlotArray *      gtk_plot_data_dimension_set_points  (GtkPlotData *data,
                                                         const gchar *name,
                                                         gdouble *points);

data :

a GtkPlotData widget.

name :

the dimension name affected

points :

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_dimension_set_array ()

void                gtk_plot_data_dimension_set_array   (GtkPlotData *data,
                                                         const gchar *name,
                                                         GtkPlotArray *array);

data :

a GtkPlotData widget.

name :

array :


gtk_plot_data_dimension_get_array ()

GtkPlotArray *      gtk_plot_data_dimension_get_array   (GtkPlotData *data,
                                                         const gchar *name);

data :

a GtkPlotData widget.

name :

the dimension name to be searched

Returns :

(transfer none) the GtkPlotArray with the given name

gtk_plot_data_dimension_set_scale ()

void                gtk_plot_data_dimension_set_scale   (GtkPlotData *data,
                                                         const gchar *name,
                                                         gdouble scale);

data :

name :

scale :


gtk_plot_data_dimension_get_scale ()

gdouble             gtk_plot_data_dimension_get_scale   (GtkPlotData *data,
                                                         const gchar *name);

data :

name :

Returns :


gtk_plot_data_set_points ()

void                gtk_plot_data_set_points            (GtkPlotData *data,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gint num_points);

data :

a GtkPlotData widget.

x :

(transfer none) array of gdouble x-values

y :

(transfer none) array of gdouble y-values

dx :

(transfer none) array of gdouble delta-x-values (null)

dy :

(transfer none) array of gdouble delta-x-values (null)

num_points :

number of points = length of arrays

gtk_plot_data_get_points ()

void                gtk_plot_data_get_points            (GtkPlotData *dataset,
                                                         gdouble **x,
                                                         gdouble **y,
                                                         gdouble **dx,
                                                         gdouble **dy,
                                                         gint *num_points);

Retrieves pointers to internal plot data. Beware: The plot data belongs to the caller of #gtk_plot_data_set_points()

dataset :

a GtkPlotData widget.

x :

(transfer none) where to store result pointer

y :

(transfer none) where to store result pointer

dx :

(transfer none) where to store result pointer

dy :

(transfer none) where to store result pointer

num_points :

(transfer none) where to store number of points

gtk_plot_data_get_point ()

void                gtk_plot_data_get_point             (GtkPlotData *dataset,
                                                         gint n,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *z,
                                                         gdouble *a,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gdouble *dz,
                                                         gdouble *da,
                                                         gchar **label,
                                                         gboolean *error);

dataset :

a GtkPlotData widget.

n :

x :

y :

z :

a :

dx :

dy :

dz :

da :

label :

error :


gtk_plot_data_set_x ()

GtkPlotArray *      gtk_plot_data_set_x                 (GtkPlotData *data,
                                                         gdouble *x);

Set pointer to plot data (x-values). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_x().

data :

a GtkPlotData widget.

x :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_y ()

GtkPlotArray *      gtk_plot_data_set_y                 (GtkPlotData *data,
                                                         gdouble *y);

Set pointer to plot data (y-values). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_y().

data :

a GtkPlotData widget.

y :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_z ()

GtkPlotArray *      gtk_plot_data_set_z                 (GtkPlotData *data,
                                                         gdouble *z);

Set pointer to plot data (z-values). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_z().

data :

a GtkPlotData widget.

z :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_a ()

GtkPlotArray *      gtk_plot_data_set_a                 (GtkPlotData *data,
                                                         gdouble *a);

Set pointer to plot data (Symbol size). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_a().

data :

a GtkPlotData widget.

a :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_dx ()

GtkPlotArray *      gtk_plot_data_set_dx                (GtkPlotData *data,
                                                         gdouble *dx);

Set pointer to plot data (x-error). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_dx().

data :

a GtkPlotData widget.

dx :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_dy ()

GtkPlotArray *      gtk_plot_data_set_dy                (GtkPlotData *data,
                                                         gdouble *dy);

Set pointer to plot data (y-error). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_dy().

data :

a GtkPlotData widget.

dy :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_dz ()

GtkPlotArray *      gtk_plot_data_set_dz                (GtkPlotData *data,
                                                         gdouble *dz);

Set pointer to plot data (z-error). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_dz().

data :

a GtkPlotData widget.

dz :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_da ()

GtkPlotArray *      gtk_plot_data_set_da                (GtkPlotData *data,
                                                         gdouble *da);

Set pointer to plot data (Amplitude). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_da().

data :

a GtkPlotData widget.

da :

(transfer none) pointer to plot data

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_set_a_scale ()

void                gtk_plot_data_set_a_scale           (GtkPlotData *data,
                                                         gdouble a_scale);

data :

a GtkPlotData widget.

a_scale :


gtk_plot_data_set_labels ()

GtkPlotArray *      gtk_plot_data_set_labels            (GtkPlotData *data,
                                                         gchar **labels);

data :

a GtkPlotData widget.

labels :

labels to be set

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_data_get_x ()

gdouble *           gtk_plot_data_get_x                 (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_y ()

gdouble *           gtk_plot_data_get_y                 (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_z ()

gdouble *           gtk_plot_data_get_z                 (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_a ()

gdouble *           gtk_plot_data_get_a                 (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_dx ()

gdouble *           gtk_plot_data_get_dx                (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_dy ()

gdouble *           gtk_plot_data_get_dy                (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_dz ()

gdouble *           gtk_plot_data_get_dz                (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_da ()

gdouble *           gtk_plot_data_get_da                (GtkPlotData *dataset,
                                                         gint *num_points);

Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x().

dataset :

a GtkPlotData widget.

num_points :

place to store number of points

Returns :

(transfer none) pointer to internal plot data

gtk_plot_data_get_a_scale ()

gdouble             gtk_plot_data_get_a_scale           (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

Returns :


gtk_plot_data_get_labels ()

gchar **            gtk_plot_data_get_labels            (GtkPlotData *dataset,
                                                         gboolean *show_labels);

dataset :

a GtkPlotData widget.

show_labels :

current setting. out.

Returns :

(transfer none) the label string array

gtk_plot_data_show_labels ()

void                gtk_plot_data_show_labels           (GtkPlotData *dataset,
                                                         gboolean show_labels);

dataset :

a GtkPlotData widget.

show_labels :


gtk_plot_data_labels_set_attributes ()

void                gtk_plot_data_labels_set_attributes (GtkPlotData *data,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg);

data :

a GtkPlotData widget.

font :

height :

angle :

fg :

bg :


gtk_plot_data_set_numpoints ()

void                gtk_plot_data_set_numpoints         (GtkPlotData *dataset,
                                                         gint num_points);

dataset :

a GtkPlotData widget.

num_points :


gtk_plot_data_get_numpoints ()

gint                gtk_plot_data_get_numpoints         (GtkPlotData *data);

data :

Returns :


gtk_plot_data_set_symbol ()

void                gtk_plot_data_set_symbol            (GtkPlotData *dataset,
                                                         GtkPlotSymbolType type,
                                                         GtkPlotSymbolStyle style,
                                                         gint size,
                                                         gfloat line_width,
                                                         const GdkColor *color,
                                                         const GdkColor *border_color);

dataset :

a GtkPlotData widget.

type :

symbol type, see GtkPlotSymbolType

style :

symbol style, see GtkPlotSymbolStyle

size :

symbol size

line_width :

symbol line width

color :

fill color

border_color :

border color

gtk_plot_data_get_symbol ()

void                gtk_plot_data_get_symbol            (GtkPlotData *dataset,
                                                         GtkPlotSymbolType *type,
                                                         GtkPlotSymbolStyle *style,
                                                         gint *size,
                                                         gfloat *line_width,
                                                         GdkColor *color,
                                                         GdkColor *border_color);

dataset :

a GtkPlotData widget.

type :

style :

size :

line_width :

color :

border_color :


gtk_plot_data_set_connector ()

void                gtk_plot_data_set_connector         (GtkPlotData *dataset,
                                                         GtkPlotConnector connector);

dataset :

a GtkPlotData widget.

connector :


gtk_plot_data_get_connector ()

gint                gtk_plot_data_get_connector         (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

Returns :


gtk_plot_data_set_line_attributes ()

void                gtk_plot_data_set_line_attributes   (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);

dataset :

a GtkPlotData widget.

style :

a GtkPlotLineStyle

cap_style :

a GdkCapStyle

join_style :

a GdkJoinStyle

width :

line width

color :

line color

gtk_plot_data_get_line_attributes ()

void                gtk_plot_data_get_line_attributes   (GtkPlotData *dataset,
                                                         GtkPlotLineStyle *style,
                                                         GdkCapStyle *cap_style,
                                                         GdkJoinStyle *join_style,
                                                         gfloat *width,
                                                         GdkColor *color);

dataset :

a GtkPlotData widget.

style :

cap_style :

join_style :

width :

color :


gtk_plot_data_set_x_attributes ()

void                gtk_plot_data_set_x_attributes      (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);

dataset :

a GtkPlotData widget.

style :

cap_style :

join_style :

width :

color :


gtk_plot_data_set_y_attributes ()

void                gtk_plot_data_set_y_attributes      (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);

dataset :

a GtkPlotData widget.

style :

cap_style :

join_style :

width :

color :


gtk_plot_data_set_z_attributes ()

void                gtk_plot_data_set_z_attributes      (GtkPlotData *dataset,
                                                         GtkPlotLineStyle style,
                                                         GdkCapStyle cap_style,
                                                         GdkJoinStyle join_style,
                                                         gfloat width,
                                                         const GdkColor *color);

dataset :

a GtkPlotData widget.

style :

cap_style :

join_style :

width :

color :


gtk_plot_data_show_xerrbars ()

void                gtk_plot_data_show_xerrbars         (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_show_yerrbars ()

void                gtk_plot_data_show_yerrbars         (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_show_zerrbars ()

void                gtk_plot_data_show_zerrbars         (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_hide_xerrbars ()

void                gtk_plot_data_hide_xerrbars         (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_hide_yerrbars ()

void                gtk_plot_data_hide_yerrbars         (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_hide_zerrbars ()

void                gtk_plot_data_hide_zerrbars         (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_fill_area ()

void                gtk_plot_data_fill_area             (GtkPlotData *dataset,
                                                         gboolean fill);

dataset :

a GtkPlotData widget.

fill :


gtk_plot_data_area_is_filled ()

gboolean            gtk_plot_data_area_is_filled        (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

Returns :


gtk_plot_data_show_legend ()

void                gtk_plot_data_show_legend           (GtkPlotData *data);

data :


gtk_plot_data_hide_legend ()

void                gtk_plot_data_hide_legend           (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_set_legend ()

void                gtk_plot_data_set_legend            (GtkPlotData *dataset,
                                                         const gchar *legend);

dataset :

a GtkPlotData widget.

legend :


gtk_plot_data_set_legend_precision ()

void                gtk_plot_data_set_legend_precision  (GtkPlotData *dataset,
                                                         gint precision);

dataset :

a GtkPlotData widget.

precision :


gtk_plot_data_get_legend_precision ()

gint                gtk_plot_data_get_legend_precision  (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :


gtk_plot_data_set_name ()

void                gtk_plot_data_set_name              (GtkPlotData *dataset,
                                                         const gchar *name);

dataset :

a GtkPlotData widget.

name :


gtk_plot_data_gradient ()

GtkPlotAxis *       gtk_plot_data_gradient              (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :

(transfer none) the gradient GtkPlotAxis

gtk_plot_data_get_gradient_allocation ()

GtkAllocation       gtk_plot_data_get_gradient_allocation
                                                        (GtkPlotData *data);

data :

a GtkPlotData widget

Returns :

(transfer full) the gradient GtkAllocation

gtk_plot_data_move_gradient ()

void                gtk_plot_data_move_gradient         (GtkPlotData *data,
                                                         gdouble x,
                                                         gdouble y);

data :

a GtkPlotData widget.

x :

y :


gtk_plot_data_set_gradient_size ()

void                gtk_plot_data_set_gradient_size     (GtkPlotData *data,
                                                         gint size);

data :

a GtkPlotData widget.

size :


gtk_plot_data_reset_gradient ()

void                gtk_plot_data_reset_gradient        (GtkPlotData *data);

data :


gtk_plot_data_reset_gradient_colors ()

void                gtk_plot_data_reset_gradient_colors (GtkPlotData *data);

data :

a GtkPlotData widget.

gtk_plot_data_gradient_use_custom_colors ()

void                gtk_plot_data_gradient_use_custom_colors
                                                        (GtkPlotData *data,
                                                         gboolean custom);

data :

a GtkPlotData widget.

custom :


gtk_plot_data_gradient_custom_colors ()

gboolean            gtk_plot_data_gradient_custom_colors
                                                        (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :


gtk_plot_data_set_gradient_mask ()

void                gtk_plot_data_set_gradient_mask     (GtkPlotData *data,
                                                         gint mask);

data :

a GtkPlotData widget.

mask :


gtk_plot_data_get_gradient_mask ()

gint                gtk_plot_data_get_gradient_mask     (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :


gtk_plot_data_gradient_set_visible ()

void                gtk_plot_data_gradient_set_visible  (GtkPlotData *data,
                                                         gboolean visible);

data :

visible :


gtk_plot_data_gradient_visible ()

gboolean            gtk_plot_data_gradient_visible      (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :


gtk_plot_data_gradient_autoscale_a ()

void                gtk_plot_data_gradient_autoscale_a  (GtkPlotData *data);

data :


gtk_plot_data_gradient_autoscale_da ()

void                gtk_plot_data_gradient_autoscale_da (GtkPlotData *data);

data :

a GtkPlotData widget.

gtk_plot_data_gradient_autoscale_z ()

void                gtk_plot_data_gradient_autoscale_z  (GtkPlotData *data);

data :

a GtkPlotData widget.

gtk_plot_data_set_gradient_colors ()

void                gtk_plot_data_set_gradient_colors   (GtkPlotData *data,
                                                         const GdkColor *min,
                                                         const GdkColor *max);

data :

a GtkPlotData widget.

min :

max :


gtk_plot_data_get_gradient_colors ()

void                gtk_plot_data_get_gradient_colors   (GtkPlotData *data,
                                                         GdkColor *min,
                                                         GdkColor *max);

data :

a GtkPlotData widget.

min :

max :


gtk_plot_data_set_gradient_nth_color ()

void                gtk_plot_data_set_gradient_nth_color
                                                        (GtkPlotData *data,
                                                         guint level,
                                                         GdkColor *color);

data :

a GtkPlotData widget.

level :

color :


gtk_plot_data_get_gradient_nth_color ()

const GdkColor *    gtk_plot_data_get_gradient_nth_color
                                                        (GtkPlotData *data,
                                                         guint level);

data :

a GtkPlotData widget.

level :

Returns :


gtk_plot_data_set_gradient_outer_colors ()

void                gtk_plot_data_set_gradient_outer_colors
                                                        (GtkPlotData *data,
                                                         const GdkColor *min,
                                                         const GdkColor *max);

data :

a GtkPlotData widget.

min :

max :


gtk_plot_data_get_gradient_outer_colors ()

void                gtk_plot_data_get_gradient_outer_colors
                                                        (GtkPlotData *data,
                                                         GdkColor *min,
                                                         GdkColor *max);

data :

a GtkPlotData widget.

min :

max :


gtk_plot_data_set_gradient ()

void                gtk_plot_data_set_gradient          (GtkPlotData *data,
                                                         gdouble min,
                                                         gdouble max,
                                                         gint nlevels,
                                                         gint nsublevels);

data :

a GtkPlotData widget.

min :

max :

nlevels :

nsublevels :


gtk_plot_data_get_gradient ()

void                gtk_plot_data_get_gradient          (GtkPlotData *data,
                                                         gdouble *min,
                                                         gdouble *max,
                                                         gint *nlevels,
                                                         gint *nsublevels);

data :

a GtkPlotData widget.

min :

max :

nlevels :

nsublevels :


gtk_plot_data_get_gradient_level ()

void                gtk_plot_data_get_gradient_level    (GtkPlotData *data,
                                                         gdouble level,
                                                         GdkColor *color);

data :

a GtkPlotData widget.

level :

color :


gtk_plot_data_gradient_set_style ()

void                gtk_plot_data_gradient_set_style    (GtkPlotData *data,
                                                         GtkPlotLabelStyle style,
                                                         gint precision);

data :

a GtkPlotData widget.

style :

precision :


gtk_plot_data_gradient_set_scale ()

void                gtk_plot_data_gradient_set_scale    (GtkPlotData *data,
                                                         GtkPlotScale scale);

data :

a GtkPlotData widget.

scale :


gtk_plot_data_set_link ()

void                gtk_plot_data_set_link              (GtkPlotData *dataset,
                                                         gpointer link);

dataset :

a GtkPlotData widget.

link :


gtk_plot_data_get_link ()

gpointer            gtk_plot_data_get_link              (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

Returns :

(transfer none) link pointer

gtk_plot_data_remove_link ()

void                gtk_plot_data_remove_link           (GtkPlotData *dataset);

dataset :

a GtkPlotData widget.

gtk_plot_data_add_marker ()

GtkPlotMarker *     gtk_plot_data_add_marker            (GtkPlotData *data,
                                                         guint point);

data :

a GtkPlotData widget.

point :

Returns :


gtk_plot_data_remove_marker ()

gboolean            gtk_plot_data_remove_marker         (GtkPlotData *data,
                                                         GtkPlotMarker *marker);

data :

a GtkPlotData widget.

marker :

Returns :


gtk_plot_data_remove_markers ()

void                gtk_plot_data_remove_markers        (GtkPlotData *data);

data :

a GtkPlotData widget.

gtk_plot_data_show_markers ()

void                gtk_plot_data_show_markers          (GtkPlotData *data,
                                                         gboolean show);

data :

a GtkPlotData widget.

show :


gtk_plot_data_markers_visible ()

gboolean            gtk_plot_data_markers_visible       (GtkPlotData *data);

data :

a GtkPlotData widget.

Returns :

Property Details

The "bottom-axis" property

  "bottom-axis"              GtkPlotAxis*          : Read


The "color-gt-max" property

  "color-gt-max"             gpointer              : Read / Write


The "color-lt-min" property

  "color-lt-min"             gpointer              : Read / Write


The "color-max" property

  "color-max"                gpointer              : Read / Write


The "color-min" property

  "color-min"                gpointer              : Read / Write


The "fill-area" property

  "fill-area"                gboolean              : Read / Write

Default value: FALSE


The "gradient-break" property

  "gradient-break"           gboolean              : Read / Write

Default value: FALSE


The "gradient-break-max" property

  "gradient-break-max"       gdouble               : Read / Write

Default value: 0


The "gradient-break-min" property

  "gradient-break-min"       gdouble               : Read / Write

Default value: 0


The "gradient-break-nminor" property

  "gradient-break-nminor"    gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "gradient-break-position" property

  "gradient-break-position"  gdouble               : Read / Write

Allowed values: [0,1]

Default value: 0


The "gradient-break-scale" property

  "gradient-break-scale"     gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "gradient-break-step" property

  "gradient-break-step"      gdouble               : Read / Write

Default value: 0


The "gradient-custom" property

  "gradient-custom"          gboolean              : Read / Write

Default value: FALSE


The "gradient-mask" property

  "gradient-mask"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "gradient-max" property

  "gradient-max"             gdouble               : Read / Write

Default value: 0


The "gradient-min" property

  "gradient-min"             gdouble               : Read / Write

Default value: 0


The "gradient-nmajor" property

  "gradient-nmajor"          gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "gradient-nminor" property

  "gradient-nminor"          gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "gradient-scale" property

  "gradient-scale"           gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "gradient-show-lt-gt" property

  "gradient-show-lt-gt"      gboolean              : Read / Write

Default value: TRUE


The "gradient-step" property

  "gradient-step"            gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "is-function" property

  "is-function"              gboolean              : Read / Write

Default value: FALSE


The "is-iterator" property

  "is-iterator"              gboolean              : Read / Write

Default value: FALSE


The "iterator-mask" property

  "iterator-mask"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-angle" property

  "labels-angle"             gint                  : Read / Write

Allowed values: [0,270]

Default value: 0


The "labels-bg-color" property

  "labels-bg-color"          gpointer              : Read / Write


The "labels-border" property

  "labels-border"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-border-shadow" property

  "labels-border-shadow"     gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-border-space" property

  "labels-border-space"      gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-border-width" property

  "labels-border-width"      gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-fg-color" property

  "labels-fg-color"          gpointer              : Read / Write


The "labels-font" property

  "labels-font"              gchar*                : Read / Write

Default value: NULL


The "labels-offset" property

  "labels-offset"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-size" property

  "labels-size"              gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "labels-text" property

  "labels-text"              gchar*                : Read / Write

Default value: NULL


The "labels-transparent" property

  "labels-transparent"       gboolean              : Read / Write

Default value: TRUE


The "legend" property

  "legend"                   gchar*                : Read / Write

Default value: NULL


The "legends-precision" property

  "legends-precision"        gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "legends-style" property

  "legends-style"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "line-cap" property

  "line-cap"                 gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "line-color" property

  "line-color"               gpointer              : Read / Write


The "line-connector" property

  "line-connector"           gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "line-join" property

  "line-join"                gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "line-style" property

  "line-style"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "line-width" property

  "line-width"               gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "name" property

  "name"                     gchar*                : Read / Write

Default value: NULL


The "num-points" property

  "num-points"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "show-gradient" property

  "show-gradient"            gboolean              : Read / Write

Default value: TRUE


The "show-labels" property

  "show-labels"              gboolean              : Read / Write

Default value: TRUE


The "show-legends" property

  "show-legends"             gboolean              : Read / Write

Default value: TRUE


The "show-xerrbars" property

  "show-xerrbars"            gboolean              : Read / Write

Default value: FALSE


The "show-yerrbars" property

  "show-yerrbars"            gboolean              : Read / Write

Default value: FALSE


The "show-zerrbars" property

  "show-zerrbars"            gboolean              : Read / Write

Default value: FALSE


The "symbol-border-color" property

  "symbol-border-color"      gpointer              : Read / Write


The "symbol-border-width" property

  "symbol-border-width"      gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "symbol-color" property

  "symbol-color"             gpointer              : Read / Write


The "symbol-size" property

  "symbol-size"              gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "symbol-style" property

  "symbol-style"             gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "symbol-type" property

  "symbol-type"              gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "xerrbar-caps" property

  "xerrbar-caps"             gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "xerrbar-width" property

  "xerrbar-width"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "xline-cap" property

  "xline-cap"                gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "xline-color" property

  "xline-color"              gpointer              : Read / Write


The "xline-join" property

  "xline-join"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "xline-style" property

  "xline-style"              gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "xline-width" property

  "xline-width"              gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "xstep" property

  "xstep"                    gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "yerrbar-caps" property

  "yerrbar-caps"             gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "yerrbar-width" property

  "yerrbar-width"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "yline-cap" property

  "yline-cap"                gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "yline-color" property

  "yline-color"              gpointer              : Read / Write


The "yline-join" property

  "yline-join"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "yline-style" property

  "yline-style"              gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "yline-width" property

  "yline-width"              gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "ystep" property

  "ystep"                    gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "zerrbar-caps" property

  "zerrbar-caps"             gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "zerrbar-width" property

  "zerrbar-width"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "zline-cap" property

  "zline-cap"                gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "zline-color" property

  "zline-color"              gpointer              : Read / Write


The "zline-join" property

  "zline-join"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "zline-style" property

  "zline-style"              gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "zline-width" property

  "zline-width"              gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "zstep" property

  "zstep"                    gdouble               : Read / Write

Allowed values: >= 0

Default value: 0

Signal Details

The "add-to-plot" signal

gboolean            user_function                      (GtkPlotData *plotdata,
                                                        GtkPlot     *arg1,
                                                        gpointer     user_data)      : Run Last

plotdata :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

Returns :


The "draw-data" signal

void                user_function                      (GtkPlotData *plotdata,
                                                        gpointer     user_data)      : Run First

plotdata :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "gradient-changed" signal

void                user_function                      (GtkPlotData *plotdata,
                                                        gpointer     user_data)      : Run Last

plotdata :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "gradient-colors-changed" signal

void                user_function                      (GtkPlotData *plotdata,
                                                        gpointer     user_data)      : Run Last

plotdata :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "update" signal

void                user_function                      (GtkPlotData *data,
                                                        gboolean     new_range,
                                                        gpointer     user_data)      : Run Last

data :

a GtkPlotData widget.

new_range :

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/GtkSheet.html0000644000076400001440000110701612604172532016534 00000000000000 GtkSheet

GtkSheet

GtkSheet — A spreadsheet widget for Gtk+

Synopsis


#include <gtkextra.h>

                    GtkSheet;
                    GtkSheetChild;
                    GtkSheetRow;
                    GtkSheetCell;
                    GtkSheetRange;
                    GtkSheetButton;
                    GtkSheetCellAttr;
                    GtkSheetCellBorder;
enum                GtkSheetAttrType;
enum                GtkSheetState;
enum                GtkSheetEntryType;
enum                GtkSheetVerticalJustification;
GtkWidget *         gtk_sheet_new                       (guint rows,
                                                         guint columns,
                                                         const gchar *title);
void                gtk_sheet_construct                 (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);
GtkWidget *         gtk_sheet_new_browser               (guint rows,
                                                         guint columns,
                                                         const gchar *title);
void                gtk_sheet_construct_browser         (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);
GtkWidget *         gtk_sheet_new_with_custom_entry     (guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);
void                gtk_sheet_construct_with_custom_entry
                                                        (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);
void                gtk_sheet_change_entry              (GtkSheet *sheet,
                                                         const GType entry_type);
GType               gtk_sheet_get_entry_type            (GtkSheet *sheet);
GtkWidget *         gtk_sheet_get_entry                 (GtkSheet *sheet);
GtkWidget *         gtk_sheet_get_entry_widget          (GtkSheet *sheet);
gchar *             gtk_sheet_get_entry_text            (GtkSheet *sheet);
void                gtk_sheet_set_entry_text            (GtkSheet *sheet,
                                                         const gchar *text);
void                gtk_sheet_set_entry_editable        (GtkSheet *sheet,
                                                         const gboolean editable);
gulong              gtk_sheet_entry_signal_connect_changed
                                                        (GtkSheet *sheet,
                                                         GCallback handler);
void                gtk_sheet_entry_signal_disconnect_by_func
                                                        (GtkSheet *sheet,
                                                         GCallback handler);
void                gtk_sheet_entry_select_region       (GtkSheet *sheet,
                                                         gint start_pos,
                                                         gint end_pos);
GtkSheetState       gtk_sheet_get_state                 (GtkSheet *sheet);
gboolean            gtk_sheet_get_attributes            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkSheetCellAttr *attributes);
guint               gtk_sheet_get_rows_count            (GtkSheet *sheet);
void                gtk_sheet_get_visible_range         (GtkSheet *sheet,
                                                         GtkSheetRange *range);
void                gtk_sheet_set_selection_mode        (GtkSheet *sheet,
                                                         GtkSelectionMode mode);
gboolean            gtk_sheet_autoresize                (GtkSheet *sheet);
gboolean            gtk_sheet_autoresize_columns        (GtkSheet *sheet);
void                gtk_sheet_set_autoresize_columns    (GtkSheet *sheet,
                                                         gboolean autoresize);
gboolean            gtk_sheet_autoresize_rows           (GtkSheet *sheet);
void                gtk_sheet_set_autoresize_rows       (GtkSheet *sheet,
                                                         gboolean autoresize);
void                gtk_sheet_set_autoresize            (GtkSheet *sheet,
                                                         gboolean autoresize);
gboolean            gtk_sheet_autoscroll                (GtkSheet *sheet);
void                gtk_sheet_set_autoscroll            (GtkSheet *sheet,
                                                         gboolean autoscroll);
gboolean            gtk_sheet_clip_text                 (GtkSheet *sheet);
void                gtk_sheet_set_clip_text             (GtkSheet *sheet,
                                                         gboolean clip_text);
gboolean            gtk_sheet_justify_entry             (GtkSheet *sheet);
void                gtk_sheet_set_justify_entry         (GtkSheet *sheet,
                                                         gboolean justify);
GtkSheetVerticalJustification  gtk_sheet_get_vjustification
                                                        (GtkSheet *sheet);
void                gtk_sheet_set_vjustification        (GtkSheet *sheet,
                                                         GtkSheetVerticalJustification vjust);
gboolean            gtk_sheet_locked                    (GtkSheet *sheet);
void                gtk_sheet_set_locked                (GtkSheet *sheet,
                                                         gboolean locked);
void                gtk_sheet_set_title                 (GtkSheet *sheet,
                                                         const gchar *title);
const gchar *       gtk_sheet_get_description           (GtkSheet *sheet,
                                                         const gchar *description);
void                gtk_sheet_set_description           (GtkSheet *sheet,
                                                         const gchar *description);
gboolean            gtk_sheet_is_frozen                 (GtkSheet *sheet);
void                gtk_sheet_freeze                    (GtkSheet *sheet);
void                gtk_sheet_thaw                      (GtkSheet *sheet);
void                gtk_sheet_moveto                    (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         gint row_align,
                                                         gint col_align);
void                gtk_sheet_set_background            (GtkSheet *sheet,
                                                         GdkColor *color);
void                gtk_sheet_set_grid                  (GtkSheet *sheet,
                                                         GdkColor *color);
gboolean            gtk_sheet_grid_visible              (GtkSheet *sheet);
void                gtk_sheet_show_grid                 (GtkSheet *sheet,
                                                         gboolean show);
GtkAdjustment *     gtk_sheet_get_hadjustment           (GtkSheet *sheet);
void                gtk_sheet_set_hadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);
GtkAdjustment *     gtk_sheet_get_vadjustment           (GtkSheet *sheet);
void                gtk_sheet_set_vadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);
gboolean            gtk_sheet_in_clip                   (GtkSheet *sheet);
void                gtk_sheet_clip_range                (GtkSheet *sheet,
                                                         const GtkSheetRange *clip_range);
void                gtk_sheet_unclip_range              (GtkSheet *sheet);
void                gtk_sheet_get_active_cell           (GtkSheet *sheet,
                                                         gint *row,
                                                         gint *column);
gboolean            gtk_sheet_set_active_cell           (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);
void                gtk_sheet_set_tab_direction         (GtkSheet *sheet,
                                                         GtkDirectionType dir);
gboolean            gtk_sheet_get_selection             (GtkSheet *sheet,
                                                         GtkSheetState *state,
                                                         GtkSheetRange *range);
void                gtk_sheet_select_row                (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_select_range              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);
void                gtk_sheet_unselect_range            (GtkSheet *sheet);
gchar *             gtk_sheet_get_tooltip_markup        (GtkSheet *sheet);
void                gtk_sheet_set_tooltip_markup        (GtkSheet *sheet,
                                                         const gchar *markup);
gchar *             gtk_sheet_get_tooltip_text          (GtkSheet *sheet);
void                gtk_sheet_set_tooltip_text          (GtkSheet *sheet,
                                                         const gchar *text);
void                gtk_sheet_add_row                   (GtkSheet *sheet,
                                                         guint nrows);
void                gtk_sheet_insert_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);
void                gtk_sheet_delete_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);
gboolean            gtk_sheet_row_titles_visible        (GtkSheet *sheet);
void                gtk_sheet_show_row_titles           (GtkSheet *sheet);
void                gtk_sheet_hide_row_titles           (GtkSheet *sheet);
const gchar *       gtk_sheet_get_row_title             (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_set_row_title             (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *title);
void                gtk_sheet_set_row_titles_width      (GtkSheet *sheet,
                                                         guint width);
void                gtk_sheet_set_row_height            (GtkSheet *sheet,
                                                         gint row,
                                                         guint height);
const gchar *       gtk_sheet_row_button_get_label      (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_row_button_add_label      (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *label);
void                gtk_sheet_row_button_justify        (GtkSheet *sheet,
                                                         gint row,
                                                         GtkJustification justification);
gboolean            gtk_sheet_row_sensitive             (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_row_set_sensitivity       (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean sensitive);
void                gtk_sheet_rows_set_sensitivity      (GtkSheet *sheet,
                                                         gboolean sensitive);
gboolean            gtk_sheet_rows_resizable            (GtkSheet *sheet);
void                gtk_sheet_rows_set_resizable        (GtkSheet *sheet,
                                                         gboolean resizable);
gboolean            gtk_sheet_row_visible               (GtkSheet *sheet,
                                                         gint row);
void                gtk_sheet_row_set_visibility        (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);
void                gtk_sheet_row_label_set_visibility  (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);
void                gtk_sheet_rows_labels_set_visibility
                                                        (GtkSheet *sheet,
                                                         gboolean visible);
gchar *             gtk_sheet_row_get_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row);
void                gtk_sheet_row_set_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *markup);
gchar *             gtk_sheet_row_get_tooltip_text      (GtkSheet *sheet,
                                                         const gint row);
void                gtk_sheet_row_set_tooltip_text      (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *text);
void                gtk_sheet_set_cell                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkJustification justification,
                                                         const gchar *text);
void                gtk_sheet_set_cell_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         const gchar *text);
gchar *             gtk_sheet_cell_get_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_cell_clear                (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);
void                gtk_sheet_cell_delete               (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);
GtkStateType        gtk_sheet_cell_get_state            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
gchar *             gtk_sheet_cell_get_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);
void                gtk_sheet_cell_set_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *markup);
gchar *             gtk_sheet_cell_get_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);
void                gtk_sheet_cell_set_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *text);
gboolean            gtk_sheet_get_cell_area             (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         GdkRectangle *area);
gboolean            gtk_sheet_get_pixel_info            (GtkSheet *sheet,
                                                         GdkWindow *window,
                                                         gint x,
                                                         gint y,
                                                         gint *row,
                                                         gint *column);
gpointer            gtk_sheet_get_link                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_link_cell                 (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         gpointer link);
void                gtk_sheet_remove_link               (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_range_clear               (GtkSheet *sheet,
                                                         const GtkSheetRange *range);
void                gtk_sheet_range_delete              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);
void                gtk_sheet_range_set_background      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);
void                gtk_sheet_range_set_foreground      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);
void                gtk_sheet_range_set_justification   (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         GtkJustification just);
void                gtk_sheet_range_set_editable        (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint editable);
void                gtk_sheet_range_set_visible         (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gboolean visible);
void                gtk_sheet_range_set_border          (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint mask,
                                                         guint width,
                                                         gint line_style);
void                gtk_sheet_range_set_border_color    (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);
void                gtk_sheet_range_set_font            (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         PangoFontDescription *font_desc);
GtkSheetChild *     gtk_sheet_put                       (GtkSheet *sheet,
                                                         GtkWidget *child,
                                                         gint x,
                                                         gint y);
void                gtk_sheet_attach                    (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col,
                                                         gint xoptions,
                                                         gint yoptions,
                                                         gint xpadding,
                                                         gint ypadding);
void                gtk_sheet_attach_floating           (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_attach_default            (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_move_child                (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint x,
                                                         gint y);
const GtkSheetChild * gtk_sheet_get_child_at            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);
void                gtk_sheet_button_attach             (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkSheet

Implemented Interfaces

GtkSheet implements AtkImplementorIface and GtkBuildable.

Properties

  "autoresize"               gboolean              : Read / Write
  "autoresize-cols"          gboolean              : Read / Write
  "autoresize-rows"          gboolean              : Read / Write
  "autoscroll"               gboolean              : Read / Write
  "bgcolor"                  GdkColor*             : Read / Write
  "clip-text"                gboolean              : Read / Write
  "col-titles-height"        guint                 : Read / Write
  "col-titles-visible"       gboolean              : Read / Write
  "columns-resizable"        gboolean              : Read / Write
  "description"              gchar*                : Read / Write
  "entry-type"               GtkSheetEntryType     : Read / Write
  "grid-color"               GdkColor*             : Read / Write
  "grid-visible"             gboolean              : Read / Write
  "justify-entry"            gboolean              : Read / Write
  "locked"                   gboolean              : Read / Write
  "n-rows"                   gint                  : Read / Write
  "row-titles-visible"       gboolean              : Read / Write
  "row-titles-width"         guint                 : Read / Write
  "rows-resizable"           gboolean              : Read / Write
  "selection-mode"           GtkSelectionMode      : Read / Write
  "title"                    gchar*                : Read / Write
  "vjust"                    GtkSheetVerticalJustification  : Read / Write

Signals

  "activate"                                       : Run Last
  "changed"                                        : Run Last
  "clear-cell"                                     : Run Last
  "clip-range"                                     : Run Last
  "deactivate"                                     : Run Last
  "enter-pressed"                                  : Run Last
  "entry-focus-in"                                 : Run Last
  "entry-focus-out"                                : Run Last
  "move-cursor"                                    : Run Last / Action
  "move-range"                                     : Run Last
  "new-column-width"                               : Run Last
  "new-row-height"                                 : Run Last
  "populate-popup"                                 : Run Last
  "resize-range"                                   : Run Last
  "select-column"                                  : Run Last
  "select-range"                                   : Run Last
  "select-row"                                     : Run Last
  "set-cell"                                       : Run Last
  "set-scroll-adjustments"                         : Run Last
  "traverse"                                       : Run Last

Description

GtkSheet is a matrix widget for GTK+. It consists of an scrollable grid of cells where you can put text or other GtkWidget's in. Cells are organized in rows (GtkSheetRow) and columns (GtkSheetColumn). Cell contents can be edited interactively through a specially designed entry (GtkItemEntry). A GtkSheet is also a container subclass, allowing you to display buttons, curves, pixmaps and any other widget in it. You can also set many attributes as: border, foreground and background color, text justification, and more. The testgtksheet program shows how easy is to create a spreadsheet-like GUI using this widget set.

Details

GtkSheet

typedef struct _GtkSheet GtkSheet;

The GtkSheet struct contains only private data. It should only be accessed through the functions described below.


GtkSheetChild

typedef struct {
} GtkSheetChild;

The GtkSheetChild struct contains only private data. It should only be accessed through the functions described below.


GtkSheetRow

typedef struct {
} GtkSheetRow;

The GtkSheetRow struct contains only private data. It should only be accessed through the functions described below.


GtkSheetCell

typedef struct {
} GtkSheetCell;

The GtkSheetCell struct contains only private data. It should only be accessed through the functions described below.


GtkSheetRange

typedef struct {
    gint row0,col0; /* upper-left cell */
    gint rowi,coli; /* lower-right cell */
} GtkSheetRange;

Defines a rectangular range of cells.

gint row0;

upper left cell

gint col0;

upper left cell

gint rowi;

lower right cell

gint coli;

lower right cell

GtkSheetButton

typedef struct {
} GtkSheetButton;

The GtkSheetButton struct contains only private data. It should only be accessed through the functions described below.


GtkSheetCellAttr

typedef struct {
} GtkSheetCellAttr;

The GtkSheetCellAttr struct contains only private data. It should only be accessed through the functions described below.


GtkSheetCellBorder

typedef struct {
} GtkSheetCellBorder;

The GtkSheetCellBorder struct contains only private data. It should only be accessed through the functions described below.


enum GtkSheetAttrType

typedef enum
{
    GTK_SHEET_FOREGROUND,
    GTK_SHEET_BACKGROUND,
    GTK_SHEET_FONT,
    GTK_SHEET_JUSTIFICATION,
    GTK_SHEET_BORDER,
    GTK_SHEET_BORDER_COLOR,
    GTK_SHEET_IS_EDITABLE,
    GTK_SHEET_IS_VISIBLE
}
GtkSheetAttrType;


enum GtkSheetState

typedef enum
{
    GTK_SHEET_NORMAL,
    GTK_SHEET_ROW_SELECTED,
    GTK_SHEET_COLUMN_SELECTED,
    GTK_SHEET_RANGE_SELECTED
} GtkSheetState;

Selection state of the GtkSheet

GTK_SHEET_NORMAL

nothing selected

GTK_SHEET_ROW_SELECTED

one row selected

GTK_SHEET_COLUMN_SELECTED

one column selected

GTK_SHEET_RANGE_SELECTED

rectangular area of cells selected

enum GtkSheetEntryType

typedef enum
{
    GTK_SHEET_ENTRY_TYPE_DEFAULT,
    GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY,
    GTK_SHEET_ENTRY_TYPE_GTK_ENTRY,
    GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW,
    GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW,
    GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON,
    GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX,
    GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY,
    GTK_SHEET_ENTRY_TYPE_GTK_COMBO,
} GtkSheetEntryType;

Subset of GtkEditable Widgets to allow selecting a widget from glade-3

GTK_SHEET_ENTRY_TYPE_DEFAULT

default, applicat. controlled

GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY

GtkItemEntry

GTK_SHEET_ENTRY_TYPE_GTK_ENTRY

GtkEntry

GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW

GtkTextView

GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW

GtkDataTextView

GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON

GtkSpinButton

GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX

GtkComboBox

GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY

GtkComboBoxEntry

GTK_SHEET_ENTRY_TYPE_GTK_COMBO

GtkCombo, Deprecated

enum GtkSheetVerticalJustification

typedef enum
{
    GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT,
    GTK_SHEET_VERTICAL_JUSTIFICATION_TOP,
    GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE,
    GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM,
} GtkSheetVerticalJustification;

Vertical text alignment.

GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT

default

GTK_SHEET_VERTICAL_JUSTIFICATION_TOP

top aligned

GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE

middle aligned

GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM

bottom aligned

gtk_sheet_new ()

GtkWidget *         gtk_sheet_new                       (guint rows,
                                                         guint columns,
                                                         const gchar *title);

Creates a new sheet widget with the given number of rows and columns.

rows :

initial number of rows

columns :

initial number of columns

title :

sheet title

Returns :

the new sheet GtkSheet

gtk_sheet_construct ()

void                gtk_sheet_construct                 (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);

Initializes an existent GtkSheet with the given number of rows and columns.

sheet :

a GtkSheet

rows :

number of rows

columns :

number of columns

title :

sheet title

gtk_sheet_new_browser ()

GtkWidget *         gtk_sheet_new_browser               (guint rows,
                                                         guint columns,
                                                         const gchar *title);

Creates a new browser sheet. Its cells cannot be edited(read-only).

rows :

initial number of rows

columns :

initial number of columns

title :

sheet title

Returns :

the new read-only GtkSheet

gtk_sheet_construct_browser ()

void                gtk_sheet_construct_browser         (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title);

Initializes an existent read-only GtkSheet with the given number of rows and columns.

sheet :

a GtkSheet

rows :

number of rows

columns :

number of columns

title :

sheet title

gtk_sheet_new_with_custom_entry ()

GtkWidget *         gtk_sheet_new_with_custom_entry     (guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);

Creates a new sheet widget with the given number of rows and columns and a custome entry type.

rows :

initial number of rows

columns :

initial number of columns

title :

sheet title

entry_type :

a GType

Returns :

the new sheet GtkSheet

gtk_sheet_construct_with_custom_entry ()

void                gtk_sheet_construct_with_custom_entry
                                                        (GtkSheet *sheet,
                                                         guint rows,
                                                         guint columns,
                                                         const gchar *title,
                                                         GType entry_type);

Initializes an existent read-only GtkSheet with the given number of rows and columns and a custom entry.

sheet :

a GtkSheet

rows :

number of rows

columns :

number of columns

title :

sheet title

entry_type :

a GType

gtk_sheet_change_entry ()

void                gtk_sheet_change_entry              (GtkSheet *sheet,
                                                         const GType entry_type);

Changes the current entry of the cell in GtkSheet. The old sheet entry widget gets dropped and a new entry widget is created. Beware: You will have to reconnect all your signal handlers after changing an entry.

sheet :

a GtkSheet

entry_type :

a GType

gtk_sheet_get_entry_type ()

GType               gtk_sheet_get_entry_type            (GtkSheet *sheet);

Get sheets entry type, if known

sheet :

a GtkSheet

Returns :

a GtkSheetEntryType or GTK_SHEET_ENTRY_TYPE_DEFAULT

gtk_sheet_get_entry ()

GtkWidget *         gtk_sheet_get_entry                 (GtkSheet *sheet);

Get sheet's entry widget. If the entry widget is a container, the direct childs of the container are searched for a valid entry widget. If you want the container itself to be returned, you should use #gtk_sheet_get_entry_widget() instead.

sheet :

a GtkSheet

Returns :

(transfer none) a GtkWidget or NULL

gtk_sheet_get_entry_widget ()

GtkWidget *         gtk_sheet_get_entry_widget          (GtkSheet *sheet);

Get sheet's entry widget. If the entry widget is a container, the container widget is returned. In order to get the entry in the container child, you might want to use #gtk_sheet_get_entry() instead.

sheet :

a GtkSheet

Returns :

(transfer none) a GtkWidget or NULL

gtk_sheet_get_entry_text ()

gchar *             gtk_sheet_get_entry_text            (GtkSheet *sheet);

Get the text out of the sheet_entry. This function is mainly used to synchronize the text of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

Returns :

a copy of the sheet_entry text or NULL. This function returns an allocated string, so g_free() it after usage!

gtk_sheet_set_entry_text ()

void                gtk_sheet_set_entry_text            (GtkSheet *sheet,
                                                         const gchar *text);

Set the text in the sheet_entry (and active cell). This function is mainly used to synchronize the text of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

text :

the text to be set or NULL

gtk_sheet_set_entry_editable ()

void                gtk_sheet_set_entry_editable        (GtkSheet *sheet,
                                                         const gboolean editable);

Set the editable flag in the sheet_entry This function is mainly used to synchronize the editable flag of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

editable :

editable flag

gtk_sheet_entry_signal_connect_changed ()

gulong              gtk_sheet_entry_signal_connect_changed
                                                        (GtkSheet *sheet,
                                                         GCallback handler);

Connect a handler to the sheet_entry "changed" signal. The user_data argument of the handler will be filled with the GtkSheet. This function is mainly used to synchronize a second entry widget with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

handler :

(scope notified) the signal handler

Returns :

the handler id

gtk_sheet_entry_signal_disconnect_by_func ()

void                gtk_sheet_entry_signal_disconnect_by_func
                                                        (GtkSheet *sheet,
                                                         GCallback handler);

Disconnect a handler from the sheet_entry "changed" signal This function is mainly used to synchronize a second entry widget with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

handler :

(scope call) the signal handler

gtk_sheet_entry_select_region ()

void                gtk_sheet_entry_select_region       (GtkSheet *sheet,
                                                         gint start_pos,
                                                         gint end_pos);

Selects a region of text. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet.

sheet :

a GtkSheet

start_pos :

start of region

end_pos :

end of region

gtk_sheet_get_state ()

GtkSheetState       gtk_sheet_get_state                 (GtkSheet *sheet);

Get the selection state of the sheet (GtkSheetState).

sheet :

a GtkSheet

Returns :

GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED

gtk_sheet_get_attributes ()

gboolean            gtk_sheet_get_attributes            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkSheetCellAttr *attributes);

Gett cell attributes of the given cell.

sheet :

a GtkSheet.

row :

row number

col :

column number

attributes :

GtkSheetCellAttr of the given range

Returns :

TRUE means that the cell is currently allocated.

gtk_sheet_get_rows_count ()

guint               gtk_sheet_get_rows_count            (GtkSheet *sheet);

Get the number of the rows of the GtkSheet.

sheet :

a GtkSheet

Returns :

number of rows.

gtk_sheet_get_visible_range ()

void                gtk_sheet_get_visible_range         (GtkSheet *sheet,
                                                         GtkSheetRange *range);

Get sheet's ranges in a GkSheetRange structure.

sheet :

a GtkSheet.

range :

a selected GtkSheetRange struct _GtkSheetRange { gint row0,col0; // upper-left cell gint rowi,coli; // lower-right cell };

gtk_sheet_set_selection_mode ()

void                gtk_sheet_set_selection_mode        (GtkSheet *sheet,
                                                         GtkSelectionMode mode);

Sets the selection mode of the cells in a GtkSheet.

sheet :

a GtkSheet

mode :

GTK_SELECTION_SINGLE or GTK_SELECTION_BROWSE

gtk_sheet_autoresize ()

gboolean            gtk_sheet_autoresize                (GtkSheet *sheet);

Gets the autoresize mode of GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE if autoresize_columns or autoresize_rows was set, or FALSE if none

gtk_sheet_autoresize_columns ()

gboolean            gtk_sheet_autoresize_columns        (GtkSheet *sheet);

Gets the autoresize mode for GtkSheet columns.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_autoresize_columns ()

void                gtk_sheet_set_autoresize_columns    (GtkSheet *sheet,
                                                         gboolean autoresize);

Controls wether columns will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*().

sheet :

a GtkSheet

autoresize :

TRUE or FALSE

gtk_sheet_autoresize_rows ()

gboolean            gtk_sheet_autoresize_rows           (GtkSheet *sheet);

Gets the autoresize mode for GtkSheet rows.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_autoresize_rows ()

void                gtk_sheet_set_autoresize_rows       (GtkSheet *sheet,
                                                         gboolean autoresize);

Controls wether rows will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*().

sheet :

a GtkSheet

autoresize :

TRUE or FALSE

gtk_sheet_set_autoresize ()

void                gtk_sheet_set_autoresize            (GtkSheet *sheet,
                                                         gboolean autoresize);

Controls wether cells will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*(). This function sets both: autoresize_columns and autoresize_cells.

sheet :

a GtkSheet

autoresize :

TRUE or FALSE

gtk_sheet_autoscroll ()

gboolean            gtk_sheet_autoscroll                (GtkSheet *sheet);

Get the autoscroll mode of GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_autoscroll ()

void                gtk_sheet_set_autoscroll            (GtkSheet *sheet,
                                                         gboolean autoscroll);

The sheet will be automatically scrolled when you move beyond the last row/col in GtkSheet.

sheet :

a GtkSheet

autoscroll :

TRUE or FALSE

gtk_sheet_clip_text ()

gboolean            gtk_sheet_clip_text                 (GtkSheet *sheet);

Get clip text mode in GtkSheet. When clip text mode is turned off, cell text is written over neighbour columns, as long as their contents are empty.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_clip_text ()

void                gtk_sheet_set_clip_text             (GtkSheet *sheet,
                                                         gboolean clip_text);

Clip text in cell. When clip text mode is turned off, cell text is written over neighbour columns, as long as their contents are empty.

sheet :

a GtkSheet

clip_text :

TRUE or FALSE

gtk_sheet_justify_entry ()

gboolean            gtk_sheet_justify_entry             (GtkSheet *sheet);

Get the cell entry editor justification setting from GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_justify_entry ()

void                gtk_sheet_set_justify_entry         (GtkSheet *sheet,
                                                         gboolean justify);

Justify cell entry editor in GtkSheet.

sheet :

a GtkSheet

justify :

TRUE or FALSE

gtk_sheet_get_vjustification ()

GtkSheetVerticalJustification  gtk_sheet_get_vjustification
                                                        (GtkSheet *sheet);

Get the default vertical cell text justification from GtkSheet.

sheet :

a GtkSheet

Returns :

the default GtkSheetVerticalJustification

gtk_sheet_set_vjustification ()

void                gtk_sheet_set_vjustification        (GtkSheet *sheet,
                                                         GtkSheetVerticalJustification vjust);

Set the default vertical cell text justification for GtkSheet.

sheet :

a GtkSheet

vjust :

a GtkSheetVerticalJustification

gtk_sheet_locked ()

gboolean            gtk_sheet_locked                    (GtkSheet *sheet);

Get the lock status of GtkSheet, locked means the sheet is not editable, cell contents cannot be modified by the user.

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_set_locked ()

void                gtk_sheet_set_locked                (GtkSheet *sheet,
                                                         gboolean locked);

Lock the GtkSheet, which means it is no longer editable, cell contents cannot be modified by the user.

sheet :

a GtkSheet

locked :

TRUE or FALSE

gtk_sheet_set_title ()

void                gtk_sheet_set_title                 (GtkSheet *sheet,
                                                         const gchar *title);

Set GtkSheet title. The widget will keep a copy of the string.

sheet :

a GtkSheet

title :

GtkSheet title

gtk_sheet_get_description ()

const gchar *       gtk_sheet_get_description           (GtkSheet *sheet,
                                                         const gchar *description);

Get sheet description.

sheet :

a GtkSheet

description :

GtkSheet description

Returns :

sheet description or NULL, do not modify or free it

gtk_sheet_set_description ()

void                gtk_sheet_set_description           (GtkSheet *sheet,
                                                         const gchar *description);

Set GtkSheet description for application use.

sheet :

a GtkSheet

description :

GtkSheet description

gtk_sheet_is_frozen ()

gboolean            gtk_sheet_is_frozen                 (GtkSheet *sheet);

Get freeze status.

sheet :

the GtkSheet

Returns :

TRUE or FALSE wether the sheet is frozen

gtk_sheet_freeze ()

void                gtk_sheet_freeze                    (GtkSheet *sheet);

Freeze all visual updates of the GtkSheet. The updates will occure in a more efficient way than if you made them on a unfrozen GtkSheet .

sheet :

a GtkSheet

gtk_sheet_thaw ()

void                gtk_sheet_thaw                      (GtkSheet *sheet);

Thaw the sheet after you have made a number of changes on a frozen sheet. The updates will occure in a more efficient way than if you made them on a unfrozen sheet .

sheet :

a GtkSheet

gtk_sheet_moveto ()

void                gtk_sheet_moveto                    (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         gint row_align,
                                                         gint col_align);

Scroll the viewing area of the sheet to the given column and row; row_align and col_align are between 0-1 representing the location the row should appear on the screnn, 0 being top or left, 1 being bottom or right.

passing row_align/col_align of -1 will suppress movement in that direction. if row or column is negative then there is no change

sheet :

a GtkSheet.

row :

row number

column :

column number

row_align :

row alignment

col_align :

column alignment

gtk_sheet_set_background ()

void                gtk_sheet_set_background            (GtkSheet *sheet,
                                                         GdkColor *color);

Sets the background color of the GtkSheet. If pass NULL, the sheet will be reset to the default color.

sheet :

a GtkSheet

color :

a GdkColor structure

gtk_sheet_set_grid ()

void                gtk_sheet_set_grid                  (GtkSheet *sheet,
                                                         GdkColor *color);

Set the grid color. If pass NULL, the grid will be reset to the default color.

sheet :

a GtkSheet

color :

a GdkColor structure

gtk_sheet_grid_visible ()

gboolean            gtk_sheet_grid_visible              (GtkSheet *sheet);

Gets the visibility of grid in GtkSheet.

sheet :

a GtkSheet

Returns :

TRUE(grid visible) or FALSE(grid invisible)

gtk_sheet_show_grid ()

void                gtk_sheet_show_grid                 (GtkSheet *sheet,
                                                         gboolean show);

Sets the visibility of grid in GtkSheet.

sheet :

a GtkSheet

show :

TRUE(grid visible) or FALSE(grid invisible)

gtk_sheet_get_hadjustment ()

GtkAdjustment *     gtk_sheet_get_hadjustment           (GtkSheet *sheet);

Get horizontal scroll adjustments.

sheet :

a GtkSheet.

Returns :

(transfer none) a GtkAdjustment

gtk_sheet_set_hadjustment ()

void                gtk_sheet_set_hadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);

Change horizontal scroll adjustments.

sheet :

a GtkSheet.

adjustment :

a GtkAdjustment

gtk_sheet_get_vadjustment ()

GtkAdjustment *     gtk_sheet_get_vadjustment           (GtkSheet *sheet);

Get vertical scroll adjustments.

sheet :

a GtkSheet.

Returns :

(transfer none) a GtkAdjustment

gtk_sheet_set_vadjustment ()

void                gtk_sheet_set_vadjustment           (GtkSheet *sheet,
                                                         GtkAdjustment *adjustment);

Change vertical scroll adjustments.

sheet :

a GtkSheet.

adjustment :

a GtkAdjustment

gtk_sheet_in_clip ()

gboolean            gtk_sheet_in_clip                   (GtkSheet *sheet);

Get the clip status of GtkSheet.

sheet :

a GtkSheet.

Returns :

TRUE or FALSE

gtk_sheet_clip_range ()

void                gtk_sheet_clip_range                (GtkSheet *sheet,
                                                         const GtkSheetRange *clip_range);

Save selected range to "clipboard".

sheet :

a GtkSheet.

clip_range :

GtkSheetRange to be saved

gtk_sheet_unclip_range ()

void                gtk_sheet_unclip_range              (GtkSheet *sheet);

Free clipboard.

sheet :

a GtkSheet.

gtk_sheet_get_active_cell ()

void                gtk_sheet_get_active_cell           (GtkSheet *sheet,
                                                         gint *row,
                                                         gint *column);

Store the coordinates of the active cell in row,col. If (row<0 || col<0) then there was no active cell in the sheet.

sheet :

a GtkSheet

row :

row number

column :

column number

gtk_sheet_set_active_cell ()

gboolean            gtk_sheet_set_active_cell           (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);

Set active cell where the cell entry will be displayed. Use (row,col) = (-1,-1) to deactivate active cell.

sheet :

a GtkSheet

row :

row number

column :

column number

Returns :

FALSE if current cell can't be deactivated or requested cell can't be activated

gtk_sheet_set_tab_direction ()

void                gtk_sheet_set_tab_direction         (GtkSheet *sheet,
                                                         GtkDirectionType dir);

Sets a primary movement direction to the Tab, Return and Enter keys, and assigns the opposite direction to the same keys with GDK_SHIFT_MASK. Transposed movement direction can be accessed with GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK and GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK|GDK_SHIFT_MASK. All bindings are defined for the GtkSheetClass, so all sheet instances use the same movement directions. Default: GTK_DIR_TAB_FORWARD.

sheet :

a GtkSheet

dir :

the primary tab direction

Since 3.0.2


gtk_sheet_get_selection ()

gboolean            gtk_sheet_get_selection             (GtkSheet *sheet,
                                                         GtkSheetState *state,
                                                         GtkSheetRange *range);

Inquire current cell selection state and range.

sheet :

a GtkSheet

state :

where to store the GtkSheetState, may be NULL

range :

where to store the GtkSheetRange

Returns :

TRUE: there is a selection, FALSE: no selection or error

gtk_sheet_select_row ()

void                gtk_sheet_select_row                (GtkSheet *sheet,
                                                         gint row);

Select the row. The range is then highlighted, and the bounds are stored in sheet->range.

sheet :

a GtkSheet.

row :

row number

gtk_sheet_select_range ()

void                gtk_sheet_select_range              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);

Highlight the selected range and store bounds in sheet->range

sheet :

a GtkSheet

range :

a GtkSheetRange

gtk_sheet_unselect_range ()

void                gtk_sheet_unselect_range            (GtkSheet *sheet);

Unselect the current selected range and clears the bounds in sheet->range.

sheet :

a GtkSheet

gtk_sheet_get_tooltip_markup ()

gchar *             gtk_sheet_get_tooltip_markup        (GtkSheet *sheet);

Gets the contents of the tooltip (markup) for sheet

sheet :

a GtkSheet.

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_set_tooltip_markup ()

void                gtk_sheet_set_tooltip_markup        (GtkSheet *sheet,
                                                         const gchar *markup);

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

sheet :

a GtkSheet.

markup :

the contents of the tooltip for widget, or NULL.

gtk_sheet_get_tooltip_text ()

gchar *             gtk_sheet_get_tooltip_text          (GtkSheet *sheet);

Gets the contents of the tooltip for the GtkSheet

sheet :

a GtkSheet.

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_set_tooltip_text ()

void                gtk_sheet_set_tooltip_text          (GtkSheet *sheet,
                                                         const gchar *text);

Sets text as the contents of the tooltip.

sheet :

a GtkSheet.

text :

the contents of the tooltip for widget

gtk_sheet_add_row ()

void                gtk_sheet_add_row                   (GtkSheet *sheet,
                                                         guint nrows);

Append nrows rows to the end of the sheet.

sheet :

a GtkSheet.

nrows :

number of rows to be appended.

gtk_sheet_insert_rows ()

void                gtk_sheet_insert_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);

Insert nrows rows before the given row and pull right.

sheet :

a GtkSheet.

row :

row number.

nrows :

number of rows to be inserted.

gtk_sheet_delete_rows ()

void                gtk_sheet_delete_rows               (GtkSheet *sheet,
                                                         guint row,
                                                         guint nrows);

Delete nrows rows starting from row.

sheet :

a GtkSheet.

row :

row number.

nrows :

number of rows to be deleted.

gtk_sheet_row_titles_visible ()

gboolean            gtk_sheet_row_titles_visible        (GtkSheet *sheet);

Get the visibility of row column titles .

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_show_row_titles ()

void                gtk_sheet_show_row_titles           (GtkSheet *sheet);

Show row titles .

sheet :

a GtkSheet

gtk_sheet_hide_row_titles ()

void                gtk_sheet_hide_row_titles           (GtkSheet *sheet);

Hide row titles .

sheet :

a GtkSheet

gtk_sheet_get_row_title ()

const gchar *       gtk_sheet_get_row_title             (GtkSheet *sheet,
                                                         gint row);

Get row title.

sheet :

a GtkSheet

row :

row number

Returns :

a pointer to the row title or NULL. Do not modify or free it.

gtk_sheet_set_row_title ()

void                gtk_sheet_set_row_title             (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *title);

Set row title.

sheet :

a GtkSheet

row :

row number

title :

row title

gtk_sheet_set_row_titles_width ()

void                gtk_sheet_set_row_titles_width      (GtkSheet *sheet,
                                                         guint width);

Resize row titles area.

sheet :

a GtkSheet

width :

row titles width.

gtk_sheet_set_row_height ()

void                gtk_sheet_set_row_height            (GtkSheet *sheet,
                                                         gint row,
                                                         guint height);

Set row height.

sheet :

a GtkSheet.

row :

row number.

height :

row height(in pixels).

gtk_sheet_row_button_get_label ()

const gchar *       gtk_sheet_row_button_get_label      (GtkSheet *sheet,
                                                         gint row);

Get a row button label.

sheet :

a GtkSheet

row :

row number

Returns :

In case of succes , a pointer to label text.Otherwise NULL

gtk_sheet_row_button_add_label ()

void                gtk_sheet_row_button_add_label      (GtkSheet *sheet,
                                                         gint row,
                                                         const gchar *label);

Set button label.It is used to set a row title.

sheet :

a GtkSheet

row :

row number

label :

text label

gtk_sheet_row_button_justify ()

void                gtk_sheet_row_button_justify        (GtkSheet *sheet,
                                                         gint row,
                                                         GtkJustification justification);

Set the justification(alignment) of the row buttons.

sheet :

a GtkSheet.

row :

row number

justification :

a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER

gtk_sheet_row_sensitive ()

gboolean            gtk_sheet_row_sensitive             (GtkSheet *sheet,
                                                         gint row);

Get row button sensitivity.

sheet :

a GtkSheet.

row :

row number

Returns :

TRUE - is sensitive, FALSE - insensitive or not existant

gtk_sheet_row_set_sensitivity ()

void                gtk_sheet_row_set_sensitivity       (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean sensitive);

Set row button sensitivity. If sensitivity is TRUE can be toggled, otherwise it acts as a title .

sheet :

a GtkSheet.

row :

row number

sensitive :

TRUE or FALSE

gtk_sheet_rows_set_sensitivity ()

void                gtk_sheet_rows_set_sensitivity      (GtkSheet *sheet,
                                                         gboolean sensitive);

Set rows buttons sensitivity. If sensitivity is TRUE button can be toggled, otherwise act as titles. The sheet itself has no such property, it is a convenience function to set the property for all existing rows.

sheet :

a GtkSheet.

sensitive :

TRUE or FALSE

gtk_sheet_rows_resizable ()

gboolean            gtk_sheet_rows_resizable            (GtkSheet *sheet);

Get rows resizable status.

sheet :

a GtkSheet.

Returns :

TRUE or FALSE

gtk_sheet_rows_set_resizable ()

void                gtk_sheet_rows_set_resizable        (GtkSheet *sheet,
                                                         gboolean resizable);

Set rows resizable status.

sheet :

a GtkSheet.

resizable :

TRUE or FALSE

gtk_sheet_row_visible ()

gboolean            gtk_sheet_row_visible               (GtkSheet *sheet,
                                                         gint row);

Get row visibility.

sheet :

a GtkSheet.

row :

row number

Returns :

TRUE - is visible FALSE - invisible or not existant

gtk_sheet_row_set_visibility ()

void                gtk_sheet_row_set_visibility        (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);

Set row visibility. The default value is TRUE. If FALSE, the row is hidden.

sheet :

a GtkSheet.

row :

row number

visible :

TRUE or FALSE

gtk_sheet_row_label_set_visibility ()

void                gtk_sheet_row_label_set_visibility  (GtkSheet *sheet,
                                                         gint row,
                                                         gboolean visible);

Set row label visibility.

sheet :

a GtkSheet

row :

row number

visible :

TRUE or FALSE

gtk_sheet_rows_labels_set_visibility ()

void                gtk_sheet_rows_labels_set_visibility
                                                        (GtkSheet *sheet,
                                                         gboolean visible);

Set all rows label visibility. The sheet itself has no such property, this is a convenience function to set the property for all existing rows.

sheet :

a GtkSheet

visible :

TRUE or FALSE

gtk_sheet_row_get_tooltip_markup ()

gchar *             gtk_sheet_row_get_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row);

Gets the contents of the tooltip (markup) for the column

sheet :

a GtkSheet.

row :

row index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_row_set_tooltip_markup ()

void                gtk_sheet_row_set_tooltip_markup    (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *markup);

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

sheet :

a GtkSheet.

row :

row index

markup :

the contents of the tooltip for widget, or NULL.

gtk_sheet_row_get_tooltip_text ()

gchar *             gtk_sheet_row_get_tooltip_text      (GtkSheet *sheet,
                                                         const gint row);

Gets the contents of the tooltip for the column

sheet :

a GtkSheet.

row :

row index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_row_set_tooltip_text ()

void                gtk_sheet_row_set_tooltip_text      (GtkSheet *sheet,
                                                         const gint row,
                                                         const gchar *text);

Sets text as the contents of the tooltip.

sheet :

a GtkSheet.

row :

row index

text :

the contents of the tooltip for widget

gtk_sheet_set_cell ()

void                gtk_sheet_set_cell                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         GtkJustification justification,
                                                         const gchar *text);

Set cell contents and allocate memory if needed.

sheet :

a GtkSheet.

row :

row_number

col :

column number

justification :

a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER

text :

cell text

gtk_sheet_set_cell_text ()

void                gtk_sheet_set_cell_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         const gchar *text);

Set cell contents and allocate memory if needed. No justifcation is made. attributes and links remain unchanged.

sheet :

a GtkSheet.

row :

row_number

col :

column number

text :

cell text

gtk_sheet_cell_get_text ()

gchar *             gtk_sheet_cell_get_text             (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get cell text.

sheet :

a GtkSheet

row :

row number

col :

column number

Returns :

a pointer to the cell text, or NULL. Do not modify or free it.

gtk_sheet_cell_clear ()

void                gtk_sheet_cell_clear                (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);

Clear cell contents.

sheet :

a GtkSheet.

row :

row_number

column :

column number

gtk_sheet_cell_delete ()

void                gtk_sheet_cell_delete               (GtkSheet *sheet,
                                                         gint row,
                                                         gint column);

Clear cell contents and remove links.

sheet :

a GtkSheet.

row :

row_number

column :

column number

gtk_sheet_cell_get_state ()

GtkStateType        gtk_sheet_cell_get_state            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get status of a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

Returns :

a "" GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED

gtk_sheet_cell_get_tooltip_markup ()

gchar *             gtk_sheet_cell_get_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);

Gets the contents of the tooltip (markup) for the column

sheet :

a GtkSheet.

row :

row index

col :

column index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_cell_set_tooltip_markup ()

void                gtk_sheet_cell_set_tooltip_markup   (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *markup);

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

sheet :

a GtkSheet.

row :

row index

col :

column index

markup :

the contents of the tooltip for widget, or NULL.

gtk_sheet_cell_get_tooltip_text ()

gchar *             gtk_sheet_cell_get_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col);

Gets the contents of the tooltip for the column

sheet :

a GtkSheet.

row :

row index

col :

column index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_cell_set_tooltip_text ()

void                gtk_sheet_cell_set_tooltip_text     (GtkSheet *sheet,
                                                         const gint row,
                                                         const gint col,
                                                         const gchar *text);

Sets text as the contents of the tooltip.

sheet :

a GtkSheet.

row :

row index

col :

column index

text :

the contents of the tooltip for widget

gtk_sheet_get_cell_area ()

gboolean            gtk_sheet_get_cell_area             (GtkSheet *sheet,
                                                         gint row,
                                                         gint column,
                                                         GdkRectangle *area);

Get area of a given cell.

sheet :

a GtkSheet

row :

row number

column :

column number

area :

a GdkRectangle area of the cell

Returns :

TRUE(success) or FALSE(failure)

gtk_sheet_get_pixel_info ()

gboolean            gtk_sheet_get_pixel_info            (GtkSheet *sheet,
                                                         GdkWindow *window,
                                                         gint x,
                                                         gint y,
                                                         gint *row,
                                                         gint *column);

Get row and column correspondig to the given position within the sheet. In order to decode clicks into to title area correctly, pass the GdkWindow from the button event. Omitting the window (NULL) defaults to the sheet window. row and column may return values in the range [-1 .. max+1] depending on wether the position lies within the title area, the sheet cell area or beyond the outermost row/column. All 9 sheet areas can be reliably determined by evaluating the returned row/column values (title area/cell area/outside).

sheet :

a GtkSheet

window :

base window for coordinates (null)

x :

x coordinate

y :

y coordinate

row :

cell row number

column :

cell column number

Returns :

TRUE if the position lies within the sheet cell area or FALSE when outside (title area f.e.)

gtk_sheet_get_link ()

gpointer            gtk_sheet_get_link                  (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get link pointer from a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

Returns :

(transfer none) pointer linked to the cell

gtk_sheet_link_cell ()

void                gtk_sheet_link_cell                 (GtkSheet *sheet,
                                                         gint row,
                                                         gint col,
                                                         gpointer link);

Link pointer to a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

link :

pointer linked to the cell

gtk_sheet_remove_link ()

void                gtk_sheet_remove_link               (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Remove link pointer from a cell.

sheet :

a GtkSheet

row :

row number

col :

column number

gtk_sheet_range_clear ()

void                gtk_sheet_range_clear               (GtkSheet *sheet,
                                                         const GtkSheetRange *range);

Clear range contents. If range==NULL the whole sheet will be cleared.

sheet :

a GtkSheet.

range :

a GtkSheetRange

gtk_sheet_range_delete ()

void                gtk_sheet_range_delete              (GtkSheet *sheet,
                                                         const GtkSheetRange *range);

Clear range contents and remove links. FIXME:: if range==NULL whole sheet is deleted?

sheet :

a GtkSheet.

range :

a GtkSheetRange

gtk_sheet_range_set_background ()

void                gtk_sheet_range_set_background      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);

Set background color of the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

color :

a GdkColor.

gtk_sheet_range_set_foreground ()

void                gtk_sheet_range_set_foreground      (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);

Set foreground color of the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

color :

a GdkColor.

gtk_sheet_range_set_justification ()

void                gtk_sheet_range_set_justification   (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         GtkJustification just);

Set text justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER) of the given range. The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the default justification for numbers is GTK_JUSTIFY_RIGHT.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

just :

a GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER.

gtk_sheet_range_set_editable ()

void                gtk_sheet_range_set_editable        (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint editable);

Set if cell contents can be edited or not in the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange

editable :

TRUE or FALSE

gtk_sheet_range_set_visible ()

void                gtk_sheet_range_set_visible         (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gboolean visible);

Set if cell contents are visible or not in the given range: accepted values are TRUE or FALSE.

sheet :

a GtkSheet.

urange :

a GtkSheetRange.

visible :

TRUE or FALSE.

gtk_sheet_range_set_border ()

void                gtk_sheet_range_set_border          (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         gint mask,
                                                         guint width,
                                                         gint line_style);

Set cell border style in the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange where we set border style.

mask :

CELL_LEFT_BORDER, CELL_RIGHT_BORDER, CELL_TOP_BORDER,CELL_BOTTOM_BORDER

width :

width of the border line in pixels

line_style :

GdkLineStyle for the border line

gtk_sheet_range_set_border_color ()

void                gtk_sheet_range_set_border_color    (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         const GdkColor *color);

Set border color for the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange where we set border color.

color :

a GdkColor.

gtk_sheet_range_set_font ()

void                gtk_sheet_range_set_font            (GtkSheet *sheet,
                                                         const GtkSheetRange *urange,
                                                         PangoFontDescription *font_desc);

Set font_desc for the given range.

sheet :

a GtkSheet.

urange :

a GtkSheetRange where we set font_desc.

font_desc :

(transfer none) a PangoFontDescription.

gtk_sheet_put ()

GtkSheetChild *     gtk_sheet_put                       (GtkSheet *sheet,
                                                         GtkWidget *child,
                                                         gint x,
                                                         gint y);

Add widgets to the sheet. The widget is floating in one given position (x,y) regardless of the configurations of rows/columns. This means that cells do not resize depending on the widgets' size. You can resize it yourself or use gtk_sheet_attach_*() You may remove it with gtk_container_remove(GTK_CONTAINER(sheet), GtkWidget *child);

sheet :

a GtkSheet.

child :

GtkWidget to be put

x :

x coordinate where we put the widget

y :

y coordinate where we put the widget

Returns :

(transfer none) TRUE means that the cell is currently allocated.

gtk_sheet_attach ()

void                gtk_sheet_attach                    (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col,
                                                         gint xoptions,
                                                         gint yoptions,
                                                         gint xpadding,
                                                         gint ypadding);

Attaches a child widget to the given cell with the given alignments. Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the cell, expands with it, or shrinks with it, depending on the options , if GTK_EXPAND is set. The child is reallocated each time the column or row changes, keeping attached to the same cell.

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

xoptions :

if set GTK_EXPAND cell will expand/shrink on x direction

yoptions :

if set GTK_EXPAND cell will expand/shrink on y direction

xpadding :

x coordinate of the alignment

ypadding :

y coordinate of the alignment

gtk_sheet_attach_floating ()

void                gtk_sheet_attach_floating           (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

The widget is attached to the top-left corner of a cell (row,column) and moves with it when you change width, height, or you delete of add row/columns

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

gtk_sheet_attach_default ()

void                gtk_sheet_attach_default            (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

Attaches a child widget to the given cell with the 0,0 alignments. Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the cell, expands with it, or shrinks with it, depending on the options. The child is reallocated each time the column or row changes, keeping attached to the same cell. It's in fact gtk_sheet_attach() with GTK_EXPAND set.

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

gtk_sheet_move_child ()

void                gtk_sheet_move_child                (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint x,
                                                         gint y);

Move widgets added with gtk_sheet_put() in the sheet.

sheet :

a GtkSheet.

widget :

GtkWidget to be put.

x :

x coord at which we move the widget.

y :

y coord at which we move the widget.

gtk_sheet_get_child_at ()

const GtkSheetChild * gtk_sheet_get_child_at            (GtkSheet *sheet,
                                                         gint row,
                                                         gint col);

Get the child attached at row,col.

sheet :

a GtkSheet.

row :

row number

col :

column number

Returns :

the GtkSheetChild attached to row,col or NULL

gtk_sheet_button_attach ()

void                gtk_sheet_button_attach             (GtkSheet *sheet,
                                                         GtkWidget *widget,
                                                         gint row,
                                                         gint col);

Button attach works like cell attach but for the buttons.

sheet :

a GtkSheet.

widget :

GtkWidget to be put

row :

row number

col :

column number

Property Details

The "autoresize" property

  "autoresize"               gboolean              : Read / Write

Autoreisize cells while typing (rows and columns)

Default value: FALSE


The "autoresize-cols" property

  "autoresize-cols"          gboolean              : Read / Write

Autoreisize columns while typing

Default value: FALSE


The "autoresize-rows" property

  "autoresize-rows"          gboolean              : Read / Write

Autoreisize rows while typing

Default value: FALSE


The "autoscroll" property

  "autoscroll"               gboolean              : Read / Write

The sheet will be automatically scrolled when you move beyond the last visible row/column

Default value: TRUE


The "bgcolor" property

  "bgcolor"                  GdkColor*             : Read / Write

Background color of the sheet


The "clip-text" property

  "clip-text"                gboolean              : Read / Write

Clip text in cells

Default value: FALSE


The "col-titles-height" property

  "col-titles-height"        guint                 : Read / Write

Height of the column titles

Allowed values: <= 1024

Default value: 24


The "col-titles-visible" property

  "col-titles-visible"       gboolean              : Read / Write

Visibility of the column titles

Default value: TRUE


The "columns-resizable" property

  "columns-resizable"        gboolean              : Read / Write

Columns resizable

Default value: TRUE


The "description" property

  "description"              gchar*                : Read / Write

The sheets description, a place to store further information for application use

Default value: ""


The "entry-type" property

  "entry-type"               GtkSheetEntryType     : Read / Write

Sheet cell entry widget type

Default value: GTK_SHEET_ENTRY_TYPE_DEFAULT


The "grid-color" property

  "grid-color"               GdkColor*             : Read / Write

Color of the grid


The "grid-visible" property

  "grid-visible"             gboolean              : Read / Write

Sets the visibility of grid

Default value: TRUE


The "justify-entry" property

  "justify-entry"            gboolean              : Read / Write

Adapt cell entry editor to the cell justification.

Default value: TRUE


The "locked" property

  "locked"                   gboolean              : Read / Write

If the sheet ist locked, it is not editable, cell contents cannot be modified by the user.

Default value: FALSE


The "n-rows" property

  "n-rows"                   gint                  : Read / Write

Number of rows in the sheet

Allowed values: [0,1000000]

Default value: 0


The "row-titles-visible" property

  "row-titles-visible"       gboolean              : Read / Write

Row titles visible

Default value: TRUE


The "row-titles-width" property

  "row-titles-width"         guint                 : Read / Write

Width of the row title area

Allowed values: <= 2048

Default value: 80


The "rows-resizable" property

  "rows-resizable"           gboolean              : Read / Write

Rows resizable

Default value: TRUE


The "selection-mode" property

  "selection-mode"           GtkSelectionMode      : Read / Write

Sets the selection mode of the cells in a GtkSheet

Default value: GTK_SELECTION_BROWSE


The "title" property

  "title"                    gchar*                : Read / Write

The sheets title string

Default value: "GtkSheet"


The "vjust" property

  "vjust"                    GtkSheetVerticalJustification  : Read / Write

Default vertical cell text justification

Default value: GTK_SHEET_VERTICAL_JUSTIFICATION_TOP

Signal Details

The "activate" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emmited whenever a cell is activated(you click on it). FIXME:: The return value is ignored (not yet implemented).

sheet :

the sheet widget that emitted the signal

row :

row number of activated cell.

column :

column number of activated cell.

user_data :

user data set when the signal handler was connected.

The "changed" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

"Emited when typing into the active cell, changing its content. It is emitted after each key press in cell and after deactivating cell.

sheet :

the sheet widget that emitted the signal

row :

row number of changed cell.

column :

column number of changed cell.

user_data :

user data set when the signal handler was connected.

The "clear-cell" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emited when when the content of the cell is erased.

sheet :

the sheet widget that emitted the signal

row :

row number of cleared cell.

column :

column number of cleared cell.

user_data :

user data set when the signal handler was connected.

The "clip-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *clip_range,
                                                        gpointer       user_data)       : Run Last

Emmited when a GtkSheetRange is clipping.

sheet :

the sheet widget that emitted the signal

clip_range :

the newly selected GtkSheetRange

user_data :

user data set when the signal handler was connected.

The "deactivate" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emmited whenever a cell is deactivated(you click on other cell or start a new selection). The signal handler must return TRUE in order to allow deactivation, FALSE to deny deactivation.

sheet :

the sheet widget that emitted the signal

row :

row number of deactivated cell.

column :

column number of deactivated cell.

user_data :

user data set when the signal handler was connected.

The "enter-pressed" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        GdkEvent *event,
                                                        gpointer  user_data)      : Run Last

This signal intercepts RETURN and ENTER key-press-events before they are processed by the sheet-entry editor. Any modifier combinations on these keys may trigger the signal. The default behaviour of the sheet-entry editor is to move the active cell, which might not be appropriate for the type of application.

sheet :

the sheet widget that emitted the signal

event :

the GdkEventKey which triggered this signal.. type Gdk.EventKey.

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to block the sheet-entry from processing the event. FALSE to propagate the event to the sheet-entry.

The "entry-focus-in" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        GdkEvent *event,
                                                        gpointer  user_data)      : Run Last

The ::entry-focus-in signal will be emitted when the keyboard focus enters the sheet_entry editor.

sheet :

the sheet widget that emitted the signal

event :

the GdkEventFocus which triggered this signal

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Since 3.0.1


The "entry-focus-out" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        GdkEvent *event,
                                                        gpointer  user_data)      : Run Last

The ::entry-focus-out signal will be emitted when the keyboard focus leaves the sheet_entry editor.

sheet :

the sheet widget that emitted the signal

event :

the GdkEventFocus which triggered this signal

user_data :

user data set when the signal handler was connected.

Returns :

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

Since 3.0.1


The "move-cursor" signal

void                user_function                      (GtkSheet       *sheet,
                                                        GtkMovementStep step,
                                                        gint            count,
                                                        gboolean        extend_selection,
                                                        gpointer        user_data)             : Run Last / Action

The ::move-cursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement. Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.

sheet :

the sheet widget that emitted the signal

step :

the granularity of the move, as a GtkMovementStep

count :

the number of step units to move

extend_selection :

TRUE if the move should extend the selection

user_data :

user data set when the signal handler was connected.

Since 3.0.2


The "move-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *old_range,
                                                        GtkSheetRange *new_range,
                                                        gpointer       user_data)      : Run Last

Emmited when a GtkSheetRange is moved.

sheet :

the sheet widget that emitted the signal.

old_range :

the previous selected GtkSheetRange.

new_range :

the newly selected GtkSheetRange.

user_data :

user data set when the signal handler was connected.

The "new-column-width" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      col,
                                                        gint      width,
                                                        gpointer  user_data)      : Run Last

Emited when the width of a column is modified.

sheet :

the sheet widget that emitted the signal

col :

modified column number.

width :

new column width

user_data :

user data set when the signal handler was connected.

The "new-row-height" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      height,
                                                        gpointer  user_data)      : Run Last

Emited when the height of a row is modified.

sheet :

the sheet widget that emitted the signal

row :

modified row number.

height :

new row height.

user_data :

user data set when the signal handler was connected.

The "populate-popup" signal

void                user_function                      (GtkSheet *sheet,
                                                        GtkMenu  *menu,
                                                        gpointer  user_data)      : Run Last

The ::populate-popup signal will be emitted when the user activates the popup menu of the sheet_entry editor. The emission of this signal is only supported for GtkEntry, GtkDataEntry, GtkItemEntry and GtkTextView.

sheet :

the sheet widget that emitted the signal

menu :

the menu that ist being populated

user_data :

user data set when the signal handler was connected.

Since 3.0.1


The "resize-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *old_range,
                                                        GtkSheetRange *new_range,
                                                        gpointer       user_data)      : Run Last

Emmited when a GtkSheetRange is resized.

sheet :

the sheet widget that emitted the signal

old_range :

the previous selected GtkSheetRange.

new_range :

the newly selected GtkSheetRange.

user_data :

user data set when the signal handler was connected.

The "select-column" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      select_column,
                                                        gpointer  user_data)          : Run Last

Emmited when a column has been selected.

sheet :

the sheet widget that emitted the signal

select_column :

the newly selected column index

user_data :

user data set when the signal handler was connected.

The "select-range" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkSheetRange *select_range,
                                                        gpointer       user_data)         : Run Last

Emmited when a GtkSheetRange has been selected.

sheet :

the sheet widget that emitted the signal

select_range :

the newly selected GtkSheetRange

user_data :

user data set when the signal handler was connected.

The "select-row" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gpointer  user_data)      : Run Last

Emmited when a row has been selected.

sheet :

the sheet widget that emitted the signal

row :

the newly selected row index

user_data :

user data set when the signal handler was connected.

The "set-cell" signal

void                user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  user_data)      : Run Last

Emited when clicking on a non-empty cell.

sheet :

the sheet widget that emitted the signal

row :

row number of activated cell.

column :

column number of activated cell.

user_data :

user data set when the signal handler was connected.

The "set-scroll-adjustments" signal

void                user_function                      (GtkSheet      *sheet,
                                                        GtkAdjustment *hadjustment,
                                                        GtkAdjustment *vadjustment,
                                                        gpointer       user_data)        : Run Last

Emited when scroll adjustments are set.

sheet :

the sheet widget that emitted the signal

hadjustment :

horizontal GtkAdjustment.

vadjustment :

vertical GtkAdkjustment.

user_data :

user data set when the signal handler was connected.

The "traverse" signal

gboolean            user_function                      (GtkSheet *sheet,
                                                        gint      row,
                                                        gint      column,
                                                        gpointer  *new_row,
                                                        gpointer  *new_column,
                                                        gpointer  user_data)        : Run Last

The "traverse" is emited before "deactivate" and allows to veto the movement. In such case, the entry will remain in the site and the other signals will not be emited. The signal handler must return TRUE to allow the movement, FALSE to veto the movement.

sheet :

the sheet widget that emitted the signal.

row :

row number of old cell

column :

column number of old cell

*new_row :

row number of target cell, changeable

*new_column :

column number of target cell, changeable

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/GtkPlotCanvasEllipse.html0000644000076400001440000003125312604172532021052 00000000000000 GtkPlotCanvasEllipse

GtkPlotCanvasEllipse

GtkPlotCanvasEllipse

Synopsis


#include <gtkextra.h>

                    GtkPlotCanvasEllipse;
GtkPlotCanvasChild * gtk_plot_canvas_ellipse_new        (GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean fill);
void                gtk_plot_canvas_ellipse_set_attributes
                                                        (GtkPlotCanvasEllipse *ellipse,
                                                         GtkPlotLineStyle style,
                                                         gdouble width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean fill);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotCanvasChild
                     +----GtkPlotCanvasEllipse

Properties

  "color-bg"                 gpointer              : Read / Write
  "filled"                   gboolean              : Read / Write
  "line"                     gpointer              : Read / Write

Description

FIXME:: need long description

Details

GtkPlotCanvasEllipse

typedef struct _GtkPlotCanvasEllipse GtkPlotCanvasEllipse;

The GtkPlotCanvasEllipse struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_canvas_ellipse_new ()

GtkPlotCanvasChild * gtk_plot_canvas_ellipse_new        (GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean fill);

style :

width :

fg :

bg :

fill :

Returns :


gtk_plot_canvas_ellipse_set_attributes ()

void                gtk_plot_canvas_ellipse_set_attributes
                                                        (GtkPlotCanvasEllipse *ellipse,
                                                         GtkPlotLineStyle style,
                                                         gdouble width,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean fill);

ellipse :

a GtkPlotCanvasEllipse widget.

style :

width :

fg :

bg :

fill :

Property Details

The "color-bg" property

  "color-bg"                 gpointer              : Read / Write

Filling Color.


The "filled" property

  "filled"                   gboolean              : Read / Write

Default value: FALSE


The "line" property

  "line"                     gpointer              : Read / Write

gtkextra-3.2.0/docs/reference/html/GtkPlotSurface.html0000644000076400001440000022160512604172532017713 00000000000000 GtkPlotSurface

GtkPlotSurface

GtkPlotSurface

Synopsis


#include <gtkextra.h>

                    GtkPlotSurface;
                    GtkPlotPolygon;
GtkWidget*          gtk_plot_surface_new                (void);
GtkWidget*          gtk_plot_surface_new_function       (GtkPlotFunc3D function);
void                gtk_plot_surface_construct_function (GtkPlotSurface *surface,
                                                         GtkPlotFunc3D function);
void                gtk_plot_surface_set_color          (GtkPlotSurface *data,
                                                         GdkColor *color);
void                gtk_plot_surface_set_shadow         (GtkPlotSurface *data,
                                                         GdkColor *color);
void                gtk_plot_surface_set_grid_foreground
                                                        (GtkPlotSurface *data,
                                                         GdkColor *foreground);
void                gtk_plot_surface_set_grid_background
                                                        (GtkPlotSurface *data,
                                                         GdkColor *background);
void                gtk_plot_surface_set_grid_visible   (GtkPlotSurface *data,
                                                         gboolean visible);
gboolean            gtk_plot_surface_get_grid_visible   (GtkPlotSurface *data);
void                gtk_plot_surface_set_mesh_visible   (GtkPlotSurface *data,
                                                         gboolean visible);
gboolean            gtk_plot_surface_get_mesh_visible   (GtkPlotSurface *data);
void                gtk_plot_surface_set_light          (GtkPlotSurface *data,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble z);
void                gtk_plot_surface_set_ambient        (GtkPlotSurface *data,
                                                         gdouble ambient);
void                gtk_plot_surface_use_height_gradient
                                                        (GtkPlotSurface *data,
                                                         gboolean use_gradient);
void                gtk_plot_surface_use_amplitud       (GtkPlotSurface *data,
                                                         gboolean use_amplitud);
void                gtk_plot_surface_set_transparent    (GtkPlotSurface *data,
                                                         gboolean transparent);
void                gtk_plot_surface_set_points         (GtkPlotSurface *data,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *z,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gdouble *dz,
                                                         gint nx,
                                                         gint ny);
void                gtk_plot_surface_get_points         (GtkPlotSurface *data,
                                                         gdouble **x,
                                                         gdouble **y,
                                                         gdouble **z,
                                                         gdouble **dx,
                                                         gdouble **dy,
                                                         gdouble **dz,
                                                         gint *nx,
                                                         gint *ny);
GtkPlotArray *      gtk_plot_surface_set_x              (GtkPlotSurface *data,
                                                         gdouble *x);
GtkPlotArray *      gtk_plot_surface_set_y              (GtkPlotSurface *data,
                                                         gdouble *y);
GtkPlotArray *      gtk_plot_surface_set_z              (GtkPlotSurface *data,
                                                         gdouble *z);
GtkPlotArray *      gtk_plot_surface_set_dx             (GtkPlotSurface *data,
                                                         gdouble *dx);
GtkPlotArray *      gtk_plot_surface_set_dy             (GtkPlotSurface *data,
                                                         gdouble *dy);
GtkPlotArray *      gtk_plot_surface_set_dz             (GtkPlotSurface *data,
                                                         gdouble *dz);
gdouble *           gtk_plot_surface_get_x              (GtkPlotSurface *dataset,
                                                         gint *nx);
gdouble *           gtk_plot_surface_get_y              (GtkPlotSurface *dataset,
                                                         gint *ny);
gdouble *           gtk_plot_surface_get_z              (GtkPlotSurface *dataset,
                                                         gint *nx,
                                                         gint *ny);
gdouble *           gtk_plot_surface_get_dx             (GtkPlotSurface *dataset);
gdouble *           gtk_plot_surface_get_dy             (GtkPlotSurface *dataset);
gdouble *           gtk_plot_surface_get_dz             (GtkPlotSurface *dataset);
void                gtk_plot_surface_set_nx             (GtkPlotSurface *dataset,
                                                         gint nx);
void                gtk_plot_surface_set_ny             (GtkPlotSurface *dataset,
                                                         gint ny);
gint                gtk_plot_surface_get_nx             (GtkPlotSurface *dataset);
gint                gtk_plot_surface_get_ny             (GtkPlotSurface *dataset);
void                gtk_plot_surface_set_xstep          (GtkPlotSurface *dataset,
                                                         gdouble xstep);
void                gtk_plot_surface_set_ystep          (GtkPlotSurface *dataset,
                                                         gdouble ystep);
gdouble             gtk_plot_surface_get_xstep          (GtkPlotSurface *dataset);
gdouble             gtk_plot_surface_get_ystep          (GtkPlotSurface *dataset);
void                gtk_plot_surface_build_mesh         (GtkPlotSurface *surface);
void                gtk_plot_surface_recalc_nodes       (GtkPlotSurface *surface);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotSurface
                                 +----GtkPlotCSurface

Implemented Interfaces

GtkPlotSurface implements AtkImplementorIface and GtkBuildable.

Properties

  "ambient"                  gdouble               : Read / Write
  "mesh-color"               gpointer              : Read / Write
  "mesh-style"               gint                  : Read / Write
  "mesh-width"               gdouble               : Read / Write
  "nx"                       gint                  : Read / Write
  "ny"                       gint                  : Read / Write
  "show-grid"                gboolean              : Read / Write
  "show-mesh"                gboolean              : Read / Write
  "transparent"              gboolean              : Read / Write
  "use-amplitud"             gboolean              : Read / Write
  "use-height"               gboolean              : Read / Write
  "vector-light"             gpointer              : Read / Write
  "xstep"                    gdouble               : Read / Write
  "ystep"                    gdouble               : Read / Write

Description

FIXME:: need long description

Details

GtkPlotSurface

typedef struct _GtkPlotSurface GtkPlotSurface;

The GtkPlotSurface struct contains only private data. It should only be accessed through the functions described below.


GtkPlotPolygon

typedef struct {
  GtkPlotDTtriangle *t;  		/* parent triangle */
  GtkPlotVector xyz[4]; 		/* points */
  GtkPlotVector p[4];			/* pixels */
  gint n;				/* number of points */
  gdouble level;
  gboolean cut_level;	
  gboolean sublevel;
} GtkPlotPolygon;


gtk_plot_surface_new ()

GtkWidget*          gtk_plot_surface_new                (void);

Returns :


gtk_plot_surface_new_function ()

GtkWidget*          gtk_plot_surface_new_function       (GtkPlotFunc3D function);

function :

a GtkPlotFunc3D. scope async.

Returns :

(transfer full) the constructed GtkWidget

gtk_plot_surface_construct_function ()

void                gtk_plot_surface_construct_function (GtkPlotSurface *surface,
                                                         GtkPlotFunc3D function);

surface :

function :

a GtkPlotFunc3D. scope async.

gtk_plot_surface_set_color ()

void                gtk_plot_surface_set_color          (GtkPlotSurface *data,
                                                         GdkColor *color);

data :

color :


gtk_plot_surface_set_shadow ()

void                gtk_plot_surface_set_shadow         (GtkPlotSurface *data,
                                                         GdkColor *color);

data :

color :


gtk_plot_surface_set_grid_foreground ()

void                gtk_plot_surface_set_grid_foreground
                                                        (GtkPlotSurface *data,
                                                         GdkColor *foreground);

data :

foreground :


gtk_plot_surface_set_grid_background ()

void                gtk_plot_surface_set_grid_background
                                                        (GtkPlotSurface *data,
                                                         GdkColor *background);

data :

background :


gtk_plot_surface_set_grid_visible ()

void                gtk_plot_surface_set_grid_visible   (GtkPlotSurface *data,
                                                         gboolean visible);

data :

visible :


gtk_plot_surface_get_grid_visible ()

gboolean            gtk_plot_surface_get_grid_visible   (GtkPlotSurface *data);

data :

Returns :


gtk_plot_surface_set_mesh_visible ()

void                gtk_plot_surface_set_mesh_visible   (GtkPlotSurface *data,
                                                         gboolean visible);

data :

visible :


gtk_plot_surface_get_mesh_visible ()

gboolean            gtk_plot_surface_get_mesh_visible   (GtkPlotSurface *data);

data :

Returns :


gtk_plot_surface_set_light ()

void                gtk_plot_surface_set_light          (GtkPlotSurface *data,
                                                         gdouble x,
                                                         gdouble y,
                                                         gdouble z);

data :

x :

y :

z :


gtk_plot_surface_set_ambient ()

void                gtk_plot_surface_set_ambient        (GtkPlotSurface *data,
                                                         gdouble ambient);

data :

ambient :


gtk_plot_surface_use_height_gradient ()

void                gtk_plot_surface_use_height_gradient
                                                        (GtkPlotSurface *data,
                                                         gboolean use_gradient);

data :

use_gradient :


gtk_plot_surface_use_amplitud ()

void                gtk_plot_surface_use_amplitud       (GtkPlotSurface *data,
                                                         gboolean use_amplitud);

data :

use_amplitud :


gtk_plot_surface_set_transparent ()

void                gtk_plot_surface_set_transparent    (GtkPlotSurface *data,
                                                         gboolean transparent);

data :

transparent :


gtk_plot_surface_set_points ()

void                gtk_plot_surface_set_points         (GtkPlotSurface *data,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *z,
                                                         gdouble *dx,
                                                         gdouble *dy,
                                                         gdouble *dz,
                                                         gint nx,
                                                         gint ny);

data :

x :

y :

z :

dx :

dy :

dz :

nx :

ny :


gtk_plot_surface_get_points ()

void                gtk_plot_surface_get_points         (GtkPlotSurface *data,
                                                         gdouble **x,
                                                         gdouble **y,
                                                         gdouble **z,
                                                         gdouble **dx,
                                                         gdouble **dy,
                                                         gdouble **dz,
                                                         gint *nx,
                                                         gint *ny);

data :

x :

y :

z :

dx :

dy :

dz :

nx :

ny :


gtk_plot_surface_set_x ()

GtkPlotArray *      gtk_plot_surface_set_x              (GtkPlotSurface *data,
                                                         gdouble *x);

data :

x :

the value to be set

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_surface_set_y ()

GtkPlotArray *      gtk_plot_surface_set_y              (GtkPlotSurface *data,
                                                         gdouble *y);

data :

y :

the value to be set

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_surface_set_z ()

GtkPlotArray *      gtk_plot_surface_set_z              (GtkPlotSurface *data,
                                                         gdouble *z);

data :

z :

the value to be set

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_surface_set_dx ()

GtkPlotArray *      gtk_plot_surface_set_dx             (GtkPlotSurface *data,
                                                         gdouble *dx);

data :

dx :

the value to be set

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_surface_set_dy ()

GtkPlotArray *      gtk_plot_surface_set_dy             (GtkPlotSurface *data,
                                                         gdouble *dy);

data :

dy :

the value to be set

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_surface_set_dz ()

GtkPlotArray *      gtk_plot_surface_set_dz             (GtkPlotSurface *data,
                                                         gdouble *dz);

data :

dz :

the value to be set

Returns :

(transfer none) the affected GtkPlotArray

gtk_plot_surface_get_x ()

gdouble *           gtk_plot_surface_get_x              (GtkPlotSurface *dataset,
                                                         gint *nx);

dataset :

nx :

the value to be set

Returns :


gtk_plot_surface_get_y ()

gdouble *           gtk_plot_surface_get_y              (GtkPlotSurface *dataset,
                                                         gint *ny);

dataset :

ny :

Returns :


gtk_plot_surface_get_z ()

gdouble *           gtk_plot_surface_get_z              (GtkPlotSurface *dataset,
                                                         gint *nx,
                                                         gint *ny);

dataset :

nx :

ny :

Returns :


gtk_plot_surface_get_dx ()

gdouble *           gtk_plot_surface_get_dx             (GtkPlotSurface *dataset);

dataset :

Returns :


gtk_plot_surface_get_dy ()

gdouble *           gtk_plot_surface_get_dy             (GtkPlotSurface *dataset);

dataset :

Returns :


gtk_plot_surface_get_dz ()

gdouble *           gtk_plot_surface_get_dz             (GtkPlotSurface *dataset);

dataset :

Returns :


gtk_plot_surface_set_nx ()

void                gtk_plot_surface_set_nx             (GtkPlotSurface *dataset,
                                                         gint nx);

dataset :

nx :


gtk_plot_surface_set_ny ()

void                gtk_plot_surface_set_ny             (GtkPlotSurface *dataset,
                                                         gint ny);

dataset :

ny :


gtk_plot_surface_get_nx ()

gint                gtk_plot_surface_get_nx             (GtkPlotSurface *dataset);

dataset :

Returns :


gtk_plot_surface_get_ny ()

gint                gtk_plot_surface_get_ny             (GtkPlotSurface *dataset);

dataset :

Returns :


gtk_plot_surface_set_xstep ()

void                gtk_plot_surface_set_xstep          (GtkPlotSurface *dataset,
                                                         gdouble xstep);

dataset :

xstep :


gtk_plot_surface_set_ystep ()

void                gtk_plot_surface_set_ystep          (GtkPlotSurface *dataset,
                                                         gdouble ystep);

dataset :

ystep :


gtk_plot_surface_get_xstep ()

gdouble             gtk_plot_surface_get_xstep          (GtkPlotSurface *dataset);

dataset :

Returns :


gtk_plot_surface_get_ystep ()

gdouble             gtk_plot_surface_get_ystep          (GtkPlotSurface *dataset);

dataset :

Returns :


gtk_plot_surface_build_mesh ()

void                gtk_plot_surface_build_mesh         (GtkPlotSurface *surface);

surface :


gtk_plot_surface_recalc_nodes ()

void                gtk_plot_surface_recalc_nodes       (GtkPlotSurface *surface);

surface :

Property Details

The "ambient" property

  "ambient"                  gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "mesh-color" property

  "mesh-color"               gpointer              : Read / Write


The "mesh-style" property

  "mesh-style"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "mesh-width" property

  "mesh-width"               gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "nx" property

  "nx"                       gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "ny" property

  "ny"                       gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "show-grid" property

  "show-grid"                gboolean              : Read / Write

Default value: FALSE


The "show-mesh" property

  "show-mesh"                gboolean              : Read / Write

Default value: FALSE


The "transparent" property

  "transparent"              gboolean              : Read / Write

Default value: FALSE


The "use-amplitud" property

  "use-amplitud"             gboolean              : Read / Write

Default value: FALSE


The "use-height" property

  "use-height"               gboolean              : Read / Write

Default value: TRUE


The "vector-light" property

  "vector-light"             gpointer              : Read / Write


The "xstep" property

  "xstep"                    gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "ystep" property

  "ystep"                    gdouble               : Read / Write

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/home.png0000644000076400001440000000121612604172532015560 00000000000000PNG  IHDRw=bKGD pHYs  ~tIME1KvIDATxՕkq?rCp ~CnpCAAJ .B-\'G]:ܠC -(8 Ԁ!fDғklbRoyxwpðIJ<of_-@RHf֟t^ښ$Q|pgv;X^^&s(bwwZF9&3඙ ^IRZUE.0Z]]U PYM8HGIekqqҀ! $۬3n e{-/seeeÌXOͷ$8==USQRR'9-s+B^ Cەs+%<7W :2IENDB`gtkextra-3.2.0/docs/reference/html/gtkextra-GtkExtra-Versioning.html0000644000076400001440000002126712604172532022521 00000000000000 GtkExtra Versioning

GtkExtra Versioning

GtkExtra Versioning

Synopsis


#include <gtkextra.h>

#define             GTKEXTRA_MAJOR_VERSION
#define             GTKEXTRA_MINOR_VERSION
#define             GTKEXTRA_MICRO_VERSION
#define             GTKEXTRA_CHECK_VERSION              (major,minor,micro)
extern              const guint gtkextra_major_version;
extern              const guint gtkextra_minor_version;
extern              const guint gtkextra_micro_version;
extern              const guint gtkextra_binary_age;
extern              const guint gtkextra_interface_age;
gchar*              gtkextra_check_version              (guint required_major,
                                                         guint required_minor,
                                                         guint required_micro);

Description

Details

GTKEXTRA_MAJOR_VERSION

#define GTKEXTRA_MAJOR_VERSION			(3)


GTKEXTRA_MINOR_VERSION

#define GTKEXTRA_MINOR_VERSION			(2)


GTKEXTRA_MICRO_VERSION

#define GTKEXTRA_MICRO_VERSION			(0)


GTKEXTRA_CHECK_VERSION()

#define             GTKEXTRA_CHECK_VERSION(major,minor,micro)

major :

minor :

micro :


gtkextra_major_version

extern const guint gtkextra_major_version;


gtkextra_minor_version

extern const guint gtkextra_minor_version;


gtkextra_micro_version

extern const guint gtkextra_micro_version;


gtkextra_binary_age

extern const guint gtkextra_binary_age;


gtkextra_interface_age

extern const guint gtkextra_interface_age;


gtkextra_check_version ()

gchar*              gtkextra_check_version              (guint required_major,
                                                         guint required_minor,
                                                         guint required_micro);

required_major :

required_minor :

required_micro :

Returns :

gtkextra-3.2.0/docs/reference/html/GtkComboButton.html0000644000076400001440000001647312604172532017724 00000000000000 GtkComboButton

GtkComboButton

GtkComboButton — A combo button widget for GTK

Synopsis


#include <gtkextra.h>

                    GtkComboButton;
GtkWidget *         gtk_combo_button_new                (void);
void                gtk_combo_button_hide_popdown_window
                                                        (GtkComboButton *combo_button);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----GtkComboButton
                                             +----GtkBorderCombo
                                             +----GtkColorCombo
                                             +----GtkToggleCombo

Implemented Interfaces

GtkComboButton implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Description

Details

GtkComboButton

typedef struct _GtkComboButton GtkComboButton;

The GtkComboButton struct contains only private data. It should only be accessed through the functions described below.


gtk_combo_button_new ()

GtkWidget *         gtk_combo_button_new                (void);

Returns :


gtk_combo_button_hide_popdown_window ()

void                gtk_combo_button_hide_popdown_window
                                                        (GtkComboButton *combo_button);

Hides the popdown window of pressed GtkComboButton.

combo_button :

the GtkComboButton widget.
gtkextra-3.2.0/docs/reference/html/GtkDataTextView.html0000644000076400001440000005105012604172532020030 00000000000000 GtkDataTextView

GtkDataTextView

GtkDataTextView — a data textview widget, based on GtkTextView

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkTextView
                                 +----GtkDataTextView

Implemented Interfaces

GtkDataTextView implements AtkImplementorIface and GtkBuildable.

Properties

  "description"              gchar*                : Read / Write
  "max-length"               gint                  : Read / Write
  "max-length-bytes"         gint                  : Read / Write

Description

GtkDataTextView provides additional properties:

- "description" - no functionality, a place for private information that cannot be put anywhere else

- "max-length" - set the maximum character length for the contents of the widget.

- "max-length-bytes" - set the maximum byte length for the contents of the widget.

The main reason for this widget is to provide a length limit for text contents, required by SQL database systems. There is always a limit, no matter what you do. Some database systems may handle character length of UTF-8 strings correctly, others may not. Choose the appropriate limit for your system, characters or bytes. Note that setting a byte length limit > 0 on a datatextview may slow down text insertions. The byte length limit is imposed upon gtk_text_buffer_get_text() including invisible content. See gtk_text_buffer_get_text() for details.

Details

GtkDataTextView

typedef struct _GtkDataTextView GtkDataTextView;

The GtkDataTextView struct contains only private data. It should only be accessed through the functions described below.


gtk_data_text_view_new ()

GtkDataTextView *   gtk_data_text_view_new              (void);

Creates a new GtkDataTextView Widget.

Returns :

the new GtkDataTextView Widget

Since 3.0.6


gtk_data_text_view_get_description ()

const gchar *       gtk_data_text_view_get_description  (GtkDataTextView *data_text_view);

Retrieves the GtkDataTextView description.

data_text_view :

a GtkDataTextView

Returns :

a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

Since 3.0.6


gtk_data_text_view_get_max_length ()

gint                gtk_data_text_view_get_max_length   (GtkDataTextView *data_text_view);

Retrieves the maximum character length for the contents of GtkDataTextView.

data_text_view :

a GtkDataTextView

Returns :

maximum byte length or 0.

Since 3.0.6


gtk_data_text_view_get_max_length_bytes ()

gint                gtk_data_text_view_get_max_length_bytes
                                                        (GtkDataTextView *data_text_view);

Retrieves the maximum byte length for the contents of GtkDataTextView data_format.

data_text_view :

a GtkDataTextView

Returns :

maximum byte length or 0.

Since 3.0.6


gtk_data_text_view_set_description ()

void                gtk_data_text_view_set_description  (GtkDataTextView *data_text_view,
                                                         const gchar *description);

Sets the GtkDataTextView description.

data_text_view :

a GtkDataTextView

description :

the description or NULL

Since 3.0.6


gtk_data_text_view_set_max_length ()

void                gtk_data_text_view_set_max_length   (GtkDataTextView *data_text_view,
                                                         gint max_length);

Sets the maximum character length for the contents of the GtkDataTextView. Existing content will not be truncted.

data_text_view :

a GtkDataTextView

max_length :

maximum character length or 0

Since 3.0.6


gtk_data_text_view_set_max_length_bytes ()

void                gtk_data_text_view_set_max_length_bytes
                                                        (GtkDataTextView *data_text_view,
                                                         gint max_length_bytes);

Sets the maximum byte length for the contents of the GtkDataTextView. Existing content will not be truncted.

data_text_view :

a GtkDataTextView

max_length_bytes :

maximum byte length or 0

Since 3.0.6

Property Details

The "description" property

  "description"              gchar*                : Read / Write

Description of the GtkDataTextView, no functionality, a place for private information that cannot be put anywhere else.

Default value: ""

Since 3.0.6


The "max-length" property

  "max-length"               gint                  : Read / Write

Set the maximum length in characters for the GtkDataTextView. For details see gtk_data_text_view_set_max_length.

Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled.

Allowed values: [0,1073741823]

Default value: 0

Since 3.0.6


The "max-length-bytes" property

  "max-length-bytes"         gint                  : Read / Write

Set the maximum length in bytes for the GtkDataTextView. For details see gtk_data_text_view_set_max_length_bytes.

Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled.

Allowed values: [0,1073741823]

Default value: 0

Since 3.0.6

gtkextra-3.2.0/docs/reference/html/GtkPlotCairo.html0000644000076400001440000002277212604172532017364 00000000000000 GtkPlotCairo

GtkPlotCairo

GtkPlotCairo — Cairo drawing backend.

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotPC
                     +----GtkPlotCairo

Description

Subclass of GtkPlotPC used for screen drawing.

Details

GtkPlotCairo

typedef struct _GtkPlotCairo GtkPlotCairo;

The GtkPlotCairo struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_cairo_new ()

GtkObject *         gtk_plot_cairo_new                  (cairo_t *cairo);

cairo :

Returns :


gtk_plot_cairo_new_with_drawable ()

GtkObject *         gtk_plot_cairo_new_with_drawable    (GdkDrawable *drawable);

drawable :

Returns :


gtk_plot_cairo_construct ()

void                gtk_plot_cairo_construct            (GtkPlotCairo *pc,
                                                         cairo_t *cairo,
                                                         PangoContext *context);

pc :

A GtkPlotCairo.

cairo :

context :


gtk_plot_cairo_set_cairo ()

void                gtk_plot_cairo_set_cairo            (GtkPlotCairo *pc,
                                                         cairo_t *cairo);

pc :

a GtkPlotCairo

cairo :

gtkextra-3.2.0/docs/reference/html/ch03.html0000644000076400001440000002103012604172532015541 00000000000000 Widgets

Widgets

GtkBorderCombo — A border combo widget
GtkCharSelection — Character selection dialog
GtkCheckItem — Check item widget for Gtk
GtkColorCombo — A color combo widget for GTK.
GtkComboButton — A combo button widget for GTK
GtkDataEntry — a data entry widget, based on GtkEntry
GtkDataTextView — a data textview widget, based on GtkTextView
GtkDirTree — A directory tree widget for GTK.
GtkFileList — A file list widget fot GTK
GtkFontCombo — A font combo widget for GTK.
GtkIconFileSel — A file selection dialog widget for GTK.
GtkIconList — A file icon list widget for GTK.
GtkItemEntry — An item entry widget.
GtkPlot — 2d scientific plots widget
GtkPlot3D — 3d scientific plots widget
GtkPlotArray
GtkPlotBar — 3d scientific plots widget for GTK.
GtkPlotBox
GtkPlotBubble
GtkPlotCairo — Cairo drawing backend.
GtkPlotCandle
GtkPlotCSurface
GtkPlotCanvas
GtkPlotCanvasEllipse
GtkPlotCanvasLine
GtkPlotCanvasRectangle
GtkPlotCanvasPixmap
GtkPlotCanvasText
GtkPlotCanvasPlot
GtkPlotData
GtkPlotDT
GtkPlotDTriangle
GtkPlotFlux
GtkPlotGdk — GDK drawing backend (mapped to Cairo)
GtkPlotPC — Plot Context
GtkPlotPixmap — Pixmap plots widget.
GtkPlotPolar
GtkPlotPrint
GtkPlotPS — postscript driver
GtkPlotSegment
GtkPlotSurface
GtkPSFont — PostScript Fonts handling.
GtkSheet — A spreadsheet widget for Gtk+
GtkSheetColumn — A spreadsheet column widget for GtkSheet
GtkToggleCombo — A toggle combo widget for GTK.
gtkextra-3.2.0/docs/reference/html/GtkCheckItem.html0000644000076400001440000002137712604172532017324 00000000000000 GtkCheckItem

GtkCheckItem

GtkCheckItem — Check item widget for Gtk

Synopsis


#include <gtkextra.h>

                    GtkCheckItem;
GtkWidget*          gtk_check_item_new                  (void);
GtkWidget*          gtk_check_item_new_with_label       (const gchar *label);
void                gtk_check_item_construct_with_label (GtkCheckItem *check_item,
                                                         const gchar *label);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkButton
                                       +----GtkToggleButton
                                             +----GtkCheckItem

Implemented Interfaces

GtkCheckItem implements AtkImplementorIface, GtkBuildable and GtkActivatable.

Description

It is a GtkCheckButton hack with the look and feel of the Redmond95 theme.

Details

GtkCheckItem

typedef struct _GtkCheckItem GtkCheckItem;

The GtkCheckItem struct contains only private data. It should only be accessed through the functions described below.


gtk_check_item_new ()

GtkWidget*          gtk_check_item_new                  (void);

Returns :


gtk_check_item_new_with_label ()

GtkWidget*          gtk_check_item_new_with_label       (const gchar *label);

Create a GtkCheckItem widget with a specified label.

label :

text near the check item

Returns :

the newly-created GtkCheckItem.

gtk_check_item_construct_with_label ()

void                gtk_check_item_construct_with_label (GtkCheckItem *check_item,
                                                         const gchar *label);

Initialize a GtkCheckItem widget with a specified label.

check_item :

a GtkCheckItem widget

label :

text near the check item
gtkextra-3.2.0/docs/reference/html/GtkPlotCandle.html0000644000076400001440000001246012604172532017506 00000000000000 GtkPlotCandle

GtkPlotCandle

GtkPlotCandle

Synopsis


#include <gtkextra.h>

                    GtkPlotCandle;
GtkWidget*          gtk_plot_candle_new                 (void);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotCandle

Implemented Interfaces

GtkPlotCandle implements AtkImplementorIface and GtkBuildable.

Description

FIXME:: need long description.

Details

GtkPlotCandle

typedef struct _GtkPlotCandle GtkPlotCandle;

The GtkPlotCandle struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_candle_new ()

GtkWidget*          gtk_plot_candle_new                 (void);

Returns :

gtkextra-3.2.0/docs/reference/html/gtkextra.html0000644000076400001440000001733412604172532016651 00000000000000 Part I. GtkExtra Overview

Part I. GtkExtra Overview

GtkExtra is a useful set of widgets for creating GUI's for the Xwindow system using GTK+. You can use it complementary to GTK+ and it is written in C. It is also Free Software and released under the LGPL license.

The library includes the following widgets:

GtkSheet

GtkSheet is a matrix widget for GTK+. It consists of an scrollable grid of cells where you can allocate text. Cell contents can be edited interactively through a specially designed entry, GtkItemEntry. It is also a container subclass, allowing you to display buttons, curves, pixmaps and any other widget in it. You can also set many attributes as: border, foreground and background color, text justification, and more. The testgtksheet program shows how easy is to create a spreadsheet-like GUI using this widget set.

GtkPlot

GtkPlot is a widget for GTK+. It allows to draw high quality scientific plots in two dimensions with a look and feel very similar to Microcal Origin for Windows.

The distribution includes GtkPlotCanvas subclass, and a demo program showing two layered plots with different kind of curves. You can choose between a number of symbol types, lines, connectors -straight lines, steps, splines-, and change their attributes -color, size, width-. You can also plot functions, add error bars, edit legends, rotate and move axis titles, change axis properties, etc.

The package also includes GtkPlot3D and GtkPlotPolar.

GtkPlotCanvas is a GtkFixed subclass and allows to DnD plots, points, and child objects (text, axis titles). You can move them or resize your plots dragging with the mouse!

The distribution includes also a PostScript driver. All the features are demonstrated in testgtkplot and testrealtime.

GtkIconList

GtkIconList is a GtkFixed subclass that allows you to display a table of xpm icons with editable labels. It's completely designed from scratch with some ideas borrowed from gnome-icon-list. It contains almost all of its features and more. It can be used for file browsers and as a replacement of gnome-icon-list (without the need of using gnome libraries). Like GtkSheet, it uses the widget GtkItemEntry to edit the text fields.

GtkDirTree

It is a GtkCTree subclass that allows you to navigate the file-system.

GtkFileList

It is a GtkIconList subclass that displays the contents of a given directory using fancy icons for different types of files.

GtkIconFileSelection

It is a nice looking file selection dialog using icons. It combines GtkDirTree and GtkFileList to navigate the file system and select files. It has also two entries to select the file and filter.

GtkItemEntry

It is a GtkEntry subclass. It can have fixed size or can be dinamically resized when the text is entered. You can change text justification to centered, left, or right, and change the foreground and background colors very easily. It only displays the text and has no borders.

GtkFontCombo

It is a GtkToolBar subclass with two combos to select among the 35 standard Adobe PostScript fonts with different sizes. It has also two buttons to select bold and italics. When you select a new font, it returns the name of the corresponding Postscript font and the equivalent Xfont. This is what we all expect to have on the top of a GUI for a spreadsheet or word processor.

GtkComboBox

It is a composite widget with two buttons, one with an arrow to display a popdown window where you can pack whatever you want, from a calendar to a clist.

GtkColorCombo

It is a GtkComboBox subclass with a pallette of colors in the popdown window to pickup the one you like the most. It has a default pallette, but it's completelly customizable.

GtkBorderCombo

It is a GtkComboBox subclass with a variety of border styles in the popdown window arranged in a table of togglebuttons.

GtkCheckItem

It is a GtkCheckButton hack with the look and feel of the Redmond95 theme.

Table of Contents

Compiling GtkExtra Applications — How to compile your GtkExtra+ application
Mailing lists and bug reports — Getting help with GtkExtra
gtkextra-3.2.0/docs/reference/html/gtkextra-GtkDataFormat.html0000644000076400001440000001711712604172532021336 00000000000000 GtkDataFormat

GtkDataFormat

GtkDataFormat — a data formatting library

Synopsis


#include <gtkextra.h>

gchar *             gtk_data_format                     (const gchar *str,
                                                         const gchar *dataformat);
gchar *             gtk_data_format_remove              (const gchar *str,
                                                         const gchar *dataformat);

Description

the widget property 'dataformat' may contain formatting instructions for the field contents. Any unrecognized formatting instruction is silently skipped.

The formatting process should always be reversible. Thus formatting can be applied when input focus leaves a field and removed again when the focus enters a field, without the need of an additional content buffer.

the library can be easily extended by adding more instructions to the list above.

Details

gtk_data_format ()

gchar *             gtk_data_format                     (const gchar *str,
                                                         const gchar *dataformat);

format str according to dataformat.

formatting instructions:

'' (the empty string) does no formatting at all.

'int8' is formatted as a singed 8-bit integer value with optional '-' sign.

'int16' is formatted as a signed 16-bit integer with optional '-' sign.

'int32' is formatted as a signed 32-bit integer with optional '-' sign.

'money' is formatted as a double float value with 2 decimal digits and 1000s-separators

'float,N' is formatted as a double float value with N decimal digits and 1000s-separators

'bit' is formatted as a boolean value [0,1].

str :

the string to be formatted

dataformat :

formatting instructions

Returns :

a pointer to an internal static buffer, with the formatted data

gtk_data_format_remove ()

gchar *             gtk_data_format_remove              (const gchar *str,
                                                         const gchar *dataformat);

reverse the effect of gtk_data_format, i.e. remove all formatting characters, apply trailing dash

str :

the string to be unformatted

dataformat :

formatting instructions

Returns :

a pointer to an internal static buffer, with the unformatted data
gtkextra-3.2.0/docs/reference/html/GtkSheetColumn.html0000644000076400001440000030205712604172532017713 00000000000000 GtkSheetColumn

GtkSheetColumn

GtkSheetColumn — A spreadsheet column widget for GtkSheet

Synopsis


#include <gtkextra.h>

                    GtkSheetColumn;
void                gtk_sheet_add_column                (GtkSheet *sheet,
                                                         guint ncols);
void                gtk_sheet_insert_columns            (GtkSheet *sheet,
                                                         guint col,
                                                         guint ncols);
void                gtk_sheet_delete_columns            (GtkSheet *sheet,
                                                         guint col,
                                                         guint ncols);
guint               gtk_sheet_get_columns_count         (GtkSheet *sheet);
GtkSheetColumn *    gtk_sheet_column_get                (GtkSheet *sheet,
                                                         gint col);
gint                gtk_sheet_column_get_index          (GtkSheetColumn *colobj);
void                gtk_sheet_select_column             (GtkSheet *sheet,
                                                         gint column);
gboolean            gtk_sheet_column_titles_visible     (GtkSheet *sheet);
void                gtk_sheet_show_column_titles        (GtkSheet *sheet);
void                gtk_sheet_hide_column_titles        (GtkSheet *sheet);
const gchar *       gtk_sheet_get_column_title          (GtkSheet *sheet,
                                                         gint column);
void                gtk_sheet_set_column_title          (GtkSheet *sheet,
                                                         gint column,
                                                         const gchar *title);
void                gtk_sheet_set_column_titles_height  (GtkSheet *sheet,
                                                         guint height);
gboolean            gtk_sheet_column_sensitive          (GtkSheet *sheet,
                                                         gint column);
void                gtk_sheet_column_set_sensitivity    (GtkSheet *sheet,
                                                         gint column,
                                                         gboolean sensitive);
void                gtk_sheet_columns_set_sensitivity   (GtkSheet *sheet,
                                                         gboolean sensitive);
gboolean            gtk_sheet_columns_resizable         (GtkSheet *sheet);
void                gtk_sheet_columns_set_resizable     (GtkSheet *sheet,
                                                         gboolean resizable);
gboolean            gtk_sheet_column_visible            (GtkSheet *sheet,
                                                         gint column);
void                gtk_sheet_column_set_visibility     (GtkSheet *sheet,
                                                         gint column,
                                                         gboolean visible);
void                gtk_sheet_column_label_set_visibility
                                                        (GtkSheet *sheet,
                                                         gint col,
                                                         gboolean visible);
void                gtk_sheet_columns_labels_set_visibility
                                                        (GtkSheet *sheet,
                                                         gboolean visible);
const gint          gtk_sheet_get_column_width          (GtkSheet *sheet,
                                                         gint column);
void                gtk_sheet_set_column_width          (GtkSheet *sheet,
                                                         gint column,
                                                         guint width);
GtkJustification    gtk_sheet_column_get_justification  (GtkSheet *sheet,
                                                         gint col);
void                gtk_sheet_column_set_justification  (GtkSheet *sheet,
                                                         gint col,
                                                         GtkJustification just);
GtkSheetVerticalJustification  gtk_sheet_column_get_vjustification
                                                        (GtkSheet *sheet,
                                                         gint col);
void                gtk_sheet_column_set_vjustification (GtkSheet *sheet,
                                                         gint col,
                                                         GtkSheetVerticalJustification vjust);
const gchar *       gtk_sheet_column_button_get_label   (GtkSheet *sheet,
                                                         gint col);
void                gtk_sheet_column_button_add_label   (GtkSheet *sheet,
                                                         gint col,
                                                         const gchar *label);
void                gtk_sheet_column_button_justify     (GtkSheet *sheet,
                                                         gint col,
                                                         GtkJustification justification);
gchar *             gtk_sheet_column_get_tooltip_markup (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_tooltip_markup (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *markup);
gchar *             gtk_sheet_column_get_tooltip_text   (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_tooltip_text   (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *text);
gchar *             gtk_sheet_column_get_datatype       (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_datatype       (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *data_type);
gchar *             gtk_sheet_column_get_description    (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_description    (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *description);
gchar *             gtk_sheet_column_get_format         (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_format         (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *format);
gboolean            gtk_sheet_column_get_iskey          (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_iskey          (GtkSheet *sheet,
                                                         const gint col,
                                                         const gboolean is_key);
GType               gtk_sheet_column_get_entry_type     (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_entry_type     (GtkSheet *sheet,
                                                         const gint col,
                                                         const GType entry_type);
gboolean            gtk_sheet_column_get_readonly       (GtkSheet *sheet,
                                                         const gint col);
void                gtk_sheet_column_set_readonly       (GtkSheet *sheet,
                                                         const gint col,
                                                         const gboolean is_readonly);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkSheetColumn

Implemented Interfaces

GtkSheetColumn implements AtkImplementorIface and GtkBuildable.

Properties

  "dataformat"               gchar*                : Read / Write
  "datatype"                 gchar*                : Read / Write
  "description"              gchar*                : Read / Write
  "entry-type"               GtkSheetEntryType     : Read / Write
  "iskey"                    gboolean              : Read / Write
  "justification"            GtkJustification      : Read / Write
  "label"                    gchar*                : Read / Write
  "max-length"               gint                  : Read / Write
  "max-length-bytes"         gint                  : Read / Write
  "position"                 gint                  : Read / Write
  "readonly"                 gboolean              : Read / Write
  "visible"                  gboolean              : Read / Write
  "vjust"                    GtkSheetVerticalJustification  : Read / Write
  "width"                    gint                  : Read / Write
  "wrap-mode"                GtkWrapMode           : Read / Write

Description

The GtkSheetColumn provides properties for sheet columns.

Details

GtkSheetColumn

typedef struct _GtkSheetColumn GtkSheetColumn;

The GtkSheetColumn struct contains only private data. It should only be accessed through the functions described below.


gtk_sheet_add_column ()

void                gtk_sheet_add_column                (GtkSheet *sheet,
                                                         guint ncols);

Append ncols columns to the right of the sheet.

sheet :

a GtkSheet.

ncols :

number of columns to be appended.

gtk_sheet_insert_columns ()

void                gtk_sheet_insert_columns            (GtkSheet *sheet,
                                                         guint col,
                                                         guint ncols);

Insert ncols columns before the given row and pull right.

sheet :

a GtkSheet.

col :

column number.

ncols :

number of columns to be inserted.

gtk_sheet_delete_columns ()

void                gtk_sheet_delete_columns            (GtkSheet *sheet,
                                                         guint col,
                                                         guint ncols);

Delete ncols columns starting from col.

sheet :

a GtkSheet.

col :

column number.

ncols :

number of columns to be deleted.

gtk_sheet_get_columns_count ()

guint               gtk_sheet_get_columns_count         (GtkSheet *sheet);

Get the number of the columns of the GtkSheet.

sheet :

a GtkSheet

Returns :

number of columns.

gtk_sheet_column_get ()

GtkSheetColumn *    gtk_sheet_column_get                (GtkSheet *sheet,
                                                         gint col);

Get a GtkSheetColumn

sheet :

a GtkSheet.

col :

column index

Returns :

(transfer none) the requested GtkSheetColumn or NULL

gtk_sheet_column_get_index ()

gint                gtk_sheet_column_get_index          (GtkSheetColumn *colobj);

find index of colobj in GtkSheet

colobj :

GtkSheetColumn to find

Returns :

column index or -1

gtk_sheet_select_column ()

void                gtk_sheet_select_column             (GtkSheet *sheet,
                                                         gint column);

Select the column. The range is then highlighted, and the bounds are stored in sheet->range.

sheet :

a GtkSheet.

column :

column number

gtk_sheet_column_titles_visible ()

gboolean            gtk_sheet_column_titles_visible     (GtkSheet *sheet);

Get the visibility of sheet column titles .

sheet :

a GtkSheet

Returns :

TRUE or FALSE

gtk_sheet_show_column_titles ()

void                gtk_sheet_show_column_titles        (GtkSheet *sheet);

Show column titles .

sheet :

a GtkSheet

gtk_sheet_hide_column_titles ()

void                gtk_sheet_hide_column_titles        (GtkSheet *sheet);

Hide column titles .

sheet :

a GtkSheet

gtk_sheet_get_column_title ()

const gchar *       gtk_sheet_get_column_title          (GtkSheet *sheet,
                                                         gint column);

Get column title.

sheet :

a GtkSheet

column :

column number

Returns :

column title, do not modify or free it.

gtk_sheet_set_column_title ()

void                gtk_sheet_set_column_title          (GtkSheet *sheet,
                                                         gint column,
                                                         const gchar *title);

Set column title.

sheet :

a GtkSheet

column :

column number

title :

column title

gtk_sheet_set_column_titles_height ()

void                gtk_sheet_set_column_titles_height  (GtkSheet *sheet,
                                                         guint height);

Resize column titles area .

sheet :

a GtkSheet

height :

column title height.

gtk_sheet_column_sensitive ()

gboolean            gtk_sheet_column_sensitive          (GtkSheet *sheet,
                                                         gint column);

Get column button sensitivity.

sheet :

a GtkSheet.

column :

column number

Returns :

TRUE - the column is sensitive, FALSE - insensitive or not existant

gtk_sheet_column_set_sensitivity ()

void                gtk_sheet_column_set_sensitivity    (GtkSheet *sheet,
                                                         gint column,
                                                         gboolean sensitive);

Set column button sensitivity. If sensitivity is TRUE it can be toggled, otherwise it acts as a title.

sheet :

a GtkSheet.

column :

column number

sensitive :

TRUE or FALSE

gtk_sheet_columns_set_sensitivity ()

void                gtk_sheet_columns_set_sensitivity   (GtkSheet *sheet,
                                                         gboolean sensitive);

Set all columns buttons sensitivity. If sensitivity is TRUE button can be toggled, otherwise act as titles. The sheet itself has no such property, it is a convenience function to set the property for all existing columns.

sheet :

a GtkSheet.

sensitive :

TRUE or FALSE

gtk_sheet_columns_resizable ()

gboolean            gtk_sheet_columns_resizable         (GtkSheet *sheet);

Get columns resizable status.

sheet :

a GtkSheet.

Returns :

TRUE or FALSE

gtk_sheet_columns_set_resizable ()

void                gtk_sheet_columns_set_resizable     (GtkSheet *sheet,
                                                         gboolean resizable);

Set columns resizable status.

sheet :

a GtkSheet.

resizable :

TRUE or FALSE

gtk_sheet_column_visible ()

gboolean            gtk_sheet_column_visible            (GtkSheet *sheet,
                                                         gint column);

Get column visible property.

sheet :

a GtkSheet.

column :

column number

Returns :

TRUE - visible, FALSE - hidden or not existant

gtk_sheet_column_set_visibility ()

void                gtk_sheet_column_set_visibility     (GtkSheet *sheet,
                                                         gint column,
                                                         gboolean visible);

Set column visible property.

Default value is TRUE. When set to FALSE, the column is hidden.

sheet :

a GtkSheet.

column :

column number

visible :

TRUE or FALSE

gtk_sheet_column_label_set_visibility ()

void                gtk_sheet_column_label_set_visibility
                                                        (GtkSheet *sheet,
                                                         gint col,
                                                         gboolean visible);

Set column label visibility. The default value is TRUE. If FALSE, the column label is hidden.

sheet :

a GtkSheet.

col :

column number.

visible :

TRUE or FALSE

gtk_sheet_columns_labels_set_visibility ()

void                gtk_sheet_columns_labels_set_visibility
                                                        (GtkSheet *sheet,
                                                         gboolean visible);

Set all columns labels visibility. The default value is TRUE. If FALSE, the columns labels are hidden. The sheet itself has no such property, it is a convenience function to set the property for all existing columns.

sheet :

a GtkSheet.

visible :

TRUE or FALSE

gtk_sheet_get_column_width ()

const gint          gtk_sheet_get_column_width          (GtkSheet *sheet,
                                                         gint column);

Get column width.

sheet :

a GtkSheet

column :

column number

Returns :

column width

gtk_sheet_set_column_width ()

void                gtk_sheet_set_column_width          (GtkSheet *sheet,
                                                         gint column,
                                                         guint width);

Set column width.

sheet :

a GtkSheet.

column :

column number.

width :

the width of the column.

gtk_sheet_column_get_justification ()

GtkJustification    gtk_sheet_column_get_justification  (GtkSheet *sheet,
                                                         gint col);

Get the column justification.

sheet :

a GtkSheet.

col :

column number

Returns :

a GtkJustification

gtk_sheet_column_set_justification ()

void                gtk_sheet_column_set_justification  (GtkSheet *sheet,
                                                         gint col,
                                                         GtkJustification just);

Set column justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER). The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the default justification for numbers is GTK_JUSTIFY_RIGHT.

sheet :

a GtkSheet.

col :

column number

just :

a GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER

gtk_sheet_column_get_vjustification ()

GtkSheetVerticalJustification  gtk_sheet_column_get_vjustification
                                                        (GtkSheet *sheet,
                                                         gint col);

Get the vertical cell text justification. This overrides the default vertical cell text justification of the GtkSheet.

sheet :

a GtkSheet.

col :

column number

Returns :

a GtkSheetVerticalJustification

gtk_sheet_column_set_vjustification ()

void                gtk_sheet_column_set_vjustification (GtkSheet *sheet,
                                                         gint col,
                                                         GtkSheetVerticalJustification vjust);

Set vertical cell text jjustification

sheet :

a GtkSheet.

col :

column number

vjust :

a GtkSheetVerticalJustification

gtk_sheet_column_button_get_label ()

const gchar *       gtk_sheet_column_button_get_label   (GtkSheet *sheet,
                                                         gint col);

Get column button label.

sheet :

a GtkSheet.

col :

column number.

Returns :

Column button label.

gtk_sheet_column_button_add_label ()

void                gtk_sheet_column_button_add_label   (GtkSheet *sheet,
                                                         gint col,
                                                         const gchar *label);

Set button label.It is used to set a column title.

sheet :

a GtkSheet

col :

column number

label :

text label

gtk_sheet_column_button_justify ()

void                gtk_sheet_column_button_justify     (GtkSheet *sheet,
                                                         gint col,
                                                         GtkJustification justification);

Set the justification(alignment) of the column buttons.

sheet :

a GtkSheet.

col :

column number

justification :

a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER

gtk_sheet_column_get_tooltip_markup ()

gchar *             gtk_sheet_column_get_tooltip_markup (GtkSheet *sheet,
                                                         const gint col);

Gets the contents of the tooltip (markup) for the column

sheet :

a GtkSheet.

col :

column index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_column_set_tooltip_markup ()

void                gtk_sheet_column_set_tooltip_markup (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *markup);

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.

sheet :

a GtkSheet.

col :

column index

markup :

the contents of the tooltip for widget, or NULL.

gtk_sheet_column_get_tooltip_text ()

gchar *             gtk_sheet_column_get_tooltip_text   (GtkSheet *sheet,
                                                         const gint col);

Gets the contents of the tooltip for the column

sheet :

a GtkSheet.

col :

column index

Returns :

the tooltip text, or NULL. You should free the returned string with g_free() when done.

gtk_sheet_column_set_tooltip_text ()

void                gtk_sheet_column_set_tooltip_text   (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *text);

Sets text as the contents of the tooltip.

sheet :

a GtkSheet.

col :

column index

text :

the contents of the tooltip for widget

gtk_sheet_column_get_datatype ()

gchar *             gtk_sheet_column_get_datatype       (GtkSheet *sheet,
                                                         const gint col);

Gets the column data_type for application use

sheet :

a GtkSheet.

col :

column index

Returns :

the datatype or NULL

gtk_sheet_column_set_datatype ()

void                gtk_sheet_column_set_datatype       (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *data_type);

Sets the column data data_type for application use

sheet :

a GtkSheet.

col :

column index

data_type :

the datatype

gtk_sheet_column_get_description ()

gchar *             gtk_sheet_column_get_description    (GtkSheet *sheet,
                                                         const gint col);

Gets the column description

sheet :

a GtkSheet.

col :

column index

Returns :

the description or NULL, You should free the returned string with g_free() when done.

gtk_sheet_column_set_description ()

void                gtk_sheet_column_set_description    (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *description);

Sets the column description.

sheet :

a GtkSheet.

col :

column index

description :

the description or NULL

gtk_sheet_column_get_format ()

gchar *             gtk_sheet_column_get_format         (GtkSheet *sheet,
                                                         const gint col);

Gets the column data formatting pattern

sheet :

a GtkSheet.

col :

column index

Returns :

the formatting pattern or NULL, You should free the returned string with g_free() when done.

gtk_sheet_column_set_format ()

void                gtk_sheet_column_set_format         (GtkSheet *sheet,
                                                         const gint col,
                                                         const gchar *format);

Sets the column data formatting pattern.

sheet :

a GtkSheet.

col :

column index

format :

the data_format pattern or NULL

gtk_sheet_column_get_iskey ()

gboolean            gtk_sheet_column_get_iskey          (GtkSheet *sheet,
                                                         const gint col);

Gets the column is_key flag

sheet :

a GtkSheet.

col :

column index

Returns :

the is_key flag

gtk_sheet_column_set_iskey ()

void                gtk_sheet_column_set_iskey          (GtkSheet *sheet,
                                                         const gint col,
                                                         const gboolean is_key);

Sets the column is_key flag. This flag has no effect on calculation or presentation, it is reserved for application usage.

sheet :

a GtkSheet.

col :

column index

is_key :

the column is_key flag

gtk_sheet_column_get_entry_type ()

GType               gtk_sheet_column_get_entry_type     (GtkSheet *sheet,
                                                         const gint col);

Gets the column entry type if known

sheet :

a GtkSheet.

col :

column index

Returns :

the entry type or GTK_SHEET_ENTRY_TYPE_DEFAULT

gtk_sheet_column_set_entry_type ()

void                gtk_sheet_column_set_entry_type     (GtkSheet *sheet,
                                                         const gint col,
                                                         const GType entry_type);

Supersedes the sheet entry type for this column. Pass G_TYPE_NONE to reset the column to the sheet entry type.

sheet :

a GtkSheet.

col :

column index

entry_type :

the entry type or G_TYPE_NONE

gtk_sheet_column_get_readonly ()

gboolean            gtk_sheet_column_get_readonly       (GtkSheet *sheet,
                                                         const gint col);

Gets the column readonly flag

sheet :

a GtkSheet.

col :

column index

Returns :

the readonly flag

gtk_sheet_column_set_readonly ()

void                gtk_sheet_column_set_readonly       (GtkSheet *sheet,
                                                         const gint col,
                                                         const gboolean is_readonly);

Sets the column readonly flag. A cell is editable if the sheet is not locked, the column is not readonly and the cell (-range) was set to editable.

sheet :

a GtkSheet.

col :

column index

is_readonly :

the column is_readonly flag

Property Details

The "dataformat" property

  "dataformat"               gchar*                : Read / Write

a formatting string that controls what you see when the widget doesn't contain input focus

Default value: ""


The "datatype" property

  "datatype"                 gchar*                : Read / Write

no functionality, a datatype hint for the application because any widget content is text

Default value: ""


The "description" property

  "description"              gchar*                : Read / Write

Description of column contents

Default value: ""


The "entry-type" property

  "entry-type"               GtkSheetEntryType     : Read / Write

Column cell entry widget type

Default value: GTK_SHEET_ENTRY_TYPE_DEFAULT


The "iskey" property

  "iskey"                    gboolean              : Read / Write

Flag for key columns

Default value: FALSE


The "justification" property

  "justification"            GtkJustification      : Read / Write

Justification of the column

Default value: GTK_JUSTIFY_LEFT


The "label" property

  "label"                    gchar*                : Read / Write

Label of the column button

Default value: ""


The "max-length" property

  "max-length"               gint                  : Read / Write

Maximum number orf characters in this column, Zero if no maximum.

This property is passed to the sheet entry editor. It is supported for the following editors: GtkItemEntry, GtkEntry, GtkDataTextView

Allowed values: [0,1073741823]

Default value: 0

Since 3.0.6


The "max-length-bytes" property

  "max-length-bytes"         gint                  : Read / Write

Set the maximum length in bytes for the GtkDataEntry. For details see gtk_data_entry_set_max_length_bytes.

This property is passed to the sheet entry editor. It is supported for the following editors: GtkItemEntry, GtkDataTextView.

Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled.

Allowed values: [0,1073741823]

Default value: 0

Since 3.0.6


The "position" property

  "position"                 gint                  : Read / Write

The packing position of the column

Allowed values: [0,1024]

Default value: 0


The "readonly" property

  "readonly"                 gboolean              : Read / Write

Lock column contents for editing.

Default value: FALSE


The "visible" property

  "visible"                  gboolean              : Read / Write

Visible property for columns

Default value: FALSE


The "vjust" property

  "vjust"                    GtkSheetVerticalJustification  : Read / Write

Column vertical cell text justification

Default value: GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT


The "width" property

  "width"                    gint                  : Read / Write

Width of the column

Allowed values: [G_MAXULONG,8192]

Default value: -1


The "wrap-mode" property

  "wrap-mode"                GtkWrapMode           : Read / Write

This property is passed to the sheet entry editor. It is supported for the following editors: GtkTextView, GtkDataTextView.

Default value: GTK_WRAP_NONE

Since 3.0.6

gtkextra-3.2.0/docs/reference/html/GtkIconFileSel.html0000644000076400001440000003553312604172532017623 00000000000000 GtkIconFileSel

GtkIconFileSel

GtkIconFileSel — A file selection dialog widget for GTK.

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkIconFileSel

Implemented Interfaces

GtkIconFileSel implements AtkImplementorIface and GtkBuildable.

Description

It is a nice looking file selection dialog using icons. It combines GtkDirTree and GtkFileList to navigate the file system and select files. It has also two entries to select the file and filter.

Details

GtkIconFileSel

typedef struct _GtkIconFileSel GtkIconFileSel;


gtk_icon_file_selection_new ()

GtkWidget*          gtk_icon_file_selection_new         (const gchar *title);

title :

Returns :


gtk_icon_file_selection_construct ()

void                gtk_icon_file_selection_construct   (GtkIconFileSel *filesel,
                                                         const gchar *title);

Sets the window title for GtkIconFileSelection widget.

filesel :

the GtkIconFileSelection widget.

title :

window title.

gtk_icon_file_selection_show_tree ()

void                gtk_icon_file_selection_show_tree   (GtkIconFileSel *filesel,
                                                         gboolean show);

Show icon file selection tree in filesel widget.

filesel :

the GtkIconFileSelection widget.

show :

TRUE(show) or FALSE(don't show).

gtk_icon_file_selection_open_dir ()

gint                gtk_icon_file_selection_open_dir    (GtkIconFileSel *filesel,
                                                         const gchar *path);

Show the file from path directory in filesel widget.

filesel :

the GtkIconFileSelection widget.

path :

directory path.

Returns :

TRUE or FALSE depending on success

gtk_icon_file_selection_show_hidden ()

void                gtk_icon_file_selection_show_hidden (GtkIconFileSel *filesel,
                                                         gboolean visible);

Set the visibility of hidden files.

filesel :

the GtkIconFileSelection widget.

visible :

TRUE(show hidden files) or FALSE(don't show hidden files).

gtk_icon_file_selection_set_filter ()

void                gtk_icon_file_selection_set_filter  (GtkIconFileSel *filesel,
                                                         const gchar *filter);

Set a filter for the files show in filelist.

filesel :

the GtkIconFileSelection widget.

filter :

filter to be applied on files.

gtk_icon_file_selection_get_selection ()

const gchar *       gtk_icon_file_selection_get_selection
                                                        (GtkIconFileSel *filesel);

Gets the current selection applied on GtkIconFileSelection.

filesel :

the GtkIconFileSelection widget.

Returns :

the current selection.
gtkextra-3.2.0/docs/reference/html/GtkPlotCanvasText.html0000644000076400001440000003342112604172532020400 00000000000000 GtkPlotCanvasText

GtkPlotCanvasText

GtkPlotCanvasText

Synopsis


#include <gtkextra.h>

                    GtkPlotCanvasText;
GtkPlotCanvasChild * gtk_plot_canvas_text_new           (const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *real_text);
void                gtk_plot_canvas_text_set_attributes (GtkPlotCanvasText *text,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *real_text);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotCanvasChild
                     +----GtkPlotCanvasText

Properties

  "text"                     gpointer              : Read / Write

Description

FIXME:: need long description

Details

GtkPlotCanvasText

typedef struct _GtkPlotCanvasText GtkPlotCanvasText;

The GtkPlotCanvasText struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_canvas_text_new ()

GtkPlotCanvasChild * gtk_plot_canvas_text_new           (const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *real_text);

font :

height :

angle :

fg :

bg :

transparent :

justification :

real_text :

Returns :


gtk_plot_canvas_text_set_attributes ()

void                gtk_plot_canvas_text_set_attributes (GtkPlotCanvasText *text,
                                                         const gchar *font,
                                                         gint height,
                                                         gint angle,
                                                         const GdkColor *fg,
                                                         const GdkColor *bg,
                                                         gboolean transparent,
                                                         GtkJustification justification,
                                                         const gchar *real_text);

text :

a GtkPlotCanvasText.

font :

height :

angle :

fg :

bg :

transparent :

justification :

real_text :

Property Details

The "text" property

  "text"                     gpointer              : Read / Write

Text Attributes.

gtkextra-3.2.0/docs/reference/html/gtkextra-GtkPSFont.html0000644000076400001440000006121412604172532020462 00000000000000 GtkPSFont

GtkPSFont

GtkPSFont — PostScript Fonts handling.

Synopsis


#include <gtkextra.h>

                    GtkPSFont;
gint                gtk_psfont_init                     ();
void                gtk_psfont_unref                    ();
GtkPSFont*          gtk_psfont_get_by_name              (const gchar *name);
GtkPSFont*          gtk_psfont_get_by_family            (const gchar *family_name,
                                                         gboolean italic,
                                                         gboolean bold);
GdkFont*            gtk_psfont_get_gdkfont              (GtkPSFont *font,
                                                         gint height);
PangoFontDescription* gtk_psfont_get_font_description   (GtkPSFont *font,
                                                         gint height);
const gchar *       gtk_psfont_get_psfontname           (GtkPSFont *psfont);
void                gtk_psfont_add_font                 (const char *fontname,
                                                         const gchar *psname,
                                                         const gchar *family,
                                                         const gchar *pango_description,
                                                         gboolean italic,
                                                         gboolean bold);
void                gtk_psfont_add_i18n_font            (const char *fontname,
                                                         const gchar *psname,
                                                         const gchar *family,
                                                         const gchar *i18n_latinfamily,
                                                         const gchar *pango_description,
                                                         gboolean italic,
                                                         gboolean bold,
                                                         gboolean vertical);
void                gtk_psfont_get_families             (GList **families,
                                                         gint *num_families);
void                gtk_psfont_get_char_size            (GtkPSFont *psfont,
                                                         GdkFont *font,
                                                         GdkFont *latin_font,
                                                         GdkWChar wc,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);

Description

Handles Postscript fonts.

Details

GtkPSFont

typedef struct {
} GtkPSFont;

The GtkPSFont struct contains only private data. It should only be accessed through the functions described below.


gtk_psfont_init ()

gint                gtk_psfont_init                     ();

Returns :


gtk_psfont_unref ()

void                gtk_psfont_unref                    ();

Unref ps fonts.


gtk_psfont_get_by_name ()

GtkPSFont*          gtk_psfont_get_by_name              (const gchar *name);

Get PS Font by font name.

name :

font name

Returns :

(transfer none) a GtkPSFont pointer.

gtk_psfont_get_by_family ()

GtkPSFont*          gtk_psfont_get_by_family            (const gchar *family_name,
                                                         gboolean italic,
                                                         gboolean bold);

Get GtkPSFont by family.

family_name :

font name

italic :

TRUE or FALSE

bold :

TRUE or FALSE

Returns :

(transfer none) the GtkPSFont

gtk_psfont_get_gdkfont ()

GdkFont*            gtk_psfont_get_gdkfont              (GtkPSFont *font,
                                                         gint height);

font :

height :

Returns :


gtk_psfont_get_font_description ()

PangoFontDescription* gtk_psfont_get_font_description   (GtkPSFont *font,
                                                         gint height);

Get a PangoDescriptionFont from PS Font.

font :

a GtkPSFont

height :

font height

Returns :

a PangoFontDescription pointer.

gtk_psfont_get_psfontname ()

const gchar *       gtk_psfont_get_psfontname           (GtkPSFont *psfont);

Get font name from PS Font.

psfont :

a GtkPSFont

Returns :

font name.

gtk_psfont_add_font ()

void                gtk_psfont_add_font                 (const char *fontname,
                                                         const gchar *psname,
                                                         const gchar *family,
                                                         const gchar *pango_description,
                                                         gboolean italic,
                                                         gboolean bold);

Add font in user font list.

fontname :

font name

psname :

PS font name

family :

font family

pango_description :

font Pango description

italic :

TRUE or FALSE

bold :

TRUE or FALSE

gtk_psfont_add_i18n_font ()

void                gtk_psfont_add_i18n_font            (const char *fontname,
                                                         const gchar *psname,
                                                         const gchar *family,
                                                         const gchar *i18n_latinfamily,
                                                         const gchar *pango_description,
                                                         gboolean italic,
                                                         gboolean bold,
                                                         gboolean vertical);

Add international font in user font list.

fontname :

font name

psname :

PS font name

family :

font family

i18n_latinfamily :

International font family

pango_description :

font Pango description

italic :

TRUE or FALSE

bold :

TRUE or FALSE

vertical :

TRUE or FALSE

gtk_psfont_get_families ()

void                gtk_psfont_get_families             (GList **families,
                                                         gint *num_families);

Get GtkPSFont by family.

families :

(element-type gchar*) font families

num_families :

families number

gtk_psfont_get_char_size ()

void                gtk_psfont_get_char_size            (GtkPSFont *psfont,
                                                         GdkFont *font,
                                                         GdkFont *latin_font,
                                                         GdkWChar wc,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);

Get font character size.

psfont :

a GtkPSFont

font :

a GdkFont

latin_font :

a GdkFont

wc :

a GdkWchar

width :

font width

ascent :

font ascent

descent :

font descent
gtkextra-3.2.0/docs/reference/html/gtkbordercombo.jpg0000644000076400001440000002043612604172532017634 00000000000000JFIFHHCreated with The GIMPC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222"U  !1"ASTa2QUV#35s$6Dtu7B%'RbcdqCr$Q1!q2AB ?~ћ'fS=+f٬{'Jӥz#OJvk;ҿFlǹRt]:W"Bӱc?a vtGZaH JU)=`V#P4͐;XxgEo翲sԳAޞ3d=w~;5r^t]}_6NcܧzzW͓X*NJGޞ3d=w~;5r^t];kHFam%kqv$ IO ހSsNc3 a +))[@Y233erZ15EdvusβHdwZL-RSÜámRڝHqp`~;5r_6Ncܬ| 4zۀ͡*PduV R@ Zmn;sX0:3$6SvV(6]_6Ncܪy dE{NB(%)IH_kb@JI*PÒrQiݶ2FO.ai |TueUH3F<mi @; 䫑A6}_6NcܧzzW͓X+!=/PIpuw5\b Xp⧃H{m'l;`,`S4N, %,%D8tW>ɣ%iRƇ՜[mD]xǶmt-݅`-vsOР- pϫFr(ib<(ǎZi'jR0O3yk-+T5- JeֲZH2Ct;񚖟)wlW41 OJvkyi H.mېtJKEH3`XN!Ԩ,FJ8A80 {rZ =bn&BnpV`dyʧIvѹٝ!7<3h&ptTbkj'+oQFs 1ޢjV̶̐uRgZH9OV0<%Lu;{=zHWsty>N;^_}/V%w)} cNpyuWty>\G ,`,#)"p78_]/Yar Vȋu޵&۪5XmJb)(6Tzdtg~yDũfkn,c{/id2?Pw̱>M7cX RA\%tjDRnJeׁ uH)ADhv!^qϮh<q0tQXhV{#eׁe_Su+nJHHE& _2kw̱>o+9:B\9ܮg.7T7ⶖU%>(<}q汀7[Dng$80m ҵ6J n sQHdCu丂BP[P^9{ocIѸMn1Vx>3wSc1؟2پ+Gu荸!A­WHܬՔX#,x͠/%Vpyh"rRM >h-0[Ci*RB@J%J'2x!e%!-הkΫ (,8ھgw۞<9+ J2NImAYAQ$DDJ7b\K[MwGh-o<|`u No7?YZ]k:d bJVD!AO-P$8?esCOLN!m!IRHERF*\Z2#/BtiJV|z'Mv9)5֮Nؤwt껏A>lDrG͗ȓVחm<ǵ"<.zZ%:~HJLwSkZ]py6q$lz˨ևחm<ǵ3}w}6^"O[?c\{^_חdI+3 ɍ]2=VPB$$ڰ x23[M0UilK=:bSn^JtA'-񼦸<6>}<'Zr՜T٩;+Wz9^n IDlZH)O#9'9.Ը~>z3Wn&eE[c^jd <$ Vr<5L~\/{[︧\W@7)G$ fWRx=_l}Kؾ4gKʴ\E5 4m&(H%͏p}<6>zNs=iδ^-8mRRB [w}6^"OSx=_l}K9.+ LM\CLrmo$ߓTqjB}c qIsSKCNtZ0 r6-O -+Cq[L~11cj1!wzcb#0$Far Qx$BHG|˜Axi:OsԢ9td| 'Jtt809cz8zӥ:Z-^dC@s'aih}Nu֖PP!k*rJgYizIHNI*JҾ$7~$Nwyc޾c6˨eÈ5'"Eur8iD"52VAUv9ܶ@j|oTe!D>yF1J灃9BNR3'PiWgHCJy㨽 80NԆrl,HD\}ۨt8'aAkǯV|TTV:NuM%N,g[O4BrHR`.ܜ"#S!mQ`,ky$v 'Jtt809cz8zӥ:Z-^dC@s'a{-?9L`qg窯4'<_QX/=UzS0u'K)[o6Gv1&^w9ijxNGe~)^w9ijxNGe~)^w9ijxNGe~K}cNstXӤ?ƣ!<4>=;#YJ`¾Me|euKjST8͂HJyO.vaqO.+r(yNNOq^qw4;"sMZUEؤt-qRWa\C>3i1ˬ*rrtLtG݀N@ww-ڼ}v*n-HQQa.) rR`sU^'J"!e+%qAXFup36rrtLtG݀N@ww-ڼakJOvJK y gמ]ޘ؈ !\xBF" >/ƕG|˜Axi:OsԢ9td|-re-l!'B׏U$ ;UWҢȵƈYJI\rPVp ͧ#H9dwYnۦ2 -8@R1 kn<$Fmԭₒ* B,PwRםw?;םw?sޕ.5]N5]O.;=阝 kcr IiK97!%E ֐pVՓ-%ee-$DjQ$Y$c^uhTc^uhTޙk5߱IMTXl&SsWxrr 1ךkb6[*C%;JSR:knt _֞-8qwwIh'2o<0 o߉2XwF1wZV* :*gifIj2]SV!)X@ֈQ`IOpc]▶#ʷ p2r^h֞-8qwwIh'2o<0RJ~%?oWޡ#Ppqq7sc8 74!O GS@I^gXڜx'jCw9MMt$"C.>m:J^0c˫j>*liAE&e=';wZ؎'*)#yHwbLJ^xq(q3l`”ZFQtlo&>49Ktlr:W/.N҉Vpèu.ۈPRV)#yh'MTkszlrC*u(He3+I'-.e;g328w)#8]yͭ+J3TYZ ]ܽN6NÌݜ !ΕpYT9.: 6IR@8}B_ѾY,X:"I9p;.GI{ I*'=y.i/g]O--)J,)@)@)@)@)AS&Vh;!#[HRZJP q yk&Ny*Y <WRcԜbOX}᫒mR];-ZB9^u.$$E{Bc3d0&Y>;gMGز}ҳ:m0&Y>;gMGز}ҞiL}ɨONYQ,rtSk?2j>œS~d}'ܭ)Z8z35)qhxz39STԥƊ9SS;OSR*v;OQ:ˌGpagʞ~*uP?f/e\g=j}qg}jTi;CsѝާFwڟz.4TFwڟzg=j}ꚔSMJ6hxz39STԥƊ9SS;OSR*vgtkextra-3.2.0/docs/reference/html/GtkPlotGdk.html0000644000076400001440000001677112604172532017036 00000000000000 GtkPlotGdk

GtkPlotGdk

GtkPlotGdk — GDK drawing backend (mapped to Cairo)

Synopsis


#include <gtkextra.h>

                    GtkPlotGdk;
GtkObject *         gtk_plot_gdk_new                    (GtkWidget *widget);
void                gtk_plot_gdk_construct              (GtkPlotGdk *pc,
                                                         GtkWidget *widget);
void                gtk_plot_gdk_set_drawable           (GtkPlotGdk *gdk,
                                                         GdkDrawable *drawable);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotPC
                     +----GtkPlotGdk

Description

This Subclass of GtkPlotPC has been rewritten to use Cairo drawing routines.

Details

GtkPlotGdk

typedef struct _GtkPlotGdk GtkPlotGdk;

The GtkPlotGdk struct contains only private data. It should only be accessed through the functions described below.


gtk_plot_gdk_new ()

GtkObject *         gtk_plot_gdk_new                    (GtkWidget *widget);

widget :

Returns :


gtk_plot_gdk_construct ()

void                gtk_plot_gdk_construct              (GtkPlotGdk *pc,
                                                         GtkWidget *widget);

pc :

widget :


gtk_plot_gdk_set_drawable ()

void                gtk_plot_gdk_set_drawable           (GtkPlotGdk *gdk,
                                                         GdkDrawable *drawable);

gdk :

drawable :

gtkextra-3.2.0/docs/reference/html/GtkDataEntry.html0000644000076400001440000006744712604172532017373 00000000000000 GtkDataEntry

GtkDataEntry

GtkDataEntry — a data entry widget, based on GtkEntry

Synopsis


#include <gtkextra.h>

                    GtkDataEntry;
GtkDataEntry *      gtk_data_entry_new                  (void);
const gchar *       gtk_data_entry_get_description      (GtkDataEntry *data_entry);
void                gtk_data_entry_set_description      (GtkDataEntry *data_entry,
                                                         const gchar *description);
const gchar *       gtk_data_entry_get_data_type        (GtkDataEntry *data_entry);
void                gtk_data_entry_set_data_type        (GtkDataEntry *data_entry,
                                                         const gchar *data_type);
const gchar *       gtk_data_entry_get_data_format      (GtkDataEntry *data_entry);
void                gtk_data_entry_set_data_format      (GtkDataEntry *data_entry,
                                                         const gchar *data_format);
const gchar *       gtk_data_entry_get_text             (GtkDataEntry *data_entry);
void                gtk_data_entry_set_text             (GtkDataEntry *data_entry,
                                                         const gchar *text);
gint                gtk_data_entry_get_max_length_bytes (GtkDataEntry *data_entry);
void                gtk_data_entry_set_max_length_bytes (GtkDataEntry *data_entry,
                                                         gint max_length_bytes);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkEntry
                           +----GtkDataEntry

Implemented Interfaces

GtkDataEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.

Properties

  "dataformat"               gchar*                : Read / Write
  "datatype"                 gchar*                : Read / Write
  "description"              gchar*                : Read / Write
  "max-length-bytes"         gint                  : Read / Write
  "text"                     gchar*                : Read / Write

Description

GtkDataEntry provides additional properties:

- "description" - no functionality, a place for private information that cannot be put anywhere else

- "datatype" - no functionality, a datatype hint for the application because any widget content is text

- "dataformat" - a formatting instruction that controls what you see when the widget doesn't have input focus

- "text" - set the contents of the widget. if the widget doesn't have input focus text will be formatted according to the data_format

- "max-length-bytes" - set the maximum byte length for the contents of the widget.

The main reason for this widget is to provide a formatting entry widget for numeric data like integer, float, money which also supports NULL values (GtkSpinButton is nice but doesn't support empty field values). Handling of Null values is supported by all SQL database systems. The Null values are represented by empty field contents.

When editing field contents, all data formatting is removed before the focus enters the widget. As soon as the focus leaves the widget, data will be nicely formatted again.

As an additional feature, the minus sign (negative numbers) can be entered at the end of the data. As soon as you leave the field it will be placed properly in front of the number.

See also: gtk_data_format()

Details

GtkDataEntry

typedef struct _GtkDataEntry GtkDataEntry;

The GtkDataEntry struct contains only private data. It should only be accessed through the functions described below.


gtk_data_entry_new ()

GtkDataEntry *      gtk_data_entry_new                  (void);

Creates a new GtkDataEntry Widget.

Returns :

the new GtkDataEntry Widget

gtk_data_entry_get_description ()

const gchar *       gtk_data_entry_get_description      (GtkDataEntry *data_entry);

Retrieves the GtkDataEntry description.

data_entry :

a GtkDataEntry

Returns :

a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

gtk_data_entry_set_description ()

void                gtk_data_entry_set_description      (GtkDataEntry *data_entry,
                                                         const gchar *description);

Sets the GtkDataEntry description.

data_entry :

a GtkDataEntry

description :

the description or NULL

gtk_data_entry_get_data_type ()

const gchar *       gtk_data_entry_get_data_type        (GtkDataEntry *data_entry);

Retrieves the GtkDataEntry data_type.

data_entry :

a GtkDataEntry

Returns :

a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

gtk_data_entry_set_data_type ()

void                gtk_data_entry_set_data_type        (GtkDataEntry *data_entry,
                                                         const gchar *data_type);

Sets the GtkDataEntry data type for application use.

data_entry :

a GtkDataEntry

data_type :

the data type or NULL

gtk_data_entry_get_data_format ()

const gchar *       gtk_data_entry_get_data_format      (GtkDataEntry *data_entry);

Retrieves the GtkDataEntry data_format.

See gtk_data_format() for details.

data_entry :

a GtkDataEntry

Returns :

a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

gtk_data_entry_set_data_format ()

void                gtk_data_entry_set_data_format      (GtkDataEntry *data_entry,
                                                         const gchar *data_format);

Sets the GtkDataEntry data type for application use. The display will not be refreshed upon change.

See gtk_data_format() for details.

data_entry :

a GtkDataEntry

data_format :

the data type or NULL

gtk_data_entry_get_text ()

const gchar *       gtk_data_entry_get_text             (GtkDataEntry *data_entry);

Retrieves the GtkDataEntry contents. All formatting will be removed.

data_entry :

a GtkDataEntry

Returns :

a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored.

gtk_data_entry_set_text ()

void                gtk_data_entry_set_text             (GtkDataEntry *data_entry,
                                                         const gchar *text);

Sets the GtkDataEntry contents. The contents will be formatted due to the current data_format.

data_entry :

a GtkDataEntry

text :

the contents to be set

gtk_data_entry_get_max_length_bytes ()

gint                gtk_data_entry_get_max_length_bytes (GtkDataEntry *data_entry);

Retrieves the maximum byte length for the contents of GtkDataEntry.

data_entry :

a GtkDataEntry

Returns :

maximum byte length or 0.

Since 3.0.6


gtk_data_entry_set_max_length_bytes ()

void                gtk_data_entry_set_max_length_bytes (GtkDataEntry *data_entry,
                                                         gint max_length_bytes);

Sets the maximum byte length for the contents of the GtkDataEntry. Existing content will not be truncted.

data_entry :

a GtkDataEntry

max_length_bytes :

maximum byte length or 0

Since 3.0.6

Property Details

The "dataformat" property

  "dataformat"               gchar*                : Read / Write

a formatting string that controls what you see when the widget doesn't contain input focus.

See gtk_data_format() for details.

Default value: ""


The "datatype" property

  "datatype"                 gchar*                : Read / Write

no functionality, a datatype hint for the application because any widget content is text.

Default value: ""


The "description" property

  "description"              gchar*                : Read / Write

Description of the GtkDataEntry, no functionality, a place for private information that cannot be put anywhere else.

Default value: ""


The "max-length-bytes" property

  "max-length-bytes"         gint                  : Read / Write

Set the maximum length in bytes for the GtkDataEntry. For details see gtk_data_entry_set_max_length_bytes.

Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled.

Allowed values: [0,65535]

Default value: 0

Since 3.0.6


The "text" property

  "text"                     gchar*                : Read / Write

Set the contents of the GtkDataEntry. For details see gtk_data_entry_set_text.

Default value: ""

gtkextra-3.2.0/docs/reference/html/GtkPlotPS.html0000644000076400001440000005520312604172532016644 00000000000000 GtkPlotPS

GtkPlotPS

GtkPlotPS — postscript driver

Synopsis


#include <gtkextra.h>

                    GtkPlotPS;
GtkObject *         gtk_plot_ps_new                     (const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint page_size,
                                                         gdouble scalex,
                                                         gdouble scaley);
GtkObject *         gtk_plot_ps_new_with_size           (const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint units,
                                                         gdouble width,
                                                         gdouble height,
                                                         gdouble scalex,
                                                         gdouble scaley);
void                gtk_plot_ps_construct               (GtkPlotPS *ps,
                                                         const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint page_size,
                                                         gdouble scalex,
                                                         gdouble scaley);
void                gtk_plot_ps_construct_with_size     (GtkPlotPS *ps,
                                                         const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint units,
                                                         gdouble width,
                                                         gdouble height,
                                                         gdouble scalex,
                                                         gdouble scaley);
void                gtk_plot_ps_set_size                (GtkPlotPS *ps,
                                                         gint units,
                                                         gdouble width,
                                                         gdouble height);
void                gtk_plot_ps_set_scale               (GtkPlotPS *ps,
                                                         gdouble scalex,
                                                         gdouble scaley);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotPC
                     +----GtkPlotPS

Description

Subclass of GtkPlotPC used to generate PostScript output.

Details

GtkPlotPS

typedef struct _GtkPlotPS GtkPlotPS;


gtk_plot_ps_new ()

GtkObject *         gtk_plot_ps_new                     (const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint page_size,
                                                         gdouble scalex,
                                                         gdouble scaley);

psname :

orientation :

epsflag :

page_size :

scalex :

scaley :

Returns :

a new GtkObject.

gtk_plot_ps_new_with_size ()

GtkObject *         gtk_plot_ps_new_with_size           (const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint units,
                                                         gdouble width,
                                                         gdouble height,
                                                         gdouble scalex,
                                                         gdouble scaley);

psname :

orientation :

epsflag :

units :

width :

height :

scalex :

scaley :

Returns :

a new GtkObject.

gtk_plot_ps_construct ()

void                gtk_plot_ps_construct               (GtkPlotPS *ps,
                                                         const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint page_size,
                                                         gdouble scalex,
                                                         gdouble scaley);

ps :

a GtkPlotPS

psname :

orientation :

epsflag :

page_size :

scalex :

scaley :


gtk_plot_ps_construct_with_size ()

void                gtk_plot_ps_construct_with_size     (GtkPlotPS *ps,
                                                         const gchar *psname,
                                                         gint orientation,
                                                         gint epsflag,
                                                         gint units,
                                                         gdouble width,
                                                         gdouble height,
                                                         gdouble scalex,
                                                         gdouble scaley);

ps :

a GtkPlotPS

psname :

orientation :

epsflag :

units :

width :

height :

scalex :

scaley :


gtk_plot_ps_set_size ()

void                gtk_plot_ps_set_size                (GtkPlotPS *ps,
                                                         gint units,
                                                         gdouble width,
                                                         gdouble height);

ps :

a GtkPlotPS

units :

width :

height :


gtk_plot_ps_set_scale ()

void                gtk_plot_ps_set_scale               (GtkPlotPS *ps,
                                                         gdouble scalex,
                                                         gdouble scaley);

ps :

a GtkPlotPS

scalex :

scaley :

gtkextra-3.2.0/docs/reference/html/GtkPlotDT.html0000644000076400001440000003410212604172532016624 00000000000000 GtkPlotDT

GtkPlotDT

GtkPlotDT

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotDT

Description

FIXME:: Need long description.

Details

GtkPlotDT

typedef struct _GtkPlotDT GtkPlotDT;


GtkPlotDTnode

typedef struct {
} GtkPlotDTnode;

The GtkPlotDTnode struct contains only private data. It should only be accessed through the functions described below.


GtkPlotDTsegment

typedef struct _GtkPlotDTsegment GtkPlotDTsegment;


GtkPlotDTtriangle

typedef struct {
} GtkPlotDTtriangle;

The GtkPlotDTtriangle struct contains only private data. It should only be accessed through the functions described below.


GtkPlotDTprogressbarFunc ()

gint                (*GtkPlotDTprogressbarFunc)         (double progress);

progress :

Returns :


gtk_plot_dt_new ()

GtkObject*          gtk_plot_dt_new                     (gint num);

num :

Returns :


gtk_plot_dt_set_quadrilateral ()

void                gtk_plot_dt_set_quadrilateral       (GtkPlotDT *dt,
                                                         gboolean set);

dt :

set :


gtk_plot_dt_set_subsampling ()

void                gtk_plot_dt_set_subsampling         (GtkPlotDT *dt,
                                                         gboolean set);

dt :

set :


gtk_plot_dt_add_node ()

gboolean            gtk_plot_dt_add_node                (GtkPlotDT *data,
                                                         GtkPlotDTnode node);

data :

node :

Returns :


gtk_plot_dt_get_node ()

GtkPlotDTnode *     gtk_plot_dt_get_node                (GtkPlotDT *data,
                                                         gint idx);

data :

idx :

Returns :

(transfer none) the GtkPlotDTnode

gtk_plot_dt_triangulate ()

gboolean            gtk_plot_dt_triangulate             (GtkPlotDT *data);

data :

Returns :


gtk_plot_dt_clear ()

void                gtk_plot_dt_clear                   (GtkPlotDT *data);

data :

gtkextra-3.2.0/docs/reference/html/index.sgml0000644000076400001440000045776412604172532016144 00000000000000 gtkextra-3.2.0/docs/reference/html/GtkPlotBar.html0000644000076400001440000002752112604172532017030 00000000000000 GtkPlotBar

GtkPlotBar

GtkPlotBar — 3d scientific plots widget for GTK.

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotBar

Implemented Interfaces

GtkPlotBar implements AtkImplementorIface and GtkBuildable.

Properties

  "orientation"              GtkOrientation        : Read / Write
  "width"                    gdouble               : Read / Write

Description

FIXME:: Need long description.

Details

GtkPlotBar

typedef struct _GtkPlotBar GtkPlotBar;

The GtkPlotBar struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotBarUnits

typedef enum
{
  GTK_PLOT_BAR_POINTS,
  GTK_PLOT_BAR_RELATIVE,
  GTK_PLOT_BAR_ABSOLUTE,
} GtkPlotBarUnits;


gtk_plot_bar_new ()

GtkWidget*          gtk_plot_bar_new                    (GtkOrientation orientation);

Create a new GtkPlotBar widget.

orientation :

GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL.

Returns :

a new GtkWidget.

gtk_plot_bar_construct ()

void                gtk_plot_bar_construct              (GtkPlotBar *bar,
                                                         GtkOrientation orientation);

Initializes a GtkPlotBar structure.

bar :

a GtkPlotBar widget.

orientation :

GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL.

gtk_plot_bar_set_width ()

void                gtk_plot_bar_set_width              (GtkPlotBar *bar,
                                                         gdouble width);

Set the width of a GtkPlotBar widget.

bar :

a GtkPlotBar widget.

width :

widget width.

gtk_plot_bar_get_width ()

gdouble             gtk_plot_bar_get_width              (GtkPlotBar *bar);

Set the width of a GtkPlotBar widget.

bar :

a GtkPlotBar widget.

Returns :

widget width.

Property Details

The "orientation" property

  "orientation"              GtkOrientation        : Read / Write

Orientation.

Default value: GTK_ORIENTATION_HORIZONTAL


The "width" property

  "width"                    gdouble               : Read / Write

Width.

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/GtkFontCombo.html0000644000076400001440000004335012604172532017351 00000000000000 GtkFontCombo

GtkFontCombo

GtkFontCombo — A font combo widget for GTK.

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkToolbar
                                 +----GtkFontCombo

Implemented Interfaces

GtkFontCombo implements AtkImplementorIface, GtkBuildable, GtkToolShell and GtkOrientable.

Signals

  "changed"                                        : Run Last

Description

It is a GtkToolBar subclass with two combos to select among the 35 standard Adobe PostScript fonts with different sizes. It has also two buttons to select bold and italics. When you select a new font, it returns the name of the corresponding Postscript font and the equivalent Xfont. This is what we all expect to have on the top of a GUI for a spreadsheet or word processor.

Details

GtkFontCombo

typedef struct _GtkFontCombo GtkFontCombo;

The GtkFontCombo struct contains only private data. It should only be accessed through the functions described below.


gtk_font_combo_new ()

GtkWidget *         gtk_font_combo_new                  (void);

Returns :


gtk_font_combo_select ()

void                gtk_font_combo_select               (GtkFontCombo *font_combo,
                                                         const gchar *family,
                                                         gboolean bold,
                                                         gboolean italic,
                                                         gint height);

Select from the combo a font which satisfies the arguments.

font_combo :

a GtkFontCombo

family :

font family

bold :

TRUE or FALSE

italic :

TRUE or FALSE

height :

height of the font

gtk_font_combo_select_nth ()

void                gtk_font_combo_select_nth           (GtkFontCombo *font_combo,
                                                         gint n,
                                                         gboolean bold,
                                                         gboolean italic,
                                                         gint height);

Select from the combo the nth font which satisfies the arguments.

font_combo :

a GtkFontCombo

n :

nth font

bold :

TRUE or FALSE

italic :

TRUE or FALSE

height :

height of the font

gtk_font_combo_get_font_height ()

gint                gtk_font_combo_get_font_height      (GtkFontCombo *font_combo);

font_combo :

Returns :


gtk_font_combo_get_psfont ()

GtkPSFont *         gtk_font_combo_get_psfont           (GtkFontCombo *font_combo);

font_combo :

the GtkFontCombo

Returns :

(transfer none) the GtkPSFont

gtk_font_combo_get_font_description ()

PangoFontDescription * gtk_font_combo_get_font_description
                                                        (GtkFontCombo *font_combo);

font_combo :

Returns :


gtk_font_combo_get_gdkfont ()

GdkFont *           gtk_font_combo_get_gdkfont          (GtkFontCombo *font_combo);

font_combo :

Returns :

Signal Details

The "changed" signal

void                user_function                      (GtkFontCombo *bfont_combo,
                                                        gpointer      user_data)        : Run Last

Emmited whenever a different font is choosed.

bfont_combo :

the GtkFontCombo object that received the signal.

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/GtkDirTree.html0000644000076400001440000001722212604172532017020 00000000000000 GtkDirTree

GtkDirTree

GtkDirTree — A directory tree widget for GTK.

Synopsis


#include <gtkextra.h>

                    GtkDirTree;
                    GtkDirTreeNode;
GtkWidget*          gtk_dir_tree_new                    (void);
gint                gtk_dir_tree_open_dir               (GtkDirTree *dir_tree,
                                                         const gchar *path);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkCList
                                 +----GtkCTree
                                       +----GtkDirTree

Implemented Interfaces

GtkDirTree implements AtkImplementorIface and GtkBuildable.

Description

It is a GtkCTree subclass that allows you to navigate the file-system.

Details

GtkDirTree

typedef struct _GtkDirTree GtkDirTree;

The GtkDirTree struct contains only private data. It should only be accessed through the functions described below.


GtkDirTreeNode

typedef struct {
  gboolean scanned;
  gchar *path;
} GtkDirTreeNode;


gtk_dir_tree_new ()

GtkWidget*          gtk_dir_tree_new                    (void);

Returns :


gtk_dir_tree_open_dir ()

gint                gtk_dir_tree_open_dir               (GtkDirTree *dir_tree,
                                                         const gchar *path);

Open files from directory path in dir_tree widget.

dir_tree :

GtkDirTree widget.

path :

gchar path to the dir to be opened.

Returns :

TRUE(succes) or FALSE(failure).
gtkextra-3.2.0/docs/reference/html/GtkPlotCanvasPlot.html0000644000076400001440000002613012604172532020371 00000000000000 GtkPlotCanvasPlot

GtkPlotCanvasPlot

GtkPlotCanvasPlot

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotCanvasChild
                     +----GtkPlotCanvasPlot

Description

A GtkPlotCanvas object is an interactive container for GtkPlots and some graphic primitives that can be used to illustrate the plots (see GtkCanvasChild).

Details

GtkPlotCanvasPlot

typedef struct _GtkPlotCanvasPlot GtkPlotCanvasPlot;

The GtkPlotBar struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotCanvasPlotFlags

typedef enum
{
      GTK_PLOT_CANVAS_PLOT_SELECT_POINT  =       1 << 0, /* Select point */
      GTK_PLOT_CANVAS_PLOT_DND_POINT     =       1 << 1, /* DnD point */
} GtkPlotCanvasPlotFlags;

Selection and DND mode of GtkPlotCanvas

GTK_PLOT_CANVAS_PLOT_SELECT_POINT

Select point

GTK_PLOT_CANVAS_PLOT_DND_POINT

DnD point

enum GtkPlotCanvasPlotPos

typedef enum
{
  GTK_PLOT_CANVAS_PLOT_OUT,
  GTK_PLOT_CANVAS_PLOT_IN_PLOT,
  GTK_PLOT_CANVAS_PLOT_IN_LEGENDS,
  GTK_PLOT_CANVAS_PLOT_IN_TITLE,
  GTK_PLOT_CANVAS_PLOT_IN_AXIS,
  GTK_PLOT_CANVAS_PLOT_IN_DATA,
  GTK_PLOT_CANVAS_PLOT_IN_GRADIENT,
  GTK_PLOT_CANVAS_PLOT_IN_MARKER,
} GtkPlotCanvasPlotPos;


gtk_plot_canvas_plot_new ()

GtkPlotCanvasChild * gtk_plot_canvas_plot_new           (GtkPlot *plot);

plot :

a GtkPlot.

Returns :


gtk_plot_canvas_plot_flags ()

GtkPlotCanvasPlotFlags  gtk_plot_canvas_plot_flags      (GtkPlotCanvasPlot *plot);

plot :

Returns :


gtk_plot_canvas_plot_set_flags ()

void                gtk_plot_canvas_plot_set_flags      (GtkPlotCanvasPlot *plot,
                                                         GtkPlotCanvasPlotFlags flags);

plot :

flags :


gtk_plot_canvas_plot_unset_flags ()

void                gtk_plot_canvas_plot_unset_flags    (GtkPlotCanvasPlot *plot,
                                                         GtkPlotCanvasPlotFlags flags);

plot :

flags :

gtkextra-3.2.0/docs/reference/html/gtkextra-GtkPlotCanvasLine.html0000644000076400001440000002727712604172532022206 00000000000000 GtkPlotCanvasLine

GtkPlotCanvasLine

GtkPlotCanvasLine

Description

FIXME:: need long description

Details

GtkPlotCanvasLine

typedef struct {
} GtkPlotCanvasLine;

The GtkPlotCanvasLine struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotCanvasArrow

typedef enum
{
      GTK_PLOT_CANVAS_ARROW_NONE            = 0,
      GTK_PLOT_CANVAS_ARROW_ORIGIN          = 1 << 0,
      GTK_PLOT_CANVAS_ARROW_END             = 1 << 1
} GtkPlotCanvasArrow;


gtk_plot_canvas_line_new ()

GtkPlotCanvasChild * gtk_plot_canvas_line_new           (GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color,
                                                         GtkPlotCanvasArrow arrow_mask);

style :

width :

color :

arrow_mask :

Returns :


gtk_plot_canvas_line_set_attributes ()

void                gtk_plot_canvas_line_set_attributes (GtkPlotCanvasLine *line,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

line :

a GtkPlotCanvasLine widget.

style :

width :

color :


gtk_plot_canvas_line_set_arrow ()

void                gtk_plot_canvas_line_set_arrow      (GtkPlotCanvasLine *line,
                                                         GtkPlotSymbolStyle style,
                                                         gfloat width,
                                                         gfloat length,
                                                         GtkPlotCanvasArrow mask);

line :

a GtkPlotCanvasLine widget.

style :

width :

length :

mask :

gtkextra-3.2.0/docs/reference/html/GtkPlotCSurface.html0000644000076400001440000007416112604172532020021 00000000000000 GtkPlotCSurface

GtkPlotCSurface

GtkPlotCSurface

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkPlotData
                           +----GtkPlotSurface
                                 +----GtkPlotCSurface

Implemented Interfaces

GtkPlotCSurface implements AtkImplementorIface and GtkBuildable.

Properties

  "levels-color"             gpointer              : Read / Write
  "levels-style"             gint                  : Read / Write
  "levels-width"             gdouble               : Read / Write
  "lines-visible"            gint                  : Read / Write
  "projection"               gint                  : Read / Write
  "sublevels-color"          gpointer              : Read / Write
  "sublevels-style"          gint                  : Read / Write
  "sublevels-width"          gdouble               : Read / Write

Description

FIXME:: need long description

Details

GtkPlotCSurface

typedef struct _GtkPlotCSurface GtkPlotCSurface;

The GtkPlotCSurface struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotProjection

typedef enum
{
  GTK_PLOT_PROJECT_NONE,  /* draw surface with no projections */
  GTK_PLOT_PROJECT_EMPTY, /* draw empty contours -- lines only.
                             Notice that the style of the lines is given by
                             levels/sublevels_line. You should set to 
                             GTK_PLOT_LINE_NONE if you don't want the lines
                             drawn */
  GTK_PLOT_PROJECT_FULL,  /* draw filled contours */
} GtkPlotProjection;      


gtk_plot_csurface_new ()

GtkWidget*          gtk_plot_csurface_new               (void);

Returns :


gtk_plot_csurface_new_function ()

GtkWidget*          gtk_plot_csurface_new_function      (GtkPlotFunc3D function);

function :

a GtkPlotFunc3D. scope async.

Returns :


gtk_plot_csurface_construct_function ()

void                gtk_plot_csurface_construct_function
                                                        (GtkPlotCSurface *csurface,
                                                         GtkPlotFunc3D function);

csurface :

function :

a GtkPlotFunc3D. scope async.

gtk_plot_csurface_set_lines_visible ()

void                gtk_plot_csurface_set_lines_visible (GtkPlotCSurface *csurface,
                                                         gboolean visible);

csurface :

a GtkPlotCSurface/

visible :


gtk_plot_csurface_get_lines_visible ()

gboolean            gtk_plot_csurface_get_lines_visible (GtkPlotCSurface *csurface);

csurface :

a GtkPlotCSurface.

Returns :


gtk_plot_csurface_set_projection ()

void                gtk_plot_csurface_set_projection    (GtkPlotCSurface *csurface,
                                                         GtkPlotProjection proj);

csurface :

a GtkPlotCSurface.

proj :


gtk_plot_csurface_projection ()

GtkPlotProjection   gtk_plot_csurface_projection        (GtkPlotCSurface *csurface);

csurface :

a GtkPlotCSurface.

Returns :


gtk_plot_csurface_set_levels_attributes ()

void                gtk_plot_csurface_set_levels_attributes
                                                        (GtkPlotCSurface *dataset,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

dataset :

a GtkPlotCSurface.

style :

width :

color :


gtk_plot_csurface_set_sublevels_attributes ()

void                gtk_plot_csurface_set_sublevels_attributes
                                                        (GtkPlotCSurface *dataset,
                                                         GtkPlotLineStyle style,
                                                         gfloat width,
                                                         const GdkColor *color);

dataset :

a GtkPlotCSurface.

style :

width :

color :


gtk_plot_csurface_get_levels_attributes ()

void                gtk_plot_csurface_get_levels_attributes
                                                        (GtkPlotCSurface *dataset,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);

dataset :

a GtkPlotCSurface.

style :

width :

color :


gtk_plot_csurface_get_sublevels_attributes ()

void                gtk_plot_csurface_get_sublevels_attributes
                                                        (GtkPlotCSurface *dataset,
                                                         GtkPlotLineStyle *style,
                                                         gfloat *width,
                                                         GdkColor *color);

dataset :

a GtkPlotCSurface.

style :

width :

color :

Property Details

The "levels-color" property

  "levels-color"             gpointer              : Read / Write


The "levels-style" property

  "levels-style"             gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "levels-width" property

  "levels-width"             gdouble               : Read / Write

Allowed values: >= 0

Default value: 0


The "lines-visible" property

  "lines-visible"            gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "projection" property

  "projection"               gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "sublevels-color" property

  "sublevels-color"          gpointer              : Read / Write


The "sublevels-style" property

  "sublevels-style"          gint                  : Read / Write

Allowed values: >= 0

Default value: 0


The "sublevels-width" property

  "sublevels-width"          gdouble               : Read / Write

Allowed values: >= 0

Default value: 0

gtkextra-3.2.0/docs/reference/html/GtkPlotCanvas.html0000644000076400001440000024271612604172532017544 00000000000000 GtkPlotCanvas

GtkPlotCanvas

GtkPlotCanvas

Synopsis


#include <gtkextra.h>

                    GtkPlotCanvas;
enum                GtkPlotCanvasFlags;
enum                GtkPlotCanvasAction;
enum                GtkPlotCanvasFlag;
enum                GtkPlotCanvasSelection;
enum                GtkPlotCanvasSelectionMode;
enum                GtkPlotCanvasPos;
                    GtkPlotCanvasChild;
enum                GtkPlotCanvasChildFlags;
GtkWidget*          gtk_plot_canvas_new                 (gint width,
                                                         gint height,
                                                         gdouble magnification);
void                gtk_plot_canvas_construct           (GtkPlotCanvas *canvas,
                                                         gint width,
                                                         gint height,
                                                         gdouble magnification);
GtkPlotCanvasFlags  gtk_plot_canvas_flags               (GtkPlotCanvas *canvas);
void                gtk_plot_canvas_set_flags           (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasFlags flags);
void                gtk_plot_canvas_unset_flags         (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasFlags flags);
void                gtk_plot_canvas_set_pc              (GtkPlotCanvas *canvas,
                                                         GtkPlotPC *pc);
void                gtk_plot_canvas_paint               (GtkPlotCanvas *canvas);
void                gtk_plot_canvas_refresh             (GtkPlotCanvas *canvas);
void                gtk_plot_canvas_freeze              (GtkPlotCanvas *canvas);
void                gtk_plot_canvas_thaw                (GtkPlotCanvas *canvas);
void                gtk_plot_canvas_grid_set_visible    (GtkPlotCanvas *canvas,
                                                         gboolean visible);
void                gtk_plot_canvas_grid_set_step       (GtkPlotCanvas *canvas,
                                                         gdouble step);
void                gtk_plot_canvas_grid_set_attributes (GtkPlotCanvas *canvas,
                                                         GtkPlotLineStyle style,
                                                         gint width,
                                                         const GdkColor *color);
void                gtk_plot_canvas_cancel_action       (GtkPlotCanvas *plot_canvas);
void                gtk_plot_canvas_unselect            (GtkPlotCanvas *plot_canvas);
GtkPlotCanvasChild * gtk_plot_canvas_get_active_item    (GtkPlotCanvas *canvas);
void                gtk_plot_canvas_set_size            (GtkPlotCanvas *canvas,
                                                         gint width,
                                                         gint height);
void                gtk_plot_canvas_set_magnification   (GtkPlotCanvas *canvas,
                                                         gdouble magnification);
void                gtk_plot_canvas_set_transparent     (GtkPlotCanvas *canvas,
                                                         gboolean transparent);
gboolean            gtk_plot_canvas_transparent         (GtkPlotCanvas *canvas);
void                gtk_plot_canvas_set_background      (GtkPlotCanvas *canvas,
                                                         const GdkColor *bg_color);
void                gtk_plot_canvas_get_pixel           (GtkPlotCanvas *canvas,
                                                         gdouble px,
                                                         gdouble py,
                                                         gint *x,
                                                         gint *y);
void                gtk_plot_canvas_get_position        (GtkPlotCanvas *plot_canvas,
                                                         gint x,
                                                         gint y,
                                                         gdouble *px,
                                                         gdouble *py);
void                gtk_plot_canvas_put_child           (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);
void                gtk_plot_canvas_remove_child        (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child);
void                gtk_plot_canvas_child_move          (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         gdouble x1,
                                                         gdouble y1);
void                gtk_plot_canvas_child_move_resize   (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);
void                gtk_plot_canvas_child_set_selection (GtkPlotCanvasChild *child,
                                                         GtkPlotCanvasSelection selection);
void                gtk_plot_canvas_child_set_selection_mode
                                                        (GtkPlotCanvasChild *child,
                                                         GtkPlotCanvasSelectionMode mode);
gboolean            gtk_plot_canvas_child_get_position  (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         double *x1,
                                                         double *y1,
                                                         double *x2,
                                                         double *y2);
void                gtk_plot_canvas_set_line_attributes (GtkPlotCanvas *canvas,
                                                         GtkPlotLine line);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkFixed
                                 +----GtkPlotCanvas
  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkPlotCanvasChild
                     +----GtkPlotCanvasEllipse
                     +----GtkPlotCanvasPixmap
                     +----GtkPlotCanvasPlot
                     +----GtkPlotCanvasRectangle
                     +----GtkPlotCanvasText

Implemented Interfaces

GtkPlotCanvas implements AtkImplementorIface and GtkBuildable.

Properties

  "color-bg"                 gpointer              : Read / Write
  "flags"                    gint                  : Read / Write
  "grid-step"                gdouble               : Read / Write
  "height"                   gint                  : Read / Write
  "line-grid"                gpointer              : Read / Write
  "magnification"            gdouble               : Read / Write
  "show-grid"                gboolean              : Read / Write
  "transparent"              gboolean              : Read / Write
  "width"                    gint                  : Read / Write

Signals

  "add-item"                                       : Run Last
  "changed"                                        : Run Last
  "delete-item"                                    : Run Last
  "move-item"                                      : Run Last
  "resize-item"                                    : Run Last
  "select-item"                                    : Run Last
  "select-region"                                  : Run Last

Description

FIXME:: need long description.

Details

GtkPlotCanvas

typedef struct _GtkPlotCanvas GtkPlotCanvas;

The GtkPlotCanvas struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotCanvasFlags

typedef enum
{
      GTK_PLOT_CANVAS_CAN_SELECT	=	1 << 0,
      GTK_PLOT_CANVAS_CAN_SELECT_ITEM	=	1 << 1,
      GTK_PLOT_CANVAS_CAN_DND		=	1 << 2,
} GtkPlotCanvasFlags;

Selection and DND mode of GtkPlotCanvas

GTK_PLOT_CANVAS_CAN_SELECT

Select region

GTK_PLOT_CANVAS_CAN_SELECT_ITEM

Select items

GTK_PLOT_CANVAS_CAN_DND

DnD items

enum GtkPlotCanvasAction

typedef enum
{
      GTK_PLOT_CANVAS_ACTION_INACTIVE,
      GTK_PLOT_CANVAS_ACTION_SELECTION,
      GTK_PLOT_CANVAS_ACTION_DRAG,
      GTK_PLOT_CANVAS_ACTION_RESIZE,
} GtkPlotCanvasAction;


enum GtkPlotCanvasFlag

typedef enum
{
      GTK_PLOT_CANVAS_FROZEN            = 0,
      GTK_PLOT_CANVAS_CAN_MOVE          = 1 << 0,
      GTK_PLOT_CANVAS_CAN_RESIZE	= 1 << 1,
} GtkPlotCanvasFlag;

Warning

GtkPlotCanvasFlag has been deprecated since version 3.1.6 and should not be used in newly-written code. use GtkPlotCanvasChildFlags

Deprecated, Used for GtkPlotCanvasChild. Use GtkPlotCanvasChildFlags instead.

GTK_PLOT_CANVAS_FROZEN

Child is frozen

GTK_PLOT_CANVAS_CAN_MOVE

Child can be moved

GTK_PLOT_CANVAS_CAN_RESIZE

Child can be resized

enum GtkPlotCanvasSelection

typedef enum
{
      GTK_PLOT_CANVAS_SELECT_NONE,    
      GTK_PLOT_CANVAS_SELECT_MARKERS,
      GTK_PLOT_CANVAS_SELECT_TARGET,
} GtkPlotCanvasSelection;


enum GtkPlotCanvasSelectionMode

typedef enum
{
      GTK_PLOT_CANVAS_SELECT_CLICK_1,    
      GTK_PLOT_CANVAS_SELECT_CLICK_2,
} GtkPlotCanvasSelectionMode;


enum GtkPlotCanvasPos

typedef enum
{
      GTK_PLOT_CANVAS_OUT,
      GTK_PLOT_CANVAS_IN,
      GTK_PLOT_CANVAS_LEFT,
      GTK_PLOT_CANVAS_RIGHT,
      GTK_PLOT_CANVAS_TOP,
      GTK_PLOT_CANVAS_BOTTOM,
      GTK_PLOT_CANVAS_TOP_LEFT,
      GTK_PLOT_CANVAS_TOP_RIGHT,
      GTK_PLOT_CANVAS_BOTTOM_LEFT,
      GTK_PLOT_CANVAS_BOTTOM_RIGHT,
} GtkPlotCanvasPos;


GtkPlotCanvasChild

typedef struct _GtkPlotCanvasChild GtkPlotCanvasChild;

The GtkPlotCanvasChild struct contains only private data. It should only be accessed through the functions described below.


enum GtkPlotCanvasChildFlags

typedef enum
{
      GTK_PLOT_CANVAS_CHILD_FROZEN            = 0,
      GTK_PLOT_CANVAS_CHILD_CAN_MOVE          = 1 << 0,
      GTK_PLOT_CANVAS_CHILD_CAN_RESIZE	= 1 << 1,
} GtkPlotCanvasChildFlags;

move/resize-mode of GtkPlotCanvasChild

GTK_PLOT_CANVAS_CHILD_FROZEN

Child is frozen

GTK_PLOT_CANVAS_CHILD_CAN_MOVE

Child can be moved

GTK_PLOT_CANVAS_CHILD_CAN_RESIZE

Child can be resized

gtk_plot_canvas_new ()

GtkWidget*          gtk_plot_canvas_new                 (gint width,
                                                         gint height,
                                                         gdouble magnification);

width :

height :

magnification :

Returns :


gtk_plot_canvas_construct ()

void                gtk_plot_canvas_construct           (GtkPlotCanvas *canvas,
                                                         gint width,
                                                         gint height,
                                                         gdouble magnification);

canvas :

a GtkPlotCanvas.

width :

height :

magnification :


gtk_plot_canvas_flags ()

GtkPlotCanvasFlags  gtk_plot_canvas_flags               (GtkPlotCanvas *canvas);

canvas :

Returns :


gtk_plot_canvas_set_flags ()

void                gtk_plot_canvas_set_flags           (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasFlags flags);

canvas :

flags :


gtk_plot_canvas_unset_flags ()

void                gtk_plot_canvas_unset_flags         (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasFlags flags);

canvas :

flags :


gtk_plot_canvas_set_pc ()

void                gtk_plot_canvas_set_pc              (GtkPlotCanvas *canvas,
                                                         GtkPlotPC *pc);

canvas :

pc :


gtk_plot_canvas_paint ()

void                gtk_plot_canvas_paint               (GtkPlotCanvas *canvas);

canvas :

a GtkPlotCanvas.

gtk_plot_canvas_refresh ()

void                gtk_plot_canvas_refresh             (GtkPlotCanvas *canvas);

canvas :

a GtkPlotCanvas.

gtk_plot_canvas_freeze ()

void                gtk_plot_canvas_freeze              (GtkPlotCanvas *canvas);

canvas :

a GtkPlotCanvas.

gtk_plot_canvas_thaw ()

void                gtk_plot_canvas_thaw                (GtkPlotCanvas *canvas);

canvas :

a GtkPlotCanvas.

gtk_plot_canvas_grid_set_visible ()

void                gtk_plot_canvas_grid_set_visible    (GtkPlotCanvas *canvas,
                                                         gboolean visible);

canvas :

a GtkPlotCanvas.

visible :


gtk_plot_canvas_grid_set_step ()

void                gtk_plot_canvas_grid_set_step       (GtkPlotCanvas *canvas,
                                                         gdouble step);

canvas :

a GtkPlotCanvas.

step :


gtk_plot_canvas_grid_set_attributes ()

void                gtk_plot_canvas_grid_set_attributes (GtkPlotCanvas *canvas,
                                                         GtkPlotLineStyle style,
                                                         gint width,
                                                         const GdkColor *color);

canvas :

a GtkPlotCanvas.

style :

width :

color :


gtk_plot_canvas_cancel_action ()

void                gtk_plot_canvas_cancel_action       (GtkPlotCanvas *plot_canvas);

plot_canvas :

a GtkPlotCanvas.

gtk_plot_canvas_unselect ()

void                gtk_plot_canvas_unselect            (GtkPlotCanvas *plot_canvas);

plot_canvas :

a GtkPlotCanvas.

gtk_plot_canvas_get_active_item ()

GtkPlotCanvasChild * gtk_plot_canvas_get_active_item    (GtkPlotCanvas *canvas);

canvas :

a GtkPlotCanvas.

Returns :

the active GtkPlotCanvasChild. transfer none.

gtk_plot_canvas_set_size ()

void                gtk_plot_canvas_set_size            (GtkPlotCanvas *canvas,
                                                         gint width,
                                                         gint height);

canvas :

width :

height :


gtk_plot_canvas_set_magnification ()

void                gtk_plot_canvas_set_magnification   (GtkPlotCanvas *canvas,
                                                         gdouble magnification);

canvas :

a GtkPlotCanvas.

magnification :


gtk_plot_canvas_set_transparent ()

void                gtk_plot_canvas_set_transparent     (GtkPlotCanvas *canvas,
                                                         gboolean transparent);

canvas :

a GtkPlotCanvas.

transparent :


gtk_plot_canvas_transparent ()

gboolean            gtk_plot_canvas_transparent         (GtkPlotCanvas *canvas);

canvas :

Returns :


gtk_plot_canvas_set_background ()

void                gtk_plot_canvas_set_background      (GtkPlotCanvas *canvas,
                                                         const GdkColor *bg_color);

canvas :

a GtkPlotCanvas.

bg_color :

a GdkColor.

gtk_plot_canvas_get_pixel ()

void                gtk_plot_canvas_get_pixel           (GtkPlotCanvas *canvas,
                                                         gdouble px,
                                                         gdouble py,
                                                         gint *x,
                                                         gint *y);

canvas :

a GtkPlotCanvas.

px :

py :

x :

y :


gtk_plot_canvas_get_position ()

void                gtk_plot_canvas_get_position        (GtkPlotCanvas *plot_canvas,
                                                         gint x,
                                                         gint y,
                                                         gdouble *px,
                                                         gdouble *py);

plot_canvas :

a GtkPlotCanvas.

x :

y :

px :

py :


gtk_plot_canvas_put_child ()

void                gtk_plot_canvas_put_child           (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);

canvas :

a GtkPlotCanvas.

child :

x1 :

y1 :

x2 :

y2 :


gtk_plot_canvas_remove_child ()

void                gtk_plot_canvas_remove_child        (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child);

canvas :

a GtkPlotCanvas.

child :

a GtkPlotCanvasChild

gtk_plot_canvas_child_move ()

void                gtk_plot_canvas_child_move          (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         gdouble x1,
                                                         gdouble y1);

canvas :

a GtkPlotCanvas.

child :

a GtkPlotCanvasChild

x1 :

y1 :


gtk_plot_canvas_child_move_resize ()

void                gtk_plot_canvas_child_move_resize   (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         gdouble x1,
                                                         gdouble y1,
                                                         gdouble x2,
                                                         gdouble y2);

canvas :

a GtkPlotCanvas.

child :

x1 :

y1 :

x2 :

y2 :


gtk_plot_canvas_child_set_selection ()

void                gtk_plot_canvas_child_set_selection (GtkPlotCanvasChild *child,
                                                         GtkPlotCanvasSelection selection);

child :

selection :


gtk_plot_canvas_child_set_selection_mode ()

void                gtk_plot_canvas_child_set_selection_mode
                                                        (GtkPlotCanvasChild *child,
                                                         GtkPlotCanvasSelectionMode mode);

child :

a GtkPlotCanvasChild.

mode :


gtk_plot_canvas_child_get_position ()

gboolean            gtk_plot_canvas_child_get_position  (GtkPlotCanvas *canvas,
                                                         GtkPlotCanvasChild *child,
                                                         double *x1,
                                                         double *y1,
                                                         double *x2,
                                                         double *y2);

canvas :

a GtkPlotCanvas.

child :

a GtkPlotCanvasChild.

x1 :

y1 :

x2 :

y2 :

Returns :


gtk_plot_canvas_set_line_attributes ()

void                gtk_plot_canvas_set_line_attributes (GtkPlotCanvas *canvas,
                                                         GtkPlotLine line);

canvas :

a GtkPlotCanvas.

line :

Property Details

The "color-bg" property

  "color-bg"                 gpointer              : Read / Write

Background color.


The "flags" property

  "flags"                    gint                  : Read / Write

PlotCanvas flags control selection and DND, see GtkPlotCanvasFlags.

Allowed values: >= 0

Default value: 0


The "grid-step" property

  "grid-step"                gdouble               : Read / Write

Distance between grid lines.

Allowed values: >= 0

Default value: 0


The "height" property

  "height"                   gint                  : Read / Write

PlotCanvas height in pixels.

Allowed values: >= 0

Default value: 1


The "line-grid" property

  "line-grid"                gpointer              : Read / Write

Canvas line grid.


The "magnification" property

  "magnification"            gdouble               : Read / Write

PlotCanvas magnification factor

Allowed values: >= 0

Default value: 1


The "show-grid" property

  "show-grid"                gboolean              : Read / Write

Show grid.

Default value: FALSE


The "transparent" property

  "transparent"              gboolean              : Read / Write

Canvas transparency

Default value: TRUE


The "width" property

  "width"                    gint                  : Read / Write

PlotCanvas width in pixels.

Allowed values: >= 0

Default value: 1

Signal Details

The "add-item" signal

void                user_function                      (GtkPlotCanvas      *plotcanvas,
                                                        GtkPlotCanvasChild *arg1,
                                                        gpointer            user_data)       : Run Last

plotcanvas :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "changed" signal

void                user_function                      (GtkPlotCanvas *canvas,
                                                        gpointer       user_data)      : Run Last

canvas :

user_data :

user data set when the signal handler was connected.

The "delete-item" signal

gboolean            user_function                      (GtkPlotCanvas      *plotcanvas,
                                                        GtkPlotCanvasChild *arg1,
                                                        gpointer            user_data)       : Run Last

plotcanvas :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

Returns :


The "move-item" signal

gboolean            user_function                      (GtkPlotCanvas      *plotcanvas,
                                                        GtkPlotCanvasChild *arg1,
                                                        gdouble             arg2,
                                                        gdouble             arg3,
                                                        gpointer            user_data)       : Run Last

plotcanvas :

the object which received the signal.

arg1 :

arg2 :

arg3 :

user_data :

user data set when the signal handler was connected.

Returns :


The "resize-item" signal

gboolean            user_function                      (GtkPlotCanvas      *plotcanvas,
                                                        GtkPlotCanvasChild *arg1,
                                                        gdouble             arg2,
                                                        gdouble             arg3,
                                                        gpointer            user_data)       : Run Last

plotcanvas :

the object which received the signal.

arg1 :

arg2 :

arg3 :

user_data :

user data set when the signal handler was connected.

Returns :


The "select-item" signal

gboolean            user_function                      (GtkPlotCanvas      *plotcanvas,
                                                        GdkEvent           *event,
                                                        GtkPlotCanvasChild *arg1,
                                                        gpointer            user_data)       : Run Last

plotcanvas :

the object which received the signal.

event :

arg1 :

user_data :

user data set when the signal handler was connected.

Returns :


The "select-region" signal

void                user_function                      (GtkPlotCanvas *plotcanvas,
                                                        gdouble        arg1,
                                                        gdouble        arg2,
                                                        gdouble        arg3,
                                                        gdouble        arg4,
                                                        gpointer       user_data)       : Run Last

plotcanvas :

the object which received the signal.

arg1 :

arg2 :

arg3 :

arg4 :

user_data :

user data set when the signal handler was connected.
gtkextra-3.2.0/docs/reference/html/GtkCharSelection.html0000644000076400001440000002120012604172532020174 00000000000000 GtkCharSelection

GtkCharSelection

GtkCharSelection — Character selection dialog

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkCharSelection

Implemented Interfaces

GtkCharSelection implements AtkImplementorIface and GtkBuildable.

Description

Char selection is a widget which contains all the characters in a font. Connecting a callback to the ok button of the widget you get the selected char.

Details

GtkCharSelection

typedef struct _GtkCharSelection GtkCharSelection;

The GtkCharSelection struct contains only private data. It should only be accessed through the functions described below.


gtk_char_selection_new ()

GtkWidget*          gtk_char_selection_new              (void);

Returns :


gtk_char_selection_set_selection ()

void                gtk_char_selection_set_selection    (GtkCharSelection *charsel,
                                                         gint selection);

Sets the selection for the GtkCharSelection widget.

charsel :

Char Selection widget.

selection :

a character index from the list. 0 is left,upper corner;256 is right, down corner.

gtk_char_selection_get_selection ()

gint                gtk_char_selection_get_selection    (GtkCharSelection *charsel);

Gets the current selection

charsel :

Char Selection widget.

Returns :

The current selection(a character from the list).0 is left,upper corner;256 is right, down corner.
gtkextra-3.2.0/docs/reference/html/gtkextra.devhelp20000644000076400001440000046200212604172532017412 00000000000000 gtkextra-3.2.0/docs/reference/html/compiling.html0000644000076400001440000000774312604172532017004 00000000000000 Compiling GtkExtra Applications

Compiling GtkExtra Applications

Compiling GtkExtra Applications — How to compile your GtkExtra+ application

Compiling GtkExtra Applications on UNIX

To compile a GtkExtra application, you need to tell the compiler where to find the GtkExtra header files and libraries. This is done with the pkg-config utility.

The following interactive shell session demonstrates how pkg-config is used (the actual output on your system may be different):

$ pkg-config --cflags gtkextra-3.0 
-Iusr/include/gtkextra-3.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1  
$ pkg-config --libs gtkextra-3.0
-lgtkextra-x11-3.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  

The simplest way to compile a program is to use the "backticks" feature of the shell. If you enclose a command in backticks (not single quotes), then its output will be substituted into the command line before execution. So to compile a GtkExtra program, you would type the following:

$ cc `pkg-config --cflags --libs gtkextra-3.0` hello.c -o hello

The recommended way of using GtkExtra has always been to only include the toplevel headers gtkextra.h.

gtkextra-3.2.0/docs/reference/version.xml0000644000076400001440000000000212603754176015366 000000000000003 gtkextra-3.2.0/docs/reference/gtkextra.types0000644000076400001440000000212112604172532016071 00000000000000#include gtk_border_combo_get_type gtk_char_selection_get_type gtk_check_item_get_type gtk_color_combo_get_type gtk_combo_button_get_type gtk_data_entry_get_type gtk_data_text_view_get_type gtk_dir_tree_get_type gtk_file_list_get_type gtk_font_combo_get_type gtk_icon_file_selection_get_type gtk_icon_list_get_type gtk_item_entry_get_type gtk_plot3d_get_type gtk_plot_array_get_type gtk_plot_bar_get_type gtk_plot_box_get_type gtk_plot_bubble_get_type gtk_plot_get_type gtk_plot_cairo_get_type gtk_plot_candle_get_type gtk_plot_canvas_get_type gtk_plot_canvas_ellipse_get_type gtk_plot_canvas_pixmap_get_type gtk_plot_canvas_plot_get_type gtk_plot_canvas_rectangle_get_type gtk_plot_canvas_text_get_type gtk_plot_csurface_get_type gtk_plot_data_get_type gtk_plot_dt_get_type gtk_plot_flux_get_type gtk_plot_gdk_get_type gtk_plot_pc_get_type gtk_plot_pixmap_get_type gtk_plot_polar_get_type gtk_plot_ps_get_type gtk_plot_segment_get_type gtk_plot_surface_get_type gtk_sheet_get_type gtk_sheet_column_get_type gtk_sheet_range_get_type gtk_toggle_combo_get_type gtk_plot_marker_get_type gtkextra-3.2.0/docs/reference/xml/0000755000076400001440000000000012604172532014036 500000000000000gtkextra-3.2.0/docs/reference/xml/api-index-3.0.6.xml0000644000076400001440000000712512604172532017025 00000000000000 ]> G GtkDataEntry:max-length-bytes GtkDataTextView:description GtkDataTextView:max-length GtkDataTextView:max-length-bytes GtkSheetColumn:max-length GtkSheetColumn:max-length-bytes GtkSheetColumn:wrap-mode gtk_data_entry_get_max_length_bytes gtk_data_entry_set_max_length_bytes gtk_data_text_view_get_description gtk_data_text_view_get_max_length gtk_data_text_view_get_max_length_bytes gtk_data_text_view_new gtk_data_text_view_set_description gtk_data_text_view_set_max_length gtk_data_text_view_set_max_length_bytes gtk_item_entry_get_max_length_bytes gtk_item_entry_set_max_length_bytes gtkextra-3.2.0/docs/reference/xml/gtkplotflux.xml0000644000076400001440000005710212604172532017070 00000000000000 ]> GtkPlotFlux 3 GTKEXTRA Library GtkPlotFlux Synopsis #include <gtkextra.h> GtkPlotFlux; GtkWidget* gtk_plot_flux_new (void); void gtk_plot_flux_set_arrow (GtkPlotFlux *flux, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style); void gtk_plot_flux_get_arrow (GtkPlotFlux *flux, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style); void gtk_plot_flux_center (GtkPlotFlux *flux, gboolean center); gboolean gtk_plot_flux_is_centered (GtkPlotFlux *flux); void gtk_plot_flux_show_scale (GtkPlotFlux *flux, gboolean show); void gtk_plot_flux_set_scale_max (GtkPlotFlux *flux, gdouble scale_max); void gtk_plot_flux_set_size_max (GtkPlotFlux *flux, guint size_max); void gtk_plot_flux_set_labels_precision (GtkPlotFlux *flux, gint precision); void gtk_plot_flux_set_labels_style (GtkPlotFlux *flux, GtkPlotLabelStyle style); void gtk_plot_flux_set_labels_prefix (GtkPlotFlux *flux, const gchar *prefix); void gtk_plot_flux_set_labels_suffix (GtkPlotFlux *flux, const gchar *suffix); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotFlux Implemented Interfaces GtkPlotFlux implements AtkImplementorIface and GtkBuildable. Properties "centered" gboolean : Read / Write "labels-precision" gint : Read / Write "labels-prefix" gchar* : Read / Write "labels-style" gint : Read / Write "labels-suffix" gchar* : Read / Write "length" gint : Read / Write "scale-max" gdouble : Read / Write "show-scale" gboolean : Read / Write "size-max" gint : Read / Write "style" gint : Read / Write "width" gint : Read / Write Description FIXME:: Need long description. Details GtkPlotFlux GtkPlotFluxtypedef struct _GtkPlotFlux GtkPlotFlux; The GtkPlotFlux struct contains only private data. It should only be accessed through the functions described below. gtk_plot_flux_new () gtk_plot_flux_newGtkWidget* gtk_plot_flux_new (void); Returns : gtk_plot_flux_set_arrow () gtk_plot_flux_set_arrowvoid gtk_plot_flux_set_arrow (GtkPlotFlux *flux, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style); flux : arrow_length : arrow_width : arrow_style : gtk_plot_flux_get_arrow () gtk_plot_flux_get_arrowvoid gtk_plot_flux_get_arrow (GtkPlotFlux *flux, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style); flux : arrow_length : arrow_width : arrow_style : gtk_plot_flux_center () gtk_plot_flux_centervoid gtk_plot_flux_center (GtkPlotFlux *flux, gboolean center); flux : center : gtk_plot_flux_is_centered () gtk_plot_flux_is_centeredgboolean gtk_plot_flux_is_centered (GtkPlotFlux *flux); flux : Returns : gtk_plot_flux_show_scale () gtk_plot_flux_show_scalevoid gtk_plot_flux_show_scale (GtkPlotFlux *flux, gboolean show); flux : show : gtk_plot_flux_set_scale_max () gtk_plot_flux_set_scale_maxvoid gtk_plot_flux_set_scale_max (GtkPlotFlux *flux, gdouble scale_max); flux : scale_max : gtk_plot_flux_set_size_max () gtk_plot_flux_set_size_maxvoid gtk_plot_flux_set_size_max (GtkPlotFlux *flux, guint size_max); flux : size_max : gtk_plot_flux_set_labels_precision () gtk_plot_flux_set_labels_precisionvoid gtk_plot_flux_set_labels_precision (GtkPlotFlux *flux, gint precision); flux : precision : gtk_plot_flux_set_labels_style () gtk_plot_flux_set_labels_stylevoid gtk_plot_flux_set_labels_style (GtkPlotFlux *flux, GtkPlotLabelStyle style); flux : style : gtk_plot_flux_set_labels_prefix () gtk_plot_flux_set_labels_prefixvoid gtk_plot_flux_set_labels_prefix (GtkPlotFlux *flux, const gchar *prefix); flux : prefix : gtk_plot_flux_set_labels_suffix () gtk_plot_flux_set_labels_suffixvoid gtk_plot_flux_set_labels_suffix (GtkPlotFlux *flux, const gchar *suffix); flux : suffix : Property Details The <literal>"centered"</literal> property GtkPlotFlux:centered "centered" gboolean : Read / Write Default value: FALSE The <literal>"labels-precision"</literal> property GtkPlotFlux:labels-precision "labels-precision" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-prefix"</literal> property GtkPlotFlux:labels-prefix "labels-prefix" gchar* : Read / Write Default value: NULL The <literal>"labels-style"</literal> property GtkPlotFlux:labels-style "labels-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-suffix"</literal> property GtkPlotFlux:labels-suffix "labels-suffix" gchar* : Read / Write Default value: NULL The <literal>"length"</literal> property GtkPlotFlux:length "length" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"scale-max"</literal> property GtkPlotFlux:scale-max "scale-max" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"show-scale"</literal> property GtkPlotFlux:show-scale "show-scale" gboolean : Read / Write Default value: FALSE The <literal>"size-max"</literal> property GtkPlotFlux:size-max "size-max" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"style"</literal> property GtkPlotFlux:style "style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"width"</literal> property GtkPlotFlux:width "width" gint : Read / Write Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkplotbar.xml0000644000076400001440000002151512604172532016655 00000000000000 ]> GtkPlotBar 3 GTKEXTRA Library GtkPlotBar 3d scientific plots widget for GTK. Synopsis #include <gtkextra.h> GtkPlotBar; enum GtkPlotBarUnits; GtkWidget* gtk_plot_bar_new (GtkOrientation orientation); void gtk_plot_bar_construct (GtkPlotBar *bar, GtkOrientation orientation); void gtk_plot_bar_set_width (GtkPlotBar *bar, gdouble width); gdouble gtk_plot_bar_get_width (GtkPlotBar *bar); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotBar Implemented Interfaces GtkPlotBar implements AtkImplementorIface and GtkBuildable. Properties "orientation" GtkOrientation : Read / Write "width" gdouble : Read / Write Description FIXME:: Need long description. Details GtkPlotBar GtkPlotBartypedef struct _GtkPlotBar GtkPlotBar; The GtkPlotBar struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotBarUnits GtkPlotBarUnitstypedef enum { GTK_PLOT_BAR_POINTS, GTK_PLOT_BAR_RELATIVE, GTK_PLOT_BAR_ABSOLUTE, } GtkPlotBarUnits; gtk_plot_bar_new () gtk_plot_bar_newGtkWidget* gtk_plot_bar_new (GtkOrientation orientation); Create a new GtkPlotBar widget. orientation : GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. Returns : a new GtkWidget. gtk_plot_bar_construct () gtk_plot_bar_constructvoid gtk_plot_bar_construct (GtkPlotBar *bar, GtkOrientation orientation); Initializes a GtkPlotBar structure. bar : a GtkPlotBar widget. orientation : GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. gtk_plot_bar_set_width () gtk_plot_bar_set_widthvoid gtk_plot_bar_set_width (GtkPlotBar *bar, gdouble width); Set the width of a GtkPlotBar widget. bar : a GtkPlotBar widget. width : widget width. gtk_plot_bar_get_width () gtk_plot_bar_get_widthgdouble gtk_plot_bar_get_width (GtkPlotBar *bar); Set the width of a GtkPlotBar widget. bar : a GtkPlotBar widget. Returns : widget width. Property Details The <literal>"orientation"</literal> property GtkPlotBar:orientation "orientation" GtkOrientation : Read / Write Orientation.Default value: GTK_ORIENTATION_HORIZONTAL The <literal>"width"</literal> property GtkPlotBar:width "width" gdouble : Read / Write Width.Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkplotarray.xml0000644000076400001440000011100112604172532017215 00000000000000 ]> GtkPlotArray 3 GTKEXTRA Library GtkPlotArray Synopsis #include <gtkextra.h> GtkPlotArray; GtkPlotArrayList; GObject* gtk_plot_array_new (const gchar *name, gpointer array, gint size, GType type, gboolean own_data); void gtk_plot_array_set (GtkPlotArray *array, gpointer data_array, gint size, GType type); void gtk_plot_array_set_label (GtkPlotArray *array, const gchar *label); void gtk_plot_array_set_description (GtkPlotArray *array, const gchar *desc); void gtk_plot_array_set_scale (GtkPlotArray *array, gdouble scale); void gtk_plot_array_set_required (GtkPlotArray *array, gboolean required); void gtk_plot_array_set_independent (GtkPlotArray *array, gboolean independent); GType gtk_plot_array_get_data_type (GtkPlotArray *array); const gchar * gtk_plot_array_get_name (GtkPlotArray *array); const gchar * gtk_plot_array_get_label (GtkPlotArray *array); const gchar * gtk_plot_array_get_description (GtkPlotArray *array); gboolean gtk_plot_array_required (GtkPlotArray *array); gboolean gtk_plot_array_independent (GtkPlotArray *array); gdouble gtk_plot_array_get_scale (GtkPlotArray *array); gint gtk_plot_array_get_size (GtkPlotArray *array); gfloat* gtk_plot_array_get_float (GtkPlotArray *array); gdouble* gtk_plot_array_get_double (GtkPlotArray *array); gint* gtk_plot_array_get_int (GtkPlotArray *array); gboolean* gtk_plot_array_get_bool (GtkPlotArray *array); gchar** gtk_plot_array_get_string (GtkPlotArray *array); gpointer* gtk_plot_array_get_pointer (GtkPlotArray *array); void gtk_plot_array_free (GtkPlotArray *array); GObject* gtk_plot_array_list_new (void); void gtk_plot_array_list_add (GtkPlotArrayList *set, GtkPlotArray *array); void gtk_plot_array_list_remove (GtkPlotArrayList *set, GtkPlotArray *array); GtkPlotArray* gtk_plot_array_list_get (GtkPlotArrayList *set, const gchar *name); void gtk_plot_array_list_clear (GtkPlotArrayList *set); Object Hierarchy GObject +----GtkPlotArray Properties "array-data" gpointer : Read / Write "description" gchar* : Read / Write "independent" gboolean : Read / Write "label" gchar* : Read / Write "name" gchar* : Read / Write "own-data" gboolean : Read / Write "required" gboolean : Read / Write "scale" gdouble : Read / Write "size" gint : Read / Write "type" gint : Read / Write Description Details GtkPlotArray GtkPlotArraytypedef struct _GtkPlotArray GtkPlotArray; The GtkPlotArray struct contains only private data. It should only be accessed through the functions described below. GtkPlotArrayList GtkPlotArrayListtypedef struct { } GtkPlotArrayList; The GtkPlotArrayList struct contains only private data. It should only be accessed through the functions described below. gtk_plot_array_new () gtk_plot_array_newGObject* gtk_plot_array_new (const gchar *name, gpointer array, gint size, GType type, gboolean own_data); name : array : size : type : own_data : Returns : gtk_plot_array_set () gtk_plot_array_setvoid gtk_plot_array_set (GtkPlotArray *array, gpointer data_array, gint size, GType type); array : data_array : size : type : gtk_plot_array_set_label () gtk_plot_array_set_labelvoid gtk_plot_array_set_label (GtkPlotArray *array, const gchar *label); array : label : gtk_plot_array_set_description () gtk_plot_array_set_descriptionvoid gtk_plot_array_set_description (GtkPlotArray *array, const gchar *desc); array : desc : gtk_plot_array_set_scale () gtk_plot_array_set_scalevoid gtk_plot_array_set_scale (GtkPlotArray *array, gdouble scale); array : scale : gtk_plot_array_set_required () gtk_plot_array_set_requiredvoid gtk_plot_array_set_required (GtkPlotArray *array, gboolean required); array : required : gtk_plot_array_set_independent () gtk_plot_array_set_independentvoid gtk_plot_array_set_independent (GtkPlotArray *array, gboolean independent); array : independent : gtk_plot_array_get_data_type () gtk_plot_array_get_data_typeGType gtk_plot_array_get_data_type (GtkPlotArray *array); array : Returns : gtk_plot_array_get_name () gtk_plot_array_get_nameconst gchar * gtk_plot_array_get_name (GtkPlotArray *array); array : Returns : gtk_plot_array_get_label () gtk_plot_array_get_labelconst gchar * gtk_plot_array_get_label (GtkPlotArray *array); array : Returns : gtk_plot_array_get_description () gtk_plot_array_get_descriptionconst gchar * gtk_plot_array_get_description (GtkPlotArray *array); array : Returns : gtk_plot_array_required () gtk_plot_array_requiredgboolean gtk_plot_array_required (GtkPlotArray *array); array : Returns : gtk_plot_array_independent () gtk_plot_array_independentgboolean gtk_plot_array_independent (GtkPlotArray *array); array : Returns : gtk_plot_array_get_scale () gtk_plot_array_get_scalegdouble gtk_plot_array_get_scale (GtkPlotArray *array); array : Returns : gtk_plot_array_get_size () gtk_plot_array_get_sizegint gtk_plot_array_get_size (GtkPlotArray *array); array : Returns : gtk_plot_array_get_float () gtk_plot_array_get_floatgfloat* gtk_plot_array_get_float (GtkPlotArray *array); array : Returns : gtk_plot_array_get_double () gtk_plot_array_get_doublegdouble* gtk_plot_array_get_double (GtkPlotArray *array); array : Returns : gtk_plot_array_get_int () gtk_plot_array_get_intgint* gtk_plot_array_get_int (GtkPlotArray *array); array : Returns : gtk_plot_array_get_bool () gtk_plot_array_get_boolgboolean* gtk_plot_array_get_bool (GtkPlotArray *array); array : Returns : gtk_plot_array_get_string () gtk_plot_array_get_stringgchar** gtk_plot_array_get_string (GtkPlotArray *array); array : the GtkPlotArray Returns : (transfer none) the data string array gtk_plot_array_get_pointer () gtk_plot_array_get_pointergpointer* gtk_plot_array_get_pointer (GtkPlotArray *array); array : the GtkPlotArray Returns : (transfer none) the data pointer array gtk_plot_array_free () gtk_plot_array_freevoid gtk_plot_array_free (GtkPlotArray *array); array : gtk_plot_array_list_new () gtk_plot_array_list_newGObject* gtk_plot_array_list_new (void); Returns : gtk_plot_array_list_add () gtk_plot_array_list_addvoid gtk_plot_array_list_add (GtkPlotArrayList *set, GtkPlotArray *array); set : array : gtk_plot_array_list_remove () gtk_plot_array_list_removevoid gtk_plot_array_list_remove (GtkPlotArrayList *set, GtkPlotArray *array); set : array : gtk_plot_array_list_get () gtk_plot_array_list_getGtkPlotArray* gtk_plot_array_list_get (GtkPlotArrayList *set, const gchar *name); set : a GtkPlotArrayList name : the name to be searched for Returns : (transfer none) the named GtkPlotArray or NULL gtk_plot_array_list_clear () gtk_plot_array_list_clearvoid gtk_plot_array_list_clear (GtkPlotArrayList *set); set : Property Details The <literal>"array-data"</literal> property GtkPlotArray:array-data "array-data" gpointer : Read / Write Data. The <literal>"description"</literal> property GtkPlotArray:description "description" gchar* : Read / Write Description.Default value: NULL The <literal>"independent"</literal> property GtkPlotArray:independent "independent" gboolean : Read / Write Independent.Default value: FALSE The <literal>"label"</literal> property GtkPlotArray:label "label" gchar* : Read / Write Label.Default value: NULL The <literal>"name"</literal> property GtkPlotArray:name "name" gchar* : Read / Write Name.Default value: NULL The <literal>"own-data"</literal> property GtkPlotArray:own-data "own-data" gboolean : Read / Write Specifies if data should be freed when the array is destroyed.Default value: FALSE The <literal>"required"</literal> property GtkPlotArray:required "required" gboolean : Read / Write Required.Default value: FALSE The <literal>"scale"</literal> property GtkPlotArray:scale "scale" gdouble : Read / Write Scale.Allowed values: >= 0 Default value: 1 The <literal>"size"</literal> property GtkPlotArray:size "size" gint : Read / Write Size.Allowed values: >= 0 Default value: 0 The <literal>"type"</literal> property GtkPlotArray:type "type" gint : Read / Write Type.Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/annotation-glossary.xml0000644000076400001440000000243712604172532020521 00000000000000 ]> Annotation Glossary O out Parameter for returning results. Default is transfer-full. T transfer type S scope gtkextra-3.2.0/docs/reference/xml/version.xml0000644000076400001440000000000212604172532016155 000000000000003 gtkextra-3.2.0/docs/reference/xml/gtkcolorcombo.xml0000644000076400001440000003744612604172532017362 00000000000000 ]> GtkColorCombo 3 GTKEXTRA Library GtkColorCombo A color combo widget for GTK. Synopsis #include <gtkextra.h> GtkColorCombo; GtkWidget * gtk_color_combo_new (void); GtkWidget * gtk_color_combo_new_with_values (gint nrows, gint ncols, GdkColor *colors); void gtk_color_combo_construct (GtkColorCombo *color_combo); void gtk_color_combo_construct_with_values (GtkColorCombo *color_combo, gint nrows, gint ncols, GdkColor *colors); GdkColor gtk_color_combo_get_color_at (GtkColorCombo *color_combo, gint row, gint col); void gtk_color_combo_find_color (GtkColorCombo *color_combo, GdkColor *color, gint *row, gint *col); GdkColor gtk_color_combo_get_selection (GtkColorCombo *combo); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----GtkComboButton +----GtkColorCombo Implemented Interfaces GtkColorCombo implements AtkImplementorIface, GtkBuildable and GtkOrientable. Signals "changed" : Run First Description A GtkColorCombo is a GtkCOmbo which contains all kinds of colors. Details GtkColorCombo GtkColorCombotypedef struct _GtkColorCombo GtkColorCombo; The GtkColorCombo struct contains only private data. It should only be accessed through the functions described below. gtk_color_combo_new () gtk_color_combo_newGtkWidget * gtk_color_combo_new (void); Returns : gtk_color_combo_new_with_values () gtk_color_combo_new_with_valuesGtkWidget * gtk_color_combo_new_with_values (gint nrows, gint ncols, GdkColor *colors); Creates a new GtkColorCombo widget having nrows rows and ncols columns with GdkColor color. nrows : number of rows in GtkColorCombo. ncols : number of columns in GtkColorCombo. colors : GdkColor color. Returns : the newly-created GtkColorCombo widget. gtk_color_combo_construct () gtk_color_combo_constructvoid gtk_color_combo_construct (GtkColorCombo *color_combo); Initialize a GtkColorCombo object. color_combo : the GtkColorCombo widget. gtk_color_combo_construct_with_values () gtk_color_combo_construct_with_valuesvoid gtk_color_combo_construct_with_values (GtkColorCombo *color_combo, gint nrows, gint ncols, GdkColor *colors); Initialize a GtkColorCombo object with specified values. color_combo : the GtkColorCombo widget. nrows : number of rows in GtkColorCombo. ncols : number of columns in GtkColorCombo. colors : GdkColor color. gtk_color_combo_get_color_at () gtk_color_combo_get_color_atGdkColor gtk_color_combo_get_color_at (GtkColorCombo *color_combo, gint row, gint col); Get the color in the combo at the specified row,column. color_combo : a GtkColorCombo widget. row : row number in GtkColorCombo. col : column number in GtkColorCombo. Returns : a GdkColor at row,col in color_combo gtk_color_combo_find_color () gtk_color_combo_find_colorvoid gtk_color_combo_find_color (GtkColorCombo *color_combo, GdkColor *color, gint *row, gint *col); Find the best match for a given color. color_combo : a GtkColorCombo widget. color : a GdkColor object. row : row number in GtkColorCombo. col : column number in GtkColorCombo. gtk_color_combo_get_selection () gtk_color_combo_get_selectionGdkColor gtk_color_combo_get_selection (GtkColorCombo *combo); Get the color in the combo at selection . combo : a GtkColorCombo widget. Returns : a GdkColor of the selection. Signal Details The <literal>"changed"</literal> signal GtkColorCombo::changedvoid user_function (GtkColorCombo *colorcombo, gint arg1, GdkColor *arg2, gpointer user_data) : Run First colorcombo : the object which received the signal. arg1 : arg2 : user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtkdirtree.xml0000644000076400001440000001202712604172532016646 00000000000000 ]> GtkDirTree 3 GTKEXTRA Library GtkDirTree A directory tree widget for GTK. Synopsis #include <gtkextra.h> GtkDirTree; GtkDirTreeNode; GtkWidget* gtk_dir_tree_new (void); gint gtk_dir_tree_open_dir (GtkDirTree *dir_tree, const gchar *path); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkCList +----GtkCTree +----GtkDirTree Implemented Interfaces GtkDirTree implements AtkImplementorIface and GtkBuildable. Description It is a GtkCTree subclass that allows you to navigate the file-system. Details GtkDirTree GtkDirTreetypedef struct _GtkDirTree GtkDirTree; The GtkDirTree struct contains only private data. It should only be accessed through the functions described below. GtkDirTreeNode GtkDirTreeNodetypedef struct { gboolean scanned; gchar *path; } GtkDirTreeNode; gtk_dir_tree_new () gtk_dir_tree_newGtkWidget* gtk_dir_tree_new (void); Returns : gtk_dir_tree_open_dir () gtk_dir_tree_open_dirgint gtk_dir_tree_open_dir (GtkDirTree *dir_tree, const gchar *path); Open files from directory path in dir_tree widget. dir_tree : GtkDirTree widget. path : gchar path to the dir to be opened. Returns : TRUE(succes) or FALSE(failure). gtkextra-3.2.0/docs/reference/xml/gtkplotcanvasline.xml0000644000076400001440000002062312604172532020233 00000000000000 ]> GtkPlotCanvasLine 3 GTKEXTRA Library GtkPlotCanvasLine Synopsis #include <gtkextra.h> GtkPlotCanvasLine; enum GtkPlotCanvasArrow; GtkPlotCanvasChild * gtk_plot_canvas_line_new (GtkPlotLineStyle style, gfloat width, const GdkColor *color, GtkPlotCanvasArrow arrow_mask); void gtk_plot_canvas_line_set_attributes (GtkPlotCanvasLine *line, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_canvas_line_set_arrow (GtkPlotCanvasLine *line, GtkPlotSymbolStyle style, gfloat width, gfloat length, GtkPlotCanvasArrow mask); Description FIXME:: need long description Details GtkPlotCanvasLine GtkPlotCanvasLinetypedef struct { } GtkPlotCanvasLine; The GtkPlotCanvasLine struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotCanvasArrow GtkPlotCanvasArrowtypedef enum { GTK_PLOT_CANVAS_ARROW_NONE = 0, GTK_PLOT_CANVAS_ARROW_ORIGIN = 1 << 0, GTK_PLOT_CANVAS_ARROW_END = 1 << 1 } GtkPlotCanvasArrow; gtk_plot_canvas_line_new () gtk_plot_canvas_line_newGtkPlotCanvasChild * gtk_plot_canvas_line_new (GtkPlotLineStyle style, gfloat width, const GdkColor *color, GtkPlotCanvasArrow arrow_mask); style : width : color : arrow_mask : Returns : gtk_plot_canvas_line_set_attributes () gtk_plot_canvas_line_set_attributesvoid gtk_plot_canvas_line_set_attributes (GtkPlotCanvasLine *line, GtkPlotLineStyle style, gfloat width, const GdkColor *color); line : a GtkPlotCanvasLine widget. style : width : color : gtk_plot_canvas_line_set_arrow () gtk_plot_canvas_line_set_arrowvoid gtk_plot_canvas_line_set_arrow (GtkPlotCanvasLine *line, GtkPlotSymbolStyle style, gfloat width, gfloat length, GtkPlotCanvasArrow mask); line : a GtkPlotCanvasLine widget. style : width : length : mask : gtkextra-3.2.0/docs/reference/xml/api-index-3.0.2.xml0000644000076400001440000000133512604172532017016 00000000000000 ]> G GtkSheet::move-cursor gtk_sheet_set_tab_direction gtkextra-3.2.0/docs/reference/xml/gtkplotsegment.xml0000644000076400001440000004416412604172532017560 00000000000000 ]> GtkPlotSegment 3 GTKEXTRA Library GtkPlotSegment Synopsis #include <gtkextra.h> GtkPlotSegment; enum GtkPlotArrow; GtkWidget* gtk_plot_segment_new (void); void gtk_plot_segment_set_relative (GtkPlotSegment *segment, gboolean set); gboolean gtk_plot_segment_relative (GtkPlotSegment *segment); void gtk_plot_segment_set_arrow (GtkPlotSegment *segment, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style); void gtk_plot_segment_get_arrow (GtkPlotSegment *segment, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style); void gtk_plot_segment_set_arrow_mask (GtkPlotSegment *segment, GtkPlotArrow mask); guint gtk_plot_segment_get_arrow_mask (GtkPlotSegment *segment); void gtk_plot_segment_center (GtkPlotSegment *segment, gboolean center); gboolean gtk_plot_segment_is_centered (GtkPlotSegment *segment); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotSegment Implemented Interfaces GtkPlotSegment implements AtkImplementorIface and GtkBuildable. Properties "arrow-mask" gint : Read / Write "centered" gboolean : Read / Write "length" gint : Read / Write "relative" gboolean : Read / Write "style" gint : Read / Write "width" gint : Read / Write Description FIXME:: need long description Details GtkPlotSegment GtkPlotSegmenttypedef struct _GtkPlotSegment GtkPlotSegment; The GtkPlotSegment struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotArrow GtkPlotArrowtypedef enum { GTK_PLOT_ARROW_NONE = 0, GTK_PLOT_ARROW_ORIGIN = 1 << 0, GTK_PLOT_ARROW_END = 1 << 1 } GtkPlotArrow; gtk_plot_segment_new () gtk_plot_segment_newGtkWidget* gtk_plot_segment_new (void); Returns : gtk_plot_segment_set_relative () gtk_plot_segment_set_relativevoid gtk_plot_segment_set_relative (GtkPlotSegment *segment, gboolean set); segment : a GtkPlotSegment widget. set : gtk_plot_segment_relative () gtk_plot_segment_relativegboolean gtk_plot_segment_relative (GtkPlotSegment *segment); segment : a GtkPlotSegment widget. Returns : gtk_plot_segment_set_arrow () gtk_plot_segment_set_arrowvoid gtk_plot_segment_set_arrow (GtkPlotSegment *segment, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style); segment : a GtkPlotSegment widget. arrow_length : arrow_width : arrow_style : gtk_plot_segment_get_arrow () gtk_plot_segment_get_arrowvoid gtk_plot_segment_get_arrow (GtkPlotSegment *segment, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style); segment : a GtkPlotSegment widget. arrow_length : arrow_width : arrow_style : gtk_plot_segment_set_arrow_mask () gtk_plot_segment_set_arrow_maskvoid gtk_plot_segment_set_arrow_mask (GtkPlotSegment *segment, GtkPlotArrow mask); segment : a GtkPlotSegment widget. mask : gtk_plot_segment_get_arrow_mask () gtk_plot_segment_get_arrow_maskguint gtk_plot_segment_get_arrow_mask (GtkPlotSegment *segment); segment : a GtkPlotSegment widget. Returns : gtk_plot_segment_center () gtk_plot_segment_centervoid gtk_plot_segment_center (GtkPlotSegment *segment, gboolean center); segment : a GtkPlotSegment widget. center : gtk_plot_segment_is_centered () gtk_plot_segment_is_centeredgboolean gtk_plot_segment_is_centered (GtkPlotSegment *segment); segment : a GtkPlotSegment widget. Returns : Property Details The <literal>"arrow-mask"</literal> property GtkPlotSegment:arrow-mask "arrow-mask" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"centered"</literal> property GtkPlotSegment:centered "centered" gboolean : Read / Write Default value: FALSE The <literal>"length"</literal> property GtkPlotSegment:length "length" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"relative"</literal> property GtkPlotSegment:relative "relative" gboolean : Read / Write Default value: FALSE The <literal>"style"</literal> property GtkPlotSegment:style "style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"width"</literal> property GtkPlotSegment:width "width" gint : Read / Write Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkplotpc.xml0000644000076400001440000012053012604172532016510 00000000000000 ]> GtkPlotPC 3 GTKEXTRA Library GtkPlotPC Plot Context Synopsis #include <gtkextra.h> GtkPlotPC; enum GtkPlotPageSize; enum GtkPlotPageOrientation; enum GtkPlotUnits; GtkPlotPoint; GtkObject * gtk_plot_pc_new (void); gboolean gtk_plot_pc_init (GtkPlotPC *pc); void gtk_plot_pc_leave (GtkPlotPC *pc); void gtk_plot_pc_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h); void gtk_plot_pc_gsave (GtkPlotPC *pc); void gtk_plot_pc_grestore (GtkPlotPC *pc); void gtk_plot_pc_clip (GtkPlotPC *pc, GdkRectangle *area); void gtk_plot_pc_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, GdkBitmap *mask); void gtk_plot_pc_set_color (GtkPlotPC *pc, GdkColor *color); void gtk_plot_pc_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); void gtk_plot_pc_set_dash (GtkPlotPC *pc, gdouble offset_, gdouble *values, gint num_values); void gtk_plot_pc_draw_point (GtkPlotPC *pc, gdouble x, gdouble y); void gtk_plot_pc_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_pc_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints); void gtk_plot_pc_draw_rectangle (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); void gtk_plot_pc_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints); void gtk_plot_pc_draw_ellipse (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); void gtk_plot_pc_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size); void gtk_plot_pc_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height); void gtk_plot_pc_draw_string (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text); void gtk_plot_pc_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotPC +----GtkPlotCairo +----GtkPlotGdk +----GtkPlotPS Description Base Class for GtkPlotCairo, GtkPlotGdk and GtkPlotPS. Details GtkPlotPC GtkPlotPCtypedef struct _GtkPlotPC GtkPlotPC; enum GtkPlotPageSize GtkPlotPageSizetypedef enum{ GTK_PLOT_LETTER , GTK_PLOT_LEGAL , GTK_PLOT_A4 , GTK_PLOT_EXECUTIVE , GTK_PLOT_CUSTOM } GtkPlotPageSize; enum GtkPlotPageOrientation GtkPlotPageOrientationtypedef enum{ GTK_PLOT_PORTRAIT , GTK_PLOT_LANDSCAPE } GtkPlotPageOrientation; enum GtkPlotUnits GtkPlotUnitstypedef enum{ GTK_PLOT_PSPOINTS , GTK_PLOT_MM , GTK_PLOT_CM , GTK_PLOT_INCHES } GtkPlotUnits; GtkPlotPoint GtkPlotPointtypedef struct { } GtkPlotPoint; The GtkPlotPoint struct contains only private data. It should only be accessed through the functions described below. gtk_plot_pc_new () gtk_plot_pc_newGtkObject * gtk_plot_pc_new (void); Returns : gtk_plot_pc_init () gtk_plot_pc_initgboolean gtk_plot_pc_init (GtkPlotPC *pc); pc : Returns : gtk_plot_pc_leave () gtk_plot_pc_leavevoid gtk_plot_pc_leave (GtkPlotPC *pc); pc : gtk_plot_pc_set_viewport () gtk_plot_pc_set_viewportvoid gtk_plot_pc_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h); pc : w : h : gtk_plot_pc_gsave () gtk_plot_pc_gsavevoid gtk_plot_pc_gsave (GtkPlotPC *pc); pc : gtk_plot_pc_grestore () gtk_plot_pc_grestorevoid gtk_plot_pc_grestore (GtkPlotPC *pc); pc : gtk_plot_pc_clip () gtk_plot_pc_clipvoid gtk_plot_pc_clip (GtkPlotPC *pc, GdkRectangle *area); pc : area : gtk_plot_pc_clip_mask () gtk_plot_pc_clip_maskvoid gtk_plot_pc_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, GdkBitmap *mask); pc : x : y : mask : gtk_plot_pc_set_color () gtk_plot_pc_set_colorvoid gtk_plot_pc_set_color (GtkPlotPC *pc, GdkColor *color); pc : color : gtk_plot_pc_set_lineattr () gtk_plot_pc_set_lineattrvoid gtk_plot_pc_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); pc : line_width : line_style : cap_style : join_style : gtk_plot_pc_set_dash () gtk_plot_pc_set_dashvoid gtk_plot_pc_set_dash (GtkPlotPC *pc, gdouble offset_, gdouble *values, gint num_values); pc : offset_ : values : num_values : gtk_plot_pc_draw_point () gtk_plot_pc_draw_pointvoid gtk_plot_pc_draw_point (GtkPlotPC *pc, gdouble x, gdouble y); pc : x : y : gtk_plot_pc_draw_line () gtk_plot_pc_draw_linevoid gtk_plot_pc_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2); pc : x1 : y1 : x2 : y2 : gtk_plot_pc_draw_lines () gtk_plot_pc_draw_linesvoid gtk_plot_pc_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints); pc : points : numpoints : gtk_plot_pc_draw_rectangle () gtk_plot_pc_draw_rectanglevoid gtk_plot_pc_draw_rectangle (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); pc : filled : x : y : width : height : gtk_plot_pc_draw_polygon () gtk_plot_pc_draw_polygonvoid gtk_plot_pc_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints); pc : filled : points : numpoints : gtk_plot_pc_draw_ellipse () gtk_plot_pc_draw_ellipsevoid gtk_plot_pc_draw_ellipse (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); pc : filled : x : y : width : height : gtk_plot_pc_draw_circle () gtk_plot_pc_draw_circlevoid gtk_plot_pc_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size); pc : filled : x : y : size : gtk_plot_pc_set_font () gtk_plot_pc_set_fontvoid gtk_plot_pc_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height); pc : psfont : height : gtk_plot_pc_draw_string () gtk_plot_pc_draw_stringvoid gtk_plot_pc_draw_string (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text); pc : x : y : angle : fg : bg : transparent : border : border_space : border_width : shadow_width : font : height : just : text : gtk_plot_pc_draw_pixmap () gtk_plot_pc_draw_pixmapvoid gtk_plot_pc_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y); pc : pixmap : mask : xsrc : ysrc : xdest : ydest : width : height : scale_x : scale_y : gtkextra-3.2.0/docs/reference/xml/gtkplotpolar.xml0000644000076400001440000002603012604172532017223 00000000000000 ]> GtkPlotPolar 3 GTKEXTRA Library GtkPlotPolar Synopsis #include <gtkextra.h> GtkPlotPolar; GtkWidget* gtk_plot_polar_new (GdkDrawable *drawable); GtkWidget* gtk_plot_polar_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_polar_construct (GtkPlotPolar *plot, GdkDrawable *drawable); void gtk_plot_polar_construct_with_size (GtkPlotPolar *plot, GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_polar_rotate (GtkPlotPolar *plot, gdouble angle); gdouble gtk_plot_polar_get_angle (GtkPlotPolar *plot); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkMisc +----GtkPlot +----GtkPlotPolar Implemented Interfaces GtkPlotPolar implements AtkImplementorIface and GtkBuildable. Properties "rotation" gdouble : Read / Write Description FIXME:: Need long description. Details GtkPlotPolar GtkPlotPolartypedef struct _GtkPlotPolar GtkPlotPolar; The GtkPlotPolar struct contains only private data. It should only be accessed through the functions described below. gtk_plot_polar_new () gtk_plot_polar_newGtkWidget* gtk_plot_polar_new (GdkDrawable *drawable); drawable : Returns : gtk_plot_polar_new_with_size () gtk_plot_polar_new_with_sizeGtkWidget* gtk_plot_polar_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); drawable : width : height : Returns : gtk_plot_polar_construct () gtk_plot_polar_constructvoid gtk_plot_polar_construct (GtkPlotPolar *plot, GdkDrawable *drawable); plot : a GtkPlotPolar widget. drawable : gtk_plot_polar_construct_with_size () gtk_plot_polar_construct_with_sizevoid gtk_plot_polar_construct_with_size (GtkPlotPolar *plot, GdkDrawable *drawable, gdouble width, gdouble height); plot : a GtkPlotPolar widget. drawable : width : height : gtk_plot_polar_rotate () gtk_plot_polar_rotatevoid gtk_plot_polar_rotate (GtkPlotPolar *plot, gdouble angle); plot : a GtkPlotPolar widget. angle : gtk_plot_polar_get_angle () gtk_plot_polar_get_anglegdouble gtk_plot_polar_get_angle (GtkPlotPolar *plot); plot : a GtkPlotPolar widget. Returns : Property Details The <literal>"rotation"</literal> property GtkPlotPolar:rotation "rotation" gdouble : Read / Write Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkdatatextview.xml0000644000076400001440000004135112604172532017723 00000000000000 ]> GtkDataTextView 3 GTKEXTRA Library GtkDataTextView a data textview widget, based on GtkTextView Synopsis #include <gtkextra.h> GtkDataTextView; GtkDataTextView * gtk_data_text_view_new (void); const gchar * gtk_data_text_view_get_description (GtkDataTextView *data_text_view); gint gtk_data_text_view_get_max_length (GtkDataTextView *data_text_view); gint gtk_data_text_view_get_max_length_bytes (GtkDataTextView *data_text_view); void gtk_data_text_view_set_description (GtkDataTextView *data_text_view, const gchar *description); void gtk_data_text_view_set_max_length (GtkDataTextView *data_text_view, gint max_length); void gtk_data_text_view_set_max_length_bytes (GtkDataTextView *data_text_view, gint max_length_bytes); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkTextView +----GtkDataTextView Implemented Interfaces GtkDataTextView implements AtkImplementorIface and GtkBuildable. Properties "description" gchar* : Read / Write "max-length" gint : Read / Write "max-length-bytes" gint : Read / Write Description GtkDataTextView provides additional properties: - "description" - no functionality, a place for private information that cannot be put anywhere else - "max-length" - set the maximum character length for the contents of the widget. - "max-length-bytes" - set the maximum byte length for the contents of the widget. The main reason for this widget is to provide a length limit for text contents, required by SQL database systems. There is always a limit, no matter what you do. Some database systems may handle character length of UTF-8 strings correctly, others may not. Choose the appropriate limit for your system, characters or bytes. Note that setting a byte length limit > 0 on a datatextview may slow down text insertions. The byte length limit is imposed upon gtk_text_buffer_get_text() including invisible content. See gtk_text_buffer_get_text() for details. Details GtkDataTextView GtkDataTextViewtypedef struct _GtkDataTextView GtkDataTextView; The GtkDataTextView struct contains only private data. It should only be accessed through the functions described below. gtk_data_text_view_new () gtk_data_text_view_newGtkDataTextView * gtk_data_text_view_new (void); Creates a new GtkDataTextView Widget. Returns : the new GtkDataTextView Widget Since 3.0.6 gtk_data_text_view_get_description () gtk_data_text_view_get_descriptionconst gchar * gtk_data_text_view_get_description (GtkDataTextView *data_text_view); Retrieves the GtkDataTextView description. data_text_view : a GtkDataTextView Returns : a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored. Since 3.0.6 gtk_data_text_view_get_max_length () gtk_data_text_view_get_max_lengthgint gtk_data_text_view_get_max_length (GtkDataTextView *data_text_view); Retrieves the maximum character length for the contents of GtkDataTextView. data_text_view : a GtkDataTextView Returns : maximum byte length or 0. Since 3.0.6 gtk_data_text_view_get_max_length_bytes () gtk_data_text_view_get_max_length_bytesgint gtk_data_text_view_get_max_length_bytes (GtkDataTextView *data_text_view); Retrieves the maximum byte length for the contents of GtkDataTextView data_format. data_text_view : a GtkDataTextView Returns : maximum byte length or 0. Since 3.0.6 gtk_data_text_view_set_description () gtk_data_text_view_set_descriptionvoid gtk_data_text_view_set_description (GtkDataTextView *data_text_view, const gchar *description); Sets the GtkDataTextView description. data_text_view : a GtkDataTextView description : the description or NULL Since 3.0.6 gtk_data_text_view_set_max_length () gtk_data_text_view_set_max_lengthvoid gtk_data_text_view_set_max_length (GtkDataTextView *data_text_view, gint max_length); Sets the maximum character length for the contents of the GtkDataTextView. Existing content will not be truncted. data_text_view : a GtkDataTextView max_length : maximum character length or 0 Since 3.0.6 gtk_data_text_view_set_max_length_bytes () gtk_data_text_view_set_max_length_bytesvoid gtk_data_text_view_set_max_length_bytes (GtkDataTextView *data_text_view, gint max_length_bytes); Sets the maximum byte length for the contents of the GtkDataTextView. Existing content will not be truncted. data_text_view : a GtkDataTextView max_length_bytes : maximum byte length or 0 Since 3.0.6 Property Details The <literal>"description"</literal> property GtkDataTextView:description "description" gchar* : Read / Write Description of the GtkDataTextView, no functionality, a place for private information that cannot be put anywhere else. Default value: "" Since 3.0.6 The <literal>"max-length"</literal> property GtkDataTextView:max-length "max-length" gint : Read / Write Set the maximum length in characters for the GtkDataTextView. For details see gtk_data_text_view_set_max_length. Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled. Allowed values: [0,1073741823] Default value: 0 Since 3.0.6 The <literal>"max-length-bytes"</literal> property GtkDataTextView:max-length-bytes "max-length-bytes" gint : Read / Write Set the maximum length in bytes for the GtkDataTextView. For details see gtk_data_text_view_set_max_length_bytes. Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled. Allowed values: [0,1073741823] Default value: 0 Since 3.0.6 gtkextra-3.2.0/docs/reference/xml/gtkplotsurface.xml0000644000076400001440000017333212604172532017546 00000000000000 ]> GtkPlotSurface 3 GTKEXTRA Library GtkPlotSurface Synopsis #include <gtkextra.h> GtkPlotSurface; GtkPlotPolygon; GtkWidget* gtk_plot_surface_new (void); GtkWidget* gtk_plot_surface_new_function (GtkPlotFunc3D function); void gtk_plot_surface_construct_function (GtkPlotSurface *surface, GtkPlotFunc3D function); void gtk_plot_surface_set_color (GtkPlotSurface *data, GdkColor *color); void gtk_plot_surface_set_shadow (GtkPlotSurface *data, GdkColor *color); void gtk_plot_surface_set_grid_foreground (GtkPlotSurface *data, GdkColor *foreground); void gtk_plot_surface_set_grid_background (GtkPlotSurface *data, GdkColor *background); void gtk_plot_surface_set_grid_visible (GtkPlotSurface *data, gboolean visible); gboolean gtk_plot_surface_get_grid_visible (GtkPlotSurface *data); void gtk_plot_surface_set_mesh_visible (GtkPlotSurface *data, gboolean visible); gboolean gtk_plot_surface_get_mesh_visible (GtkPlotSurface *data); void gtk_plot_surface_set_light (GtkPlotSurface *data, gdouble x, gdouble y, gdouble z); void gtk_plot_surface_set_ambient (GtkPlotSurface *data, gdouble ambient); void gtk_plot_surface_use_height_gradient (GtkPlotSurface *data, gboolean use_gradient); void gtk_plot_surface_use_amplitud (GtkPlotSurface *data, gboolean use_amplitud); void gtk_plot_surface_set_transparent (GtkPlotSurface *data, gboolean transparent); void gtk_plot_surface_set_points (GtkPlotSurface *data, gdouble *x, gdouble *y, gdouble *z, gdouble *dx, gdouble *dy, gdouble *dz, gint nx, gint ny); void gtk_plot_surface_get_points (GtkPlotSurface *data, gdouble **x, gdouble **y, gdouble **z, gdouble **dx, gdouble **dy, gdouble **dz, gint *nx, gint *ny); GtkPlotArray * gtk_plot_surface_set_x (GtkPlotSurface *data, gdouble *x); GtkPlotArray * gtk_plot_surface_set_y (GtkPlotSurface *data, gdouble *y); GtkPlotArray * gtk_plot_surface_set_z (GtkPlotSurface *data, gdouble *z); GtkPlotArray * gtk_plot_surface_set_dx (GtkPlotSurface *data, gdouble *dx); GtkPlotArray * gtk_plot_surface_set_dy (GtkPlotSurface *data, gdouble *dy); GtkPlotArray * gtk_plot_surface_set_dz (GtkPlotSurface *data, gdouble *dz); gdouble * gtk_plot_surface_get_x (GtkPlotSurface *dataset, gint *nx); gdouble * gtk_plot_surface_get_y (GtkPlotSurface *dataset, gint *ny); gdouble * gtk_plot_surface_get_z (GtkPlotSurface *dataset, gint *nx, gint *ny); gdouble * gtk_plot_surface_get_dx (GtkPlotSurface *dataset); gdouble * gtk_plot_surface_get_dy (GtkPlotSurface *dataset); gdouble * gtk_plot_surface_get_dz (GtkPlotSurface *dataset); void gtk_plot_surface_set_nx (GtkPlotSurface *dataset, gint nx); void gtk_plot_surface_set_ny (GtkPlotSurface *dataset, gint ny); gint gtk_plot_surface_get_nx (GtkPlotSurface *dataset); gint gtk_plot_surface_get_ny (GtkPlotSurface *dataset); void gtk_plot_surface_set_xstep (GtkPlotSurface *dataset, gdouble xstep); void gtk_plot_surface_set_ystep (GtkPlotSurface *dataset, gdouble ystep); gdouble gtk_plot_surface_get_xstep (GtkPlotSurface *dataset); gdouble gtk_plot_surface_get_ystep (GtkPlotSurface *dataset); void gtk_plot_surface_build_mesh (GtkPlotSurface *surface); void gtk_plot_surface_recalc_nodes (GtkPlotSurface *surface); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotSurface +----GtkPlotCSurface Implemented Interfaces GtkPlotSurface implements AtkImplementorIface and GtkBuildable. Properties "ambient" gdouble : Read / Write "mesh-color" gpointer : Read / Write "mesh-style" gint : Read / Write "mesh-width" gdouble : Read / Write "nx" gint : Read / Write "ny" gint : Read / Write "show-grid" gboolean : Read / Write "show-mesh" gboolean : Read / Write "transparent" gboolean : Read / Write "use-amplitud" gboolean : Read / Write "use-height" gboolean : Read / Write "vector-light" gpointer : Read / Write "xstep" gdouble : Read / Write "ystep" gdouble : Read / Write Description FIXME:: need long description Details GtkPlotSurface GtkPlotSurfacetypedef struct _GtkPlotSurface GtkPlotSurface; The GtkPlotSurface struct contains only private data. It should only be accessed through the functions described below. GtkPlotPolygon GtkPlotPolygontypedef struct { GtkPlotDTtriangle *t; /* parent triangle */ GtkPlotVector xyz[4]; /* points */ GtkPlotVector p[4]; /* pixels */ gint n; /* number of points */ gdouble level; gboolean cut_level; gboolean sublevel; } GtkPlotPolygon; gtk_plot_surface_new () gtk_plot_surface_newGtkWidget* gtk_plot_surface_new (void); Returns : gtk_plot_surface_new_function () gtk_plot_surface_new_functionGtkWidget* gtk_plot_surface_new_function (GtkPlotFunc3D function); function : a GtkPlotFunc3D. scope async. Returns : (transfer full) the constructed GtkWidget gtk_plot_surface_construct_function () gtk_plot_surface_construct_functionvoid gtk_plot_surface_construct_function (GtkPlotSurface *surface, GtkPlotFunc3D function); surface : function : a GtkPlotFunc3D. scope async. gtk_plot_surface_set_color () gtk_plot_surface_set_colorvoid gtk_plot_surface_set_color (GtkPlotSurface *data, GdkColor *color); data : color : gtk_plot_surface_set_shadow () gtk_plot_surface_set_shadowvoid gtk_plot_surface_set_shadow (GtkPlotSurface *data, GdkColor *color); data : color : gtk_plot_surface_set_grid_foreground () gtk_plot_surface_set_grid_foregroundvoid gtk_plot_surface_set_grid_foreground (GtkPlotSurface *data, GdkColor *foreground); data : foreground : gtk_plot_surface_set_grid_background () gtk_plot_surface_set_grid_backgroundvoid gtk_plot_surface_set_grid_background (GtkPlotSurface *data, GdkColor *background); data : background : gtk_plot_surface_set_grid_visible () gtk_plot_surface_set_grid_visiblevoid gtk_plot_surface_set_grid_visible (GtkPlotSurface *data, gboolean visible); data : visible : gtk_plot_surface_get_grid_visible () gtk_plot_surface_get_grid_visiblegboolean gtk_plot_surface_get_grid_visible (GtkPlotSurface *data); data : Returns : gtk_plot_surface_set_mesh_visible () gtk_plot_surface_set_mesh_visiblevoid gtk_plot_surface_set_mesh_visible (GtkPlotSurface *data, gboolean visible); data : visible : gtk_plot_surface_get_mesh_visible () gtk_plot_surface_get_mesh_visiblegboolean gtk_plot_surface_get_mesh_visible (GtkPlotSurface *data); data : Returns : gtk_plot_surface_set_light () gtk_plot_surface_set_lightvoid gtk_plot_surface_set_light (GtkPlotSurface *data, gdouble x, gdouble y, gdouble z); data : x : y : z : gtk_plot_surface_set_ambient () gtk_plot_surface_set_ambientvoid gtk_plot_surface_set_ambient (GtkPlotSurface *data, gdouble ambient); data : ambient : gtk_plot_surface_use_height_gradient () gtk_plot_surface_use_height_gradientvoid gtk_plot_surface_use_height_gradient (GtkPlotSurface *data, gboolean use_gradient); data : use_gradient : gtk_plot_surface_use_amplitud () gtk_plot_surface_use_amplitudvoid gtk_plot_surface_use_amplitud (GtkPlotSurface *data, gboolean use_amplitud); data : use_amplitud : gtk_plot_surface_set_transparent () gtk_plot_surface_set_transparentvoid gtk_plot_surface_set_transparent (GtkPlotSurface *data, gboolean transparent); data : transparent : gtk_plot_surface_set_points () gtk_plot_surface_set_pointsvoid gtk_plot_surface_set_points (GtkPlotSurface *data, gdouble *x, gdouble *y, gdouble *z, gdouble *dx, gdouble *dy, gdouble *dz, gint nx, gint ny); data : x : y : z : dx : dy : dz : nx : ny : gtk_plot_surface_get_points () gtk_plot_surface_get_pointsvoid gtk_plot_surface_get_points (GtkPlotSurface *data, gdouble **x, gdouble **y, gdouble **z, gdouble **dx, gdouble **dy, gdouble **dz, gint *nx, gint *ny); data : x : y : z : dx : dy : dz : nx : ny : gtk_plot_surface_set_x () gtk_plot_surface_set_xGtkPlotArray * gtk_plot_surface_set_x (GtkPlotSurface *data, gdouble *x); data : x : the value to be set Returns : (transfer none) the affected GtkPlotArray gtk_plot_surface_set_y () gtk_plot_surface_set_yGtkPlotArray * gtk_plot_surface_set_y (GtkPlotSurface *data, gdouble *y); data : y : the value to be set Returns : (transfer none) the affected GtkPlotArray gtk_plot_surface_set_z () gtk_plot_surface_set_zGtkPlotArray * gtk_plot_surface_set_z (GtkPlotSurface *data, gdouble *z); data : z : the value to be set Returns : (transfer none) the affected GtkPlotArray gtk_plot_surface_set_dx () gtk_plot_surface_set_dxGtkPlotArray * gtk_plot_surface_set_dx (GtkPlotSurface *data, gdouble *dx); data : dx : the value to be set Returns : (transfer none) the affected GtkPlotArray gtk_plot_surface_set_dy () gtk_plot_surface_set_dyGtkPlotArray * gtk_plot_surface_set_dy (GtkPlotSurface *data, gdouble *dy); data : dy : the value to be set Returns : (transfer none) the affected GtkPlotArray gtk_plot_surface_set_dz () gtk_plot_surface_set_dzGtkPlotArray * gtk_plot_surface_set_dz (GtkPlotSurface *data, gdouble *dz); data : dz : the value to be set Returns : (transfer none) the affected GtkPlotArray gtk_plot_surface_get_x () gtk_plot_surface_get_xgdouble * gtk_plot_surface_get_x (GtkPlotSurface *dataset, gint *nx); dataset : nx : the value to be set Returns : gtk_plot_surface_get_y () gtk_plot_surface_get_ygdouble * gtk_plot_surface_get_y (GtkPlotSurface *dataset, gint *ny); dataset : ny : Returns : gtk_plot_surface_get_z () gtk_plot_surface_get_zgdouble * gtk_plot_surface_get_z (GtkPlotSurface *dataset, gint *nx, gint *ny); dataset : nx : ny : Returns : gtk_plot_surface_get_dx () gtk_plot_surface_get_dxgdouble * gtk_plot_surface_get_dx (GtkPlotSurface *dataset); dataset : Returns : gtk_plot_surface_get_dy () gtk_plot_surface_get_dygdouble * gtk_plot_surface_get_dy (GtkPlotSurface *dataset); dataset : Returns : gtk_plot_surface_get_dz () gtk_plot_surface_get_dzgdouble * gtk_plot_surface_get_dz (GtkPlotSurface *dataset); dataset : Returns : gtk_plot_surface_set_nx () gtk_plot_surface_set_nxvoid gtk_plot_surface_set_nx (GtkPlotSurface *dataset, gint nx); dataset : nx : gtk_plot_surface_set_ny () gtk_plot_surface_set_nyvoid gtk_plot_surface_set_ny (GtkPlotSurface *dataset, gint ny); dataset : ny : gtk_plot_surface_get_nx () gtk_plot_surface_get_nxgint gtk_plot_surface_get_nx (GtkPlotSurface *dataset); dataset : Returns : gtk_plot_surface_get_ny () gtk_plot_surface_get_nygint gtk_plot_surface_get_ny (GtkPlotSurface *dataset); dataset : Returns : gtk_plot_surface_set_xstep () gtk_plot_surface_set_xstepvoid gtk_plot_surface_set_xstep (GtkPlotSurface *dataset, gdouble xstep); dataset : xstep : gtk_plot_surface_set_ystep () gtk_plot_surface_set_ystepvoid gtk_plot_surface_set_ystep (GtkPlotSurface *dataset, gdouble ystep); dataset : ystep : gtk_plot_surface_get_xstep () gtk_plot_surface_get_xstepgdouble gtk_plot_surface_get_xstep (GtkPlotSurface *dataset); dataset : Returns : gtk_plot_surface_get_ystep () gtk_plot_surface_get_ystepgdouble gtk_plot_surface_get_ystep (GtkPlotSurface *dataset); dataset : Returns : gtk_plot_surface_build_mesh () gtk_plot_surface_build_meshvoid gtk_plot_surface_build_mesh (GtkPlotSurface *surface); surface : gtk_plot_surface_recalc_nodes () gtk_plot_surface_recalc_nodesvoid gtk_plot_surface_recalc_nodes (GtkPlotSurface *surface); surface : Property Details The <literal>"ambient"</literal> property GtkPlotSurface:ambient "ambient" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"mesh-color"</literal> property GtkPlotSurface:mesh-color "mesh-color" gpointer : Read / Write The <literal>"mesh-style"</literal> property GtkPlotSurface:mesh-style "mesh-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"mesh-width"</literal> property GtkPlotSurface:mesh-width "mesh-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"nx"</literal> property GtkPlotSurface:nx "nx" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"ny"</literal> property GtkPlotSurface:ny "ny" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"show-grid"</literal> property GtkPlotSurface:show-grid "show-grid" gboolean : Read / Write Default value: FALSE The <literal>"show-mesh"</literal> property GtkPlotSurface:show-mesh "show-mesh" gboolean : Read / Write Default value: FALSE The <literal>"transparent"</literal> property GtkPlotSurface:transparent "transparent" gboolean : Read / Write Default value: FALSE The <literal>"use-amplitud"</literal> property GtkPlotSurface:use-amplitud "use-amplitud" gboolean : Read / Write Default value: FALSE The <literal>"use-height"</literal> property GtkPlotSurface:use-height "use-height" gboolean : Read / Write Default value: TRUE The <literal>"vector-light"</literal> property GtkPlotSurface:vector-light "vector-light" gpointer : Read / Write The <literal>"xstep"</literal> property GtkPlotSurface:xstep "xstep" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"ystep"</literal> property GtkPlotSurface:ystep "ystep" gdouble : Read / Write Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkdataformat.xml0000644000076400001440000001216312604172532017333 00000000000000 ]> GtkDataFormat 3 GTKEXTRA Library GtkDataFormat a data formatting library Synopsis #include <gtkextra.h> gchar * gtk_data_format (const gchar *str, const gchar *dataformat); gchar * gtk_data_format_remove (const gchar *str, const gchar *dataformat); Description the widget property 'dataformat' may contain formatting instructions for the field contents. Any unrecognized formatting instruction is silently skipped. The formatting process should always be reversible. Thus formatting can be applied when input focus leaves a field and removed again when the focus enters a field, without the need of an additional content buffer. the library can be easily extended by adding more instructions to the list above. Details gtk_data_format () gtk_data_formatgchar * gtk_data_format (const gchar *str, const gchar *dataformat); format str according to dataformat. formatting instructions: '' (the empty string) does no formatting at all. 'int8' is formatted as a singed 8-bit integer value with optional '-' sign. 'int16' is formatted as a signed 16-bit integer with optional '-' sign. 'int32' is formatted as a signed 32-bit integer with optional '-' sign. 'money' is formatted as a double float value with 2 decimal digits and 1000s-separators 'float,N' is formatted as a double float value with N decimal digits and 1000s-separators 'bit' is formatted as a boolean value [0,1]. str : the string to be formatted dataformat : formatting instructions Returns : a pointer to an internal static buffer, with the formatted data gtk_data_format_remove () gtk_data_format_removegchar * gtk_data_format_remove (const gchar *str, const gchar *dataformat); reverse the effect of gtk_data_format, i.e. remove all formatting characters, apply trailing dash str : the string to be unformatted dataformat : formatting instructions Returns : a pointer to an internal static buffer, with the unformatted data gtkextra-3.2.0/docs/reference/xml/gtkextrafeatures.xml0000644000076400001440000001554612604172532020103 00000000000000 ]> GtkExtra Versioning 3 GTKEXTRA Library GtkExtra Versioning Synopsis #include <gtkextra.h> #define GTKEXTRA_MAJOR_VERSION #define GTKEXTRA_MINOR_VERSION #define GTKEXTRA_MICRO_VERSION #define GTKEXTRA_CHECK_VERSION (major,minor,micro) extern const guint gtkextra_major_version; extern const guint gtkextra_minor_version; extern const guint gtkextra_micro_version; extern const guint gtkextra_binary_age; extern const guint gtkextra_interface_age; gchar* gtkextra_check_version (guint required_major, guint required_minor, guint required_micro); Description Details GTKEXTRA_MAJOR_VERSION GTKEXTRA_MAJOR_VERSION#define GTKEXTRA_MAJOR_VERSION (3) GTKEXTRA_MINOR_VERSION GTKEXTRA_MINOR_VERSION#define GTKEXTRA_MINOR_VERSION (2) GTKEXTRA_MICRO_VERSION GTKEXTRA_MICRO_VERSION#define GTKEXTRA_MICRO_VERSION (0) GTKEXTRA_CHECK_VERSION() GTKEXTRA_CHECK_VERSION#define GTKEXTRA_CHECK_VERSION(major,minor,micro) major : minor : micro : gtkextra_major_version gtkextra_major_versionextern const guint gtkextra_major_version; gtkextra_minor_version gtkextra_minor_versionextern const guint gtkextra_minor_version; gtkextra_micro_version gtkextra_micro_versionextern const guint gtkextra_micro_version; gtkextra_binary_age gtkextra_binary_ageextern const guint gtkextra_binary_age; gtkextra_interface_age gtkextra_interface_ageextern const guint gtkextra_interface_age; gtkextra_check_version () gtkextra_check_versiongchar* gtkextra_check_version (guint required_major, guint required_minor, guint required_micro); required_major : required_minor : required_micro : Returns : gtkextra-3.2.0/docs/reference/xml/gtkcombobutton.xml0000644000076400001440000001143112604172532017541 00000000000000 ]> GtkComboButton 3 GTKEXTRA Library GtkComboButton A combo button widget for GTK Synopsis #include <gtkextra.h> GtkComboButton; GtkWidget * gtk_combo_button_new (void); void gtk_combo_button_hide_popdown_window (GtkComboButton *combo_button); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----GtkComboButton +----GtkBorderCombo +----GtkColorCombo +----GtkToggleCombo Implemented Interfaces GtkComboButton implements AtkImplementorIface, GtkBuildable and GtkOrientable. Description Details GtkComboButton GtkComboButtontypedef struct _GtkComboButton GtkComboButton; The GtkComboButton struct contains only private data. It should only be accessed through the functions described below. gtk_combo_button_new () gtk_combo_button_newGtkWidget * gtk_combo_button_new (void); Returns : gtk_combo_button_hide_popdown_window () gtk_combo_button_hide_popdown_windowvoid gtk_combo_button_hide_popdown_window (GtkComboButton *combo_button); Hides the popdown window of pressed GtkComboButton. combo_button : the GtkComboButton widget. gtkextra-3.2.0/docs/reference/xml/gtkfilelist.xml0000644000076400001440000004657512604172532017042 00000000000000 ]> GtkFileList 3 GTKEXTRA Library GtkFileList A file list widget fot GTK Synopsis #include <gtkextra.h> GtkFileList; GtkFileListItem; GtkFileListType; GtkWidget* gtk_file_list_new (guint icon_width, gint mode, const gchar *path); void gtk_file_list_construct (GtkFileList *file_list, guint icon_width, gint mode, const gchar *path); void gtk_file_list_set_filter (GtkFileList *file_list, const gchar *filter); gboolean gtk_file_list_open_dir (GtkFileList *file_list, const gchar *dir_path); const gchar* gtk_file_list_get_path (GtkFileList *file_list); const gchar* gtk_file_list_get_filename (GtkFileList *file_list); gint gtk_file_list_get_filetype (GtkFileList *file_list); gint gtk_file_list_add_type (GtkFileList *file_list, const gchar **pixmap_data); gint gtk_file_list_add_type_with_pixmap (GtkFileList *file_list, GdkPixmap *pixmap, GdkBitmap *mask); void gtk_file_list_add_type_filter (GtkFileList *file_list, gint type, const gchar *filter); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkFixed +----GtkIconList +----GtkFileList Implemented Interfaces GtkFileList implements AtkImplementorIface and GtkBuildable. Description It is a GtkIconList subclass that displays the contents of a given directory using fancy icons for different types of files Details GtkFileList GtkFileListtypedef struct _GtkFileList GtkFileList; The GtkFileList structure contains only private data. It should only be accessed through the functions described below. GtkFileListItem GtkFileListItemtypedef struct { } GtkFileListItem; The GtkFileListItem structure contains only private data. It should only be accessed through the functions described below. GtkFileListType GtkFileListTypetypedef struct { } GtkFileListType; The GtkFileListType structure contains only private data. It should only be accessed through the functions described below. gtk_file_list_new () gtk_file_list_newGtkWidget* gtk_file_list_new (guint icon_width, gint mode, const gchar *path); Create a newfile list widget. Remark for the 2nd open file window you must use: gtk_icon_file_selection_show_tree(GTK_ICON_FILESEL(filesel), TRUE); icon_width : the width of the icon mode : GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE path : the path to the files to be be opened in GtkFileList widget. Returns : the newly-created GtkFileList widget. gtk_file_list_construct () gtk_file_list_constructvoid gtk_file_list_construct (GtkFileList *file_list, guint icon_width, gint mode, const gchar *path); Initializes newfile list widget with specified values. file_list : GtkFileList widget icon_width : the width of the icon mode : GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE path : the path to the files to be be opened in GtkFileList widget. gtk_file_list_set_filter () gtk_file_list_set_filtervoid gtk_file_list_set_filter (GtkFileList *file_list, const gchar *filter); Sets a filter for files displayed in Open window. file_list : the GtkFileList widget. filter : filter applied to files gtk_file_list_open_dir () gtk_file_list_open_dirgboolean gtk_file_list_open_dir (GtkFileList *file_list, const gchar *dir_path); Opens the content of specified directory in GtkFileList widget. file_list : a GtkFileList widget dir_path : path of directory to be opened in GtkFileList widget Returns : TRUE(succes) or FALSE(failure) gtk_file_list_get_path () gtk_file_list_get_pathconst gchar* gtk_file_list_get_path (GtkFileList *file_list); Get the path of the files shown in filelist file_list : the GtkFileList widget. Returns : the path of files. gtk_file_list_get_filename () gtk_file_list_get_filenameconst gchar* gtk_file_list_get_filename (GtkFileList *file_list); Get the path of the files shown in filelist file_list : the GtkFileList widget. Returns : the filename gtk_file_list_get_filetype () gtk_file_list_get_filetypegint gtk_file_list_get_filetype (GtkFileList *file_list); Get the GtkFileListType of selected file in File List. file_list : the GtkFileList widget. GTK_FILE_LIST_FILE, GTK_FILE_LIST_HTML, GTK_FILE_LIST_TEXT, GTK_FILE_LIST_DOC, GTK_FILE_LIST_PDF, GTK_FILE_LIST_C, GTK_FILE_LIST_CPP, GTK_FILE_LIST_H, GTK_FILE_LIST_F, GTK_FILE_LIST_JAVA, GTK_FILE_LIST_EXEC, GTK_FILE_LIST_IMG, GTK_FILE_LIST_ARCH, GTK_FILE_LIST_PKG, GTK_FILE_LIST_DEB, GTK_FILE_LIST_RPM, GTK_FILE_LIST_CAT, GTK_FILE_LIST_SOUND, GTK_FILE_LIST_MOVIE, GTK_FILE_LIST_CORE) Returns : The GtkFileListType ( GTK_FILE_LIST_FOLDER, gtk_file_list_add_type () gtk_file_list_add_typegint gtk_file_list_add_type (GtkFileList *file_list, const gchar **pixmap_data); Add a new file type in a GtkFileList structure. file_list : the GtkFileList widget. pixmap_data : Pointer to a string containing the XPM data.(last argument of gdk_pixmap_create_from_xpm_d() ). Returns : the identification number given to the added filetype gtk_file_list_add_type_with_pixmap () gtk_file_list_add_type_with_pixmapgint gtk_file_list_add_type_with_pixmap (GtkFileList *file_list, GdkPixmap *pixmap, GdkBitmap *mask); Add a new file type in a GtkFileList structure. file_list : the GtkFileList widget. pixmap : a GdkPixmap object. mask : a GdkBitmap mask. Returns : the identification number given to the added filetype gtk_file_list_add_type_filter () gtk_file_list_add_type_filtervoid gtk_file_list_add_type_filter (GtkFileList *file_list, gint type, const gchar *filter); Add a filter for specified file type in a GtkFileList structure. file_list : the GtkFileList widget. type : file type. filter : filter for specified type. gtkextra-3.2.0/docs/reference/xml/gtksheetcolumn.xml0000644000076400001440000024363712604172532017553 00000000000000 ]> GtkSheetColumn 3 GTKEXTRA Library GtkSheetColumn A spreadsheet column widget for GtkSheet Synopsis #include <gtkextra.h> GtkSheetColumn; void gtk_sheet_add_column (GtkSheet *sheet, guint ncols); void gtk_sheet_insert_columns (GtkSheet *sheet, guint col, guint ncols); void gtk_sheet_delete_columns (GtkSheet *sheet, guint col, guint ncols); guint gtk_sheet_get_columns_count (GtkSheet *sheet); GtkSheetColumn * gtk_sheet_column_get (GtkSheet *sheet, gint col); gint gtk_sheet_column_get_index (GtkSheetColumn *colobj); void gtk_sheet_select_column (GtkSheet *sheet, gint column); gboolean gtk_sheet_column_titles_visible (GtkSheet *sheet); void gtk_sheet_show_column_titles (GtkSheet *sheet); void gtk_sheet_hide_column_titles (GtkSheet *sheet); const gchar * gtk_sheet_get_column_title (GtkSheet *sheet, gint column); void gtk_sheet_set_column_title (GtkSheet *sheet, gint column, const gchar *title); void gtk_sheet_set_column_titles_height (GtkSheet *sheet, guint height); gboolean gtk_sheet_column_sensitive (GtkSheet *sheet, gint column); void gtk_sheet_column_set_sensitivity (GtkSheet *sheet, gint column, gboolean sensitive); void gtk_sheet_columns_set_sensitivity (GtkSheet *sheet, gboolean sensitive); gboolean gtk_sheet_columns_resizable (GtkSheet *sheet); void gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable); gboolean gtk_sheet_column_visible (GtkSheet *sheet, gint column); void gtk_sheet_column_set_visibility (GtkSheet *sheet, gint column, gboolean visible); void gtk_sheet_column_label_set_visibility (GtkSheet *sheet, gint col, gboolean visible); void gtk_sheet_columns_labels_set_visibility (GtkSheet *sheet, gboolean visible); const gint gtk_sheet_get_column_width (GtkSheet *sheet, gint column); void gtk_sheet_set_column_width (GtkSheet *sheet, gint column, guint width); GtkJustification gtk_sheet_column_get_justification (GtkSheet *sheet, gint col); void gtk_sheet_column_set_justification (GtkSheet *sheet, gint col, GtkJustification just); GtkSheetVerticalJustification gtk_sheet_column_get_vjustification (GtkSheet *sheet, gint col); void gtk_sheet_column_set_vjustification (GtkSheet *sheet, gint col, GtkSheetVerticalJustification vjust); const gchar * gtk_sheet_column_button_get_label (GtkSheet *sheet, gint col); void gtk_sheet_column_button_add_label (GtkSheet *sheet, gint col, const gchar *label); void gtk_sheet_column_button_justify (GtkSheet *sheet, gint col, GtkJustification justification); gchar * gtk_sheet_column_get_tooltip_markup (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_tooltip_markup (GtkSheet *sheet, const gint col, const gchar *markup); gchar * gtk_sheet_column_get_tooltip_text (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_tooltip_text (GtkSheet *sheet, const gint col, const gchar *text); gchar * gtk_sheet_column_get_datatype (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_datatype (GtkSheet *sheet, const gint col, const gchar *data_type); gchar * gtk_sheet_column_get_description (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_description (GtkSheet *sheet, const gint col, const gchar *description); gchar * gtk_sheet_column_get_format (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_format (GtkSheet *sheet, const gint col, const gchar *format); gboolean gtk_sheet_column_get_iskey (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_iskey (GtkSheet *sheet, const gint col, const gboolean is_key); GType gtk_sheet_column_get_entry_type (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_entry_type (GtkSheet *sheet, const gint col, const GType entry_type); gboolean gtk_sheet_column_get_readonly (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_readonly (GtkSheet *sheet, const gint col, const gboolean is_readonly); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkSheetColumn Implemented Interfaces GtkSheetColumn implements AtkImplementorIface and GtkBuildable. Properties "dataformat" gchar* : Read / Write "datatype" gchar* : Read / Write "description" gchar* : Read / Write "entry-type" GtkSheetEntryType : Read / Write "iskey" gboolean : Read / Write "justification" GtkJustification : Read / Write "label" gchar* : Read / Write "max-length" gint : Read / Write "max-length-bytes" gint : Read / Write "position" gint : Read / Write "readonly" gboolean : Read / Write "visible" gboolean : Read / Write "vjust" GtkSheetVerticalJustification : Read / Write "width" gint : Read / Write "wrap-mode" GtkWrapMode : Read / Write Description The GtkSheetColumn provides properties for sheet columns. Details GtkSheetColumn GtkSheetColumntypedef struct _GtkSheetColumn GtkSheetColumn; The GtkSheetColumn struct contains only private data. It should only be accessed through the functions described below. gtk_sheet_add_column () gtk_sheet_add_columnvoid gtk_sheet_add_column (GtkSheet *sheet, guint ncols); Append ncols columns to the right of the sheet. sheet : a GtkSheet. ncols : number of columns to be appended. gtk_sheet_insert_columns () gtk_sheet_insert_columnsvoid gtk_sheet_insert_columns (GtkSheet *sheet, guint col, guint ncols); Insert ncols columns before the given row and pull right. sheet : a GtkSheet. col : column number. ncols : number of columns to be inserted. gtk_sheet_delete_columns () gtk_sheet_delete_columnsvoid gtk_sheet_delete_columns (GtkSheet *sheet, guint col, guint ncols); Delete ncols columns starting from col. sheet : a GtkSheet. col : column number. ncols : number of columns to be deleted. gtk_sheet_get_columns_count () gtk_sheet_get_columns_countguint gtk_sheet_get_columns_count (GtkSheet *sheet); Get the number of the columns of the GtkSheet. sheet : a GtkSheet Returns : number of columns. gtk_sheet_column_get () gtk_sheet_column_getGtkSheetColumn * gtk_sheet_column_get (GtkSheet *sheet, gint col); Get a GtkSheetColumn sheet : a GtkSheet. col : column index Returns : (transfer none) the requested GtkSheetColumn or NULL gtk_sheet_column_get_index () gtk_sheet_column_get_indexgint gtk_sheet_column_get_index (GtkSheetColumn *colobj); find index of colobj in GtkSheet colobj : GtkSheetColumn to find Returns : column index or -1 gtk_sheet_select_column () gtk_sheet_select_columnvoid gtk_sheet_select_column (GtkSheet *sheet, gint column); Select the column. The range is then highlighted, and the bounds are stored in sheet->range. sheet : a GtkSheet. column : column number gtk_sheet_column_titles_visible () gtk_sheet_column_titles_visiblegboolean gtk_sheet_column_titles_visible (GtkSheet *sheet); Get the visibility of sheet column titles . sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_show_column_titles () gtk_sheet_show_column_titlesvoid gtk_sheet_show_column_titles (GtkSheet *sheet); Show column titles . sheet : a GtkSheet gtk_sheet_hide_column_titles () gtk_sheet_hide_column_titlesvoid gtk_sheet_hide_column_titles (GtkSheet *sheet); Hide column titles . sheet : a GtkSheet gtk_sheet_get_column_title () gtk_sheet_get_column_titleconst gchar * gtk_sheet_get_column_title (GtkSheet *sheet, gint column); Get column title. sheet : a GtkSheet column : column number Returns : column title, do not modify or free it. gtk_sheet_set_column_title () gtk_sheet_set_column_titlevoid gtk_sheet_set_column_title (GtkSheet *sheet, gint column, const gchar *title); Set column title. sheet : a GtkSheet column : column number title : column title gtk_sheet_set_column_titles_height () gtk_sheet_set_column_titles_heightvoid gtk_sheet_set_column_titles_height (GtkSheet *sheet, guint height); Resize column titles area . sheet : a GtkSheet height : column title height. gtk_sheet_column_sensitive () gtk_sheet_column_sensitivegboolean gtk_sheet_column_sensitive (GtkSheet *sheet, gint column); Get column button sensitivity. sheet : a GtkSheet. column : column number Returns : TRUE - the column is sensitive, FALSE - insensitive or not existant gtk_sheet_column_set_sensitivity () gtk_sheet_column_set_sensitivityvoid gtk_sheet_column_set_sensitivity (GtkSheet *sheet, gint column, gboolean sensitive); Set column button sensitivity. If sensitivity is TRUE it can be toggled, otherwise it acts as a title. sheet : a GtkSheet. column : column number sensitive : TRUE or FALSE gtk_sheet_columns_set_sensitivity () gtk_sheet_columns_set_sensitivityvoid gtk_sheet_columns_set_sensitivity (GtkSheet *sheet, gboolean sensitive); Set all columns buttons sensitivity. If sensitivity is TRUE button can be toggled, otherwise act as titles. The sheet itself has no such property, it is a convenience function to set the property for all existing columns. sheet : a GtkSheet. sensitive : TRUE or FALSE gtk_sheet_columns_resizable () gtk_sheet_columns_resizablegboolean gtk_sheet_columns_resizable (GtkSheet *sheet); Get columns resizable status. sheet : a GtkSheet. Returns : TRUE or FALSE gtk_sheet_columns_set_resizable () gtk_sheet_columns_set_resizablevoid gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable); Set columns resizable status. sheet : a GtkSheet. resizable : TRUE or FALSE gtk_sheet_column_visible () gtk_sheet_column_visiblegboolean gtk_sheet_column_visible (GtkSheet *sheet, gint column); Get column visible property. sheet : a GtkSheet. column : column number Returns : TRUE - visible, FALSE - hidden or not existant gtk_sheet_column_set_visibility () gtk_sheet_column_set_visibilityvoid gtk_sheet_column_set_visibility (GtkSheet *sheet, gint column, gboolean visible); Set column visible property. Default value is TRUE. When set to FALSE, the column is hidden. sheet : a GtkSheet. column : column number visible : TRUE or FALSE gtk_sheet_column_label_set_visibility () gtk_sheet_column_label_set_visibilityvoid gtk_sheet_column_label_set_visibility (GtkSheet *sheet, gint col, gboolean visible); Set column label visibility. The default value is TRUE. If FALSE, the column label is hidden. sheet : a GtkSheet. col : column number. visible : TRUE or FALSE gtk_sheet_columns_labels_set_visibility () gtk_sheet_columns_labels_set_visibilityvoid gtk_sheet_columns_labels_set_visibility (GtkSheet *sheet, gboolean visible); Set all columns labels visibility. The default value is TRUE. If FALSE, the columns labels are hidden. The sheet itself has no such property, it is a convenience function to set the property for all existing columns. sheet : a GtkSheet. visible : TRUE or FALSE gtk_sheet_get_column_width () gtk_sheet_get_column_widthconst gint gtk_sheet_get_column_width (GtkSheet *sheet, gint column); Get column width. sheet : a GtkSheet column : column number Returns : column width gtk_sheet_set_column_width () gtk_sheet_set_column_widthvoid gtk_sheet_set_column_width (GtkSheet *sheet, gint column, guint width); Set column width. sheet : a GtkSheet. column : column number. width : the width of the column. gtk_sheet_column_get_justification () gtk_sheet_column_get_justificationGtkJustification gtk_sheet_column_get_justification (GtkSheet *sheet, gint col); Get the column justification. sheet : a GtkSheet. col : column number Returns : a GtkJustification gtk_sheet_column_set_justification () gtk_sheet_column_set_justificationvoid gtk_sheet_column_set_justification (GtkSheet *sheet, gint col, GtkJustification just); Set column justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER). The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the default justification for numbers is GTK_JUSTIFY_RIGHT. sheet : a GtkSheet. col : column number just : a GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER gtk_sheet_column_get_vjustification () gtk_sheet_column_get_vjustificationGtkSheetVerticalJustification gtk_sheet_column_get_vjustification (GtkSheet *sheet, gint col); Get the vertical cell text justification. This overrides the default vertical cell text justification of the GtkSheet. sheet : a GtkSheet. col : column number Returns : a GtkSheetVerticalJustification gtk_sheet_column_set_vjustification () gtk_sheet_column_set_vjustificationvoid gtk_sheet_column_set_vjustification (GtkSheet *sheet, gint col, GtkSheetVerticalJustification vjust); Set vertical cell text jjustification sheet : a GtkSheet. col : column number vjust : a GtkSheetVerticalJustification gtk_sheet_column_button_get_label () gtk_sheet_column_button_get_labelconst gchar * gtk_sheet_column_button_get_label (GtkSheet *sheet, gint col); Get column button label. sheet : a GtkSheet. col : column number. Returns : Column button label. gtk_sheet_column_button_add_label () gtk_sheet_column_button_add_labelvoid gtk_sheet_column_button_add_label (GtkSheet *sheet, gint col, const gchar *label); Set button label.It is used to set a column title. sheet : a GtkSheet col : column number label : text label gtk_sheet_column_button_justify () gtk_sheet_column_button_justifyvoid gtk_sheet_column_button_justify (GtkSheet *sheet, gint col, GtkJustification justification); Set the justification(alignment) of the column buttons. sheet : a GtkSheet. col : column number justification : a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER gtk_sheet_column_get_tooltip_markup () gtk_sheet_column_get_tooltip_markupgchar * gtk_sheet_column_get_tooltip_markup (GtkSheet *sheet, const gint col); Gets the contents of the tooltip (markup) for the column sheet : a GtkSheet. col : column index Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_column_set_tooltip_markup () gtk_sheet_column_set_tooltip_markupvoid gtk_sheet_column_set_tooltip_markup (GtkSheet *sheet, const gint col, const gchar *markup); Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language. sheet : a GtkSheet. col : column index markup : the contents of the tooltip for widget, or NULL. gtk_sheet_column_get_tooltip_text () gtk_sheet_column_get_tooltip_textgchar * gtk_sheet_column_get_tooltip_text (GtkSheet *sheet, const gint col); Gets the contents of the tooltip for the column sheet : a GtkSheet. col : column index Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_column_set_tooltip_text () gtk_sheet_column_set_tooltip_textvoid gtk_sheet_column_set_tooltip_text (GtkSheet *sheet, const gint col, const gchar *text); Sets text as the contents of the tooltip. sheet : a GtkSheet. col : column index text : the contents of the tooltip for widget gtk_sheet_column_get_datatype () gtk_sheet_column_get_datatypegchar * gtk_sheet_column_get_datatype (GtkSheet *sheet, const gint col); Gets the column data_type for application use sheet : a GtkSheet. col : column index Returns : the datatype or NULL gtk_sheet_column_set_datatype () gtk_sheet_column_set_datatypevoid gtk_sheet_column_set_datatype (GtkSheet *sheet, const gint col, const gchar *data_type); Sets the column data data_type for application use sheet : a GtkSheet. col : column index data_type : the datatype gtk_sheet_column_get_description () gtk_sheet_column_get_descriptiongchar * gtk_sheet_column_get_description (GtkSheet *sheet, const gint col); Gets the column description sheet : a GtkSheet. col : column index Returns : the description or NULL, You should free the returned string with g_free() when done. gtk_sheet_column_set_description () gtk_sheet_column_set_descriptionvoid gtk_sheet_column_set_description (GtkSheet *sheet, const gint col, const gchar *description); Sets the column description. sheet : a GtkSheet. col : column index description : the description or NULL gtk_sheet_column_get_format () gtk_sheet_column_get_formatgchar * gtk_sheet_column_get_format (GtkSheet *sheet, const gint col); Gets the column data formatting pattern sheet : a GtkSheet. col : column index Returns : the formatting pattern or NULL, You should free the returned string with g_free() when done. gtk_sheet_column_set_format () gtk_sheet_column_set_formatvoid gtk_sheet_column_set_format (GtkSheet *sheet, const gint col, const gchar *format); Sets the column data formatting pattern. sheet : a GtkSheet. col : column index format : the data_format pattern or NULL gtk_sheet_column_get_iskey () gtk_sheet_column_get_iskeygboolean gtk_sheet_column_get_iskey (GtkSheet *sheet, const gint col); Gets the column is_key flag sheet : a GtkSheet. col : column index Returns : the is_key flag gtk_sheet_column_set_iskey () gtk_sheet_column_set_iskeyvoid gtk_sheet_column_set_iskey (GtkSheet *sheet, const gint col, const gboolean is_key); Sets the column is_key flag. This flag has no effect on calculation or presentation, it is reserved for application usage. sheet : a GtkSheet. col : column index is_key : the column is_key flag gtk_sheet_column_get_entry_type () gtk_sheet_column_get_entry_typeGType gtk_sheet_column_get_entry_type (GtkSheet *sheet, const gint col); Gets the column entry type if known sheet : a GtkSheet. col : column index Returns : the entry type or GTK_SHEET_ENTRY_TYPE_DEFAULT gtk_sheet_column_set_entry_type () gtk_sheet_column_set_entry_typevoid gtk_sheet_column_set_entry_type (GtkSheet *sheet, const gint col, const GType entry_type); Supersedes the sheet entry type for this column. Pass G_TYPE_NONE to reset the column to the sheet entry type. sheet : a GtkSheet. col : column index entry_type : the entry type or G_TYPE_NONE gtk_sheet_column_get_readonly () gtk_sheet_column_get_readonlygboolean gtk_sheet_column_get_readonly (GtkSheet *sheet, const gint col); Gets the column readonly flag sheet : a GtkSheet. col : column index Returns : the readonly flag gtk_sheet_column_set_readonly () gtk_sheet_column_set_readonlyvoid gtk_sheet_column_set_readonly (GtkSheet *sheet, const gint col, const gboolean is_readonly); Sets the column readonly flag. A cell is editable if the sheet is not locked, the column is not readonly and the cell (-range) was set to editable. sheet : a GtkSheet. col : column index is_readonly : the column is_readonly flag Property Details The <literal>"dataformat"</literal> property GtkSheetColumn:dataformat "dataformat" gchar* : Read / Write a formatting string that controls what you see when the widget doesn't contain input focus Default value: "" The <literal>"datatype"</literal> property GtkSheetColumn:datatype "datatype" gchar* : Read / Write no functionality, a datatype hint for the application because any widget content is text Default value: "" The <literal>"description"</literal> property GtkSheetColumn:description "description" gchar* : Read / Write Description of column contents Default value: "" The <literal>"entry-type"</literal> property GtkSheetColumn:entry-type "entry-type" GtkSheetEntryType : Read / Write Column cell entry widget type Default value: GTK_SHEET_ENTRY_TYPE_DEFAULT The <literal>"iskey"</literal> property GtkSheetColumn:iskey "iskey" gboolean : Read / Write Flag for key columns Default value: FALSE The <literal>"justification"</literal> property GtkSheetColumn:justification "justification" GtkJustification : Read / Write Justification of the column Default value: GTK_JUSTIFY_LEFT The <literal>"label"</literal> property GtkSheetColumn:label "label" gchar* : Read / Write Label of the column button Default value: "" The <literal>"max-length"</literal> property GtkSheetColumn:max-length "max-length" gint : Read / Write Maximum number orf characters in this column, Zero if no maximum. This property is passed to the sheet entry editor. It is supported for the following editors: GtkItemEntry, GtkEntry, GtkDataTextView Allowed values: [0,1073741823] Default value: 0 Since 3.0.6 The <literal>"max-length-bytes"</literal> property GtkSheetColumn:max-length-bytes "max-length-bytes" gint : Read / Write Set the maximum length in bytes for the GtkDataEntry. For details see gtk_data_entry_set_max_length_bytes. This property is passed to the sheet entry editor. It is supported for the following editors: GtkItemEntry, GtkDataTextView. Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled. Allowed values: [0,1073741823] Default value: 0 Since 3.0.6 The <literal>"position"</literal> property GtkSheetColumn:position "position" gint : Read / Write The packing position of the column Allowed values: [0,1024] Default value: 0 The <literal>"readonly"</literal> property GtkSheetColumn:readonly "readonly" gboolean : Read / Write Lock column contents for editing. Default value: FALSE The <literal>"visible"</literal> property GtkSheetColumn:visible "visible" gboolean : Read / Write Visible property for columns Default value: FALSE The <literal>"vjust"</literal> property GtkSheetColumn:vjust "vjust" GtkSheetVerticalJustification : Read / Write Column vertical cell text justification Default value: GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT The <literal>"width"</literal> property GtkSheetColumn:width "width" gint : Read / Write Width of the column Allowed values: [G_MAXULONG,8192] Default value: -1 The <literal>"wrap-mode"</literal> property GtkSheetColumn:wrap-mode "wrap-mode" GtkWrapMode : Read / Write This property is passed to the sheet entry editor. It is supported for the following editors: GtkTextView, GtkDataTextView. Default value: GTK_WRAP_NONE Since 3.0.6 gtkextra-3.2.0/docs/reference/xml/gtkplotbubble.xml0000644000076400001440000004103512604172532017343 00000000000000 ]> GtkPlotBubble 3 GTKEXTRA Library GtkPlotBubble Synopsis #include <gtkextra.h> GtkPlotBubble; GtkWidget* gtk_plot_bubble_new (void); void gtk_plot_bubble_show_scale (GtkPlotBubble *bubble, gboolean show); void gtk_plot_bubble_set_scale_max (GtkPlotBubble *bubble, gdouble scale_max); void gtk_plot_bubble_set_size_max (GtkPlotBubble *bubble, guint size_max); void gtk_plot_bubble_set_labels_precision (GtkPlotBubble *bubble, gint precision); void gtk_plot_bubble_set_labels_style (GtkPlotBubble *bubble, GtkPlotLabelStyle style); void gtk_plot_bubble_set_labels_prefix (GtkPlotBubble *bubble, const gchar *prefix); void gtk_plot_bubble_set_labels_suffix (GtkPlotBubble *bubble, const gchar *suffix); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotBubble Implemented Interfaces GtkPlotBubble implements AtkImplementorIface and GtkBuildable. Properties "labels-precision" gint : Read / Write "labels-prefix" gchar* : Read / Write "labels-style" gint : Read / Write "labels-suffix" gchar* : Read / Write "scale-max" gdouble : Read / Write "show-scale" gboolean : Read / Write "size-max" gint : Read / Write Description FIXME:: Need long description. Details GtkPlotBubble GtkPlotBubbletypedef struct _GtkPlotBubble GtkPlotBubble; The GtkPlotBubble struct contains only private data. It should only be accessed through the functions described below. gtk_plot_bubble_new () gtk_plot_bubble_newGtkWidget* gtk_plot_bubble_new (void); Returns : gtk_plot_bubble_show_scale () gtk_plot_bubble_show_scalevoid gtk_plot_bubble_show_scale (GtkPlotBubble *bubble, gboolean show); bubble : a GtkPlotBubble. show : gtk_plot_bubble_set_scale_max () gtk_plot_bubble_set_scale_maxvoid gtk_plot_bubble_set_scale_max (GtkPlotBubble *bubble, gdouble scale_max); bubble : a GtkPlotBubble. scale_max : gtk_plot_bubble_set_size_max () gtk_plot_bubble_set_size_maxvoid gtk_plot_bubble_set_size_max (GtkPlotBubble *bubble, guint size_max); bubble : a GtkPlotBubble. size_max : gtk_plot_bubble_set_labels_precision () gtk_plot_bubble_set_labels_precisionvoid gtk_plot_bubble_set_labels_precision (GtkPlotBubble *bubble, gint precision); bubble : a GtkPlotBubble. precision : gtk_plot_bubble_set_labels_style () gtk_plot_bubble_set_labels_stylevoid gtk_plot_bubble_set_labels_style (GtkPlotBubble *bubble, GtkPlotLabelStyle style); bubble : a GtkPlotBubble. style : gtk_plot_bubble_set_labels_prefix () gtk_plot_bubble_set_labels_prefixvoid gtk_plot_bubble_set_labels_prefix (GtkPlotBubble *bubble, const gchar *prefix); bubble : a GtkPlotBubble. prefix : gtk_plot_bubble_set_labels_suffix () gtk_plot_bubble_set_labels_suffixvoid gtk_plot_bubble_set_labels_suffix (GtkPlotBubble *bubble, const gchar *suffix); bubble : a GtkPlotBubble. suffix : Property Details The <literal>"labels-precision"</literal> property GtkPlotBubble:labels-precision "labels-precision" gint : Read / Write Labels Precision.Allowed values: >= 0 Default value: 0 The <literal>"labels-prefix"</literal> property GtkPlotBubble:labels-prefix "labels-prefix" gchar* : Read / Write Labels Prefix.Default value: NULL The <literal>"labels-style"</literal> property GtkPlotBubble:labels-style "labels-style" gint : Read / Write Labels Style.Allowed values: >= 0 Default value: 0 The <literal>"labels-suffix"</literal> property GtkPlotBubble:labels-suffix "labels-suffix" gchar* : Read / Write Labels Suffix.Default value: NULL The <literal>"scale-max"</literal> property GtkPlotBubble:scale-max "scale-max" gdouble : Read / Write Scale Max.Allowed values: >= 0 Default value: 0 The <literal>"show-scale"</literal> property GtkPlotBubble:show-scale "show-scale" gboolean : Read / Write Show scale in gradient legend.Default value: FALSE The <literal>"size-max"</literal> property GtkPlotBubble:size-max "size-max" gint : Read / Write Size Max.Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkiconlist.xml0000644000076400001440000021545312604172532017044 00000000000000 ]> GtkIconList 3 GTKEXTRA Library GtkIconList A file icon list widget for GTK. Synopsis #include <gtkextra.h> GtkIconList; enum GtkIconListMode; GtkIconListItem; GtkWidget* gtk_icon_list_new (guint icon_width, GtkIconListMode mode); void gtk_icon_list_construct (GtkIconList *iconlist, guint icon_width, GtkIconListMode mode); void gtk_icon_list_set_mode (GtkIconList *iconlist, GtkIconListMode mode); GtkIconListMode gtk_icon_list_get_mode (GtkIconList *iconlist); void gtk_icon_list_set_editable (GtkIconList *iconlist, gboolean editable); gboolean gtk_icon_list_is_editable (GtkIconList *iconlist); void gtk_icon_list_set_row_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_row_spacing (GtkIconList *iconlist); void gtk_icon_list_set_col_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_col_spacing (GtkIconList *iconlist); void gtk_icon_list_set_text_space (GtkIconList *iconlist, guint text_space); guint gtk_icon_list_get_text_space (GtkIconList *iconlist); void gtk_icon_list_set_icon_border (GtkIconList *iconlist, guint border); guint gtk_icon_list_get_icon_border (GtkIconList *iconlist); void gtk_icon_list_set_icon_width (GtkIconList *iconlist, guint width); guint gtk_icon_list_get_icon_width (GtkIconList *iconlist); void gtk_icon_list_freeze (GtkIconList *iconlist); void gtk_icon_list_thaw (GtkIconList *iconlist); void gtk_icon_list_set_background (GtkIconList *iconlist, GdkColor *color); GtkIconListItem * gtk_icon_list_add_from_pixmap (GtkIconList *icon_list, GdkPixmap *pixmap, GdkBitmap *bitmap_mask, const gchar *label, gpointer link); GtkIconListItem * gtk_icon_list_add_from_data (GtkIconList *iconlist, gchar **data, const gchar *label, gpointer link); GtkIconListItem * gtk_icon_list_add (GtkIconList *iconlist, const gchar *pixmap_file, const gchar *label, gpointer link); GtkIconListItem * gtk_icon_list_get_nth (GtkIconList *iconlist, guint n); gint gtk_icon_list_get_index (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_remove (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_set_active_icon (GtkIconList *iconlist, GtkIconListItem *icon); void gtk_icon_list_remove_nth (GtkIconList *iconlist, guint n); void gtk_icon_list_update (GtkIconList *iconlist); void gtk_icon_list_clear (GtkIconList *iconlist); void gtk_icon_list_link (GtkIconListItem *item, gpointer data); gpointer gtk_icon_list_get_link (GtkIconListItem *item); GtkIconListItem * gtk_icon_list_get_icon_from_link (GtkIconList *iconlist, gpointer data); GtkIconListItem * gtk_icon_list_get_icon_at (GtkIconList *iconlist, gint x, gint y); GtkIconListItem * gtk_icon_list_get_active_icon (GtkIconList *iconlist); GtkWidget * gtk_icon_list_get_entry (GtkIconListItem *item); GtkWidget * gtk_icon_list_get_pixmap (GtkIconListItem *item); void gtk_icon_list_set_pixmap (GtkIconListItem *item, GdkPixmap *pixmap, GdkBitmap *bitmap_mask); void gtk_icon_list_set_label (GtkIconList *iconlist, GtkIconListItem *item, const gchar *label); void gtk_icon_list_set_selection_mode (GtkIconList *iconlist, gint mode); void gtk_icon_list_select_icon (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_unselect_icon (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_unselect_all (GtkIconList *iconlist); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkFixed +----GtkIconList +----GtkFileList Implemented Interfaces GtkIconList implements AtkImplementorIface and GtkBuildable. Signals "activate-icon" : Run Last "click-event" : Run Last "deactivate-icon" : Run Last "select-icon" : Run Last "text-changed" : Run Last "unselect-icon" : Run First Description GtkIconList is a GtkFixed subclass that allows you to display a table of xpm icons with editable labels. It's completely designed from scratch with some ideas borrowed from gnome-icon-list. It contains almost all of its features and more. It can be used for file browsers and as a replacement of gnome-icon-list (without the need of using gnome libraries). Like GtkSheet, it uses the widget GtkItemEntry to edit the text fields. Details GtkIconList GtkIconListtypedef struct _GtkIconList GtkIconList; The GtkIconList structure contains only private data. It should only be accessed through the functions described below. enum GtkIconListMode GtkIconListModetypedef enum { GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW, } GtkIconListMode; GtkIconListItem GtkIconListItemtypedef struct { } GtkIconListItem; The GtkIconListItem structure contains only private data. It should only be accessed through the functions described below. gtk_icon_list_new () gtk_icon_list_newGtkWidget* gtk_icon_list_new (guint icon_width, GtkIconListMode mode); Creates a new GtkIconList widget. icon_width : the width of the icon mode : GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW Returns : the newly-created GtkIconList widget. gtk_icon_list_construct () gtk_icon_list_constructvoid gtk_icon_list_construct (GtkIconList *iconlist, guint icon_width, GtkIconListMode mode); Initialize iconlist structure. iconlist : GtkIconList widget created with gtk_icon_list_new(). icon_width : the width of the icon mode : GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW gtk_icon_list_set_mode () gtk_icon_list_set_modevoid gtk_icon_list_set_mode (GtkIconList *iconlist, GtkIconListMode mode); Set the icons display mode . iconlist : GtkIconList widget created with gtk_icon_list_new(). mode : GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW gtk_icon_list_get_mode () gtk_icon_list_get_modeGtkIconListMode gtk_icon_list_get_mode (GtkIconList *iconlist); Get the icons display mode . iconlist : a GtkIconList widget created with gtk_icon_list_new(). Returns : GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW gtk_icon_list_set_editable () gtk_icon_list_set_editablevoid gtk_icon_list_set_editable (GtkIconList *iconlist, gboolean editable); Set if the user can edit the text in the editable widget or not. iconlist : GtkIconList widget created with gtk_icon_list_new(). editable : TUE or FALSE gtk_icon_list_is_editable () gtk_icon_list_is_editablegboolean gtk_icon_list_is_editable (GtkIconList *iconlist); Get the editable status of icon list. iconlist : GtkIconList widget created with gtk_icon_list_new(). Returns : TRUE or FALSE gtk_icon_list_set_row_spacing () gtk_icon_list_set_row_spacingvoid gtk_icon_list_set_row_spacing (GtkIconList *iconlist, guint spacing); Set the icon spacing between rows. iconlist : GtkIconList widget created with gtk_icon_list_new(). spacing : spacing between rows in pixels. gtk_icon_list_get_row_spacing () gtk_icon_list_get_row_spacingguint gtk_icon_list_get_row_spacing (GtkIconList *iconlist); Get the spacing between rows. iconlist : GtkIconList widget created with gtk_icon_list_new(). Returns : spacing between rows in pixels. gtk_icon_list_set_col_spacing () gtk_icon_list_set_col_spacingvoid gtk_icon_list_set_col_spacing (GtkIconList *iconlist, guint spacing); Set the icon spacing between columns. iconlist : GtkIconList widget created with gtk_icon_list_new(). spacing : spacing between columns in pixels. gtk_icon_list_get_col_spacing () gtk_icon_list_get_col_spacingguint gtk_icon_list_get_col_spacing (GtkIconList *iconlist); Get the spacing between columns. iconlist : GtkIconList widget created with gtk_icon_list_new(). Returns : spacing between columns in pixels. gtk_icon_list_set_text_space () gtk_icon_list_set_text_spacevoid gtk_icon_list_set_text_space (GtkIconList *iconlist, guint text_space); Set the text max size in pixels. iconlist : a GtkIconList widget created with gtk_icon_list_new(). text_space : distance in pixels. gtk_icon_list_get_text_space () gtk_icon_list_get_text_spaceguint gtk_icon_list_get_text_space (GtkIconList *iconlist); Get the text maximum size in pixels. iconlist : GtkIconList widget created with gtk_icon_list_new(). Returns : text maximum size distance in pixels. gtk_icon_list_set_icon_border () gtk_icon_list_set_icon_bordervoid gtk_icon_list_set_icon_border (GtkIconList *iconlist, guint border); Set the icon border. iconlist : a GtkIconList widget created with gtk_icon_list_new(). border : icon border in pixels. gtk_icon_list_get_icon_border () gtk_icon_list_get_icon_borderguint gtk_icon_list_get_icon_border (GtkIconList *iconlist); Get the icon border width. iconlist : GtkIconList widget created with gtk_icon_list_new(). Returns : icon border width in pixels. gtk_icon_list_set_icon_width () gtk_icon_list_set_icon_widthvoid gtk_icon_list_set_icon_width (GtkIconList *iconlist, guint width); Set the icon width. iconlist : a GtkIconList widget created with gtk_icon_list_new(). width : icon width in pixels. gtk_icon_list_get_icon_width () gtk_icon_list_get_icon_widthguint gtk_icon_list_get_icon_width (GtkIconList *iconlist); Get the icon width. iconlist : GtkIconList widget created with gtk_icon_list_new(). Returns : icon width in pixels. gtk_icon_list_freeze () gtk_icon_list_freezevoid gtk_icon_list_freeze (GtkIconList *iconlist); Freeze icon list. iconlist : GtkIconList widget created with gtk_icon_list_new(). gtk_icon_list_thaw () gtk_icon_list_thawvoid gtk_icon_list_thaw (GtkIconList *iconlist); Thaw(unfreeze) icon list. iconlist : GtkIconList widget created with gtk_icon_list_new(). gtk_icon_list_set_background () gtk_icon_list_set_backgroundvoid gtk_icon_list_set_background (GtkIconList *iconlist, GdkColor *color); Set the iconlist background color. iconlist : GtkIconList widget created with gtk_icon_list_new(). color : a GdkColor gtk_icon_list_add_from_pixmap () gtk_icon_list_add_from_pixmapGtkIconListItem * gtk_icon_list_add_from_pixmap (GtkIconList *icon_list, GdkPixmap *pixmap, GdkBitmap *bitmap_mask, const gchar *label, gpointer link); Add a icon to the icon list. icon_list : a GtkIconList widget created with gtk_icon_list_new(). pixmap : a GdkPixmap bitmap_mask : a GdkBitmap label : label of the icon link : a gpointer link to some data Returns : the icon pointer gtk_icon_list_add_from_data () gtk_icon_list_add_from_dataGtkIconListItem * gtk_icon_list_add_from_data (GtkIconList *iconlist, gchar **data, const gchar *label, gpointer link); Add a icon to the icon list. iconlist : a GtkIconList widget created with gtk_icon_list_new(). data : pointer to the xpm data string label : label of the icon link : a data pointer Returns : the icon pointer gtk_icon_list_add () gtk_icon_list_addGtkIconListItem * gtk_icon_list_add (GtkIconList *iconlist, const gchar *pixmap_file, const gchar *label, gpointer link); Add a icon to the icon list. iconlist : GtkIconList widget created with gtk_icon_list_new(). pixmap_file : from #include "file.xpm" label : label of the icon link : link Returns : the icon pointer gtk_icon_list_get_nth () gtk_icon_list_get_nthGtkIconListItem * gtk_icon_list_get_nth (GtkIconList *iconlist, guint n); Get nth icon from the icon list. iconlist : GtkIconList widget created with gtk_icon_list_new(). n : icon index number. Returns : a GtkIconListItem gtk_icon_list_get_index () gtk_icon_list_get_indexgint gtk_icon_list_get_index (GtkIconList *iconlist, GtkIconListItem *item); Get the index number of the icon specified by its GtkIconListItem pointer. iconlist : GtkIconList widget created with gtk_icon_list_new(). item : a GtkIconListItem Returns : icon index number gtk_icon_list_remove () gtk_icon_list_removevoid gtk_icon_list_remove (GtkIconList *iconlist, GtkIconListItem *item); Remove the icon from the iconlist. iconlist : a GtkIconList widget created with gtk_icon_list_new(). item : a GtkIconListItem gtk_icon_list_set_active_icon () gtk_icon_list_set_active_iconvoid gtk_icon_list_set_active_icon (GtkIconList *iconlist, GtkIconListItem *icon); Set an active icon in the icon list. iconlist : GtkIconList widget created with gtk_icon_list_new(). icon : a GtkIconListItem gtk_icon_list_remove_nth () gtk_icon_list_remove_nthvoid gtk_icon_list_remove_nth (GtkIconList *iconlist, guint n); Remove nth icon from the iconlist. iconlist : GtkIconList widget created with gtk_icon_list_new(). n : icon index number gtk_icon_list_update () gtk_icon_list_updatevoid gtk_icon_list_update (GtkIconList *iconlist); Update the icon list widget.. iconlist : GtkIconList widget created with gtk_icon_list_new(). gtk_icon_list_clear () gtk_icon_list_clearvoid gtk_icon_list_clear (GtkIconList *iconlist); Clear the icon list widget. iconlist : GtkIconList widget created with gtk_icon_list_new(). gtk_icon_list_link () gtk_icon_list_linkvoid gtk_icon_list_link (GtkIconListItem *item, gpointer data); Add a gpointer link to a icon from the iconlist. item : GtkIconListItem data : a gpointer to some data gtk_icon_list_get_link () gtk_icon_list_get_linkgpointer gtk_icon_list_get_link (GtkIconListItem *item); Add a gpointer link to a icon from the iconlist. item : a GtkIconListItem Returns : (transfer none) a gpointer to some data sed with gtk_icon_list_link(). gtk_icon_list_get_icon_from_link () gtk_icon_list_get_icon_from_linkGtkIconListItem * gtk_icon_list_get_icon_from_link (GtkIconList *iconlist, gpointer data); Gets the icon pointer from the link attached to it. iconlist : GtkIconList widget created with gtk_icon_list_new(). data : a gpointer to some data Returns : a GtkIconListItem gtk_icon_list_get_icon_at () gtk_icon_list_get_icon_atGtkIconListItem * gtk_icon_list_get_icon_at (GtkIconList *iconlist, gint x, gint y); Get the icon situated at x,y coordinates in icon list. iconlist : GtkIconList widget created with gtk_icon_list_new(). x : x coordindate y : y coordinate Returns : the icon pointer gtk_icon_list_get_active_icon () gtk_icon_list_get_active_iconGtkIconListItem * gtk_icon_list_get_active_icon (GtkIconList *iconlist); Set the iconlist background color. iconlist : GtkIconList widget created with gtk_icon_list_new(). Returns : the icon pointer gtk_icon_list_get_entry () gtk_icon_list_get_entryGtkWidget * gtk_icon_list_get_entry (GtkIconListItem *item); Get the item->entry. item : a GtkIconListItem Returns : (transfer none) a GtkWidget gtk_icon_list_get_pixmap () gtk_icon_list_get_pixmapGtkWidget * gtk_icon_list_get_pixmap (GtkIconListItem *item); Get the icon pixmap. item : a GtkIconListItem Returns : (transfer none) a GtkWidget gtk_icon_list_set_pixmap () gtk_icon_list_set_pixmapvoid gtk_icon_list_set_pixmap (GtkIconListItem *item, GdkPixmap *pixmap, GdkBitmap *bitmap_mask); Set the icon pixmap. item : a GtkIconListItem pixmap : a GdkPixmap bitmap_mask : a GdkBitmap gtk_icon_list_set_label () gtk_icon_list_set_labelvoid gtk_icon_list_set_label (GtkIconList *iconlist, GtkIconListItem *item, const gchar *label); Set the icon label. iconlist : GtkIconList widget created with gtk_icon_list_new(). item : a GtkIconListItem label : icon label gtk_icon_list_set_selection_mode () gtk_icon_list_set_selection_modevoid gtk_icon_list_set_selection_mode (GtkIconList *iconlist, gint mode); Set the icon selection mode. iconlist : GtkIconList widget created with gtk_icon_list_new(). mode : GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW gtk_icon_list_select_icon () gtk_icon_list_select_iconvoid gtk_icon_list_select_icon (GtkIconList *iconlist, GtkIconListItem *item); Select the icon specified by pointer. iconlist : GtkIconList widget created with gtk_icon_list_new(). item : a GtkIconListItem gtk_icon_list_unselect_icon () gtk_icon_list_unselect_iconvoid gtk_icon_list_unselect_icon (GtkIconList *iconlist, GtkIconListItem *item); Unselect the icon specified by pointer. iconlist : GtkIconList widget created with gtk_icon_list_new(). item : a GtkIconListItem gtk_icon_list_unselect_all () gtk_icon_list_unselect_allvoid gtk_icon_list_unselect_all (GtkIconList *iconlist); Unselect all icons. iconlist : GtkIconList widget created with gtk_icon_list_new(). Signal Details The <literal>"activate-icon"</literal> signal GtkIconList::activate-icongboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, gpointer user_data) : Run Last iconlist : the object which received the signal. arg1 : user_data : user data set when the signal handler was connected. Returns : The <literal>"click-event"</literal> signal GtkIconList::click-eventvoid user_function (GtkIconList *iconlist, GdkEvent *event, gpointer user_data) : Run Last iconlist : the object which received the signal. event : user_data : user data set when the signal handler was connected. The <literal>"deactivate-icon"</literal> signal GtkIconList::deactivate-icongboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, gpointer user_data) : Run Last iconlist : the object which received the signal. arg1 : user_data : user data set when the signal handler was connected. Returns : The <literal>"select-icon"</literal> signal GtkIconList::select-icongboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, GdkEvent *event, gpointer user_data) : Run Last iconlist : the object which received the signal. arg1 : event : user_data : user data set when the signal handler was connected. Returns : The <literal>"text-changed"</literal> signal GtkIconList::text-changedgboolean user_function (GtkIconList *iconlist, GtkIconListItem *arg1, gchar *arg2, gpointer user_data) : Run Last iconlist : the object which received the signal. arg1 : arg2 : user_data : user data set when the signal handler was connected. Returns : The <literal>"unselect-icon"</literal> signal GtkIconList::unselect-iconvoid user_function (GtkIconList *iconlist, GtkIconListItem *arg1, GdkEvent *event, gpointer user_data) : Run First iconlist : the object which received the signal. arg1 : event : user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtkplotcanvasrectangle.xml0000644000076400001440000002674412604172532021262 00000000000000 ]> GtkPlotCanvasRectangle 3 GTKEXTRA Library GtkPlotCanvasRectangle Synopsis #include <gtkextra.h> GtkPlotCanvasRectangle; GtkPlotCanvasChild * gtk_plot_canvas_rectangle_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill); void gtk_plot_canvas_rectangle_set_attributes (GtkPlotCanvasRectangle *rectangle, GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotCanvasChild +----GtkPlotCanvasRectangle Properties "border" gint : Read / Write "color-bg" gpointer : Read / Write "filled" gboolean : Read / Write "line" gpointer : Read / Write "shadow-width" gint : Read / Write Description FIXME:: need long description Details GtkPlotCanvasRectangle GtkPlotCanvasRectangletypedef struct _GtkPlotCanvasRectangle GtkPlotCanvasRectangle; The GtkPlotCanvasRectangle struct contains only private data. It should only be accessed through the functions described below. gtk_plot_canvas_rectangle_new () gtk_plot_canvas_rectangle_newGtkPlotCanvasChild * gtk_plot_canvas_rectangle_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill); style : width : fg : bg : border : fill : Returns : gtk_plot_canvas_rectangle_set_attributes () gtk_plot_canvas_rectangle_set_attributesvoid gtk_plot_canvas_rectangle_set_attributes (GtkPlotCanvasRectangle *rectangle, GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill); rectangle : a GtkPlotCanvasRectangle style : width : fg : bg : border : fill : Property Details The <literal>"border"</literal> property GtkPlotCanvasRectangle:border "border" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"color-bg"</literal> property GtkPlotCanvasRectangle:color-bg "color-bg" gpointer : Read / Write Filling Color. The <literal>"filled"</literal> property GtkPlotCanvasRectangle:filled "filled" gboolean : Read / Write Default value: FALSE The <literal>"line"</literal> property GtkPlotCanvasRectangle:line "line" gpointer : Read / Write The <literal>"shadow-width"</literal> property GtkPlotCanvasRectangle:shadow-width "shadow-width" gint : Read / Write Shadow Width.Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkplotbox.xml0000644000076400001440000001313012604172532016673 00000000000000 ]> GtkPlotBox 3 GTKEXTRA Library GtkPlotBox Synopsis #include <gtkextra.h> GtkPlotBox; GtkWidget* gtk_plot_box_new (GtkOrientation orientation); void gtk_plot_box_construct (GtkPlotBox *box, GtkOrientation orientation); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotBox Implemented Interfaces GtkPlotBox implements AtkImplementorIface and GtkBuildable. Properties "orientation" GtkOrientation : Read / Write Description FIXME:: need long description. Details GtkPlotBox GtkPlotBoxtypedef struct _GtkPlotBox GtkPlotBox; The GtkPlotBox struct contains only private data. It should only be accessed through the functions described below. gtk_plot_box_new () gtk_plot_box_newGtkWidget* gtk_plot_box_new (GtkOrientation orientation); Create a new GtkPlotBox widget. orientation : GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. Returns : a new GtkWidget. gtk_plot_box_construct () gtk_plot_box_constructvoid gtk_plot_box_construct (GtkPlotBox *box, GtkOrientation orientation); Initializes a GtkPlotBar structure. box : a GtkPlotBox widget. orientation : GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. Property Details The <literal>"orientation"</literal> property GtkPlotBox:orientation "orientation" GtkOrientation : Read / Write Orientation.Default value: GTK_ORIENTATION_HORIZONTAL gtkextra-3.2.0/docs/reference/xml/api-index-deprecated.xml0000644000076400001440000000127512604172532020461 00000000000000 ]> G GtkPlotCanvasFlag GtkSheet:autoresize gtkextra-3.2.0/docs/reference/xml/gtkplotcsurface.xml0000644000076400001440000006167712604172532017721 00000000000000 ]> GtkPlotCSurface 3 GTKEXTRA Library GtkPlotCSurface Synopsis #include <gtkextra.h> GtkPlotCSurface; enum GtkPlotProjection; GtkWidget* gtk_plot_csurface_new (void); GtkWidget* gtk_plot_csurface_new_function (GtkPlotFunc3D function); void gtk_plot_csurface_construct_function (GtkPlotCSurface *csurface, GtkPlotFunc3D function); void gtk_plot_csurface_set_lines_visible (GtkPlotCSurface *csurface, gboolean visible); gboolean gtk_plot_csurface_get_lines_visible (GtkPlotCSurface *csurface); void gtk_plot_csurface_set_projection (GtkPlotCSurface *csurface, GtkPlotProjection proj); GtkPlotProjection gtk_plot_csurface_projection (GtkPlotCSurface *csurface); void gtk_plot_csurface_set_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_csurface_set_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_csurface_get_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); void gtk_plot_csurface_get_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotSurface +----GtkPlotCSurface Implemented Interfaces GtkPlotCSurface implements AtkImplementorIface and GtkBuildable. Properties "levels-color" gpointer : Read / Write "levels-style" gint : Read / Write "levels-width" gdouble : Read / Write "lines-visible" gint : Read / Write "projection" gint : Read / Write "sublevels-color" gpointer : Read / Write "sublevels-style" gint : Read / Write "sublevels-width" gdouble : Read / Write Description FIXME:: need long description Details GtkPlotCSurface GtkPlotCSurfacetypedef struct _GtkPlotCSurface GtkPlotCSurface; The GtkPlotCSurface struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotProjection GtkPlotProjectiontypedef enum { GTK_PLOT_PROJECT_NONE, /* draw surface with no projections */ GTK_PLOT_PROJECT_EMPTY, /* draw empty contours -- lines only. Notice that the style of the lines is given by levels/sublevels_line. You should set to GTK_PLOT_LINE_NONE if you don't want the lines drawn */ GTK_PLOT_PROJECT_FULL, /* draw filled contours */ } GtkPlotProjection; gtk_plot_csurface_new () gtk_plot_csurface_newGtkWidget* gtk_plot_csurface_new (void); Returns : gtk_plot_csurface_new_function () gtk_plot_csurface_new_functionGtkWidget* gtk_plot_csurface_new_function (GtkPlotFunc3D function); function : a GtkPlotFunc3D. scope async. Returns : gtk_plot_csurface_construct_function () gtk_plot_csurface_construct_functionvoid gtk_plot_csurface_construct_function (GtkPlotCSurface *csurface, GtkPlotFunc3D function); csurface : function : a GtkPlotFunc3D. scope async. gtk_plot_csurface_set_lines_visible () gtk_plot_csurface_set_lines_visiblevoid gtk_plot_csurface_set_lines_visible (GtkPlotCSurface *csurface, gboolean visible); csurface : a GtkPlotCSurface/ visible : gtk_plot_csurface_get_lines_visible () gtk_plot_csurface_get_lines_visiblegboolean gtk_plot_csurface_get_lines_visible (GtkPlotCSurface *csurface); csurface : a GtkPlotCSurface. Returns : gtk_plot_csurface_set_projection () gtk_plot_csurface_set_projectionvoid gtk_plot_csurface_set_projection (GtkPlotCSurface *csurface, GtkPlotProjection proj); csurface : a GtkPlotCSurface. proj : gtk_plot_csurface_projection () gtk_plot_csurface_projectionGtkPlotProjection gtk_plot_csurface_projection (GtkPlotCSurface *csurface); csurface : a GtkPlotCSurface. Returns : gtk_plot_csurface_set_levels_attributes () gtk_plot_csurface_set_levels_attributesvoid gtk_plot_csurface_set_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color); dataset : a GtkPlotCSurface. style : width : color : gtk_plot_csurface_set_sublevels_attributes () gtk_plot_csurface_set_sublevels_attributesvoid gtk_plot_csurface_set_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color); dataset : a GtkPlotCSurface. style : width : color : gtk_plot_csurface_get_levels_attributes () gtk_plot_csurface_get_levels_attributesvoid gtk_plot_csurface_get_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); dataset : a GtkPlotCSurface. style : width : color : gtk_plot_csurface_get_sublevels_attributes () gtk_plot_csurface_get_sublevels_attributesvoid gtk_plot_csurface_get_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); dataset : a GtkPlotCSurface. style : width : color : Property Details The <literal>"levels-color"</literal> property GtkPlotCSurface:levels-color "levels-color" gpointer : Read / Write The <literal>"levels-style"</literal> property GtkPlotCSurface:levels-style "levels-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"levels-width"</literal> property GtkPlotCSurface:levels-width "levels-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"lines-visible"</literal> property GtkPlotCSurface:lines-visible "lines-visible" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"projection"</literal> property GtkPlotCSurface:projection "projection" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"sublevels-color"</literal> property GtkPlotCSurface:sublevels-color "sublevels-color" gpointer : Read / Write The <literal>"sublevels-style"</literal> property GtkPlotCSurface:sublevels-style "sublevels-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"sublevels-width"</literal> property GtkPlotCSurface:sublevels-width "sublevels-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 gtkextra-3.2.0/docs/reference/xml/gtkcheckitem.xml0000644000076400001440000001370212604172532017145 00000000000000 ]> GtkCheckItem 3 GTKEXTRA Library GtkCheckItem Check item widget for Gtk Synopsis #include <gtkextra.h> GtkCheckItem; GtkWidget* gtk_check_item_new (void); GtkWidget* gtk_check_item_new_with_label (const gchar *label); void gtk_check_item_construct_with_label (GtkCheckItem *check_item, const gchar *label); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkButton +----GtkToggleButton +----GtkCheckItem Implemented Interfaces GtkCheckItem implements AtkImplementorIface, GtkBuildable and GtkActivatable. Description It is a GtkCheckButton hack with the look and feel of the Redmond95 theme. Details GtkCheckItem GtkCheckItemtypedef struct _GtkCheckItem GtkCheckItem; The GtkCheckItem struct contains only private data. It should only be accessed through the functions described below. gtk_check_item_new () gtk_check_item_newGtkWidget* gtk_check_item_new (void); Returns : gtk_check_item_new_with_label () gtk_check_item_new_with_labelGtkWidget* gtk_check_item_new_with_label (const gchar *label); Create a GtkCheckItem widget with a specified label. label : text near the check item Returns : the newly-created GtkCheckItem. gtk_check_item_construct_with_label () gtk_check_item_construct_with_labelvoid gtk_check_item_construct_with_label (GtkCheckItem *check_item, const gchar *label); Initialize a GtkCheckItem widget with a specified label. check_item : a GtkCheckItem widget label : text near the check item gtkextra-3.2.0/docs/reference/xml/gtkitementry.xml0000644000076400001440000003143112604172532017230 00000000000000 ]> GtkItemEntry 3 GTKEXTRA Library GtkItemEntry An item entry widget. Synopsis #include <gtkextra.h> GtkItemEntry; GtkWidget * gtk_item_entry_new (void); GtkWidget * gtk_item_entry_new_with_max_length (gint max); void gtk_item_entry_set_text (GtkItemEntry *entry, const gchar *text, GtkJustification justification); void gtk_item_entry_set_justification (GtkItemEntry *entry, GtkJustification just); gint gtk_item_entry_get_max_length_bytes (GtkItemEntry *item_entry); void gtk_item_entry_set_max_length_bytes (GtkItemEntry *item_entry, gint max_length_bytes); gboolean gtk_item_entry_get_cursor_visible (GtkItemEntry *entry); void gtk_item_entry_set_cursor_visible (GtkItemEntry *entry, gboolean visible); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkEntry +----GtkItemEntry Implemented Interfaces GtkItemEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable. Description Originally GtkSheetEntry. This widget allows to change colors and justification and can be dinamically resized. Details GtkItemEntry GtkItemEntrytypedef struct _GtkItemEntry GtkItemEntry; The GtkItemEntry struct contains only private data. It should only be accessed through the functions described below. gtk_item_entry_new () gtk_item_entry_newGtkWidget * gtk_item_entry_new (void); Returns : gtk_item_entry_new_with_max_length () gtk_item_entry_new_with_max_lengthGtkWidget * gtk_item_entry_new_with_max_length (gint max); Creates a new GtkItemEntry with the maximum allowed number of characters in the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit. max : the maximum character length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536. Returns : the newly-created GtkItemEntry widget. gtk_item_entry_set_text () gtk_item_entry_set_textvoid gtk_item_entry_set_text (GtkItemEntry *entry, const gchar *text, GtkJustification justification); Sets the text in the widget to the given value, replacing the current contents. entry : a GtkItemEntry text : the new text justification : a GtkJustification : GTK_JUSTIFY_LEFT,GTK_JUSTIFY_RIGHT,GTK_JUSTIFY_CENTER,GTK_JUSTIFY_FILL gtk_item_entry_set_justification () gtk_item_entry_set_justificationvoid gtk_item_entry_set_justification (GtkItemEntry *entry, GtkJustification just); Sets justification of the widget to the given value, replacing the current one. entry : a GtkItemEntry just : a GtkJustification : GTK_JUSTIFY_LEFT,GTK_JUSTIFY_RIGHT,GTK_JUSTIFY_CENTER,GTK_JUSTIFY_FILL gtk_item_entry_get_max_length_bytes () gtk_item_entry_get_max_length_bytesgint gtk_item_entry_get_max_length_bytes (GtkItemEntry *item_entry); Retrieves the maximum byte length for the contents of GtkItemEntry. item_entry : a GtkItemEntry Returns : maximum byte length or 0. Since 3.0.6 gtk_item_entry_set_max_length_bytes () gtk_item_entry_set_max_length_bytesvoid gtk_item_entry_set_max_length_bytes (GtkItemEntry *item_entry, gint max_length_bytes); Sets the maximum byte length for the contents of the GtkItemEntry. Existing content will not be truncted. item_entry : a GtkItemEntry max_length_bytes : maximum byte length or 0 Since 3.0.6 gtk_item_entry_get_cursor_visible () gtk_item_entry_get_cursor_visiblegboolean gtk_item_entry_get_cursor_visible (GtkItemEntry *entry); entry : Returns : gtk_item_entry_set_cursor_visible () gtk_item_entry_set_cursor_visiblevoid gtk_item_entry_set_cursor_visible (GtkItemEntry *entry, gboolean visible); entry : visible : gtkextra-3.2.0/docs/reference/xml/gtkplotps.xml0000644000076400001440000004156612604172532016543 00000000000000 ]> GtkPlotPS 3 GTKEXTRA Library GtkPlotPS postscript driver Synopsis #include <gtkextra.h> GtkPlotPS; GtkObject * gtk_plot_ps_new (const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley); GtkObject * gtk_plot_ps_new_with_size (const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley); void gtk_plot_ps_construct (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley); void gtk_plot_ps_construct_with_size (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley); void gtk_plot_ps_set_size (GtkPlotPS *ps, gint units, gdouble width, gdouble height); void gtk_plot_ps_set_scale (GtkPlotPS *ps, gdouble scalex, gdouble scaley); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotPC +----GtkPlotPS Description Subclass of GtkPlotPC used to generate PostScript output. Details GtkPlotPS GtkPlotPStypedef struct _GtkPlotPS GtkPlotPS; gtk_plot_ps_new () gtk_plot_ps_newGtkObject * gtk_plot_ps_new (const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley); psname : orientation : epsflag : page_size : scalex : scaley : Returns : a new GtkObject. gtk_plot_ps_new_with_size () gtk_plot_ps_new_with_sizeGtkObject * gtk_plot_ps_new_with_size (const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley); psname : orientation : epsflag : units : width : height : scalex : scaley : Returns : a new GtkObject. gtk_plot_ps_construct () gtk_plot_ps_constructvoid gtk_plot_ps_construct (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley); ps : a GtkPlotPS psname : orientation : epsflag : page_size : scalex : scaley : gtk_plot_ps_construct_with_size () gtk_plot_ps_construct_with_sizevoid gtk_plot_ps_construct_with_size (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley); ps : a GtkPlotPS psname : orientation : epsflag : units : width : height : scalex : scaley : gtk_plot_ps_set_size () gtk_plot_ps_set_sizevoid gtk_plot_ps_set_size (GtkPlotPS *ps, gint units, gdouble width, gdouble height); ps : a GtkPlotPS units : width : height : gtk_plot_ps_set_scale () gtk_plot_ps_set_scalevoid gtk_plot_ps_set_scale (GtkPlotPS *ps, gdouble scalex, gdouble scaley); ps : a GtkPlotPS scalex : scaley : gtkextra-3.2.0/docs/reference/xml/gtkdataentry.xml0000644000076400001440000005521412604172532017210 00000000000000 ]> GtkDataEntry 3 GTKEXTRA Library GtkDataEntry a data entry widget, based on GtkEntry Synopsis #include <gtkextra.h> GtkDataEntry; GtkDataEntry * gtk_data_entry_new (void); const gchar * gtk_data_entry_get_description (GtkDataEntry *data_entry); void gtk_data_entry_set_description (GtkDataEntry *data_entry, const gchar *description); const gchar * gtk_data_entry_get_data_type (GtkDataEntry *data_entry); void gtk_data_entry_set_data_type (GtkDataEntry *data_entry, const gchar *data_type); const gchar * gtk_data_entry_get_data_format (GtkDataEntry *data_entry); void gtk_data_entry_set_data_format (GtkDataEntry *data_entry, const gchar *data_format); const gchar * gtk_data_entry_get_text (GtkDataEntry *data_entry); void gtk_data_entry_set_text (GtkDataEntry *data_entry, const gchar *text); gint gtk_data_entry_get_max_length_bytes (GtkDataEntry *data_entry); void gtk_data_entry_set_max_length_bytes (GtkDataEntry *data_entry, gint max_length_bytes); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkEntry +----GtkDataEntry Implemented Interfaces GtkDataEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable. Properties "dataformat" gchar* : Read / Write "datatype" gchar* : Read / Write "description" gchar* : Read / Write "max-length-bytes" gint : Read / Write "text" gchar* : Read / Write Description GtkDataEntry provides additional properties: - "description" - no functionality, a place for private information that cannot be put anywhere else - "datatype" - no functionality, a datatype hint for the application because any widget content is text - "dataformat" - a formatting instruction that controls what you see when the widget doesn't have input focus - "text" - set the contents of the widget. if the widget doesn't have input focus text will be formatted according to the data_format - "max-length-bytes" - set the maximum byte length for the contents of the widget. The main reason for this widget is to provide a formatting entry widget for numeric data like integer, float, money which also supports NULL values (GtkSpinButton is nice but doesn't support empty field values). Handling of Null values is supported by all SQL database systems. The Null values are represented by empty field contents. When editing field contents, all data formatting is removed before the focus enters the widget. As soon as the focus leaves the widget, data will be nicely formatted again. As an additional feature, the minus sign (negative numbers) can be entered at the end of the data. As soon as you leave the field it will be placed properly in front of the number. See also: gtk_data_format() Details GtkDataEntry GtkDataEntrytypedef struct _GtkDataEntry GtkDataEntry; The GtkDataEntry struct contains only private data. It should only be accessed through the functions described below. gtk_data_entry_new () gtk_data_entry_newGtkDataEntry * gtk_data_entry_new (void); Creates a new GtkDataEntry Widget. Returns : the new GtkDataEntry Widget gtk_data_entry_get_description () gtk_data_entry_get_descriptionconst gchar * gtk_data_entry_get_description (GtkDataEntry *data_entry); Retrieves the GtkDataEntry description. data_entry : a GtkDataEntry Returns : a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored. gtk_data_entry_set_description () gtk_data_entry_set_descriptionvoid gtk_data_entry_set_description (GtkDataEntry *data_entry, const gchar *description); Sets the GtkDataEntry description. data_entry : a GtkDataEntry description : the description or NULL gtk_data_entry_get_data_type () gtk_data_entry_get_data_typeconst gchar * gtk_data_entry_get_data_type (GtkDataEntry *data_entry); Retrieves the GtkDataEntry data_type. data_entry : a GtkDataEntry Returns : a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored. gtk_data_entry_set_data_type () gtk_data_entry_set_data_typevoid gtk_data_entry_set_data_type (GtkDataEntry *data_entry, const gchar *data_type); Sets the GtkDataEntry data type for application use. data_entry : a GtkDataEntry data_type : the data type or NULL gtk_data_entry_get_data_format () gtk_data_entry_get_data_formatconst gchar * gtk_data_entry_get_data_format (GtkDataEntry *data_entry); Retrieves the GtkDataEntry data_format. See gtk_data_format() for details. data_entry : a GtkDataEntry Returns : a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored. gtk_data_entry_set_data_format () gtk_data_entry_set_data_formatvoid gtk_data_entry_set_data_format (GtkDataEntry *data_entry, const gchar *data_format); Sets the GtkDataEntry data type for application use. The display will not be refreshed upon change. See gtk_data_format() for details. data_entry : a GtkDataEntry data_format : the data type or NULL gtk_data_entry_get_text () gtk_data_entry_get_textconst gchar * gtk_data_entry_get_text (GtkDataEntry *data_entry); Retrieves the GtkDataEntry contents. All formatting will be removed. data_entry : a GtkDataEntry Returns : a pointer to the contents of the widget as a string. This string points to internally allocated storage in the widget and must not be freed, modified or stored. gtk_data_entry_set_text () gtk_data_entry_set_textvoid gtk_data_entry_set_text (GtkDataEntry *data_entry, const gchar *text); Sets the GtkDataEntry contents. The contents will be formatted due to the current data_format. data_entry : a GtkDataEntry text : the contents to be set gtk_data_entry_get_max_length_bytes () gtk_data_entry_get_max_length_bytesgint gtk_data_entry_get_max_length_bytes (GtkDataEntry *data_entry); Retrieves the maximum byte length for the contents of GtkDataEntry. data_entry : a GtkDataEntry Returns : maximum byte length or 0. Since 3.0.6 gtk_data_entry_set_max_length_bytes () gtk_data_entry_set_max_length_bytesvoid gtk_data_entry_set_max_length_bytes (GtkDataEntry *data_entry, gint max_length_bytes); Sets the maximum byte length for the contents of the GtkDataEntry. Existing content will not be truncted. data_entry : a GtkDataEntry max_length_bytes : maximum byte length or 0 Since 3.0.6 Property Details The <literal>"dataformat"</literal> property GtkDataEntry:dataformat "dataformat" gchar* : Read / Write a formatting string that controls what you see when the widget doesn't contain input focus. See gtk_data_format() for details. Default value: "" The <literal>"datatype"</literal> property GtkDataEntry:datatype "datatype" gchar* : Read / Write no functionality, a datatype hint for the application because any widget content is text. Default value: "" The <literal>"description"</literal> property GtkDataEntry:description "description" gchar* : Read / Write Description of the GtkDataEntry, no functionality, a place for private information that cannot be put anywhere else. Default value: "" The <literal>"max-length-bytes"</literal> property GtkDataEntry:max-length-bytes "max-length-bytes" gint : Read / Write Set the maximum length in bytes for the GtkDataEntry. For details see gtk_data_entry_set_max_length_bytes. Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled. Allowed values: [0,65535] Default value: 0 Since 3.0.6 The <literal>"text"</literal> property GtkDataEntry:text "text" gchar* : Read / Write Set the contents of the GtkDataEntry. For details see gtk_data_entry_set_text. Default value: "" gtkextra-3.2.0/docs/reference/xml/gtktogglecombo.xml0000644000076400001440000003422112604172532017511 00000000000000 ]> GtkToggleCombo 3 GTKEXTRA Library GtkToggleCombo A toggle combo widget for GTK. Synopsis #include <gtkextra.h> GtkToggleCombo; GtkWidget* gtk_toggle_combo_new (gint nrows, gint ncols); void gtk_toggle_combo_construct (GtkToggleCombo *toggle_combo, gint nrows, gint ncols); gint gtk_toggle_combo_get_nrows (GtkToggleCombo *combo); gint gtk_toggle_combo_get_ncols (GtkToggleCombo *combo); void gtk_toggle_combo_select (GtkToggleCombo *toggle_combo, gint new_row, gint new_col); void gtk_toggle_combo_get_selection (GtkToggleCombo *combo, gint *row, gint *col); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----GtkComboButton +----GtkToggleCombo Implemented Interfaces GtkToggleCombo implements AtkImplementorIface, GtkBuildable and GtkOrientable. Signals "changed" : Run First Description A GtkToggleCombo is a GtkCombo which will remain 'pressed-in' when clicked. Clicking it again will cause the toggle combo to return to it's normal state. A toggle combo is created by calling gtk_toggle_combo_new(). The number of rows/columns may be find out by calling gtk_toggle_combo_get_nrows() or gtk_toggle_combo_get_ncols(). A combo row may be selected with gtk_toggle_combo_select().The current selection is returned by gtk_toggle_combo_get_selection(). Details GtkToggleCombo GtkToggleCombotypedef struct _GtkToggleCombo GtkToggleCombo; The GtkToggleCombo struct contains only private data. It should only be accessed through the functions described below. gtk_toggle_combo_new () gtk_toggle_combo_newGtkWidget* gtk_toggle_combo_new (gint nrows, gint ncols); Creates a new GtkToggleCombo widget with nrows rows and ncols columns. nrows : number of rows ncols : number of columns Returns : the newly-created GtkToggleCombo widget. gtk_toggle_combo_construct () gtk_toggle_combo_constructvoid gtk_toggle_combo_construct (GtkToggleCombo *toggle_combo, gint nrows, gint ncols); Initializes the GtkToggleCombo with nrows rows and ncols columns. toggle_combo : a GtkToggleCombo nrows : number of rows ncols : number of columns gtk_toggle_combo_get_nrows () gtk_toggle_combo_get_nrowsgint gtk_toggle_combo_get_nrows (GtkToggleCombo *combo); Get the number of rows in GtkToggleCombo. combo : a GtkToggleCombo Returns : number of rows gtk_toggle_combo_get_ncols () gtk_toggle_combo_get_ncolsgint gtk_toggle_combo_get_ncols (GtkToggleCombo *combo); Get the number of columns in GtkToggleCombo. combo : a GtkToggleCombo Returns : number of columns gtk_toggle_combo_select () gtk_toggle_combo_selectvoid gtk_toggle_combo_select (GtkToggleCombo *toggle_combo, gint new_row, gint new_col); Select the cell(row,col) from GtkToggleCombo. toggle_combo : a GtkToggleCombo new_row : number of row new_col : number of column gtk_toggle_combo_get_selection () gtk_toggle_combo_get_selectionvoid gtk_toggle_combo_get_selection (GtkToggleCombo *combo, gint *row, gint *col); Get the current selection(row,col) in GtkToggleCombo. combo : a GtkToggleCombo row : number of row col : number of column Signal Details The <literal>"changed"</literal> signal GtkToggleCombo::changedvoid user_function (GtkToggleCombo *toggle_combo, gint row, gint col, gpointer user_data) : Run First Emmited when the row,col are selected in GtkToggleCombo toggle_combo : the GtkToggleCombo object that received the signal row : row number col : column number user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/api-index-full.xml0000644000076400001440000060705012604172532017326 00000000000000 ]> G GtkBorderCombo GtkBorderCombo::changed GtkCharSelection GtkCheckItem GtkColorCombo GtkColorCombo::changed GtkComboButton GtkDataEntry GtkDataEntry:dataformat GtkDataEntry:datatype GtkDataEntry:description GtkDataEntry:max-length-bytes GtkDataEntry:text GtkDataTextView GtkDataTextView:description GtkDataTextView:max-length GtkDataTextView:max-length-bytes GtkDirTree GtkDirTreeNode gtkextra_binary_age GTKEXTRA_CHECK_VERSION gtkextra_check_version gtkextra_interface_age GTKEXTRA_MAJOR_VERSION gtkextra_major_version gtkextra_micro_version GTKEXTRA_MICRO_VERSION gtkextra_minor_version GTKEXTRA_MINOR_VERSION GtkFileList GtkFileListItem GtkFileListType GtkFontCombo GtkFontCombo::changed GtkIconFileSel GtkIconList GtkIconList::activate-icon GtkIconList::click-event GtkIconList::deactivate-icon GtkIconList::select-icon GtkIconList::text-changed GtkIconList::unselect-icon GtkIconListItem GtkIconListMode GtkItemEntry GtkPlot GtkPlot3D GtkPlot3D:a1 GtkPlot3D:a2 GtkPlot3D:a3 GtkPlot3D:center-vector GtkPlot3D:color-xy GtkPlot3D:color-yz GtkPlot3D:color-zx GtkPlot3D:corner-line GtkPlot3D:corner-visible GtkPlot3D:e1-vector GtkPlot3D:e2-vector GtkPlot3D:e3-vector GtkPlot3D:frame-line GtkPlot3D:origin-vector GtkPlot3D:titles-offset GtkPlot3D:xfactor GtkPlot3D:xy-label-mask GtkPlot3D:xy-major-mask GtkPlot3D:xy-minor-mask GtkPlot3D:xy-title-visible GtkPlot3D:xy-visible GtkPlot3D:xz-label-mask GtkPlot3D:xz-major-mask GtkPlot3D:xz-minor-mask GtkPlot3D:xz-title-visible GtkPlot3D:yfactor GtkPlot3D:yx-label-mask GtkPlot3D:yx-major-mask GtkPlot3D:yx-minor-mask GtkPlot3D:yx-title-visible GtkPlot3D:yz-label-mask GtkPlot3D:yz-major-mask GtkPlot3D:yz-minor-mask GtkPlot3D:yz-title-visible GtkPlot3D:yz-visible GtkPlot3D:zfactor GtkPlot3D:zmax GtkPlot3D:zmin GtkPlot3D:zscale GtkPlot3D:zx-label-mask GtkPlot3D:zx-major-mask GtkPlot3D:zx-minor-mask GtkPlot3D:zx-title-visible GtkPlot3D:zx-visible GtkPlot3D:zy-label-mask GtkPlot3D:zy-major-mask GtkPlot3D:zy-minor-mask GtkPlot3D:zy-title-visible GtkPlot::add-data GtkPlot::axis-changed GtkPlot::changed GtkPlot::moved GtkPlot::resized GtkPlot::update GtkPlot:allocation-height GtkPlot:allocation-width GtkPlot:allocation-x GtkPlot:allocation-y GtkPlot:bg-color GtkPlot:bg-pixmap GtkPlot:bottom-align GtkPlot:bottom-axis GtkPlot:clip-data GtkPlot:grids-on-top GtkPlot:height GtkPlot:left-align GtkPlot:left-axis GtkPlot:legends-attr-text GtkPlot:legends-border GtkPlot:legends-border-width GtkPlot:legends-height GtkPlot:legends-line-width GtkPlot:legends-shadow-width GtkPlot:legends-show GtkPlot:legends-transparent GtkPlot:legends-width GtkPlot:legends-x GtkPlot:legends-y GtkPlot:magnification GtkPlot:reflect-x GtkPlot:reflect-y GtkPlot:right-align GtkPlot:right-axis GtkPlot:show-x0 GtkPlot:show-y0 GtkPlot:top-align GtkPlot:top-axis GtkPlot:transparent GtkPlot:use-pixmap GtkPlot:width GtkPlot:x GtkPlot:x0-line GtkPlot:xmax GtkPlot:xmin GtkPlot:xscale GtkPlot:y GtkPlot:y0-line GtkPlot:ymax GtkPlot:ymin GtkPlot:yscale GtkPlotArray GtkPlotArray:array-data GtkPlotArray:description GtkPlotArray:independent GtkPlotArray:label GtkPlotArray:name GtkPlotArray:own-data GtkPlotArray:required GtkPlotArray:scale GtkPlotArray:size GtkPlotArray:type GtkPlotArrayList GtkPlotArrow GtkPlotAxis GtkPlotAxisPos GtkPlotBar GtkPlotBar:orientation GtkPlotBar:width GtkPlotBarUnits GtkPlotBorderStyle GtkPlotBox GtkPlotBox:orientation GtkPlotBubble GtkPlotBubble:labels-precision GtkPlotBubble:labels-prefix GtkPlotBubble:labels-style GtkPlotBubble:labels-suffix GtkPlotBubble:scale-max GtkPlotBubble:show-scale GtkPlotBubble:size-max GtkPlotCairo GtkPlotCandle GtkPlotCanvas GtkPlotCanvas::add-item GtkPlotCanvas::changed GtkPlotCanvas::delete-item GtkPlotCanvas::move-item GtkPlotCanvas::resize-item GtkPlotCanvas::select-item GtkPlotCanvas::select-region GtkPlotCanvas:color-bg GtkPlotCanvas:flags GtkPlotCanvas:grid-step GtkPlotCanvas:height GtkPlotCanvas:line-grid GtkPlotCanvas:magnification GtkPlotCanvas:show-grid GtkPlotCanvas:transparent GtkPlotCanvas:width GtkPlotCanvasAction GtkPlotCanvasArrow GtkPlotCanvasChild GtkPlotCanvasChildFlags GtkPlotCanvasEllipse GtkPlotCanvasEllipse:color-bg GtkPlotCanvasEllipse:filled GtkPlotCanvasEllipse:line GtkPlotCanvasFlag GtkPlotCanvasFlags GtkPlotCanvasLine GtkPlotCanvasPixmap GtkPlotCanvasPixmap:mask-bitmap GtkPlotCanvasPixmap:pixmap GtkPlotCanvasPlot GtkPlotCanvasPlotFlags GtkPlotCanvasPlotPos GtkPlotCanvasPos GtkPlotCanvasRectangle GtkPlotCanvasRectangle:border GtkPlotCanvasRectangle:color-bg GtkPlotCanvasRectangle:filled GtkPlotCanvasRectangle:line GtkPlotCanvasRectangle:shadow-width GtkPlotCanvasSelection GtkPlotCanvasSelectionMode GtkPlotCanvasText GtkPlotCanvasText:text GtkPlotConnector GtkPlotCSurface GtkPlotCSurface:levels-color GtkPlotCSurface:levels-style GtkPlotCSurface:levels-width GtkPlotCSurface:lines-visible GtkPlotCSurface:projection GtkPlotCSurface:sublevels-color GtkPlotCSurface:sublevels-style GtkPlotCSurface:sublevels-width GtkPlotData GtkPlotData::add-to-plot GtkPlotData::draw-data GtkPlotData::gradient-changed GtkPlotData::gradient-colors-changed GtkPlotData::update GtkPlotData:bottom-axis GtkPlotData:color-gt-max GtkPlotData:color-lt-min GtkPlotData:color-max GtkPlotData:color-min GtkPlotData:fill-area GtkPlotData:gradient-break GtkPlotData:gradient-break-max GtkPlotData:gradient-break-min GtkPlotData:gradient-break-nminor GtkPlotData:gradient-break-position GtkPlotData:gradient-break-scale GtkPlotData:gradient-break-step GtkPlotData:gradient-custom GtkPlotData:gradient-mask GtkPlotData:gradient-max GtkPlotData:gradient-min GtkPlotData:gradient-nmajor GtkPlotData:gradient-nminor GtkPlotData:gradient-scale GtkPlotData:gradient-show-lt-gt GtkPlotData:gradient-step GtkPlotData:is-function GtkPlotData:is-iterator GtkPlotData:iterator-mask GtkPlotData:labels-angle GtkPlotData:labels-bg-color GtkPlotData:labels-border GtkPlotData:labels-border-shadow GtkPlotData:labels-border-space GtkPlotData:labels-border-width GtkPlotData:labels-fg-color GtkPlotData:labels-font GtkPlotData:labels-offset GtkPlotData:labels-size GtkPlotData:labels-text GtkPlotData:labels-transparent GtkPlotData:legend GtkPlotData:legends-precision GtkPlotData:legends-style GtkPlotData:line-cap GtkPlotData:line-color GtkPlotData:line-connector GtkPlotData:line-join GtkPlotData:line-style GtkPlotData:line-width GtkPlotData:name GtkPlotData:num-points GtkPlotData:show-gradient GtkPlotData:show-labels GtkPlotData:show-legends GtkPlotData:show-xerrbars GtkPlotData:show-yerrbars GtkPlotData:show-zerrbars GtkPlotData:symbol-border-color GtkPlotData:symbol-border-width GtkPlotData:symbol-color GtkPlotData:symbol-size GtkPlotData:symbol-style GtkPlotData:symbol-type GtkPlotData:xerrbar-caps GtkPlotData:xerrbar-width GtkPlotData:xline-cap GtkPlotData:xline-color GtkPlotData:xline-join GtkPlotData:xline-style GtkPlotData:xline-width GtkPlotData:xstep GtkPlotData:yerrbar-caps GtkPlotData:yerrbar-width GtkPlotData:yline-cap GtkPlotData:yline-color GtkPlotData:yline-join GtkPlotData:yline-style GtkPlotData:yline-width GtkPlotData:ystep GtkPlotData:zerrbar-caps GtkPlotData:zerrbar-width GtkPlotData:zline-cap GtkPlotData:zline-color GtkPlotData:zline-join GtkPlotData:zline-style GtkPlotData:zline-width GtkPlotData:zstep GtkPlotDT GtkPlotDTnode GtkPlotDTprogressbarFunc GtkPlotDTsegment GtkPlotDTtriangle GtkPlotError GtkPlotFlux GtkPlotFlux:centered GtkPlotFlux:labels-precision GtkPlotFlux:labels-prefix GtkPlotFlux:labels-style GtkPlotFlux:labels-suffix GtkPlotFlux:length GtkPlotFlux:scale-max GtkPlotFlux:show-scale GtkPlotFlux:size-max GtkPlotFlux:style GtkPlotFlux:width GtkPlotFunc GtkPlotFunc3D GtkPlotGdk GtkPlotIterator GtkPlotLabelPos GtkPlotLabelStyle GtkPlotLine GtkPlotLineStyle GtkPlotMarker GtkPlotOrientation GtkPlotPageOrientation GtkPlotPageSize GtkPlotParseLabelFunc GtkPlotPC GtkPlotPixmap GtkPlotPixmap:mask-bitmap GtkPlotPixmap:pixmap GtkPlotPlane GtkPlotPoint GtkPlotPolar GtkPlotPolar:rotation GtkPlotPolygon GtkPlotProjection GtkPlotPS GtkPlotScale GtkPlotSegment GtkPlotSegment:arrow-mask GtkPlotSegment:centered GtkPlotSegment:length GtkPlotSegment:relative GtkPlotSegment:style GtkPlotSegment:width GtkPlotSide GtkPlotSurface GtkPlotSurface:ambient GtkPlotSurface:mesh-color GtkPlotSurface:mesh-style GtkPlotSurface:mesh-width GtkPlotSurface:nx GtkPlotSurface:ny GtkPlotSurface:show-grid GtkPlotSurface:show-mesh GtkPlotSurface:transparent GtkPlotSurface:use-amplitud GtkPlotSurface:use-height GtkPlotSurface:vector-light GtkPlotSurface:xstep GtkPlotSurface:ystep GtkPlotSymbol GtkPlotSymbolStyle GtkPlotSymbolType GtkPlotText GtkPlotTick GtkPlotTicks GtkPlotTicksAutoscaleFunc GtkPlotTicksInverseFunc GtkPlotTicksPos GtkPlotTicksRecalcFunc GtkPlotTicksTransformFunc GtkPlotUnits GtkPlotVector GtkPSFont GtkSheet GtkSheet::activate GtkSheet::changed GtkSheet::clear-cell GtkSheet::clip-range GtkSheet::deactivate GtkSheet::enter-pressed GtkSheet::entry-focus-in GtkSheet::entry-focus-out GtkSheet::move-cursor GtkSheet::move-range GtkSheet::new-column-width GtkSheet::new-row-height GtkSheet::populate-popup GtkSheet::resize-range GtkSheet::select-column GtkSheet::select-range GtkSheet::select-row GtkSheet::set-cell GtkSheet::set-scroll-adjustments GtkSheet::traverse GtkSheet:autoresize GtkSheet:autoresize-cols GtkSheet:autoresize-rows GtkSheet:autoscroll GtkSheet:bgcolor GtkSheet:clip-text GtkSheet:col-titles-height GtkSheet:col-titles-visible GtkSheet:columns-resizable GtkSheet:description GtkSheet:entry-type GtkSheet:grid-color GtkSheet:grid-visible GtkSheet:justify-entry GtkSheet:locked GtkSheet:n-rows GtkSheet:row-titles-visible GtkSheet:row-titles-width GtkSheet:rows-resizable GtkSheet:selection-mode GtkSheet:title GtkSheet:vjust GtkSheetAttrType GtkSheetButton GtkSheetCell GtkSheetCellAttr GtkSheetCellBorder GtkSheetChild GtkSheetColumn GtkSheetColumn:dataformat GtkSheetColumn:datatype GtkSheetColumn:description GtkSheetColumn:entry-type GtkSheetColumn:iskey GtkSheetColumn:justification GtkSheetColumn:label GtkSheetColumn:max-length GtkSheetColumn:max-length-bytes GtkSheetColumn:position GtkSheetColumn:readonly GtkSheetColumn:visible GtkSheetColumn:vjust GtkSheetColumn:width GtkSheetColumn:wrap-mode GtkSheetEntryType GtkSheetRange GtkSheetRow GtkSheetState GtkSheetVerticalJustification GtkToggleCombo GtkToggleCombo::changed gtk_border_combo_new gtk_char_selection_get_selection gtk_char_selection_new gtk_char_selection_set_selection gtk_check_item_construct_with_label gtk_check_item_new gtk_check_item_new_with_label gtk_color_combo_construct gtk_color_combo_construct_with_values gtk_color_combo_find_color gtk_color_combo_get_color_at gtk_color_combo_get_selection gtk_color_combo_new gtk_color_combo_new_with_values gtk_combo_button_hide_popdown_window gtk_combo_button_new gtk_data_entry_get_data_format gtk_data_entry_get_data_type gtk_data_entry_get_description gtk_data_entry_get_max_length_bytes gtk_data_entry_get_text gtk_data_entry_new gtk_data_entry_set_data_format gtk_data_entry_set_data_type gtk_data_entry_set_description gtk_data_entry_set_max_length_bytes gtk_data_entry_set_text gtk_data_format gtk_data_format_remove gtk_data_text_view_get_description gtk_data_text_view_get_max_length gtk_data_text_view_get_max_length_bytes gtk_data_text_view_new gtk_data_text_view_set_description gtk_data_text_view_set_max_length gtk_data_text_view_set_max_length_bytes gtk_dir_tree_new gtk_dir_tree_open_dir gtk_file_list_add_type gtk_file_list_add_type_filter gtk_file_list_add_type_with_pixmap gtk_file_list_construct gtk_file_list_get_filename gtk_file_list_get_filetype gtk_file_list_get_path gtk_file_list_new gtk_file_list_open_dir gtk_file_list_set_filter gtk_font_combo_get_font_description gtk_font_combo_get_font_height gtk_font_combo_get_gdkfont gtk_font_combo_get_psfont gtk_font_combo_new gtk_font_combo_select gtk_font_combo_select_nth gtk_icon_file_selection_construct gtk_icon_file_selection_get_selection gtk_icon_file_selection_new gtk_icon_file_selection_open_dir gtk_icon_file_selection_set_filter gtk_icon_file_selection_show_hidden gtk_icon_file_selection_show_tree gtk_icon_list_add gtk_icon_list_add_from_data gtk_icon_list_add_from_pixmap gtk_icon_list_clear gtk_icon_list_construct gtk_icon_list_freeze gtk_icon_list_get_active_icon gtk_icon_list_get_col_spacing gtk_icon_list_get_entry gtk_icon_list_get_icon_at gtk_icon_list_get_icon_border gtk_icon_list_get_icon_from_link gtk_icon_list_get_icon_width gtk_icon_list_get_index gtk_icon_list_get_link gtk_icon_list_get_mode gtk_icon_list_get_nth gtk_icon_list_get_pixmap gtk_icon_list_get_row_spacing gtk_icon_list_get_text_space gtk_icon_list_is_editable gtk_icon_list_link gtk_icon_list_new gtk_icon_list_remove gtk_icon_list_remove_nth gtk_icon_list_select_icon gtk_icon_list_set_active_icon gtk_icon_list_set_background gtk_icon_list_set_col_spacing gtk_icon_list_set_editable gtk_icon_list_set_icon_border gtk_icon_list_set_icon_width gtk_icon_list_set_label gtk_icon_list_set_mode gtk_icon_list_set_pixmap gtk_icon_list_set_row_spacing gtk_icon_list_set_selection_mode gtk_icon_list_set_text_space gtk_icon_list_thaw gtk_icon_list_unselect_all gtk_icon_list_unselect_icon gtk_icon_list_update gtk_item_entry_get_cursor_visible gtk_item_entry_get_max_length_bytes gtk_item_entry_new gtk_item_entry_new_with_max_length gtk_item_entry_set_cursor_visible gtk_item_entry_set_justification gtk_item_entry_set_max_length_bytes gtk_item_entry_set_text gtk_plot3d_autoscale gtk_plot3d_construct gtk_plot3d_construct_with_size gtk_plot3d_corner_get_attributes gtk_plot3d_corner_set_attributes gtk_plot3d_corner_set_visible gtk_plot3d_corner_visible gtk_plot3d_frame_get_attributes gtk_plot3d_frame_set_attributes gtk_plot3d_get_axis gtk_plot3d_get_pixel gtk_plot3d_get_scale gtk_plot3d_get_side gtk_plot3d_get_titles_offset gtk_plot3d_get_xfactor gtk_plot3d_get_yfactor gtk_plot3d_get_zfactor gtk_plot3d_hide_title gtk_plot3d_major_grids_set_visible gtk_plot3d_major_grids_visible gtk_plot3d_major_zgrid_get_attributes gtk_plot3d_major_zgrid_set_attributes gtk_plot3d_minor_grids_set_visible gtk_plot3d_minor_grids_visible gtk_plot3d_minor_zgrid_get_attributes gtk_plot3d_minor_zgrid_set_attributes gtk_plot3d_new gtk_plot3d_new_with_size gtk_plot3d_plane_set_color gtk_plot3d_plane_set_visible gtk_plot3d_plane_visible gtk_plot3d_reset_angles gtk_plot3d_rotate gtk_plot3d_rotate_vector gtk_plot3d_rotate_x gtk_plot3d_rotate_y gtk_plot3d_rotate_z gtk_plot3d_set_major_ticks gtk_plot3d_set_minor_ticks gtk_plot3d_set_scale gtk_plot3d_set_ticks gtk_plot3d_set_ticks_length gtk_plot3d_set_ticks_width gtk_plot3d_set_titles_offset gtk_plot3d_set_xfactor gtk_plot3d_set_xrange gtk_plot3d_set_yfactor gtk_plot3d_set_yrange gtk_plot3d_set_zfactor gtk_plot3d_set_zrange gtk_plot3d_show_labels gtk_plot3d_show_major_ticks gtk_plot3d_show_minor_ticks gtk_plot3d_show_ticks gtk_plot3d_show_title gtk_plot_add_data gtk_plot_add_function gtk_plot_array_free gtk_plot_array_get_bool gtk_plot_array_get_data_type gtk_plot_array_get_description gtk_plot_array_get_double gtk_plot_array_get_float gtk_plot_array_get_int gtk_plot_array_get_label gtk_plot_array_get_name gtk_plot_array_get_pointer gtk_plot_array_get_scale gtk_plot_array_get_size gtk_plot_array_get_string gtk_plot_array_independent gtk_plot_array_list_add gtk_plot_array_list_clear gtk_plot_array_list_get gtk_plot_array_list_new gtk_plot_array_list_remove gtk_plot_array_new gtk_plot_array_required gtk_plot_array_set gtk_plot_array_set_description gtk_plot_array_set_independent gtk_plot_array_set_label gtk_plot_array_set_required gtk_plot_array_set_scale gtk_plot_autoscale gtk_plot_axis_construct gtk_plot_axis_get_attributes gtk_plot_axis_get_labels_offset gtk_plot_axis_get_labels_prefix gtk_plot_axis_get_labels_suffix gtk_plot_axis_hide_title gtk_plot_axis_justify_title gtk_plot_axis_move_title gtk_plot_axis_new gtk_plot_axis_parse_label gtk_plot_axis_remove_break gtk_plot_axis_set_attributes gtk_plot_axis_set_break gtk_plot_axis_set_labels_attributes gtk_plot_axis_set_labels_numbers gtk_plot_axis_set_labels_offset gtk_plot_axis_set_labels_prefix gtk_plot_axis_set_labels_style gtk_plot_axis_set_labels_suffix gtk_plot_axis_set_major_ticks gtk_plot_axis_set_minor_ticks gtk_plot_axis_set_ticks gtk_plot_axis_set_ticks_length gtk_plot_axis_set_ticks_limits gtk_plot_axis_set_ticks_width gtk_plot_axis_set_tick_labels gtk_plot_axis_set_title gtk_plot_axis_set_visible gtk_plot_axis_show_labels gtk_plot_axis_show_ticks gtk_plot_axis_show_title gtk_plot_axis_ticks_autoscale gtk_plot_axis_ticks_inverse gtk_plot_axis_ticks_recalc gtk_plot_axis_ticks_transform gtk_plot_axis_title_set_attributes gtk_plot_axis_unset_ticks_limits gtk_plot_axis_use_custom_tick_labels gtk_plot_axis_visible gtk_plot_bar_construct gtk_plot_bar_get_width gtk_plot_bar_new gtk_plot_bar_set_width gtk_plot_box_construct gtk_plot_box_new gtk_plot_bubble_new gtk_plot_bubble_set_labels_precision gtk_plot_bubble_set_labels_prefix gtk_plot_bubble_set_labels_style gtk_plot_bubble_set_labels_suffix gtk_plot_bubble_set_scale_max gtk_plot_bubble_set_size_max gtk_plot_bubble_show_scale gtk_plot_cairo_construct gtk_plot_cairo_new gtk_plot_cairo_new_with_drawable gtk_plot_cairo_set_cairo gtk_plot_candle_new gtk_plot_canvas_cancel_action gtk_plot_canvas_child_get_position gtk_plot_canvas_child_move gtk_plot_canvas_child_move_resize gtk_plot_canvas_child_set_selection gtk_plot_canvas_child_set_selection_mode gtk_plot_canvas_construct gtk_plot_canvas_ellipse_new gtk_plot_canvas_ellipse_set_attributes gtk_plot_canvas_export_cairo gtk_plot_canvas_export_ps gtk_plot_canvas_export_ps_with_size gtk_plot_canvas_flags gtk_plot_canvas_freeze gtk_plot_canvas_get_active_item gtk_plot_canvas_get_pixel gtk_plot_canvas_get_position gtk_plot_canvas_grid_set_attributes gtk_plot_canvas_grid_set_step gtk_plot_canvas_grid_set_visible gtk_plot_canvas_line_new gtk_plot_canvas_line_set_arrow gtk_plot_canvas_line_set_attributes gtk_plot_canvas_new gtk_plot_canvas_paint gtk_plot_canvas_pixmap_new gtk_plot_canvas_plot_flags gtk_plot_canvas_plot_new gtk_plot_canvas_plot_set_flags gtk_plot_canvas_plot_unset_flags gtk_plot_canvas_put_child gtk_plot_canvas_rectangle_new gtk_plot_canvas_rectangle_set_attributes gtk_plot_canvas_refresh gtk_plot_canvas_remove_child gtk_plot_canvas_set_background gtk_plot_canvas_set_flags gtk_plot_canvas_set_line_attributes gtk_plot_canvas_set_magnification gtk_plot_canvas_set_pc gtk_plot_canvas_set_size gtk_plot_canvas_set_transparent gtk_plot_canvas_text_new gtk_plot_canvas_text_set_attributes gtk_plot_canvas_thaw gtk_plot_canvas_transparent gtk_plot_canvas_unselect gtk_plot_canvas_unset_flags gtk_plot_clip_data gtk_plot_construct gtk_plot_construct_with_size gtk_plot_csurface_construct_function gtk_plot_csurface_get_levels_attributes gtk_plot_csurface_get_lines_visible gtk_plot_csurface_get_sublevels_attributes gtk_plot_csurface_new gtk_plot_csurface_new_function gtk_plot_csurface_projection gtk_plot_csurface_set_levels_attributes gtk_plot_csurface_set_lines_visible gtk_plot_csurface_set_projection gtk_plot_csurface_set_sublevels_attributes gtk_plot_data_add_dimension gtk_plot_data_add_marker gtk_plot_data_area_is_filled gtk_plot_data_clone gtk_plot_data_construct_function gtk_plot_data_construct_iterator gtk_plot_data_dimension_get_array gtk_plot_data_dimension_get_scale gtk_plot_data_dimension_set_array gtk_plot_data_dimension_set_points gtk_plot_data_dimension_set_scale gtk_plot_data_draw_points gtk_plot_data_draw_symbol gtk_plot_data_fill_area gtk_plot_data_find_dimension gtk_plot_data_get_a gtk_plot_data_get_a_scale gtk_plot_data_get_connector gtk_plot_data_get_da gtk_plot_data_get_dx gtk_plot_data_get_dy gtk_plot_data_get_dz gtk_plot_data_get_gradient gtk_plot_data_get_gradient_allocation gtk_plot_data_get_gradient_colors gtk_plot_data_get_gradient_level gtk_plot_data_get_gradient_mask gtk_plot_data_get_gradient_nth_color gtk_plot_data_get_gradient_outer_colors gtk_plot_data_get_labels gtk_plot_data_get_legend_precision gtk_plot_data_get_line_attributes gtk_plot_data_get_link gtk_plot_data_get_numpoints gtk_plot_data_get_point gtk_plot_data_get_points gtk_plot_data_get_symbol gtk_plot_data_get_x gtk_plot_data_get_y gtk_plot_data_get_z gtk_plot_data_gradient gtk_plot_data_gradient_autoscale_a gtk_plot_data_gradient_autoscale_da gtk_plot_data_gradient_autoscale_z gtk_plot_data_gradient_custom_colors gtk_plot_data_gradient_set_scale gtk_plot_data_gradient_set_style gtk_plot_data_gradient_set_visible gtk_plot_data_gradient_use_custom_colors gtk_plot_data_gradient_visible gtk_plot_data_hide_legend gtk_plot_data_hide_xerrbars gtk_plot_data_hide_yerrbars gtk_plot_data_hide_zerrbars gtk_plot_data_independent_dimensions gtk_plot_data_labels_set_attributes gtk_plot_data_markers_visible gtk_plot_data_move_gradient gtk_plot_data_new gtk_plot_data_new_function gtk_plot_data_new_iterator gtk_plot_data_paint gtk_plot_data_remove_dimension gtk_plot_data_remove_link gtk_plot_data_remove_marker gtk_plot_data_remove_markers gtk_plot_data_required_dimensions gtk_plot_data_reset_gradient gtk_plot_data_reset_gradient_colors gtk_plot_data_set_a gtk_plot_data_set_a_scale gtk_plot_data_set_connector gtk_plot_data_set_da gtk_plot_data_set_dx gtk_plot_data_set_dy gtk_plot_data_set_dz gtk_plot_data_set_gradient gtk_plot_data_set_gradient_colors gtk_plot_data_set_gradient_mask gtk_plot_data_set_gradient_nth_color gtk_plot_data_set_gradient_outer_colors gtk_plot_data_set_gradient_size gtk_plot_data_set_labels gtk_plot_data_set_legend gtk_plot_data_set_legend_precision gtk_plot_data_set_line_attributes gtk_plot_data_set_link gtk_plot_data_set_name gtk_plot_data_set_numpoints gtk_plot_data_set_points gtk_plot_data_set_symbol gtk_plot_data_set_x gtk_plot_data_set_x_attributes gtk_plot_data_set_y gtk_plot_data_set_y_attributes gtk_plot_data_set_z gtk_plot_data_set_z_attributes gtk_plot_data_show_labels gtk_plot_data_show_legend gtk_plot_data_show_markers gtk_plot_data_show_xerrbars gtk_plot_data_show_yerrbars gtk_plot_data_show_zerrbars gtk_plot_data_update gtk_plot_draw_line gtk_plot_draw_text gtk_plot_dt_add_node gtk_plot_dt_clear gtk_plot_dt_get_node gtk_plot_dt_new gtk_plot_dt_set_quadrilateral gtk_plot_dt_set_subsampling gtk_plot_dt_triangulate gtk_plot_export_ps gtk_plot_export_ps_with_size gtk_plot_flux_center gtk_plot_flux_get_arrow gtk_plot_flux_is_centered gtk_plot_flux_new gtk_plot_flux_set_arrow gtk_plot_flux_set_labels_precision gtk_plot_flux_set_labels_prefix gtk_plot_flux_set_labels_style gtk_plot_flux_set_labels_suffix gtk_plot_flux_set_scale_max gtk_plot_flux_set_size_max gtk_plot_flux_show_scale gtk_plot_gdk_construct gtk_plot_gdk_new gtk_plot_gdk_set_drawable gtk_plot_get_axis gtk_plot_get_drawable gtk_plot_get_internal_allocation gtk_plot_get_pixel gtk_plot_get_point gtk_plot_get_position gtk_plot_get_size gtk_plot_get_xrange gtk_plot_get_xscale gtk_plot_get_yrange gtk_plot_get_yscale gtk_plot_grids_on_top gtk_plot_grids_set_on_top gtk_plot_grids_set_visible gtk_plot_grids_visible gtk_plot_hide_legends gtk_plot_is_transparent gtk_plot_is_x_reflected gtk_plot_is_y_reflected gtk_plot_legends_get_allocation gtk_plot_legends_get_position gtk_plot_legends_move gtk_plot_legends_set_attributes gtk_plot_major_hgrid_set_attributes gtk_plot_major_vgrid_set_attributes gtk_plot_minor_hgrid_set_attributes gtk_plot_minor_vgrid_set_attributes gtk_plot_move gtk_plot_move_resize gtk_plot_new gtk_plot_new_with_size gtk_plot_paint gtk_plot_pc_clip gtk_plot_pc_clip_mask gtk_plot_pc_draw_circle gtk_plot_pc_draw_ellipse gtk_plot_pc_draw_line gtk_plot_pc_draw_lines gtk_plot_pc_draw_pixmap gtk_plot_pc_draw_point gtk_plot_pc_draw_polygon gtk_plot_pc_draw_rectangle gtk_plot_pc_draw_string gtk_plot_pc_grestore gtk_plot_pc_gsave gtk_plot_pc_init gtk_plot_pc_leave gtk_plot_pc_new gtk_plot_pc_set_color gtk_plot_pc_set_dash gtk_plot_pc_set_font gtk_plot_pc_set_lineattr gtk_plot_pc_set_viewport gtk_plot_pixmap_construct gtk_plot_pixmap_get_mask gtk_plot_pixmap_get_pixmap gtk_plot_pixmap_new gtk_plot_polar_construct gtk_plot_polar_construct_with_size gtk_plot_polar_get_angle gtk_plot_polar_new gtk_plot_polar_new_with_size gtk_plot_polar_rotate gtk_plot_ps_construct gtk_plot_ps_construct_with_size gtk_plot_ps_new gtk_plot_ps_new_with_size gtk_plot_ps_set_scale gtk_plot_ps_set_size gtk_plot_put_text gtk_plot_reflect_x gtk_plot_reflect_y gtk_plot_refresh gtk_plot_remove_break gtk_plot_remove_data gtk_plot_remove_text gtk_plot_resize gtk_plot_segment_center gtk_plot_segment_get_arrow gtk_plot_segment_get_arrow_mask gtk_plot_segment_is_centered gtk_plot_segment_new gtk_plot_segment_relative gtk_plot_segment_set_arrow gtk_plot_segment_set_arrow_mask gtk_plot_segment_set_relative gtk_plot_set_background gtk_plot_set_background_pixmap gtk_plot_set_break gtk_plot_set_drawable gtk_plot_set_legends_border gtk_plot_set_line_attributes gtk_plot_set_magnification gtk_plot_set_major_ticks gtk_plot_set_minor_ticks gtk_plot_set_pc gtk_plot_set_range gtk_plot_set_ticks gtk_plot_set_ticks_limits gtk_plot_set_transparent gtk_plot_set_xrange gtk_plot_set_xscale gtk_plot_set_yrange gtk_plot_set_yscale gtk_plot_show_legends gtk_plot_surface_build_mesh gtk_plot_surface_construct_function gtk_plot_surface_get_dx gtk_plot_surface_get_dy gtk_plot_surface_get_dz gtk_plot_surface_get_grid_visible gtk_plot_surface_get_mesh_visible gtk_plot_surface_get_nx gtk_plot_surface_get_ny gtk_plot_surface_get_points gtk_plot_surface_get_x gtk_plot_surface_get_xstep gtk_plot_surface_get_y gtk_plot_surface_get_ystep gtk_plot_surface_get_z gtk_plot_surface_new gtk_plot_surface_new_function gtk_plot_surface_recalc_nodes gtk_plot_surface_set_ambient gtk_plot_surface_set_color gtk_plot_surface_set_dx gtk_plot_surface_set_dy gtk_plot_surface_set_dz gtk_plot_surface_set_grid_background gtk_plot_surface_set_grid_foreground gtk_plot_surface_set_grid_visible gtk_plot_surface_set_light gtk_plot_surface_set_mesh_visible gtk_plot_surface_set_nx gtk_plot_surface_set_ny gtk_plot_surface_set_points gtk_plot_surface_set_shadow gtk_plot_surface_set_transparent gtk_plot_surface_set_x gtk_plot_surface_set_xstep gtk_plot_surface_set_y gtk_plot_surface_set_ystep gtk_plot_surface_set_z gtk_plot_surface_use_amplitud gtk_plot_surface_use_height_gradient gtk_plot_text_get_area gtk_plot_text_get_size gtk_plot_text_set_attributes gtk_plot_text_set_border gtk_plot_unset_ticks_limits gtk_plot_x0line_set_attributes gtk_plot_x0_set_visible gtk_plot_x0_visible gtk_plot_y0line_set_attributes gtk_plot_y0_set_visible gtk_plot_y0_visible gtk_psfont_add_font gtk_psfont_add_i18n_font gtk_psfont_get_by_family gtk_psfont_get_by_name gtk_psfont_get_char_size gtk_psfont_get_families gtk_psfont_get_font_description gtk_psfont_get_gdkfont gtk_psfont_get_psfontname gtk_psfont_init gtk_psfont_unref gtk_sheet_add_column gtk_sheet_add_row gtk_sheet_attach gtk_sheet_attach_default gtk_sheet_attach_floating gtk_sheet_autoresize gtk_sheet_autoresize_columns gtk_sheet_autoresize_rows gtk_sheet_autoscroll gtk_sheet_button_attach gtk_sheet_cell_clear gtk_sheet_cell_delete gtk_sheet_cell_get_state gtk_sheet_cell_get_text gtk_sheet_cell_get_tooltip_markup gtk_sheet_cell_get_tooltip_text gtk_sheet_cell_set_tooltip_markup gtk_sheet_cell_set_tooltip_text gtk_sheet_change_entry gtk_sheet_clip_range gtk_sheet_clip_text gtk_sheet_columns_labels_set_visibility gtk_sheet_columns_resizable gtk_sheet_columns_set_resizable gtk_sheet_columns_set_sensitivity gtk_sheet_column_button_add_label gtk_sheet_column_button_get_label gtk_sheet_column_button_justify gtk_sheet_column_get gtk_sheet_column_get_datatype gtk_sheet_column_get_description gtk_sheet_column_get_entry_type gtk_sheet_column_get_format gtk_sheet_column_get_index gtk_sheet_column_get_iskey gtk_sheet_column_get_justification gtk_sheet_column_get_readonly gtk_sheet_column_get_tooltip_markup gtk_sheet_column_get_tooltip_text gtk_sheet_column_get_vjustification gtk_sheet_column_label_set_visibility gtk_sheet_column_sensitive gtk_sheet_column_set_datatype gtk_sheet_column_set_description gtk_sheet_column_set_entry_type gtk_sheet_column_set_format gtk_sheet_column_set_iskey gtk_sheet_column_set_justification gtk_sheet_column_set_readonly gtk_sheet_column_set_sensitivity gtk_sheet_column_set_tooltip_markup gtk_sheet_column_set_tooltip_text gtk_sheet_column_set_visibility gtk_sheet_column_set_vjustification gtk_sheet_column_titles_visible gtk_sheet_column_visible gtk_sheet_construct gtk_sheet_construct_browser gtk_sheet_construct_with_custom_entry gtk_sheet_delete_columns gtk_sheet_delete_rows gtk_sheet_entry_select_region gtk_sheet_entry_signal_connect_changed gtk_sheet_entry_signal_disconnect_by_func gtk_sheet_freeze gtk_sheet_get_active_cell gtk_sheet_get_attributes gtk_sheet_get_cell_area gtk_sheet_get_child_at gtk_sheet_get_columns_count gtk_sheet_get_column_title gtk_sheet_get_column_width gtk_sheet_get_description gtk_sheet_get_entry gtk_sheet_get_entry_text gtk_sheet_get_entry_type gtk_sheet_get_entry_widget gtk_sheet_get_hadjustment gtk_sheet_get_link gtk_sheet_get_pixel_info gtk_sheet_get_rows_count gtk_sheet_get_row_title gtk_sheet_get_selection gtk_sheet_get_state gtk_sheet_get_tooltip_markup gtk_sheet_get_tooltip_text gtk_sheet_get_vadjustment gtk_sheet_get_visible_range gtk_sheet_get_vjustification gtk_sheet_grid_visible gtk_sheet_hide_column_titles gtk_sheet_hide_row_titles gtk_sheet_insert_columns gtk_sheet_insert_rows gtk_sheet_in_clip gtk_sheet_is_frozen gtk_sheet_justify_entry gtk_sheet_link_cell gtk_sheet_locked gtk_sheet_moveto gtk_sheet_move_child gtk_sheet_new gtk_sheet_new_browser gtk_sheet_new_with_custom_entry gtk_sheet_put gtk_sheet_range_clear gtk_sheet_range_delete gtk_sheet_range_set_background gtk_sheet_range_set_border gtk_sheet_range_set_border_color gtk_sheet_range_set_editable gtk_sheet_range_set_font gtk_sheet_range_set_foreground gtk_sheet_range_set_justification gtk_sheet_range_set_visible gtk_sheet_remove_link gtk_sheet_rows_labels_set_visibility gtk_sheet_rows_resizable gtk_sheet_rows_set_resizable gtk_sheet_rows_set_sensitivity gtk_sheet_row_button_add_label gtk_sheet_row_button_get_label gtk_sheet_row_button_justify gtk_sheet_row_get_tooltip_markup gtk_sheet_row_get_tooltip_text gtk_sheet_row_label_set_visibility gtk_sheet_row_sensitive gtk_sheet_row_set_sensitivity gtk_sheet_row_set_tooltip_markup gtk_sheet_row_set_tooltip_text gtk_sheet_row_set_visibility gtk_sheet_row_titles_visible gtk_sheet_row_visible gtk_sheet_select_column gtk_sheet_select_range gtk_sheet_select_row gtk_sheet_set_active_cell gtk_sheet_set_autoresize gtk_sheet_set_autoresize_columns gtk_sheet_set_autoresize_rows gtk_sheet_set_autoscroll gtk_sheet_set_background gtk_sheet_set_cell gtk_sheet_set_cell_text gtk_sheet_set_clip_text gtk_sheet_set_column_title gtk_sheet_set_column_titles_height gtk_sheet_set_column_width gtk_sheet_set_description gtk_sheet_set_entry_editable gtk_sheet_set_entry_text gtk_sheet_set_grid gtk_sheet_set_hadjustment gtk_sheet_set_justify_entry gtk_sheet_set_locked gtk_sheet_set_row_height gtk_sheet_set_row_title gtk_sheet_set_row_titles_width gtk_sheet_set_selection_mode gtk_sheet_set_tab_direction gtk_sheet_set_title gtk_sheet_set_tooltip_markup gtk_sheet_set_tooltip_text gtk_sheet_set_vadjustment gtk_sheet_set_vjustification gtk_sheet_show_column_titles gtk_sheet_show_grid gtk_sheet_show_row_titles gtk_sheet_thaw gtk_sheet_unclip_range gtk_sheet_unselect_range gtk_toggle_combo_construct gtk_toggle_combo_get_ncols gtk_toggle_combo_get_nrows gtk_toggle_combo_get_selection gtk_toggle_combo_new gtk_toggle_combo_select T triangulate gtkextra-3.2.0/docs/reference/xml/gtkplotgdk.xml0000644000076400001440000001226212604172532016655 00000000000000 ]> GtkPlotGdk 3 GTKEXTRA Library GtkPlotGdk GDK drawing backend (mapped to Cairo) Synopsis #include <gtkextra.h> GtkPlotGdk; GtkObject * gtk_plot_gdk_new (GtkWidget *widget); void gtk_plot_gdk_construct (GtkPlotGdk *pc, GtkWidget *widget); void gtk_plot_gdk_set_drawable (GtkPlotGdk *gdk, GdkDrawable *drawable); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotPC +----GtkPlotGdk Description This Subclass of GtkPlotPC has been rewritten to use Cairo drawing routines. Details GtkPlotGdk GtkPlotGdktypedef struct _GtkPlotGdk GtkPlotGdk; The GtkPlotGdk struct contains only private data. It should only be accessed through the functions described below. gtk_plot_gdk_new () gtk_plot_gdk_newGtkObject * gtk_plot_gdk_new (GtkWidget *widget); widget : Returns : gtk_plot_gdk_construct () gtk_plot_gdk_constructvoid gtk_plot_gdk_construct (GtkPlotGdk *pc, GtkWidget *widget); pc : widget : gtk_plot_gdk_set_drawable () gtk_plot_gdk_set_drawablevoid gtk_plot_gdk_set_drawable (GtkPlotGdk *gdk, GdkDrawable *drawable); gdk : drawable : gtkextra-3.2.0/docs/reference/xml/gtkplot.xml0000644000076400001440000072114712604172532016200 00000000000000 ]> GtkPlot 3 GTKEXTRA Library GtkPlot 2d scientific plots widget Synopsis #include <gtkextra.h> GtkPlot; GtkPlotAxis; GtkPlotText; GtkPlotLine; GtkPlotSymbol; GtkPlotTick; GtkPlotTicks; GtkPlotVector; GtkPlotMarker; gdouble (*GtkPlotFunc) (GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *error); gdouble (*GtkPlotFunc3D) (GtkPlot *plot, GtkPlotData *data, gdouble x, gdouble y, gboolean *error); void (*GtkPlotIterator) (GtkPlot *plot, GtkPlotData *data, gint iter, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error); enum GtkPlotScale; enum GtkPlotSymbolType; enum GtkPlotSymbolStyle; enum GtkPlotBorderStyle; enum GtkPlotLineStyle; enum GtkPlotConnector; enum GtkPlotLabelPos; enum GtkPlotError; enum GtkPlotOrientation; enum GtkPlotAxisPos; enum GtkPlotLabelStyle; enum GtkPlotTicksPos; void (*GtkPlotTicksAutoscaleFunc) (GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision); gdouble (*GtkPlotTicksInverseFunc) (GtkPlotAxis *axis, gdouble y); void (*GtkPlotTicksRecalcFunc) (GtkPlotAxis *axis); gdouble (*GtkPlotTicksTransformFunc) (GtkPlotAxis *axis, gdouble y); void (*GtkPlotParseLabelFunc) (GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label); GtkWidget * gtk_plot_new (GdkDrawable *drawable); GtkWidget * gtk_plot_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_construct (GtkPlot *plot, GdkDrawable *drawable); void gtk_plot_construct_with_size (GtkPlot *plot, GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_set_drawable (GtkPlot *plot, GdkDrawable *drawable); GdkDrawable * gtk_plot_get_drawable (GtkPlot *plot); void gtk_plot_set_pc (GtkPlot *plot, GtkPlotPC *pc); void gtk_plot_set_background_pixmap (GtkPlot *plot, GdkPixmap *pixmap); void gtk_plot_set_transparent (GtkPlot *plot, gboolean transparent); gboolean gtk_plot_is_transparent (GtkPlot *plot); void gtk_plot_get_position (GtkPlot *plot, gdouble *x, gdouble *y); void gtk_plot_get_size (GtkPlot *plot, gdouble *width, gdouble *height); GtkAllocation gtk_plot_get_internal_allocation (GtkPlot *plot); void gtk_plot_set_background (GtkPlot *plot, const GdkColor *bg_color); void gtk_plot_paint (GtkPlot *plot); void gtk_plot_refresh (GtkPlot *plot, GdkRectangle *drawing_area); void gtk_plot_move (GtkPlot *plot, gdouble x, gdouble y); void gtk_plot_resize (GtkPlot *plot, gdouble width, gdouble height); void gtk_plot_set_magnification (GtkPlot *plot, gdouble magnification); void gtk_plot_move_resize (GtkPlot *plot, gdouble x, gdouble y, gdouble width, gdouble height); void gtk_plot_get_pixel (GtkPlot *plot, gdouble xx, gdouble yy, gdouble *x, gdouble *y); void gtk_plot_get_point (GtkPlot *plot, gint x, gint y, gdouble *xx, gdouble *yy); void gtk_plot_clip_data (GtkPlot *plot, gboolean clip); void gtk_plot_set_xrange (GtkPlot *plot, gdouble xmin, gdouble xmax); void gtk_plot_set_yrange (GtkPlot *plot, gdouble ymin, gdouble ymax); void gtk_plot_set_range (GtkPlot *plot, gdouble xmin, gdouble xmax, gdouble ymin, gdouble ymax); void gtk_plot_autoscale (GtkPlot *plot); void gtk_plot_get_xrange (GtkPlot *plot, gdouble *xmin, gdouble *xmax); void gtk_plot_get_yrange (GtkPlot *plot, gdouble *ymin, gdouble *ymax); void gtk_plot_set_xscale (GtkPlot *plot, GtkPlotScale scale_type); void gtk_plot_set_yscale (GtkPlot *plot, GtkPlotScale scale_type); GtkPlotScale gtk_plot_get_xscale (GtkPlot *plot); GtkPlotScale gtk_plot_get_yscale (GtkPlot *plot); void gtk_plot_reflect_x (GtkPlot *plot, gboolean reflect); void gtk_plot_reflect_y (GtkPlot *plot, gboolean reflect); gboolean gtk_plot_is_x_reflected (GtkPlot *plot); gboolean gtk_plot_is_y_reflected (GtkPlot *plot); GtkPlotText * gtk_plot_put_text (GtkPlot *plot, gdouble x, gdouble y, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text); gint gtk_plot_remove_text (GtkPlot *plot, GtkPlotText *text); void gtk_plot_text_get_size (const gchar *text, gint angle, const gchar *text_font, gint text_height, gint *width, gint *height, gint *ascent, gint *descent); void gtk_plot_text_get_area (const gchar *text, gint angle, GtkJustification just, const gchar *font_name, gint font_size, gint *x, gint *y, gint *width, gint *height); void gtk_plot_text_set_attributes (GtkPlotText *text_attr, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text); void gtk_plot_text_set_border (GtkPlotText *text, GtkPlotBorderStyle border, gint border_space, gint border_width, gint shadow_width); void gtk_plot_draw_line (GtkPlot *plot, GtkPlotLine line, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_draw_text (GtkPlot *plot, GtkPlotText text); void gtk_plot_set_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step, gint nminor); void gtk_plot_set_major_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step); void gtk_plot_set_minor_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gint nminor); void gtk_plot_set_ticks_limits (GtkPlot *plot, GtkPlotOrientation orientation, gdouble begin, gdouble end); void gtk_plot_unset_ticks_limits (GtkPlot *plot, GtkPlotOrientation orientation); void gtk_plot_set_break (GtkPlot *plot, GtkPlotOrientation orientation, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos); void gtk_plot_remove_break (GtkPlot *plot, GtkPlotOrientation orientation); GtkObject * gtk_plot_axis_new (GtkPlotOrientation orientation); void gtk_plot_axis_construct (GtkPlotAxis *axis, GtkPlotOrientation orientation); GtkPlotAxis * gtk_plot_get_axis (GtkPlot *plot, GtkPlotAxisPos axis); void gtk_plot_axis_set_visible (GtkPlotAxis *axis, gboolean visible); gboolean gtk_plot_axis_visible (GtkPlotAxis *axis); void gtk_plot_axis_set_title (GtkPlotAxis *axis, const gchar *title); void gtk_plot_axis_show_title (GtkPlotAxis *axis); void gtk_plot_axis_hide_title (GtkPlotAxis *axis); void gtk_plot_axis_move_title (GtkPlotAxis *axis, gint angle, gdouble x, gdouble y); void gtk_plot_axis_justify_title (GtkPlotAxis *axis, GtkJustification justification); void gtk_plot_axis_set_attributes (GtkPlotAxis *axis, gfloat width, const GdkColor *color); void gtk_plot_axis_get_attributes (GtkPlotAxis *axis, gfloat *width, GdkColor *color); void gtk_plot_axis_set_ticks (GtkPlotAxis *axis, gdouble major_step, gint nminor); void gtk_plot_axis_set_major_ticks (GtkPlotAxis *axis, gdouble major_step); void gtk_plot_axis_set_minor_ticks (GtkPlotAxis *axis, gint nminor); void gtk_plot_axis_set_ticks_length (GtkPlotAxis *axis, gint length); void gtk_plot_axis_set_ticks_width (GtkPlotAxis *axis, gfloat width); void gtk_plot_axis_show_ticks (GtkPlotAxis *axis, gint major_mask, gint minor_mask); void gtk_plot_axis_set_ticks_limits (GtkPlotAxis *axis, gdouble begin, gdouble end); void gtk_plot_axis_unset_ticks_limits (GtkPlotAxis *axis); void gtk_plot_axis_set_tick_labels (GtkPlotAxis *axis, GtkPlotArray *array); void gtk_plot_axis_set_break (GtkPlotAxis *axis, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos); void gtk_plot_axis_remove_break (GtkPlotAxis *axis); void gtk_plot_axis_show_labels (GtkPlotAxis *axis, gint labels_mask); void gtk_plot_axis_title_set_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification); void gtk_plot_axis_set_labels_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification); #define gtk_plot_axis_set_labels_numbers void gtk_plot_axis_set_labels_style (GtkPlotAxis *axis, GtkPlotLabelStyle style, gint precision); void gtk_plot_axis_set_labels_offset (GtkPlotAxis *axis, gint offset); gint gtk_plot_axis_get_labels_offset (GtkPlotAxis *axis); void gtk_plot_axis_use_custom_tick_labels (GtkPlotAxis *axis, gboolean use); void gtk_plot_axis_set_labels_suffix (GtkPlotAxis *axis, const gchar *text); void gtk_plot_axis_set_labels_prefix (GtkPlotAxis *axis, const gchar *text); gchar * gtk_plot_axis_get_labels_suffix (GtkPlotAxis *axis); gchar * gtk_plot_axis_get_labels_prefix (GtkPlotAxis *axis); void gtk_plot_axis_ticks_recalc (GtkPlotAxis *axis); void gtk_plot_axis_ticks_autoscale (GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision); gdouble gtk_plot_axis_ticks_transform (GtkPlotAxis *axis, gdouble y); gdouble gtk_plot_axis_ticks_inverse (GtkPlotAxis *axis, gdouble x); void gtk_plot_axis_parse_label (GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label); void gtk_plot_x0_set_visible (GtkPlot *plot, gboolean visible); gboolean gtk_plot_x0_visible (GtkPlot *plot); void gtk_plot_y0_set_visible (GtkPlot *plot, gboolean visible); gboolean gtk_plot_y0_visible (GtkPlot *plot); void gtk_plot_grids_set_on_top (GtkPlot *plot, gboolean on_top); gboolean gtk_plot_grids_on_top (GtkPlot *plot); void gtk_plot_grids_set_visible (GtkPlot *plot, gboolean vmajor, gboolean vminor, gboolean hmajor, gboolean hminor); void gtk_plot_grids_visible (GtkPlot *plot, gboolean *vmajor, gboolean *vminor, gboolean *hmajor, gboolean *hminor); void gtk_plot_y0line_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_x0line_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_major_vgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_minor_vgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_major_hgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_minor_hgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_show_legends (GtkPlot *plot); void gtk_plot_hide_legends (GtkPlot *plot); void gtk_plot_set_legends_border (GtkPlot *plot, GtkPlotBorderStyle legends_border, gint shadow_width); void gtk_plot_legends_move (GtkPlot *plot, gdouble x, gdouble y); void gtk_plot_legends_get_position (GtkPlot *plot, gdouble *x, gdouble *y); GtkAllocation gtk_plot_legends_get_allocation (GtkPlot *plot); void gtk_plot_legends_set_attributes (GtkPlot *plot, const gchar *font, gint height, const GdkColor *foreground, const GdkColor *background); void gtk_plot_set_line_attributes (GtkPlot *plot, GtkPlotLine line); void gtk_plot_add_data (GtkPlot *plot, GtkPlotData *data); gint gtk_plot_remove_data (GtkPlot *plot, GtkPlotData *dataset); GtkPlotData * gtk_plot_add_function (GtkPlot *plot, GtkPlotFunc function); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkMisc +----GtkPlot +----GtkPlot3D +----GtkPlotPolar GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotAxis Implemented Interfaces GtkPlot implements AtkImplementorIface and GtkBuildable. Properties "allocation-height" gint : Read / Write "allocation-width" gint : Read / Write "allocation-x" gint : Read / Write "allocation-y" gint : Read / Write "bg-color" gpointer : Read / Write "bg-pixmap" gpointer : Read / Write "bottom-align" gdouble : Read / Write "bottom-axis" GtkPlotAxis* : Read "clip-data" gboolean : Read / Write "grids-on-top" gboolean : Read / Write "height" gdouble : Read / Write "left-align" gdouble : Read / Write "left-axis" GtkPlotAxis* : Read "legends-attr-text" gpointer : Read / Write "legends-border" gint : Read / Write "legends-border-width" gint : Read / Write "legends-height" gint : Read / Write "legends-line-width" gint : Read / Write "legends-shadow-width" gint : Read / Write "legends-show" gboolean : Read / Write "legends-transparent" gboolean : Read / Write "legends-width" gint : Read / Write "legends-x" gdouble : Read / Write "legends-y" gdouble : Read / Write "magnification" gdouble : Read / Write "reflect-x" gboolean : Read / Write "reflect-y" gboolean : Read / Write "right-align" gdouble : Read / Write "right-axis" GtkPlotAxis* : Read "show-x0" gboolean : Read / Write "show-y0" gboolean : Read / Write "top-align" gdouble : Read / Write "top-axis" GtkPlotAxis* : Read "transparent" gboolean : Read / Write "use-pixmap" gboolean : Read / Write "width" gdouble : Read / Write "x" gdouble : Read / Write "x0-line" gpointer : Read / Write "xmax" gdouble : Read / Write "xmin" gdouble : Read / Write "xscale" gint : Read / Write "y" gdouble : Read / Write "y0-line" gpointer : Read / Write "ymax" gdouble : Read / Write "ymin" gdouble : Read / Write "yscale" gint : Read / Write Signals "add-data" : Run Last "axis-changed" : Run Last "changed" : Run Last "moved" : Run Last "resized" : Run Last "update" : Run Last Description GtkPlot allows to draw high quality scientific plots in two dimensions with a look and feel very similar to Microcal Origin for Windows. The distribution includes GtkPlotCanvas subclass, and a demo program showing two layered plots with different kind of curves. You can choose between a number of symbol types, lines, connectors -straight lines, steps, splines-, and change their attributes -color, size, width. You can also plot functions, add error bars, edit legends, rotate and move axis titles, change axis properties, etc. Details GtkPlot GtkPlottypedef struct _GtkPlot GtkPlot; GtkPlotAxis GtkPlotAxistypedef struct _GtkPlotAxis GtkPlotAxis; The GtkPlotAxis struct contains only private data. It should only be accessed through the functions described below. GtkPlotText GtkPlotTexttypedef struct { } GtkPlotText; The GtkPlotText struct contains only private data. It should only be accessed through the functions described below. GtkPlotLine GtkPlotLinetypedef struct { } GtkPlotLine; The GtkPlotLine struct contains only private data. It should only be accessed through the functions described below. GtkPlotSymbol GtkPlotSymboltypedef struct { } GtkPlotSymbol; The GtkPlotSymbol struct contains only private data. It should only be accessed through the functions described below. GtkPlotTick GtkPlotTicktypedef struct { } GtkPlotTick; The GtkPlotTick struct contains only private data. It should only be accessed through the functions described below. GtkPlotTicks GtkPlotTickstypedef struct { } GtkPlotTicks; The GtkPlotTicks struct contains only private data. It should only be accessed through the functions described below. GtkPlotVector GtkPlotVectortypedef struct { } GtkPlotVector; The GtkPlotVector struct contains only private data. It should only be accessed through the functions described below. GtkPlotMarker GtkPlotMarkertypedef struct { } GtkPlotMarker; The GtkPlotMarker struct contains only private data. It should only be accessed through the functions described below. GtkPlotFunc () GtkPlotFuncgdouble (*GtkPlotFunc) (GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *error); plot : data : x : error : Returns : GtkPlotFunc3D () GtkPlotFunc3Dgdouble (*GtkPlotFunc3D) (GtkPlot *plot, GtkPlotData *data, gdouble x, gdouble y, gboolean *error); plot : data : x : y : error : Returns : GtkPlotIterator () GtkPlotIteratorvoid (*GtkPlotIterator) (GtkPlot *plot, GtkPlotData *data, gint iter, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error); plot : data : iter : x : y : z : a : dx : dy : dz : da : label : error : enum GtkPlotScale GtkPlotScaletypedef enum { GTK_PLOT_SCALE_LINEAR, GTK_PLOT_SCALE_LOG10 } GtkPlotScale; enum GtkPlotSymbolType GtkPlotSymbolTypetypedef enum { GTK_PLOT_SYMBOL_NONE, GTK_PLOT_SYMBOL_SQUARE, GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_UP_TRIANGLE, GTK_PLOT_SYMBOL_DOWN_TRIANGLE, GTK_PLOT_SYMBOL_RIGHT_TRIANGLE, GTK_PLOT_SYMBOL_LEFT_TRIANGLE, GTK_PLOT_SYMBOL_DIAMOND, GTK_PLOT_SYMBOL_PLUS, GTK_PLOT_SYMBOL_CROSS, GTK_PLOT_SYMBOL_STAR, GTK_PLOT_SYMBOL_DOT, GTK_PLOT_SYMBOL_IMPULSE, } GtkPlotSymbolType; enum GtkPlotSymbolStyle GtkPlotSymbolStyletypedef enum { GTK_PLOT_SYMBOL_EMPTY, GTK_PLOT_SYMBOL_FILLED, GTK_PLOT_SYMBOL_OPAQUE } GtkPlotSymbolStyle; enum GtkPlotBorderStyle GtkPlotBorderStyletypedef enum { GTK_PLOT_BORDER_NONE, GTK_PLOT_BORDER_LINE, GTK_PLOT_BORDER_SHADOW, } GtkPlotBorderStyle; enum GtkPlotLineStyle GtkPlotLineStyletypedef enum { GTK_PLOT_LINE_NONE, GTK_PLOT_LINE_SOLID, GTK_PLOT_LINE_DOTTED, GTK_PLOT_LINE_DASHED, GTK_PLOT_LINE_DOT_DASH, GTK_PLOT_LINE_DOT_DOT_DASH, GTK_PLOT_LINE_DOT_DASH_DASH } GtkPlotLineStyle; enum GtkPlotConnector GtkPlotConnectortypedef enum { GTK_PLOT_CONNECT_NONE, GTK_PLOT_CONNECT_STRAIGHT, GTK_PLOT_CONNECT_SPLINE, GTK_PLOT_CONNECT_HV_STEP, GTK_PLOT_CONNECT_VH_STEP, GTK_PLOT_CONNECT_MIDDLE_STEP } GtkPlotConnector; enum GtkPlotLabelPos GtkPlotLabelPostypedef enum { GTK_PLOT_LABEL_NONE = 0, GTK_PLOT_LABEL_IN = 1 << 0, GTK_PLOT_LABEL_OUT = 1 << 1, }GtkPlotLabelPos; enum GtkPlotError GtkPlotErrortypedef enum { GTK_PLOT_ERROR_DIV_ZERO, GTK_PLOT_ERROR_LOG_NEG } GtkPlotError; enum GtkPlotOrientation GtkPlotOrientationtypedef enum { GTK_PLOT_AXIS_X, GTK_PLOT_AXIS_Y, GTK_PLOT_AXIS_Z, } GtkPlotOrientation; enum GtkPlotAxisPos GtkPlotAxisPostypedef enum { GTK_PLOT_AXIS_LEFT, GTK_PLOT_AXIS_RIGHT, GTK_PLOT_AXIS_TOP, GTK_PLOT_AXIS_BOTTOM } GtkPlotAxisPos; enum GtkPlotLabelStyle GtkPlotLabelStyletypedef enum { GTK_PLOT_LABEL_FLOAT, GTK_PLOT_LABEL_EXP, GTK_PLOT_LABEL_POW } GtkPlotLabelStyle; enum GtkPlotTicksPos GtkPlotTicksPostypedef enum { GTK_PLOT_TICKS_NONE = 0, GTK_PLOT_TICKS_IN = 1 << 0, GTK_PLOT_TICKS_OUT = 1 << 1 } GtkPlotTicksPos; GtkPlotTicksAutoscaleFunc () GtkPlotTicksAutoscaleFuncvoid (*GtkPlotTicksAutoscaleFunc) (GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision); axis : xmin : xmax : precision : GtkPlotTicksInverseFunc () GtkPlotTicksInverseFuncgdouble (*GtkPlotTicksInverseFunc) (GtkPlotAxis *axis, gdouble y); axis : y : Returns : GtkPlotTicksRecalcFunc () GtkPlotTicksRecalcFuncvoid (*GtkPlotTicksRecalcFunc) (GtkPlotAxis *axis); axis : GtkPlotTicksTransformFunc () GtkPlotTicksTransformFuncgdouble (*GtkPlotTicksTransformFunc) (GtkPlotAxis *axis, gdouble y); axis : y : Returns : GtkPlotParseLabelFunc () GtkPlotParseLabelFuncvoid (*GtkPlotParseLabelFunc) (GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label); axis : val : precision : style : label : gtk_plot_new () gtk_plot_newGtkWidget * gtk_plot_new (GdkDrawable *drawable); drawable : a Gdk drawable Returns : gtk_plot_new_with_size () gtk_plot_new_with_sizeGtkWidget * gtk_plot_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); drawable : a Gdk drawable width : plot widget width height : plot widget height Returns : the plot widget gtk_plot_construct () gtk_plot_constructvoid gtk_plot_construct (GtkPlot *plot, GdkDrawable *drawable); plot : a GtkPlot widget drawable : a Gdk drawable gtk_plot_construct_with_size () gtk_plot_construct_with_sizevoid gtk_plot_construct_with_size (GtkPlot *plot, GdkDrawable *drawable, gdouble width, gdouble height); plot : a GtkPlot widget drawable : a Gdk drawable width : height : gtk_plot_set_drawable () gtk_plot_set_drawablevoid gtk_plot_set_drawable (GtkPlot *plot, GdkDrawable *drawable); plot : a GtkPlot widget drawable : a Gdk drawable gtk_plot_get_drawable () gtk_plot_get_drawableGdkDrawable * gtk_plot_get_drawable (GtkPlot *plot); plot : a GtkPlot widget Returns : (transfer none) the GdkDrawable of the plot gtk_plot_set_pc () gtk_plot_set_pcvoid gtk_plot_set_pc (GtkPlot *plot, GtkPlotPC *pc); plot : a GtkPlot widget pc : a GtkPlotPc gtk_plot_set_background_pixmap () gtk_plot_set_background_pixmapvoid gtk_plot_set_background_pixmap (GtkPlot *plot, GdkPixmap *pixmap); plot : a GtkPlot widget pixmap : a Gdk pixmap gtk_plot_set_transparent () gtk_plot_set_transparentvoid gtk_plot_set_transparent (GtkPlot *plot, gboolean transparent); plot : a GtkPlot widget transparent : gtk_plot_is_transparent () gtk_plot_is_transparentgboolean gtk_plot_is_transparent (GtkPlot *plot); plot : a GtkPlot widget Returns : gtk_plot_get_position () gtk_plot_get_positionvoid gtk_plot_get_position (GtkPlot *plot, gdouble *x, gdouble *y); plot : a GtkPlot widget. x : y y : gtk_plot_get_size () gtk_plot_get_sizevoid gtk_plot_get_size (GtkPlot *plot, gdouble *width, gdouble *height); plot : width : height : gtk_plot_get_internal_allocation () gtk_plot_get_internal_allocationGtkAllocation gtk_plot_get_internal_allocation (GtkPlot *plot); plot : a GtkPlot widget. Returns : (transfer none) internal_allocation gtk_plot_set_background () gtk_plot_set_backgroundvoid gtk_plot_set_background (GtkPlot *plot, const GdkColor *bg_color); plot : a GtkPlot widget. bg_color : gtk_plot_paint () gtk_plot_paintvoid gtk_plot_paint (GtkPlot *plot); plot : a GtkPlot widget gtk_plot_refresh () gtk_plot_refreshvoid gtk_plot_refresh (GtkPlot *plot, GdkRectangle *drawing_area); plot : a GtkPlot widget drawing_area : a GdkRectangle gtk_plot_move () gtk_plot_movevoid gtk_plot_move (GtkPlot *plot, gdouble x, gdouble y); plot : x : y : gtk_plot_resize () gtk_plot_resizevoid gtk_plot_resize (GtkPlot *plot, gdouble width, gdouble height); plot : a GtkPlot widget.a GtkPlot widget. width : height : gtk_plot_set_magnification () gtk_plot_set_magnificationvoid gtk_plot_set_magnification (GtkPlot *plot, gdouble magnification); plot : a GtkPlot widget. magnification : gtk_plot_move_resize () gtk_plot_move_resizevoid gtk_plot_move_resize (GtkPlot *plot, gdouble x, gdouble y, gdouble width, gdouble height); plot : a GtkPlot widget. x : y : width : height : gtk_plot_get_pixel () gtk_plot_get_pixelvoid gtk_plot_get_pixel (GtkPlot *plot, gdouble xx, gdouble yy, gdouble *x, gdouble *y); plot : a GtkPlot widget. xx : yy : x : y : gtk_plot_get_point () gtk_plot_get_pointvoid gtk_plot_get_point (GtkPlot *plot, gint x, gint y, gdouble *xx, gdouble *yy); plot : a GtkPlot widget. x : y : xx : yy : gtk_plot_clip_data () gtk_plot_clip_datavoid gtk_plot_clip_data (GtkPlot *plot, gboolean clip); plot : a GtkPlot widget. clip : gtk_plot_set_xrange () gtk_plot_set_xrangevoid gtk_plot_set_xrange (GtkPlot *plot, gdouble xmin, gdouble xmax); plot : a GtkPlot widget. xmin : xmax : gtk_plot_set_yrange () gtk_plot_set_yrangevoid gtk_plot_set_yrange (GtkPlot *plot, gdouble ymin, gdouble ymax); plot : a GtkPlot widget. ymin : ymax : gtk_plot_set_range () gtk_plot_set_rangevoid gtk_plot_set_range (GtkPlot *plot, gdouble xmin, gdouble xmax, gdouble ymin, gdouble ymax); plot : a GtkPlot widget. xmin : xmax : ymin : ymax : gtk_plot_autoscale () gtk_plot_autoscalevoid gtk_plot_autoscale (GtkPlot *plot); plot : a GtkPlot widget. gtk_plot_get_xrange () gtk_plot_get_xrangevoid gtk_plot_get_xrange (GtkPlot *plot, gdouble *xmin, gdouble *xmax); plot : a GtkPlot widget. xmin : xmax : gtk_plot_get_yrange () gtk_plot_get_yrangevoid gtk_plot_get_yrange (GtkPlot *plot, gdouble *ymin, gdouble *ymax); plot : a GtkPlot widget. ymin : ymax : gtk_plot_set_xscale () gtk_plot_set_xscalevoid gtk_plot_set_xscale (GtkPlot *plot, GtkPlotScale scale_type); plot : a GtkPlot widget. scale_type : gtk_plot_set_yscale () gtk_plot_set_yscalevoid gtk_plot_set_yscale (GtkPlot *plot, GtkPlotScale scale_type); plot : a GtkPlot widget. scale_type : gtk_plot_get_xscale () gtk_plot_get_xscaleGtkPlotScale gtk_plot_get_xscale (GtkPlot *plot); plot : a GtkPlot widget. Returns : gtk_plot_get_yscale () gtk_plot_get_yscaleGtkPlotScale gtk_plot_get_yscale (GtkPlot *plot); plot : a GtkPlot widget. Returns : gtk_plot_reflect_x () gtk_plot_reflect_xvoid gtk_plot_reflect_x (GtkPlot *plot, gboolean reflect); plot : a GtkPlot widget. reflect : gtk_plot_reflect_y () gtk_plot_reflect_yvoid gtk_plot_reflect_y (GtkPlot *plot, gboolean reflect); plot : a GtkPlot widget. reflect : gtk_plot_is_x_reflected () gtk_plot_is_x_reflectedgboolean gtk_plot_is_x_reflected (GtkPlot *plot); plot : a GtkPlot widget. Returns : gtk_plot_is_y_reflected () gtk_plot_is_y_reflectedgboolean gtk_plot_is_y_reflected (GtkPlot *plot); plot : a GtkPlot widget. Returns : gtk_plot_put_text () gtk_plot_put_textGtkPlotText * gtk_plot_put_text (GtkPlot *plot, gdouble x, gdouble y, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text); plot : a GtkPlot widget. x : y : font : height : angle : fg : bg : transparent : justification : text : Returns : (transfer none) the GtkPlotText gtk_plot_remove_text () gtk_plot_remove_textgint gtk_plot_remove_text (GtkPlot *plot, GtkPlotText *text); plot : a GtkPlot widget. text : Returns : gtk_plot_text_get_size () gtk_plot_text_get_sizevoid gtk_plot_text_get_size (const gchar *text, gint angle, const gchar *text_font, gint text_height, gint *width, gint *height, gint *ascent, gint *descent); text : angle : text_font : text_height : width : height : ascent : descent : gtk_plot_text_get_area () gtk_plot_text_get_areavoid gtk_plot_text_get_area (const gchar *text, gint angle, GtkJustification just, const gchar *font_name, gint font_size, gint *x, gint *y, gint *width, gint *height); text : angle : just : font_name : font_size : x : y : width : height : gtk_plot_text_set_attributes () gtk_plot_text_set_attributesvoid gtk_plot_text_set_attributes (GtkPlotText *text_attr, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text); text_attr : font : height : angle : fg : bg : transparent : justification : text : gtk_plot_text_set_border () gtk_plot_text_set_bordervoid gtk_plot_text_set_border (GtkPlotText *text, GtkPlotBorderStyle border, gint border_space, gint border_width, gint shadow_width); text : border : border_space : border_width : shadow_width : gtk_plot_draw_line () gtk_plot_draw_linevoid gtk_plot_draw_line (GtkPlot *plot, GtkPlotLine line, gdouble x1, gdouble y1, gdouble x2, gdouble y2); plot : a GtkPlot widget line : x1 : y1 : x2 : y2 : gtk_plot_draw_text () gtk_plot_draw_textvoid gtk_plot_draw_text (GtkPlot *plot, GtkPlotText text); plot : text : gtk_plot_set_ticks () gtk_plot_set_ticksvoid gtk_plot_set_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step, gint nminor); plot : a GtkPlot widget. orientation : major_step : nminor : gtk_plot_set_major_ticks () gtk_plot_set_major_ticksvoid gtk_plot_set_major_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step); plot : a GtkPlot widget. orientation : major_step : gtk_plot_set_minor_ticks () gtk_plot_set_minor_ticksvoid gtk_plot_set_minor_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gint nminor); plot : a GtkPlot widget. orientation : nminor : gtk_plot_set_ticks_limits () gtk_plot_set_ticks_limitsvoid gtk_plot_set_ticks_limits (GtkPlot *plot, GtkPlotOrientation orientation, gdouble begin, gdouble end); plot : a GtkPlot widget. orientation : begin : end : gtk_plot_unset_ticks_limits () gtk_plot_unset_ticks_limitsvoid gtk_plot_unset_ticks_limits (GtkPlot *plot, GtkPlotOrientation orientation); plot : a GtkPlot widget. orientation : gtk_plot_set_break () gtk_plot_set_breakvoid gtk_plot_set_break (GtkPlot *plot, GtkPlotOrientation orientation, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos); plot : a GtkPlot widget. orientation : min : max : step_after : nminor_after : scale_after : pos : gtk_plot_remove_break () gtk_plot_remove_breakvoid gtk_plot_remove_break (GtkPlot *plot, GtkPlotOrientation orientation); plot : a GtkPlot widget. orientation : gtk_plot_axis_new () gtk_plot_axis_newGtkObject * gtk_plot_axis_new (GtkPlotOrientation orientation); orientation : Returns : gtk_plot_axis_construct () gtk_plot_axis_constructvoid gtk_plot_axis_construct (GtkPlotAxis *axis, GtkPlotOrientation orientation); axis : orientation : gtk_plot_get_axis () gtk_plot_get_axisGtkPlotAxis * gtk_plot_get_axis (GtkPlot *plot, GtkPlotAxisPos axis); plot : a GtkPlot widget. axis : a GtkPlotAxis. Returns : (transfer none) the GtkPlotAxis at the given position gtk_plot_axis_set_visible () gtk_plot_axis_set_visiblevoid gtk_plot_axis_set_visible (GtkPlotAxis *axis, gboolean visible); axis : a GtkPlotAxis. visible : gtk_plot_axis_visible () gtk_plot_axis_visiblegboolean gtk_plot_axis_visible (GtkPlotAxis *axis); axis : a GtkPlotAxis. Returns : gtk_plot_axis_set_title () gtk_plot_axis_set_titlevoid gtk_plot_axis_set_title (GtkPlotAxis *axis, const gchar *title); axis : a GtkPlotAxis. title title : gtk_plot_axis_show_title () gtk_plot_axis_show_titlevoid gtk_plot_axis_show_title (GtkPlotAxis *axis); axis : a GtkPlotAxis. gtk_plot_axis_hide_title () gtk_plot_axis_hide_titlevoid gtk_plot_axis_hide_title (GtkPlotAxis *axis); axis : a GtkPlotAxis. gtk_plot_axis_move_title () gtk_plot_axis_move_titlevoid gtk_plot_axis_move_title (GtkPlotAxis *axis, gint angle, gdouble x, gdouble y); axis : a GtkPlotAxis. angle : x : y : gtk_plot_axis_justify_title () gtk_plot_axis_justify_titlevoid gtk_plot_axis_justify_title (GtkPlotAxis *axis, GtkJustification justification); axis : a GtkPlotAxis. justification : gtk_plot_axis_set_attributes () gtk_plot_axis_set_attributesvoid gtk_plot_axis_set_attributes (GtkPlotAxis *axis, gfloat width, const GdkColor *color); axis : a GtkPlotAxis. width : color : gtk_plot_axis_get_attributes () gtk_plot_axis_get_attributesvoid gtk_plot_axis_get_attributes (GtkPlotAxis *axis, gfloat *width, GdkColor *color); axis : a GtkPlotAxis. width : color: color : gtk_plot_axis_set_ticks () gtk_plot_axis_set_ticksvoid gtk_plot_axis_set_ticks (GtkPlotAxis *axis, gdouble major_step, gint nminor); axis : a GtkPlotAxis. major_step : nminor : gtk_plot_axis_set_major_ticks () gtk_plot_axis_set_major_ticksvoid gtk_plot_axis_set_major_ticks (GtkPlotAxis *axis, gdouble major_step); axis : a GtkPlotAxis. major_step : gtk_plot_axis_set_minor_ticks () gtk_plot_axis_set_minor_ticksvoid gtk_plot_axis_set_minor_ticks (GtkPlotAxis *axis, gint nminor); axis : a GtkPlotAxis. nminor : gtk_plot_axis_set_ticks_length () gtk_plot_axis_set_ticks_lengthvoid gtk_plot_axis_set_ticks_length (GtkPlotAxis *axis, gint length); axis : a GtkPlotAxis. length : gtk_plot_axis_set_ticks_width () gtk_plot_axis_set_ticks_widthvoid gtk_plot_axis_set_ticks_width (GtkPlotAxis *axis, gfloat width); axis : a GtkPlotAxis. width : gtk_plot_axis_show_ticks () gtk_plot_axis_show_ticksvoid gtk_plot_axis_show_ticks (GtkPlotAxis *axis, gint major_mask, gint minor_mask); axis : a GtkPlotAxis. major_mask : minor_mask : gtk_plot_axis_set_ticks_limits () gtk_plot_axis_set_ticks_limitsvoid gtk_plot_axis_set_ticks_limits (GtkPlotAxis *axis, gdouble begin, gdouble end); axis : a GtkPlotAxis. begin : end : gtk_plot_axis_unset_ticks_limits () gtk_plot_axis_unset_ticks_limitsvoid gtk_plot_axis_unset_ticks_limits (GtkPlotAxis *axis); axis : a GtkPlotAxis. gtk_plot_axis_set_tick_labels () gtk_plot_axis_set_tick_labelsvoid gtk_plot_axis_set_tick_labels (GtkPlotAxis *axis, GtkPlotArray *array); axis : array : gtk_plot_axis_set_break () gtk_plot_axis_set_breakvoid gtk_plot_axis_set_break (GtkPlotAxis *axis, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos); axis : a GtkPlotAxis. min : max : step_after : nminor_after : scale_after : pos : gtk_plot_axis_remove_break () gtk_plot_axis_remove_breakvoid gtk_plot_axis_remove_break (GtkPlotAxis *axis); axis : a GtkPlotAxis. gtk_plot_axis_show_labels () gtk_plot_axis_show_labelsvoid gtk_plot_axis_show_labels (GtkPlotAxis *axis, gint labels_mask); axis : a GtkPlotAxis. labels_mask : gtk_plot_axis_title_set_attributes () gtk_plot_axis_title_set_attributesvoid gtk_plot_axis_title_set_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification); axis : a GtkPlotAxis. font : height : angle : fg : bg : transparent : justification : gtk_plot_axis_set_labels_attributes () gtk_plot_axis_set_labels_attributesvoid gtk_plot_axis_set_labels_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification); axis : a GtkPlotAxis. font : height : angle : fg : bg : transparent : justification : gtk_plot_axis_set_labels_numbers gtk_plot_axis_set_labels_numbers#define gtk_plot_axis_set_labels_numbers gtk_plot_axis_set_labels_style gtk_plot_axis_set_labels_style () gtk_plot_axis_set_labels_stylevoid gtk_plot_axis_set_labels_style (GtkPlotAxis *axis, GtkPlotLabelStyle style, gint precision); axis : a GtkPlotAxis. style : precision : gtk_plot_axis_set_labels_offset () gtk_plot_axis_set_labels_offsetvoid gtk_plot_axis_set_labels_offset (GtkPlotAxis *axis, gint offset); axis : a GtkPlotAxis. offset : gtk_plot_axis_get_labels_offset () gtk_plot_axis_get_labels_offsetgint gtk_plot_axis_get_labels_offset (GtkPlotAxis *axis); axis : a GtkPlotAxis. Returns : gtk_plot_axis_use_custom_tick_labels () gtk_plot_axis_use_custom_tick_labelsvoid gtk_plot_axis_use_custom_tick_labels (GtkPlotAxis *axis, gboolean use); axis : use : gtk_plot_axis_set_labels_suffix () gtk_plot_axis_set_labels_suffixvoid gtk_plot_axis_set_labels_suffix (GtkPlotAxis *axis, const gchar *text); axis : a GtkPlotAxis. text : gtk_plot_axis_set_labels_prefix () gtk_plot_axis_set_labels_prefixvoid gtk_plot_axis_set_labels_prefix (GtkPlotAxis *axis, const gchar *text); axis : a GtkPlotAxis. text : gtk_plot_axis_get_labels_suffix () gtk_plot_axis_get_labels_suffixgchar * gtk_plot_axis_get_labels_suffix (GtkPlotAxis *axis); axis : a GtkPlotAxis. Returns : gtk_plot_axis_get_labels_prefix () gtk_plot_axis_get_labels_prefixgchar * gtk_plot_axis_get_labels_prefix (GtkPlotAxis *axis); axis : a GtkPlotAxis. Returns : gtk_plot_axis_ticks_recalc () gtk_plot_axis_ticks_recalcvoid gtk_plot_axis_ticks_recalc (GtkPlotAxis *axis); axis : gtk_plot_axis_ticks_autoscale () gtk_plot_axis_ticks_autoscalevoid gtk_plot_axis_ticks_autoscale (GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision); axis : xmin : xmax : precision : gtk_plot_axis_ticks_transform () gtk_plot_axis_ticks_transformgdouble gtk_plot_axis_ticks_transform (GtkPlotAxis *axis, gdouble y); axis : y : Returns : gtk_plot_axis_ticks_inverse () gtk_plot_axis_ticks_inversegdouble gtk_plot_axis_ticks_inverse (GtkPlotAxis *axis, gdouble x); axis : x : Returns : gtk_plot_axis_parse_label () gtk_plot_axis_parse_labelvoid gtk_plot_axis_parse_label (GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label); axis : val : precision : style : label : gtk_plot_x0_set_visible () gtk_plot_x0_set_visiblevoid gtk_plot_x0_set_visible (GtkPlot *plot, gboolean visible); plot : a GtkPlot widget. visible : gtk_plot_x0_visible () gtk_plot_x0_visiblegboolean gtk_plot_x0_visible (GtkPlot *plot); plot : a GtkPlot widget. Returns : gtk_plot_y0_set_visible () gtk_plot_y0_set_visiblevoid gtk_plot_y0_set_visible (GtkPlot *plot, gboolean visible); plot : a GtkPlot widget. visible : gtk_plot_y0_visible () gtk_plot_y0_visiblegboolean gtk_plot_y0_visible (GtkPlot *plot); plot : a GtkPlot widget. Returns : gtk_plot_grids_set_on_top () gtk_plot_grids_set_on_topvoid gtk_plot_grids_set_on_top (GtkPlot *plot, gboolean on_top); plot : a GtkPlot widget. on_top : gtk_plot_grids_on_top () gtk_plot_grids_on_topgboolean gtk_plot_grids_on_top (GtkPlot *plot); plot : a GtkPlot widget. Returns : gtk_plot_grids_set_visible () gtk_plot_grids_set_visiblevoid gtk_plot_grids_set_visible (GtkPlot *plot, gboolean vmajor, gboolean vminor, gboolean hmajor, gboolean hminor); plot : a GtkPlot widget. vmajor : vminor : hmajor : hminor : gtk_plot_grids_visible () gtk_plot_grids_visiblevoid gtk_plot_grids_visible (GtkPlot *plot, gboolean *vmajor, gboolean *vminor, gboolean *hmajor, gboolean *hminor); plot : a GtkPlot widget. vmajor : vminor : hmajor : hminor : gtk_plot_y0line_set_attributes () gtk_plot_y0line_set_attributesvoid gtk_plot_y0line_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); plot : a GtkPlot widget. line_style : width : color : gtk_plot_x0line_set_attributes () gtk_plot_x0line_set_attributesvoid gtk_plot_x0line_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); plot : line_style : width : color : gtk_plot_major_vgrid_set_attributes () gtk_plot_major_vgrid_set_attributesvoid gtk_plot_major_vgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); plot : style : width : color : gtk_plot_minor_vgrid_set_attributes () gtk_plot_minor_vgrid_set_attributesvoid gtk_plot_minor_vgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); plot : a GtkPlot widget. line_style : width : color : gtk_plot_major_hgrid_set_attributes () gtk_plot_major_hgrid_set_attributesvoid gtk_plot_major_hgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); plot : a GtkPlot widget. line_style : width : color : gtk_plot_minor_hgrid_set_attributes () gtk_plot_minor_hgrid_set_attributesvoid gtk_plot_minor_hgrid_set_attributes (GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); plot : a GtkPlot widget. line_style : width : color : gtk_plot_show_legends () gtk_plot_show_legendsvoid gtk_plot_show_legends (GtkPlot *plot); plot : a GtkPlot widget. gtk_plot_hide_legends () gtk_plot_hide_legendsvoid gtk_plot_hide_legends (GtkPlot *plot); plot : a GtkPlot widget. gtk_plot_set_legends_border () gtk_plot_set_legends_bordervoid gtk_plot_set_legends_border (GtkPlot *plot, GtkPlotBorderStyle legends_border, gint shadow_width); plot : a GtkPlot widget. legends_border : shadow_width : gtk_plot_legends_move () gtk_plot_legends_movevoid gtk_plot_legends_move (GtkPlot *plot, gdouble x, gdouble y); plot : a GtkPlot widget. x : y : gtk_plot_legends_get_position () gtk_plot_legends_get_positionvoid gtk_plot_legends_get_position (GtkPlot *plot, gdouble *x, gdouble *y); plot : a GtkPlot widget. x : y : gtk_plot_legends_get_allocation () gtk_plot_legends_get_allocationGtkAllocation gtk_plot_legends_get_allocation (GtkPlot *plot); plot : a GtkPlot widget. Returns : (transfer full) the GtkAllocation gtk_plot_legends_set_attributes () gtk_plot_legends_set_attributesvoid gtk_plot_legends_set_attributes (GtkPlot *plot, const gchar *font, gint height, const GdkColor *foreground, const GdkColor *background); plot : a GtkPlot widget. font : height : foreground : background : gtk_plot_set_line_attributes () gtk_plot_set_line_attributesvoid gtk_plot_set_line_attributes (GtkPlot *plot, GtkPlotLine line); plot : a GtkPlot widget line : gtk_plot_add_data () gtk_plot_add_datavoid gtk_plot_add_data (GtkPlot *plot, GtkPlotData *data); plot : data : gtk_plot_remove_data () gtk_plot_remove_datagint gtk_plot_remove_data (GtkPlot *plot, GtkPlotData *dataset); plot : a GtkPlot widget. dataset : Returns : gtk_plot_add_function () gtk_plot_add_functionGtkPlotData * gtk_plot_add_function (GtkPlot *plot, GtkPlotFunc function); plot : a GtkPlot widget. function : the dataset generation function. scope async. Returns : (transfer none) the GtkPlotData Property Details The <literal>"allocation-height"</literal> property GtkPlot:allocation-height "allocation-height" gint : Read / Write Allowed values: >= -2147483647 Default value: 0 The <literal>"allocation-width"</literal> property GtkPlot:allocation-width "allocation-width" gint : Read / Write Allowed values: >= -2147483647 Default value: 0 The <literal>"allocation-x"</literal> property GtkPlot:allocation-x "allocation-x" gint : Read / Write Allowed values: >= -2147483647 Default value: 0 The <literal>"allocation-y"</literal> property GtkPlot:allocation-y "allocation-y" gint : Read / Write Allowed values: >= -2147483647 Default value: 0 The <literal>"bg-color"</literal> property GtkPlot:bg-color "bg-color" gpointer : Read / Write The <literal>"bg-pixmap"</literal> property GtkPlot:bg-pixmap "bg-pixmap" gpointer : Read / Write The <literal>"bottom-align"</literal> property GtkPlot:bottom-align "bottom-align" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"bottom-axis"</literal> property GtkPlot:bottom-axis "bottom-axis" GtkPlotAxis* : Read The <literal>"clip-data"</literal> property GtkPlot:clip-data "clip-data" gboolean : Read / Write Default value: FALSE The <literal>"grids-on-top"</literal> property GtkPlot:grids-on-top "grids-on-top" gboolean : Read / Write Default value: FALSE The <literal>"height"</literal> property GtkPlot:height "height" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"left-align"</literal> property GtkPlot:left-align "left-align" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"left-axis"</literal> property GtkPlot:left-axis "left-axis" GtkPlotAxis* : Read The <literal>"legends-attr-text"</literal> property GtkPlot:legends-attr-text "legends-attr-text" gpointer : Read / Write The <literal>"legends-border"</literal> property GtkPlot:legends-border "legends-border" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"legends-border-width"</literal> property GtkPlot:legends-border-width "legends-border-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"legends-height"</literal> property GtkPlot:legends-height "legends-height" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"legends-line-width"</literal> property GtkPlot:legends-line-width "legends-line-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"legends-shadow-width"</literal> property GtkPlot:legends-shadow-width "legends-shadow-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"legends-show"</literal> property GtkPlot:legends-show "legends-show" gboolean : Read / Write Default value: FALSE The <literal>"legends-transparent"</literal> property GtkPlot:legends-transparent "legends-transparent" gboolean : Read / Write Default value: FALSE The <literal>"legends-width"</literal> property GtkPlot:legends-width "legends-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"legends-x"</literal> property GtkPlot:legends-x "legends-x" gdouble : Read / Write Default value: 0 The <literal>"legends-y"</literal> property GtkPlot:legends-y "legends-y" gdouble : Read / Write Default value: 0 The <literal>"magnification"</literal> property GtkPlot:magnification "magnification" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"reflect-x"</literal> property GtkPlot:reflect-x "reflect-x" gboolean : Read / Write Default value: FALSE The <literal>"reflect-y"</literal> property GtkPlot:reflect-y "reflect-y" gboolean : Read / Write Default value: FALSE The <literal>"right-align"</literal> property GtkPlot:right-align "right-align" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"right-axis"</literal> property GtkPlot:right-axis "right-axis" GtkPlotAxis* : Read The <literal>"show-x0"</literal> property GtkPlot:show-x0 "show-x0" gboolean : Read / Write Default value: FALSE The <literal>"show-y0"</literal> property GtkPlot:show-y0 "show-y0" gboolean : Read / Write Default value: FALSE The <literal>"top-align"</literal> property GtkPlot:top-align "top-align" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"top-axis"</literal> property GtkPlot:top-axis "top-axis" GtkPlotAxis* : Read The <literal>"transparent"</literal> property GtkPlot:transparent "transparent" gboolean : Read / Write Default value: FALSE The <literal>"use-pixmap"</literal> property GtkPlot:use-pixmap "use-pixmap" gboolean : Read / Write Default value: FALSE The <literal>"width"</literal> property GtkPlot:width "width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"x"</literal> property GtkPlot:x "x" gdouble : Read / Write Default value: 0 The <literal>"x0-line"</literal> property GtkPlot:x0-line "x0-line" gpointer : Read / Write The <literal>"xmax"</literal> property GtkPlot:xmax "xmax" gdouble : Read / Write Default value: 0 The <literal>"xmin"</literal> property GtkPlot:xmin "xmin" gdouble : Read / Write Default value: 0 The <literal>"xscale"</literal> property GtkPlot:xscale "xscale" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"y"</literal> property GtkPlot:y "y" gdouble : Read / Write Default value: 0 The <literal>"y0-line"</literal> property GtkPlot:y0-line "y0-line" gpointer : Read / Write The <literal>"ymax"</literal> property GtkPlot:ymax "ymax" gdouble : Read / Write Default value: 0 The <literal>"ymin"</literal> property GtkPlot:ymin "ymin" gdouble : Read / Write Default value: 0 The <literal>"yscale"</literal> property GtkPlot:yscale "yscale" gint : Read / Write Allowed values: >= 0 Default value: 0 Signal Details The <literal>"add-data"</literal> signal GtkPlot::add-datagboolean user_function (GtkPlot *plot, GtkPlotData *arg1, gpointer user_data) : Run Last plot : the object which received the signal. arg1 : user_data : user data set when the signal handler was connected. Returns : The <literal>"axis-changed"</literal> signal GtkPlot::axis-changedgboolean user_function (GtkPlot *plot, GtkPlotAxis *arg1, gpointer user_data) : Run Last plot : the object which received the signal. arg1 : user_data : user data set when the signal handler was connected. Returns : The <literal>"changed"</literal> signal GtkPlot::changedvoid user_function (GtkPlot *plot, gpointer user_data) : Run Last plot : a GtkPlot widget. user_data : user data set when the signal handler was connected. The <literal>"moved"</literal> signal GtkPlot::movedgboolean user_function (GtkPlot *plot, gpointer x, gpointer y, gpointer user_data) : Run Last plot : a GtkPlot widget. x : y : user_data : user data set when the signal handler was connected. Returns : The <literal>"resized"</literal> signal GtkPlot::resizedgboolean user_function (GtkPlot *plot, gpointer width, gpointer height, gpointer user_data) : Run Last plot : a GtkPlot widget. width : height : user_data : user data set when the signal handler was connected. Returns : The <literal>"update"</literal> signal GtkPlot::updatevoid user_function (GtkPlot *plot, gboolean new_range, gpointer user_data) : Run Last plot : a GtkPlot widget. new_range : user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtkplotcanvaspixmap.xml0000644000076400001440000001166112604172532020604 00000000000000 ]> GtkPlotCanvasPixmap 3 GTKEXTRA Library GtkPlotCanvasPixmap Synopsis #include <gtkextra.h> GtkPlotCanvasPixmap; GtkPlotCanvasChild * gtk_plot_canvas_pixmap_new (GdkPixmap *_pixmap, GdkBitmap *mask); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotCanvasChild +----GtkPlotCanvasPixmap Properties "mask-bitmap" gpointer : Read / Write "pixmap" gpointer : Read / Write Description FIXME:: need long description Details GtkPlotCanvasPixmap GtkPlotCanvasPixmaptypedef struct _GtkPlotCanvasPixmap GtkPlotCanvasPixmap; The GtkPlotCanvasPixmap struct contains only private data. It should only be accessed through the functions described below. gtk_plot_canvas_pixmap_new () gtk_plot_canvas_pixmap_newGtkPlotCanvasChild * gtk_plot_canvas_pixmap_new (GdkPixmap *_pixmap, GdkBitmap *mask); _pixmap : a GdkPixmap. mask : Returns : Property Details The <literal>"mask-bitmap"</literal> property GtkPlotCanvasPixmap:mask-bitmap "mask-bitmap" gpointer : Read / Write Mask. The <literal>"pixmap"</literal> property GtkPlotCanvasPixmap:pixmap "pixmap" gpointer : Read / Write Pixmap. gtkextra-3.2.0/docs/reference/xml/gtkplotdtriangle.xml0000644000076400001440000000561012604172532020060 00000000000000 ]> GtkPlotDTriangle 3 GTKEXTRA Library GtkPlotDTriangle Synopsis #include <gtkextra.h> void triangulate (char *, struct triangulateio *, struct triangulateio *, struct triangulateio *); Description Details triangulate () triangulatevoid triangulate (char *, struct triangulateio *, struct triangulateio *, struct triangulateio *); Param1 : Param2 : Param3 : Param4 : gtkextra-3.2.0/docs/reference/xml/gtkbordercombo.xml0000644000076400001440000001242712604172532017511 00000000000000 ]> GtkBorderCombo 3 GTKEXTRA Library GtkBorderCombo A border combo widget Synopsis #include <gtkextra.h> GtkBorderCombo; GtkWidget * gtk_border_combo_new (void); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----GtkComboButton +----GtkBorderCombo Implemented Interfaces GtkBorderCombo implements AtkImplementorIface, GtkBuildable and GtkOrientable. Signals "changed" : Run First Description It is a GtkComboBox subclass with a variety of border styles in the popdown window arranged in a table of togglebuttons. Details GtkBorderCombo GtkBorderCombotypedef struct _GtkBorderCombo GtkBorderCombo; The GtkBorderCombo struct contains only private data. It should only be accessed through the functions described below. gtk_border_combo_new () gtk_border_combo_newGtkWidget * gtk_border_combo_new (void); Returns : Signal Details The <literal>"changed"</literal> signal GtkBorderCombo::changedvoid user_function (GtkBorderCombo *border_combo, gint selection, gpointer user_data) : Run First Emmited when the GtkBorderCombo's state is changed border_combo : the GtkBorderCombo object that received the signal selection : the number of selected item user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtkplot3d.xml0000644000076400001440000034410712604172532016424 00000000000000 ]> GtkPlot3D 3 GTKEXTRA Library GtkPlot3D 3d scientific plots widget Synopsis #include <gtkextra.h> GtkPlot3D; enum GtkPlotPlane; enum GtkPlotSide; GtkWidget* gtk_plot3d_new (GdkDrawable *drawable); GtkWidget* gtk_plot3d_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot3d_construct (GtkPlot3D *plot, GdkDrawable *drawable); void gtk_plot3d_construct_with_size (GtkPlot3D *plot, GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot3d_autoscale (GtkPlot3D *plot); void gtk_plot3d_rotate (GtkPlot3D *plot, gdouble angle_x, gdouble angle_y, gdouble angle_z); void gtk_plot3d_rotate_vector (GtkPlot3D *plot, GtkPlotVector *vector, gdouble a1, gdouble a2, gdouble a3); void gtk_plot3d_reset_angles (GtkPlot3D *plot); void gtk_plot3d_rotate_x (GtkPlot3D *plot, gdouble angle); void gtk_plot3d_rotate_y (GtkPlot3D *plot, gdouble angle); void gtk_plot3d_rotate_z (GtkPlot3D *plot, gdouble angle); void gtk_plot3d_get_pixel (GtkPlot3D *plot, gdouble x, gdouble y, gdouble z, gdouble *px, gdouble *py, gdouble *pz); void gtk_plot3d_set_xrange (GtkPlot3D *plot, gdouble min, gdouble max); void gtk_plot3d_set_yrange (GtkPlot3D *plot, gdouble min, gdouble max); void gtk_plot3d_set_zrange (GtkPlot3D *plot, gdouble min, gdouble max); void gtk_plot3d_set_xfactor (GtkPlot3D *plot, gdouble xfactor); void gtk_plot3d_set_yfactor (GtkPlot3D *plot, gdouble yfactor); void gtk_plot3d_set_zfactor (GtkPlot3D *plot, gdouble zfactor); gdouble gtk_plot3d_get_xfactor (GtkPlot3D *plot); gdouble gtk_plot3d_get_yfactor (GtkPlot3D *plot); gdouble gtk_plot3d_get_zfactor (GtkPlot3D *plot); void gtk_plot3d_plane_set_color (GtkPlot3D *plot, GtkPlotPlane plane, const GdkColor *color); void gtk_plot3d_plane_set_visible (GtkPlot3D *plot, GtkPlotPlane plane, gboolean visible); gboolean gtk_plot3d_plane_visible (GtkPlot3D *plot, GtkPlotPlane plane); void gtk_plot3d_corner_set_visible (GtkPlot3D *plot, gboolean visible); gboolean gtk_plot3d_corner_visible (GtkPlot3D *plot); void gtk_plot3d_corner_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_corner_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); void gtk_plot3d_frame_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_frame_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); GtkPlotAxis * gtk_plot3d_get_axis (GtkPlot3D *plot, GtkPlotOrientation orientation); GtkPlotAxis * gtk_plot3d_get_side (GtkPlot3D *plot, GtkPlotSide side); void gtk_plot3d_show_major_ticks (GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask); void gtk_plot3d_show_minor_ticks (GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask); void gtk_plot3d_show_labels (GtkPlot3D *plot, GtkPlotSide side, gint label_mask); void gtk_plot3d_show_title (GtkPlot3D *plot, GtkPlotSide side); void gtk_plot3d_hide_title (GtkPlot3D *plot, GtkPlotSide side); void gtk_plot3d_set_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step, gint nminor); void gtk_plot3d_set_major_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step); void gtk_plot3d_set_minor_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gint nminor); void gtk_plot3d_set_ticks_length (GtkPlot3D *plot, GtkPlotOrientation direction, gint length); void gtk_plot3d_set_ticks_width (GtkPlot3D *plot, GtkPlotOrientation direction, gfloat width); void gtk_plot3d_show_ticks (GtkPlot3D *plot, GtkPlotSide side, gint major_mask, gint minor_mask); void gtk_plot3d_set_titles_offset (GtkPlot3D *plot, gint offset); gint gtk_plot3d_get_titles_offset (GtkPlot3D *plot); void gtk_plot3d_set_scale (GtkPlot3D *plot, GtkPlotOrientation axis, GtkPlotScale scale); GtkPlotScale gtk_plot3d_get_scale (GtkPlot3D *plot, GtkPlotOrientation axis); void gtk_plot3d_major_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z); void gtk_plot3d_minor_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z); void gtk_plot3d_major_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z); void gtk_plot3d_minor_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z); void gtk_plot3d_major_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_major_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); void gtk_plot3d_minor_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_minor_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkMisc +----GtkPlot +----GtkPlot3D Implemented Interfaces GtkPlot3D implements AtkImplementorIface and GtkBuildable. Properties "a1" gdouble : Read / Write "a2" gdouble : Read / Write "a3" gdouble : Read / Write "center-vector" gpointer : Read / Write "color-xy" gpointer : Read / Write "color-yz" gpointer : Read / Write "color-zx" gpointer : Read / Write "corner-line" gpointer : Read / Write "corner-visible" gboolean : Read / Write "e1-vector" gpointer : Read / Write "e2-vector" gpointer : Read / Write "e3-vector" gpointer : Read / Write "frame-line" gpointer : Read / Write "origin-vector" gpointer : Read / Write "titles-offset" gint : Read / Write "xfactor" gdouble : Read / Write "xy-label-mask" gint : Read / Write "xy-major-mask" gint : Read / Write "xy-minor-mask" gint : Read / Write "xy-title-visible" gboolean : Read / Write "xy-visible" gboolean : Read / Write "xz-label-mask" gint : Read / Write "xz-major-mask" gint : Read / Write "xz-minor-mask" gint : Read / Write "xz-title-visible" gboolean : Read / Write "yfactor" gdouble : Read / Write "yx-label-mask" gint : Read / Write "yx-major-mask" gint : Read / Write "yx-minor-mask" gint : Read / Write "yx-title-visible" gboolean : Read / Write "yz-label-mask" gint : Read / Write "yz-major-mask" gint : Read / Write "yz-minor-mask" gint : Read / Write "yz-title-visible" gboolean : Read / Write "yz-visible" gboolean : Read / Write "zfactor" gdouble : Read / Write "zmax" gdouble : Read / Write "zmin" gdouble : Read / Write "zscale" gint : Read / Write "zx-label-mask" gint : Read / Write "zx-major-mask" gint : Read / Write "zx-minor-mask" gint : Read / Write "zx-title-visible" gboolean : Read / Write "zx-visible" gboolean : Read / Write "zy-label-mask" gint : Read / Write "zy-major-mask" gint : Read / Write "zy-minor-mask" gint : Read / Write "zy-title-visible" gboolean : Read / Write Description FIXME:: Need long description. Details GtkPlot3D GtkPlot3Dtypedef struct _GtkPlot3D GtkPlot3D; The GtkPlot3D struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotPlane GtkPlotPlanetypedef enum { GTK_PLOT_PLANE_XY = 0, GTK_PLOT_PLANE_YX = 0, GTK_PLOT_PLANE_XZ = 1, GTK_PLOT_PLANE_ZX = 1, GTK_PLOT_PLANE_YZ = 2, GTK_PLOT_PLANE_ZY = 2, } GtkPlotPlane; enum GtkPlotSide GtkPlotSidetypedef enum { GTK_PLOT_SIDE_XY = 1 << 0 , GTK_PLOT_SIDE_XZ = 1 << 1 , GTK_PLOT_SIDE_YX = 1 << 2 , GTK_PLOT_SIDE_YZ = 1 << 3 , GTK_PLOT_SIDE_ZX = 1 << 4 , GTK_PLOT_SIDE_ZY = 1 << 5 , } GtkPlotSide; gtk_plot3d_new () gtk_plot3d_newGtkWidget* gtk_plot3d_new (GdkDrawable *drawable); drawable : a Gdk drawable. Returns : gtk_plot3d_new_with_size () gtk_plot3d_new_with_sizeGtkWidget* gtk_plot3d_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); drawable : a Gdk drawable. width : height : Returns : gtk_plot3d_construct () gtk_plot3d_constructvoid gtk_plot3d_construct (GtkPlot3D *plot, GdkDrawable *drawable); plot : a GtkPlot3D widget. drawable : a Gdk drawable. gtk_plot3d_construct_with_size () gtk_plot3d_construct_with_sizevoid gtk_plot3d_construct_with_size (GtkPlot3D *plot, GdkDrawable *drawable, gdouble width, gdouble height); plot : a GtkPlot3D widget. drawable : a Gdk drawable. width : height : gtk_plot3d_autoscale () gtk_plot3d_autoscalevoid gtk_plot3d_autoscale (GtkPlot3D *plot); plot : a GtkPlot3D widget. gtk_plot3d_rotate () gtk_plot3d_rotatevoid gtk_plot3d_rotate (GtkPlot3D *plot, gdouble angle_x, gdouble angle_y, gdouble angle_z); plot : a GtkPlot3D widget. angle_x : angle_y : angle_z : gtk_plot3d_rotate_vector () gtk_plot3d_rotate_vectorvoid gtk_plot3d_rotate_vector (GtkPlot3D *plot, GtkPlotVector *vector, gdouble a1, gdouble a2, gdouble a3); plot : a GtkPlot3D widget. vector : a1 : a2 : a3 : gtk_plot3d_reset_angles () gtk_plot3d_reset_anglesvoid gtk_plot3d_reset_angles (GtkPlot3D *plot); plot : a GtkPlot3D widget. gtk_plot3d_rotate_x () gtk_plot3d_rotate_xvoid gtk_plot3d_rotate_x (GtkPlot3D *plot, gdouble angle); plot : a GtkPlot3D widget. angle : gtk_plot3d_rotate_y () gtk_plot3d_rotate_yvoid gtk_plot3d_rotate_y (GtkPlot3D *plot, gdouble angle); plot : a GtkPlot3D widget. angle : gtk_plot3d_rotate_z () gtk_plot3d_rotate_zvoid gtk_plot3d_rotate_z (GtkPlot3D *plot, gdouble angle); plot : a GtkPlot3D widget. angle : gtk_plot3d_get_pixel () gtk_plot3d_get_pixelvoid gtk_plot3d_get_pixel (GtkPlot3D *plot, gdouble x, gdouble y, gdouble z, gdouble *px, gdouble *py, gdouble *pz); plot : a GtkPlot3D widget. x : y : z : px : py : pz : gtk_plot3d_set_xrange () gtk_plot3d_set_xrangevoid gtk_plot3d_set_xrange (GtkPlot3D *plot, gdouble min, gdouble max); plot : a GtkPlot3D widget. min : max : gtk_plot3d_set_yrange () gtk_plot3d_set_yrangevoid gtk_plot3d_set_yrange (GtkPlot3D *plot, gdouble min, gdouble max); plot : a GtkPlot3D widget. min : max : gtk_plot3d_set_zrange () gtk_plot3d_set_zrangevoid gtk_plot3d_set_zrange (GtkPlot3D *plot, gdouble min, gdouble max); plot : a GtkPlot3D widget. min : max : gtk_plot3d_set_xfactor () gtk_plot3d_set_xfactorvoid gtk_plot3d_set_xfactor (GtkPlot3D *plot, gdouble xfactor); plot : a GtkPlot3D widget. xfactor : gtk_plot3d_set_yfactor () gtk_plot3d_set_yfactorvoid gtk_plot3d_set_yfactor (GtkPlot3D *plot, gdouble yfactor); plot : a GtkPlot3D widget. yfactor : gtk_plot3d_set_zfactor () gtk_plot3d_set_zfactorvoid gtk_plot3d_set_zfactor (GtkPlot3D *plot, gdouble zfactor); plot : a GtkPlot3D widget. zfactor : gtk_plot3d_get_xfactor () gtk_plot3d_get_xfactorgdouble gtk_plot3d_get_xfactor (GtkPlot3D *plot); plot : a GtkPlot3D widget. Returns : gtk_plot3d_get_yfactor () gtk_plot3d_get_yfactorgdouble gtk_plot3d_get_yfactor (GtkPlot3D *plot); plot : a GtkPlot3D widget. Returns : gtk_plot3d_get_zfactor () gtk_plot3d_get_zfactorgdouble gtk_plot3d_get_zfactor (GtkPlot3D *plot); plot : a GtkPlot3D widget. Returns : gtk_plot3d_plane_set_color () gtk_plot3d_plane_set_colorvoid gtk_plot3d_plane_set_color (GtkPlot3D *plot, GtkPlotPlane plane, const GdkColor *color); plot : plane : color : gtk_plot3d_plane_set_visible () gtk_plot3d_plane_set_visiblevoid gtk_plot3d_plane_set_visible (GtkPlot3D *plot, GtkPlotPlane plane, gboolean visible); plot : plane : visible : gtk_plot3d_plane_visible () gtk_plot3d_plane_visiblegboolean gtk_plot3d_plane_visible (GtkPlot3D *plot, GtkPlotPlane plane); plot : a GtkPlot3D widget. plane : Returns : gtk_plot3d_corner_set_visible () gtk_plot3d_corner_set_visiblevoid gtk_plot3d_corner_set_visible (GtkPlot3D *plot, gboolean visible); plot : a GtkPlot3D widget. visible : gtk_plot3d_corner_visible () gtk_plot3d_corner_visiblegboolean gtk_plot3d_corner_visible (GtkPlot3D *plot); plot : a GtkPlot3D widget. Returns : gtk_plot3d_corner_set_attributes () gtk_plot3d_corner_set_attributesvoid gtk_plot3d_corner_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); plot : a GtkPlot3D widget. style : width : color : gtk_plot3d_corner_get_attributes () gtk_plot3d_corner_get_attributesvoid gtk_plot3d_corner_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); plot : style : width : color : gtk_plot3d_frame_set_attributes () gtk_plot3d_frame_set_attributesvoid gtk_plot3d_frame_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); plot : a GtkPlot3D widget. style : width : color : gtk_plot3d_frame_get_attributes () gtk_plot3d_frame_get_attributesvoid gtk_plot3d_frame_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); plot : a GtkPlot3D widget. style : width : color : gtk_plot3d_get_axis () gtk_plot3d_get_axisGtkPlotAxis * gtk_plot3d_get_axis (GtkPlot3D *plot, GtkPlotOrientation orientation); plot : a GtkPlot3D widget. orientation : of axis to be returned Returns : (transfer none) the GtkPlotAxis with given orientation gtk_plot3d_get_side () gtk_plot3d_get_sideGtkPlotAxis * gtk_plot3d_get_side (GtkPlot3D *plot, GtkPlotSide side); plot : a GtkPlot3D widget. side : GtkPlotSide of the wanted axis Returns :transfer none. transfer none. gtk_plot3d_show_major_ticks () gtk_plot3d_show_major_ticksvoid gtk_plot3d_show_major_ticks (GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask); plot : a GtkPlot3D widget. side : ticks_mask : gtk_plot3d_show_minor_ticks () gtk_plot3d_show_minor_ticksvoid gtk_plot3d_show_minor_ticks (GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask); plot : a GtkPlot3D widget. side : ticks_mask : gtk_plot3d_show_labels () gtk_plot3d_show_labelsvoid gtk_plot3d_show_labels (GtkPlot3D *plot, GtkPlotSide side, gint label_mask); plot : a GtkPlot3D widget. side : label_mask : gtk_plot3d_show_title () gtk_plot3d_show_titlevoid gtk_plot3d_show_title (GtkPlot3D *plot, GtkPlotSide side); plot : a GtkPlot3D widget. side : gtk_plot3d_hide_title () gtk_plot3d_hide_titlevoid gtk_plot3d_hide_title (GtkPlot3D *plot, GtkPlotSide side); plot : a GtkPlot3D widget. side : gtk_plot3d_set_ticks () gtk_plot3d_set_ticksvoid gtk_plot3d_set_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step, gint nminor); plot : a GtkPlot3D widget. direction : major_step : nminor : gtk_plot3d_set_major_ticks () gtk_plot3d_set_major_ticksvoid gtk_plot3d_set_major_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step); plot : a GtkPlot3D widget. direction : major_step : gtk_plot3d_set_minor_ticks () gtk_plot3d_set_minor_ticksvoid gtk_plot3d_set_minor_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gint nminor); plot : a GtkPlot3D widget. direction : nminor : gtk_plot3d_set_ticks_length () gtk_plot3d_set_ticks_lengthvoid gtk_plot3d_set_ticks_length (GtkPlot3D *plot, GtkPlotOrientation direction, gint length); plot : a GtkPlot3D widget. direction : length : gtk_plot3d_set_ticks_width () gtk_plot3d_set_ticks_widthvoid gtk_plot3d_set_ticks_width (GtkPlot3D *plot, GtkPlotOrientation direction, gfloat width); plot : a GtkPlot3D widget. direction : width : gtk_plot3d_show_ticks () gtk_plot3d_show_ticksvoid gtk_plot3d_show_ticks (GtkPlot3D *plot, GtkPlotSide side, gint major_mask, gint minor_mask); plot : a GtkPlot3D widget. side : major_mask : minor_mask : gtk_plot3d_set_titles_offset () gtk_plot3d_set_titles_offsetvoid gtk_plot3d_set_titles_offset (GtkPlot3D *plot, gint offset); plot : a GtkPlot3D widget. offset offset : gtk_plot3d_get_titles_offset () gtk_plot3d_get_titles_offsetgint gtk_plot3d_get_titles_offset (GtkPlot3D *plot); plot : a GtkPlot3D widget. Returns : gtk_plot3d_set_scale () gtk_plot3d_set_scalevoid gtk_plot3d_set_scale (GtkPlot3D *plot, GtkPlotOrientation axis, GtkPlotScale scale); plot : a GtkPlot3D widget. axis : scale : gtk_plot3d_get_scale () gtk_plot3d_get_scaleGtkPlotScale gtk_plot3d_get_scale (GtkPlot3D *plot, GtkPlotOrientation axis); plot : a GtkPlot3D widget. axis : Returns : gtk_plot3d_major_grids_set_visible () gtk_plot3d_major_grids_set_visiblevoid gtk_plot3d_major_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z); plot : a GtkPlot3D widget. x : y : z : gtk_plot3d_minor_grids_set_visible () gtk_plot3d_minor_grids_set_visiblevoid gtk_plot3d_minor_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z); plot : a GtkPlot3D widget. x : y : z : gtk_plot3d_major_grids_visible () gtk_plot3d_major_grids_visiblevoid gtk_plot3d_major_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z); plot : a GtkPlot3D widget. x : y : z : gtk_plot3d_minor_grids_visible () gtk_plot3d_minor_grids_visiblevoid gtk_plot3d_minor_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z); plot : a GtkPlot3D widget. x : y : z : gtk_plot3d_major_zgrid_set_attributes () gtk_plot3d_major_zgrid_set_attributesvoid gtk_plot3d_major_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); plot : a GtkPlot3D widget. style : width : color : gtk_plot3d_major_zgrid_get_attributes () gtk_plot3d_major_zgrid_get_attributesvoid gtk_plot3d_major_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); plot : a GtkPlot3D widget. style : width : color : gtk_plot3d_minor_zgrid_set_attributes () gtk_plot3d_minor_zgrid_set_attributesvoid gtk_plot3d_minor_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); plot : a GtkPlot3D widget. style : width : color : gtk_plot3d_minor_zgrid_get_attributes () gtk_plot3d_minor_zgrid_get_attributesvoid gtk_plot3d_minor_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); plot : a GtkPlot3D widget. style : width : color : Property Details The <literal>"a1"</literal> property GtkPlot3D:a1 "a1" gdouble : Read / Write Default value: 0 The <literal>"a2"</literal> property GtkPlot3D:a2 "a2" gdouble : Read / Write Default value: 0 The <literal>"a3"</literal> property GtkPlot3D:a3 "a3" gdouble : Read / Write Default value: 0 The <literal>"center-vector"</literal> property GtkPlot3D:center-vector "center-vector" gpointer : Read / Write Position of the center point. The <literal>"color-xy"</literal> property GtkPlot3D:color-xy "color-xy" gpointer : Read / Write Color of XY Plane. The <literal>"color-yz"</literal> property GtkPlot3D:color-yz "color-yz" gpointer : Read / Write Color of YZ Plane. The <literal>"color-zx"</literal> property GtkPlot3D:color-zx "color-zx" gpointer : Read / Write Color of ZX Plane. The <literal>"corner-line"</literal> property GtkPlot3D:corner-line "corner-line" gpointer : Read / Write Corner Line. The <literal>"corner-visible"</literal> property GtkPlot3D:corner-visible "corner-visible" gboolean : Read / Write Draw the entire cube.Default value: FALSE The <literal>"e1-vector"</literal> property GtkPlot3D:e1-vector "e1-vector" gpointer : Read / Write Vector e1. The <literal>"e2-vector"</literal> property GtkPlot3D:e2-vector "e2-vector" gpointer : Read / Write Vector e2. The <literal>"e3-vector"</literal> property GtkPlot3D:e3-vector "e3-vector" gpointer : Read / Write Vector e3. The <literal>"frame-line"</literal> property GtkPlot3D:frame-line "frame-line" gpointer : Read / Write Frame Line. The <literal>"origin-vector"</literal> property GtkPlot3D:origin-vector "origin-vector" gpointer : Read / Write Position of the origin. The <literal>"titles-offset"</literal> property GtkPlot3D:titles-offset "titles-offset" gint : Read / Write Titles distance from the axes.Allowed values: >= -2147483647 Default value: 0 The <literal>"xfactor"</literal> property GtkPlot3D:xfactor "xfactor" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xy-label-mask"</literal> property GtkPlot3D:xy-label-mask "xy-label-mask" gint : Read / Write XY label mask.Allowed values: [0,3] Default value: 0 The <literal>"xy-major-mask"</literal> property GtkPlot3D:xy-major-mask "xy-major-mask" gint : Read / Write XY major mask.Allowed values: [0,3] Default value: 0 The <literal>"xy-minor-mask"</literal> property GtkPlot3D:xy-minor-mask "xy-minor-mask" gint : Read / Write XY minor mask.Allowed values: [0,3] Default value: 0 The <literal>"xy-title-visible"</literal> property GtkPlot3D:xy-title-visible "xy-title-visible" gboolean : Read / Write XY title Visible.Default value: FALSE The <literal>"xy-visible"</literal> property GtkPlot3D:xy-visible "xy-visible" gboolean : Read / Write XY Plane visible.Default value: FALSE The <literal>"xz-label-mask"</literal> property GtkPlot3D:xz-label-mask "xz-label-mask" gint : Read / Write XZ label mask.Allowed values: [0,3] Default value: 0 The <literal>"xz-major-mask"</literal> property GtkPlot3D:xz-major-mask "xz-major-mask" gint : Read / Write XZ major mask.Allowed values: [0,3] Default value: 0 The <literal>"xz-minor-mask"</literal> property GtkPlot3D:xz-minor-mask "xz-minor-mask" gint : Read / Write XZ minor mask.Allowed values: [0,3] Default value: 0 The <literal>"xz-title-visible"</literal> property GtkPlot3D:xz-title-visible "xz-title-visible" gboolean : Read / Write XZ title Visible.Default value: FALSE The <literal>"yfactor"</literal> property GtkPlot3D:yfactor "yfactor" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"yx-label-mask"</literal> property GtkPlot3D:yx-label-mask "yx-label-mask" gint : Read / Write YX label mask.Allowed values: [0,3] Default value: 0 The <literal>"yx-major-mask"</literal> property GtkPlot3D:yx-major-mask "yx-major-mask" gint : Read / Write YX major mask.Allowed values: [0,3] Default value: 0 The <literal>"yx-minor-mask"</literal> property GtkPlot3D:yx-minor-mask "yx-minor-mask" gint : Read / Write YX minor mask.Allowed values: [0,3] Default value: 0 The <literal>"yx-title-visible"</literal> property GtkPlot3D:yx-title-visible "yx-title-visible" gboolean : Read / Write YX title Visible.Default value: FALSE The <literal>"yz-label-mask"</literal> property GtkPlot3D:yz-label-mask "yz-label-mask" gint : Read / Write YZ label mask.Allowed values: [0,3] Default value: 0 The <literal>"yz-major-mask"</literal> property GtkPlot3D:yz-major-mask "yz-major-mask" gint : Read / Write YZ major mask.Allowed values: [0,3] Default value: 0 The <literal>"yz-minor-mask"</literal> property GtkPlot3D:yz-minor-mask "yz-minor-mask" gint : Read / Write YZ minor mask.Allowed values: [0,3] Default value: 0 The <literal>"yz-title-visible"</literal> property GtkPlot3D:yz-title-visible "yz-title-visible" gboolean : Read / Write YZ title Visible.Default value: FALSE The <literal>"yz-visible"</literal> property GtkPlot3D:yz-visible "yz-visible" gboolean : Read / Write YZ Plane visible.Default value: FALSE The <literal>"zfactor"</literal> property GtkPlot3D:zfactor "zfactor" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zmax"</literal> property GtkPlot3D:zmax "zmax" gdouble : Read / Write Default value: 0 The <literal>"zmin"</literal> property GtkPlot3D:zmin "zmin" gdouble : Read / Write Default value: 0 The <literal>"zscale"</literal> property GtkPlot3D:zscale "zscale" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zx-label-mask"</literal> property GtkPlot3D:zx-label-mask "zx-label-mask" gint : Read / Write ZX label mask.Allowed values: [0,3] Default value: 0 The <literal>"zx-major-mask"</literal> property GtkPlot3D:zx-major-mask "zx-major-mask" gint : Read / Write ZX major mask.Allowed values: [0,3] Default value: 0 The <literal>"zx-minor-mask"</literal> property GtkPlot3D:zx-minor-mask "zx-minor-mask" gint : Read / Write ZX minor mask.Allowed values: [0,3] Default value: 0 The <literal>"zx-title-visible"</literal> property GtkPlot3D:zx-title-visible "zx-title-visible" gboolean : Read / Write ZX title Visible.Default value: FALSE The <literal>"zx-visible"</literal> property GtkPlot3D:zx-visible "zx-visible" gboolean : Read / Write ZX Plane visible.Default value: FALSE The <literal>"zy-label-mask"</literal> property GtkPlot3D:zy-label-mask "zy-label-mask" gint : Read / Write ZY label mask.Allowed values: [0,3] Default value: 0 The <literal>"zy-major-mask"</literal> property GtkPlot3D:zy-major-mask "zy-major-mask" gint : Read / Write ZY major mask.Allowed values: [0,3] Default value: 0 The <literal>"zy-minor-mask"</literal> property GtkPlot3D:zy-minor-mask "zy-minor-mask" gint : Read / Write ZY minor mask.Allowed values: [0,3] Default value: 0 The <literal>"zy-title-visible"</literal> property GtkPlot3D:zy-title-visible "zy-title-visible" gboolean : Read / Write ZY title Visible.Default value: FALSE gtkextra-3.2.0/docs/reference/xml/gtkfontcombo.xml0000644000076400001440000003304412604172532017200 00000000000000 ]> GtkFontCombo 3 GTKEXTRA Library GtkFontCombo A font combo widget for GTK. Synopsis #include <gtkextra.h> GtkFontCombo; GtkWidget * gtk_font_combo_new (void); void gtk_font_combo_select (GtkFontCombo *font_combo, const gchar *family, gboolean bold, gboolean italic, gint height); void gtk_font_combo_select_nth (GtkFontCombo *font_combo, gint n, gboolean bold, gboolean italic, gint height); gint gtk_font_combo_get_font_height (GtkFontCombo *font_combo); GtkPSFont * gtk_font_combo_get_psfont (GtkFontCombo *font_combo); PangoFontDescription * gtk_font_combo_get_font_description (GtkFontCombo *font_combo); GdkFont * gtk_font_combo_get_gdkfont (GtkFontCombo *font_combo); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkToolbar +----GtkFontCombo Implemented Interfaces GtkFontCombo implements AtkImplementorIface, GtkBuildable, GtkToolShell and GtkOrientable. Signals "changed" : Run Last Description It is a GtkToolBar subclass with two combos to select among the 35 standard Adobe PostScript fonts with different sizes. It has also two buttons to select bold and italics. When you select a new font, it returns the name of the corresponding Postscript font and the equivalent Xfont. This is what we all expect to have on the top of a GUI for a spreadsheet or word processor. Details GtkFontCombo GtkFontCombotypedef struct _GtkFontCombo GtkFontCombo; The GtkFontCombo struct contains only private data. It should only be accessed through the functions described below. gtk_font_combo_new () gtk_font_combo_newGtkWidget * gtk_font_combo_new (void); Returns : gtk_font_combo_select () gtk_font_combo_selectvoid gtk_font_combo_select (GtkFontCombo *font_combo, const gchar *family, gboolean bold, gboolean italic, gint height); Select from the combo a font which satisfies the arguments. font_combo : a GtkFontCombo family : font family bold : TRUE or FALSE italic : TRUE or FALSE height : height of the font gtk_font_combo_select_nth () gtk_font_combo_select_nthvoid gtk_font_combo_select_nth (GtkFontCombo *font_combo, gint n, gboolean bold, gboolean italic, gint height); Select from the combo the nth font which satisfies the arguments. font_combo : a GtkFontCombo n : nth font bold : TRUE or FALSE italic : TRUE or FALSE height : height of the font gtk_font_combo_get_font_height () gtk_font_combo_get_font_heightgint gtk_font_combo_get_font_height (GtkFontCombo *font_combo); font_combo : Returns : gtk_font_combo_get_psfont () gtk_font_combo_get_psfontGtkPSFont * gtk_font_combo_get_psfont (GtkFontCombo *font_combo); font_combo : the GtkFontCombo Returns : (transfer none) the GtkPSFont gtk_font_combo_get_font_description () gtk_font_combo_get_font_descriptionPangoFontDescription * gtk_font_combo_get_font_description (GtkFontCombo *font_combo); font_combo : Returns : gtk_font_combo_get_gdkfont () gtk_font_combo_get_gdkfontGdkFont * gtk_font_combo_get_gdkfont (GtkFontCombo *font_combo); font_combo : Returns : Signal Details The <literal>"changed"</literal> signal GtkFontCombo::changedvoid user_function (GtkFontCombo *bfont_combo, gpointer user_data) : Run Last Emmited whenever a different font is choosed. bfont_combo : the GtkFontCombo object that received the signal. user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtkplotcandle.xml0000644000076400001440000000611012604172532017331 00000000000000 ]> GtkPlotCandle 3 GTKEXTRA Library GtkPlotCandle Synopsis #include <gtkextra.h> GtkPlotCandle; GtkWidget* gtk_plot_candle_new (void); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotCandle Implemented Interfaces GtkPlotCandle implements AtkImplementorIface and GtkBuildable. Description FIXME:: need long description. Details GtkPlotCandle GtkPlotCandletypedef struct _GtkPlotCandle GtkPlotCandle; The GtkPlotCandle struct contains only private data. It should only be accessed through the functions described below. gtk_plot_candle_new () gtk_plot_candle_newGtkWidget* gtk_plot_candle_new (void); Returns : gtkextra-3.2.0/docs/reference/xml/gtkplotcanvas.xml0000644000076400001440000021604112604172532017364 00000000000000 ]> GtkPlotCanvas 3 GTKEXTRA Library GtkPlotCanvas Synopsis #include <gtkextra.h> GtkPlotCanvas; enum GtkPlotCanvasFlags; enum GtkPlotCanvasAction; enum GtkPlotCanvasFlag; enum GtkPlotCanvasSelection; enum GtkPlotCanvasSelectionMode; enum GtkPlotCanvasPos; GtkPlotCanvasChild; enum GtkPlotCanvasChildFlags; GtkWidget* gtk_plot_canvas_new (gint width, gint height, gdouble magnification); void gtk_plot_canvas_construct (GtkPlotCanvas *canvas, gint width, gint height, gdouble magnification); GtkPlotCanvasFlags gtk_plot_canvas_flags (GtkPlotCanvas *canvas); void gtk_plot_canvas_set_flags (GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags); void gtk_plot_canvas_unset_flags (GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags); void gtk_plot_canvas_set_pc (GtkPlotCanvas *canvas, GtkPlotPC *pc); void gtk_plot_canvas_paint (GtkPlotCanvas *canvas); void gtk_plot_canvas_refresh (GtkPlotCanvas *canvas); void gtk_plot_canvas_freeze (GtkPlotCanvas *canvas); void gtk_plot_canvas_thaw (GtkPlotCanvas *canvas); void gtk_plot_canvas_grid_set_visible (GtkPlotCanvas *canvas, gboolean visible); void gtk_plot_canvas_grid_set_step (GtkPlotCanvas *canvas, gdouble step); void gtk_plot_canvas_grid_set_attributes (GtkPlotCanvas *canvas, GtkPlotLineStyle style, gint width, const GdkColor *color); void gtk_plot_canvas_cancel_action (GtkPlotCanvas *plot_canvas); void gtk_plot_canvas_unselect (GtkPlotCanvas *plot_canvas); GtkPlotCanvasChild * gtk_plot_canvas_get_active_item (GtkPlotCanvas *canvas); void gtk_plot_canvas_set_size (GtkPlotCanvas *canvas, gint width, gint height); void gtk_plot_canvas_set_magnification (GtkPlotCanvas *canvas, gdouble magnification); void gtk_plot_canvas_set_transparent (GtkPlotCanvas *canvas, gboolean transparent); gboolean gtk_plot_canvas_transparent (GtkPlotCanvas *canvas); void gtk_plot_canvas_set_background (GtkPlotCanvas *canvas, const GdkColor *bg_color); void gtk_plot_canvas_get_pixel (GtkPlotCanvas *canvas, gdouble px, gdouble py, gint *x, gint *y); void gtk_plot_canvas_get_position (GtkPlotCanvas *plot_canvas, gint x, gint y, gdouble *px, gdouble *py); void gtk_plot_canvas_put_child (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_canvas_remove_child (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); void gtk_plot_canvas_child_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1); void gtk_plot_canvas_child_move_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_canvas_child_set_selection (GtkPlotCanvasChild *child, GtkPlotCanvasSelection selection); void gtk_plot_canvas_child_set_selection_mode (GtkPlotCanvasChild *child, GtkPlotCanvasSelectionMode mode); gboolean gtk_plot_canvas_child_get_position (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, double *x1, double *y1, double *x2, double *y2); void gtk_plot_canvas_set_line_attributes (GtkPlotCanvas *canvas, GtkPlotLine line); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkFixed +----GtkPlotCanvas GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotCanvasChild +----GtkPlotCanvasEllipse +----GtkPlotCanvasPixmap +----GtkPlotCanvasPlot +----GtkPlotCanvasRectangle +----GtkPlotCanvasText Implemented Interfaces GtkPlotCanvas implements AtkImplementorIface and GtkBuildable. Properties "color-bg" gpointer : Read / Write "flags" gint : Read / Write "grid-step" gdouble : Read / Write "height" gint : Read / Write "line-grid" gpointer : Read / Write "magnification" gdouble : Read / Write "show-grid" gboolean : Read / Write "transparent" gboolean : Read / Write "width" gint : Read / Write Signals "add-item" : Run Last "changed" : Run Last "delete-item" : Run Last "move-item" : Run Last "resize-item" : Run Last "select-item" : Run Last "select-region" : Run Last Description FIXME:: need long description. Details GtkPlotCanvas GtkPlotCanvastypedef struct _GtkPlotCanvas GtkPlotCanvas; The GtkPlotCanvas struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotCanvasFlags GtkPlotCanvasFlagstypedef enum { GTK_PLOT_CANVAS_CAN_SELECT = 1 << 0, GTK_PLOT_CANVAS_CAN_SELECT_ITEM = 1 << 1, GTK_PLOT_CANVAS_CAN_DND = 1 << 2, } GtkPlotCanvasFlags; Selection and DND mode of GtkPlotCanvas GTK_PLOT_CANVAS_CAN_SELECT Select region GTK_PLOT_CANVAS_CAN_SELECT_ITEM Select items GTK_PLOT_CANVAS_CAN_DND DnD items enum GtkPlotCanvasAction GtkPlotCanvasActiontypedef enum { GTK_PLOT_CANVAS_ACTION_INACTIVE, GTK_PLOT_CANVAS_ACTION_SELECTION, GTK_PLOT_CANVAS_ACTION_DRAG, GTK_PLOT_CANVAS_ACTION_RESIZE, } GtkPlotCanvasAction; enum GtkPlotCanvasFlag GtkPlotCanvasFlagtypedef enum { GTK_PLOT_CANVAS_FROZEN = 0, GTK_PLOT_CANVAS_CAN_MOVE = 1 << 0, GTK_PLOT_CANVAS_CAN_RESIZE = 1 << 1, } GtkPlotCanvasFlag; GtkPlotCanvasFlag has been deprecated since version 3.1.6 and should not be used in newly-written code. use GtkPlotCanvasChildFlags Deprecated, Used for GtkPlotCanvasChild. Use GtkPlotCanvasChildFlags instead. GTK_PLOT_CANVAS_FROZEN Child is frozen GTK_PLOT_CANVAS_CAN_MOVE Child can be moved GTK_PLOT_CANVAS_CAN_RESIZE Child can be resized enum GtkPlotCanvasSelection GtkPlotCanvasSelectiontypedef enum { GTK_PLOT_CANVAS_SELECT_NONE, GTK_PLOT_CANVAS_SELECT_MARKERS, GTK_PLOT_CANVAS_SELECT_TARGET, } GtkPlotCanvasSelection; enum GtkPlotCanvasSelectionMode GtkPlotCanvasSelectionModetypedef enum { GTK_PLOT_CANVAS_SELECT_CLICK_1, GTK_PLOT_CANVAS_SELECT_CLICK_2, } GtkPlotCanvasSelectionMode; enum GtkPlotCanvasPos GtkPlotCanvasPostypedef enum { GTK_PLOT_CANVAS_OUT, GTK_PLOT_CANVAS_IN, GTK_PLOT_CANVAS_LEFT, GTK_PLOT_CANVAS_RIGHT, GTK_PLOT_CANVAS_TOP, GTK_PLOT_CANVAS_BOTTOM, GTK_PLOT_CANVAS_TOP_LEFT, GTK_PLOT_CANVAS_TOP_RIGHT, GTK_PLOT_CANVAS_BOTTOM_LEFT, GTK_PLOT_CANVAS_BOTTOM_RIGHT, } GtkPlotCanvasPos; GtkPlotCanvasChild GtkPlotCanvasChildtypedef struct _GtkPlotCanvasChild GtkPlotCanvasChild; The GtkPlotCanvasChild struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotCanvasChildFlags GtkPlotCanvasChildFlagstypedef enum { GTK_PLOT_CANVAS_CHILD_FROZEN = 0, GTK_PLOT_CANVAS_CHILD_CAN_MOVE = 1 << 0, GTK_PLOT_CANVAS_CHILD_CAN_RESIZE = 1 << 1, } GtkPlotCanvasChildFlags; move/resize-mode of GtkPlotCanvasChild GTK_PLOT_CANVAS_CHILD_FROZEN Child is frozen GTK_PLOT_CANVAS_CHILD_CAN_MOVE Child can be moved GTK_PLOT_CANVAS_CHILD_CAN_RESIZE Child can be resized gtk_plot_canvas_new () gtk_plot_canvas_newGtkWidget* gtk_plot_canvas_new (gint width, gint height, gdouble magnification); width : height : magnification : Returns : gtk_plot_canvas_construct () gtk_plot_canvas_constructvoid gtk_plot_canvas_construct (GtkPlotCanvas *canvas, gint width, gint height, gdouble magnification); canvas : a GtkPlotCanvas. width : height : magnification : gtk_plot_canvas_flags () gtk_plot_canvas_flagsGtkPlotCanvasFlags gtk_plot_canvas_flags (GtkPlotCanvas *canvas); canvas : Returns : gtk_plot_canvas_set_flags () gtk_plot_canvas_set_flagsvoid gtk_plot_canvas_set_flags (GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags); canvas : flags : gtk_plot_canvas_unset_flags () gtk_plot_canvas_unset_flagsvoid gtk_plot_canvas_unset_flags (GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags); canvas : flags : gtk_plot_canvas_set_pc () gtk_plot_canvas_set_pcvoid gtk_plot_canvas_set_pc (GtkPlotCanvas *canvas, GtkPlotPC *pc); canvas : pc : gtk_plot_canvas_paint () gtk_plot_canvas_paintvoid gtk_plot_canvas_paint (GtkPlotCanvas *canvas); canvas : a GtkPlotCanvas. gtk_plot_canvas_refresh () gtk_plot_canvas_refreshvoid gtk_plot_canvas_refresh (GtkPlotCanvas *canvas); canvas : a GtkPlotCanvas. gtk_plot_canvas_freeze () gtk_plot_canvas_freezevoid gtk_plot_canvas_freeze (GtkPlotCanvas *canvas); canvas : a GtkPlotCanvas. gtk_plot_canvas_thaw () gtk_plot_canvas_thawvoid gtk_plot_canvas_thaw (GtkPlotCanvas *canvas); canvas : a GtkPlotCanvas. gtk_plot_canvas_grid_set_visible () gtk_plot_canvas_grid_set_visiblevoid gtk_plot_canvas_grid_set_visible (GtkPlotCanvas *canvas, gboolean visible); canvas : a GtkPlotCanvas. visible : gtk_plot_canvas_grid_set_step () gtk_plot_canvas_grid_set_stepvoid gtk_plot_canvas_grid_set_step (GtkPlotCanvas *canvas, gdouble step); canvas : a GtkPlotCanvas. step : gtk_plot_canvas_grid_set_attributes () gtk_plot_canvas_grid_set_attributesvoid gtk_plot_canvas_grid_set_attributes (GtkPlotCanvas *canvas, GtkPlotLineStyle style, gint width, const GdkColor *color); canvas : a GtkPlotCanvas. style : width : color : gtk_plot_canvas_cancel_action () gtk_plot_canvas_cancel_actionvoid gtk_plot_canvas_cancel_action (GtkPlotCanvas *plot_canvas); plot_canvas : a GtkPlotCanvas. gtk_plot_canvas_unselect () gtk_plot_canvas_unselectvoid gtk_plot_canvas_unselect (GtkPlotCanvas *plot_canvas); plot_canvas : a GtkPlotCanvas. gtk_plot_canvas_get_active_item () gtk_plot_canvas_get_active_itemGtkPlotCanvasChild * gtk_plot_canvas_get_active_item (GtkPlotCanvas *canvas); canvas : a GtkPlotCanvas. Returns : the active GtkPlotCanvasChild. transfer none. gtk_plot_canvas_set_size () gtk_plot_canvas_set_sizevoid gtk_plot_canvas_set_size (GtkPlotCanvas *canvas, gint width, gint height); canvas : width : height : gtk_plot_canvas_set_magnification () gtk_plot_canvas_set_magnificationvoid gtk_plot_canvas_set_magnification (GtkPlotCanvas *canvas, gdouble magnification); canvas : a GtkPlotCanvas. magnification : gtk_plot_canvas_set_transparent () gtk_plot_canvas_set_transparentvoid gtk_plot_canvas_set_transparent (GtkPlotCanvas *canvas, gboolean transparent); canvas : a GtkPlotCanvas. transparent : gtk_plot_canvas_transparent () gtk_plot_canvas_transparentgboolean gtk_plot_canvas_transparent (GtkPlotCanvas *canvas); canvas : Returns : gtk_plot_canvas_set_background () gtk_plot_canvas_set_backgroundvoid gtk_plot_canvas_set_background (GtkPlotCanvas *canvas, const GdkColor *bg_color); canvas : a GtkPlotCanvas. bg_color : a GdkColor. gtk_plot_canvas_get_pixel () gtk_plot_canvas_get_pixelvoid gtk_plot_canvas_get_pixel (GtkPlotCanvas *canvas, gdouble px, gdouble py, gint *x, gint *y); canvas : a GtkPlotCanvas. px : py : x : y : gtk_plot_canvas_get_position () gtk_plot_canvas_get_positionvoid gtk_plot_canvas_get_position (GtkPlotCanvas *plot_canvas, gint x, gint y, gdouble *px, gdouble *py); plot_canvas : a GtkPlotCanvas. x : y : px : py : gtk_plot_canvas_put_child () gtk_plot_canvas_put_childvoid gtk_plot_canvas_put_child (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); canvas : a GtkPlotCanvas. child : x1 : y1 : x2 : y2 : gtk_plot_canvas_remove_child () gtk_plot_canvas_remove_childvoid gtk_plot_canvas_remove_child (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); canvas : a GtkPlotCanvas. child : a GtkPlotCanvasChild gtk_plot_canvas_child_move () gtk_plot_canvas_child_movevoid gtk_plot_canvas_child_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1); canvas : a GtkPlotCanvas. child : a GtkPlotCanvasChild x1 : y1 : gtk_plot_canvas_child_move_resize () gtk_plot_canvas_child_move_resizevoid gtk_plot_canvas_child_move_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); canvas : a GtkPlotCanvas. child : x1 : y1 : x2 : y2 : gtk_plot_canvas_child_set_selection () gtk_plot_canvas_child_set_selectionvoid gtk_plot_canvas_child_set_selection (GtkPlotCanvasChild *child, GtkPlotCanvasSelection selection); child : selection : gtk_plot_canvas_child_set_selection_mode () gtk_plot_canvas_child_set_selection_modevoid gtk_plot_canvas_child_set_selection_mode (GtkPlotCanvasChild *child, GtkPlotCanvasSelectionMode mode); child : a GtkPlotCanvasChild. mode : gtk_plot_canvas_child_get_position () gtk_plot_canvas_child_get_positiongboolean gtk_plot_canvas_child_get_position (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, double *x1, double *y1, double *x2, double *y2); canvas : a GtkPlotCanvas. child : a GtkPlotCanvasChild. x1 : y1 : x2 : y2 : Returns : gtk_plot_canvas_set_line_attributes () gtk_plot_canvas_set_line_attributesvoid gtk_plot_canvas_set_line_attributes (GtkPlotCanvas *canvas, GtkPlotLine line); canvas : a GtkPlotCanvas. line : Property Details The <literal>"color-bg"</literal> property GtkPlotCanvas:color-bg "color-bg" gpointer : Read / Write Background color. The <literal>"flags"</literal> property GtkPlotCanvas:flags "flags" gint : Read / Write PlotCanvas flags control selection and DND, see GtkPlotCanvasFlags. Allowed values: >= 0 Default value: 0 The <literal>"grid-step"</literal> property GtkPlotCanvas:grid-step "grid-step" gdouble : Read / Write Distance between grid lines.Allowed values: >= 0 Default value: 0 The <literal>"height"</literal> property GtkPlotCanvas:height "height" gint : Read / Write PlotCanvas height in pixels. Allowed values: >= 0 Default value: 1 The <literal>"line-grid"</literal> property GtkPlotCanvas:line-grid "line-grid" gpointer : Read / Write Canvas line grid. The <literal>"magnification"</literal> property GtkPlotCanvas:magnification "magnification" gdouble : Read / Write PlotCanvas magnification factor Allowed values: >= 0 Default value: 1 The <literal>"show-grid"</literal> property GtkPlotCanvas:show-grid "show-grid" gboolean : Read / Write Show grid.Default value: FALSE The <literal>"transparent"</literal> property GtkPlotCanvas:transparent "transparent" gboolean : Read / Write Canvas transparency Default value: TRUE The <literal>"width"</literal> property GtkPlotCanvas:width "width" gint : Read / Write PlotCanvas width in pixels. Allowed values: >= 0 Default value: 1 Signal Details The <literal>"add-item"</literal> signal GtkPlotCanvas::add-itemvoid user_function (GtkPlotCanvas *plotcanvas, GtkPlotCanvasChild *arg1, gpointer user_data) : Run Last plotcanvas : the object which received the signal. arg1 : user_data : user data set when the signal handler was connected. The <literal>"changed"</literal> signal GtkPlotCanvas::changedvoid user_function (GtkPlotCanvas *canvas, gpointer user_data) : Run Last canvas : user_data : user data set when the signal handler was connected. The <literal>"delete-item"</literal> signal GtkPlotCanvas::delete-itemgboolean user_function (GtkPlotCanvas *plotcanvas, GtkPlotCanvasChild *arg1, gpointer user_data) : Run Last plotcanvas : the object which received the signal. arg1 : user_data : user data set when the signal handler was connected. Returns : The <literal>"move-item"</literal> signal GtkPlotCanvas::move-itemgboolean user_function (GtkPlotCanvas *plotcanvas, GtkPlotCanvasChild *arg1, gdouble arg2, gdouble arg3, gpointer user_data) : Run Last plotcanvas : the object which received the signal. arg1 : arg2 : arg3 : user_data : user data set when the signal handler was connected. Returns : The <literal>"resize-item"</literal> signal GtkPlotCanvas::resize-itemgboolean user_function (GtkPlotCanvas *plotcanvas, GtkPlotCanvasChild *arg1, gdouble arg2, gdouble arg3, gpointer user_data) : Run Last plotcanvas : the object which received the signal. arg1 : arg2 : arg3 : user_data : user data set when the signal handler was connected. Returns : The <literal>"select-item"</literal> signal GtkPlotCanvas::select-itemgboolean user_function (GtkPlotCanvas *plotcanvas, GdkEvent *event, GtkPlotCanvasChild *arg1, gpointer user_data) : Run Last plotcanvas : the object which received the signal. event : arg1 : user_data : user data set when the signal handler was connected. Returns : The <literal>"select-region"</literal> signal GtkPlotCanvas::select-regionvoid user_function (GtkPlotCanvas *plotcanvas, gdouble arg1, gdouble arg2, gdouble arg3, gdouble arg4, gpointer user_data) : Run Last plotcanvas : the object which received the signal. arg1 : arg2 : arg3 : arg4 : user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtkplotcairo.xml0000644000076400001440000001512712604172532017210 00000000000000 ]> GtkPlotCairo 3 GTKEXTRA Library GtkPlotCairo Cairo drawing backend. Synopsis #include <gtkextra.h> GtkPlotCairo; GtkObject * gtk_plot_cairo_new (cairo_t *cairo); GtkObject * gtk_plot_cairo_new_with_drawable (GdkDrawable *drawable); void gtk_plot_cairo_construct (GtkPlotCairo *pc, cairo_t *cairo, PangoContext *context); void gtk_plot_cairo_set_cairo (GtkPlotCairo *pc, cairo_t *cairo); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotPC +----GtkPlotCairo Description Subclass of GtkPlotPC used for screen drawing. Details GtkPlotCairo GtkPlotCairotypedef struct _GtkPlotCairo GtkPlotCairo; The GtkPlotCairo struct contains only private data. It should only be accessed through the functions described below. gtk_plot_cairo_new () gtk_plot_cairo_newGtkObject * gtk_plot_cairo_new (cairo_t *cairo); cairo : Returns : gtk_plot_cairo_new_with_drawable () gtk_plot_cairo_new_with_drawableGtkObject * gtk_plot_cairo_new_with_drawable (GdkDrawable *drawable); drawable : Returns : gtk_plot_cairo_construct () gtk_plot_cairo_constructvoid gtk_plot_cairo_construct (GtkPlotCairo *pc, cairo_t *cairo, PangoContext *context); pc : A GtkPlotCairo. cairo : context : gtk_plot_cairo_set_cairo () gtk_plot_cairo_set_cairovoid gtk_plot_cairo_set_cairo (GtkPlotCairo *pc, cairo_t *cairo); pc : a GtkPlotCairo cairo : gtkextra-3.2.0/docs/reference/xml/gtkplotdt.xml0000644000076400001440000002610412604172532016517 00000000000000 ]> GtkPlotDT 3 GTKEXTRA Library GtkPlotDT Synopsis #include <gtkextra.h> GtkPlotDT; GtkPlotDTnode; GtkPlotDTsegment; GtkPlotDTtriangle; gint (*GtkPlotDTprogressbarFunc) (double progress); GtkObject* gtk_plot_dt_new (gint num); void gtk_plot_dt_set_quadrilateral (GtkPlotDT *dt, gboolean set); void gtk_plot_dt_set_subsampling (GtkPlotDT *dt, gboolean set); gboolean gtk_plot_dt_add_node (GtkPlotDT *data, GtkPlotDTnode node); GtkPlotDTnode * gtk_plot_dt_get_node (GtkPlotDT *data, gint idx); gboolean gtk_plot_dt_triangulate (GtkPlotDT *data); void gtk_plot_dt_clear (GtkPlotDT *data); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotDT Description FIXME:: Need long description. Details GtkPlotDT GtkPlotDTtypedef struct _GtkPlotDT GtkPlotDT; GtkPlotDTnode GtkPlotDTnodetypedef struct { } GtkPlotDTnode; The GtkPlotDTnode struct contains only private data. It should only be accessed through the functions described below. GtkPlotDTsegment GtkPlotDTsegmenttypedef struct _GtkPlotDTsegment GtkPlotDTsegment; GtkPlotDTtriangle GtkPlotDTtriangletypedef struct { } GtkPlotDTtriangle; The GtkPlotDTtriangle struct contains only private data. It should only be accessed through the functions described below. GtkPlotDTprogressbarFunc () GtkPlotDTprogressbarFuncgint (*GtkPlotDTprogressbarFunc) (double progress); progress : Returns : gtk_plot_dt_new () gtk_plot_dt_newGtkObject* gtk_plot_dt_new (gint num); num : Returns : gtk_plot_dt_set_quadrilateral () gtk_plot_dt_set_quadrilateralvoid gtk_plot_dt_set_quadrilateral (GtkPlotDT *dt, gboolean set); dt : set : gtk_plot_dt_set_subsampling () gtk_plot_dt_set_subsamplingvoid gtk_plot_dt_set_subsampling (GtkPlotDT *dt, gboolean set); dt : set : gtk_plot_dt_add_node () gtk_plot_dt_add_nodegboolean gtk_plot_dt_add_node (GtkPlotDT *data, GtkPlotDTnode node); data : node : Returns : gtk_plot_dt_get_node () gtk_plot_dt_get_nodeGtkPlotDTnode * gtk_plot_dt_get_node (GtkPlotDT *data, gint idx); data : idx : Returns : (transfer none) the GtkPlotDTnode gtk_plot_dt_triangulate () gtk_plot_dt_triangulategboolean gtk_plot_dt_triangulate (GtkPlotDT *data); data : Returns : gtk_plot_dt_clear () gtk_plot_dt_clearvoid gtk_plot_dt_clear (GtkPlotDT *data); data : gtkextra-3.2.0/docs/reference/xml/api-index-3.0.1.xml0000644000076400001440000000157112604172532017017 00000000000000 ]> G GtkSheet::entry-focus-in GtkSheet::entry-focus-out GtkSheet::populate-popup gtkextra-3.2.0/docs/reference/xml/gtkplotcanvasplot.xml0000644000076400001440000002064612604172532020267 00000000000000 ]> GtkPlotCanvasPlot 3 GTKEXTRA Library GtkPlotCanvasPlot Synopsis #include <gtkextra.h> GtkPlotCanvasPlot; enum GtkPlotCanvasPlotFlags; enum GtkPlotCanvasPlotPos; GtkPlotCanvasChild * gtk_plot_canvas_plot_new (GtkPlot *plot); GtkPlotCanvasPlotFlags gtk_plot_canvas_plot_flags (GtkPlotCanvasPlot *plot); void gtk_plot_canvas_plot_set_flags (GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags); void gtk_plot_canvas_plot_unset_flags (GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotCanvasChild +----GtkPlotCanvasPlot Description A GtkPlotCanvas object is an interactive container for GtkPlots and some graphic primitives that can be used to illustrate the plots (see GtkCanvasChild). Details GtkPlotCanvasPlot GtkPlotCanvasPlottypedef struct _GtkPlotCanvasPlot GtkPlotCanvasPlot; The GtkPlotBar struct contains only private data. It should only be accessed through the functions described below. enum GtkPlotCanvasPlotFlags GtkPlotCanvasPlotFlagstypedef enum { GTK_PLOT_CANVAS_PLOT_SELECT_POINT = 1 << 0, /* Select point */ GTK_PLOT_CANVAS_PLOT_DND_POINT = 1 << 1, /* DnD point */ } GtkPlotCanvasPlotFlags; Selection and DND mode of GtkPlotCanvas GTK_PLOT_CANVAS_PLOT_SELECT_POINT Select point GTK_PLOT_CANVAS_PLOT_DND_POINT DnD point enum GtkPlotCanvasPlotPos GtkPlotCanvasPlotPostypedef enum { GTK_PLOT_CANVAS_PLOT_OUT, GTK_PLOT_CANVAS_PLOT_IN_PLOT, GTK_PLOT_CANVAS_PLOT_IN_LEGENDS, GTK_PLOT_CANVAS_PLOT_IN_TITLE, GTK_PLOT_CANVAS_PLOT_IN_AXIS, GTK_PLOT_CANVAS_PLOT_IN_DATA, GTK_PLOT_CANVAS_PLOT_IN_GRADIENT, GTK_PLOT_CANVAS_PLOT_IN_MARKER, } GtkPlotCanvasPlotPos; gtk_plot_canvas_plot_new () gtk_plot_canvas_plot_newGtkPlotCanvasChild * gtk_plot_canvas_plot_new (GtkPlot *plot); plot : a GtkPlot. Returns : gtk_plot_canvas_plot_flags () gtk_plot_canvas_plot_flagsGtkPlotCanvasPlotFlags gtk_plot_canvas_plot_flags (GtkPlotCanvasPlot *plot); plot : Returns : gtk_plot_canvas_plot_set_flags () gtk_plot_canvas_plot_set_flagsvoid gtk_plot_canvas_plot_set_flags (GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags); plot : flags : gtk_plot_canvas_plot_unset_flags () gtk_plot_canvas_plot_unset_flagsvoid gtk_plot_canvas_plot_unset_flags (GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags); plot : flags : gtkextra-3.2.0/docs/reference/xml/gtkplotcanvasellipse.xml0000644000076400001440000002244112604172532020741 00000000000000 ]> GtkPlotCanvasEllipse 3 GTKEXTRA Library GtkPlotCanvasEllipse Synopsis #include <gtkextra.h> GtkPlotCanvasEllipse; GtkPlotCanvasChild * gtk_plot_canvas_ellipse_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, gboolean fill); void gtk_plot_canvas_ellipse_set_attributes (GtkPlotCanvasEllipse *ellipse, GtkPlotLineStyle style, gdouble width, const GdkColor *fg, const GdkColor *bg, gboolean fill); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotCanvasChild +----GtkPlotCanvasEllipse Properties "color-bg" gpointer : Read / Write "filled" gboolean : Read / Write "line" gpointer : Read / Write Description FIXME:: need long description Details GtkPlotCanvasEllipse GtkPlotCanvasEllipsetypedef struct _GtkPlotCanvasEllipse GtkPlotCanvasEllipse; The GtkPlotCanvasEllipse struct contains only private data. It should only be accessed through the functions described below. gtk_plot_canvas_ellipse_new () gtk_plot_canvas_ellipse_newGtkPlotCanvasChild * gtk_plot_canvas_ellipse_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, gboolean fill); style : width : fg : bg : fill : Returns : gtk_plot_canvas_ellipse_set_attributes () gtk_plot_canvas_ellipse_set_attributesvoid gtk_plot_canvas_ellipse_set_attributes (GtkPlotCanvasEllipse *ellipse, GtkPlotLineStyle style, gdouble width, const GdkColor *fg, const GdkColor *bg, gboolean fill); ellipse : a GtkPlotCanvasEllipse widget. style : width : fg : bg : fill : Property Details The <literal>"color-bg"</literal> property GtkPlotCanvasEllipse:color-bg "color-bg" gpointer : Read / Write Filling Color. The <literal>"filled"</literal> property GtkPlotCanvasEllipse:filled "filled" gboolean : Read / Write Default value: FALSE The <literal>"line"</literal> property GtkPlotCanvasEllipse:line "line" gpointer : Read / Write gtkextra-3.2.0/docs/reference/xml/gtkplotcanvastext.xml0000644000076400001440000002347012604172532020273 00000000000000 ]> GtkPlotCanvasText 3 GTKEXTRA Library GtkPlotCanvasText Synopsis #include <gtkextra.h> GtkPlotCanvasText; GtkPlotCanvasChild * gtk_plot_canvas_text_new (const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text); void gtk_plot_canvas_text_set_attributes (GtkPlotCanvasText *text, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkPlotCanvasChild +----GtkPlotCanvasText Properties "text" gpointer : Read / Write Description FIXME:: need long description Details GtkPlotCanvasText GtkPlotCanvasTexttypedef struct _GtkPlotCanvasText GtkPlotCanvasText; The GtkPlotCanvasText struct contains only private data. It should only be accessed through the functions described below. gtk_plot_canvas_text_new () gtk_plot_canvas_text_newGtkPlotCanvasChild * gtk_plot_canvas_text_new (const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text); font : height : angle : fg : bg : transparent : justification : real_text : Returns : gtk_plot_canvas_text_set_attributes () gtk_plot_canvas_text_set_attributesvoid gtk_plot_canvas_text_set_attributes (GtkPlotCanvasText *text, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text); text : a GtkPlotCanvasText. font : height : angle : fg : bg : transparent : justification : real_text : Property Details The <literal>"text"</literal> property GtkPlotCanvasText:text "text" gpointer : Read / Write Text Attributes. gtkextra-3.2.0/docs/reference/xml/gtkpsfont.xml0000644000076400001440000004610312604172532016523 00000000000000 ]> GtkPSFont 3 GTKEXTRA Library GtkPSFont PostScript Fonts handling. Synopsis #include <gtkextra.h> GtkPSFont; gint gtk_psfont_init (); void gtk_psfont_unref (); GtkPSFont* gtk_psfont_get_by_name (const gchar *name); GtkPSFont* gtk_psfont_get_by_family (const gchar *family_name, gboolean italic, gboolean bold); GdkFont* gtk_psfont_get_gdkfont (GtkPSFont *font, gint height); PangoFontDescription* gtk_psfont_get_font_description (GtkPSFont *font, gint height); const gchar * gtk_psfont_get_psfontname (GtkPSFont *psfont); void gtk_psfont_add_font (const char *fontname, const gchar *psname, const gchar *family, const gchar *pango_description, gboolean italic, gboolean bold); void gtk_psfont_add_i18n_font (const char *fontname, const gchar *psname, const gchar *family, const gchar *i18n_latinfamily, const gchar *pango_description, gboolean italic, gboolean bold, gboolean vertical); void gtk_psfont_get_families (GList **families, gint *num_families); void gtk_psfont_get_char_size (GtkPSFont *psfont, GdkFont *font, GdkFont *latin_font, GdkWChar wc, gint *width, gint *ascent, gint *descent); Description Handles Postscript fonts. Details GtkPSFont GtkPSFonttypedef struct { } GtkPSFont; The GtkPSFont struct contains only private data. It should only be accessed through the functions described below. gtk_psfont_init () gtk_psfont_initgint gtk_psfont_init (); Returns : gtk_psfont_unref () gtk_psfont_unrefvoid gtk_psfont_unref (); Unref ps fonts. gtk_psfont_get_by_name () gtk_psfont_get_by_nameGtkPSFont* gtk_psfont_get_by_name (const gchar *name); Get PS Font by font name. name : font name Returns : (transfer none) a GtkPSFont pointer. gtk_psfont_get_by_family () gtk_psfont_get_by_familyGtkPSFont* gtk_psfont_get_by_family (const gchar *family_name, gboolean italic, gboolean bold); Get GtkPSFont by family. family_name : font name italic : TRUE or FALSE bold : TRUE or FALSE Returns : (transfer none) the GtkPSFont gtk_psfont_get_gdkfont () gtk_psfont_get_gdkfontGdkFont* gtk_psfont_get_gdkfont (GtkPSFont *font, gint height); font : height : Returns : gtk_psfont_get_font_description () gtk_psfont_get_font_descriptionPangoFontDescription* gtk_psfont_get_font_description (GtkPSFont *font, gint height); Get a PangoDescriptionFont from PS Font. font : a GtkPSFont height : font height Returns : a PangoFontDescription pointer. gtk_psfont_get_psfontname () gtk_psfont_get_psfontnameconst gchar * gtk_psfont_get_psfontname (GtkPSFont *psfont); Get font name from PS Font. psfont : a GtkPSFont Returns : font name. gtk_psfont_add_font () gtk_psfont_add_fontvoid gtk_psfont_add_font (const char *fontname, const gchar *psname, const gchar *family, const gchar *pango_description, gboolean italic, gboolean bold); Add font in user font list. fontname : font name psname : PS font name family : font family pango_description : font Pango description italic : TRUE or FALSE bold : TRUE or FALSE gtk_psfont_add_i18n_font () gtk_psfont_add_i18n_fontvoid gtk_psfont_add_i18n_font (const char *fontname, const gchar *psname, const gchar *family, const gchar *i18n_latinfamily, const gchar *pango_description, gboolean italic, gboolean bold, gboolean vertical); Add international font in user font list. fontname : font name psname : PS font name family : font family i18n_latinfamily : International font family pango_description : font Pango description italic : TRUE or FALSE bold : TRUE or FALSE vertical : TRUE or FALSE gtk_psfont_get_families () gtk_psfont_get_familiesvoid gtk_psfont_get_families (GList **families, gint *num_families); Get GtkPSFont by family. families : (element-type gchar*) font families num_families : families number gtk_psfont_get_char_size () gtk_psfont_get_char_sizevoid gtk_psfont_get_char_size (GtkPSFont *psfont, GdkFont *font, GdkFont *latin_font, GdkWChar wc, gint *width, gint *ascent, gint *descent); Get font character size. psfont : a GtkPSFont font : a GdkFont latin_font : a GdkFont wc : a GdkWchar width : font width ascent : font ascent descent : font descent gtkextra-3.2.0/docs/reference/xml/gtkplotpixmap.xml0000644000076400001440000002152212604172532017405 00000000000000 ]> GtkPlotPixmap 3 GTKEXTRA Library GtkPlotPixmap Pixmap plots widget. Synopsis #include <gtkextra.h> GtkPlotPixmap; GtkWidget* gtk_plot_pixmap_new (GdkPixmap *pixmap, GdkBitmap *mask); void gtk_plot_pixmap_construct (GtkPlotPixmap *data, GdkPixmap *pixmap, GdkBitmap *mask); GdkPixmap* gtk_plot_pixmap_get_pixmap (GtkPlotPixmap *pixmap); GdkBitmap* gtk_plot_pixmap_get_mask (GtkPlotPixmap *pixmap); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotPixmap Implemented Interfaces GtkPlotPixmap implements AtkImplementorIface and GtkBuildable. Properties "mask-bitmap" gpointer : Read / Write "pixmap" gpointer : Read / Write Description FIXME:: Need long description. Details GtkPlotPixmap GtkPlotPixmaptypedef struct _GtkPlotPixmap GtkPlotPixmap; The GtkPlotPixmap struct contains only private data. It should only be accessed through the functions described below. gtk_plot_pixmap_new () gtk_plot_pixmap_newGtkWidget* gtk_plot_pixmap_new (GdkPixmap *pixmap, GdkBitmap *mask); pixmap : a GdkPixmap. mask : Returns : a new GtkWidget. gtk_plot_pixmap_construct () gtk_plot_pixmap_constructvoid gtk_plot_pixmap_construct (GtkPlotPixmap *data, GdkPixmap *pixmap, GdkBitmap *mask); data : pixmap : a GdkPixmap mask : gtk_plot_pixmap_get_pixmap () gtk_plot_pixmap_get_pixmapGdkPixmap* gtk_plot_pixmap_get_pixmap (GtkPlotPixmap *pixmap); Get pixmap from GtkPlotPixmap. pixmap : a GdkPlotPixmap Returns : (transfer none) the GdkPixmap gtk_plot_pixmap_get_mask () gtk_plot_pixmap_get_maskGdkBitmap* gtk_plot_pixmap_get_mask (GtkPlotPixmap *pixmap); Get mask bitmap from GtkPlotPixmap. pixmap : a GdkPlotPixmap Returns : (transfer none) the GdkBitmap Property Details The <literal>"mask-bitmap"</literal> property GtkPlotPixmap:mask-bitmap "mask-bitmap" gpointer : Read / Write Mask. The <literal>"pixmap"</literal> property GtkPlotPixmap:pixmap "pixmap" gpointer : Read / Write Pixmap. gtkextra-3.2.0/docs/reference/xml/gtkplotdata.xml0000644000076400001440000065111412604172532017026 00000000000000 ]> GtkPlotData 3 GTKEXTRA Library GtkPlotData Synopsis #include <gtkextra.h> GtkPlotData; GtkWidget* gtk_plot_data_new (void); GtkWidget* gtk_plot_data_new_function (GtkPlotFunc function); void gtk_plot_data_construct_function (GtkPlotData *data, GtkPlotFunc function); GtkWidget* gtk_plot_data_new_iterator (GtkPlotIterator iterator, gint npoints, guint16 mask); void gtk_plot_data_construct_iterator (GtkPlotData *data, GtkPlotIterator iterator, gint npoints, guint16 mask); void gtk_plot_data_clone (GtkPlotData *data, GtkPlotData *copy); void gtk_plot_data_add_dimension (GtkPlotData *data, const gchar *name, const gchar *label, const gchar *desc, GType value_type, gboolean required, gboolean independent); void gtk_plot_data_remove_dimension (GtkPlotData *data, const gchar *name); GtkPlotArray * gtk_plot_data_find_dimension (GtkPlotData *data, const gchar *name); guint gtk_plot_data_required_dimensions (GtkPlotData *data); guint gtk_plot_data_independent_dimensions (GtkPlotData *data); void gtk_plot_data_paint (GtkPlotData *data); void gtk_plot_data_update (GtkPlotData *data); void gtk_plot_data_draw_points (GtkPlotData *data, gint npoints); void gtk_plot_data_draw_symbol (GtkPlotData *data, gdouble px, gdouble py); GtkPlotArray * gtk_plot_data_dimension_set_points (GtkPlotData *data, const gchar *name, gdouble *points); void gtk_plot_data_dimension_set_array (GtkPlotData *data, const gchar *name, GtkPlotArray *array); GtkPlotArray * gtk_plot_data_dimension_get_array (GtkPlotData *data, const gchar *name); void gtk_plot_data_dimension_set_scale (GtkPlotData *data, const gchar *name, gdouble scale); gdouble gtk_plot_data_dimension_get_scale (GtkPlotData *data, const gchar *name); void gtk_plot_data_set_points (GtkPlotData *data, gdouble *x, gdouble *y, gdouble *dx, gdouble *dy, gint num_points); void gtk_plot_data_get_points (GtkPlotData *dataset, gdouble **x, gdouble **y, gdouble **dx, gdouble **dy, gint *num_points); void gtk_plot_data_get_point (GtkPlotData *dataset, gint n, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error); GtkPlotArray * gtk_plot_data_set_x (GtkPlotData *data, gdouble *x); GtkPlotArray * gtk_plot_data_set_y (GtkPlotData *data, gdouble *y); GtkPlotArray * gtk_plot_data_set_z (GtkPlotData *data, gdouble *z); GtkPlotArray * gtk_plot_data_set_a (GtkPlotData *data, gdouble *a); GtkPlotArray * gtk_plot_data_set_dx (GtkPlotData *data, gdouble *dx); GtkPlotArray * gtk_plot_data_set_dy (GtkPlotData *data, gdouble *dy); GtkPlotArray * gtk_plot_data_set_dz (GtkPlotData *data, gdouble *dz); GtkPlotArray * gtk_plot_data_set_da (GtkPlotData *data, gdouble *da); void gtk_plot_data_set_a_scale (GtkPlotData *data, gdouble a_scale); GtkPlotArray * gtk_plot_data_set_labels (GtkPlotData *data, gchar **labels); gdouble * gtk_plot_data_get_x (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_y (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_z (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_a (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_dx (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_dy (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_dz (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_da (GtkPlotData *dataset, gint *num_points); gdouble gtk_plot_data_get_a_scale (GtkPlotData *dataset); gchar ** gtk_plot_data_get_labels (GtkPlotData *dataset, gboolean *show_labels); void gtk_plot_data_show_labels (GtkPlotData *dataset, gboolean show_labels); void gtk_plot_data_labels_set_attributes (GtkPlotData *data, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg); void gtk_plot_data_set_numpoints (GtkPlotData *dataset, gint num_points); gint gtk_plot_data_get_numpoints (GtkPlotData *data); void gtk_plot_data_set_symbol (GtkPlotData *dataset, GtkPlotSymbolType type, GtkPlotSymbolStyle style, gint size, gfloat line_width, const GdkColor *color, const GdkColor *border_color); void gtk_plot_data_get_symbol (GtkPlotData *dataset, GtkPlotSymbolType *type, GtkPlotSymbolStyle *style, gint *size, gfloat *line_width, GdkColor *color, GdkColor *border_color); void gtk_plot_data_set_connector (GtkPlotData *dataset, GtkPlotConnector connector); gint gtk_plot_data_get_connector (GtkPlotData *dataset); void gtk_plot_data_set_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_get_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle *style, GdkCapStyle *cap_style, GdkJoinStyle *join_style, gfloat *width, GdkColor *color); void gtk_plot_data_set_x_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_set_y_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_set_z_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_show_xerrbars (GtkPlotData *dataset); void gtk_plot_data_show_yerrbars (GtkPlotData *dataset); void gtk_plot_data_show_zerrbars (GtkPlotData *dataset); void gtk_plot_data_hide_xerrbars (GtkPlotData *dataset); void gtk_plot_data_hide_yerrbars (GtkPlotData *dataset); void gtk_plot_data_hide_zerrbars (GtkPlotData *dataset); void gtk_plot_data_fill_area (GtkPlotData *dataset, gboolean fill); gboolean gtk_plot_data_area_is_filled (GtkPlotData *dataset); void gtk_plot_data_show_legend (GtkPlotData *data); void gtk_plot_data_hide_legend (GtkPlotData *dataset); void gtk_plot_data_set_legend (GtkPlotData *dataset, const gchar *legend); void gtk_plot_data_set_legend_precision (GtkPlotData *dataset, gint precision); gint gtk_plot_data_get_legend_precision (GtkPlotData *data); void gtk_plot_data_set_name (GtkPlotData *dataset, const gchar *name); GtkPlotAxis * gtk_plot_data_gradient (GtkPlotData *data); GtkAllocation gtk_plot_data_get_gradient_allocation (GtkPlotData *data); void gtk_plot_data_move_gradient (GtkPlotData *data, gdouble x, gdouble y); void gtk_plot_data_set_gradient_size (GtkPlotData *data, gint size); void gtk_plot_data_reset_gradient (GtkPlotData *data); void gtk_plot_data_reset_gradient_colors (GtkPlotData *data); void gtk_plot_data_gradient_use_custom_colors (GtkPlotData *data, gboolean custom); gboolean gtk_plot_data_gradient_custom_colors (GtkPlotData *data); void gtk_plot_data_set_gradient_mask (GtkPlotData *data, gint mask); gint gtk_plot_data_get_gradient_mask (GtkPlotData *data); void gtk_plot_data_gradient_set_visible (GtkPlotData *data, gboolean visible); gboolean gtk_plot_data_gradient_visible (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_a (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_da (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_z (GtkPlotData *data); void gtk_plot_data_set_gradient_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max); void gtk_plot_data_get_gradient_colors (GtkPlotData *data, GdkColor *min, GdkColor *max); void gtk_plot_data_set_gradient_nth_color (GtkPlotData *data, guint level, GdkColor *color); const GdkColor * gtk_plot_data_get_gradient_nth_color (GtkPlotData *data, guint level); void gtk_plot_data_set_gradient_outer_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max); void gtk_plot_data_get_gradient_outer_colors (GtkPlotData *data, GdkColor *min, GdkColor *max); void gtk_plot_data_set_gradient (GtkPlotData *data, gdouble min, gdouble max, gint nlevels, gint nsublevels); void gtk_plot_data_get_gradient (GtkPlotData *data, gdouble *min, gdouble *max, gint *nlevels, gint *nsublevels); void gtk_plot_data_get_gradient_level (GtkPlotData *data, gdouble level, GdkColor *color); void gtk_plot_data_gradient_set_style (GtkPlotData *data, GtkPlotLabelStyle style, gint precision); void gtk_plot_data_gradient_set_scale (GtkPlotData *data, GtkPlotScale scale); void gtk_plot_data_set_link (GtkPlotData *dataset, gpointer link); gpointer gtk_plot_data_get_link (GtkPlotData *dataset); void gtk_plot_data_remove_link (GtkPlotData *dataset); GtkPlotMarker * gtk_plot_data_add_marker (GtkPlotData *data, guint point); gboolean gtk_plot_data_remove_marker (GtkPlotData *data, GtkPlotMarker *marker); void gtk_plot_data_remove_markers (GtkPlotData *data); void gtk_plot_data_show_markers (GtkPlotData *data, gboolean show); gboolean gtk_plot_data_markers_visible (GtkPlotData *data); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkPlotData +----GtkPlotBar +----GtkPlotBox +----GtkPlotBubble +----GtkPlotCandle +----GtkPlotSurface +----GtkPlotFlux +----GtkPlotPixmap +----GtkPlotSegment Implemented Interfaces GtkPlotData implements AtkImplementorIface and GtkBuildable. Properties "bottom-axis" GtkPlotAxis* : Read "color-gt-max" gpointer : Read / Write "color-lt-min" gpointer : Read / Write "color-max" gpointer : Read / Write "color-min" gpointer : Read / Write "fill-area" gboolean : Read / Write "gradient-break" gboolean : Read / Write "gradient-break-max" gdouble : Read / Write "gradient-break-min" gdouble : Read / Write "gradient-break-nminor" gint : Read / Write "gradient-break-position" gdouble : Read / Write "gradient-break-scale" gint : Read / Write "gradient-break-step" gdouble : Read / Write "gradient-custom" gboolean : Read / Write "gradient-mask" gint : Read / Write "gradient-max" gdouble : Read / Write "gradient-min" gdouble : Read / Write "gradient-nmajor" gint : Read / Write "gradient-nminor" gint : Read / Write "gradient-scale" gint : Read / Write "gradient-show-lt-gt" gboolean : Read / Write "gradient-step" gdouble : Read / Write "is-function" gboolean : Read / Write "is-iterator" gboolean : Read / Write "iterator-mask" gint : Read / Write "labels-angle" gint : Read / Write "labels-bg-color" gpointer : Read / Write "labels-border" gint : Read / Write "labels-border-shadow" gint : Read / Write "labels-border-space" gint : Read / Write "labels-border-width" gint : Read / Write "labels-fg-color" gpointer : Read / Write "labels-font" gchar* : Read / Write "labels-offset" gint : Read / Write "labels-size" gint : Read / Write "labels-text" gchar* : Read / Write "labels-transparent" gboolean : Read / Write "legend" gchar* : Read / Write "legends-precision" gint : Read / Write "legends-style" gint : Read / Write "line-cap" gint : Read / Write "line-color" gpointer : Read / Write "line-connector" gint : Read / Write "line-join" gint : Read / Write "line-style" gint : Read / Write "line-width" gdouble : Read / Write "name" gchar* : Read / Write "num-points" gint : Read / Write "show-gradient" gboolean : Read / Write "show-labels" gboolean : Read / Write "show-legends" gboolean : Read / Write "show-xerrbars" gboolean : Read / Write "show-yerrbars" gboolean : Read / Write "show-zerrbars" gboolean : Read / Write "symbol-border-color" gpointer : Read / Write "symbol-border-width" gdouble : Read / Write "symbol-color" gpointer : Read / Write "symbol-size" gint : Read / Write "symbol-style" gint : Read / Write "symbol-type" gint : Read / Write "xerrbar-caps" gint : Read / Write "xerrbar-width" gint : Read / Write "xline-cap" gint : Read / Write "xline-color" gpointer : Read / Write "xline-join" gint : Read / Write "xline-style" gint : Read / Write "xline-width" gdouble : Read / Write "xstep" gdouble : Read / Write "yerrbar-caps" gint : Read / Write "yerrbar-width" gint : Read / Write "yline-cap" gint : Read / Write "yline-color" gpointer : Read / Write "yline-join" gint : Read / Write "yline-style" gint : Read / Write "yline-width" gdouble : Read / Write "ystep" gdouble : Read / Write "zerrbar-caps" gint : Read / Write "zerrbar-width" gint : Read / Write "zline-cap" gint : Read / Write "zline-color" gpointer : Read / Write "zline-join" gint : Read / Write "zline-style" gint : Read / Write "zline-width" gdouble : Read / Write "zstep" gdouble : Read / Write Signals "add-to-plot" : Run Last "draw-data" : Run First "gradient-changed" : Run Last "gradient-colors-changed" : Run Last "update" : Run Last Description A GtkPlotData object contains multiple dimensions of data for GtkPlots. Each dimension has a name, a label, a description and an array of typed values. Each GtkPlot can display multiple GtkPlotData sets. Predefined dimension names are: "x" for X values, "y" for Y values, "z" for Z values, "a" for Symbol size, "dx" for X error, "dy" for Y error, "dz" for Z error, "da" for amplitude values, "labels" for value labels Details GtkPlotData GtkPlotDatatypedef struct _GtkPlotData GtkPlotData; The GtkPlotData struct contains only private data. It should only be accessed through the functions described below. gtk_plot_data_new () gtk_plot_data_newGtkWidget* gtk_plot_data_new (void); Returns : gtk_plot_data_new_function () gtk_plot_data_new_functionGtkWidget* gtk_plot_data_new_function (GtkPlotFunc function); function : a GtkPlotFunc.. scope async. Returns : the GtkPlotData Widget. transfer none. gtk_plot_data_construct_function () gtk_plot_data_construct_functionvoid gtk_plot_data_construct_function (GtkPlotData *data, GtkPlotFunc function); data : a GtkPlotData widget. function : a GtkPlotFunc.. scope notified. gtk_plot_data_new_iterator () gtk_plot_data_new_iteratorGtkWidget* gtk_plot_data_new_iterator (GtkPlotIterator iterator, gint npoints, guint16 mask); iterator : a GtkPlotIterator.. scope async. npoints : mask : Returns : (transfer full) a new GtkPlotData. gtk_plot_data_construct_iterator () gtk_plot_data_construct_iteratorvoid gtk_plot_data_construct_iterator (GtkPlotData *data, GtkPlotIterator iterator, gint npoints, guint16 mask); data : a GtkPlotData widget. iterator : a GtkPlotIterator.. scope async. npoints : mask : gtk_plot_data_clone () gtk_plot_data_clonevoid gtk_plot_data_clone (GtkPlotData *data, GtkPlotData *copy); data : a GtkPlotData widget. copy : gtk_plot_data_add_dimension () gtk_plot_data_add_dimensionvoid gtk_plot_data_add_dimension (GtkPlotData *data, const gchar *name, const gchar *label, const gchar *desc, GType value_type, gboolean required, gboolean independent); data : a GtkPlotData widget. name : label : desc : value_type : required : independent : gtk_plot_data_remove_dimension () gtk_plot_data_remove_dimensionvoid gtk_plot_data_remove_dimension (GtkPlotData *data, const gchar *name); data : a GtkPlotData widget. name : gtk_plot_data_find_dimension () gtk_plot_data_find_dimensionGtkPlotArray * gtk_plot_data_find_dimension (GtkPlotData *data, const gchar *name); data : a GtkPlotData widget. name : dimension name to be searched for Returns : (transfer none) the GtkPlotArray with the given name gtk_plot_data_required_dimensions () gtk_plot_data_required_dimensionsguint gtk_plot_data_required_dimensions (GtkPlotData *data); data : a GtkPlotData widget. Returns : gtk_plot_data_independent_dimensions () gtk_plot_data_independent_dimensionsguint gtk_plot_data_independent_dimensions (GtkPlotData *data); data : a GtkPlotData widget. Returns : gtk_plot_data_paint () gtk_plot_data_paintvoid gtk_plot_data_paint (GtkPlotData *data); data : gtk_plot_data_update () gtk_plot_data_updatevoid gtk_plot_data_update (GtkPlotData *data); data : a GtkPlotData widget. gtk_plot_data_draw_points () gtk_plot_data_draw_pointsvoid gtk_plot_data_draw_points (GtkPlotData *data, gint npoints); data : a GtkPlotData widget. npoints : gtk_plot_data_draw_symbol () gtk_plot_data_draw_symbolvoid gtk_plot_data_draw_symbol (GtkPlotData *data, gdouble px, gdouble py); data : a GtkPlotData widget. px : py : gtk_plot_data_dimension_set_points () gtk_plot_data_dimension_set_pointsGtkPlotArray * gtk_plot_data_dimension_set_points (GtkPlotData *data, const gchar *name, gdouble *points); data : a GtkPlotData widget. name : the dimension name affected points : Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_dimension_set_array () gtk_plot_data_dimension_set_arrayvoid gtk_plot_data_dimension_set_array (GtkPlotData *data, const gchar *name, GtkPlotArray *array); data : a GtkPlotData widget. name : array : gtk_plot_data_dimension_get_array () gtk_plot_data_dimension_get_arrayGtkPlotArray * gtk_plot_data_dimension_get_array (GtkPlotData *data, const gchar *name); data : a GtkPlotData widget. name : the dimension name to be searched Returns : (transfer none) the GtkPlotArray with the given name gtk_plot_data_dimension_set_scale () gtk_plot_data_dimension_set_scalevoid gtk_plot_data_dimension_set_scale (GtkPlotData *data, const gchar *name, gdouble scale); data : name : scale : gtk_plot_data_dimension_get_scale () gtk_plot_data_dimension_get_scalegdouble gtk_plot_data_dimension_get_scale (GtkPlotData *data, const gchar *name); data : name : Returns : gtk_plot_data_set_points () gtk_plot_data_set_pointsvoid gtk_plot_data_set_points (GtkPlotData *data, gdouble *x, gdouble *y, gdouble *dx, gdouble *dy, gint num_points); data : a GtkPlotData widget. x : (transfer none) array of gdouble x-values y : (transfer none) array of gdouble y-values dx : (transfer none) array of gdouble delta-x-values (null) dy : (transfer none) array of gdouble delta-x-values (null) num_points : number of points = length of arrays gtk_plot_data_get_points () gtk_plot_data_get_pointsvoid gtk_plot_data_get_points (GtkPlotData *dataset, gdouble **x, gdouble **y, gdouble **dx, gdouble **dy, gint *num_points); Retrieves pointers to internal plot data. Beware: The plot data belongs to the caller of #gtk_plot_data_set_points() dataset : a GtkPlotData widget. x : (transfer none) where to store result pointer y : (transfer none) where to store result pointer dx : (transfer none) where to store result pointer dy : (transfer none) where to store result pointer num_points : (transfer none) where to store number of points gtk_plot_data_get_point () gtk_plot_data_get_pointvoid gtk_plot_data_get_point (GtkPlotData *dataset, gint n, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error); dataset : a GtkPlotData widget. n : x : y : z : a : dx : dy : dz : da : label : error : gtk_plot_data_set_x () gtk_plot_data_set_xGtkPlotArray * gtk_plot_data_set_x (GtkPlotData *data, gdouble *x); Set pointer to plot data (x-values). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_x(). data : a GtkPlotData widget. x : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_y () gtk_plot_data_set_yGtkPlotArray * gtk_plot_data_set_y (GtkPlotData *data, gdouble *y); Set pointer to plot data (y-values). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_y(). data : a GtkPlotData widget. y : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_z () gtk_plot_data_set_zGtkPlotArray * gtk_plot_data_set_z (GtkPlotData *data, gdouble *z); Set pointer to plot data (z-values). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_z(). data : a GtkPlotData widget. z : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_a () gtk_plot_data_set_aGtkPlotArray * gtk_plot_data_set_a (GtkPlotData *data, gdouble *a); Set pointer to plot data (Symbol size). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_a(). data : a GtkPlotData widget. a : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_dx () gtk_plot_data_set_dxGtkPlotArray * gtk_plot_data_set_dx (GtkPlotData *data, gdouble *dx); Set pointer to plot data (x-error). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_dx(). data : a GtkPlotData widget. dx : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_dy () gtk_plot_data_set_dyGtkPlotArray * gtk_plot_data_set_dy (GtkPlotData *data, gdouble *dy); Set pointer to plot data (y-error). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_dy(). data : a GtkPlotData widget. dy : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_dz () gtk_plot_data_set_dzGtkPlotArray * gtk_plot_data_set_dz (GtkPlotData *data, gdouble *dz); Set pointer to plot data (z-error). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_dz(). data : a GtkPlotData widget. dz : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_da () gtk_plot_data_set_daGtkPlotArray * gtk_plot_data_set_da (GtkPlotData *data, gdouble *da); Set pointer to plot data (Amplitude). The plot data is not duplicated. It belongs to the caller of #gtk_plot_data_set_da(). data : a GtkPlotData widget. da : (transfer none) pointer to plot data Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_set_a_scale () gtk_plot_data_set_a_scalevoid gtk_plot_data_set_a_scale (GtkPlotData *data, gdouble a_scale); data : a GtkPlotData widget. a_scale : gtk_plot_data_set_labels () gtk_plot_data_set_labelsGtkPlotArray * gtk_plot_data_set_labels (GtkPlotData *data, gchar **labels); data : a GtkPlotData widget. labels : labels to be set Returns : (transfer none) the affected GtkPlotArray gtk_plot_data_get_x () gtk_plot_data_get_xgdouble * gtk_plot_data_get_x (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_y () gtk_plot_data_get_ygdouble * gtk_plot_data_get_y (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_z () gtk_plot_data_get_zgdouble * gtk_plot_data_get_z (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_a () gtk_plot_data_get_agdouble * gtk_plot_data_get_a (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_dx () gtk_plot_data_get_dxgdouble * gtk_plot_data_get_dx (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_dy () gtk_plot_data_get_dygdouble * gtk_plot_data_get_dy (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_dz () gtk_plot_data_get_dzgdouble * gtk_plot_data_get_dz (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_da () gtk_plot_data_get_dagdouble * gtk_plot_data_get_da (GtkPlotData *dataset, gint *num_points); Retrieves a pointer to internal plot data. The plot data belongs to the caller of of #gtk_plot_data_set_x(). dataset : a GtkPlotData widget. num_points : place to store number of points Returns : (transfer none) pointer to internal plot data gtk_plot_data_get_a_scale () gtk_plot_data_get_a_scalegdouble gtk_plot_data_get_a_scale (GtkPlotData *dataset); dataset : a GtkPlotData widget. Returns : gtk_plot_data_get_labels () gtk_plot_data_get_labelsgchar ** gtk_plot_data_get_labels (GtkPlotData *dataset, gboolean *show_labels); dataset : a GtkPlotData widget. show_labels : current setting. out. Returns : (transfer none) the label string array gtk_plot_data_show_labels () gtk_plot_data_show_labelsvoid gtk_plot_data_show_labels (GtkPlotData *dataset, gboolean show_labels); dataset : a GtkPlotData widget. show_labels : gtk_plot_data_labels_set_attributes () gtk_plot_data_labels_set_attributesvoid gtk_plot_data_labels_set_attributes (GtkPlotData *data, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg); data : a GtkPlotData widget. font : height : angle : fg : bg : gtk_plot_data_set_numpoints () gtk_plot_data_set_numpointsvoid gtk_plot_data_set_numpoints (GtkPlotData *dataset, gint num_points); dataset : a GtkPlotData widget. num_points : gtk_plot_data_get_numpoints () gtk_plot_data_get_numpointsgint gtk_plot_data_get_numpoints (GtkPlotData *data); data : Returns : gtk_plot_data_set_symbol () gtk_plot_data_set_symbolvoid gtk_plot_data_set_symbol (GtkPlotData *dataset, GtkPlotSymbolType type, GtkPlotSymbolStyle style, gint size, gfloat line_width, const GdkColor *color, const GdkColor *border_color); dataset : a GtkPlotData widget. type : symbol type, see GtkPlotSymbolType style : symbol style, see GtkPlotSymbolStyle size : symbol size line_width : symbol line width color : fill color border_color : border color gtk_plot_data_get_symbol () gtk_plot_data_get_symbolvoid gtk_plot_data_get_symbol (GtkPlotData *dataset, GtkPlotSymbolType *type, GtkPlotSymbolStyle *style, gint *size, gfloat *line_width, GdkColor *color, GdkColor *border_color); dataset : a GtkPlotData widget. type : style : size : line_width : color : border_color : gtk_plot_data_set_connector () gtk_plot_data_set_connectorvoid gtk_plot_data_set_connector (GtkPlotData *dataset, GtkPlotConnector connector); dataset : a GtkPlotData widget. connector : gtk_plot_data_get_connector () gtk_plot_data_get_connectorgint gtk_plot_data_get_connector (GtkPlotData *dataset); dataset : a GtkPlotData widget. Returns : gtk_plot_data_set_line_attributes () gtk_plot_data_set_line_attributesvoid gtk_plot_data_set_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); dataset : a GtkPlotData widget. style : a GtkPlotLineStyle cap_style : a GdkCapStyle join_style : a GdkJoinStyle width : line width color : line color gtk_plot_data_get_line_attributes () gtk_plot_data_get_line_attributesvoid gtk_plot_data_get_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle *style, GdkCapStyle *cap_style, GdkJoinStyle *join_style, gfloat *width, GdkColor *color); dataset : a GtkPlotData widget. style : cap_style : join_style : width : color : gtk_plot_data_set_x_attributes () gtk_plot_data_set_x_attributesvoid gtk_plot_data_set_x_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); dataset : a GtkPlotData widget. style : cap_style : join_style : width : color : gtk_plot_data_set_y_attributes () gtk_plot_data_set_y_attributesvoid gtk_plot_data_set_y_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); dataset : a GtkPlotData widget. style : cap_style : join_style : width : color : gtk_plot_data_set_z_attributes () gtk_plot_data_set_z_attributesvoid gtk_plot_data_set_z_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); dataset : a GtkPlotData widget. style : cap_style : join_style : width : color : gtk_plot_data_show_xerrbars () gtk_plot_data_show_xerrbarsvoid gtk_plot_data_show_xerrbars (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_show_yerrbars () gtk_plot_data_show_yerrbarsvoid gtk_plot_data_show_yerrbars (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_show_zerrbars () gtk_plot_data_show_zerrbarsvoid gtk_plot_data_show_zerrbars (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_hide_xerrbars () gtk_plot_data_hide_xerrbarsvoid gtk_plot_data_hide_xerrbars (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_hide_yerrbars () gtk_plot_data_hide_yerrbarsvoid gtk_plot_data_hide_yerrbars (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_hide_zerrbars () gtk_plot_data_hide_zerrbarsvoid gtk_plot_data_hide_zerrbars (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_fill_area () gtk_plot_data_fill_areavoid gtk_plot_data_fill_area (GtkPlotData *dataset, gboolean fill); dataset : a GtkPlotData widget. fill : gtk_plot_data_area_is_filled () gtk_plot_data_area_is_filledgboolean gtk_plot_data_area_is_filled (GtkPlotData *dataset); dataset : a GtkPlotData widget. Returns : gtk_plot_data_show_legend () gtk_plot_data_show_legendvoid gtk_plot_data_show_legend (GtkPlotData *data); data : gtk_plot_data_hide_legend () gtk_plot_data_hide_legendvoid gtk_plot_data_hide_legend (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_set_legend () gtk_plot_data_set_legendvoid gtk_plot_data_set_legend (GtkPlotData *dataset, const gchar *legend); dataset : a GtkPlotData widget. legend : gtk_plot_data_set_legend_precision () gtk_plot_data_set_legend_precisionvoid gtk_plot_data_set_legend_precision (GtkPlotData *dataset, gint precision); dataset : a GtkPlotData widget. precision : gtk_plot_data_get_legend_precision () gtk_plot_data_get_legend_precisiongint gtk_plot_data_get_legend_precision (GtkPlotData *data); data : a GtkPlotData widget. Returns : gtk_plot_data_set_name () gtk_plot_data_set_namevoid gtk_plot_data_set_name (GtkPlotData *dataset, const gchar *name); dataset : a GtkPlotData widget. name : gtk_plot_data_gradient () gtk_plot_data_gradientGtkPlotAxis * gtk_plot_data_gradient (GtkPlotData *data); data : a GtkPlotData widget. Returns : (transfer none) the gradient GtkPlotAxis gtk_plot_data_get_gradient_allocation () gtk_plot_data_get_gradient_allocationGtkAllocation gtk_plot_data_get_gradient_allocation (GtkPlotData *data); data : a GtkPlotData widget Returns : (transfer full) the gradient GtkAllocation gtk_plot_data_move_gradient () gtk_plot_data_move_gradientvoid gtk_plot_data_move_gradient (GtkPlotData *data, gdouble x, gdouble y); data : a GtkPlotData widget. x : y : gtk_plot_data_set_gradient_size () gtk_plot_data_set_gradient_sizevoid gtk_plot_data_set_gradient_size (GtkPlotData *data, gint size); data : a GtkPlotData widget. size : gtk_plot_data_reset_gradient () gtk_plot_data_reset_gradientvoid gtk_plot_data_reset_gradient (GtkPlotData *data); data : gtk_plot_data_reset_gradient_colors () gtk_plot_data_reset_gradient_colorsvoid gtk_plot_data_reset_gradient_colors (GtkPlotData *data); data : a GtkPlotData widget. gtk_plot_data_gradient_use_custom_colors () gtk_plot_data_gradient_use_custom_colorsvoid gtk_plot_data_gradient_use_custom_colors (GtkPlotData *data, gboolean custom); data : a GtkPlotData widget. custom : gtk_plot_data_gradient_custom_colors () gtk_plot_data_gradient_custom_colorsgboolean gtk_plot_data_gradient_custom_colors (GtkPlotData *data); data : a GtkPlotData widget. Returns : gtk_plot_data_set_gradient_mask () gtk_plot_data_set_gradient_maskvoid gtk_plot_data_set_gradient_mask (GtkPlotData *data, gint mask); data : a GtkPlotData widget. mask : gtk_plot_data_get_gradient_mask () gtk_plot_data_get_gradient_maskgint gtk_plot_data_get_gradient_mask (GtkPlotData *data); data : a GtkPlotData widget. Returns : gtk_plot_data_gradient_set_visible () gtk_plot_data_gradient_set_visiblevoid gtk_plot_data_gradient_set_visible (GtkPlotData *data, gboolean visible); data : visible : gtk_plot_data_gradient_visible () gtk_plot_data_gradient_visiblegboolean gtk_plot_data_gradient_visible (GtkPlotData *data); data : a GtkPlotData widget. Returns : gtk_plot_data_gradient_autoscale_a () gtk_plot_data_gradient_autoscale_avoid gtk_plot_data_gradient_autoscale_a (GtkPlotData *data); data : gtk_plot_data_gradient_autoscale_da () gtk_plot_data_gradient_autoscale_davoid gtk_plot_data_gradient_autoscale_da (GtkPlotData *data); data : a GtkPlotData widget. gtk_plot_data_gradient_autoscale_z () gtk_plot_data_gradient_autoscale_zvoid gtk_plot_data_gradient_autoscale_z (GtkPlotData *data); data : a GtkPlotData widget. gtk_plot_data_set_gradient_colors () gtk_plot_data_set_gradient_colorsvoid gtk_plot_data_set_gradient_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max); data : a GtkPlotData widget. min : max : gtk_plot_data_get_gradient_colors () gtk_plot_data_get_gradient_colorsvoid gtk_plot_data_get_gradient_colors (GtkPlotData *data, GdkColor *min, GdkColor *max); data : a GtkPlotData widget. min : max : gtk_plot_data_set_gradient_nth_color () gtk_plot_data_set_gradient_nth_colorvoid gtk_plot_data_set_gradient_nth_color (GtkPlotData *data, guint level, GdkColor *color); data : a GtkPlotData widget. level : color : gtk_plot_data_get_gradient_nth_color () gtk_plot_data_get_gradient_nth_colorconst GdkColor * gtk_plot_data_get_gradient_nth_color (GtkPlotData *data, guint level); data : a GtkPlotData widget. level : Returns : gtk_plot_data_set_gradient_outer_colors () gtk_plot_data_set_gradient_outer_colorsvoid gtk_plot_data_set_gradient_outer_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max); data : a GtkPlotData widget. min : max : gtk_plot_data_get_gradient_outer_colors () gtk_plot_data_get_gradient_outer_colorsvoid gtk_plot_data_get_gradient_outer_colors (GtkPlotData *data, GdkColor *min, GdkColor *max); data : a GtkPlotData widget. min : max : gtk_plot_data_set_gradient () gtk_plot_data_set_gradientvoid gtk_plot_data_set_gradient (GtkPlotData *data, gdouble min, gdouble max, gint nlevels, gint nsublevels); data : a GtkPlotData widget. min : max : nlevels : nsublevels : gtk_plot_data_get_gradient () gtk_plot_data_get_gradientvoid gtk_plot_data_get_gradient (GtkPlotData *data, gdouble *min, gdouble *max, gint *nlevels, gint *nsublevels); data : a GtkPlotData widget. min : max : nlevels : nsublevels : gtk_plot_data_get_gradient_level () gtk_plot_data_get_gradient_levelvoid gtk_plot_data_get_gradient_level (GtkPlotData *data, gdouble level, GdkColor *color); data : a GtkPlotData widget. level : color : gtk_plot_data_gradient_set_style () gtk_plot_data_gradient_set_stylevoid gtk_plot_data_gradient_set_style (GtkPlotData *data, GtkPlotLabelStyle style, gint precision); data : a GtkPlotData widget. style : precision : gtk_plot_data_gradient_set_scale () gtk_plot_data_gradient_set_scalevoid gtk_plot_data_gradient_set_scale (GtkPlotData *data, GtkPlotScale scale); data : a GtkPlotData widget. scale : gtk_plot_data_set_link () gtk_plot_data_set_linkvoid gtk_plot_data_set_link (GtkPlotData *dataset, gpointer link); dataset : a GtkPlotData widget. link : gtk_plot_data_get_link () gtk_plot_data_get_linkgpointer gtk_plot_data_get_link (GtkPlotData *dataset); dataset : a GtkPlotData widget. Returns : (transfer none) link pointer gtk_plot_data_remove_link () gtk_plot_data_remove_linkvoid gtk_plot_data_remove_link (GtkPlotData *dataset); dataset : a GtkPlotData widget. gtk_plot_data_add_marker () gtk_plot_data_add_markerGtkPlotMarker * gtk_plot_data_add_marker (GtkPlotData *data, guint point); data : a GtkPlotData widget. point : Returns : gtk_plot_data_remove_marker () gtk_plot_data_remove_markergboolean gtk_plot_data_remove_marker (GtkPlotData *data, GtkPlotMarker *marker); data : a GtkPlotData widget. marker : Returns : gtk_plot_data_remove_markers () gtk_plot_data_remove_markersvoid gtk_plot_data_remove_markers (GtkPlotData *data); data : a GtkPlotData widget. gtk_plot_data_show_markers () gtk_plot_data_show_markersvoid gtk_plot_data_show_markers (GtkPlotData *data, gboolean show); data : a GtkPlotData widget. show : gtk_plot_data_markers_visible () gtk_plot_data_markers_visiblegboolean gtk_plot_data_markers_visible (GtkPlotData *data); data : a GtkPlotData widget. Returns : Property Details The <literal>"bottom-axis"</literal> property GtkPlotData:bottom-axis "bottom-axis" GtkPlotAxis* : Read The <literal>"color-gt-max"</literal> property GtkPlotData:color-gt-max "color-gt-max" gpointer : Read / Write The <literal>"color-lt-min"</literal> property GtkPlotData:color-lt-min "color-lt-min" gpointer : Read / Write The <literal>"color-max"</literal> property GtkPlotData:color-max "color-max" gpointer : Read / Write The <literal>"color-min"</literal> property GtkPlotData:color-min "color-min" gpointer : Read / Write The <literal>"fill-area"</literal> property GtkPlotData:fill-area "fill-area" gboolean : Read / Write Default value: FALSE The <literal>"gradient-break"</literal> property GtkPlotData:gradient-break "gradient-break" gboolean : Read / Write Default value: FALSE The <literal>"gradient-break-max"</literal> property GtkPlotData:gradient-break-max "gradient-break-max" gdouble : Read / Write Default value: 0 The <literal>"gradient-break-min"</literal> property GtkPlotData:gradient-break-min "gradient-break-min" gdouble : Read / Write Default value: 0 The <literal>"gradient-break-nminor"</literal> property GtkPlotData:gradient-break-nminor "gradient-break-nminor" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"gradient-break-position"</literal> property GtkPlotData:gradient-break-position "gradient-break-position" gdouble : Read / Write Allowed values: [0,1] Default value: 0 The <literal>"gradient-break-scale"</literal> property GtkPlotData:gradient-break-scale "gradient-break-scale" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"gradient-break-step"</literal> property GtkPlotData:gradient-break-step "gradient-break-step" gdouble : Read / Write Default value: 0 The <literal>"gradient-custom"</literal> property GtkPlotData:gradient-custom "gradient-custom" gboolean : Read / Write Default value: FALSE The <literal>"gradient-mask"</literal> property GtkPlotData:gradient-mask "gradient-mask" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"gradient-max"</literal> property GtkPlotData:gradient-max "gradient-max" gdouble : Read / Write Default value: 0 The <literal>"gradient-min"</literal> property GtkPlotData:gradient-min "gradient-min" gdouble : Read / Write Default value: 0 The <literal>"gradient-nmajor"</literal> property GtkPlotData:gradient-nmajor "gradient-nmajor" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"gradient-nminor"</literal> property GtkPlotData:gradient-nminor "gradient-nminor" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"gradient-scale"</literal> property GtkPlotData:gradient-scale "gradient-scale" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"gradient-show-lt-gt"</literal> property GtkPlotData:gradient-show-lt-gt "gradient-show-lt-gt" gboolean : Read / Write Default value: TRUE The <literal>"gradient-step"</literal> property GtkPlotData:gradient-step "gradient-step" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"is-function"</literal> property GtkPlotData:is-function "is-function" gboolean : Read / Write Default value: FALSE The <literal>"is-iterator"</literal> property GtkPlotData:is-iterator "is-iterator" gboolean : Read / Write Default value: FALSE The <literal>"iterator-mask"</literal> property GtkPlotData:iterator-mask "iterator-mask" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-angle"</literal> property GtkPlotData:labels-angle "labels-angle" gint : Read / Write Allowed values: [0,270] Default value: 0 The <literal>"labels-bg-color"</literal> property GtkPlotData:labels-bg-color "labels-bg-color" gpointer : Read / Write The <literal>"labels-border"</literal> property GtkPlotData:labels-border "labels-border" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-border-shadow"</literal> property GtkPlotData:labels-border-shadow "labels-border-shadow" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-border-space"</literal> property GtkPlotData:labels-border-space "labels-border-space" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-border-width"</literal> property GtkPlotData:labels-border-width "labels-border-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-fg-color"</literal> property GtkPlotData:labels-fg-color "labels-fg-color" gpointer : Read / Write The <literal>"labels-font"</literal> property GtkPlotData:labels-font "labels-font" gchar* : Read / Write Default value: NULL The <literal>"labels-offset"</literal> property GtkPlotData:labels-offset "labels-offset" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-size"</literal> property GtkPlotData:labels-size "labels-size" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"labels-text"</literal> property GtkPlotData:labels-text "labels-text" gchar* : Read / Write Default value: NULL The <literal>"labels-transparent"</literal> property GtkPlotData:labels-transparent "labels-transparent" gboolean : Read / Write Default value: TRUE The <literal>"legend"</literal> property GtkPlotData:legend "legend" gchar* : Read / Write Default value: NULL The <literal>"legends-precision"</literal> property GtkPlotData:legends-precision "legends-precision" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"legends-style"</literal> property GtkPlotData:legends-style "legends-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"line-cap"</literal> property GtkPlotData:line-cap "line-cap" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"line-color"</literal> property GtkPlotData:line-color "line-color" gpointer : Read / Write The <literal>"line-connector"</literal> property GtkPlotData:line-connector "line-connector" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"line-join"</literal> property GtkPlotData:line-join "line-join" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"line-style"</literal> property GtkPlotData:line-style "line-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"line-width"</literal> property GtkPlotData:line-width "line-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"name"</literal> property GtkPlotData:name "name" gchar* : Read / Write Default value: NULL The <literal>"num-points"</literal> property GtkPlotData:num-points "num-points" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"show-gradient"</literal> property GtkPlotData:show-gradient "show-gradient" gboolean : Read / Write Default value: TRUE The <literal>"show-labels"</literal> property GtkPlotData:show-labels "show-labels" gboolean : Read / Write Default value: TRUE The <literal>"show-legends"</literal> property GtkPlotData:show-legends "show-legends" gboolean : Read / Write Default value: TRUE The <literal>"show-xerrbars"</literal> property GtkPlotData:show-xerrbars "show-xerrbars" gboolean : Read / Write Default value: FALSE The <literal>"show-yerrbars"</literal> property GtkPlotData:show-yerrbars "show-yerrbars" gboolean : Read / Write Default value: FALSE The <literal>"show-zerrbars"</literal> property GtkPlotData:show-zerrbars "show-zerrbars" gboolean : Read / Write Default value: FALSE The <literal>"symbol-border-color"</literal> property GtkPlotData:symbol-border-color "symbol-border-color" gpointer : Read / Write The <literal>"symbol-border-width"</literal> property GtkPlotData:symbol-border-width "symbol-border-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"symbol-color"</literal> property GtkPlotData:symbol-color "symbol-color" gpointer : Read / Write The <literal>"symbol-size"</literal> property GtkPlotData:symbol-size "symbol-size" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"symbol-style"</literal> property GtkPlotData:symbol-style "symbol-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"symbol-type"</literal> property GtkPlotData:symbol-type "symbol-type" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xerrbar-caps"</literal> property GtkPlotData:xerrbar-caps "xerrbar-caps" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xerrbar-width"</literal> property GtkPlotData:xerrbar-width "xerrbar-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xline-cap"</literal> property GtkPlotData:xline-cap "xline-cap" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xline-color"</literal> property GtkPlotData:xline-color "xline-color" gpointer : Read / Write The <literal>"xline-join"</literal> property GtkPlotData:xline-join "xline-join" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xline-style"</literal> property GtkPlotData:xline-style "xline-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xline-width"</literal> property GtkPlotData:xline-width "xline-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"xstep"</literal> property GtkPlotData:xstep "xstep" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"yerrbar-caps"</literal> property GtkPlotData:yerrbar-caps "yerrbar-caps" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"yerrbar-width"</literal> property GtkPlotData:yerrbar-width "yerrbar-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"yline-cap"</literal> property GtkPlotData:yline-cap "yline-cap" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"yline-color"</literal> property GtkPlotData:yline-color "yline-color" gpointer : Read / Write The <literal>"yline-join"</literal> property GtkPlotData:yline-join "yline-join" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"yline-style"</literal> property GtkPlotData:yline-style "yline-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"yline-width"</literal> property GtkPlotData:yline-width "yline-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"ystep"</literal> property GtkPlotData:ystep "ystep" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zerrbar-caps"</literal> property GtkPlotData:zerrbar-caps "zerrbar-caps" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zerrbar-width"</literal> property GtkPlotData:zerrbar-width "zerrbar-width" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zline-cap"</literal> property GtkPlotData:zline-cap "zline-cap" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zline-color"</literal> property GtkPlotData:zline-color "zline-color" gpointer : Read / Write The <literal>"zline-join"</literal> property GtkPlotData:zline-join "zline-join" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zline-style"</literal> property GtkPlotData:zline-style "zline-style" gint : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zline-width"</literal> property GtkPlotData:zline-width "zline-width" gdouble : Read / Write Allowed values: >= 0 Default value: 0 The <literal>"zstep"</literal> property GtkPlotData:zstep "zstep" gdouble : Read / Write Allowed values: >= 0 Default value: 0 Signal Details The <literal>"add-to-plot"</literal> signal GtkPlotData::add-to-plotgboolean user_function (GtkPlotData *plotdata, GtkPlot *arg1, gpointer user_data) : Run Last plotdata : the object which received the signal. arg1 : user_data : user data set when the signal handler was connected. Returns : The <literal>"draw-data"</literal> signal GtkPlotData::draw-datavoid user_function (GtkPlotData *plotdata, gpointer user_data) : Run First plotdata : the object which received the signal. user_data : user data set when the signal handler was connected. The <literal>"gradient-changed"</literal> signal GtkPlotData::gradient-changedvoid user_function (GtkPlotData *plotdata, gpointer user_data) : Run Last plotdata : the object which received the signal. user_data : user data set when the signal handler was connected. The <literal>"gradient-colors-changed"</literal> signal GtkPlotData::gradient-colors-changedvoid user_function (GtkPlotData *plotdata, gpointer user_data) : Run Last plotdata : the object which received the signal. user_data : user data set when the signal handler was connected. The <literal>"update"</literal> signal GtkPlotData::updatevoid user_function (GtkPlotData *data, gboolean new_range, gpointer user_data) : Run Last data : a GtkPlotData widget. new_range : user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtksheet.xml0000644000076400001440000076502112604172532016331 00000000000000 ]> GtkSheet 3 GTKEXTRA Library GtkSheet A spreadsheet widget for Gtk+ Synopsis #include <gtkextra.h> GtkSheet; GtkSheetChild; GtkSheetRow; GtkSheetCell; GtkSheetRange; GtkSheetButton; GtkSheetCellAttr; GtkSheetCellBorder; enum GtkSheetAttrType; enum GtkSheetState; enum GtkSheetEntryType; enum GtkSheetVerticalJustification; GtkWidget * gtk_sheet_new (guint rows, guint columns, const gchar *title); void gtk_sheet_construct (GtkSheet *sheet, guint rows, guint columns, const gchar *title); GtkWidget * gtk_sheet_new_browser (guint rows, guint columns, const gchar *title); void gtk_sheet_construct_browser (GtkSheet *sheet, guint rows, guint columns, const gchar *title); GtkWidget * gtk_sheet_new_with_custom_entry (guint rows, guint columns, const gchar *title, GType entry_type); void gtk_sheet_construct_with_custom_entry (GtkSheet *sheet, guint rows, guint columns, const gchar *title, GType entry_type); void gtk_sheet_change_entry (GtkSheet *sheet, const GType entry_type); GType gtk_sheet_get_entry_type (GtkSheet *sheet); GtkWidget * gtk_sheet_get_entry (GtkSheet *sheet); GtkWidget * gtk_sheet_get_entry_widget (GtkSheet *sheet); gchar * gtk_sheet_get_entry_text (GtkSheet *sheet); void gtk_sheet_set_entry_text (GtkSheet *sheet, const gchar *text); void gtk_sheet_set_entry_editable (GtkSheet *sheet, const gboolean editable); gulong gtk_sheet_entry_signal_connect_changed (GtkSheet *sheet, GCallback handler); void gtk_sheet_entry_signal_disconnect_by_func (GtkSheet *sheet, GCallback handler); void gtk_sheet_entry_select_region (GtkSheet *sheet, gint start_pos, gint end_pos); GtkSheetState gtk_sheet_get_state (GtkSheet *sheet); gboolean gtk_sheet_get_attributes (GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr *attributes); guint gtk_sheet_get_rows_count (GtkSheet *sheet); void gtk_sheet_get_visible_range (GtkSheet *sheet, GtkSheetRange *range); void gtk_sheet_set_selection_mode (GtkSheet *sheet, GtkSelectionMode mode); gboolean gtk_sheet_autoresize (GtkSheet *sheet); gboolean gtk_sheet_autoresize_columns (GtkSheet *sheet); void gtk_sheet_set_autoresize_columns (GtkSheet *sheet, gboolean autoresize); gboolean gtk_sheet_autoresize_rows (GtkSheet *sheet); void gtk_sheet_set_autoresize_rows (GtkSheet *sheet, gboolean autoresize); void gtk_sheet_set_autoresize (GtkSheet *sheet, gboolean autoresize); gboolean gtk_sheet_autoscroll (GtkSheet *sheet); void gtk_sheet_set_autoscroll (GtkSheet *sheet, gboolean autoscroll); gboolean gtk_sheet_clip_text (GtkSheet *sheet); void gtk_sheet_set_clip_text (GtkSheet *sheet, gboolean clip_text); gboolean gtk_sheet_justify_entry (GtkSheet *sheet); void gtk_sheet_set_justify_entry (GtkSheet *sheet, gboolean justify); GtkSheetVerticalJustification gtk_sheet_get_vjustification (GtkSheet *sheet); void gtk_sheet_set_vjustification (GtkSheet *sheet, GtkSheetVerticalJustification vjust); gboolean gtk_sheet_locked (GtkSheet *sheet); void gtk_sheet_set_locked (GtkSheet *sheet, gboolean locked); void gtk_sheet_set_title (GtkSheet *sheet, const gchar *title); const gchar * gtk_sheet_get_description (GtkSheet *sheet, const gchar *description); void gtk_sheet_set_description (GtkSheet *sheet, const gchar *description); gboolean gtk_sheet_is_frozen (GtkSheet *sheet); void gtk_sheet_freeze (GtkSheet *sheet); void gtk_sheet_thaw (GtkSheet *sheet); void gtk_sheet_moveto (GtkSheet *sheet, gint row, gint column, gint row_align, gint col_align); void gtk_sheet_set_background (GtkSheet *sheet, GdkColor *color); void gtk_sheet_set_grid (GtkSheet *sheet, GdkColor *color); gboolean gtk_sheet_grid_visible (GtkSheet *sheet); void gtk_sheet_show_grid (GtkSheet *sheet, gboolean show); GtkAdjustment * gtk_sheet_get_hadjustment (GtkSheet *sheet); void gtk_sheet_set_hadjustment (GtkSheet *sheet, GtkAdjustment *adjustment); GtkAdjustment * gtk_sheet_get_vadjustment (GtkSheet *sheet); void gtk_sheet_set_vadjustment (GtkSheet *sheet, GtkAdjustment *adjustment); gboolean gtk_sheet_in_clip (GtkSheet *sheet); void gtk_sheet_clip_range (GtkSheet *sheet, const GtkSheetRange *clip_range); void gtk_sheet_unclip_range (GtkSheet *sheet); void gtk_sheet_get_active_cell (GtkSheet *sheet, gint *row, gint *column); gboolean gtk_sheet_set_active_cell (GtkSheet *sheet, gint row, gint column); void gtk_sheet_set_tab_direction (GtkSheet *sheet, GtkDirectionType dir); gboolean gtk_sheet_get_selection (GtkSheet *sheet, GtkSheetState *state, GtkSheetRange *range); void gtk_sheet_select_row (GtkSheet *sheet, gint row); void gtk_sheet_select_range (GtkSheet *sheet, const GtkSheetRange *range); void gtk_sheet_unselect_range (GtkSheet *sheet); gchar * gtk_sheet_get_tooltip_markup (GtkSheet *sheet); void gtk_sheet_set_tooltip_markup (GtkSheet *sheet, const gchar *markup); gchar * gtk_sheet_get_tooltip_text (GtkSheet *sheet); void gtk_sheet_set_tooltip_text (GtkSheet *sheet, const gchar *text); void gtk_sheet_add_row (GtkSheet *sheet, guint nrows); void gtk_sheet_insert_rows (GtkSheet *sheet, guint row, guint nrows); void gtk_sheet_delete_rows (GtkSheet *sheet, guint row, guint nrows); gboolean gtk_sheet_row_titles_visible (GtkSheet *sheet); void gtk_sheet_show_row_titles (GtkSheet *sheet); void gtk_sheet_hide_row_titles (GtkSheet *sheet); const gchar * gtk_sheet_get_row_title (GtkSheet *sheet, gint row); void gtk_sheet_set_row_title (GtkSheet *sheet, gint row, const gchar *title); void gtk_sheet_set_row_titles_width (GtkSheet *sheet, guint width); void gtk_sheet_set_row_height (GtkSheet *sheet, gint row, guint height); const gchar * gtk_sheet_row_button_get_label (GtkSheet *sheet, gint row); void gtk_sheet_row_button_add_label (GtkSheet *sheet, gint row, const gchar *label); void gtk_sheet_row_button_justify (GtkSheet *sheet, gint row, GtkJustification justification); gboolean gtk_sheet_row_sensitive (GtkSheet *sheet, gint row); void gtk_sheet_row_set_sensitivity (GtkSheet *sheet, gint row, gboolean sensitive); void gtk_sheet_rows_set_sensitivity (GtkSheet *sheet, gboolean sensitive); gboolean gtk_sheet_rows_resizable (GtkSheet *sheet); void gtk_sheet_rows_set_resizable (GtkSheet *sheet, gboolean resizable); gboolean gtk_sheet_row_visible (GtkSheet *sheet, gint row); void gtk_sheet_row_set_visibility (GtkSheet *sheet, gint row, gboolean visible); void gtk_sheet_row_label_set_visibility (GtkSheet *sheet, gint row, gboolean visible); void gtk_sheet_rows_labels_set_visibility (GtkSheet *sheet, gboolean visible); gchar * gtk_sheet_row_get_tooltip_markup (GtkSheet *sheet, const gint row); void gtk_sheet_row_set_tooltip_markup (GtkSheet *sheet, const gint row, const gchar *markup); gchar * gtk_sheet_row_get_tooltip_text (GtkSheet *sheet, const gint row); void gtk_sheet_row_set_tooltip_text (GtkSheet *sheet, const gint row, const gchar *text); void gtk_sheet_set_cell (GtkSheet *sheet, gint row, gint col, GtkJustification justification, const gchar *text); void gtk_sheet_set_cell_text (GtkSheet *sheet, gint row, gint col, const gchar *text); gchar * gtk_sheet_cell_get_text (GtkSheet *sheet, gint row, gint col); void gtk_sheet_cell_clear (GtkSheet *sheet, gint row, gint column); void gtk_sheet_cell_delete (GtkSheet *sheet, gint row, gint column); GtkStateType gtk_sheet_cell_get_state (GtkSheet *sheet, gint row, gint col); gchar * gtk_sheet_cell_get_tooltip_markup (GtkSheet *sheet, const gint row, const gint col); void gtk_sheet_cell_set_tooltip_markup (GtkSheet *sheet, const gint row, const gint col, const gchar *markup); gchar * gtk_sheet_cell_get_tooltip_text (GtkSheet *sheet, const gint row, const gint col); void gtk_sheet_cell_set_tooltip_text (GtkSheet *sheet, const gint row, const gint col, const gchar *text); gboolean gtk_sheet_get_cell_area (GtkSheet *sheet, gint row, gint column, GdkRectangle *area); gboolean gtk_sheet_get_pixel_info (GtkSheet *sheet, GdkWindow *window, gint x, gint y, gint *row, gint *column); gpointer gtk_sheet_get_link (GtkSheet *sheet, gint row, gint col); void gtk_sheet_link_cell (GtkSheet *sheet, gint row, gint col, gpointer link); void gtk_sheet_remove_link (GtkSheet *sheet, gint row, gint col); void gtk_sheet_range_clear (GtkSheet *sheet, const GtkSheetRange *range); void gtk_sheet_range_delete (GtkSheet *sheet, const GtkSheetRange *range); void gtk_sheet_range_set_background (GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); void gtk_sheet_range_set_foreground (GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); void gtk_sheet_range_set_justification (GtkSheet *sheet, const GtkSheetRange *urange, GtkJustification just); void gtk_sheet_range_set_editable (GtkSheet *sheet, const GtkSheetRange *urange, gint editable); void gtk_sheet_range_set_visible (GtkSheet *sheet, const GtkSheetRange *urange, gboolean visible); void gtk_sheet_range_set_border (GtkSheet *sheet, const GtkSheetRange *urange, gint mask, guint width, gint line_style); void gtk_sheet_range_set_border_color (GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); void gtk_sheet_range_set_font (GtkSheet *sheet, const GtkSheetRange *urange, PangoFontDescription *font_desc); GtkSheetChild * gtk_sheet_put (GtkSheet *sheet, GtkWidget *child, gint x, gint y); void gtk_sheet_attach (GtkSheet *sheet, GtkWidget *widget, gint row, gint col, gint xoptions, gint yoptions, gint xpadding, gint ypadding); void gtk_sheet_attach_floating (GtkSheet *sheet, GtkWidget *widget, gint row, gint col); void gtk_sheet_attach_default (GtkSheet *sheet, GtkWidget *widget, gint row, gint col); void gtk_sheet_move_child (GtkSheet *sheet, GtkWidget *widget, gint x, gint y); const GtkSheetChild * gtk_sheet_get_child_at (GtkSheet *sheet, gint row, gint col); void gtk_sheet_button_attach (GtkSheet *sheet, GtkWidget *widget, gint row, gint col); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkSheet Implemented Interfaces GtkSheet implements AtkImplementorIface and GtkBuildable. Properties "autoresize" gboolean : Read / Write "autoresize-cols" gboolean : Read / Write "autoresize-rows" gboolean : Read / Write "autoscroll" gboolean : Read / Write "bgcolor" GdkColor* : Read / Write "clip-text" gboolean : Read / Write "col-titles-height" guint : Read / Write "col-titles-visible" gboolean : Read / Write "columns-resizable" gboolean : Read / Write "description" gchar* : Read / Write "entry-type" GtkSheetEntryType : Read / Write "grid-color" GdkColor* : Read / Write "grid-visible" gboolean : Read / Write "justify-entry" gboolean : Read / Write "locked" gboolean : Read / Write "n-rows" gint : Read / Write "row-titles-visible" gboolean : Read / Write "row-titles-width" guint : Read / Write "rows-resizable" gboolean : Read / Write "selection-mode" GtkSelectionMode : Read / Write "title" gchar* : Read / Write "vjust" GtkSheetVerticalJustification : Read / Write Signals "activate" : Run Last "changed" : Run Last "clear-cell" : Run Last "clip-range" : Run Last "deactivate" : Run Last "enter-pressed" : Run Last "entry-focus-in" : Run Last "entry-focus-out" : Run Last "move-cursor" : Run Last / Action "move-range" : Run Last "new-column-width" : Run Last "new-row-height" : Run Last "populate-popup" : Run Last "resize-range" : Run Last "select-column" : Run Last "select-range" : Run Last "select-row" : Run Last "set-cell" : Run Last "set-scroll-adjustments" : Run Last "traverse" : Run Last Description GtkSheet is a matrix widget for GTK+. It consists of an scrollable grid of cells where you can put text or other GtkWidget's in. Cells are organized in rows (GtkSheetRow) and columns (GtkSheetColumn). Cell contents can be edited interactively through a specially designed entry (GtkItemEntry). A GtkSheet is also a container subclass, allowing you to display buttons, curves, pixmaps and any other widget in it. You can also set many attributes as: border, foreground and background color, text justification, and more. The testgtksheet program shows how easy is to create a spreadsheet-like GUI using this widget set. Details GtkSheet GtkSheettypedef struct _GtkSheet GtkSheet; The GtkSheet struct contains only private data. It should only be accessed through the functions described below. GtkSheetChild GtkSheetChildtypedef struct { } GtkSheetChild; The GtkSheetChild struct contains only private data. It should only be accessed through the functions described below. GtkSheetRow GtkSheetRowtypedef struct { } GtkSheetRow; The GtkSheetRow struct contains only private data. It should only be accessed through the functions described below. GtkSheetCell GtkSheetCelltypedef struct { } GtkSheetCell; The GtkSheetCell struct contains only private data. It should only be accessed through the functions described below. GtkSheetRange GtkSheetRangetypedef struct { gint row0,col0; /* upper-left cell */ gint rowi,coli; /* lower-right cell */ } GtkSheetRange; Defines a rectangular range of cells. gint row0; upper left cell gint col0; upper left cell gint rowi; lower right cell gint coli; lower right cell GtkSheetButton GtkSheetButtontypedef struct { } GtkSheetButton; The GtkSheetButton struct contains only private data. It should only be accessed through the functions described below. GtkSheetCellAttr GtkSheetCellAttrtypedef struct { } GtkSheetCellAttr; The GtkSheetCellAttr struct contains only private data. It should only be accessed through the functions described below. GtkSheetCellBorder GtkSheetCellBordertypedef struct { } GtkSheetCellBorder; The GtkSheetCellBorder struct contains only private data. It should only be accessed through the functions described below. enum GtkSheetAttrType GtkSheetAttrTypetypedef enum { GTK_SHEET_FOREGROUND, GTK_SHEET_BACKGROUND, GTK_SHEET_FONT, GTK_SHEET_JUSTIFICATION, GTK_SHEET_BORDER, GTK_SHEET_BORDER_COLOR, GTK_SHEET_IS_EDITABLE, GTK_SHEET_IS_VISIBLE } GtkSheetAttrType; enum GtkSheetState GtkSheetStatetypedef enum { GTK_SHEET_NORMAL, GTK_SHEET_ROW_SELECTED, GTK_SHEET_COLUMN_SELECTED, GTK_SHEET_RANGE_SELECTED } GtkSheetState; Selection state of the GtkSheet GTK_SHEET_NORMAL nothing selected GTK_SHEET_ROW_SELECTED one row selected GTK_SHEET_COLUMN_SELECTED one column selected GTK_SHEET_RANGE_SELECTED rectangular area of cells selected enum GtkSheetEntryType GtkSheetEntryTypetypedef enum { GTK_SHEET_ENTRY_TYPE_DEFAULT, GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY, GTK_SHEET_ENTRY_TYPE_GTK_ENTRY, GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW, GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW, GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON, GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX, GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY, GTK_SHEET_ENTRY_TYPE_GTK_COMBO, } GtkSheetEntryType; Subset of GtkEditable Widgets to allow selecting a widget from glade-3 GTK_SHEET_ENTRY_TYPE_DEFAULT default, applicat. controlled GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY GtkItemEntry GTK_SHEET_ENTRY_TYPE_GTK_ENTRY GtkEntry GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW GtkTextView GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW GtkDataTextView GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON GtkSpinButton GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX GtkComboBox GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY GtkComboBoxEntry GTK_SHEET_ENTRY_TYPE_GTK_COMBO GtkCombo, Deprecated enum GtkSheetVerticalJustification GtkSheetVerticalJustificationtypedef enum { GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT, GTK_SHEET_VERTICAL_JUSTIFICATION_TOP, GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE, GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM, } GtkSheetVerticalJustification; Vertical text alignment. GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT default GTK_SHEET_VERTICAL_JUSTIFICATION_TOP top aligned GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE middle aligned GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM bottom aligned gtk_sheet_new () gtk_sheet_newGtkWidget * gtk_sheet_new (guint rows, guint columns, const gchar *title); Creates a new sheet widget with the given number of rows and columns. rows : initial number of rows columns : initial number of columns title : sheet title Returns : the new sheet GtkSheet gtk_sheet_construct () gtk_sheet_constructvoid gtk_sheet_construct (GtkSheet *sheet, guint rows, guint columns, const gchar *title); Initializes an existent GtkSheet with the given number of rows and columns. sheet : a GtkSheet rows : number of rows columns : number of columns title : sheet title gtk_sheet_new_browser () gtk_sheet_new_browserGtkWidget * gtk_sheet_new_browser (guint rows, guint columns, const gchar *title); Creates a new browser sheet. Its cells cannot be edited(read-only). rows : initial number of rows columns : initial number of columns title : sheet title Returns : the new read-only GtkSheet gtk_sheet_construct_browser () gtk_sheet_construct_browservoid gtk_sheet_construct_browser (GtkSheet *sheet, guint rows, guint columns, const gchar *title); Initializes an existent read-only GtkSheet with the given number of rows and columns. sheet : a GtkSheet rows : number of rows columns : number of columns title : sheet title gtk_sheet_new_with_custom_entry () gtk_sheet_new_with_custom_entryGtkWidget * gtk_sheet_new_with_custom_entry (guint rows, guint columns, const gchar *title, GType entry_type); Creates a new sheet widget with the given number of rows and columns and a custome entry type. rows : initial number of rows columns : initial number of columns title : sheet title entry_type : a GType Returns : the new sheet GtkSheet gtk_sheet_construct_with_custom_entry () gtk_sheet_construct_with_custom_entryvoid gtk_sheet_construct_with_custom_entry (GtkSheet *sheet, guint rows, guint columns, const gchar *title, GType entry_type); Initializes an existent read-only GtkSheet with the given number of rows and columns and a custom entry. sheet : a GtkSheet rows : number of rows columns : number of columns title : sheet title entry_type : a GType gtk_sheet_change_entry () gtk_sheet_change_entryvoid gtk_sheet_change_entry (GtkSheet *sheet, const GType entry_type); Changes the current entry of the cell in GtkSheet. The old sheet entry widget gets dropped and a new entry widget is created. Beware: You will have to reconnect all your signal handlers after changing an entry. sheet : a GtkSheet entry_type : a GType gtk_sheet_get_entry_type () gtk_sheet_get_entry_typeGType gtk_sheet_get_entry_type (GtkSheet *sheet); Get sheets entry type, if known sheet : a GtkSheet Returns : a GtkSheetEntryType or GTK_SHEET_ENTRY_TYPE_DEFAULT gtk_sheet_get_entry () gtk_sheet_get_entryGtkWidget * gtk_sheet_get_entry (GtkSheet *sheet); Get sheet's entry widget. If the entry widget is a container, the direct childs of the container are searched for a valid entry widget. If you want the container itself to be returned, you should use #gtk_sheet_get_entry_widget() instead. sheet : a GtkSheet Returns : (transfer none) a GtkWidget or NULL gtk_sheet_get_entry_widget () gtk_sheet_get_entry_widgetGtkWidget * gtk_sheet_get_entry_widget (GtkSheet *sheet); Get sheet's entry widget. If the entry widget is a container, the container widget is returned. In order to get the entry in the container child, you might want to use #gtk_sheet_get_entry() instead. sheet : a GtkSheet Returns : (transfer none) a GtkWidget or NULL gtk_sheet_get_entry_text () gtk_sheet_get_entry_textgchar * gtk_sheet_get_entry_text (GtkSheet *sheet); Get the text out of the sheet_entry. This function is mainly used to synchronize the text of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet. sheet : a GtkSheet Returns : a copy of the sheet_entry text or NULL. This function returns an allocated string, so g_free() it after usage! gtk_sheet_set_entry_text () gtk_sheet_set_entry_textvoid gtk_sheet_set_entry_text (GtkSheet *sheet, const gchar *text); Set the text in the sheet_entry (and active cell). This function is mainly used to synchronize the text of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet. sheet : a GtkSheet text : the text to be set or NULL gtk_sheet_set_entry_editable () gtk_sheet_set_entry_editablevoid gtk_sheet_set_entry_editable (GtkSheet *sheet, const gboolean editable); Set the editable flag in the sheet_entry This function is mainly used to synchronize the editable flag of a second entry with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet. sheet : a GtkSheet editable : editable flag gtk_sheet_entry_signal_connect_changed () gtk_sheet_entry_signal_connect_changedgulong gtk_sheet_entry_signal_connect_changed (GtkSheet *sheet, GCallback handler); Connect a handler to the sheet_entry "changed" signal. The user_data argument of the handler will be filled with the GtkSheet. This function is mainly used to synchronize a second entry widget with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet. sheet : a GtkSheet handler : (scope notified) the signal handler Returns : the handler id gtk_sheet_entry_signal_disconnect_by_func () gtk_sheet_entry_signal_disconnect_by_funcvoid gtk_sheet_entry_signal_disconnect_by_func (GtkSheet *sheet, GCallback handler); Disconnect a handler from the sheet_entry "changed" signal This function is mainly used to synchronize a second entry widget with the sheet_entry. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet. sheet : a GtkSheet handler : (scope call) the signal handler gtk_sheet_entry_select_region () gtk_sheet_entry_select_regionvoid gtk_sheet_entry_select_region (GtkSheet *sheet, gint start_pos, gint end_pos); Selects a region of text. This function is necessary, because not all possible entry widgets implement the GtkEditable interface yet. sheet : a GtkSheet start_pos : start of region end_pos : end of region gtk_sheet_get_state () gtk_sheet_get_stateGtkSheetState gtk_sheet_get_state (GtkSheet *sheet); Get the selection state of the sheet (GtkSheetState). sheet : a GtkSheet Returns : GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED gtk_sheet_get_attributes () gtk_sheet_get_attributesgboolean gtk_sheet_get_attributes (GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr *attributes); Gett cell attributes of the given cell. sheet : a GtkSheet. row : row number col : column number attributes : GtkSheetCellAttr of the given range Returns : TRUE means that the cell is currently allocated. gtk_sheet_get_rows_count () gtk_sheet_get_rows_countguint gtk_sheet_get_rows_count (GtkSheet *sheet); Get the number of the rows of the GtkSheet. sheet : a GtkSheet Returns : number of rows. gtk_sheet_get_visible_range () gtk_sheet_get_visible_rangevoid gtk_sheet_get_visible_range (GtkSheet *sheet, GtkSheetRange *range); Get sheet's ranges in a GkSheetRange structure. sheet : a GtkSheet. range : a selected GtkSheetRange struct _GtkSheetRange { gint row0,col0; // upper-left cell gint rowi,coli; // lower-right cell }; gtk_sheet_set_selection_mode () gtk_sheet_set_selection_modevoid gtk_sheet_set_selection_mode (GtkSheet *sheet, GtkSelectionMode mode); Sets the selection mode of the cells in a GtkSheet. sheet : a GtkSheet mode : GTK_SELECTION_SINGLE or GTK_SELECTION_BROWSE gtk_sheet_autoresize () gtk_sheet_autoresizegboolean gtk_sheet_autoresize (GtkSheet *sheet); Gets the autoresize mode of GtkSheet. sheet : a GtkSheet Returns : TRUE if autoresize_columns or autoresize_rows was set, or FALSE if none gtk_sheet_autoresize_columns () gtk_sheet_autoresize_columnsgboolean gtk_sheet_autoresize_columns (GtkSheet *sheet); Gets the autoresize mode for GtkSheet columns. sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_set_autoresize_columns () gtk_sheet_set_autoresize_columnsvoid gtk_sheet_set_autoresize_columns (GtkSheet *sheet, gboolean autoresize); Controls wether columns will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*(). sheet : a GtkSheet autoresize : TRUE or FALSE gtk_sheet_autoresize_rows () gtk_sheet_autoresize_rowsgboolean gtk_sheet_autoresize_rows (GtkSheet *sheet); Gets the autoresize mode for GtkSheet rows. sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_set_autoresize_rows () gtk_sheet_set_autoresize_rowsvoid gtk_sheet_set_autoresize_rows (GtkSheet *sheet, gboolean autoresize); Controls wether rows will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*(). sheet : a GtkSheet autoresize : TRUE or FALSE gtk_sheet_set_autoresize () gtk_sheet_set_autoresizevoid gtk_sheet_set_autoresize (GtkSheet *sheet, gboolean autoresize); Controls wether cells will be autoresized upon deactivation, as you type text or set a cell_text value. If you want the cells to be autoresized when you pack widgets look at gtk_sheet_attach_*(). This function sets both: autoresize_columns and autoresize_cells. sheet : a GtkSheet autoresize : TRUE or FALSE gtk_sheet_autoscroll () gtk_sheet_autoscrollgboolean gtk_sheet_autoscroll (GtkSheet *sheet); Get the autoscroll mode of GtkSheet. sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_set_autoscroll () gtk_sheet_set_autoscrollvoid gtk_sheet_set_autoscroll (GtkSheet *sheet, gboolean autoscroll); The sheet will be automatically scrolled when you move beyond the last row/col in GtkSheet. sheet : a GtkSheet autoscroll : TRUE or FALSE gtk_sheet_clip_text () gtk_sheet_clip_textgboolean gtk_sheet_clip_text (GtkSheet *sheet); Get clip text mode in GtkSheet. When clip text mode is turned off, cell text is written over neighbour columns, as long as their contents are empty. sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_set_clip_text () gtk_sheet_set_clip_textvoid gtk_sheet_set_clip_text (GtkSheet *sheet, gboolean clip_text); Clip text in cell. When clip text mode is turned off, cell text is written over neighbour columns, as long as their contents are empty. sheet : a GtkSheet clip_text : TRUE or FALSE gtk_sheet_justify_entry () gtk_sheet_justify_entrygboolean gtk_sheet_justify_entry (GtkSheet *sheet); Get the cell entry editor justification setting from GtkSheet. sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_set_justify_entry () gtk_sheet_set_justify_entryvoid gtk_sheet_set_justify_entry (GtkSheet *sheet, gboolean justify); Justify cell entry editor in GtkSheet. sheet : a GtkSheet justify : TRUE or FALSE gtk_sheet_get_vjustification () gtk_sheet_get_vjustificationGtkSheetVerticalJustification gtk_sheet_get_vjustification (GtkSheet *sheet); Get the default vertical cell text justification from GtkSheet. sheet : a GtkSheet Returns : the default GtkSheetVerticalJustification gtk_sheet_set_vjustification () gtk_sheet_set_vjustificationvoid gtk_sheet_set_vjustification (GtkSheet *sheet, GtkSheetVerticalJustification vjust); Set the default vertical cell text justification for GtkSheet. sheet : a GtkSheet vjust : a GtkSheetVerticalJustification gtk_sheet_locked () gtk_sheet_lockedgboolean gtk_sheet_locked (GtkSheet *sheet); Get the lock status of GtkSheet, locked means the sheet is not editable, cell contents cannot be modified by the user. sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_set_locked () gtk_sheet_set_lockedvoid gtk_sheet_set_locked (GtkSheet *sheet, gboolean locked); Lock the GtkSheet, which means it is no longer editable, cell contents cannot be modified by the user. sheet : a GtkSheet locked : TRUE or FALSE gtk_sheet_set_title () gtk_sheet_set_titlevoid gtk_sheet_set_title (GtkSheet *sheet, const gchar *title); Set GtkSheet title. The widget will keep a copy of the string. sheet : a GtkSheet title : GtkSheet title gtk_sheet_get_description () gtk_sheet_get_descriptionconst gchar * gtk_sheet_get_description (GtkSheet *sheet, const gchar *description); Get sheet description. sheet : a GtkSheet description : GtkSheet description Returns : sheet description or NULL, do not modify or free it gtk_sheet_set_description () gtk_sheet_set_descriptionvoid gtk_sheet_set_description (GtkSheet *sheet, const gchar *description); Set GtkSheet description for application use. sheet : a GtkSheet description : GtkSheet description gtk_sheet_is_frozen () gtk_sheet_is_frozengboolean gtk_sheet_is_frozen (GtkSheet *sheet); Get freeze status. sheet : the GtkSheet Returns : TRUE or FALSE wether the sheet is frozen gtk_sheet_freeze () gtk_sheet_freezevoid gtk_sheet_freeze (GtkSheet *sheet); Freeze all visual updates of the GtkSheet. The updates will occure in a more efficient way than if you made them on a unfrozen GtkSheet . sheet : a GtkSheet gtk_sheet_thaw () gtk_sheet_thawvoid gtk_sheet_thaw (GtkSheet *sheet); Thaw the sheet after you have made a number of changes on a frozen sheet. The updates will occure in a more efficient way than if you made them on a unfrozen sheet . sheet : a GtkSheet gtk_sheet_moveto () gtk_sheet_movetovoid gtk_sheet_moveto (GtkSheet *sheet, gint row, gint column, gint row_align, gint col_align); Scroll the viewing area of the sheet to the given column and row; row_align and col_align are between 0-1 representing the location the row should appear on the screnn, 0 being top or left, 1 being bottom or right. passing row_align/col_align of -1 will suppress movement in that direction. if row or column is negative then there is no change sheet : a GtkSheet. row : row number column : column number row_align : row alignment col_align : column alignment gtk_sheet_set_background () gtk_sheet_set_backgroundvoid gtk_sheet_set_background (GtkSheet *sheet, GdkColor *color); Sets the background color of the GtkSheet. If pass NULL, the sheet will be reset to the default color. sheet : a GtkSheet color : a GdkColor structure gtk_sheet_set_grid () gtk_sheet_set_gridvoid gtk_sheet_set_grid (GtkSheet *sheet, GdkColor *color); Set the grid color. If pass NULL, the grid will be reset to the default color. sheet : a GtkSheet color : a GdkColor structure gtk_sheet_grid_visible () gtk_sheet_grid_visiblegboolean gtk_sheet_grid_visible (GtkSheet *sheet); Gets the visibility of grid in GtkSheet. sheet : a GtkSheet Returns : TRUE(grid visible) or FALSE(grid invisible) gtk_sheet_show_grid () gtk_sheet_show_gridvoid gtk_sheet_show_grid (GtkSheet *sheet, gboolean show); Sets the visibility of grid in GtkSheet. sheet : a GtkSheet show : TRUE(grid visible) or FALSE(grid invisible) gtk_sheet_get_hadjustment () gtk_sheet_get_hadjustmentGtkAdjustment * gtk_sheet_get_hadjustment (GtkSheet *sheet); Get horizontal scroll adjustments. sheet : a GtkSheet. Returns : (transfer none) a GtkAdjustment gtk_sheet_set_hadjustment () gtk_sheet_set_hadjustmentvoid gtk_sheet_set_hadjustment (GtkSheet *sheet, GtkAdjustment *adjustment); Change horizontal scroll adjustments. sheet : a GtkSheet. adjustment : a GtkAdjustment gtk_sheet_get_vadjustment () gtk_sheet_get_vadjustmentGtkAdjustment * gtk_sheet_get_vadjustment (GtkSheet *sheet); Get vertical scroll adjustments. sheet : a GtkSheet. Returns : (transfer none) a GtkAdjustment gtk_sheet_set_vadjustment () gtk_sheet_set_vadjustmentvoid gtk_sheet_set_vadjustment (GtkSheet *sheet, GtkAdjustment *adjustment); Change vertical scroll adjustments. sheet : a GtkSheet. adjustment : a GtkAdjustment gtk_sheet_in_clip () gtk_sheet_in_clipgboolean gtk_sheet_in_clip (GtkSheet *sheet); Get the clip status of GtkSheet. sheet : a GtkSheet. Returns : TRUE or FALSE gtk_sheet_clip_range () gtk_sheet_clip_rangevoid gtk_sheet_clip_range (GtkSheet *sheet, const GtkSheetRange *clip_range); Save selected range to "clipboard". sheet : a GtkSheet. clip_range : GtkSheetRange to be saved gtk_sheet_unclip_range () gtk_sheet_unclip_rangevoid gtk_sheet_unclip_range (GtkSheet *sheet); Free clipboard. sheet : a GtkSheet. gtk_sheet_get_active_cell () gtk_sheet_get_active_cellvoid gtk_sheet_get_active_cell (GtkSheet *sheet, gint *row, gint *column); Store the coordinates of the active cell in row,col. If (row<0 || col<0) then there was no active cell in the sheet. sheet : a GtkSheet row : row number column : column number gtk_sheet_set_active_cell () gtk_sheet_set_active_cellgboolean gtk_sheet_set_active_cell (GtkSheet *sheet, gint row, gint column); Set active cell where the cell entry will be displayed. Use (row,col) = (-1,-1) to deactivate active cell. sheet : a GtkSheet row : row number column : column number Returns : FALSE if current cell can't be deactivated or requested cell can't be activated gtk_sheet_set_tab_direction () gtk_sheet_set_tab_directionvoid gtk_sheet_set_tab_direction (GtkSheet *sheet, GtkDirectionType dir); Sets a primary movement direction to the Tab, Return and Enter keys, and assigns the opposite direction to the same keys with GDK_SHIFT_MASK. Transposed movement direction can be accessed with GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK and GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK|GDK_SHIFT_MASK. All bindings are defined for the GtkSheetClass, so all sheet instances use the same movement directions. Default: GTK_DIR_TAB_FORWARD. sheet : a GtkSheet dir : the primary tab direction Since 3.0.2 gtk_sheet_get_selection () gtk_sheet_get_selectiongboolean gtk_sheet_get_selection (GtkSheet *sheet, GtkSheetState *state, GtkSheetRange *range); Inquire current cell selection state and range. sheet : a GtkSheet state : where to store the GtkSheetState, may be NULL range : where to store the GtkSheetRange Returns : TRUE: there is a selection, FALSE: no selection or error gtk_sheet_select_row () gtk_sheet_select_rowvoid gtk_sheet_select_row (GtkSheet *sheet, gint row); Select the row. The range is then highlighted, and the bounds are stored in sheet->range. sheet : a GtkSheet. row : row number gtk_sheet_select_range () gtk_sheet_select_rangevoid gtk_sheet_select_range (GtkSheet *sheet, const GtkSheetRange *range); Highlight the selected range and store bounds in sheet->range sheet : a GtkSheet range : a GtkSheetRange gtk_sheet_unselect_range () gtk_sheet_unselect_rangevoid gtk_sheet_unselect_range (GtkSheet *sheet); Unselect the current selected range and clears the bounds in sheet->range. sheet : a GtkSheet gtk_sheet_get_tooltip_markup () gtk_sheet_get_tooltip_markupgchar * gtk_sheet_get_tooltip_markup (GtkSheet *sheet); Gets the contents of the tooltip (markup) for sheet sheet : a GtkSheet. Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_set_tooltip_markup () gtk_sheet_set_tooltip_markupvoid gtk_sheet_set_tooltip_markup (GtkSheet *sheet, const gchar *markup); Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language. sheet : a GtkSheet. markup : the contents of the tooltip for widget, or NULL. gtk_sheet_get_tooltip_text () gtk_sheet_get_tooltip_textgchar * gtk_sheet_get_tooltip_text (GtkSheet *sheet); Gets the contents of the tooltip for the GtkSheet sheet : a GtkSheet. Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_set_tooltip_text () gtk_sheet_set_tooltip_textvoid gtk_sheet_set_tooltip_text (GtkSheet *sheet, const gchar *text); Sets text as the contents of the tooltip. sheet : a GtkSheet. text : the contents of the tooltip for widget gtk_sheet_add_row () gtk_sheet_add_rowvoid gtk_sheet_add_row (GtkSheet *sheet, guint nrows); Append nrows rows to the end of the sheet. sheet : a GtkSheet. nrows : number of rows to be appended. gtk_sheet_insert_rows () gtk_sheet_insert_rowsvoid gtk_sheet_insert_rows (GtkSheet *sheet, guint row, guint nrows); Insert nrows rows before the given row and pull right. sheet : a GtkSheet. row : row number. nrows : number of rows to be inserted. gtk_sheet_delete_rows () gtk_sheet_delete_rowsvoid gtk_sheet_delete_rows (GtkSheet *sheet, guint row, guint nrows); Delete nrows rows starting from row. sheet : a GtkSheet. row : row number. nrows : number of rows to be deleted. gtk_sheet_row_titles_visible () gtk_sheet_row_titles_visiblegboolean gtk_sheet_row_titles_visible (GtkSheet *sheet); Get the visibility of row column titles . sheet : a GtkSheet Returns : TRUE or FALSE gtk_sheet_show_row_titles () gtk_sheet_show_row_titlesvoid gtk_sheet_show_row_titles (GtkSheet *sheet); Show row titles . sheet : a GtkSheet gtk_sheet_hide_row_titles () gtk_sheet_hide_row_titlesvoid gtk_sheet_hide_row_titles (GtkSheet *sheet); Hide row titles . sheet : a GtkSheet gtk_sheet_get_row_title () gtk_sheet_get_row_titleconst gchar * gtk_sheet_get_row_title (GtkSheet *sheet, gint row); Get row title. sheet : a GtkSheet row : row number Returns : a pointer to the row title or NULL. Do not modify or free it. gtk_sheet_set_row_title () gtk_sheet_set_row_titlevoid gtk_sheet_set_row_title (GtkSheet *sheet, gint row, const gchar *title); Set row title. sheet : a GtkSheet row : row number title : row title gtk_sheet_set_row_titles_width () gtk_sheet_set_row_titles_widthvoid gtk_sheet_set_row_titles_width (GtkSheet *sheet, guint width); Resize row titles area. sheet : a GtkSheet width : row titles width. gtk_sheet_set_row_height () gtk_sheet_set_row_heightvoid gtk_sheet_set_row_height (GtkSheet *sheet, gint row, guint height); Set row height. sheet : a GtkSheet. row : row number. height : row height(in pixels). gtk_sheet_row_button_get_label () gtk_sheet_row_button_get_labelconst gchar * gtk_sheet_row_button_get_label (GtkSheet *sheet, gint row); Get a row button label. sheet : a GtkSheet row : row number Returns : In case of succes , a pointer to label text.Otherwise NULL gtk_sheet_row_button_add_label () gtk_sheet_row_button_add_labelvoid gtk_sheet_row_button_add_label (GtkSheet *sheet, gint row, const gchar *label); Set button label.It is used to set a row title. sheet : a GtkSheet row : row number label : text label gtk_sheet_row_button_justify () gtk_sheet_row_button_justifyvoid gtk_sheet_row_button_justify (GtkSheet *sheet, gint row, GtkJustification justification); Set the justification(alignment) of the row buttons. sheet : a GtkSheet. row : row number justification : a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER gtk_sheet_row_sensitive () gtk_sheet_row_sensitivegboolean gtk_sheet_row_sensitive (GtkSheet *sheet, gint row); Get row button sensitivity. sheet : a GtkSheet. row : row number Returns : TRUE - is sensitive, FALSE - insensitive or not existant gtk_sheet_row_set_sensitivity () gtk_sheet_row_set_sensitivityvoid gtk_sheet_row_set_sensitivity (GtkSheet *sheet, gint row, gboolean sensitive); Set row button sensitivity. If sensitivity is TRUE can be toggled, otherwise it acts as a title . sheet : a GtkSheet. row : row number sensitive : TRUE or FALSE gtk_sheet_rows_set_sensitivity () gtk_sheet_rows_set_sensitivityvoid gtk_sheet_rows_set_sensitivity (GtkSheet *sheet, gboolean sensitive); Set rows buttons sensitivity. If sensitivity is TRUE button can be toggled, otherwise act as titles. The sheet itself has no such property, it is a convenience function to set the property for all existing rows. sheet : a GtkSheet. sensitive : TRUE or FALSE gtk_sheet_rows_resizable () gtk_sheet_rows_resizablegboolean gtk_sheet_rows_resizable (GtkSheet *sheet); Get rows resizable status. sheet : a GtkSheet. Returns : TRUE or FALSE gtk_sheet_rows_set_resizable () gtk_sheet_rows_set_resizablevoid gtk_sheet_rows_set_resizable (GtkSheet *sheet, gboolean resizable); Set rows resizable status. sheet : a GtkSheet. resizable : TRUE or FALSE gtk_sheet_row_visible () gtk_sheet_row_visiblegboolean gtk_sheet_row_visible (GtkSheet *sheet, gint row); Get row visibility. sheet : a GtkSheet. row : row number Returns : TRUE - is visible FALSE - invisible or not existant gtk_sheet_row_set_visibility () gtk_sheet_row_set_visibilityvoid gtk_sheet_row_set_visibility (GtkSheet *sheet, gint row, gboolean visible); Set row visibility. The default value is TRUE. If FALSE, the row is hidden. sheet : a GtkSheet. row : row number visible : TRUE or FALSE gtk_sheet_row_label_set_visibility () gtk_sheet_row_label_set_visibilityvoid gtk_sheet_row_label_set_visibility (GtkSheet *sheet, gint row, gboolean visible); Set row label visibility. sheet : a GtkSheet row : row number visible : TRUE or FALSE gtk_sheet_rows_labels_set_visibility () gtk_sheet_rows_labels_set_visibilityvoid gtk_sheet_rows_labels_set_visibility (GtkSheet *sheet, gboolean visible); Set all rows label visibility. The sheet itself has no such property, this is a convenience function to set the property for all existing rows. sheet : a GtkSheet visible : TRUE or FALSE gtk_sheet_row_get_tooltip_markup () gtk_sheet_row_get_tooltip_markupgchar * gtk_sheet_row_get_tooltip_markup (GtkSheet *sheet, const gint row); Gets the contents of the tooltip (markup) for the column sheet : a GtkSheet. row : row index Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_row_set_tooltip_markup () gtk_sheet_row_set_tooltip_markupvoid gtk_sheet_row_set_tooltip_markup (GtkSheet *sheet, const gint row, const gchar *markup); Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language. sheet : a GtkSheet. row : row index markup : the contents of the tooltip for widget, or NULL. gtk_sheet_row_get_tooltip_text () gtk_sheet_row_get_tooltip_textgchar * gtk_sheet_row_get_tooltip_text (GtkSheet *sheet, const gint row); Gets the contents of the tooltip for the column sheet : a GtkSheet. row : row index Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_row_set_tooltip_text () gtk_sheet_row_set_tooltip_textvoid gtk_sheet_row_set_tooltip_text (GtkSheet *sheet, const gint row, const gchar *text); Sets text as the contents of the tooltip. sheet : a GtkSheet. row : row index text : the contents of the tooltip for widget gtk_sheet_set_cell () gtk_sheet_set_cellvoid gtk_sheet_set_cell (GtkSheet *sheet, gint row, gint col, GtkJustification justification, const gchar *text); Set cell contents and allocate memory if needed. sheet : a GtkSheet. row : row_number col : column number justification : a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER text : cell text gtk_sheet_set_cell_text () gtk_sheet_set_cell_textvoid gtk_sheet_set_cell_text (GtkSheet *sheet, gint row, gint col, const gchar *text); Set cell contents and allocate memory if needed. No justifcation is made. attributes and links remain unchanged. sheet : a GtkSheet. row : row_number col : column number text : cell text gtk_sheet_cell_get_text () gtk_sheet_cell_get_textgchar * gtk_sheet_cell_get_text (GtkSheet *sheet, gint row, gint col); Get cell text. sheet : a GtkSheet row : row number col : column number Returns : a pointer to the cell text, or NULL. Do not modify or free it. gtk_sheet_cell_clear () gtk_sheet_cell_clearvoid gtk_sheet_cell_clear (GtkSheet *sheet, gint row, gint column); Clear cell contents. sheet : a GtkSheet. row : row_number column : column number gtk_sheet_cell_delete () gtk_sheet_cell_deletevoid gtk_sheet_cell_delete (GtkSheet *sheet, gint row, gint column); Clear cell contents and remove links. sheet : a GtkSheet. row : row_number column : column number gtk_sheet_cell_get_state () gtk_sheet_cell_get_stateGtkStateType gtk_sheet_cell_get_state (GtkSheet *sheet, gint row, gint col); Get status of a cell. sheet : a GtkSheet row : row number col : column number Returns : a "" GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED gtk_sheet_cell_get_tooltip_markup () gtk_sheet_cell_get_tooltip_markupgchar * gtk_sheet_cell_get_tooltip_markup (GtkSheet *sheet, const gint row, const gint col); Gets the contents of the tooltip (markup) for the column sheet : a GtkSheet. row : row index col : column index Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_cell_set_tooltip_markup () gtk_sheet_cell_set_tooltip_markupvoid gtk_sheet_cell_set_tooltip_markup (GtkSheet *sheet, const gint row, const gint col, const gchar *markup); Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language. sheet : a GtkSheet. row : row index col : column index markup : the contents of the tooltip for widget, or NULL. gtk_sheet_cell_get_tooltip_text () gtk_sheet_cell_get_tooltip_textgchar * gtk_sheet_cell_get_tooltip_text (GtkSheet *sheet, const gint row, const gint col); Gets the contents of the tooltip for the column sheet : a GtkSheet. row : row index col : column index Returns : the tooltip text, or NULL. You should free the returned string with g_free() when done. gtk_sheet_cell_set_tooltip_text () gtk_sheet_cell_set_tooltip_textvoid gtk_sheet_cell_set_tooltip_text (GtkSheet *sheet, const gint row, const gint col, const gchar *text); Sets text as the contents of the tooltip. sheet : a GtkSheet. row : row index col : column index text : the contents of the tooltip for widget gtk_sheet_get_cell_area () gtk_sheet_get_cell_areagboolean gtk_sheet_get_cell_area (GtkSheet *sheet, gint row, gint column, GdkRectangle *area); Get area of a given cell. sheet : a GtkSheet row : row number column : column number area : a GdkRectangle area of the cell Returns : TRUE(success) or FALSE(failure) gtk_sheet_get_pixel_info () gtk_sheet_get_pixel_infogboolean gtk_sheet_get_pixel_info (GtkSheet *sheet, GdkWindow *window, gint x, gint y, gint *row, gint *column); Get row and column correspondig to the given position within the sheet. In order to decode clicks into to title area correctly, pass the GdkWindow from the button event. Omitting the window (NULL) defaults to the sheet window. row and column may return values in the range [-1 .. max+1] depending on wether the position lies within the title area, the sheet cell area or beyond the outermost row/column. All 9 sheet areas can be reliably determined by evaluating the returned row/column values (title area/cell area/outside). sheet : a GtkSheet window : base window for coordinates (null) x : x coordinate y : y coordinate row : cell row number column : cell column number Returns : TRUE if the position lies within the sheet cell area or FALSE when outside (title area f.e.) gtk_sheet_get_link () gtk_sheet_get_linkgpointer gtk_sheet_get_link (GtkSheet *sheet, gint row, gint col); Get link pointer from a cell. sheet : a GtkSheet row : row number col : column number Returns : (transfer none) pointer linked to the cell gtk_sheet_link_cell () gtk_sheet_link_cellvoid gtk_sheet_link_cell (GtkSheet *sheet, gint row, gint col, gpointer link); Link pointer to a cell. sheet : a GtkSheet row : row number col : column number link : pointer linked to the cell gtk_sheet_remove_link () gtk_sheet_remove_linkvoid gtk_sheet_remove_link (GtkSheet *sheet, gint row, gint col); Remove link pointer from a cell. sheet : a GtkSheet row : row number col : column number gtk_sheet_range_clear () gtk_sheet_range_clearvoid gtk_sheet_range_clear (GtkSheet *sheet, const GtkSheetRange *range); Clear range contents. If range==NULL the whole sheet will be cleared. sheet : a GtkSheet. range : a GtkSheetRange gtk_sheet_range_delete () gtk_sheet_range_deletevoid gtk_sheet_range_delete (GtkSheet *sheet, const GtkSheetRange *range); Clear range contents and remove links. FIXME:: if range==NULL whole sheet is deleted? sheet : a GtkSheet. range : a GtkSheetRange gtk_sheet_range_set_background () gtk_sheet_range_set_backgroundvoid gtk_sheet_range_set_background (GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); Set background color of the given range. sheet : a GtkSheet. urange : a GtkSheetRange. color : a GdkColor. gtk_sheet_range_set_foreground () gtk_sheet_range_set_foregroundvoid gtk_sheet_range_set_foreground (GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); Set foreground color of the given range. sheet : a GtkSheet. urange : a GtkSheetRange. color : a GdkColor. gtk_sheet_range_set_justification () gtk_sheet_range_set_justificationvoid gtk_sheet_range_set_justification (GtkSheet *sheet, const GtkSheetRange *urange, GtkJustification just); Set text justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER) of the given range. The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the default justification for numbers is GTK_JUSTIFY_RIGHT. sheet : a GtkSheet. urange : a GtkSheetRange. just : a GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER. gtk_sheet_range_set_editable () gtk_sheet_range_set_editablevoid gtk_sheet_range_set_editable (GtkSheet *sheet, const GtkSheetRange *urange, gint editable); Set if cell contents can be edited or not in the given range. sheet : a GtkSheet. urange : a GtkSheetRange editable : TRUE or FALSE gtk_sheet_range_set_visible () gtk_sheet_range_set_visiblevoid gtk_sheet_range_set_visible (GtkSheet *sheet, const GtkSheetRange *urange, gboolean visible); Set if cell contents are visible or not in the given range: accepted values are TRUE or FALSE. sheet : a GtkSheet. urange : a GtkSheetRange. visible : TRUE or FALSE. gtk_sheet_range_set_border () gtk_sheet_range_set_bordervoid gtk_sheet_range_set_border (GtkSheet *sheet, const GtkSheetRange *urange, gint mask, guint width, gint line_style); Set cell border style in the given range. sheet : a GtkSheet. urange : a GtkSheetRange where we set border style. mask : CELL_LEFT_BORDER, CELL_RIGHT_BORDER, CELL_TOP_BORDER,CELL_BOTTOM_BORDER width : width of the border line in pixels line_style : GdkLineStyle for the border line gtk_sheet_range_set_border_color () gtk_sheet_range_set_border_colorvoid gtk_sheet_range_set_border_color (GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); Set border color for the given range. sheet : a GtkSheet. urange : a GtkSheetRange where we set border color. color : a GdkColor. gtk_sheet_range_set_font () gtk_sheet_range_set_fontvoid gtk_sheet_range_set_font (GtkSheet *sheet, const GtkSheetRange *urange, PangoFontDescription *font_desc); Set font_desc for the given range. sheet : a GtkSheet. urange : a GtkSheetRange where we set font_desc. font_desc : (transfer none) a PangoFontDescription. gtk_sheet_put () gtk_sheet_putGtkSheetChild * gtk_sheet_put (GtkSheet *sheet, GtkWidget *child, gint x, gint y); Add widgets to the sheet. The widget is floating in one given position (x,y) regardless of the configurations of rows/columns. This means that cells do not resize depending on the widgets' size. You can resize it yourself or use gtk_sheet_attach_*() You may remove it with gtk_container_remove(GTK_CONTAINER(sheet), GtkWidget *child); sheet : a GtkSheet. child : GtkWidget to be put x : x coordinate where we put the widget y : y coordinate where we put the widget Returns : (transfer none) TRUE means that the cell is currently allocated. gtk_sheet_attach () gtk_sheet_attachvoid gtk_sheet_attach (GtkSheet *sheet, GtkWidget *widget, gint row, gint col, gint xoptions, gint yoptions, gint xpadding, gint ypadding); Attaches a child widget to the given cell with the given alignments. Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the cell, expands with it, or shrinks with it, depending on the options , if GTK_EXPAND is set. The child is reallocated each time the column or row changes, keeping attached to the same cell. sheet : a GtkSheet. widget : GtkWidget to be put row : row number col : column number xoptions : if set GTK_EXPAND cell will expand/shrink on x direction yoptions : if set GTK_EXPAND cell will expand/shrink on y direction xpadding : x coordinate of the alignment ypadding : y coordinate of the alignment gtk_sheet_attach_floating () gtk_sheet_attach_floatingvoid gtk_sheet_attach_floating (GtkSheet *sheet, GtkWidget *widget, gint row, gint col); The widget is attached to the top-left corner of a cell (row,column) and moves with it when you change width, height, or you delete of add row/columns sheet : a GtkSheet. widget : GtkWidget to be put row : row number col : column number gtk_sheet_attach_default () gtk_sheet_attach_defaultvoid gtk_sheet_attach_default (GtkSheet *sheet, GtkWidget *widget, gint row, gint col); Attaches a child widget to the given cell with the 0,0 alignments. Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the cell, expands with it, or shrinks with it, depending on the options. The child is reallocated each time the column or row changes, keeping attached to the same cell. It's in fact gtk_sheet_attach() with GTK_EXPAND set. sheet : a GtkSheet. widget : GtkWidget to be put row : row number col : column number gtk_sheet_move_child () gtk_sheet_move_childvoid gtk_sheet_move_child (GtkSheet *sheet, GtkWidget *widget, gint x, gint y); Move widgets added with gtk_sheet_put() in the sheet. sheet : a GtkSheet. widget : GtkWidget to be put. x : x coord at which we move the widget. y : y coord at which we move the widget. gtk_sheet_get_child_at () gtk_sheet_get_child_atconst GtkSheetChild * gtk_sheet_get_child_at (GtkSheet *sheet, gint row, gint col); Get the child attached at row,col. sheet : a GtkSheet. row : row number col : column number Returns : the GtkSheetChild attached to row,col or NULL gtk_sheet_button_attach () gtk_sheet_button_attachvoid gtk_sheet_button_attach (GtkSheet *sheet, GtkWidget *widget, gint row, gint col); Button attach works like cell attach but for the buttons. sheet : a GtkSheet. widget : GtkWidget to be put row : row number col : column number Property Details The <literal>"autoresize"</literal> property GtkSheet:autoresize "autoresize" gboolean : Read / Write Autoreisize cells while typing (rows and columns) Default value: FALSE The <literal>"autoresize-cols"</literal> property GtkSheet:autoresize-cols "autoresize-cols" gboolean : Read / Write Autoreisize columns while typing Default value: FALSE The <literal>"autoresize-rows"</literal> property GtkSheet:autoresize-rows "autoresize-rows" gboolean : Read / Write Autoreisize rows while typing Default value: FALSE The <literal>"autoscroll"</literal> property GtkSheet:autoscroll "autoscroll" gboolean : Read / Write The sheet will be automatically scrolled when you move beyond the last visible row/column Default value: TRUE The <literal>"bgcolor"</literal> property GtkSheet:bgcolor "bgcolor" GdkColor* : Read / Write Background color of the sheet The <literal>"clip-text"</literal> property GtkSheet:clip-text "clip-text" gboolean : Read / Write Clip text in cells Default value: FALSE The <literal>"col-titles-height"</literal> property GtkSheet:col-titles-height "col-titles-height" guint : Read / Write Height of the column titles Allowed values: <= 1024 Default value: 24 The <literal>"col-titles-visible"</literal> property GtkSheet:col-titles-visible "col-titles-visible" gboolean : Read / Write Visibility of the column titles Default value: TRUE The <literal>"columns-resizable"</literal> property GtkSheet:columns-resizable "columns-resizable" gboolean : Read / Write Columns resizable Default value: TRUE The <literal>"description"</literal> property GtkSheet:description "description" gchar* : Read / Write The sheets description, a place to store further information for application use Default value: "" The <literal>"entry-type"</literal> property GtkSheet:entry-type "entry-type" GtkSheetEntryType : Read / Write Sheet cell entry widget type Default value: GTK_SHEET_ENTRY_TYPE_DEFAULT The <literal>"grid-color"</literal> property GtkSheet:grid-color "grid-color" GdkColor* : Read / Write Color of the grid The <literal>"grid-visible"</literal> property GtkSheet:grid-visible "grid-visible" gboolean : Read / Write Sets the visibility of grid Default value: TRUE The <literal>"justify-entry"</literal> property GtkSheet:justify-entry "justify-entry" gboolean : Read / Write Adapt cell entry editor to the cell justification.Default value: TRUE The <literal>"locked"</literal> property GtkSheet:locked "locked" gboolean : Read / Write If the sheet ist locked, it is not editable, cell contents cannot be modified by the user. Default value: FALSE The <literal>"n-rows"</literal> property GtkSheet:n-rows "n-rows" gint : Read / Write Number of rows in the sheet Allowed values: [0,1000000] Default value: 0 The <literal>"row-titles-visible"</literal> property GtkSheet:row-titles-visible "row-titles-visible" gboolean : Read / Write Row titles visible Default value: TRUE The <literal>"row-titles-width"</literal> property GtkSheet:row-titles-width "row-titles-width" guint : Read / Write Width of the row title area Allowed values: <= 2048 Default value: 80 The <literal>"rows-resizable"</literal> property GtkSheet:rows-resizable "rows-resizable" gboolean : Read / Write Rows resizable Default value: TRUE The <literal>"selection-mode"</literal> property GtkSheet:selection-mode "selection-mode" GtkSelectionMode : Read / Write Sets the selection mode of the cells in a GtkSheet Default value: GTK_SELECTION_BROWSE The <literal>"title"</literal> property GtkSheet:title "title" gchar* : Read / Write The sheets title string Default value: "GtkSheet" The <literal>"vjust"</literal> property GtkSheet:vjust "vjust" GtkSheetVerticalJustification : Read / Write Default vertical cell text justification Default value: GTK_SHEET_VERTICAL_JUSTIFICATION_TOP Signal Details The <literal>"activate"</literal> signal GtkSheet::activategboolean user_function (GtkSheet *sheet, gint row, gint column, gpointer user_data) : Run Last Emmited whenever a cell is activated(you click on it). FIXME:: The return value is ignored (not yet implemented). sheet : the sheet widget that emitted the signal row : row number of activated cell. column : column number of activated cell. user_data : user data set when the signal handler was connected. The <literal>"changed"</literal> signal GtkSheet::changedvoid user_function (GtkSheet *sheet, gint row, gint column, gpointer user_data) : Run Last "Emited when typing into the active cell, changing its content. It is emitted after each key press in cell and after deactivating cell. sheet : the sheet widget that emitted the signal row : row number of changed cell. column : column number of changed cell. user_data : user data set when the signal handler was connected. The <literal>"clear-cell"</literal> signal GtkSheet::clear-cellvoid user_function (GtkSheet *sheet, gint row, gint column, gpointer user_data) : Run Last Emited when when the content of the cell is erased. sheet : the sheet widget that emitted the signal row : row number of cleared cell. column : column number of cleared cell. user_data : user data set when the signal handler was connected. The <literal>"clip-range"</literal> signal GtkSheet::clip-rangevoid user_function (GtkSheet *sheet, GtkSheetRange *clip_range, gpointer user_data) : Run Last Emmited when a GtkSheetRange is clipping. sheet : the sheet widget that emitted the signal clip_range : the newly selected GtkSheetRange user_data : user data set when the signal handler was connected. The <literal>"deactivate"</literal> signal GtkSheet::deactivategboolean user_function (GtkSheet *sheet, gint row, gint column, gpointer user_data) : Run Last Emmited whenever a cell is deactivated(you click on other cell or start a new selection). The signal handler must return TRUE in order to allow deactivation, FALSE to deny deactivation. sheet : the sheet widget that emitted the signal row : row number of deactivated cell. column : column number of deactivated cell. user_data : user data set when the signal handler was connected. The <literal>"enter-pressed"</literal> signal GtkSheet::enter-pressedgboolean user_function (GtkSheet *sheet, GdkEvent *event, gpointer user_data) : Run Last This signal intercepts RETURN and ENTER key-press-events before they are processed by the sheet-entry editor. Any modifier combinations on these keys may trigger the signal. The default behaviour of the sheet-entry editor is to move the active cell, which might not be appropriate for the type of application. sheet : the sheet widget that emitted the signal event : the GdkEventKey which triggered this signal.. type Gdk.EventKey. user_data : user data set when the signal handler was connected. Returns : TRUE to block the sheet-entry from processing the event. FALSE to propagate the event to the sheet-entry. The <literal>"entry-focus-in"</literal> signal GtkSheet::entry-focus-ingboolean user_function (GtkSheet *sheet, GdkEvent *event, gpointer user_data) : Run Last The ::entry-focus-in signal will be emitted when the keyboard focus enters the sheet_entry editor. sheet : the sheet widget that emitted the signal event : the GdkEventFocus which triggered this signal user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. Since 3.0.1The <literal>"entry-focus-out"</literal> signal GtkSheet::entry-focus-outgboolean user_function (GtkSheet *sheet, GdkEvent *event, gpointer user_data) : Run Last The ::entry-focus-out signal will be emitted when the keyboard focus leaves the sheet_entry editor. sheet : the sheet widget that emitted the signal event : the GdkEventFocus which triggered this signal user_data : user data set when the signal handler was connected. Returns : TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. Since 3.0.1The <literal>"move-cursor"</literal> signal GtkSheet::move-cursorvoid user_function (GtkSheet *sheet, GtkMovementStep step, gint count, gboolean extend_selection, gpointer user_data) : Run Last / Action The ::move-cursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement. Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically. sheet : the sheet widget that emitted the signal step : the granularity of the move, as a GtkMovementStep count : the number of step units to move extend_selection : TRUE if the move should extend the selection user_data : user data set when the signal handler was connected. Since 3.0.2The <literal>"move-range"</literal> signal GtkSheet::move-rangevoid user_function (GtkSheet *sheet, GtkSheetRange *old_range, GtkSheetRange *new_range, gpointer user_data) : Run Last Emmited when a GtkSheetRange is moved. sheet : the sheet widget that emitted the signal. old_range : the previous selected GtkSheetRange. new_range : the newly selected GtkSheetRange. user_data : user data set when the signal handler was connected. The <literal>"new-column-width"</literal> signal GtkSheet::new-column-widthvoid user_function (GtkSheet *sheet, gint col, gint width, gpointer user_data) : Run Last Emited when the width of a column is modified. sheet : the sheet widget that emitted the signal col : modified column number. width : new column width user_data : user data set when the signal handler was connected. The <literal>"new-row-height"</literal> signal GtkSheet::new-row-heightvoid user_function (GtkSheet *sheet, gint row, gint height, gpointer user_data) : Run Last Emited when the height of a row is modified. sheet : the sheet widget that emitted the signal row : modified row number. height : new row height. user_data : user data set when the signal handler was connected. The <literal>"populate-popup"</literal> signal GtkSheet::populate-popupvoid user_function (GtkSheet *sheet, GtkMenu *menu, gpointer user_data) : Run Last The ::populate-popup signal will be emitted when the user activates the popup menu of the sheet_entry editor. The emission of this signal is only supported for GtkEntry, GtkDataEntry, GtkItemEntry and GtkTextView. sheet : the sheet widget that emitted the signal menu : the menu that ist being populated user_data : user data set when the signal handler was connected. Since 3.0.1The <literal>"resize-range"</literal> signal GtkSheet::resize-rangevoid user_function (GtkSheet *sheet, GtkSheetRange *old_range, GtkSheetRange *new_range, gpointer user_data) : Run Last Emmited when a GtkSheetRange is resized. sheet : the sheet widget that emitted the signal old_range : the previous selected GtkSheetRange. new_range : the newly selected GtkSheetRange. user_data : user data set when the signal handler was connected. The <literal>"select-column"</literal> signal GtkSheet::select-columnvoid user_function (GtkSheet *sheet, gint select_column, gpointer user_data) : Run Last Emmited when a column has been selected. sheet : the sheet widget that emitted the signal select_column : the newly selected column index user_data : user data set when the signal handler was connected. The <literal>"select-range"</literal> signal GtkSheet::select-rangevoid user_function (GtkSheet *sheet, GtkSheetRange *select_range, gpointer user_data) : Run Last Emmited when a GtkSheetRange has been selected. sheet : the sheet widget that emitted the signal select_range : the newly selected GtkSheetRange user_data : user data set when the signal handler was connected. The <literal>"select-row"</literal> signal GtkSheet::select-rowvoid user_function (GtkSheet *sheet, gint row, gpointer user_data) : Run Last Emmited when a row has been selected. sheet : the sheet widget that emitted the signal row : the newly selected row index user_data : user data set when the signal handler was connected. The <literal>"set-cell"</literal> signal GtkSheet::set-cellvoid user_function (GtkSheet *sheet, gint row, gint column, gpointer user_data) : Run Last Emited when clicking on a non-empty cell. sheet : the sheet widget that emitted the signal row : row number of activated cell. column : column number of activated cell. user_data : user data set when the signal handler was connected. The <literal>"set-scroll-adjustments"</literal> signal GtkSheet::set-scroll-adjustmentsvoid user_function (GtkSheet *sheet, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment, gpointer user_data) : Run Last Emited when scroll adjustments are set. sheet : the sheet widget that emitted the signal hadjustment : horizontal GtkAdjustment. vadjustment : vertical GtkAdkjustment. user_data : user data set when the signal handler was connected. The <literal>"traverse"</literal> signal GtkSheet::traversegboolean user_function (GtkSheet *sheet, gint row, gint column, gpointer *new_row, gpointer *new_column, gpointer user_data) : Run Last The "traverse" is emited before "deactivate" and allows to veto the movement. In such case, the entry will remain in the site and the other signals will not be emited. The signal handler must return TRUE to allow the movement, FALSE to veto the movement. sheet : the sheet widget that emitted the signal. row : row number of old cell column : column number of old cell *new_row : row number of target cell, changeable *new_column : column number of target cell, changeable user_data : user data set when the signal handler was connected. gtkextra-3.2.0/docs/reference/xml/gtkiconfilesel.xml0000644000076400001440000002747712604172532017523 00000000000000 ]> GtkIconFileSel 3 GTKEXTRA Library GtkIconFileSel A file selection dialog widget for GTK. Synopsis #include <gtkextra.h> GtkIconFileSel; GtkWidget* gtk_icon_file_selection_new (const gchar *title); void gtk_icon_file_selection_construct (GtkIconFileSel *filesel, const gchar *title); void gtk_icon_file_selection_show_tree (GtkIconFileSel *filesel, gboolean show); gint gtk_icon_file_selection_open_dir (GtkIconFileSel *filesel, const gchar *path); void gtk_icon_file_selection_show_hidden (GtkIconFileSel *filesel, gboolean visible); void gtk_icon_file_selection_set_filter (GtkIconFileSel *filesel, const gchar *filter); const gchar * gtk_icon_file_selection_get_selection (GtkIconFileSel *filesel); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkIconFileSel Implemented Interfaces GtkIconFileSel implements AtkImplementorIface and GtkBuildable. Description It is a nice looking file selection dialog using icons. It combines GtkDirTree and GtkFileList to navigate the file system and select files. It has also two entries to select the file and filter. Details GtkIconFileSel GtkIconFileSeltypedef struct _GtkIconFileSel GtkIconFileSel; gtk_icon_file_selection_new () gtk_icon_file_selection_newGtkWidget* gtk_icon_file_selection_new (const gchar *title); title : Returns : gtk_icon_file_selection_construct () gtk_icon_file_selection_constructvoid gtk_icon_file_selection_construct (GtkIconFileSel *filesel, const gchar *title); Sets the window title for GtkIconFileSelection widget. filesel : the GtkIconFileSelection widget. title : window title. gtk_icon_file_selection_show_tree () gtk_icon_file_selection_show_treevoid gtk_icon_file_selection_show_tree (GtkIconFileSel *filesel, gboolean show); Show icon file selection tree in filesel widget. filesel : the GtkIconFileSelection widget. show : TRUE(show) or FALSE(don't show). gtk_icon_file_selection_open_dir () gtk_icon_file_selection_open_dirgint gtk_icon_file_selection_open_dir (GtkIconFileSel *filesel, const gchar *path); Show the file from path directory in filesel widget. filesel : the GtkIconFileSelection widget. path : directory path. Returns : TRUE or FALSE depending on success gtk_icon_file_selection_show_hidden () gtk_icon_file_selection_show_hiddenvoid gtk_icon_file_selection_show_hidden (GtkIconFileSel *filesel, gboolean visible); Set the visibility of hidden files. filesel : the GtkIconFileSelection widget. visible : TRUE(show hidden files) or FALSE(don't show hidden files). gtk_icon_file_selection_set_filter () gtk_icon_file_selection_set_filtervoid gtk_icon_file_selection_set_filter (GtkIconFileSel *filesel, const gchar *filter); Set a filter for the files show in filelist. filesel : the GtkIconFileSelection widget. filter : filter to be applied on files. gtk_icon_file_selection_get_selection () gtk_icon_file_selection_get_selectionconst gchar * gtk_icon_file_selection_get_selection (GtkIconFileSel *filesel); Gets the current selection applied on GtkIconFileSelection. filesel : the GtkIconFileSelection widget. Returns : the current selection. gtkextra-3.2.0/docs/reference/xml/gtkplotprint.xml0000644000076400001440000003221312604172532017242 00000000000000 ]> GtkPlotPrint 3 GTKEXTRA Library GtkPlotPrint Synopsis #include <gtkextra.h> gboolean gtk_plot_export_ps (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size); gboolean gtk_plot_export_ps_with_size (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height); gboolean gtk_plot_canvas_export_ps (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size); gboolean gtk_plot_canvas_export_ps_with_size (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height); gboolean gtk_plot_canvas_export_cairo (GtkPlotCanvas *canvas, cairo_t *cairo); Description FIXME:: Need long description. Details gtk_plot_export_ps () gtk_plot_export_psgboolean gtk_plot_export_ps (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size); plot : a GtkPlot file_name : orient : epsflag : page_size : Returns : gtk_plot_export_ps_with_size () gtk_plot_export_ps_with_sizegboolean gtk_plot_export_ps_with_size (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height); plot : a GtkPlot file_name : orient : epsflag : units : width : height : Returns : gtk_plot_canvas_export_ps () gtk_plot_canvas_export_psgboolean gtk_plot_canvas_export_ps (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size); canvas : a GtkPlotCanvas . file_name : orient : epsflag : page_size : Returns : gtk_plot_canvas_export_ps_with_size () gtk_plot_canvas_export_ps_with_sizegboolean gtk_plot_canvas_export_ps_with_size (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height); canvas : a GtkPlotCanvas . file_name : orient : epsflag : units : width : height : Returns : gtk_plot_canvas_export_cairo () gtk_plot_canvas_export_cairogboolean gtk_plot_canvas_export_cairo (GtkPlotCanvas *canvas, cairo_t *cairo); canvas : a GtkPlotCanvas . cairo : Returns : gtkextra-3.2.0/docs/reference/xml/gtkcharsel.xml0000644000076400001440000001372312604172532016635 00000000000000 ]> GtkCharSelection 3 GTKEXTRA Library GtkCharSelection Character selection dialog Synopsis #include <gtkextra.h> GtkCharSelection; GtkWidget* gtk_char_selection_new (void); void gtk_char_selection_set_selection (GtkCharSelection *charsel, gint selection); gint gtk_char_selection_get_selection (GtkCharSelection *charsel); Object Hierarchy GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkCharSelection Implemented Interfaces GtkCharSelection implements AtkImplementorIface and GtkBuildable. Description Char selection is a widget which contains all the characters in a font. Connecting a callback to the ok button of the widget you get the selected char. Details GtkCharSelection GtkCharSelectiontypedef struct _GtkCharSelection GtkCharSelection; The GtkCharSelection struct contains only private data. It should only be accessed through the functions described below. gtk_char_selection_new () gtk_char_selection_newGtkWidget* gtk_char_selection_new (void); Returns : gtk_char_selection_set_selection () gtk_char_selection_set_selectionvoid gtk_char_selection_set_selection (GtkCharSelection *charsel, gint selection); Sets the selection for the GtkCharSelection widget. charsel : Char Selection widget. selection : a character index from the list. 0 is left,upper corner;256 is right, down corner. gtk_char_selection_get_selection () gtk_char_selection_get_selectiongint gtk_char_selection_get_selection (GtkCharSelection *charsel); Gets the current selection charsel : Char Selection widget. Returns : The current selection(a character from the list).0 is left,upper corner;256 is right, down corner. gtkextra-3.2.0/docs/reference/Makefile.in0000644000076400001440000005102212604172272015224 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # We require automake 1.6 at least. #AUTOMAKE_OPTIONS = 1.6 # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/gtk-doc.make subdir = docs/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLADE_CATALOG_DIR = @GLADE_CATALOG_DIR@ GLADE_CFLAGS = @GLADE_CFLAGS@ GLADE_LIBS = @GLADE_LIBS@ GLADE_MODULE_DIR = @GLADE_MODULE_DIR@ GLADE_PIXMAP_DIR = @GLADE_PIXMAP_DIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_EXTRA_MAJOR_VERSION = @GTK_EXTRA_MAJOR_VERSION@ GTK_EXTRA_MICRO_VERSION = @GTK_EXTRA_MICRO_VERSION@ GTK_EXTRA_MINOR_VERSION = @GTK_EXTRA_MINOR_VERSION@ GTK_EXTRA_VERSION = @GTK_EXTRA_VERSION@ GTK_EXTRA_VERSION_SHORT = @GTK_EXTRA_VERSION_SHORT@ GTK_LIBS = @GTK_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGTKEXTRA_SO_VERSION = @LIBGTKEXTRA_SO_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gdktarget = @gdktarget@ gtkextratargetlib = @gtkextratargetlib@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgladegtkextra_soname = @libgladegtkextra_soname@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ms_librarian = @ms_librarian@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module, e.g. 'glib'. DOC_MODULE = gtkextra DOC_MODULE_VERSION = $(GTK_EXTRA_MAJOR_VERSION) # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. DOC_SOURCE_DIR = $(top_builddir)/gtkextra # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS = --sgml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS = # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = $(top_srcdir)/gtkextra/*.h CFILE_GLOB = $(top_srcdir)/gtkextra/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES = \ pixmaps.h \ icons.h \ gtkextra-marshal.h \ gtkextra-marshal.list \ gtkextratypebuiltins.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = \ pics/gtkbordercombo.jpg \ pics/gtkcharsel.jpg \ pics/gtkcolorcombo.jpg \ pics/gtkfilelist.jpg \ pics/gtkiconlist.jpg # $(top_srcdir)/docs/reference/pics/gtkiconlist.jpg # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files = version.xml \ compiling.sgml \ resources.sgml # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded # These files must be listed here *and* in content_files # e.g. expand_content_files=running.sgml expand_content_files = \ version.xml \ compiling.sgml \ resources.sgml # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/gtkextra -I$(top_builddir) $(GTK_CFLAGS) GTKDOC_LIBS = $(top_builddir)/gtkextra/libgtkextra-x11-3.0.la $(GTK_LIBS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = sh -c @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) # This includes the standard gtk-doc make rules, copied by gtkdocize. # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/reference/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/reference/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp @ENABLE_GTK_DOC_FALSE@all-local: docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(builddir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gtkextra-3.2.0/docs/reference/tmpl/0000755000076400001440000000000012604172532014212 500000000000000gtkextra-3.2.0/docs/reference/tmpl/gtkplotprint.sgml0000644000076400001440000000171712604172532017565 00000000000000 GtkPlotPrint @plot: @file_name: @orient: @epsflag: @page_size: @Returns: @plot: @file_name: @orient: @epsflag: @units: @width: @height: @Returns: @canvas: @file_name: @orient: @epsflag: @page_size: @Returns: @canvas: @file_name: @orient: @epsflag: @units: @width: @height: @Returns: @canvas: @cairo: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotbubble.sgml0000644000076400001440000000307412604172532017662 00000000000000 GtkPlotBubble @Returns: @bubble: @show: @bubble: @scale_max: @bubble: @size_max: @bubble: @precision: @bubble: @style: @bubble: @prefix: @bubble: @suffix: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcanvasrectangle.sgml0000644000076400001440000000174512604172532021572 00000000000000 GtkPlotCanvasRectangle @style: @width: @fg: @bg: @border: @fill: @Returns: @rectangle: @style: @width: @fg: @bg: @border: @fill: gtkextra-3.2.0/docs/reference/tmpl/gtkplotdata.sgml0000644000076400001440000004206712604172532017345 00000000000000 GtkPlotData @plotdata: the object which received the signal. @arg1: @Returns: @plotdata: the object which received the signal. @plotdata: the object which received the signal. @plotdata: the object which received the signal. @plotdata: the object which received the signal. @arg1: @Returns: @function: @Returns: @data: @function: @iterator: @npoints: @mask: @Returns: @data: @iterator: @npoints: @mask: @data: @copy: @data: @name: @label: @desc: @value_type: @required: @independent: @data: @name: @data: @name: @Returns: @data: @Returns: @data: @Returns: @data: @data: @data: @npoints: @data: @px: @py: @data: @name: @points: @Returns: @data: @name: @array: @data: @name: @Returns: @data: @name: @scale: @data: @name: @Returns: @data: @x: @y: @dx: @dy: @num_points: @dataset: @x: @y: @dx: @dy: @num_points: @dataset: @n: @x: @y: @z: @a: @dx: @dy: @dz: @da: @label: @error: @data: @x: @Returns: @data: @y: @Returns: @data: @z: @Returns: @data: @a: @Returns: @data: @dx: @Returns: @data: @dy: @Returns: @data: @dz: @Returns: @data: @da: @Returns: @data: @a_scale: @data: @labels: @Returns: @dataset: @num_points: @Returns: @dataset: @num_points: @Returns: @dataset: @num_points: @Returns: @dataset: @num_points: @Returns: @dataset: @num_points: @Returns: @dataset: @num_points: @Returns: @dataset: @num_points: @Returns: @dataset: @num_points: @Returns: @dataset: @Returns: @dataset: @show_labels: @Returns: @dataset: @show_labels: @data: @font: @height: @angle: @fg: @bg: @dataset: @num_points: @data: @Returns: @dataset: @type: @style: @size: @line_width: @color: @border_color: @dataset: @type: @style: @size: @line_width: @color: @border_color: @dataset: @connector: @dataset: @Returns: @dataset: @style: @cap_style: @join_style: @width: @color: @dataset: @style: @cap_style: @join_style: @width: @color: @dataset: @style: @cap_style: @join_style: @width: @color: @dataset: @style: @cap_style: @join_style: @width: @color: @dataset: @style: @cap_style: @join_style: @width: @color: @dataset: @dataset: @dataset: @dataset: @dataset: @dataset: @dataset: @fill: @dataset: @Returns: @data: @dataset: @dataset: @legend: @dataset: @precision: @data: @Returns: @dataset: @name: @data: @Returns: @data: @Returns: @data: @x: @y: @data: @size: @data: @data: @data: @custom: @data: @Returns: @data: @mask: @data: @Returns: @data: @visible: @data: @Returns: @data: @data: @data: @data: @min: @max: @data: @min: @max: @data: @level: @color: @data: @level: @Returns: @data: @min: @max: @data: @min: @max: @data: @min: @max: @nlevels: @nsublevels: @data: @min: @max: @nlevels: @nsublevels: @data: @level: @color: @data: @style: @precision: @data: @scale: @dataset: @link: @dataset: @Returns: @dataset: @data: @point: @Returns: @data: @marker: @Returns: @data: @data: @show: @data: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotbar.sgml0000644000076400001440000000165312604172532017174 00000000000000 GtkPlotBar @GTK_PLOT_BAR_POINTS: @GTK_PLOT_BAR_RELATIVE: @GTK_PLOT_BAR_ABSOLUTE: @orientation: @Returns: @bar: @orientation: @bar: @width: @bar: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcsurface.sgml0000644000076400001440000000433612604172532020224 00000000000000 GtkPlotCSurface @GTK_PLOT_PROJECT_NONE: @GTK_PLOT_PROJECT_EMPTY: @GTK_PLOT_PROJECT_FULL: @Returns: @function: @Returns: @csurface: @function: @csurface: @visible: @csurface: @Returns: @csurface: @proj: @csurface: @Returns: @dataset: @style: @width: @color: @dataset: @style: @width: @color: @dataset: @style: @width: @color: @dataset: @style: @width: @color: gtkextra-3.2.0/docs/reference/tmpl/gtkfilelist.sgml0000644000076400001440000000275412604172532017347 00000000000000 GtkFileList @icon_width: @mode: @path: @Returns: @file_list: @icon_width: @mode: @path: @file_list: @filter: @file_list: @dir_path: @Returns: @file_list: @Returns: @file_list: @Returns: @file_list: @Returns: @file_list: @pixmap_data: @Returns: @file_list: @pixmap: @mask: @Returns: @file_list: @type: @filter: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcanvaspixmap.sgml0000644000076400001440000000111112604172532021107 00000000000000 GtkPlotCanvasPixmap @_pixmap: @mask: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotdt.sgml0000644000076400001440000000231612604172532017034 00000000000000 GtkPlotDT @progress: @Returns: @num: @Returns: @dt: @set: @dt: @set: @data: @node: @Returns: @data: @idx: @Returns: @data: @Returns: @data: gtkextra-3.2.0/docs/reference/tmpl/gtkiconlist.sgml0000644000076400001440000001265512604172532017361 00000000000000 GtkIconList @iconlist: the object which received the signal. @arg1: @Returns: @iconlist: the object which received the signal. @event: @iconlist: the object which received the signal. @arg1: @Returns: @iconlist: the object which received the signal. @arg1: @event: @Returns: @iconlist: the object which received the signal. @arg1: @arg2: @Returns: @iconlist: the object which received the signal. @arg1: @event: @GTK_ICON_LIST_ICON: @GTK_ICON_LIST_TEXT_RIGHT: @GTK_ICON_LIST_TEXT_BELOW: @icon_width: @mode: @Returns: @iconlist: @icon_width: @mode: @iconlist: @mode: @iconlist: @Returns: @iconlist: @editable: @iconlist: @Returns: @iconlist: @spacing: @iconlist: @Returns: @iconlist: @spacing: @iconlist: @Returns: @iconlist: @text_space: @iconlist: @Returns: @iconlist: @border: @iconlist: @Returns: @iconlist: @width: @iconlist: @Returns: @iconlist: @iconlist: @iconlist: @color: @icon_list: @pixmap: @bitmap_mask: @label: @link: @Returns: @iconlist: @data: @label: @link: @Returns: @iconlist: @pixmap_file: @label: @link: @Returns: @iconlist: @n: @Returns: @iconlist: @item: @Returns: @iconlist: @item: @iconlist: @icon: @iconlist: @n: @iconlist: @iconlist: @item: @data: @item: @Returns: @iconlist: @data: @Returns: @iconlist: @x: @y: @Returns: @iconlist: @Returns: @item: @Returns: @item: @Returns: @item: @pixmap: @bitmap_mask: @iconlist: @item: @label: @iconlist: @mode: @iconlist: @item: @iconlist: @item: @iconlist: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcanvastext.sgml0000644000076400001440000000134712604172532020610 00000000000000 GtkPlotCanvasText @font: @height: @angle: @fg: @bg: @transparent: @justification: @real_text: @Returns: @text: @font: @height: @angle: @fg: @bg: @transparent: @justification: @real_text: gtkextra-3.2.0/docs/reference/tmpl/gtkcombobutton.sgml0000644000076400001440000000077512604172532020070 00000000000000 GtkComboButton @Returns: @combo_button: gtkextra-3.2.0/docs/reference/tmpl/gtkplot3d.sgml0000644000076400001440000002217412604172532016737 00000000000000 GtkPlot3D @GTK_PLOT_PLANE_XY: @GTK_PLOT_PLANE_YX: @GTK_PLOT_PLANE_XZ: @GTK_PLOT_PLANE_ZX: @GTK_PLOT_PLANE_YZ: @GTK_PLOT_PLANE_ZY: @GTK_PLOT_SIDE_XY: @GTK_PLOT_SIDE_XZ: @GTK_PLOT_SIDE_YX: @GTK_PLOT_SIDE_YZ: @GTK_PLOT_SIDE_ZX: @GTK_PLOT_SIDE_ZY: @drawable: @Returns: @drawable: @width: @height: @Returns: @plot: @drawable: @plot: @drawable: @width: @height: @plot: @plot: @angle_x: @angle_y: @angle_z: @plot: @vector: @a1: @a2: @a3: @plot: @plot: @angle: @plot: @angle: @plot: @angle: @plot: @x: @y: @z: @px: @py: @pz: @plot: @min: @max: @plot: @min: @max: @plot: @min: @max: @plot: @xfactor: @plot: @yfactor: @plot: @zfactor: @plot: @Returns: @plot: @Returns: @plot: @Returns: @plot: @plane: @color: @plot: @plane: @visible: @plot: @plane: @Returns: @plot: @visible: @plot: @Returns: @plot: @style: @width: @color: @plot: @style: @width: @color: @plot: @style: @width: @color: @plot: @style: @width: @color: @plot: @orientation: @Returns: @plot: @side: @Returns: @plot: @side: @ticks_mask: @plot: @side: @ticks_mask: @plot: @side: @label_mask: @plot: @side: @plot: @side: @plot: @direction: @major_step: @nminor: @plot: @direction: @major_step: @plot: @direction: @nminor: @plot: @direction: @length: @plot: @direction: @width: @plot: @side: @major_mask: @minor_mask: @plot: @offset: @plot: @Returns: @plot: @axis: @scale: @plot: @axis: @Returns: @plot: @x: @y: @z: @plot: @x: @y: @z: @plot: @x: @y: @z: @plot: @x: @y: @z: @plot: @style: @width: @color: @plot: @style: @width: @color: @plot: @style: @width: @color: @plot: @style: @width: @color: gtkextra-3.2.0/docs/reference/tmpl/gtksheetcolumn.sgml0000644000076400001440000001415412604172532020057 00000000000000 GtkSheetColumn @sheet: @ncols: @sheet: @col: @ncols: @sheet: @col: @ncols: @sheet: @Returns: @sheet: @col: @Returns: @colobj: @Returns: @sheet: @column: @sheet: @Returns: @sheet: @sheet: @sheet: @column: @Returns: @sheet: @column: @title: @sheet: @height: @sheet: @column: @Returns: @sheet: @column: @sensitive: @sheet: @sensitive: @sheet: @Returns: @sheet: @resizable: @sheet: @column: @Returns: @sheet: @column: @visible: @sheet: @col: @visible: @sheet: @visible: @sheet: @column: @Returns: @sheet: @column: @width: @sheet: @col: @Returns: @sheet: @col: @just: @sheet: @col: @Returns: @sheet: @col: @vjust: @sheet: @col: @Returns: @sheet: @col: @label: @sheet: @col: @justification: @sheet: @col: @Returns: @sheet: @col: @markup: @sheet: @col: @Returns: @sheet: @col: @text: @sheet: @col: @Returns: @sheet: @col: @data_type: @sheet: @col: @Returns: @sheet: @col: @description: @sheet: @col: @Returns: @sheet: @col: @format: @sheet: @col: @Returns: @sheet: @col: @is_key: @sheet: @col: @Returns: @sheet: @col: @entry_type: @sheet: @col: @Returns: @sheet: @col: @is_readonly: gtkextra-3.2.0/docs/reference/tmpl/gtkitementry.sgml0000644000076400001440000000217012604172532017544 00000000000000 GtkItemEntry @Returns: @max: @Returns: @entry: @text: @justification: @entry: @just: @item_entry: @Returns: @item_entry: @max_length_bytes: @entry: @Returns: @entry: @visible: gtkextra-3.2.0/docs/reference/tmpl/gtktogglecombo.sgml0000644000076400001440000000206712604172532020032 00000000000000 GtkToggleCombo @togglecombo: the object which received the signal. @arg1: @arg2: @nrows: @ncols: @Returns: @toggle_combo: @nrows: @ncols: @combo: @Returns: @combo: @Returns: @toggle_combo: @new_row: @new_col: @combo: @row: @col: gtkextra-3.2.0/docs/reference/tmpl/gtkpsfont.sgml0000644000076400001440000000277612604172532017051 00000000000000 GtkPSFont @Returns: @name: @Returns: @family_name: @italic: @bold: @Returns: @font: @height: @Returns: @font: @height: @Returns: @psfont: @Returns: @fontname: @psname: @family: @pango_description: @italic: @bold: @fontname: @psname: @family: @i18n_latinfamily: @pango_description: @italic: @bold: @vertical: @families: @num_families: @psfont: @font: @latin_font: @wc: @width: @ascent: @descent: gtkextra-3.2.0/docs/reference/tmpl/gtkplotsegment.sgml0000644000076400001440000000336512604172532020074 00000000000000 GtkPlotSegment @GTK_PLOT_ARROW_NONE: @GTK_PLOT_ARROW_ORIGIN: @GTK_PLOT_ARROW_END: @Returns: @segment: @set: @segment: @Returns: @segment: @arrow_length: @arrow_width: @arrow_style: @segment: @arrow_length: @arrow_width: @arrow_style: @segment: @mask: @segment: @Returns: @segment: @center: @segment: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcanvas.sgml0000644000076400001440000001451512604172532017704 00000000000000 GtkPlotCanvas @plotcanvas: the object which received the signal. @arg1: @plotcanvas: the object which received the signal. @plotcanvas: the object which received the signal. @arg1: @Returns: @plotcanvas: the object which received the signal. @arg1: @arg2: @arg3: @Returns: @plotcanvas: the object which received the signal. @arg1: @arg2: @arg3: @Returns: @plotcanvas: the object which received the signal. @event: @arg1: @Returns: @plotcanvas: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @GTK_PLOT_CANVAS_CAN_SELECT: @GTK_PLOT_CANVAS_CAN_SELECT_ITEM: @GTK_PLOT_CANVAS_CAN_DND: @GTK_PLOT_CANVAS_ACTION_INACTIVE: @GTK_PLOT_CANVAS_ACTION_SELECTION: @GTK_PLOT_CANVAS_ACTION_DRAG: @GTK_PLOT_CANVAS_ACTION_RESIZE: @GTK_PLOT_CANVAS_FROZEN: @GTK_PLOT_CANVAS_CAN_MOVE: @GTK_PLOT_CANVAS_CAN_RESIZE: @GTK_PLOT_CANVAS_SELECT_NONE: @GTK_PLOT_CANVAS_SELECT_MARKERS: @GTK_PLOT_CANVAS_SELECT_TARGET: @GTK_PLOT_CANVAS_SELECT_CLICK_1: @GTK_PLOT_CANVAS_SELECT_CLICK_2: @GTK_PLOT_CANVAS_OUT: @GTK_PLOT_CANVAS_IN: @GTK_PLOT_CANVAS_LEFT: @GTK_PLOT_CANVAS_RIGHT: @GTK_PLOT_CANVAS_TOP: @GTK_PLOT_CANVAS_BOTTOM: @GTK_PLOT_CANVAS_TOP_LEFT: @GTK_PLOT_CANVAS_TOP_RIGHT: @GTK_PLOT_CANVAS_BOTTOM_LEFT: @GTK_PLOT_CANVAS_BOTTOM_RIGHT: @GTK_PLOT_CANVAS_CHILD_FROZEN: @GTK_PLOT_CANVAS_CHILD_CAN_MOVE: @GTK_PLOT_CANVAS_CHILD_CAN_RESIZE: @width: @height: @magnification: @Returns: @canvas: @width: @height: @magnification: @canvas: @Returns: @canvas: @flags: @canvas: @flags: @canvas: @pc: @canvas: @canvas: @canvas: @canvas: @canvas: @visible: @canvas: @step: @canvas: @style: @width: @color: @plot_canvas: @plot_canvas: @canvas: @Returns: @canvas: @width: @height: @canvas: @magnification: @canvas: @transparent: @canvas: @Returns: @canvas: @bg_color: @canvas: @px: @py: @x: @y: @plot_canvas: @x: @y: @px: @py: @canvas: @child: @x1: @y1: @x2: @y2: @canvas: @child: @canvas: @child: @x1: @y1: @canvas: @child: @x1: @y1: @x2: @y2: @child: @selection: @child: @mode: @canvas: @child: @x1: @y1: @x2: @y2: @Returns: @canvas: @line: gtkextra-3.2.0/docs/reference/tmpl/gtksheet.sgml0000644000076400001440000004373112604172532016644 00000000000000 GtkSheet @sheet: the object which received the signal. @arg1: @arg2: @Returns: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @sheet: the object which received the signal. @arg1: @arg2: @Returns: @sheet: the object which received the signal. @event: @Returns: @sheet: the object which received the signal. @event: @Returns: @sheet: the object which received the signal. @event: @Returns: @sheet: the object which received the signal. @arg1: @arg2: @arg3: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @sheet: the object which received the signal. @arg1: @sheet: the object which received the signal. @arg1: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @arg2: @sheet: the object which received the signal. @arg1: @arg2: @arg3: @arg4: @Returns: @row0: @col0: @rowi: @coli: @GTK_SHEET_FOREGROUND: @GTK_SHEET_BACKGROUND: @GTK_SHEET_FONT: @GTK_SHEET_JUSTIFICATION: @GTK_SHEET_BORDER: @GTK_SHEET_BORDER_COLOR: @GTK_SHEET_IS_EDITABLE: @GTK_SHEET_IS_VISIBLE: @GTK_SHEET_NORMAL: @GTK_SHEET_ROW_SELECTED: @GTK_SHEET_COLUMN_SELECTED: @GTK_SHEET_RANGE_SELECTED: @GTK_SHEET_ENTRY_TYPE_DEFAULT: @GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY: @GTK_SHEET_ENTRY_TYPE_GTK_ENTRY: @GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW: @GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW: @GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON: @GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX: @GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY: @GTK_SHEET_ENTRY_TYPE_GTK_COMBO: @GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT: @GTK_SHEET_VERTICAL_JUSTIFICATION_TOP: @GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE: @GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM: @rows: @columns: @title: @Returns: @sheet: @rows: @columns: @title: @rows: @columns: @title: @Returns: @sheet: @rows: @columns: @title: @rows: @columns: @title: @entry_type: @Returns: @sheet: @rows: @columns: @title: @entry_type: @sheet: @entry_type: @sheet: @Returns: @sheet: @Returns: @sheet: @Returns: @sheet: @Returns: @sheet: @text: @sheet: @editable: @sheet: @handler: @Returns: @sheet: @handler: @sheet: @start_pos: @end_pos: @sheet: @Returns: @sheet: @row: @col: @attributes: @Returns: @sheet: @Returns: @sheet: @range: @sheet: @mode: @sheet: @Returns: @sheet: @Returns: @sheet: @autoresize: @sheet: @Returns: @sheet: @autoresize: @sheet: @autoresize: @sheet: @Returns: @sheet: @autoscroll: @sheet: @Returns: @sheet: @clip_text: @sheet: @Returns: @sheet: @justify: @sheet: @Returns: @sheet: @vjust: @sheet: @Returns: @sheet: @locked: @sheet: @title: @sheet: @description: @Returns: @sheet: @description: @sheet: @Returns: @sheet: @sheet: @sheet: @row: @column: @row_align: @col_align: @sheet: @color: @sheet: @color: @sheet: @Returns: @sheet: @show: @sheet: @Returns: @sheet: @adjustment: @sheet: @Returns: @sheet: @adjustment: @sheet: @Returns: @sheet: @clip_range: @sheet: @sheet: @row: @column: @sheet: @row: @column: @Returns: @sheet: @dir: @sheet: @state: @range: @Returns: @sheet: @row: @sheet: @range: @sheet: @sheet: @Returns: @sheet: @markup: @sheet: @Returns: @sheet: @text: @sheet: @nrows: @sheet: @row: @nrows: @sheet: @row: @nrows: @sheet: @Returns: @sheet: @sheet: @sheet: @row: @Returns: @sheet: @row: @title: @sheet: @width: @sheet: @row: @height: @sheet: @row: @Returns: @sheet: @row: @label: @sheet: @row: @justification: @sheet: @row: @Returns: @sheet: @row: @sensitive: @sheet: @sensitive: @sheet: @Returns: @sheet: @resizable: @sheet: @row: @Returns: @sheet: @row: @visible: @sheet: @row: @visible: @sheet: @visible: @sheet: @row: @Returns: @sheet: @row: @markup: @sheet: @row: @Returns: @sheet: @row: @text: @sheet: @row: @col: @justification: @text: @sheet: @row: @col: @text: @sheet: @row: @col: @Returns: @sheet: @row: @column: @sheet: @row: @column: @sheet: @row: @col: @Returns: @sheet: @row: @col: @Returns: @sheet: @row: @col: @markup: @sheet: @row: @col: @Returns: @sheet: @row: @col: @text: @sheet: @row: @column: @area: @Returns: @sheet: @window: @x: @y: @row: @column: @Returns: @sheet: @row: @col: @Returns: @sheet: @row: @col: @link: @sheet: @row: @col: @sheet: @range: @sheet: @range: @sheet: @urange: @color: @sheet: @urange: @color: @sheet: @urange: @just: @sheet: @urange: @editable: @sheet: @urange: @visible: @sheet: @urange: @mask: @width: @line_style: @sheet: @urange: @color: @sheet: @urange: @font_desc: @sheet: @child: @x: @y: @Returns: @sheet: @widget: @row: @col: @xoptions: @yoptions: @xpadding: @ypadding: @sheet: @widget: @row: @col: @sheet: @widget: @row: @col: @sheet: @widget: @x: @y: @sheet: @row: @col: @Returns: @sheet: @widget: @row: @col: gtkextra-3.2.0/docs/reference/tmpl/gtkplotflux.sgml0000644000076400001440000000426412604172532017407 00000000000000 GtkPlotFlux @Returns: @flux: @arrow_length: @arrow_width: @arrow_style: @flux: @arrow_length: @arrow_width: @arrow_style: @flux: @center: @flux: @Returns: @flux: @show: @flux: @scale_max: @flux: @size_max: @flux: @precision: @flux: @style: @flux: @prefix: @flux: @suffix: gtkextra-3.2.0/docs/reference/tmpl/gtkcheckitem.sgml0000644000076400001440000000114012604172532017454 00000000000000 GtkCheckItem @Returns: @label: @Returns: @check_item: @label: gtkextra-3.2.0/docs/reference/tmpl/gtkcolorcombo.sgml0000644000076400001440000000227312604172532017666 00000000000000 GtkColorCombo @colorcombo: the object which received the signal. @arg1: @arg2: @Returns: @nrows: @ncols: @colors: @Returns: @color_combo: @color_combo: @nrows: @ncols: @colors: @color_combo: @row: @col: @Returns: @color_combo: @color: @row: @col: @combo: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkcharsel.sgml0000644000076400001440000000115712604172532017151 00000000000000 GtkCharSelection @Returns: @charsel: @selection: @charsel: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkiconfilesel.sgml0000644000076400001440000000204512604172532020021 00000000000000 GtkIconFileSel @title: @Returns: @filesel: @title: @filesel: @show: @filesel: @path: @Returns: @filesel: @visible: @filesel: @filter: @filesel: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcanvasellipse.sgml0000644000076400001440000000145312604172532021257 00000000000000 GtkPlotCanvasEllipse @style: @width: @fg: @bg: @fill: @Returns: @ellipse: @style: @width: @fg: @bg: @fill: gtkextra-3.2.0/docs/reference/tmpl/gtkplotsurface.sgml0000644000076400001440000001235212604172532020056 00000000000000 GtkPlotSurface @t: @xyz: @p: @n: @level: @cut_level: @sublevel: @Returns: @function: @Returns: @surface: @function: @data: @color: @data: @color: @data: @foreground: @data: @background: @data: @visible: @data: @Returns: @data: @visible: @data: @Returns: @data: @x: @y: @z: @data: @ambient: @data: @use_gradient: @data: @use_amplitud: @data: @transparent: @data: @x: @y: @z: @dx: @dy: @dz: @nx: @ny: @data: @x: @y: @z: @dx: @dy: @dz: @nx: @ny: @data: @x: @Returns: @data: @y: @Returns: @data: @z: @Returns: @data: @dx: @Returns: @data: @dy: @Returns: @data: @dz: @Returns: @dataset: @nx: @Returns: @dataset: @ny: @Returns: @dataset: @nx: @ny: @Returns: @dataset: @Returns: @dataset: @Returns: @dataset: @Returns: @dataset: @nx: @dataset: @ny: @dataset: @Returns: @dataset: @Returns: @dataset: @xstep: @dataset: @ystep: @dataset: @Returns: @dataset: @Returns: @surface: @surface: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcandle.sgml0000644000076400001440000000062412604172532017653 00000000000000 GtkPlotCandle @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcanvasline.sgml0000644000076400001440000000153012604172532020545 00000000000000 GtkPlotCanvasLine @GTK_PLOT_CANVAS_ARROW_NONE: @GTK_PLOT_CANVAS_ARROW_ORIGIN: @GTK_PLOT_CANVAS_ARROW_END: @style: @width: @color: @arrow_mask: @Returns: @line: @style: @width: @color: @line: @style: @width: @length: @mask: gtkextra-3.2.0/docs/reference/tmpl/gtkextra-unused.sgml0000644000076400001440000000000012604172532020136 00000000000000gtkextra-3.2.0/docs/reference/tmpl/gtkdirtree.sgml0000644000076400001440000000110112604172532017153 00000000000000 GtkDirTree @scanned: @path: @Returns: @dir_tree: @path: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotpolar.sgml0000644000076400001440000000174312604172532017545 00000000000000 GtkPlotPolar @drawable: @Returns: @drawable: @width: @height: @Returns: @plot: @drawable: @plot: @drawable: @width: @height: @plot: @angle: @plot: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkbordercombo.sgml0000644000076400001440000000103112604172532020014 00000000000000 GtkBorderCombo @bordercombo: the object which received the signal. @arg1: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplot.sgml0000644000076400001440000004551612604172532016515 00000000000000 GtkPlot @plot: the object which received the signal. @arg1: @Returns: @plot: the object which received the signal. @arg1: @Returns: @plot: the object which received the signal. @plot: the object which received the signal. @arg1: @arg2: @Returns: @plot: the object which received the signal. @arg1: @arg2: @Returns: @plot: the object which received the signal. @arg1: @plot: @data: @x: @error: @Returns: @plot: @data: @x: @y: @error: @Returns: @plot: @data: @iter: @x: @y: @z: @a: @dx: @dy: @dz: @da: @label: @error: @GTK_PLOT_SCALE_LINEAR: @GTK_PLOT_SCALE_LOG10: @GTK_PLOT_SYMBOL_NONE: @GTK_PLOT_SYMBOL_SQUARE: @GTK_PLOT_SYMBOL_CIRCLE: @GTK_PLOT_SYMBOL_UP_TRIANGLE: @GTK_PLOT_SYMBOL_DOWN_TRIANGLE: @GTK_PLOT_SYMBOL_RIGHT_TRIANGLE: @GTK_PLOT_SYMBOL_LEFT_TRIANGLE: @GTK_PLOT_SYMBOL_DIAMOND: @GTK_PLOT_SYMBOL_PLUS: @GTK_PLOT_SYMBOL_CROSS: @GTK_PLOT_SYMBOL_STAR: @GTK_PLOT_SYMBOL_DOT: @GTK_PLOT_SYMBOL_IMPULSE: @GTK_PLOT_SYMBOL_EMPTY: @GTK_PLOT_SYMBOL_FILLED: @GTK_PLOT_SYMBOL_OPAQUE: @GTK_PLOT_BORDER_NONE: @GTK_PLOT_BORDER_LINE: @GTK_PLOT_BORDER_SHADOW: @GTK_PLOT_LINE_NONE: @GTK_PLOT_LINE_SOLID: @GTK_PLOT_LINE_DOTTED: @GTK_PLOT_LINE_DASHED: @GTK_PLOT_LINE_DOT_DASH: @GTK_PLOT_LINE_DOT_DOT_DASH: @GTK_PLOT_LINE_DOT_DASH_DASH: @GTK_PLOT_CONNECT_NONE: @GTK_PLOT_CONNECT_STRAIGHT: @GTK_PLOT_CONNECT_SPLINE: @GTK_PLOT_CONNECT_HV_STEP: @GTK_PLOT_CONNECT_VH_STEP: @GTK_PLOT_CONNECT_MIDDLE_STEP: @GTK_PLOT_LABEL_NONE: @GTK_PLOT_LABEL_IN: @GTK_PLOT_LABEL_OUT: @GTK_PLOT_ERROR_DIV_ZERO: @GTK_PLOT_ERROR_LOG_NEG: @GTK_PLOT_AXIS_X: @GTK_PLOT_AXIS_Y: @GTK_PLOT_AXIS_Z: @GTK_PLOT_AXIS_LEFT: @GTK_PLOT_AXIS_RIGHT: @GTK_PLOT_AXIS_TOP: @GTK_PLOT_AXIS_BOTTOM: @GTK_PLOT_LABEL_FLOAT: @GTK_PLOT_LABEL_EXP: @GTK_PLOT_LABEL_POW: @GTK_PLOT_TICKS_NONE: @GTK_PLOT_TICKS_IN: @GTK_PLOT_TICKS_OUT: @axis: @xmin: @xmax: @precision: @axis: @y: @Returns: @axis: @axis: @y: @Returns: @axis: @val: @precision: @style: @label: @drawable: @Returns: @drawable: @width: @height: @Returns: @plot: @drawable: @plot: @drawable: @width: @height: @plot: @drawable: @plot: @Returns: @plot: @pc: @plot: @pixmap: @plot: @transparent: @plot: @Returns: @plot: @x: @y: @plot: @width: @height: @plot: @Returns: @plot: @bg_color: @plot: @plot: @drawing_area: @plot: @x: @y: @plot: @width: @height: @plot: @magnification: @plot: @x: @y: @width: @height: @plot: @xx: @yy: @x: @y: @plot: @x: @y: @xx: @yy: @plot: @clip: @plot: @xmin: @xmax: @plot: @ymin: @ymax: @plot: @xmin: @xmax: @ymin: @ymax: @plot: @plot: @xmin: @xmax: @plot: @ymin: @ymax: @plot: @scale_type: @plot: @scale_type: @plot: @Returns: @plot: @Returns: @plot: @reflect: @plot: @reflect: @plot: @Returns: @plot: @Returns: @plot: @x: @y: @font: @height: @angle: @fg: @bg: @transparent: @justification: @text: @Returns: @plot: @text: @Returns: @text: @angle: @text_font: @text_height: @width: @height: @ascent: @descent: @text: @angle: @just: @font_name: @font_size: @x: @y: @width: @height: @text_attr: @font: @height: @angle: @fg: @bg: @transparent: @justification: @text: @text: @border: @border_space: @border_width: @shadow_width: @plot: @line: @x1: @y1: @x2: @y2: @plot: @text: @plot: @orientation: @major_step: @nminor: @plot: @orientation: @major_step: @plot: @orientation: @nminor: @plot: @orientation: @begin: @end: @plot: @orientation: @plot: @orientation: @min: @max: @step_after: @nminor_after: @scale_after: @pos: @plot: @orientation: @orientation: @Returns: @axis: @orientation: @plot: @axis: @Returns: @axis: @visible: @axis: @Returns: @axis: @title: @axis: @axis: @axis: @angle: @x: @y: @axis: @justification: @axis: @width: @color: @axis: @width: @color: @axis: @major_step: @nminor: @axis: @major_step: @axis: @nminor: @axis: @length: @axis: @width: @axis: @major_mask: @minor_mask: @axis: @begin: @end: @axis: @axis: @array: @axis: @min: @max: @step_after: @nminor_after: @scale_after: @pos: @axis: @axis: @labels_mask: @axis: @font: @height: @angle: @fg: @bg: @transparent: @justification: @axis: @font: @height: @angle: @fg: @bg: @transparent: @justification: @axis: @style: @precision: @axis: @offset: @axis: @Returns: @axis: @use: @axis: @text: @axis: @text: @axis: @Returns: @axis: @Returns: @axis: @axis: @xmin: @xmax: @precision: @axis: @y: @Returns: @axis: @x: @Returns: @axis: @val: @precision: @style: @label: @plot: @visible: @plot: @Returns: @plot: @visible: @plot: @Returns: @plot: @on_top: @plot: @Returns: @plot: @vmajor: @vminor: @hmajor: @hminor: @plot: @vmajor: @vminor: @hmajor: @hminor: @plot: @line_style: @width: @color: @plot: @line_style: @width: @color: @plot: @style: @width: @color: @plot: @line_style: @width: @color: @plot: @line_style: @width: @color: @plot: @line_style: @width: @color: @plot: @plot: @plot: @legends_border: @shadow_width: @plot: @x: @y: @plot: @x: @y: @plot: @Returns: @plot: @font: @height: @foreground: @background: @plot: @line: @plot: @data: @plot: @dataset: @Returns: @plot: @function: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotps.sgml0000644000076400001440000000217512604172532017052 00000000000000 GtkPlotPS @psname: @orientation: @epsflag: @page_size: @scalex: @scaley: @Returns: @psname: @orientation: @epsflag: @units: @width: @height: @scalex: @scaley: @Returns: @ps: @psname: @orientation: @epsflag: @page_size: @scalex: @scaley: @ps: @psname: @orientation: @epsflag: @units: @width: @height: @scalex: @scaley: @ps: @units: @width: @height: @ps: @scalex: @scaley: gtkextra-3.2.0/docs/reference/tmpl/gtkdatatextview.sgml0000644000076400001440000000245712604172532020245 00000000000000 GtkDataTextView @Returns: @data_text_view: @Returns: @data_text_view: @Returns: @data_text_view: @Returns: @data_text_view: @description: @data_text_view: @max_length: @data_text_view: @max_length_bytes: gtkextra-3.2.0/docs/reference/tmpl/gtkplotpc.sgml0000644000076400001440000000564212604172532017034 00000000000000 GtkPlotPC @GTK_PLOT_LETTER: @GTK_PLOT_LEGAL: @GTK_PLOT_A4: @GTK_PLOT_EXECUTIVE: @GTK_PLOT_CUSTOM: @GTK_PLOT_PORTRAIT: @GTK_PLOT_LANDSCAPE: @GTK_PLOT_PSPOINTS: @GTK_PLOT_MM: @GTK_PLOT_CM: @GTK_PLOT_INCHES: @Returns: @pc: @Returns: @pc: @pc: @w: @h: @pc: @pc: @pc: @area: @pc: @x: @y: @mask: @pc: @color: @pc: @line_width: @line_style: @cap_style: @join_style: @pc: @offset_: @values: @num_values: @pc: @x: @y: @pc: @x1: @y1: @x2: @y2: @pc: @points: @numpoints: @pc: @filled: @x: @y: @width: @height: @pc: @filled: @points: @numpoints: @pc: @filled: @x: @y: @width: @height: @pc: @filled: @x: @y: @size: @pc: @psfont: @height: @pc: @x: @y: @angle: @fg: @bg: @transparent: @border: @border_space: @border_width: @shadow_width: @font: @height: @just: @text: @pc: @pixmap: @mask: @xsrc: @ysrc: @xdest: @ydest: @width: @height: @scale_x: @scale_y: gtkextra-3.2.0/docs/reference/tmpl/gtkplotarray.sgml0000644000076400001440000000677312604172532017556 00000000000000 GtkPlotArray @name: @array: @size: @type: @own_data: @Returns: @array: @data_array: @size: @type: @array: @label: @array: @desc: @array: @scale: @array: @required: @array: @independent: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @array: @Returns: @set: @array: @set: @array: @set: @name: @Returns: @set: gtkextra-3.2.0/docs/reference/tmpl/gtkdataformat.sgml0000644000076400001440000000072112604172532017646 00000000000000 GtkDataFormat @str: @dataformat: @Returns: @str: @dataformat: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcanvasplot.sgml0000644000076400001440000000223512604172532020577 00000000000000 GtkPlotCanvasPlot @GTK_PLOT_CANVAS_PLOT_SELECT_POINT: @GTK_PLOT_CANVAS_PLOT_DND_POINT: @GTK_PLOT_CANVAS_PLOT_OUT: @GTK_PLOT_CANVAS_PLOT_IN_PLOT: @GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: @GTK_PLOT_CANVAS_PLOT_IN_TITLE: @GTK_PLOT_CANVAS_PLOT_IN_AXIS: @GTK_PLOT_CANVAS_PLOT_IN_DATA: @GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: @GTK_PLOT_CANVAS_PLOT_IN_MARKER: @plot: @Returns: @plot: @Returns: @plot: @flags: @plot: @flags: gtkextra-3.2.0/docs/reference/tmpl/gtkfontcombo.sgml0000644000076400001440000000223412604172532017513 00000000000000 GtkFontCombo @fontcombo: the object which received the signal. @Returns: @font_combo: @family: @bold: @italic: @height: @font_combo: @n: @bold: @italic: @height: @font_combo: @Returns: @font_combo: @Returns: @font_combo: @Returns: @font_combo: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkdataentry.sgml0000644000076400001440000000337412604172532017526 00000000000000 GtkDataEntry @Returns: @data_entry: @Returns: @data_entry: @description: @data_entry: @Returns: @data_entry: @data_type: @data_entry: @Returns: @data_entry: @data_format: @data_entry: @Returns: @data_entry: @text: @data_entry: @Returns: @data_entry: @max_length_bytes: gtkextra-3.2.0/docs/reference/tmpl/gtkplotcairo.sgml0000644000076400001440000000130012604172532017512 00000000000000 GtkPlotCairo @cairo: @Returns: @drawable: @Returns: @pc: @cairo: @context: @pc: @cairo: gtkextra-3.2.0/docs/reference/tmpl/gtkplotdtriangle.sgml0000644000076400001440000000056012604172532020375 00000000000000 GtkPlotDTriangle @Param1: @Param2: @Param3: @Param4: gtkextra-3.2.0/docs/reference/tmpl/gtkplotbox.sgml0000644000076400001440000000107112604172532017212 00000000000000 GtkPlotBox @orientation: @Returns: @box: @orientation: gtkextra-3.2.0/docs/reference/tmpl/gtkplotgdk.sgml0000644000076400001440000000111312604172532017164 00000000000000 GtkPlotGdk @widget: @Returns: @pc: @widget: @gdk: @drawable: gtkextra-3.2.0/docs/reference/tmpl/gtkextrafeatures.sgml0000644000076400001440000000204612604172532020410 00000000000000 GtkExtra Versioning @major: @minor: @micro: @required_major: @required_minor: @required_micro: @Returns: gtkextra-3.2.0/docs/reference/tmpl/gtkplotpixmap.sgml0000644000076400001440000000151612604172532017724 00000000000000 GtkPlotPixmap @pixmap: @mask: @Returns: @data: @pixmap: @mask: @pixmap: @Returns: @pixmap: @Returns: gtkextra-3.2.0/docs/reference/gtkextra-overrides.txt0000644000076400001440000000000012603754234017542 00000000000000gtkextra-3.2.0/docs/reference/pics/0000755000076400001440000000000012604172532014174 500000000000000gtkextra-3.2.0/docs/reference/pics/gtkcolorcombo.jpg0000644000076400001440000003461212603754176017501 00000000000000JFIFHHCreated with The GIMPC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222 "V 1!A"46DUau2QRSTVq#$357CWdsBctbfgr/ 1AQ!S"2Baqё# ?Z-}EܿVSğDoעm҃_=qϦrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]y;Ѽɾ v~<Ռ1' >}txF"n_Przk=$<\MP~W?@wjo_WMˇE;Ѽɾ Qm.OUe=IHOv]z&(?+lrho.O]dT@Lp v~<՚jeL?,-ߺC7k\Dwۦ~^b+휳sz{<&+kh&PHΡCKe CI-~@[Z[YdNT+L;1RJQQNM~<Ϙ(:ɐ[wלP5qn=t8T.+f-uqUtO,NDL6Dt[*ӗcOES c`ߓd)ɯgb"^>>>;νdox"4*@]DuLsQnɺJ6n U>QL J@l`&♟1P5qn=z=?rϏϿ*U[l3" (C@X"!G)Dda X9dsm/Iԍ2n ١^PݧS_<Ϙ{g^2snzF";m?gWtTٚxg-&æ$: RE.iQDQBQ`.P8( f|Qb+휳sz8&@{nm/N1f HM-NC1ɔSG/v@,0A(Muzg"dla( 05LA b^@&♟1F";m?gGgYuͫF&y1;νd7k\Dwۦ~]wjѵyɯgg#W9gqG׶Lۼ^jӓ_LϘE #Z音֐% r5GeA +uy39{V礁6~I;tӓ_<ϘŮ(:ɐ[wלP5qn=uݫF&♟1{_/l[g^2snzWNM~3>c97k\Dwۦ~^b+휳szWNM~>c9w{dͻ(oָL+]F\s|seܓNM~3>c9"^>>>;νdԭ:#p~nِ͞6I7$ιr30Yy2&Ͱ#»nţ}yɛ.S_LϘ>(oָLW9g|p)0|V9NՓ - t ^B80 @BjjD$L[6LLALӸs95Qu =6؛R O-\@/ 1ܬ-GHt2rb6a LN@M{0X͡KdS s "pjr+JLob.^l\2ۂf)DPP9G+xv1U&mĶ yȉ@.QPܣ;8h)Uߋ,p]e֣ҕ$!l8@ s,!)V]܋IEpRtTrDK4@k }:s8*K Ҧ`Wcţ,Z0_M *%reDnXd d*IB|լ+Qt&b?&(e9d7<!:Ə/N-iEupMS*<"##9#>-ye?>#YFUpW+.:)`@ ˦ Q0MZrSP| sPq;m;'a)Ϸ|Z8}IK9PEDJ!Js>yL몗8qvԎ1;>ud%u&22yţ,@lNQo]ET*˷L*@p!@ /( sAH,S"*p1Q)8D b{JaFwkMEU5[xjH gٽ"*sHDNSF^@ iѴꗋGYO:-ye?>iѴ~KEx 2O۪ u1nk}EXU2m̙J' `@9>z6=Rh)Tx[ [.ݽ#Yt(ܝB@;ƀ|(o{ƯE}J*bZ̸Sv(*| 7|m>z[Ѹl_FҮmF{E}J(n=*묠&|m>z[Ѹl_FҮmZJ͕9rr CH0 !h/qW]eؾǥ]uhY8(gO]E˫SB*j&H!JXf<5-QutȲbQ2J r(!B<-zUYGh/qW]eK;1c>QNqO*)!2Vͱ[Kc7j\2Py7!y9 \(sj[Ѹl_FҮAk`e6Nf!HsB%Mϐ0ADk# K\n6gkeΦСf 0 n=*묣[ѸdפKfc5jv3\T w=dQHSSXa @"#y[b5uo>)^gEzh߉W @)) ܀@@W !!@t]z[ u+U;\p+vΔ0 iA # nq5X}Z( (((( (((G0m&g6O~1c|yѳ^sy;*G(ٱPh&Bm)Jrr@wrDѯgϊpǙhv?J]ZÉ^̢Iݓ0đ%zˉ/]{a/˛7Es+"}rl1*Qml(p&P$;#CoGGP$YG pp+u;$tzE}ȝ:=YJf7EG9tvGEw`@tr1OI)H DfDu6li}LIm>K~w}ZWnv艦s@2L皵W\YC!"4DPnĄ1'>\yLc~NH _Fw'dCoGGP˭- AQv:>NXoG>/mo"vH܇QPQla$'[f*@c &HF$Gx5X}Z}ȝ:=l֛p&4X: [1#;(E"qsqoG0-PtR'w?y^ޏ5E"qsqoG0-PtR'w?y^ޏ5E"qsqoG0-PtR]\N CߓygE2b'W<#δh *q?{֝m#δh *q?{֝m#δh((%q!wjnn4eϑۃDcп_]3ys_(Ӆgk[cmٲg0cL&'tRx"pjmq.|D0gXMklg. kdj+wte7nnL`A29rq9_ +b&ܕn!T7\.zZei˟!D011)3+]&~Ѯ}<܉ghfG$]-]E ID&3LHS+KWclB`bc|R]L$ޒ|g. kdjrr[e9^[ƺ^[@M63 1B}[? ,mK^KDžROi7*>x"pjmq.|D>3_wto~FF?\kC-vk1ٷZ49IKr`R yEs(O6\ &\UkWt?q\#Un<H7m*+זּuYn܎sQR pVQ?V{JQ{vHj۷((9wh :eBuKw-ѵZPu6AP&l&d \^-NLb^.Jt˃҄Z탫6vwfV]S=®`.Cu"܈t!%3M–]-G1G6m%Ha")br Hr k9PMIv~^{촠QYocvPQs\gA 3%N{yyWIeqrjk]i˟#HvHU[ҜcԽXݾZތl݂"oǫMƞ×>Cu&7u+ͻW fFsdQ,Ą6k\.X&]9ILiHWFx"pjmq.|D[iOŦs)mѦf]2tN`%d8'Tbrm![zPEyۍ#""[\NsQB@qI5~şypl(S.l%I^ݾ2yEs(O6\ &T!:QOLvmkZcۉ^4U{S\ o1Dj"剁ͻW fFsdQ,Ą]6,7UebTUrs+b(T@$)q祫QƞlM⯏*eИxw-2x IBrL|DLDWOHMH۲C3Ak dpr\ a.IH&3LHTOi[ͻW fFsdQ,Ą^cyrj|E0n<b\v68͗>B`bc|Rl؃vΔS+}Lθ o j12)9E1*aX@$J04ypl(S.l%KŷmYX\Js0(0& bx"pjmq.|DIt-T%t9/g^[&\GN4 11_$n١KaܤPfɜY0 ]N˅' UWw خ]-2ɜY 4Ņ N7]OX=-]4eϐh.?Q\zՏ|<螹? {E7 _w)8bSĊ&6\-[cee͓9Di9w"^}{n3tܠFrj@0` L=&~Kܶ8"KE1u)$Q lbP] kpxD9',NGO;(N;l2P =\'_Gh uh :eBuo~ɱD)H2j3 yumP']YBz嘹\9]B(he@M_WcAvU $Q3&)! !Z˥'_ܘEX>r^#vj r*hA9GǟIBLKL:vvT=' R6Pʊr' <+ 7j.e&1r 3 d$URVzD0j[oۦ_bSV"{Úk+pݰ=* "k}A,f9&'w%#q$*]=mtnS֎eՏﯩ0V?I5įѮ}qk}݋+W)8OhAכw خ]-2ɜY 5j`3d":k_kNXIVݩ߼miel.l.Qpb%n9 m5 V 2+c8gRTǝRom5.1Ѯ}6\-[cee͓9DjAgESķ#C.m,$ޒLg. kdj68UzbdRr+qciU°H`in{٫6Q\3K1!1;n3c?q\#UQu[mW&E'(1R6P +@&6\-[cee͓9Dhd¦T/'i|/zI-t"N]ԶX?6!*N4\fʠv#LqѮ}WX۸^pjmo6LHLN餾/.xtaطFw'&Ygǭg M~FF;\JZ4HKy&PF',L 8m/b[5t7˛&rf$&'t2lKcW*£?}}$>o_cч԰khC\CMBEaZr-d))-0;BS.RP+-5~_ݏM_Wc8QٮڲNSs>vp<9LZM_WcWU*$^Ed (x#ݮzZzV>7ִYvTvɪS#)7KI 1!OX=-]4eϐhmli] =b[+`/&O*5S?;kVɈ6,7U* E1u*` QD`LWBL}*򸾹mMiye!\yEs(O6\ &J^o3}sIu3'O}Yvc[ Xّ%Nc(bB7\.zZei˟!D011+9-L:|~FFWNܧ)Rv| PꛆsddDVrs;b(R !0&{zI^{2Zm.q=2܊Zm.YЯ7\.zZei˟!D011*oFY?q\#UzzUpwТs|0{gPns#r9]UJP( bCu[n<b\v68͗>B`bc|Uf(TL=* =_Oȝ9OEtP~ygPns#r9]EJP( bCu\U>%ZL=*[-syEs(O6\ &T=!:QOg. kdjv;XtB..1>+U* E1u*` QD`LyEs(O6\ &J2zJѮ}5ƹe1j1)qsӤԍ%>U4M7Rn'%c4ą&H~zI'Zz׷oNЮzw[1dQEc$(((96kfS.lݸ,ĄO6nF\v77Wy`bc|UWnW PElʨM.%s #2/ɭzS.n\:Vl'B19b`in{٫6Q\3K1!1;pԮlȊQncq1]E @D&yEs(O6\ &V#.ɺ,ܵA 峢NV$*VPa( bo"zUOBG{q[27#TE$7W;<-=̷ދͻW fFsdQ,ĄT&Fǂ,W GyQ4L Lo^Gt ] :x~$oB_&S3:HE1)V,L 5m/b[5t7˛&rf$&'tc Z-Pns!rP.L (1!7\.zZei˟!D011+&Vӎy&F_痭~7U53#\یCMBV,L n#%TzLOzjvwf`Trs+b(T@$+U슭Njk_c^FjP~}ypl(S.l%U(͟x"pjmq.|D1(~Nȶgο4olwOo7MTm!ͤT {ͻW fFsdQ,Ą]6,7U* E1u*` QD`LyEs(O6\ &Q:-·ܱqo%go-Z:)OW_l鼼[7(89Q6P +D~DtQom 򠫔[܎sQB@1!:Km[/o6\-[cee͓9DjCgE}yEs(O6\ &H|gܾ4#u5|j,%7GBj,>U:02 9E1*aX@$J04ypl(S.l%I {&=Y6X[)7c uRL A1bB7\.zZei˟!D011* jVcD^,xZtiꑷcW?f&Nm3"剁8^}CG2fI2rqPLiHVЮzw6^uӽj +!EPQ@QEn,MZ5ML۸_ݭ[c}Lgvj痭~WCw"qԤye)Ӷ3z5ϲ5QNᩜٝ\Nbj"ĉb`in{٫6Q\3K1!1;Ǜt.Jk&OxVS*%MfA1*a\$fՓ]KQo6,ˮPix71Ѯ}6\-[cee͓9DkSCyb*MuVGr ~-뮿FofX*ahx\A> N _]؎PprmP6P +D6\-[cee͓9Dkk݃*߷%"٩Khz3zJxnJ|E`:;r2 9E1*aX@$J05ʲ+Ii4g +c5'ٖ8\A>WL7w خ]-2ɜY 5A 峢6D)Gg ~o]uвzJ1Ѯ}NV$*VPa(+WKll}Lg(bBbwMS25(6iUwW&W~&cIVb?-ں)OWfnWwyI. Tm!T "P [eW(4Y2 =vͻW fFsdQ,ĄCFV/3׾._֟I3^~FFVޢM o1Dg)EQNw خ]-2ɜY 52ɹNd'8ݟ+7{bS>!VĮYCuF&"`kkjl ۷zHkSeW^ݽ;֭ (QEQP%zoF̟Wu?5̟Wtl%zoO=BD-d6+ܬncnA)&(圡?_-LrҞ+i%kپ.‚Zy0[2 C0(( bCulUmm6I둲% F(@Af9/ޒaiU;/$~u{U1{E2ksJ#يB`bc|V:>WS =du];J(ic9A̅C0(PĆܼx"pjmq.|Dq~5QsS\f b_"zUO7B,Q dnG9S8 Hn:_I%ZPɱ&rk˲SIe+KWclB`bc|Tx>5sQ5J7vlaKը$ P53\9˪8 Hn[^ '+#UC_ڛ/Bޑ )E\rafO+:ַ\^QP%zoF̟Wurj*?MٓJΟ{QE(8+:mw[{yH8A#!SLg ~&[] T]Sec=ažKkc{ K{7nPprHciU$g`I'c&&d.DS ڢ\y|37wHv:gLDDs?[;jU47w خ]-2ɜY 5/򽏢U|37wžKk++hiȢ-*si*E¹$H0;rn{٫6Q\3K1!1; Mǥqo~ڕlD4TpN%էl=|z-n3tܠFrj@0` L Mǥqo~ƹI# ƭ=cypl(S.l%Z;&)͟U Mǥ27Z̮ImqԑZ^-nG(89QCIR"@ Vw خ]-2ɜY 5gn=.ﭣ|37w;LkQZKؓvS*5pٛdriciU¸H`wgn=.ﭣ|37wվo6\-[cee͓9Dk[&+ŗU Mǥqo~ڪ.V cth>F|f~~sTŃi_LO>i`ywfXwv_Ic_y/} &` &o9jg^BիW/\wׯzFQONÁ(>8gysL0L07{w}W_y䤜Ot<8õwoE-EP޽lv5m36pI,X{w[f~7+ \z tDފO6lmE~M,R@*ծ?τp{u؛WF=\(KGaUNYW,l|5gwиF` &`Nxjj?=Sιz'>k OWze٫Z~eYS-3>[ܣEn|•{>_@B# 0L0&*P:s#oʉwS]_kcWrK/ԱsF{3ԥaUXݻՎ[@0Jo _׿.'?T e^z+ߕNΟBfY9HˮݮkJNK\E_y{؅(?4P@UbRX̩Cneٍ\L0K?p.\x…1<~]ȩ ޫ\Zzv2aueީUa hB&` &XD믿v+P_|+oo޼ wJֱ=p SvC;* ~?Vr˗/_~=p9J*ፕ[Y-<*346%-t{Zau| lƇh[ q;.ov] ΰ;igׯ[+m{5>P+~BF` &`NNNNr;z B # 0L0&S =ٳ>J+~{Q`>\ VKxf@U .}pp}{?]y޽G,"LJ5 4p9^E(,{'|zxcVgvLLIsc 0%˲r'am uF'>a*`G2 %t2q7KØNpO?y~wϩ$wIX@?v={.'[~S]INk_pbjs}&)T^f>uQGR1D g?kk-7޽{ssٳw3x6GR(z\y ƨ#5ܹܰs;$Dv l+o/o,#rc8[9Qq|=[7ay \yvh'k.'~.Ewf0OG)`I_ݹsgp|Tg_b9_jX=`Q;ځ0ީXŻep]{۴>#[o/})*5 uhl|+~5gsهl:Jx7.^c3Bo񆟾xbJ7v̙~x>iTnm\}pMXRJsovݾ}㺧w2Z[gk9wŖ7i|YZ{=p\yfJWua:ۿF퍿\N?C Eu8?:p,<=:Ciq ۠^-v7q[pjhmدkz}(!O'Zn<ɾθ6E-WZNܸqPaJ*m u4p_*\ ܋/oM[^;𷕨a~4pwrrr<]rQy@ 7Ʒa:Us<4p| "?~wOOO1 3jxa6X4}]vf?7uF>qd6`M ˗U@gm2o qxxh*`M Wsi|l @bhCbXVߧPubʕ+׈,6͋׾Y.\k!H(Is . QDEQDe0ȷ^O$ 14pH( \E&;QDEQDE2v+iNQDEQD]FkeEQDEQD-#jGoDEQDEQˈڅ8"("(Q0GQDEQDe4jF"("(FQDEQDEѨ]8"("(Q=pDEQDEQFvOi$ 14pH @bhsf}Uo39/$EQDEQ֢zɜsEQl<ϏZf]Vpl^_V9`ȲlٴSjyy>dnT]ɐkh("("( bH @bhC9eY6w =8USjT%eYT~L$_%d4wI*:Gqzl>x OeEQrb}CcT%y*\]hW2 ٣UU+&:2G#^(\W%ɟA&Yj}n2| {KjnmiO6Kyfp, K'9R'=#ߥHA?+v$~vnzSI#s<ՙJUzBϧ4;M^H+N 9YIt]N}TWb.UfXK3uSKxZP{Q{`wwKx*1&00LuE]81 -xC2$$VbTC¨x ^p16Qg\ACg4ll~vT1!k+J҅1 oAE>U_gj݅̚ەA ɥ~e7pw,L\#Nw蓔g◱ܴ$\bv \܂yG|pQ]^l~CTUk  kOGY&.&g^8SO~ULe٦$j ڈbb/?x4Un3j鍷έB]6%8X@dH. އ8X@h8(8$ 1CFXDEQDEQD{mGGG-Vz}xx8Um{f2O٪y9P3+k"("(|T/$ 14pH @b|全,Eϲ,&!DUωMUX=gpxi1* /2"k,]Ҙi568MPb88gXTާ*l1$ܴbr\|SNTeYV.׸L||1nǦܑ)_.Ua NZWEw7t6[cZLvXd$UU8K<2D}]׈z*-rߙ{B5cւ|%?REOXHi]-Xfgs*;Q[P+.cn,,fV-`xao`xοk,k lGҮ;ũuoƴa+6%UCcܡ>UX֬V'/s}"2zIɳHvjo|/ty ’iJr$j5^ C jо2/j_S _hMmWG . p=mObO0FOU;d{nנAc}dN~e-^'t]eBFa4F*~'288aUadxU#ה fZ FZWhMGɇ߄}j0M|H}zp1ҚTBI488A^vcpkTkL$d=.& vȮwNepT$UiŜeޕ HPDэR]c-!QxՎR h(c<%Gq0*P9fsQ1xj^vuPRۼ=,P @bh3cEQDEQDOl<ϏZf]VpB]lͦeUwG.1kUd RiUr³"blnQ `c&gmfHMkP5Fɋ Kr^#mGG*|(<6WO;ѧhܵ·ejA>F82HJrST˨=;g#ؽ.w4´Ud+!Z-AҸ ʣ$q6oLjLSasP#;>3xRvC#K=qxM?!|޲|}ٍb&C-~wZ.oN3Ud8 8$f5pǪ'("("ny̺ZT򳽛ͦeU<<6PEeͦeU)k~Qf M b))Y{bTs \{ϔp+׼"-=z ]US >iNKƭ&*JSa>㎯YꖜqRH S1-A q LU%5 G }wik7} U{Q5֎;c\ijOiAI=Ui;U͍!p7VZclN֎b$+E;Eo+Qa` UFڮL7p@>O:xN0 &9 ʍwRڒ"QnٛmU?8&|7%j O IiJb_4,ǟ2x9>\v3ueV`e[ZMXըb_FhLNˏ-Ga Jo07ΛZ# LUZc"QMH f.fj|/83{HcbB~jBP/c㞊0%nT68Ƚ>}cc؋8̅@RGlTN%:2wd!ԙT (POU^٨eolT}LE]WBeTXQPdwbm FcN): Ч4%%P8jVFw0-ru5JUÎ~(fڷ(yZ!B17Cް(FzCT%02gQ"Hw0qb"j.m (fڷ(yZr|e1j%jcgLsC,L'*/񧶲@tucammGnFQ%X#jl\ըC/Ӯj7ҵRk|E5DMU9 .f 6;$Q"{QVЩKZыx&LrjKULC 6_Ոbֳ(t4[[,دU16Q<VT=aX`-/ѾZvz^ac.'+˻OTY^ϕ \eK)Z21E&3.+o^3U DM]N_Sr Qtc?h/Nd=U YvTe;&o9vէ{upQ%!0\Fy/(^Z>Jrgo6Nڌ.8jz_$5eK7҆׈`Dc)-ٻŠX`18 8$f5pǪ'("("ߞn+w瘪(cL %Usp$j꙳EQa[{QO L2U.BŸlkx_$nÈiAF"B#ӟB< cد$ 14pr "("(Wm<ϏZf]VpB[ͦeU<~#pW\rJ\ү;fףk4*@bhC8ǫ`]|=8`<=$ 14pHL?fbݻw^x k4p'.dj|f odmt={]]@k 8L'?9w 6`.F;8Lx%hG 9Xh01k &0bmiƜΝ;y'YVnE 9=3oܹs᏾ry}a&^]4p0ܹ>ʝ;wy;wgEd <18'^c4p0NC߿s򗿴pY| e,ϟ?_s;#p psMSFeJx7_Do &>_9w…rb^9l7z.\8xh0ar?۷.x#p.]Kwҥja6έ[.]t- /p֭R}E] [8x] :7o Ꮝ]͛cKصbWEeΖ%B ӜqF#޸qR@)Ieab [n{.Ӡ _ak &#Xh01k &0bmƜBv4pSюG?zbjԧogmtA]o}k*qڵ-.hӳ>l FGC8$ 14pH @bh_b|:ٳJ;; vS龸 14pHL;:: t~0w_%:IENDB`gtkextra-3.2.0/docs/reference/pics/gtkfilelist.jpg0000644000076400001440000011643112603754176017156 00000000000000JFIFHHCreated with The GIMPC  &/"$&81;:7165=EXK=ATB56MiNT[^cdc]!t5Hs]!t5Hs]!t5Hs]tghvghvLa(N*J*g6ƺ,z3o&3^hs]IwIܘc=9jѕs5J^ ``XGGC=:`ڭf4U<4'WN3,;esB1eViUzj#é_ʽ**62ؠ^ͤ:|}'l8A'@s/?7xfpj#6n>~YheVhڋy DN-1fju[Y,7#'7'vr؂+b@bBK\ H{L[Uj-uj3jg5kDs97'v9=a:C69}Es2f n#(N*EV[U:ub;}+Es.i>Yg27[`sa]W": w68nuGYA@0FQ!۔8*p d' Djee7î**EMܞ"jϩOƬϣ%_^Tɫ*_/_}^5g3͇K_Ñ`m=%e~1OG]J@`C=:`ڭ[QmG6s&^]s}?;e{ȎuxVi0i.UsAgQ E^ʈD*U>]sy%ΣLۥcl{K:W+۟\rޏ"^)w3`F[5nW7.vu]Acȣc[# Ե#QDthj%/^)w3bQktӱZVuͫr{cެGȑ+UW dF]r9\^5_gQ\5#,bvfۓ֓f[r+̼RfHY(BDDA\kQlb[KQ e+(OgQbvAt7PSc*$EXƪ82K?a|'[.vu]N񙘮j\{kʍolG9eb{ck]ؿ9;ڣjb\HYX7E25ZeaFy%Σ>2'Qg:"9=X$nި_̼Rfx?W; Xߣ%rauȒ#5 s6I7aHwo$aqv;G|%"G5TTT/^)w3gl;:.'hϓjkQȩ#_'es6#r7+l;:.'hϓ|nc([B12LT_̼RfçbmL_&UJ1_&_ӱZVuͫUWƮj}kFW]8^Qs+ǵW1H+ TH[c6DDB+Zj2}GW"" z52CeVkhOIvó{;qFsX%F#R5ቑ+z#r7 /O귒]8D`"0D6ո"0Gv"0D`KaA!LF"?C6.djj6Klremr5=,ѢĹoPdj9ʒLG̍fVW3Wmə}5Ku{!-vtJ9:\,.V+FBHk~߈ۻIɅ"HHoN=7, jo$aqv;G|J94񌉌wo?o$aqv;G1c6͑u %FL+mmbq\\o$aqv;G$Jղ{&Ugԟ!ֺc52:|U(|grX:v+Z=cV&9ls-cL$**agQ9hGZ"VUD|.mȨC6DDB+Zj2ZҞ~㣫tW=[Z kUƥ,emhj%7]8|{3Q Xz5Xڷ݁h\V9Q? 쬍m2ֵ/O귒]8|>C#~]D.ɕvFhD{ecѲ9r}25R5V5LGdj&mY\fee7#U[y%Σ>2(ETA:\䑮R%sW*n4t*־VrK-vtJ9:\,.V+ީ؜VH+owi90Ik(Z1$}ml;:.'hԷ V1Tlmk(kvZ䤫.l9gQ%zTL%2Jd)S$IL%2Jd)S$IL%2Jd)S$IL%2Jd)S$IL%2Jd)S$IL%2Jd)Q˶GxdȱV*TR}M_MJ*T+ l+}===================V2;]34tRdWB|"= Y# '0N`=R s '0NB1ur dQzyzY=gzY=gzY=gzY=gzY=bĎT{H[ac-RKe-RKe-Q[vó6FG"XE h4BA h4F!B4 7MDi4h4F#MDi4h4F#MDi4h5*TWEZTQ%ϹU]$wv֧sյeXYo|./?;uJ=M\iVԩR|DaKF:DK/RK/RK/RK/RK/RK/RK/RK/RK$Y_y*Bd+!Y VB$uDaKo#UUOa7CDi4h4F#MDi4h4F#MDi4h4F#MDi4h4F#MDMm!#F(Q1Db!IvóAUem??/椎4m;9cZWԨ]%F;/RK/RK/RK/RK/RK/RK/RK/RK/e|}~EQDD*Tl; 20# 20# 20# 20# 20# 20# 20# 20# 20#{f#4Fh3Df#4Fh3Df#4Chhhhhca#4FhTrKWDb#F(Q1Db#F(6$Zt VEFsld 1Db#F(Q1Db!bڕ*TRJ*TS*YUʈٮ26*TRJ*TR[ί_UJ*TRJ*TVQQX#VƵ4RJ*TRJ:N:*TRJ*TQcJ=,V%k5J*TRJ*T.vJ̑+z, :Π, :Π, :Π, :Π, :Π, :Π, :Π, :Π, :ΠdO&)1ILRb&)1ILRb&)1ILRb&)1ILRb&"jlJ^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^/i{K^G":=lbuݮDk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF#]Dk5tF*cS%Q!P 1@2`0A?sAz|I.6MI)؎_7{rnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\rs pV8lS^p#;ypW E^_Kٳf͛7ҹ7C$ !1@P"0Q`p?"n{DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDOw_ǑB';֯ӮoxL'%=.c=_Mc-s|m\*wJRm@9̧TDDGZp- E:#֧4RX^"Hpjii$P*B=hPaZYQ5Miތ:&u KA+.#& q7QM=WȨE&Z %&ik#l Ja5ƞ T{NutTٮh,v kJ65iԅ1 18*&&?ĺ@6}  .|jѩLMgf\>k@N4UEƀ!M&9jB)N\L&ҁ  (4hl fփLlZfg6! N(g m lc K0KLx)P Ŧ1iحB!⑬Qb  ƙuANkXtPhe"@kR@jLےev2~2;VeP]­;VeVeDߌߌ;W>.{C/p_}Iw yeΦ*Aw ʄ]«~2ߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌߌ9PW&:IQ"SiN{aӧS>K(:D`*1:9މst0}M[T# D3lN3 LzC9DOPFlS2 nAMJ' V#|n0Osa;< .):b3]كR.?P1tР "D>S|ԙݵN4+Hq)\JpW>|7UU(F S B1dTdtQ|MU+ЮB%8+N S%8+N U:p|tRl; #HW2ħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)\JpWħq)4Rgv< psF8#042x!$4\cVmьcքb` :vF02f0ɻ?skZpV+\ kZpV+\ 쒽@jLڼGQ sԘɅz(7B3۹}J ЮZ ͮ3}Jt\TXb#S=S?P Rq97b͂Ѡ`i nVGi+rEB +PFGfܒ@jLڼGQiaI潡i8=mWރEfO2m611GvALx 6ac v}ےWIW6ة0PGZ@;Il ӓvozRgv<#3C?I]cWWR1|}GԜb+D9N.h*Mi1"{1L l:8v&lx*! :?zRgv<&{afiءk4PChT * sU~NR[t݊.LO +ӳ!τ]IHVr!6iC[ Nt"b`dsd*S:F&F.t"d<\ h/HGEGQc.=i|>^נ_5&wm^#(rfI89M֘.<) 0Js 65gP3g5Q0]5T&.0Fi2Jv&'FVHkCƵtD6SD4 mPM& sU#@2cfꂄARЃK@b4W+ yV3 m3xo9-S{af1Sҝ MLM C"s[ b-NPC醲5)HE E%;Il ӓv~%QY^נ_5&wm^#(rfF}pѽuz.5 cNL|P9)NR[t݊K6 SFF`rd=AMj4jU)TӱCLHDƀ#R֦Ɲ 6gzRgv<+vd|4*ڡ*PfW鍁4M֤Ѡ6E3 )WVD(844~Nl \Qd+kPfxy@TiRꤶɻ2&ȃXt 4f<ضL0igP.ݐ=4f14ԙU.N--Ol_tD>ItfSZr@jLڼGQñagS`HQj Jv&+ yV65aG2wTӦQB3zΎ_t`z-?rn̟#סgWߤ#סgW@jLڼGQña݊,xث愙hT)];U%'NMْP2;2Jarxg٢*L(x'U(0D4)M$R$h(0D4~x:BlsRnq.՜45І3t72H9Qiq!=i|?k/;9IaV|h*/1#Nyc=R]Zʕ7GJn̑JAh ֨hP:h:lkP'DCe;C@(Pm5Ё DTMM_WIWr$K!$#R![M:SA4AQ cW^ϰ=JtSvdT~%QY^נ_5&wm^#Y@MjYsiڬ@MjYVxDKx3PT*YVxLhk97Ak Zs-Ҩ;2NdɃ椶ɻ2xA.jфaD @:kS) 4x"").H6b)< dǮfG@x AnsiЁK;J6`MHU5.u360ԟU.Mvl(oS6{0MpNub'Flv!Tָ;k/;l9[%0 S=09"4Bl[6JkSP{CZ1uAEJqcgk4N֥!&+ y@Iw`4@*FΎ%Ml贈GYV]:0ktCv&+ yFE"*MΛR0.+oIɥ8&5(N(_S=Sj R'&+ y@ bua`VsHQ~iNR&HW|k/; a]%v|~1rWlFhsA "]Hi>Jq_L4BIВd}JMcOBh1c)_ɱy(}6ُf>J+cُf>J+c"FYN%AC%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1Wl]%v|1O.cA_5&wmOسlTCSfίYUgUVwYUgyM*;ʬ*O^[hԸi(vL1L,66:B^Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+"Xb+v- >kmd,FЧ}.!\y! S+!] W|B W|Bw+!1XWHQa}8O!G!A&ٲFBOC:¸WJ\y+%q<ǒWJ\y+%q<ǒWJ\y+%q<ǒWJ\y+%q<ǒWJ\y+%q<ǒUuH4 +B*psVۃն歷5m9m[njpsVۃs 0~jLD'S%C?iLq*vҦDU;U;F8:ʩȪNiS~q0CaT}Rgvȹj:]h޼h͇TZ\ٚ5Л4AŒyz'I:h"սg0*DS*-u))CH!pI! 4 X؏v@ae;G{'~[e64;ʦS`~jL2DJ$3V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33Nd " ?Eºv𮝼+o ºv𮝼+o ºv6RgvRgv:Y*D1tKGHNi]3WL0t!]3WL0t!]3Rh@P>ߚ;BKhf֨MѷB%*K?O)9\(vipQI@LLRgvٔMa!h+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>1eaϲgXf33V+ }c>̚8B%;%j(JіS`~jLےwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzwmޭzNpU1+bWįY^f%zJ1+bWįY^f%zJ1+bWįYF@ \B_q !U/긅W?Yn 1+bQ!|ԙݵ=]3 f+a Bf+a Bf+a Bf$С*M'PfI!E-vƅ8ȵDْq 0+a Bf+a Bf+a Bf#LG}0LS’ex6u:{~|ԙݵ=K'ja>4͊":;X H,׹SNkaL?1_g;lCa5GN?#\ L`N~y^ߠ_5&wmNfjMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ5jMZVթ54BS1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rU3%S1rNI06Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7Cz7DC@V\jUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUV[nUVsD+!1AQaq0 @P`?!0cJEK2NjpO XAb &``p6QٝBL3afb_]5 82fWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWTWT0 ?qV?hH ff_h @[$ՙ3D"rhBEtNs˂2P`ru0 4>t}"v$)aCF Y,X^#0.<6ErM&r\h.I\$.Km%6ErM&r\h.I\$.Km%6ErM(`{Y̛L-dži4 ]+FWʾU _*WʾU|_*WJUҮ|]*WJUt]*WʺUүt_*WJUҮ|]*WJUt]*WʺUүt_*WJUҮ|IǸ\ Lb(5]rp+?آgg(&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&vM}6mdɷݓo&OB9aCsWZ!?L! $ ت)If@g߿ B<}0Ȑ꧈ H7@(x =p@}fRAC$CWqB,@w"s$h_B4hTLNML9P\ W#^#;"НrEϛ=9"U Ļ"N#TMIŤQcCaxcL 1Cy0'" %џ~MOB>NZ2 B|D/OTgvt̰6$?'M`?TdɊqȅS'kp9~TL.;^Cbj{K'pLS#Byf#?GAreD0(n tbg($8;Ⱔ0B d=cU4LEfh2B.1b$SpE1 +!c L(c!8&'B "i UHһ6-sW%{T+b5yWJI>yWF,94p @`I'ځ3@@A#j=L~L~?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?(ЏHb2>ׄ"A98.}##p}" F:`YXm"gn-<20.. NDj$hXK(DK4hʎHV{2s`V2BZE6Tʼn#,FJ!'0}xϥ-SS*?9aL! fG s qQ1L9P05pB.dE!Ӭ#˃u(ڃ&H T2~sLHPܜ,3hrS,ť("(AKrdpRd 0>leP%*ix% Z{-:=S cr W@d~L2YWPcjʺ-le[/}쉀fɇ$SS  ;J(8-le[/}_e-le[/}_e-le[/}_e-le[/}_e-le[/}_e-le[/},X*>pY"VnyL;h[1` hIq{)(8Fe|$-F#!9Nd0NX4Ǟ|&zs]hQszܗ@ $@N , *+J+J+J+H2A, }:sW %mf᧟(K6:(r200CSB du@)b8$&%)"hunKB•eF. &!BKpY#F*4@ 1dvX9*!?X2GqCUxGQB7TbD!$0 #=#8O>T+JGppY"VnyMr{[qL T &;)qHDM"Zsm+J8mc`'`*qxs.<ꊒ, YV Q&* !#10j8LCApv fePa=Sɱf~3T\.*9$ ꁀ1 AlNT)"i"p^h( ݡSDEd$:*Krd|+k7 <|tJp&({Ob##aK7)D$9Na0`Ty $k!Li=@/8L.vHQ ;Pg0}Ng۲V @ $@N Krd|+k7 <|%d(.E `[T|vż>J 事LODX6x"@H2E^$U5d/Ns d`R&FO(3 ^0_JԿO@` 9|E:&7$F",09="Ӂ8ӉHgei AX*brz b<,19=?Ӫ>pY"Vny 3 3xF MOHxD%LgGX 00F0aN.<&qcЀs(rlTř" Al2sLHȼqR *  LkO+3T ۲V ||sܙMPܠ&qyiT8(E9jTd8vd&_!(Yp ߊS#wUT0Ÿ(3F]jx' ~Z@:W]%ol?Ӫ>pY"Vny 3 3x S*rKuB 29R W<ݒh?Krd|+k7 <|JO?X*Z}"2X ̑#'Ѭ~UMX+ ;앃EA}@ fdTgN\%g[Yi,0v"Vny 3 3xPI M7kZgu|^۲V |vT4SLA,^ G~긒KI:S;8pÆ4Md/8h,a^pvT4Shq'TT dyJ y 'F! ! *zflK읇i'U08qN\%g}̸}z#e6h}nʫ4_A@ $@N I@/Ӫ>pYWI]$XIgtF0LI'tb$9?UWI]%tlt.LԉLy7#D@ ª+HKw}nʫ4_Ab4@G7Cd`li͜,09=b!u !t8?2;h,((58q1! 6/Q`莩 8vQf$3jt L򏢱gm)5P\68H O ?EOdAc>_Krd|+k7 <|JO?ᅐ$} hP=̠÷*',`ӂ|bO框hDnn}FCf@ 1huM1pg =)LD9qv'~Ȇjf^Y<}BnȆamH(Z r\(wTb3&C.1 $,b!Ha  ODHihi_Hrwb*;+|UӪ>pY"Vny 3 3x?"S!w<Վ 0_AϹ\2Vz>H> o)FFéjȨ @ 0r~uOꦈ;nW+Aȭ1]w<}nʫ4_AdTgA}@ fϹ\2Vz>H> o*""-٦i5#M2/8h FXI9ǂt6!:sW %mf᧟π`07[Yi|<tee6Bq2QPDL1*onEC)VuEF  L?@p@`rȌL%!Qb "o"y"ʫ4_ABhH |b? EQ5H=V* Y.)Q8Bd'KgT0:3T\.*9$ ꀅar2 dcSN``|9"SV* Y.)T@Ϲ\2Vz>H> o 4O.Nèv]sfLfh!!5 \r7/C "ƒSbu 2LNOD{pQ CwXP|ĀD}+ Ky`J`@1̀h2LNOOϹ\2Vz>H> o$N-U <,M @,hSj󆚡XW i(F=5I(B8?s8Ag ^"h g E$@lOC^w)"Bp MCPC G4f%tM0IDMtGvPi m^N }#((dL6!8?d(J/C{a>T+JGp0YaMa/BCh #EEŲLP3U'0<0CL$vEx:1 Al q[vJU.}ᒳD4gA i,#P&8CNH ,Ђ>hI! Kݟ61V'w<Q}Ӫ>pY"VnyX0'mFIl}M|Grrɩީb HVh ۂ|AHF }Ӫ>pY"VnyUqE G WQr$P@JAkk Ay_K?T+JZt!0L-І( 9gc2TT!( B@q"@bBf* P$ə"$n t&MЛ7BH`AA55It&MЛ7Bn t&MЛ7Bn t&MЛ7Bn t&MЛ7Bn t&MЛ7Bn t&MЛ7B0Bq<*\$D |lL jybV}ϹY*HLu+>gܬrV}ȉ#TX/P?&Xg?%9'L /(`GCTQ(cc [Ek?n-S廪|uO>[wTn-S廪|uO>[wTn-S廪|uO>[wTn-S廪|uO>[wTn-S廪|uO>[-*NtU R9|J>p  =`'ثA܃ݪݪݪݪݪݪ|ZZZZZZAu-r sh .!R H|5:ZwjKP'&7}\^qz/_u}\^qz/_u}\^qz/_u}\^qz/_u}\^qzuB#4@SK&JϹ\2ۉ]f2ndɹs&M̛72ndzXʾr4+_־ud;4AQs: sD@9X>QAfX>UX>PA98}UX>PA 88}UX>UX>UX>UX>UX>UX>UX>UX>UX>UX>UX>PE7`>lY" ITt*W!@nODԹ+_ڐ C cc*^FYV.VppG(s4tRD.~fylCIx'غ(:9a``  4F8nM@H(7H P$zP"YI2g,!0AV}bTbSֈ܆ez(X D!95.}b! `EQ @ @ @ @ .j~O^:#*****) >\.}Kre ?N!A_E"7`V`V`V`V`V`V`V`V`V`V`V`V`V`V`V`V`V@8$$@G]=M4M4BP?>p3: , dV= _+_v,N?6,ϏG9 !̿*tD`FU aځͭɢp~6bsW @, @ @ @ @Yu'CSb[DbL"TXQ sϹ\2Dmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[qmŷ[q l[!l[!l[!l[!l[!3 1$˓Eg՟V~jY?5gAG> d-%.sW K((()ȃׂANÌ" %  @D#)pYA@EQEQEQEŠZ~e?2O̧S)~e?2O̧Qp ěf9#rڬ. 諳W4  5)~e?2O̧S)~e?2DKrdp1#Ѐ_0(N 24<19FPԳ&/(AD8fn`t9sI- !EA Rjhj?< \$b(mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmSd(IU{&M7odɽ{&M7odɽ{&M7odɽ{&M7odɽ{&@倄xT&?9s9s9s9s9s9s9s9s9s9QI ȡ\2-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[rۖܶ-mn[r.P0YXj !$0¼}X{2dɓ&L2dɓ&L2d_ )JR)JR)E#!a1Q0@ qAP`p?I<13+"'Ah4 Ah4 Ah4 Ah4 @~)E?:$tWEtWEtWEtWCMsAyB?k6[2x%^򾊧!"Q;㹞97IJ(Y6N)~?YX T/j+++&t\M]6rf|y4)j$_9|ҟrU O+6W'|w3ѢCoI)0cnOq1dywܪwH1owr6J$F8ɨ$9.i5}&@X }NȈCqYP$Pݯ"嗸P` `1&a)i&L8Iq # ;_fEz=^2+"ّ^|v9̊{ȽdWE"~r/mk{lȯG;_fEz=^2+"ّ^|v9̊{ȽdWE"~r/mk{lȯG;_fEz=^2+"ّ^|ZLuMoEj U4Akc)5jpF𰌇~9sf(Zq{;ߎw~9s{;ߎw?~9ss;w~9ss;w?~9s{;ߎw?~9ss;w~9ss;w?~9s{;ߎw?~9s@bNy! ϛ h,@CctӧN:tӧN:tӧN:tӧN:tӧN:tӧN:tӧN:tӧNDI@ C?@ Ċ4./p@@BȫXQ53DtNx/BPFC24Xnᐸ6B2-4TLSqPםB"$ʹ*!iFa -ځkMrW֎] ,#!rLEDfؼe &@"`QYR=/@wa`J `IdVе(VP # #mF2lnXRKu"H$)Rt$;ML 00d @@ ( R/0f p!)K pRX*cx*uN woPXs0%0ȥ3d&#=@X 4a(Dz1,V*I WF !Za$pbb(I! P7P:gnO=G0$HL1X<@Rz&Ak>&4@&.PQ%R=HC!be bb.$tPp3@s\!fAy 6-bb( "eBETPRȄr`Σ-ŋ癏OgsH@hV"hG)PIѐ& 0Zh=ܥq]T*#ADF :r /$}>^\R^rY)"xJla>fP0JBUh])狎ἄ0M'? /$b;&$ѰJqBbtCBn03c hHKCx4HƩ!&Z\PIB.!U"☈)HF P"a6\vWj\MH&Ćm8ޓ JԩբTi! [/)"0\̵vhphN"l$Ѳ^KdjԂ 2w'z=:N:AfP5X+Ft}ZH빊j21b0&O N(DdyBSnɫySC&jimI8ƱٴK  OFʖ֡( t# z[(Jx11rq+0:VQhu`)!f .IܒXeAX9Ԣgsۀm^՛|~n0:YZ0< *(􇡯5&($E+zMdB'C Ё,3bE*b%'x. HmM1aIM0^s3PϔB40h5ACZ&dԃ5 bz]'*h.Q-oc #ʇb=`8 Tb`8D*ۣb*FqFp5Ҵk1z ExFC F )5,+!$YKk sA E=Yu5kLOHz cd Tnd/۶qŢHud"\!3. =!kQ"D; pSID!RZr>q-{맇^[~|e+^&.Df`@Rˀ%ΦH!9TKq0,K V/|" }R1!C#)Ea b6q1<91I|~6P&3J&'K_R)2IZ•mJT!$%J#a2 4\pHҌHY:/9HH!^ARu2A<* bc $2 sH=qGlFI $=/q;?7 CZb|\zC׃9@I<`8K~JP%^&yKNRt`b9SI*^bQdTS#HHV \m:a Edk@lp% GhFB0I)$(J:$̡2 FP)Sf;Nw޸<`8Be,q%遑Q6ObMOBgV q PZLyZcD C@Lp*F<;\w E=Yu5kLOHzt֡1>!(m ! A >A a> N^"I ɮSz}$@Ł*:?|㧅v'îx5"i'GEaϩσ3-33}eWQ;h.6#`~ JZhOF?e#& D Đ%a/!&@9ljH7cizfm2hт bDWlɏՃ TFLT\< 4M£ j37-dAb!y>GLu FD(GC GCB+)"h  ^rWCo$ 9SAtl<~ x@QT8 Lp-@Jdy>o\J"tW\A2nC-jܝB4^՛|}Q;h.9237_|>ϩw)`!_Xky$bZ#2H\&L2",ׇC xH ^S(g32EԈΌ"VξF@!OO׷x5:x7P P‰0uڸu (:fg{0! A 6ӳL&ʑk;Ok; J Yg{3LTfÚwp_u%MPL"*Y€(g{3LIX;G]㧄}@%Lm[b$.* *z*@Q"i:;FGEL䈜1p#4N#NDK+".Df`@Rˀ%Φ&I6 XRY_IUjC$ Dl6^6\FAN Q'S%1ID3 TΦW"@n!EhtD$!HBI,f dAKЅ9̵9OJB@:Y"qкΚ5'QQG= xMB:kP֘Ңu!rvPcc@I*=i<¼EP X/% Zb8ٍq% bCK%v<VC,4VlhtHꤨP%T®Wo u@6`B2(oEk{&B) ؄b(:yl2R(`CIT6-[ԐAI5f *7u : c`@J(ޚ1Wa_D:jxzsZ>fx5:x/Q86 '3 ݓV$61-mP1K y ÊU % eAJ+&ulV9 WSe͍&(R=j8,8F&[eu}!AHg8d%6욷1$<xQnԓk H2+e,XB _u:+DnYa)tP`e[ a N66"\ $0!@,i}sV*P,A<^՛|~n0:YZ0< *(􇡯 ]gMj!,Q*%C+7{AdRĀCJLNd ^I.&ABtF$ ĦR%8 늭" ! '"-nS(zOO_ɌcqwHrQ5y|G #:"w` @!Euń[z9E+ٷ@lr~p >R݂@ӕ4O ෈1TeC1XI|t H:T Gc4`f$t_KzB+)"h  R4dB} j4ft֡1>. =!kgJI(1aAZ4}q_xŸ<)ʼnϞkE,-Sxdu su栜SL*4,-IybZ!@1f4(H*@O2E1k"·C BFx Rl^ohf<9ҏ"T] " QnJ ;OpQ"u?nW'Sp"qкΚ5'QQG= xMB:kP֘"@ U1gcsR/~ӝ;O KЙ$ -aJIe}%T]U-A4T'eU**Duv18b$FiF $ ,LF(%&WD \(deWveT*%C|S"4 bE$0 qYA10qR)2IZ•mJT!$%J#a2 4\pHҌHY:lFI $=CDdSHHMZ :-bDlD+þ fD &IvzR$CLKx`y.P&d2C"qкΚ5'QQG= xвܠO%HȫP"iiX xK$8Nw 4*)0ZtvbrdE,K"X^j4Bbq9βDQH")@ɶ$J$EV$lA  h )I .N>{Mؔ錔ְDaPTBDchT5Nۓr)fUnt}+Uښ5Y @ȡ# ݇]b +/ \=/ ],4@J(ޚ1Wa_@k-$<ɩFTEA È*xTK 8Œ ;A@T@#pzG7ySF^K!H7ψ!BRlB1IQ<6Z)0!ުJkBaDy?LPb,$ JdLbcl Ѣ| hTQYHc_I%$6i7 rY(Oq:ft֡1>j ` ~utS3Pl#0",Ds(lfshmJ;*;U/ԑeא$*"S;O"qкΚ5'4CЉ`1 @“ h7%H Lpug j! t*bHNP1;x^ՎDBa:>'ϠmiaOHOshYh덆4DD0JQnKfQwTYLciexz(3[_V,JWO>|MY,\`?N~]:cx'>|ϟ>|ϟ>|ϟ>|ϟ>|ϟ>|π-6da+l̋ Q?F4/HPaIEQDtȝA():VB Pr"}KOd’.ùtÓxy+ |<` I8p&L2dɓ&L2dɓ&L2dɓ&L2ÇTV /Ca9A-^Ֆ` }\yPz:cTE/t2AǛ \l0`*,hr4T L#F>v$".!@_1mb?fM0%s`#r1#<3#<3#<3#<3#<3#<3#<3#<3#r1 't񢒍)(,OĔg+ӧN:tO %/qA%L>XPI%m[:r*K}pO\$_->tMW@%kŧHjjQ#ӧN:tӧN:tӧNY 0=#?7'0 `)Eݎęh{R7| zuDB"DD%1Fu$-LX?Xf샔RH%su5,Ct8)ff, Rh&j0jXD "1HY"*`, $z\[&0@NPq2!h*6R̹1 BW-w $f/- 7k{oVB_MN "j`\!= W#:P4j` SP^AŻ0 ZO>|ϟ>|ϟ>|ϟ>|ϟs/"K$x+?/qJgc]ϟ>|ϟ>|ϟ>|ϟ>|zxō+z lbAU XA5(DP%K%oh교@a |ǫgk{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{k{ )og;;;;;;;;;;;;;;;;;;;;Me8sz\ޮoW7sC d/;;;4Sha=wwwwwwwwwwwww@T&^E&IQ8nV2"x~Xiʲ23:L_EaU!tqEʴcN@=Lr䳳x$9N|$9N|$9N|$○MF/3Hִ?rCAm}0[_?b(gM{`!S=`)#B&y>N|$9N|$9N|$9N||{V 2!^zמ=y^zמʞ<ñ8=g F1^]1FṛhK/qQu:.@SHd)k%[ n6د%:ꭏ^zמ=y^zמb7מ=y^zמ=yB3R('+P6>RPGA규Y?c& HuF5ˌCg:՗mMX7tO=y^zמ=y^z׎S z\B϶-y2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5.Psy.\r˗.\r˗.\r˗.\r˗.\!<'`&|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3|c>1όg3yL<,*~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/ϗ~|>_/[gvsZ 3gtkextra-3.2.0/docs/reference/pics/gtkiconlist.jpg0000644000076400001440000010323012603754176017160 00000000000000JFIFHHCreated with The GIMPC  &/"$&81;:7165=EXK=ATB56MiNT[^cdcFSaiiiil>:44444FcQKAAAAA&/I W66;yf(mW;Ybnu'cy2y.I7KrE9"+7ܛv_%3[7:Gr;ȏyblUյTȒŒ\Vl*%M< ljE}=,~_/kydR^[R}|x6[q-"|ނt|B~oW˾Ub֯o>jC#b,U)ulSeQD!Aš^I0݁ A V~yv2ޢX!w&U҉&$udj<73tOZh{BoTHV,5?j[" 7663f)Y̽ZPi k-I9yqzZ;0LnQn. ,1 K\4W9](3,ӹTغ=NUKxdyڰ|,% }5gFQE&9#ᓱ`2ޢXhڦⷅ mN2U ; 766;yf(m- [PEqٽ~_B>] h 76638+ >f;!!د*%Mrj](o8@@gXMf3ss7JKJ-*چVbZh{BoTNVZUEeQDq<45nJej= k-I9yY1V+Y'2@>:fecV_Ϊ{I~z[\F&v%/pdjK! 3=Be xfxB=neQD5YMo @1 =ڝeweToQ,mmvQ]/+IeTZA`'2y.I7KrpZTRbPq#SR jydGz6*^Pʣzcol?C8C+9vSХՒ]`ghz)0Z.;'G-gU[F((eQD!Aš^I0݁ A V~ToQ,mmлW*DyǍ^:2k5takP'4z̽ء7q'j-*Jӎ2ޢX8Ͽ{ݚ|g2k5CI2̖ԓ^'V -ԿםU >=Áft @*%M^ԖB@f{{m>3#(~"zʣzcol 766ʣzcoqlAlAlAlAlAlAlAlAlAlAlAlAlAlAàuy")!$0134"# 2P@$B.vjvTC4Pf^ő@0b0egywywywywywywywywyw1\gW|ح֨淎گD3kDemJ쑻&;!j䢥>[Uխ-u“' N)8RpH(W~t3 M::ZK\k-stΖ:ZKTk-StΖ:ZKTj-stN:ZK\j-StN:ZKTk-StΖp L?vӟÒr0' 1 Z!1p3nSYc88Nj%Vڿԭc-oZܓrNI9'$XNj5S-Dn'RIԤRu):JN'RIԤRu):JN'RIԤRu):JN'RIԤRu):JN'RIԤRu):JN'RIԤRu):Jw,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 0Y`,f 5 _ޟ-NJp_3pZC2KPP; TZSCabJxO:=ez= ܛ@dr>:t{O zQ7- ٴ }6Ylf+^N쀮aݒWkI jer\يi_ޟnp;FDBȷ)#RY*J+ RTVĨe8}a,l+kY"EK ׾,yӔl۳xGvE%2jm\WLوiV,o5=nWbnW sDzU+}GSmȋeMJ*ԨU|L7(afUS]f_?j1AzߨN[!IӍKr}ō\[~@h%%aO/b",36+CQڏC_?kÍ! PEU_OV(V}&UpkFjQF"ĪX(*@_C_?knԵVJҥ3<Ԁfg-żuIlJS7ۖaLN̸?GvE%2jm\WLوiV,oMOw:؛LS!5XohbMlaA$/OڌqP^,iRtaܢba&ci7oXSFz~ׇCRv+ P0L֌-HԣZu /OږVVU_U!hB(*-zQ)5 +rnZim+V*5 R5(ևu Ux7v>nkHfZP_j aJ^Jhl,@ܛ@dr>J,3u/^'Wgv@WUnkJ3Nz=ST+z~a҇7+ "ܦ{ ePKUdm*S;k&.d:Z%C)ě pʰ'f\I ?GvE%2jm\WLوiV,oڮ~ vGTڽ;tHk/=Ȣz~cQ`CJH 5L KlJŸ5 8UU\h L\RheWajFӯ_ޟz~__ޟr 7fy'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ry'ryb,Wܦr.a9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9siӝ;Nv9s3w?%Q 10!@P`2p?UtT3#6:̙3b~gVٝ[3fulέճ:gVٝ[3fulέճ:gVٝ[3fulέճ:gVٝ[oTْI6g]I$N9ME/%fJrG&$rnDiI_Io:I"vI|9 Y?ɸIîigzmQo:No$nyxc:<" 0!1P`@Qp?K&!? lF95CSTk?,n'066Cwe9 QNIt?9%FBT|>T_Ne$jPzƨ':fwnccoJBrK0J=az !X^C|VCJ=s^G<  !1A"2Qaq0B #3@PRrb?z=%f+Zf%CA;4fSAhz9! %L:5p#z7|R)7f̭&ʆ0(@tg8(nPP 1 ɁCZ-Od4m f(Κ|[?%IsHu!u&pSlwrh~.I X(V?ffɘ"SHipYSTZ@qlɊE=ce3sVLHu!i7_vI`jnEP2nh!ϝ`oWp_vLעy,-='CߢOe9A絮D{efͻDNP58fWGV` =Ԡ1ddLrL`ګzɵ-ڠ$)hb(5Bl޲@0'nI =!=6.F.pt" i|fYntS qYK ~ mmsY/;-ܓ0dN+,6YB G])*1H8"EnIL}mNͳ[bٱ$fi+as#ޚ($+62vLlj5NJ5Y8'; ָ@Bqq6;!@1mLҴ֬BGq:t;_ RB֏c@wٙ΁+2Z&ɉ(\\$vdk?od!4 `BlDV{[]|NHY#K䀈N;Ӂ$Z6DDv5f(=2FkJlL»W20xH¼Sc'`Y>̶ƪZ$\K"s.۽}  q޳}p6doWp_v^e>Z3NJt #hl'ڊ@Cv&0V" @Fg"CK zڿQ̍ w/׆Ew;cѱTl0)v5;4v+ 0 0\γZ+6ڃP3}a%']tNfM@KZ%xjnuͦ_FEw;eiJ{`@I\pqq沶{(kBd1u&Ns.sDAX1ó8സ-. Kസv$N- g9O{Yc<¥& G}nZ\ipZ\" w.$ԲnENTMGzq-n4@K~^vk,cZ`M] nCiNqC411Nv?e8Mb}^VDֲ11LF$ܤD5DvGصh/ mõj6vWMjFp;#\!d)P w.7BxiB;'{I8H>\v;ٷh xgqt+Oj M${AK>cE5$)]hퟳ3e- VehMPHո $V~Biq& MHgwk 7+/ܻ S2T$b)u)zp9DCfڝfLcHiMWwF5PI8Wld 'ޙٖZkDk)r6qNxwaB=N;ouF̍ w.ĶF}INm⍑d;QThn*dWQHqcsYW1]|NȮ'r}6*-fE `ۣ"zٮ{YA&3a 9kEfPPs?Fs4ℹS@.{ɵH)kZջ UmҾδu<|Ȯ'r "Ol6Z\55 n18`.x ȝh7 8{"$ԅެಇ)`p#:l|_T￲MKസ-. K]]|ND:T Ⱦ ʒɨoN3e oՕrkL Mw0 1uf&7)#fq:NXWwQ5:':ELLjS-yv44\bՓ]&z ؙ jъ 8^ۇkmYIJ5$&vFB.RȮ'r3t'D,0YQP[R{ND{sk\ !8c͛vk\"b>ȃiZ|tukVZo#8J^H;N4w+ɖ k'䟱3e- VehMPHո $V~Biq& MHߜg])*1H8"EnIL}mNͳ[bٱ$fi+as#ޚ($+62vLlj5NJ5Y8'm@6qFȉ2}m47bhc`Mph+ dnp($8D׬፫UȮ'rxoWp_v>N"0_mQsSM]lbܬؙ{0Μ5k(]9 9yqB\u)Aidڌ ^y~ _|Z:hi|oudoWp_vZt -. yԚܜ0k+j|!I#Rhqh$20<dN=DBoVpYC8Ց6>/*_ra{dw&ipZ\ipR.Ȯ'r"HK* d_@IdDj5Цd;3I7߻8' \;R"&5y)<.1RKkjɮNpnHY7 S-Z1Ag ›p`yڍk)7ݩUfyڄ6Y8T)[]|NfO 23c^Yt``~>; ָ@Bqq6;!@戲ȃiZ|tukVZo#8J^H;N4w+ɖ 2n*;t 1Yա6LLoYB V$C]Y{'Q Ę(k5!v"˰%<%BF"Q9œwH6mމ>ٶktP{6d`^;\ExN}雽mUI@—#k'D]zF#f=[wTmȮ'r4|gޝmFѮ(&OMM ` Ep@P,%D(0:1~*]_ w/׆Ew;"ῑ]|NȮ6GEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtWEtW:r`WpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpWpX,*!1AQaq0 @P?!얰9 +pjg @ 8ސ$c&ǐ9ڈ9#P>09Ok6Yk(&;$^TnBlyuTzǫz=]cuWXGzǪ=]c=QWXuTzǫz=]c dӋ"()F608UK0 w.g1kU7 Z+B/UͿŠKU,piۿX4`LTٖk5p(nY($"+US1B:E :؂,^i ϩkRʁRu("`UEQ U"'(((((((((((($mU5&5J1.`A RLmc>/ yOsn?~7l߹~,Yc tWʤ( 73|73t7L3|7L3t73t7L3|7L3t73t7L3|7L3t*IaH #uݤ Xnhe SK0 PV cB!!]B&o(LUU! AKnV){B 6[|5*m9Oȕ uB0GUh;B&6IQs1 V@Q ĆRb80_),3",ŘbY1fQ##'E &@E"hZ-@E"hZ-@E"hZ-@E"hZ-@E"hZ-@E"hZ"2.Pu,P b <, <, <, <, <, <, <, <, <, <, <, <, <, <, <, VvRlt AkhDtD1(CIPS{5u{cY];.Q Us'o@,aC1  )r^+ Xx@NIr#R۪G@ K@:֑ kԦBHĜi YIX N''c0j5W1kfȤq9StMқ- *=U jκB(`aw=rɎA CB1`+@#7Jn)StzXL" xdHxd@jj5cЃZUF (32#: StMқ7J<ݰ'Jƒ-r/Icwǩ^(1gT*`Z(&9K"[ ذU3ϸd. ,}/$ xAcU )W5aTkUv sHc*QewǨtZbCJ_!g$Ʌ .vz+d6aVC""O(?"cBpK@ '<ԋ@ZbZWW+ǂ)Ŕ2gK 9؎.u.[E2="}~wϠ&FR5ZlGpLG(hh5I|ƥ$^dyM/BemU'!j X m8hejbcw YIra~qJrFK78AuErڱ{f/cU^ZlT$AQMc0T-GT3xgZƦc]Ohe Բ]e%h`☸bÒ{g0ke#\$.e@8jq `T/gJMq ꀀ47v*g4bn0YlLSX/kvnѹ χV֚7./M8DGc P:H @w,bh Ѝ-$AV OgJMVvRlt AkhDtD1(CIPS{5u{cY];.Q Us'o@,aC1  )r^+ Xx@NIr#R۪G@ K@:֑ kԦBHĜi YIX N''c0j5W1kfȤq9C.X=T$KA:eSl1e&8:g9 @ŀxjĂeQ\h`n'2Eh &B-WQ?>Pb5`EYїO *Eal RBX(`Kzq?1(8׎ŗ%ge&OMʢ~YP3jVU^"x8_+TxFQK /J"G9@4ou(}֛-1BDJc&uBmBj`-QbiW,$0peEr1 #1 ВJ"\}>AU4 M(W Lbx֤_ Һy^<M,:]PX"`GZhejbc0$p%\j[ V,* Rl_38d1ISbЙd[UIǁA!i[ae[8VvRltc({6+߶pcR9G2*]gQ\6^ًnc[(U bkGX#$l Q) *rօqt÷bS,!yhBu,YIAG~C.+j :h, YPC%@` c!\A5: !b  LF'&;ī0mݹtnH!a`ą%5wKm,N$$X@T +!K6ب4#@FàAuDՅx@cp= @"CaPZ( J Pz^;_ ]D18thwKil(<*=`c#uăFCJ\)0*lA4yDT5Op=%zkhNaBv3 K[fUz1xYhlIa#`ZiMfSǶδ+M0#\a 6@7edJ =]Op=y  wa hoTh*`1>0->0/6%^l^ãrA m`,$/(4n+\^h!bp!$"Ƿ{{%ge&OH`GDJ4;zWWQ N'55(3@[ 2v X3} ѐҗ%x5 G,"9^Q:U. %ge&OI`zd8|pPR^r$Fa)"qcP-뭔"* N yx s,d !@?* =ZtMқ7Jnʢ*PO(dLZ&v\~|V=5_jŠ?/B37Jn)StJM D y\ fԭXD$(DpULWX،@^ D1rh).Q <7xZb!1 V?_^(1gT*`Z(&9K"[ ذU3ϸd. ,}/$ xAcU )W5ar"-i<&_Q!PEgk *_UP1XNb oIq 2KzT^" %sVA?c,}UiL8š56e`@5[ް 6X%z3$* WhRMu:-{1h!^/ĒdÅ;=20ăBI+WG'LkmS0L_)Z.,1Hߘ4%uxx+,YC&t1#"]Rnl$Z^E5p='*J́7ԧ*QalD}3 YW(aͽb[6:XeVBD3B{Jmu@7=u\jh0:5^`9ZK(%RPnQ{h_`;XC}nsF&SɄh0|*%bnFXl{k/X!`q!~ E` iq]A I $y=%ge&O+;)6:z@D":"P@()ҽvbq=D(*P9 xUz0F!/S`< T'$؂9fiҩpk+;)6:zK$ 3М„fԷuFc&003 pL'?hxKǪh5g]lQPjq̓0LdS Y !ToXL" xdHxd@jj5cЃZUF (32#: StMқ7J; T@ל>JmJՊB@"O Tu=`)dRH(Mϰ:w(H>NbzaJc&uBmBj`-Q]LUTƙR0JtPkxNF;ID^ҧh ̖P;VvRlt0 )S^F¦̬kwQPZX9z&+DUBdEW8A!EeY!kو GY *~x$&,P!لf$IZ}@u@@Xs9JqQBP5]-I?)Z.,1Hߘ4%uxx+,YC&t1#"]Rnl$Z^FŇ|JML`%f{jS~(0F@YZ +0Ջ1|tڬp2իe " Bhkdj=6N_:Ю54vCp{E/0-߈N|])(7(v=VvRlt4 /X݇T,QS9pd`|@ؕx {[#w,6|=8Ѹqzm$<cp= @"CaPZ( J Pz^;_ ]D18thwKil(<*=`c#uăFCJ\)0*lA4yDT5Op=%zkhNaBv3 K[fUz1xYhlI]0w(4N5 " 8eU>~w; 14laZAd(S0uMX3r72sBMV"L0pCƷecEf -1d4xL^pg@CfhI%j >}bq *RDU? ZIVZ<ԋ@ZbZWW+ǂ)Ŕ2gK 9؎.u.[EE%ge&OIʦ0`bg 5)ʿcq[# Q,L`usoj혾VMmV8xjղP!F}52FPқ]P/mhWL;p`F! u=mo'R>.uzg+;)6:zX,ê(AۀщTdb}a0Z}L `_lJ cؽۑF> XH_QXZhWt6BBIEo YIJMVvRltcp?{Fق@Vk)JR)JR)JR)JR)JR)JR)JR(56N#&>&hg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xg6xa* у Z!)瞷Nx:玹D,fQS 0}}}}}y08 0 0 0 0 0 < 0Ì0 0L0 0O0 X3BvpW $P* XiiZ/0&;rV*%t cBP^m%[WJTV q1J-ث6!|F&L&5FҢa&LVMF]AKE _~ֲ L$I%DΉ[km%^MDjWaʊBGwnv(SEo~Օ#vd/ܹ{jE&L(z$P*}k(pDM[km%^MDjWaʊst6XSUo)!1a AQq0@P`p?DM:)RR'vpN 8'pN 8'pN 8'pN 6-k<"9: 4ϖ*x-[ d*V?$7MD4DMǷEMdWJi])*O*m=یAE:D3wj%~;D{&J!ks)*!1AQaq0 @P?2Xja(,:qo)6Jޑ<56UxET 8%P:Αp7cۊ# )-*Ţ%P8FEI3 s\!徛ϖ7?/t/g&<91vϯ&vɏ'}y3Ly?ɝrcx^LOlgm;gׇ_ڪ WB]/o#h@\0Z+1cPJt0,t.`/{oЊ.88lfPA(xItE96(M12ֳ̔y|P߅UD2<22}+?neU\ĸйQh͎yJq4-.2)c A4u9rW9^+xąqM^3ؿ/1Dŵk<$H"D$H"D$H"D$H"D$H"D$H"DYAX qbK ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> ς/> yo7}<UL=/N,Wa!9EnH1l# hNr«iR_q4! \9agc}ִxČgpjXc{qDXo  uØضe (*vf1}#E3vʌXDMCE3)L4J=a\,賙mC+GU"o7}>Š7[D-z 2aUNjmu1X&XPcx;Zӕ>6< NtDg\qk]t4B HT+(B j A(BT6Un " ,\@àn%:Ʊ 918F3`E_J,.7.s:(`[槐TY v"4JK&dFXU%=! . }L0\;7Da"wbs:)L}HĬ3?vwӭW d&2\DO7Jmr'א5Ĕؐ9f9Q2)o+ NU Jf7S:Ȭ " 9ùE["VYpvnP9)Wڳ.Ԙ ".A9pb0oKk)8s`*0gˠIUR 3\Hb`29엦in\fFuY@"fN!j݅e!gx\zX 04|ϵػy%,CU^ f@3BM9Kud)BC[a)X2e p5$|,7ngR ߏw`ȢupQ`bbiSdFQ\ep x~kT brR5vUxCr<ӱdԆ$Bi\` gw.nOUSKӇ0%mHNQ[ qvu7!lZ&?ܰZTWM7GHBc,BC2~81#vxs$l9emCf0-Yv4; :p6sHL0DPLJS' w8i>W!%:,q|f?gsP'6 /=HO x tLXE;hfGcLy, &֣4OH(V@$ Qq״ X^%z0UE0qI xh >󏡥oQgBlZ/(x.V0ɬ^748ETo^0ZYH$Xi$m+QhKX\EazۑBvMuk)m^S j sP b6 ,vLJwŽ@Yg !%~b(J=MiEZQ(Mw#Jp/V)S0D.t+?w4a;ߊą@-XxV5GL3@ёucԥB, J<[a#8ZDep<8j0 /qBv0S2IוA0_؄I4Fu}wCD!āHd*аN4 pAx?E.h* шåtRXfHfg[ Y/sX\n\%u;ZPO =hEfi,LB>DJ^{_oьB]@a :wn2D63;o7}<:ߵ|p/a`Jbc!eDބњ,Rpy C\IH ^Öc(r`rm`P@fcz3 ;dX̡u)jjVxM>B I;r(X XA&+SpF6#q$U"5}&##zi)|6̾ΖntgY)dVXI"VwUI]IR5Ufd=$$ӝԷPNBm@( Xd5q /LmU*_]wRA w`H0 "zvu+ 0ۮ~'QG )i/6(FU0Dm h[ WǏw통@v'),CWj\7)d;KnjW+s M;MHk L*o5{~b]j^U08{([]Ԅ] g]|0na; K?mtt&0 r!;c!Z1GgYa1jbMCP,1c`Kb%cC\,ٚSi4w*1c4E ]aESAÛ"=Bv*'56ͺnj,Xc,(MQFiʟ;s.P,C@H9'ti `5 K`,a}CK*ޣ/sش_:N]{s9z{އmBQN\UaYni$p ؊޼`HvHWhЖ#ָ+ "+"*egN{އ=C{s9KOEPziw= Z ʬjfL"53| эtk9w1R S:Z m!P a(%] Nط\+־Ht iST- !I9[.'J-QE-)ZHN\Ubb@EE)x^@%2_9d^=>/l=;r#\ Z1!On"io!"6z/ᶫDF|@x]7'&d?ogc0AXp,M4kZ"Su26VU<: bl̦)M2 bb8й3 :Yo='pրF3bE1ArShJ*EDq5D6ӏAR *CJ2L%akCZ‘O.RPF:ȅݠW~'b$kZ}5 U" -B®FZ98JU= @q!/06[xqa !*(C?_mvwӭW d&2\DO7Jmr'א5Ĕؐ9f9Q2)o+ NU Jf7S:Ȭ " 9ùE["VYpvnP9)Wڳ.Ԙ ".A9pb0oKk)8s`*0gˠIUR 3\=IR5Ufd=$$ӝԷPNBm@( Xd5q /LmU*_]wRA w`H0 "zvu+ 0ۮ~'QG )i/6(FU0Dm h[ WǏwػyԽazpQf +pA.λf`$-Dv\ Jj~ۉL`CvC;$c8SVێb "ě~m,X-cŶK.Ƈ|YAS44Qi)Tb"h)o7}>Š7[D-z 2aUNjmu1X&XPcx;Zӕ>6UG ^5 ht>»7Ǟ{s9z.2✹Z#&1xH!Qxie a쑴E,GacpWlDWnE UbΜ{އ=C{s5y3=(y6iGi7o`BӉ܎I)(TF XNp4A@Ьߦ|M~({8aX< 0=˜ FDkfjBijfw)DpP)U6eje AVG. 'pp[_$:WêwVfym-œW%QS+ J~m Z*('EvLI-6@$"xdەxŖRщ D{t`Myn9}5P0ѭ}Ox2rfCFy3 LqBOQ醰%7S+Ce`%PCà!j`po N/p+ ,c c0q5vxК/K`EmNou?|Wo*TKi$`gN> J<誺F)+Dq0" UsqA k E<.fկ /;&θ43]>ﱮh8"WQl^r2AƂP9lDY|@!Kuc !rcB Ax}O(GN_ X.p@YqAQǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ>qϜzǯ b'_|3φ}x,gtkextra-3.2.0/docs/reference/pics/gtkbordercombo.jpg0000644000076400001440000002043612603754176017637 00000000000000JFIFHHCreated with The GIMPC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222"U  !1"ASTa2QUV#35s$6Dtu7B%'RbcdqCr$Q1!q2AB ?~ћ'fS=+f٬{'Jӥz#OJvk;ҿFlǹRt]:W"Bӱc?a vtGZaH JU)=`V#P4͐;XxgEo翲sԳAޞ3d=w~;5r^t]}_6NcܧzzW͓X*NJGޞ3d=w~;5r^t];kHFam%kqv$ IO ހSsNc3 a +))[@Y233erZ15EdvusβHdwZL-RSÜámRڝHqp`~;5r_6Ncܬ| 4zۀ͡*PduV R@ Zmn;sX0:3$6SvV(6]_6Ncܪy dE{NB(%)IH_kb@JI*PÒrQiݶ2FO.ai |TueUH3F<mi @; 䫑A6}_6NcܧzzW͓X+!=/PIpuw5\b Xp⧃H{m'l;`,`S4N, %,%D8tW>ɣ%iRƇ՜[mD]xǶmt-݅`-vsOР- pϫFr(ib<(ǎZi'jR0O3yk-+T5- JeֲZH2Ct;񚖟)wlW41 OJvkyi H.mېtJKEH3`XN!Ԩ,FJ8A80 {rZ =bn&BnpV`dyʧIvѹٝ!7<3h&ptTbkj'+oQFs 1ޢjV̶̐uRgZH9OV0<%Lu;{=zHWsty>N;^_}/V%w)} cNpyuWty>\G ,`,#)"p78_]/Yar Vȋu޵&۪5XmJb)(6Tzdtg~yDũfkn,c{/id2?Pw̱>M7cX RA\%tjDRnJeׁ uH)ADhv!^qϮh<q0tQXhV{#eׁe_Su+nJHHE& _2kw̱>o+9:B\9ܮg.7T7ⶖU%>(<}q汀7[Dng$80m ҵ6J n sQHdCu丂BP[P^9{ocIѸMn1Vx>3wSc1؟2پ+Gu荸!A­WHܬՔX#,x͠/%Vpyh"rRM >h-0[Ci*RB@J%J'2x!e%!-הkΫ (,8ھgw۞<9+ J2NImAYAQ$DDJ7b\K[MwGh-o<|`u No7?YZ]k:d bJVD!AO-P$8?esCOLN!m!IRHERF*\Z2#/BtiJV|z'Mv9)5֮Nؤwt껏A>lDrG͗ȓVחm<ǵ"<.zZ%:~HJLwSkZ]py6q$lz˨ևחm<ǵ3}w}6^"O[?c\{^_חdI+3 ɍ]2=VPB$$ڰ x23[M0UilK=:bSn^JtA'-񼦸<6>}<'Zr՜T٩;+Wz9^n IDlZH)O#9'9.Ը~>z3Wn&eE[c^jd <$ Vr<5L~\/{[︧\W@7)G$ fWRx=_l}Kؾ4gKʴ\E5 4m&(H%͏p}<6>zNs=iδ^-8mRRB [w}6^"OSx=_l}K9.+ LM\CLrmo$ߓTqjB}c qIsSKCNtZ0 r6-O -+Cq[L~11cj1!wzcb#0$Far Qx$BHG|˜Axi:OsԢ9td| 'Jtt809cz8zӥ:Z-^dC@s'aih}Nu֖PP!k*rJgYizIHNI*JҾ$7~$Nwyc޾c6˨eÈ5'"Eur8iD"52VAUv9ܶ@j|oTe!D>yF1J灃9BNR3'PiWgHCJy㨽 80NԆrl,HD\}ۨt8'aAkǯV|TTV:NuM%N,g[O4BrHR`.ܜ"#S!mQ`,ky$v 'Jtt809cz8zӥ:Z-^dC@s'a{-?9L`qg窯4'<_QX/=UzS0u'K)[o6Gv1&^w9ijxNGe~)^w9ijxNGe~)^w9ijxNGe~K}cNstXӤ?ƣ!<4>=;#YJ`¾Me|euKjST8͂HJyO.vaqO.+r(yNNOq^qw4;"sMZUEؤt-qRWa\C>3i1ˬ*rrtLtG݀N@ww-ڼ}v*n-HQQa.) rR`sU^'J"!e+%qAXFup36rrtLtG݀N@ww-ڼakJOvJK y gמ]ޘ؈ !\xBF" >/ƕG|˜Axi:OsԢ9td|-re-l!'B׏U$ ;UWҢȵƈYJI\rPVp ͧ#H9dwYnۦ2 -8@R1 kn<$Fmԭₒ* B,PwRםw?;םw?sޕ.5]N5]O.;=阝 kcr IiK97!%E ֐pVՓ-%ee-$DjQ$Y$c^uhTc^uhTޙk5߱IMTXl&SsWxrr 1ךkb6[*C%;JSR:knt _֞-8qwwIh'2o<0 o߉2XwF1wZV* :*gifIj2]SV!)X@ֈQ`IOpc]▶#ʷ p2r^h֞-8qwwIh'2o<0RJ~%?oWޡ#Ppqq7sc8 74!O GS@I^gXڜx'jCw9MMt$"C.>m:J^0c˫j>*liAE&e=';wZ؎'*)#yHwbLJ^xq(q3l`”ZFQtlo&>49Ktlr:W/.N҉Vpèu.ۈPRV)#yh'MTkszlrC*u(He3+I'-.e;g328w)#8]yͭ+J3TYZ ]ܽN6NÌݜ !ΕpYT9.: 6IR@8}B_ѾY,X:"I9p;.GI{ I*'=y.i/g]O--)J,)@)@)@)@)AS&Vh;!#[HRZJP q yk&Ny*Y <WRcԜbOX}᫒mR];-ZB9^u.$$E{Bc3d0&Y>;gMGز}ҳ:m0&Y>;gMGز}ҞiL}ɨONYQ,rtSk?2j>œS~d}'ܭ)Z8z35)qhxz39STԥƊ9SS;OSR*v;OQ:ˌGpagʞ~*uP?f/e\g=j}qg}jTi;CsѝާFwڟz.4TFwڟzg=j}ꚔSMJ6hxz39STԥƊ9SS;OSR*vgtkextra-3.2.0/docs/reference/gtkextra-docs.sgml0000644000076400001440000002600512603754176016635 00000000000000 ]> GtkExtra Reference Manual for GtkExtra &version; GtkExtra Overview GtkExtra is a useful set of widgets for creating GUI's for the Xwindow system using GTK+. You can use it complementary to GTK+ and it is written in C. It is also Free Software and released under the LGPL license. The library includes the following widgets: GtkSheet GtkSheet is a matrix widget for GTK+. It consists of an scrollable grid of cells where you can allocate text. Cell contents can be edited interactively through a specially designed entry, GtkItemEntry. It is also a container subclass, allowing you to display buttons, curves, pixmaps and any other widget in it. You can also set many attributes as: border, foreground and background color, text justification, and more. The testgtksheet program shows how easy is to create a spreadsheet-like GUI using this widget set. GtkPlot GtkPlot is a widget for GTK+. It allows to draw high quality scientific plots in two dimensions with a look and feel very similar to Microcal Origin for Windows. The distribution includes GtkPlotCanvas subclass, and a demo program showing two layered plots with different kind of curves. You can choose between a number of symbol types, lines, connectors -straight lines, steps, splines-, and change their attributes -color, size, width-. You can also plot functions, add error bars, edit legends, rotate and move axis titles, change axis properties, etc. The package also includes GtkPlot3D and GtkPlotPolar. GtkPlotCanvas is a GtkFixed subclass and allows to DnD plots, points, and child objects (text, axis titles). You can move them or resize your plots dragging with the mouse! The distribution includes also a PostScript driver. All the features are demonstrated in testgtkplot and testrealtime. GtkIconList GtkIconList is a GtkFixed subclass that allows you to display a table of xpm icons with editable labels. It's completely designed from scratch with some ideas borrowed from gnome-icon-list. It contains almost all of its features and more. It can be used for file browsers and as a replacement of gnome-icon-list (without the need of using gnome libraries). Like GtkSheet, it uses the widget GtkItemEntry to edit the text fields. GtkDirTree It is a GtkCTree subclass that allows you to navigate the file-system. GtkFileList It is a GtkIconList subclass that displays the contents of a given directory using fancy icons for different types of files. GtkIconFileSelection It is a nice looking file selection dialog using icons. It combines GtkDirTree and GtkFileList to navigate the file system and select files. It has also two entries to select the file and filter. GtkItemEntry It is a GtkEntry subclass. It can have fixed size or can be dinamically resized when the text is entered. You can change text justification to centered, left, or right, and change the foreground and background colors very easily. It only displays the text and has no borders. GtkFontCombo It is a GtkToolBar subclass with two combos to select among the 35 standard Adobe PostScript fonts with different sizes. It has also two buttons to select bold and italics. When you select a new font, it returns the name of the corresponding Postscript font and the equivalent Xfont. This is what we all expect to have on the top of a GUI for a spreadsheet or word processor. GtkComboBox It is a composite widget with two buttons, one with an arrow to display a popdown window where you can pack whatever you want, from a calendar to a clist. GtkColorCombo It is a GtkComboBox subclass with a pallette of colors in the popdown window to pickup the one you like the most. It has a default pallette, but it's completelly customizable. GtkBorderCombo It is a GtkComboBox subclass with a variety of border styles in the popdown window arranged in a table of togglebuttons. GtkCheckItem It is a GtkCheckButton hack with the look and feel of the Redmond95 theme. GtkExtra Widgets and Objects Object Hierarchy Widget Gallery Widgets Data Formatter GtkExtra Versioning gtkextra-3.2.0/docs/reference/compiling.sgml0000644000076400001440000000402712603754176016037 00000000000000 Compiling GtkExtra Applications 3 GtkExtra Library Compiling GtkExtra Applications How to compile your GtkExtra+ application Compiling GtkExtra Applications on UNIX To compile a GtkExtra application, you need to tell the compiler where to find the GtkExtra header files and libraries. This is done with the pkg-config utility. The following interactive shell session demonstrates how pkg-config is used (the actual output on your system may be different): $ pkg-config --cflags gtkextra-3.0 -Iusr/include/gtkextra-3.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 $ pkg-config --libs gtkextra-3.0 -lgtkextra-x11-3.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 The simplest way to compile a program is to use the "backticks" feature of the shell. If you enclose a command in backticks (not single quotes), then its output will be substituted into the command line before execution. So to compile a GtkExtra program, you would type the following: $ cc `pkg-config --cflags --libs gtkextra-3.0` hello.c -o hello The recommended way of using GtkExtra has always been to only include the toplevel headers gtkextra.h. gtkextra-3.2.0/docs/gtkplot-5.0.ChangeLog0000644000076400001440000001275512603754176015000 00000000000000GtkPlot-5.0 =========== Major changes and many bugfixes: - Removal of most of the flags, now use gtk_plot_axis/grids_set_visibility to show/hide axis - Added masks for minor ticks - Replacement of GtkPlotFont by GtkPSFont - Redefinition of GtkPlotFunction. Now it passes the plot and dataset as arguments (see headers). - Lots of memory leaks fixed by Theodore Roth. - Bug fixes. Thanks to: Carl Lejjdfors Aaron Lehmann Theodore Roth Sanjay Bhatnagar Wolfgang Glas and many others... GtkPlot-4.1 =========== - New real time demo (realdemo). - New functions: * gtk_plot_layout_refresh Redraws the plots and backing pixmap, much faster than GtkLayout, recomended for real time simulations and fast updates. * gtk_plot_paint Redraws the plot on the backing pixmap, which can be displayed using gtk_plot_refresh. Actually, gtk_plot_draw is a combination of both. * gtk_plot_set/get_xrange. * gtk_plot_set/get_yrange. * gtk_plot_dataset_show/hide_legend (added by Wolfgang Gas, see below) - Three patches posted by Wolfgang Glas : * Fixes for the warnings compiling on win32. * Hiding/showing datasets' legends. * fixes in gtkplot.c and gtkplotprint.c Thanks a lot, Wolfgang! - Thanks to Clark E. Dorman for his fixes with ticks. - Thanks to Sunjay Bhatnagar for all his comments and suggestions GtkPlot-4.0 =========== - Lots of bugfixes and enhancements. - Improvements in printing drivers. - New representation for data using arrays for x, y, dx, dy values. Each set of values is stored in an array: gdouble x[]; gdouble y[]; gdouble dx[]; gdouble dy[]; You can use the same x values for two different datasets. (See examples in the demo program) _ GtkPlotPoint structure removed. - New functions gtk_plot_dataset_set_x. gtk_plot_dataset_set_y. gtk_plot_dataset_set_dx. gtk_plot_dataset_set_dy. gtk_plot_dataset_get_x. gtk_plot_dataset_get_y. gtk_plot_dataset_get_dx. gtk_plot_dataset_get_dy. gtk_plot_dataset_set_numpoints. gtk_plot_dataset_get_numpoints. - Changes in some functions: gtk_plot_dataset_set_points. gtk_plot_axis_set_ticks. GtkPlot-3.1 =========== - New action: Select region with the mouse. The signal "select_region" will return the coordinates of the selected area: xmin, xmax, ymin, ymax. Useful if you want to implement zoom. - Text with justification. - Centered axis titles. - Bugfixes in gtkplotps. GtkPlot-3.0 =========== - New Font policy. Fonts are identified by a user_name and/or the standard PostScript name. The 35 names are listed in gtkplotfont.h All function requiring font settings need the font name and font height instead of a GdkFont. You can add your own user fonts using gtk_plot_font_add(...) declaring both names and two possible Xfonts used to display them on the X window. - PostScript Driver. Completely separated from the widget main code in gtkplotps. Exporting functions: * gtk_plot_export_ps * gtk_plot_layout_export_ps (It would probably need some fixes, I'll be waiting for your reports). The demo program generates plotdemo.ps as example. - Some internal changes (bugfixes and enhancements). Thanks to Alexander Larsson and Arjan Molenaar, authors of DiaCanvas and Dia, for allowing me to borrow some ideas from his code for the PostScript driver and fonts handling. Special thanks to Roberto Alameda , author of FontViewer http://www.geocities.com/SiliconValley/Foothills/1458/ for his illuminating ideas and helpful tips about fonts. GtkPlot-2.0 =========== Sorry for not being very explicit, but I'll describe only an outline of the latest changes because is difficult to keep track of all of them. To move from 1.x to 2.x you'll have to change some few function calls concerning to the attributes settings. It's easy to realize the changes during compilation time, just take a look at the headers when you get an error. - New GtkPlotCanvas widget which allows DnD. See demo. - Lots of changes in internal routines for optimization and versatility. - Changed some function calls. Sometimes you'll need to give a GdkColor * value. If you set NULL, means using defaults: black for foregrounds and transparent for backgrounds. If you set gc == NULL, means using default gc. - New functions added. gtk_plot_refresh, gtk_plot_show_labels, gtk_plot_layout_put_text, etc, etc. - typedef GtkPlotFunc for drawing functions. - New signals: plot->moved, plot->resized. Your signals handlers must return TRUE if you want the changes to be accepted. Same is valid for GtkPlotCanvas signals. - Some minor bugfixes. gtk_plot_put_text. (I recommend gtk_plot_layout_put_text, instead). Fixed rounding errors in axis, ticks marks, and grids drawing routines. - New demo program. GtkPlot-1.1 =========== - You can change background color for gtkplot and gtkplotlayout using gtk_plot_layout_set_background(GtkPlotLayout *layout, GdkColor color); gtk_plot_set_background(GtkPlot *plot, GdkColor color); - Many functions modified to set foreground and background colors for labels and titles. - Fixes in the GtkPlotLayout scrolling. gtkextra-3.2.0/docs/README0000644000076400001440000000131512603754176012111 00000000000000General Information =================== This library is GTK+extra vesion 3. It is a useful widget set complementary to GTK+ for creating graphical interfaces for the X Windows System. It is written in C and requires GTK+ version 2.x. The author is Adrian Feiguin. Documentation was written by Mierla Victor The official web site is: http://gtkextra.sourceforge.net/ Make sure you have the following packages installed with all their dependencies * gtk-doc * linuxdoc-tools * docbook-utils * jade * Docbook dependencies (docbook-to-man,docbook-xls, openjade , jadetex , tex-common , sgmlspl ,texlive ,tipa ,etc) Documentation is currently under development. gtkextra-3.2.0/docs/Makefile.in0000644000076400001440000004460012604172272013272 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ AUTHORS COPYING TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLADE_CATALOG_DIR = @GLADE_CATALOG_DIR@ GLADE_CFLAGS = @GLADE_CFLAGS@ GLADE_LIBS = @GLADE_LIBS@ GLADE_MODULE_DIR = @GLADE_MODULE_DIR@ GLADE_PIXMAP_DIR = @GLADE_PIXMAP_DIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_EXTRA_MAJOR_VERSION = @GTK_EXTRA_MAJOR_VERSION@ GTK_EXTRA_MICRO_VERSION = @GTK_EXTRA_MICRO_VERSION@ GTK_EXTRA_MINOR_VERSION = @GTK_EXTRA_MINOR_VERSION@ GTK_EXTRA_VERSION = @GTK_EXTRA_VERSION@ GTK_EXTRA_VERSION_SHORT = @GTK_EXTRA_VERSION_SHORT@ GTK_LIBS = @GTK_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGTKEXTRA_SO_VERSION = @LIBGTKEXTRA_SO_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gdktarget = @gdktarget@ gtkextratargetlib = @gtkextratargetlib@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgladegtkextra_soname = @libgladegtkextra_soname@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ms_librarian = @ms_librarian@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = reference tutorial EXTRA_DIST = \ COPYING \ HELP \ README \ TODO \ VERSION \ gtksheet-9.0.ChangeLog \ gtkplot-5.0.ChangeLog \ gtkiconlist-2.0.ChangeLog all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gtkextra-3.2.0/docs/gtkiconlist-2.0.ChangeLog0000644000076400001440000000040712603754176015632 00000000000000GtkIconList 2.0 =============== Bug fixes and improvements. The selection contains the pointers to the selected items. GtkIconList 1.1 =============== Bug fixes and improvements GtkIconList 1.0 =============== First public release. gtkextra-3.2.0/docs/HELP0000644000076400001440000000244712603754176011713 00000000000000What does these mean? Please send a mail to kornos@flash.ro so i can update the manual. Thanks. gtksheet: - signal set_scroll_adjustments Gtkpsfont: - a lot of mistery here; see the html file GtkIconList: - gtk_icon_list_add_from_data- need examples - what is the difference between select and activate signal? GtkBorderCombo & GtkColorCombo - what is the "selection" argument from the callback? GtkPlot: - signals - gtk_plot_get_pixel - gtk_plot_get_point - gtk_plot_text_get_area(parameters x,y) - gtk_plot_clip_data - gtk_plot_autoscale - gtk_plot_*_range - gtk_plot_axis_*_ticks - gtk_plot_axis_show_labels - gtk_plot_axis_set_labels_numbers - gtk_plot_x0_set_visible and friends - gtk_plot_grids_set_visible - gtk_plot_major_vgrid_set_attributes and friends - gtk_plot_set_line_attributes - gtk_plot_add_function GtkPlot3d: - gtk_plot3d_autoscale - gtk_plot3d_get_pixel - gtk_plot3d_*_range - gtk_plot3d_*_factor - gtk_plot3d_*corner_* - gtk_plot3d_get_axis - gtk_plot3d_get_side - gtk_plot3d_axis_*_ticks - gtk_plot3d_axis_show_labels - gtk_plot3d_grids_* GtkPlotCanvas: - gtk_plot_canvas_cancel_action - gtk_plot_canvas_get_active_* - gtk_plot_canvas_get_* GtkPlotData,GtkPlotDt,GtkPlotPolar,GtkPlotPixmap,GtkPlotPC - All functions gtkextra-3.2.0/docs/COPYING0000644000076400001440000004327612603754176012300 00000000000000 GNU Free Documentation License Version 1.1, March 2000 Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http:///www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License". If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. gtkextra-3.2.0/docs/TODO0000644000076400001440000000061212603754176011720 00000000000000A few things must be done if we want the manual to be useful: - add some detailed constructive description of the widgets. - add more examples/screenshots - add a FAQ/tutorial - In HELP file you'll find what functions are not covered yet. If you can help please send me an email with the description of the function an its parameters. - convert documentation to Gnome standards (docbook) gtkextra-3.2.0/docs/VERSION0000644000076400001440000000012412603754176012276 00000000000000This is GTk-EXTRA reference manual Currently it covers GTK-EXTRA library version gtkextra-3.2.0/docs/tutorial/0000755000076400001440000000000012604172533013144 500000000000000gtkextra-3.2.0/docs/tutorial/Makefile.am0000644000076400001440000000132612603754176015132 00000000000000 EXTRA_DIST = \ gtkextra-tutorial.sgml \ images/gtksheet_cell_text.jpg \ images/gtksheet_new_sheet.jpg \ images/gtksheet_pack_combo.jpg \ images/gtksheet_pack_xpm.jpg \ images/gtksheet_range_bg.jpg if HAVE_DOCBOOK all: html html: if test -w $(srcdir); then \ (cd $(srcdir); \ db2html gtkextra-tutorial.sgml; \ test -d html && rm -r html; \ mv gtkextra-tutorial html; \ mkdir html/images; \ cp images/*.* html/images); \ fi pdf: if test -w $(srcdir); then \ (cd $(srcdir); db2pdf gtkextra-tutorial.sgml); \ fi dist-hook: html cp -Rp $(srcdir)/html $(distdir) else dist-hook: echo "***" echo "*** Warning: Tutorial not built" echo "*** DISTRIBUTION IS INCOMPLETE" echo "***" endif gtkextra-3.2.0/docs/tutorial/html/0000755000076400001440000000000012604172533014110 500000000000000gtkextra-3.2.0/docs/tutorial/html/x191.html0000644000076400001440000001055012604172533015421 00000000000000 Modifying sheet state

Modifying sheet state

You can freeze/unfreeze the sheet by:

void gtk_sheet_freeze (GtkSheet *sheet); 
void gtk_sheet_thaw (GtkSheet *sheet); /*thaw means unfreeze*/

Set if cell contents can be edited or not in the given range:

void gtk_sheet_range_set_editable	(GtkSheet *sheet, const GtkSheetRange *range, gint editable);

Remark: From GtkExtra 1.0 sheet state will be set with functions:

void gtk_sheet_set_autoresize (GtkSheet *sheet, gboolean autoresize);
gboolean gtk_sheet_autoresize (GtkSheet *sheet);
void gtk_sheet_set_autoscroll (GtkSheet *sheet, gboolean autoscroll);
gboolean  gtk_sheet_autoscroll(GtkSheet *sheet);
void gtk_sheet_set_clip_text  (GtkSheet *sheet, gboolean clip_text);
gboolean gtk_sheet_clip_text  (GtkSheet *sheet);
void gtk_sheet_set_locked     (GtkSheet *sheet, gboolean lock);
void gtk_sheet_locked         (GtkSheet *sheet);
void gtk_sheet_rows_set_resizable (GtkSheet *sheet, gboolean resizable);
gboolean gtk_sheet_rows_resizable (GtkSheet *sheet);
void gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable);
gboolean  gtk_sheet_columns_resizable (GtkSheet *sheet);
void gtk_sheet_show_column_titles (GtkSheet *sheet);
void gtk_sheet_show_row_titles (GtkSheet *sheet);
void gtk_sheet_hide_column_titles (GtkSheet *sheet);
void gtk_sheet_hide_row_titles (GtkSheet *sheet);
gboolean gtk_sheet_column_titles_visible (GtkSheet *sheet);
gboolean gtk_sheet_row_titles_visible (GtkSheet *sheet);
void gtk_sheet_set_justify_entry (GtkSheet *sheet, gboolean justify);
gboolean gtk_sheet_justify_entry (GtkSheet *sheet);

Up to (including) GtkExtra 0.99.17 Sheet state is mainly set by a set of macros.

GTK_SHEET_AUTORESIZE(sheet)
GTK_SHEET_ROW_FROZEN(sheet)   
GTK_SHEET_COLUMN_FROZEN(sheet)   
GTK_SHEET_CLIP_TEXT(sheet)   
GTK_SHEET_AUTO_SCROLL(sheet)
GTK_SHEET_JUSTIFY_ENTRY(sheet)   
GTK_SHEET_ROW_TITLES_VISIBLE(sheet)
GTK_SHEET_COL_TITLES_VISIBLE(sheet)
gtkextra-3.2.0/docs/tutorial/html/c19.html0000644000076400001440000000536012604172533015316 00000000000000 Introduction

Introduction

It is a useful widget set complementary to GTK+ for creating graphical interfaces for the X Window System. It is licensed using the LGPL license, so you can develop open software, free software, or even commercial non-free software using GTK without having to spend anything for licenses or royalties.

GtkExtra is essentially an object oriented application programmers interface (API). Although written completely in C, it is implemented using the idea of classes and callback functions (pointers to functions).

This document is a "work in progress". Please look for updates on CVS at http://gtkextra.sourceforge,net/.

I would very much like to hear of any problems you have learning GtkExtra from this document, and would appreciate input as to how it may be improved. Please see the section on Contributing for further information.

gtkextra-3.2.0/docs/tutorial/html/c229.html0000644000076400001440000000355212604172533015402 00000000000000 GtkPlot

GtkPlot

THIS SECTION IS A STUB!! PLEASE CONTRIBUTE !

gtkextra-3.2.0/docs/tutorial/html/x52.html0000644000076400001440000001410212604172533015332 00000000000000 Sheet Signals

Sheet Signals

The interaction between user and sheet is done(as in all Gtk programs) through signals. In GtkSheet the next signals are implemented :

  • SELECT_ROW
  • SELECT_COLUMN
  • SELECT_RANGE
  • CLIP_RANGE
  • RESIZE_RANGE
  • MOVE_RANGE
  • TRAVERSE
  • DEACTIVATE
  • ACTIVATE
  • SET_CELL
  • CLEAR_CELL
  • CHANGED
  • NEW_COL_WIDTH
  • NEW_ROW_WIDTH

If you want to catch these signals , you must connect them to a callback(function that treats the signal/event).

The most used signals are : ACTIVATE,DEACTIVATE,TRAVERSE .

Callback functions for different signals have different parameters. For a correct use you should check out the Gtk-Extra Reference Manual , the examples or GtkExtra source code. Incorrect use of the callback function parameters will have an undefined result(in the worst case).

The ACTIVATE signal should be connected if you want to do something when a cell is clicked:

g_signal_connect(G_OBJECT(sheet),
                   "activate",
                   alarm_activate,
                    NULL);

//The callback function should have these parameters:

gint alarm_activate(GtkWidget *sheet, 
                    gint row, gint col, gpointer data)
{
................
}

If you have different functions that require the same cell to behave in a different way , I suggest that instead of writing "n" alarm_activate() callbacks , write just one callback function that looks like this:

g_signal_connect(G_OBJECT(sheet),
                   "activate",
                   alarm_activate,
                   (gpointer)function_name);

When the signal is connected , pass the function name (for example) as the last parameter.


gint alarm_activate(GtkWidget *sheet, 
                    gint row, gint col, gpointer function_name)
{
     if(strcmp(function_name,"table_new")==0){
               .....do_some_stuf()
     }
     else if(strcmp(function_name,"table_edit")==0){
               .....do_other_stuf()
     }
}

In this way , you will have a much cleaner code with fewer functions as possible. It is better to have a single callback function that treats all posible behaviour cases , instead of many functions which make the code harder to read.

A very important signal is TRAVERSE.

gtk_signal_connect(G_OBJECT(sheet),
                   "traverse",
                   alarm_traverse,
                    NULL);

//The callback function should have these parameters:


gint alarm_traverse(GtkWidget *widget,
                    gint row, gint col, gint *new_row, gint *new_col,
                    gpointer data)

{
...........
}

The "traverse" signal is emited before "deactivate_cell" and allows to veto the movement. In such case, the entry will remain in the site, and the other signals will not be emited.

The traverse signal is useful when you need to know what cell have you previously clicked or what was selected.

The explanation for the the other signals is quite straightforward so if you want more details you should check GtkExtra Reference Manual or the GtkExtra source code.

gtkextra-3.2.0/docs/tutorial/html/c233.html0000644000076400001440000000375012604172533015375 00000000000000 Credits

Credits

GtkExtra documentation authors are:

gtkextra-3.2.0/docs/tutorial/html/x215.html0000644000076400001440000000545212604172533015423 00000000000000 Row/column operations

Row/column operations

The most common row/column operations are:

  • insertion
  • deletion
  • findind the number of rows/columns
void gtk_sheet_add_column (GtkSheet *sheet, guint ncols);
void gtk_sheet_add_row (GtkSheet *sheet, guint nrows);
void gtk_sheet_insert_rows (GtkSheet *sheet, guint row, guint nrows);
void gtk_sheet_insert_columns (GtkSheet *sheet, guint col, guint ncols);

void gtk_sheet_delete_rows (GtkSheet *sheet, guint row, guint nrows);
void gtk_sheet_delete_columns (GtkSheet *sheet, guint col, guint ncols);

guint gtk_sheet_get_columns_count (GtkSheet *sheet);
guint gtk_sheet_get_rows_count (GtkSheet *sheet);
gtkextra-3.2.0/docs/tutorial/html/images/0000755000076400001440000000000012604172533015355 500000000000000gtkextra-3.2.0/docs/tutorial/html/images/gtksheet_cell_text.jpg0000755000076400001440000001560712604172533021674 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bcccccccccccccccccccccccccccccccccccccccccccccccccc9"H !1S"Q3ATaq#2RrB¡$46bdcst ?obvWUzwj1S4gwO13\?3OwyT1S4gwO13\?fmii'XAq}x>bߊaWAKaEұvSEY_w,݈;7;V3(9nn/{ ^SpYܝ^hյRDf-G H6mU(FJ$h6L7riG೹:=7wm;:Vf X~h'P<Ԏ[\n-&kxɶhAEH^X#@7ܪPO7]xqsGaEUkj$mEH=ζ}_OKM?Ȏ҆Ț)Bz nHeVv+G4a})!{;auA91}t?YQJC%k!m$e7 96Q6dK]U/MΔ: zvnhqX_MN-hԵWJ],LeaPoc@3öN!Q&bUp A;-W)!{'5@hjǃ5`È_[mm٪G4R*V>\Tlu,5iAҰN4NSI1ч;4 lj.K@GᶖZ;b=SJL<ߺ,"1ukz,4Pbm͘bt9E孝.b6C[\BRXXZ޽OBykgz? ǯԜcjNh>ykgz? 孝/K_RsO%_9孝'wSP,zI<=~疶wSP)0 {ʟcjNjեu˨:ʷN6{Zt&BPAjiٔUMk4n )}zcv?}Sj&O -~l?Teat_^L?~''I>f_L?t_^ |̿R~l?TeyɟC3ß  u+pp]QIa ~j8]z |̿R~l?Teat_^CT=ςF5sZ@rnB_$~zZw3uu}̓ O5΍qZ 'W<<(!$Wz<<(!:<<(!$Wz<<(!:<<(!%Vm G9*`-~ ?N ?AA4'NtxxQBtxxQB HxxQBtxxQB H(,EkN#AIfD}&bٌ_s[LS13sT slnGǖA`>lYev'&9u>xn1{.6ݧ)汍ckZ, bf mؕ#Rf*]=PU=6ɬdI|AS?5hWE-46D.,.w˯EWneAoޱc]}?$DDD@DDqո>E# ̑!H:{VЊ}O$# b܁"SQ6Zf9,;ܑ.oYャI67eZ͉#L؄.mhpuhA:ԬM-{n`⹹/%AEW+!щ o5]n.E@wGQ_gs#-̨CK0Xobk i:crKא_{+ &T~H4B!is<TmN!cI()mz"9Й儁M \1OQ,ſMyյ{FiI h?K=:LԱ\{ 紮i]-@2ñ\a`4(.""" ""*UrJ<4 ++&TZϝW%Sk>vovo#ʍ Pќp%.~nzs[:J;Or&sIh7{` Y'w4glԨ,v2Y'w5* %|GsLvJ"gl%|GsRY,D~# S*TD@DDDA*vT#ypNָ8 TDD@\+̞mQYoII4TQe'sy&[w7 QE4oIH%E[w7e'sy YL)d. 7Fcn_2Ɠ9t! #O4ala' H}=6D2QS436|nku&.l@VƓ-i;g:vTOdxH#ms[ j57:8ˈtq_rƓ-i;NLo$-i;2ƓJ,o$NA*(Ɠ-i;_9ҥP9l#:~S5Zg  Oo`It7Th.,&ڋlVRMS8a##I6,@_Z`xG5ϰZ, w2y{s'wDDD@DDDA^GN_ CW8%h&^iY<:ŷ: ^P*IDZȞ} 8n$8kh+&m D.btl,i߸mނ~}ա1PÉgx"53SI,jH{p{}7-U{>:ʆc.-;݈<Wl};!w8imxn{Mf5O.v7ae\[kka _1K"(Cdqk78t{4&;eM8JS&VGk]Ğ7\h-C.3/I*_R*Fu8txv,׶\mxd&C;̳CGP7;H~u= \ɣ|f ]p&: QJ0 XGcI{`7v]I:ٛ6pkkHjZu@f M;ZÅι=vG[~ME\6\RH苞9-6ݿvU*gRDHqu[mЂw뮗(iz$ "CTR_*" """ DDD@EVJHd8FyѠINw^x%΂9p>e2:^<}6k{nÏy.'2Iv0 &y :x2Zy݅ XZSfS Y t2h<6G X3hoVNpIyq$r=Y-]OK3=_:魵/q?kI=9uDXW~q6:KÏy gS>ZKNcs8,p=>yM@iH+kN`A yq$8g }e,YX [,utּ=%%?7gKv^aۖ&s;$nTQg3OI> YỒg3OH%Es;$nỒ b8 卒.u6Ewg_0f_^'` ;s;$n业Pdk[!%wgQg3OI> YỒg3OH%Es;$nỒ QE>&s;$nTQg3OI> YỒg3OH_*,!:#{T5ug.WQ{ D@DDD@DDD@DDD@DDD@DDD@DDD@DDDAgtkextra-3.2.0/docs/tutorial/html/images/gtksheet_pack_xpm.jpg0000755000076400001440000000622312604172533021505 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bccccccccccccccccccccccccccccccccccccccccccccccccccw"F !S1Tr4AQRaq"6UVt5cdB$2Cb! ?av>E5E ,KOH=ŠI$M֮)¾fnQߓaHZ+ff+ffL3+ff+ffL3+ff+ffL3+ff*)ha880BK9\|e݈9}%|r@d2=lQUNn4A 0hPhW ֓Ld{ʚ<~Q壕[qW3Uv f52 ~O+UO3Xw BHcJ9}su'*jS.LF]a\| }su ˰WY3'ωhp$}a\| .)>GVUG5I|>FHi"SЃB- rܣWsBqy85gz X|ma]wȼ6Z4ִX<@-5gzpX|m2"a]wvރ"-|5gzpX|m2" 4N788O>OZa]wȋ_vޜ5gz 3CDNx,ncQn;`Oiط'~NF?կ8^q3&q3=V u$Ui^3UZ?Ɨ9oϳ9\>>Rkq?؟%tr7ˁb=撚kEˉi>RkqqH;hä%iG """ """ ?ET @v*""" 6bYȅ#rz]$Asڃ;~-t7?jPQP|lZ 8|Lsȑ&'&X[sxi]$Asڃ2`X. @y "?r8 hxc?XFoUSMW~jz;P|zj{SLW5_&5;Uߚ|zj{SLW5_&5xO k[A0;ORyqOtb ^m\{gr^m\{gr Ƕw%Ƕw* ^m\{gr^m\{gr Ƕw%Ƕw* sٌ#$Z>ORyqOtb ^m\{gr^m\{gr Ƕw%Ƕw* ^m\{gr^m\{gr Ƕw%Ƕw* sٌ#$Z>ORyqOtb ^m\{gr^m\{gr Ƕw" "" ]̀vFIŢaX\nSuC$MF4F XhѡD@DDi.UD@DDD@DDDA*;QJTDD@DDgtkextra-3.2.0/docs/tutorial/html/images/gtksheet_range_bg.jpg0000755000076400001440000002136512604172533021453 00000000000000JFIFGGCreated with The GIMPC#;&# #H36+;UKZXTKRQ^js^deQRvw[qC##E&&EaRaX"B !R5S13qsAQa"Te24t$bB+Q!1R23qAa ?eQ:7/entS^Q>f>$ψUܓcNXmnuK\]ǒZ~vk_$ψUy%|GmfuK\]ǒZ~vk_$ψUy%|GmfdYz-\_(Eʩ+Lzs~r*Qg,USүn45*O$g+zk5*O$g+zkCV=S]s7Muf&D=3^IWWy%_c?Q_Y~IWWy%_c?Q_Y S7nWMM3]S3LgUi_:usOW4]\5?7 0:*wE航E3DG 5?3]\pusOW4]\5?79W4usOu?3]\pDٻnʬ9jy<O(Df뫚~f:柙iκk~nsi柛뫚~f:1MګvMSrkהE<'?(柙iκk~nsi柛뫚~f:柙iܦժ\"l_co爢U6*#U\8}i i柛뫚~f:柙iκk~nsi柛nͦUZw+.S5irq_4?3]\pusOW4]\5?79W4usOu?3]\pw+sUU~j49GEZrUuOxr?[KKEYsΪgvnݪ&',:r?ȶ+oeZݟ_ZFZ}fzb/p.EVYPfvUM4ժfes}].]]bg/5Sr+"Les-kO 55I,mX۽}Zgy_@]mG%*?j=)u\`6V\樷38ChQ\n(b&Dje&?{}s3M6b))"#([=aÛ=a}<,jh{u)XnNwm]jf+5e1DG {y zѸOqo 7?kpg y7?kꙦj兿8;ɢmΪfsʩ |[ n5 !_<[ l⩿r{jtqQ?{{?Gk/|=DTNsYQ9CsQE'Q_ạV=yOgɫSsQE'uS3N:5EQު'85wMZW>›DG"[6l\ݚgESzOLɫSghm,(fji\1K՝{YzɚqI4MSNr:>ƔuFyV*K՝{Yzɚq0K՝{YzɚqH/sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|,VVuue&j,VVuue&j N9Lw5+^ib{/Y3V^&ib{/Y3V^)p8y:c_*K՝{Yzɚq0K՝{YzɚqHyJWX>L՗X>L՗@sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|,VVuue&j,VVuue&j N9Lw5+^ib{/Y3V^&ib{/Y3V^)p8y:c_*K՝{Yzɚq0K՝{YzɚqHyJWX>L՗X>L՗@sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|,VVuue&j,VVuue&j N9Lw5+^ib{/Y3V^&ib{/Y3V^)p8y:c_*K՝{Yzɚq0K՝{YzɚqHyJWX>L՗X>L՗@sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|쭼W~nۻ&)O7x-'ǽ\# >'݅ j6]\? |Kv-]){&j_)y@%j9 yu A.fw~ >'݅⪩ifrEOf?<"r)]){%k/|=DWc (3:UUU3Te#Ҹp}f3NYMN[\MriNs9L?h4|Kv-]){&j_)y@%3A5g,]c?~KIozZNnW쮏 ͝ѸOqo {}P]){%k/|=DWc (^r&jf]cp?fw7x-'7WGIf'݅ wF=ž(xc"mUUzc)ۧ~bkQ12ZfՊf6LsS`zmҗ"[R݄Ly:RK5SUS4PU5U3LeSp}fA.fw~ >'݅*k*bc8y۱S5zjgfg/]){%k/|=DWc (TM5LS9}T.\>A.fw~ >'݅*i. {5^ݷhks8U<">zTسMff)Lf~}2@-R݄KvJ^{2W@P fibi)u>.sozZL߳}swڿetxTfl{}Pgtn[€y߹6\MQVG\U.LU"bV|4'?AX]){%k/|=DWc (F3&Lg}T\}پ]i3~KIjR@7 -aB}ѸOqo wS~57)fcӔN,E޹Mw+)J4Q O=|Kv-]){&j_)y@%4U1ahu>W.sozZL߳}swڿetxTfl{}Pgtn[€رrq3MfvWE)Q(~jM3b*˄g>Ę,&ۛ65M;XJ^{nKv3UXH,U5LU9M5STSO~KIozZNnW쮏 ͝ѸOqo {}PF&>q\)4s1gUD]QE:UNYQO3O9 |Kv-]){&j_)y@%ʨמ~НZ_u>W.sozZL߳}swڿetxTfl{}Pgtn[€2WlMuh&~bub"ݹ1"UOq+|Kv>18]wf),F_oS4lQVsٌ6|u~m:?j|(諆0oSyp:$諆0oSyp:$諆0oSyp:$談NS5}wMSe;vtֱ"jt nypݪ5qnW՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟c[fwda.`u=٦k'݅+؋6&nܦU3g<MUX)j#14U$31M陘Dh?P>,wfl{}Pgtn[€qUTTSg3tzժ(ʈ/(ϫpf'݅i[Vf/[TsNy~mXkmYܪ>ϫpgtkextra-3.2.0/docs/tutorial/html/images/gtksheet_new_sheet.jpg0000755000076400001440000001443412604172533021667 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bcccccccccccccccccccccccccccccccccccccccccccccccccc"I SQ!3Rar"124ATs#BqUV5bt$Cc ? BhfPH$TIJ+DDN>tW噑: כWBӤ 'ELY3""Ӥ 'ELY3""Ӥ 'ELY3""Ӥ 'ELY'Z-H *5U?'<"~sZ2W?H1)/lPEVQFWIM|,(<,(hg88ZCTbq5ƧI\Ј:#sH$W"9j hbЌHcUʍNryWUx )GDID9^檢Q88865fUTxDj-|j8Cp%J|Q&w95WN5EN?&3M%Lȣg9Yb"xnq%\a m!Z+lOͩjEZZxS|z+W#v'\+Z\h^P`kGZWךMP<+cs\-'^ -njʹ>o%Mݼ|}_A(?`^ݼ-M~J>o%Mݼ|}_A(?`^ݼ~>fDr**yOy/֬GM J]T8?`Ќf;ģ_Jʑs.>vP|O46[n6>' VSE{E/`,2QeHWRKx\ˁICu(UkTd\BG+)_~51v5 תv5j]s 5]s z?gq\gXr ?Ï 4] 3)0I zѲ1ZY=}(8^TRJMz)RPrkwyJ(95뻼IAɯ]*׮&wwPt3RdjHFDErVp4x!H3](.CAcGeH|ovPCAfV偌|_~tu!EȍG $r7Ȋo;<ovP7Ge;դ)(R8QS>F׭MDUH⫋545/h{*\O榕򏚚WuO榕򏚚WuO榕򏚚WuO榕5c;)m8.W1ZvX#~R%n[`g tTtvosrrkwyJ+7I 7IJnnBnnE@}}P}&,}&Tܬ_zx7j}& ׮Vosrosr*܅܊%f77!f77" YMYMȨ<1X\n=پMAɯ]*}&,}&T+7I 7IJnnBnnE@}}Pxcr~;ݫ{}^T YMYMȨVosrosr*܅܊%f77!f77" QҨ+w95뻼@ 7o z7: UU]IUu~螎{*\FIl"VJ_Zk.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮Gk^@ 7o z73dNtQ?(ҾER_IKHpT]Kĕ**z- 좹*|VVpiZqgJ Q8j5=>|T 'PrkwyJ^T Aɯ]*JMz)P%&ww(95뻼@R׮Prkwy@^t@{ Q~\MZ>M V{s{sdţdAɯ]*gG#^3mڽ'GɽPJ2onb2on`T}̛ۘ}̛ۘs&-s&A+GɽGɽ^T F/Խ|gz۵zOv{sdţd%h71h70* Z>MZ>M V{s{s&ww_zjs&A+GɽGɽPJ2onb2on`T}̛ۘ}̛ۘs&-s&Mz(u%ZĽe|Q~\(. .#dUQ"ԪWCJCH,`lOl=YbֈU|IWUKR4+i HUYmڕ/7DtR({*\ Aɯ]*JMz)P%&ww(95뻼@R׮PrkwyJ^T Aɯ]Mz(=B(FM!p4Qtȣor5SGƲQf"ԮEZP(ҵ"*>_Zf;7dyz:}p%l͒vn[3d*6Iٻ!l͒vnȨV'f셳6Iٻ" [3d'f슀33Q9aWl͒vnAɯ]*N flvE@f;7d-NJٛ$ݐf;7dT+flvBٛ$ݑPxfj1x;;j홲N95뻼@6Iٻ!l͒vnȨV'f셳6Iٻ" [3d'f슀%l͒vn[3d* F/}m^ݳ6Iٻ!&wwf;7d-NJٛ$ݐf;7dT+flvBٛ$ݑPN flvE@ᙨ{f;7d ׮V'f셳6Iٻ" [3d'f슀%l͒vn[3d*6Iٻ!l͒vnȨTu%]wAɯ]|Q~\(.=,@u卍|nWUlTwHZE<|T^TRJMz)RPrkwyJ(95뻼IAɯ]*׮%&ww^Pˠz7P=By{$nFr*9JQ}J0GA"F1O` tOGO.| 9G}y<A:sAɯ]*s<A:s&ww:s<A>R<A:s<rkwyJ<A:sAɯ]Pgtkextra-3.2.0/docs/tutorial/html/images/gtksheet_pack_combo.jpg0000755000076400001440000006037712604172533022012 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bcccccccccccccccccccccccccccccccccccccccccccccccccc"S !1"AQ2SUas#35RTqt6V$4BrbcCd%$Qaq!1BR ?0>|*jYf7$1{A$.I$\x2ٙءߗÇp+[O' e39' e3IƂ>I¼CNI¼CRmG*)ha880.--gpk$舀j~3QU Jftz.tEY) h*%+\ f\jv[=+ [K:Fm-q7am䒡:voN^ԋ[q@DD^Z,VCOX,+qz!q/U }N/D'!a_S 6+8}N/D+D XWBr8mh!a_S XWBYQ3"ʹmNg4<-8}N/D*428KiiIh]@XzZ3Y6ܖ=hGdXWBr8&{%l2hYAe'YZ XWBr8mh!a_S XWBM }N/D'!a_S 6+8`Ѳ[M )6i'%CSFb?4(NO~3LX pjaJvVklMu<5tϞGG"Ld,vQd|;_\E>"5SA}ko: ,& Ih̢0nNKn[h1c8F9ڑ &a ZHu6Jx@/3qp˿!QbVT2G65ZCön6}WT5{x-FvMW58 i}/" ǡ À{twKou;1s߇R97.0|˞F¼G؂-~ݿHyԼx679 mobCΛv!R6?Pl+~"۷:mKWhC{ nߤ<5(~ Z#a^ _F00F؂+Dcs-WڻzgEc B֗m@6ew]zg"/h :ڀmq<(`e 41ǘ?##fk K]zgx \A2do>¥V?EޙN+w{PTEo]zgW խ'P*/Viye{AsI6_~ A&ʣTw} A> A&ʣTw} A> A&ʣTw} A> A&ʣȧ1>7gdlGH#q#QҺe4&ros$N p%*_J*p%*_J (Ro(RoJ&J&6 cԿqUMC4qq }lsPztcԿAs-f1M :H'Mm{oVv$Um/Pzh#q3xoWػٿIobSV)PE~ٿIobE~ٿIobE~ٿIobE~OWDH`A 'xh~bt(<^Ec,z*%,c`/8 SBʤSvл#߈Gk\?dE$^nbTj*I)%i![[uLU1DF0OO *|??'KVSᙰHcHY^5fr|6LͶoMPa ŸT7 OVZI"`l4c/ua'9`&-%~=k͚ݦcgG7Y^p/ܐK#\s]Wp㩺T;p` sfH"è/ &Ώok\w~qL !JwF^cѸYM˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}é#8)ZG`|kl HǵhKMAcOb-'MX[BF?pw$W"Ǝ-x8Y(qeM3-I#3lbä.SEQ0W<>fGksGQi~RԨ?@?@?@(RowڸK[=ּk5/e}m7/4sgy tc"/Ov|g泵nelE_OgjfQΌZ/OvelE_OgjfQΌZ/OvelE_OgjfQΌw*~ȿ%k3?Yڤf _SO5]>7Zvv+]3DJq=gϺE?=}/p-Q|)TQ| j" """ """ #9@{W* w3ؗ* w3ؗ* w3ؗ* w3ؗ* } UF_$4;q"_̽,s`6oi;<4 ZKt0Jy,L^Gi9[ƀX7 ÇdmyYPӗ;^ho]K0c|[X1nwH9#09H$5 ZvBbȣlA9s^:SWSt:Y&gj^ָ  XX,u55lYMcg(/r#s~ -Ռ 9FL f@nݧ%Xq {iˍ,b@!|i Š慭5 =GǛD!Ff xnREq>g:gy6f2 tH $fW]QѨ_]a=^82h&F3aթ'N Ey<[8 vU2Gm֤8e1uP۶W=*$k\@@l)WLiG5tNv-n]zCI˨VaXtU56:ZgG<x4tczފ[$q{v9G\u&®[askIˀkG۽cҸ{3>wG >dXG >dX~at Ag{ ^Z3Q" """ """ X4̑{(bs\b)b b5cw39D4CchqxiQpJh+inhmpiz9i8w6p ;ZH\\tp:>" """ """ ,|-k|->Hf"" """ "" $D@DDD@DDDAi1#{P湦ŤR2 TbϖW>Բ ]Y-%qY: y)`c{\f4^RjbkIvA4 S,i*+3ŵr?w;pu$l\C@Nu?iP8cdve%#1Y5VG >dXG >dX~at Ag{ ^Z3Q" """ """ X4̑{(bs\b)b W$Դ&Q}D5&W9 s.[/opJh+inhmpin,h!w\Im{udrY[Pa$1Ē۞I,/{њZWRK<3Mr-},wn[Xu-\ImsC^S5=er.c DƌA0o>~dϯi*_$r2VԲ θu›kas-LI \qKmfɼa9 =G׬:vDܭ/sȽsDD@DDD@DDD@DDD@Y(ZbY(Zb ?=}/p-3{h """ """ """ """ DDD@DDD@DDH`>.c2F1졉sMHe+V7SإDpbTL2k:XkU8%u474RNǶ4h=DO3sE+  Sfb5Z#XHċ_aMw2Sw,#{ ݶKptpxc?l>`FYd2Gs˚i)m{ }PAK=%/a<58DnB2Ŧ:퀹15ad0C+\3I{{ti qG !ɳncB uߡhR6Pߍ{:I |$DDD@DDD@DDD@DDV-uV g"Y>" """ """ """ "" D@DDD@DDDA>|goh3ΛF}6v>|goh3ΛF}6v>|go|\dcCHWt# m<2lӾQaIX8%u474RNǶ4h .OK!=F\LH k^: .mS[lf˳\mof$se:2n:ujIӤKl_>|W^|wt:YY%ݵrK AnAI3j1T P . 1׾ma=^82h&F3aթ'EL'1 F)cݲQ#Ze:7kd8s_5C咗Ɇٵ+m-q^QfKXK ˕Rf'1˩'KY^@DDD@DDD@DDD@Y(ZbY(Zb ?=}/p-8=UA.6mџMthϦ:mA.6mџMthϦ:mA.6mџMthϦ:mA.6mџMthϦ: +q&Pj }Cۚw}XN[X[wcYKO\G"s 氌op`EOYY T]Q8)lX1e듉;k]can S{-nx7eVbR5c \9#58Y&'=?|Ѱ x渆!ڇ,MnJ TT0ʹ$5 ->k{kįTGTmQ6|n:EhOQX*( $.˔"뾖!W1 {)ɘ=u ūaV>]jter\J',V cAoK\RH|KY7N]rӚ*:6Namlܣz+짝6i10UsuݐT4#+۴t8=w]NaStw7&-5Q 'd66ӽ[V#${F9Ĵ\Krۺa㔶g:CSapֳ#X֎8D@DDD@DDD@DDV-uV a- iY-k e\st:3{h st:rf9:Oe?o" L<'I&cS st:rf9:Oe?o" L<'I&cS st:rf9:Oe?o" L<'I&cS st:rf9:Oe?o" L<'ID,Y66Rs2YN]꺛WI#_lh$nqظXX:iS8])^32g urp=ds<ۅ" a$k;   @ Q$شAmt: MMՔA5$4Aε${IOS wZ5[k*s!Fs^=qeH5؍J,L3kp>":V }7b03;aĴw é4i-1nWjc\gl`g4{+7=8sPzaqeke$e1'57ݡQ9!#ǜN^vUsS7=ExsS7=ExsS7=ExsS7=4̑{(bs\b)b .aMw2Sw,#{ ݶKptGfX)d2Gs˚i)m{ }PAK=%/a<58DnB2Ŧ:퀹15ad0C+\3I{{ti qG !ɳncB uߡhR6Pߍ{:I |0x8MA<{kNaTgg ;]?4s7~o{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fS 0ɉITRDqm;pqpw߹*c%SO,RO$4o7ۡS宖=2<ݔY4-tIAguM֚>,|r afmdX/؋j1R"J&Jmm4k}2Rx$A9ݧz+Zhc1\ ;?L #2?AZ#2?AA?gϺE?=}/p-D@DDD@DDD@DDD@DD -*Ș\hmxNUAƫތ Wz0~Aw&ƫތDlj-]Iw) Wz0~lj-]JtAƫތ Wz0~cpJQD kG1ZA xb0aaf^P27^ƱξH:*xelǕX:m;?kQ_,330֛^H8!e=>̇l^5m-; u;)?wS5[D@DDD@DDD@Y(ZbY(Zb ,U'- 4vkD6o4h/>rj-]J ,?^Aƫތ Wz0~Aw&ƫތDlj-]Iw) Wz0~lj-]JtAƫތ Wz0~Aw&ƫތDlj-]Iw) Wz0~)rsCA'+KRY4tgٸq5q6'r혤zYG+c7kH$͹uR ȨcV8$a8<4mF\c$m75pi 􂃤UN%H*Leָ1)IX^tyR eso1278#)67Aq7qcccs ^\Xu.%IBs5Ɨ; nM:s9Yź뎻Xj(sˉ/{bcql},.m`N!qc_J$f(-I#As󠺲1% j(y5#- <100ʊ/(n2 X[Y\p+j-<p6Z8͐Z#$ɦ$TGu^-=}3CJhӚyݛY]*69"k y smZpJ  :i[QCl5]s{QII+$ff:rGqpw5@9d1^.>5znE\Eˋ$OI:h%\0a9sowBr~_6Al2 )^̭P/iqnk}IVxlʹzvW8=[]oa1eg+I&ps4_@[qAeA0Y\@?̫(R^״?qX,q Dz|K;ZM _q[ƴ lBbso>V8: ̸qD6fqX^]4~qk>F麈3*(*ad_-TS9 3gpMwL{T>$fk34RQsmisNVe\ VS}8D=oZ{޵ݫAS&LM]ںD=oZ{޵ݫA($i;slޙI5UeL-NCfbfMٕ8 |Gz8'gL7rAƾJj \f.quK=%/a<58DnB2Ŧ:퀹&KD9hecU+ln) 8Gٷ1!д M2GbF*d& gܙͮX.kbBiv{KZX@DDD@DDD@DDD@DDV-uV 4#Ʈ=oZO~WsɽkWD2? #=2MA" MAtt~P{] """ """ ""mTi'e:G=ױAqGQHזvۡ54l*LlsA˕\ EU\,Ī_QE%"9fnPRTI$I$AcrIm;f4uoAje#t yxmlNb>A|}edy`ja&g6bl[pAfG%e\GQ@ cm"m;W%H.#iqU6_S$141/X-4f<9|~KCOIǓ,Ls2FY"Vy^ݥcCpȞė7sks4Y;GNțyqq>rT8Q#Ů8Q#?GyQb̿!/WK~B_&ts&\\ɺ?(=.r~_6].Oy:DDD@DDD@DDD@DDD@DDuQ<ncwxBoeEY7}LXm\Gr-_85N5iv{KZ̳[/_tۍ@[g hZsUQؾ4XSg7k& 7iYZSKA.I5 r\ě8BX#Fп; 8` ۊS'X(W7 .w='(] Q5E@2ma6sp@ʜ2IlTI$r_>u̸E6@b-D26E@΂1*K;YM(6;1䜤nk6I窨VVT9\휭c^=VVOU M^\{\z|.}${Gei09Opi&#$g8 {i=$77 #Bܬo䓩$I&䓩&DD@DDD@DDD@Y(ZbY(Zb XݣB1av _ɿ+̿!/Pt9t~P{].dH:},qkT?IQwa)i+!l~G؇w6yƎ#+?9]a?11JXi^^^4Ef[7rރMLqT:G0!kCA|5F)jMd4RSFati6tH+bjy+cb Im.$ c 2Hcˤq,vfI"=eMv)=\tBΧs'mi[#1_Km $<ϖG_R]^0Ygo4s46:wK:Lk+&8F,(IˑcNk'/toC#䣑="qg?,ۿ.mS[lf˳\mo ) mdXG >dXhЯ*8XݣB%oJs/K""dK7G" """ """ (!i8^*m8&Ren7L5vwf{I'p """ """ """ """ 4̑{(bs\b)b b5cw39D4CchqxiQpJh+inhmpiz9i8\@c}rګk]!H#Z HAdEL'1 F >GkT(l:$^Lj{)ư2G5r =)cݲQ#Ze:7kd .d惕Xj r 8&j!Zj}<Ŕu&2ѷ^彅9d>HH`Z XZ`\5Me, .H$QȣlqckZ`7t #2?AZ#2?AA[~W,?^@\7t%oJ2nu˥̛r+r/AS5+yCu+c)0昘{1i$Rn7A59ك_ qX8Ă7 ʶʓ[T%60 mvh;w-5VZ'9k/`fu4 b!M lg3\ "yUTꆍgF.F7@N=SSi #mrV m(i:ahY&K2-NIނ9?N;v;mԘtpus{]F[ۯ#}jdth7]ՊziaJꊀE>kAAC jYύm5qibaľ7 De`ܺ)|sÝżgUi$R;6)Z6h6l;nUsNX;G |;w67۰񉦆 ȸhoN掕,0jL,<n`-~Yd4H<.i!.xy~mtG$Cd >(+7yKzDa^%=Kֽ[M˺ZN/$ig4&PrY =AH9Dz'56-" S%=h](Z5pH VK;00,+%^|t(*6YʙLR6i(f$vM,MtL0gM%[ :A}mpԜz#.i| /mAHiiLTŎNB䃿K2j%F)?{fږ|&Fnnrw[A5Mn`X4JV;N 5W*zHjasĢ0Hkbmk.,5ZӠ -1k8G̃k|RrY06%p͠n*Dj&ԸC,ٝ9LY ŶuqM,sc5,&C.VJǛ.-e3i :;WystXXXZ3jh#v;fjɠWfwNiQPʂߍcƺ$.c2F1졉sMHe+N±)c^9KdCn,6ۣz(# v=`#E&G4n522h-T~q5ALN )v:,qXsl-e;۝,dwGyׯP!kKKO$Mt䘟ۂgPPSbdgpJ2>kI.4.՜ IFh - BnAl`r>\ G}4nsn\KE*hhi<^# \rܷR⧅bm`8Q#Ů8Q#?GyP$`\h´>w39w3,]+C N]+C A?p C;Sp C;Ph"´>´>w39w3G̏~+Vڳ8Ca8QWMVG3\:PwŇ?t+ʎhЯ """ MAtt~P{] """ """ ""\,Ks^R:KmBJL4j%S2&X0OMXhj7{j\`cn1amhfKM ct`) RgnGݠnPc υΫ0H#t6%huxo\AQ %1d9w0^֖c8ȉ,kXa7ym-;*]R"Y҆ hNA#[Ly%ßUg05s6[rY-E $o&HZnHi2ɒ&7f܌@4CA(⢥41捱\Xt1їJQ0ɚZӶjXeFׇ}WCd}۷Awɴo32so32mz̺Dz̛Aަ7*U8=5SD5E `om|>\'b Syh;feː}V$N\'b Syh;feː}V$N\'b[`k kZ,xzh;w?\'brUI;|Z]ODZ]OE I؜kN9{SQ9{SQ}>_v'.AZdE5NE5_yr$ː}V$Ah;w?h;w?\'brUI;|Z]ODZ]OE I؜kN9{SQ9{SQ}>_v'.AZdE5NE5_yr$ː}V$Ah;w?h;w?\'brUI;|Z]ODZ]OE I؜kN9{SQ9{SQ}>_v'.AZd<3686Xiwo32>_v'.AZdwd;9Vjm >_v)!2ȪX] fnA}s&\\ɺ?(=.r~_6DA" """ """ "" xW>#h"" """ """ """ """ """ """ ""t>H%DDɺ?(=.gtkextra-3.2.0/docs/tutorial/html/c241.html0000644000076400001440000000500712604172533015371 00000000000000 Contributing

Contributing

This document, like so much other great software out there, was created for free by volunteers. If you are at all knowledgeable about any aspect of GTK that does not already have documentation, please consider contributing to this document.

If you do decide to contribute, please mail your text to Victor Mierla, victor.mierla@flash.ro. Also, be aware that the entirety of this document is free, and any addition by you provide must also be free. That is, people may use any portion of your examples in their programs, and copies of this document may be distributed at will, etc.

Thank you.

gtkextra-3.2.0/docs/tutorial/html/x205.html0000644000076400001440000000544712604172533015426 00000000000000 Selections

Selections

Select a row/column:

void gtk_sheet_select_row (GtkSheet * sheet,gint row);
void gtk_sheet_select_column (GtkSheet * sheet,gint column);

Unselect a range:

void gtk_sheet_select_range (GtkSheet *sheet, const GtkSheetRange *range); 
void gtk_sheet_unselect_range	(GtkSheet *sheet);

A row/column selection can be catched using "select_row" and "select_column" signals:

void (*select_row) (GtkSheet *sheet, gint row);
void (*select_column) (GtkSheet *sheet, gint column);
gtkextra-3.2.0/docs/tutorial/html/x114.html0000644000076400001440000002571712604172533015427 00000000000000 Modifying cell contents

Modifying cell contents

As previously stated , a cell may contain text, picture or other widgets. GtkSheet functions can be categorized after the number of modified cells:

Functions that modify a cell

A cell text is set by:

/* Set a cell text with justification */

void  gtk_sheet_set_cell  (GtkSheet *sheet, 
                           gint row, gint col,
                           GtkJustification justification,
                           const gchar *text);

/* No justification is made */
void gtk_sheet_set_cell_text (GtkSheet *sheet, 
                              gint row, gint col, 
                              const gchar  *text); 

The text string will be strdup()ed by the gtkextra library so you may free your string after this line. Do not free the internally allocated string ! This will be done by the library at the destruction of the sheet or when the gtk_sheet_set_cell is called again.

The text justification in the cell may be : GTK_JUSTIFY_LEFT, GTK_JUSTIFY_RIGHT, GTK_JUSTIFY_CENTER

A cell text is read by:

gchar *  gtk_sheet_cell_get_text (GtkSheet *sheet, gint row, gint col);

A cell text is deleted by:

void gtk_sheet_cell_clear(GtkSheet *sheet, gint row, gint col); /*- delete cell contents */
void gtk_sheet_cell_delete(GGtSheet *sheet, gint row, gint col); /* - delete + remove links*/

You can pack a xpm into a cell like this:

GtkWidget *sheet,*bullet;
GdkPixmap *pixmap;
GdkColormap *colormap;
GdkBitmap *mask;
............
sheet=gtk_sheet_new(...);
.......
colormap = gdk_colormap_get_system();
pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL,
                                               bullet_xpm);
bullet = gtk_pixmap_new(pixmap, mask);
gtk_sheet_attach(GTK_SHEET(sheet), bullet, 1, 1, 0,0 ,.5, .5);
........
gtk_widget_show_all (bullet); 
gtk_widget_show_all (window);

See full example here: xpm.c

You can pack a combo box into a cell:

GtkWidget *sheet,*combo;
GList *combo_items;
..................
combo=gtk_combo_new();
combo_items=NULL;
combo_items=g_list_append (combo_items, "NULL");
combo_items=g_list_append (combo_items, "NOT NULL");
gtk_combo_set_popdown_strings (GTK_COMBO (nul_combo), combo_items);
g_list_free(combo_items);

// From GtkExtra 1.0 the cell may be resized automatically to fit the widget
gtk_sheet_attach_default (GTK_SHEET(sheet), current_combo, row, col,0,0);

The widgets can be added to a cell using these functions. Some of them expand/shrink cell depending of widget size ,others don't. See the GtkSheet manual for details.

/* Attach widget at (row x,col y) starting at the upper left of the cell */
GtkSheetChild *gtk_sheet_put (GtkSheet *sheet, GtkWidget *widget, gint x, gint y); 
void gtk_sheet_attach (GtkSheet *sheet,GtkWidget *widget,gint row, gint col,gint xoptions,gint yoptions,gint xpadding,gint ypadding); 
void gtk_sheet_attach_default (GtkSheet *sheet,GtkWidget *widget,gint row, gint col); 
void gtk_sheet_attach_floating (GtkSheet *sheet,GtkWidget *widget,gint row, gint col);

You can set a link for each cell. This is in fact a pointer you want to be associated to the cell.

void gtk_sheet_link_cell(GtkSheet *sheet, gint row, gint col,gpointer link);
gpointer gtk_sheet_get_link(GtkSheet *sheet, gint row, gint col);
void gtk_sheet_remove_link(GtkSheet *sheet, gint row, gint col);

Functions that modify a range of cells

A range of cellsis in fact:

struct _GtkSheetRange
{
  gint row0,col0; /* upper-left cell */
  gint rowi,coli; /* lower-right cell */
};

Some functions operating on range of cells:

void  gtk_sheet_get_visible_range (GtkSheet *sheet,GtkSheetRange *range); 
void  gtk_sheet_range_set_background (GtkSheet *sheet, const GtkSheetRange *range, const GdkColor *color);
void  gtk_sheet_range_set_foreground (GtkSheet *sheet, const GtkSheetRange *range,const GdkColor *color);
void  gtk_sheet_select_range (GtkSheet *sheet, const GtkSheetRange *range);
void  gtk_sheet_unselect_range (GtkSheet *sheet);
void  gtk_sheet_range_clear (GtkSheet *sheet, const GtkSheetRange *range);
void  gtk_sheet_range_delete (GtkSheet *sheet, const GtkSheetRange *range);
void  gtk_sheet_range_set_editable (GtkSheet *sheet, const GtkSheetRange *range, gint editable);
void  gtk_sheet_range_set_visible (GtkSheet *sheet, const GtkSheetRange *range, gboolean visible);
void  gtk_sheet_range_set_border (GtkSheet *sheet, const GtkSheetRange *range, gint mask, guint width, gint line_style);
void  gtk_sheet_range_set_border_color GtkSheet *sheet, const GtkSheetRange *range, const GdkColor  *color);

Remark:

/* When you declare a range like this:*/

......
GtkSheetRange range;
.................

/* You must call the range functions like this : */

void  gtk_sheet_range_clear (sheet, &range); 

Screenshot:Modifying the background color of a range.

Functions that modify all cells from sheet

These functions are used if you want the cells to contain the same widget. These are some of them:

GtkWidget *gtk_sheet_new_with_custom_entry (guint rows, guint columns, const gchar *title,GtkType entry_type); 
void  gtk_sheet_set_foreground (GtkSheet *sheet,GdkColor *fg_color);
void  gtk_sheet_set_background (GtkSheet *sheet,GdkColor *bg_color);

Functions that set row/column titles , sheet title , etc

A row/column title can be set with:

void gtk_sheet_row_button_add_label	(GtkSheet *sheet, gint row, const gchar *label); 
void gtk_sheet_column_button_add_label	(GtkSheet *sheet, gint row, const gchar *label); 

gtk_sheet_set_row_title() is used for setting an internal label associated with a row.

The sheet title may be set with :

void gtk_sheet_set_title (GtkSheet *sheet, const gchar *title);

The dimensions of the row/column titles may be set with the next functions: These functions exist because you may want to resize the width of a column or height of a row, unless you set the autoresize flag, which will do it automaticaly for you.

void gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width); 
void gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height);

Row/column title justification is done by:

void gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width); 
void gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height);
gtkextra-3.2.0/docs/tutorial/html/c27.html0000644000076400001440000000420312604172533015310 00000000000000 Getting GtkExtra

Getting GtkExtra

The first thing to do, of course, is download the GtkExtra source and install it. You can always get the latest version from gtkextra.sourceforge.net. GtkExtra uses GNU autoconf for configuration. Once untar'd, type ./configure --help to see a list of options.

gtkextra-3.2.0/docs/tutorial/html/c32.html0000644000076400001440000000516012604172533015307 00000000000000 GtkSheet

GtkSheet

Introduction

GtkSheet is a spreadsheet widget for Gtk (an Excel-like table)

A GtkSheetEntry widget( a cell in fact) is a GtkEntry subclass with the following differences : - It doesn't draw the border. - It is dinamically resized as the text is typed. - It allows right/left/center text justification (gtk_entry_size_allocate & entry_adjust_scroll)

In a cell you may pack text , pictures or other widgets. GtkEntry is a one text-line widget, so if you are looking for an Excel-cell like behaviour(a multi -line cell) , you should probably consider improving GtkSheet. The maximum number of rows/columns in a sheet is an unsigned integer so in fact the maximum size of the sheet depends on the available memory of your system.

gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/0000755000076400001440000000000012604172532017543 500000000000000gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/note.gif0000644000076400001440000000205612604172532021122 00000000000000GIF87a  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~, HA*ثR:[1F{1J&R<(Zʓ[Hi&L5 :+ub)LS`QzRAJ5kr͚3F Ftn9 <Ҙ9Mu lFQE=5k-5Szҿw=QbsT¸$eJ{Jq\ǫ=@W˚Z!l3ƦR<-%3!c[B*'{ƚxyǨ^Sj lĊQ9o;6$H;gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/warning.gif0000644000076400001440000000203412604172532021616 00000000000000GIF87a!)1BJRZks{{{RRZZ{{99JJ11))))))!!,yC p`6Da p#ǏQ\̈#E S@q#PL"K"NJSpT9@2C^!3 3sh@7 z {5kdeKv5+͚C рJYg0@,Sjuf 8@a@3T G;P}@NNI2C"t́ag}Q;m7fD>ou;w ;gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/next.gif0000644000076400001440000000170412604172532021132 00000000000000GIF87a#!!))11BBJJRRcckkƌΔΥ֭޵,#+H*\ȰÂL(!ć %pQ "8T@(pиa (e|QGE(YaD`P 8j,XEJt@P?MeHL)%d)؝ JCgep`-[ tYb 16|o "ؕd=H)UDFW4  热-XċBݐ'ơ:o ;gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/toc-minus.gif0000644000076400001440000000151312604172532022070 00000000000000GIF89a , 08P*LPÆ641:ܘPč?V"A;gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/toc-blank.gif0000644000076400001440000000013712604172532022025 00000000000000GIF89a , ɇ8۪`%_ƕtf;gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/important.gif0000644000076400001440000000207112604172532022167 00000000000000GIF87a)))999BB1BBBJJJRRRZZ)ccccRccckkBkkkssR{{{9{ZZc{c!9k{JRZZsRck!19R!)1Zc{1B19J!,HpA*ܲĆ ""Bae!A+3,|ҤcG,0$WRTC dd͔ML9& |ܰs 5WR@ARM< $J rSG 8Pܼ"i'c9,""LdOW`+D2ͫ2$A,J$ (u U0"A zh@#XA@ H@W߿; ;gtkextra-3.2.0/docs/tutorial/html/stylesheet-images/tip.gif0000644000076400001440000000200512604172532020743 00000000000000GIF87a  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~, HA*xX)J"Btvoa{&!%J,2M3QUQsj)TK!s W&tV{{BYTI7yFЛх*^Uh k`֔x˞ )Hv[?]m&V'^BxpBÀ#DẂV2 g-Oz3& kQ«k='ۘɔ=x"m|_@;gtkextra-3.2.0/docs/tutorial/html/x39.html0000644000076400001440000000730412604172533015345 00000000000000 Creating a Sheet

Creating a Sheet

The first step is to create the sheet widget and to pack it into a scrolled window. If you pack the sheet into a normal window you will receive some warnings about adjustment signals.

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
...............................
window_box= gtk_vbox_new (FALSE,TRUE);

scrolled_window=gtk_scrolled_window_new(NULL, NULL);    
gtk_container_add (GTK_CONTAINER (window), window_box);         
gtk_box_pack_start (GTK_BOX (window_box), scrolled_window, 1,1,1);  
sheet=gtk_sheet_new(3,11,"Edit table");
GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_AUTORESIZE);  
gtk_container_add(GTK_CONTAINER(scrolled_window), sheet);


gtk_widget_show_all(window);

You should set the GTK_SHEET_AUTORESIZE flag so the cell would resize as you type. GtkSheet can be created with a custom entry widget. You can use GtkEntry or a GtkEntry subclass (e.g. GtkSheetEntry, GtkSpinButton) or a box or table containing a GtkEntry subclass (e.g. GtkCombo)

gtk_sheet_new_with_custom_entry  (gint nrows, gint ncols, GtkType *entry_type);

if you want to construct a non-editable spreadsheet ( called "browser sheet") , just fow viewing purposes use:

gtk_sheet_construct_browser(GtkSheet *sheet,guint rows,guint columns, const gchar *title);

The lines and columns(white coloured by default) are numbered from 0 to max row/col number. The gray row/col are numbered -1 . GtkSheet screenshot:

gtkextra-3.2.0/docs/tutorial/html/c248.html0000644000076400001440000000506612604172533015405 00000000000000 Tips For Writing GtkExtra Applications

Tips For Writing GtkExtra Applications

This section is simply a gathering of wisdom, general style guidelines and hints to creating good GtkExtra applications. Currently this section is very short, but I hope it will get longer in future editions of this tutorial.

Use GNU autoconf and automake! They are your friends :) Automake examines C files, determines how they depend on each other, and generates a Makefile so the files can be compiled in the correct order. Autoconf permits automatic configuration of software installation, handling a large number of system quirks to increase portability. I am planning to make a quick intro on them here.

When writing C code, use only C comments (beginning with "/*" and ending with "*/"), and don't use C++-style comments ("//"). Although many C compilers understand C++ comments, others don't, and the ANSI C standard does not require that C++-style comments be processed as comments.

gtkextra-3.2.0/docs/tutorial/html/book1.html0000644000076400001440000000511212604172533015730 00000000000000 GtkExtra 3.0 Tutorialgtkextra-3.2.0/docs/tutorial/html/c14.html0000644000076400001440000000417612604172533015315 00000000000000 Tutorial Availability

Tutorial Availability

A copy of this tutorial in SGML and HTML is distributed with each source code release of GtkExtra. For binary distributions, please check with your vendor.

A copy is available online for reference at http://gtkextra.sourceforge.net.

gtkextra-3.2.0/docs/tutorial/gtkextra-tutorial.sgml0000755000076400001440000006237012603754176017465 00000000000000 October 24th, 2008 GtkExtra 3.0 Tutorial Victor Mierla & the GtkExtra team This is a tutorial on how to use GtkExtra through its C interface. Tutorial Availability A copy of this tutorial in SGML and HTML is distributed with each source code release of GtkExtra. For binary distributions, please check with your vendor. A copy is available online for reference at http://gtkextra.sourceforge.net. Introduction It is a useful widget set complementary to GTK+ for creating graphical interfaces for the X Window System. It is licensed using the LGPL license, so you can develop open software, free software, or even commercial non-free software using GTK without having to spend anything for licenses or royalties. GtkExtra is essentially an object oriented application programmers interface (API). Although written completely in C, it is implemented using the idea of classes and callback functions (pointers to functions). This document is a "work in progress". Please look for updates on CVS at http://gtkextra.sourceforge,net/. I would very much like to hear of any problems you have learning GtkExtra from this document, and would appreciate input as to how it may be improved. Please see the section on Contributing for further information. Getting GtkExtra The first thing to do, of course, is download the GtkExtra source and install it. You can always get the latest version from gtkextra.sourceforge.net. GtkExtra uses GNU autoconf for configuration. Once untar'd, type ./configure --help to see a list of options. GtkSheet Introduction GtkSheet is a spreadsheet widget for Gtk (an Excel-like table) A GtkSheetEntry widget( a cell in fact) is a GtkEntry subclass with the following differences : - It doesn't draw the border. - It is dinamically resized as the text is typed. - It allows right/left/center text justification (gtk_entry_size_allocate & entry_adjust_scroll) In a cell you may pack text , pictures or other widgets. GtkEntry is a one text-line widget, so if you are looking for an Excel-cell like behaviour(a multi -line cell) , you should probably consider improving GtkSheet. The maximum number of rows/columns in a sheet is an unsigned integer so in fact the maximum size of the sheet depends on the available memory of your system. Creating a Sheet The first step is to create the sheet widget and to pack it into a scrolled window. If you pack the sheet into a normal window you will receive some warnings about adjustment signals. window = gtk_window_new (GTK_WINDOW_TOPLEVEL); ............................... window_box= gtk_vbox_new (FALSE,TRUE); scrolled_window=gtk_scrolled_window_new(NULL, NULL); gtk_container_add (GTK_CONTAINER (window), window_box); gtk_box_pack_start (GTK_BOX (window_box), scrolled_window, 1,1,1); sheet=gtk_sheet_new(3,11,"Edit table"); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_AUTORESIZE); gtk_container_add(GTK_CONTAINER(scrolled_window), sheet); gtk_widget_show_all(window); You should set the GTK_SHEET_AUTORESIZE flag so the cell would resize as you type. GtkSheet can be created with a custom entry widget. You can use GtkEntry or a GtkEntry subclass (e.g. GtkSheetEntry, GtkSpinButton) or a box or table containing a GtkEntry subclass (e.g. GtkCombo) gtk_sheet_new_with_custom_entry (gint nrows, gint ncols, GtkType *entry_type); if you want to construct a non-editable spreadsheet ( called "browser sheet") , just fow viewing purposes use: gtk_sheet_construct_browser(GtkSheet *sheet,guint rows,guint columns, const gchar *title); The lines and columns(white coloured by default) are numbered from 0 to max row/col number. The gray row/col are numbered -1 . GtkSheet screenshot: Sheet Signals The interaction between user and sheet is done(as in all Gtk programs) through signals. In GtkSheet the next signals are implemented : SELECT_ROW SELECT_COLUMN SELECT_RANGE CLIP_RANGE RESIZE_RANGE MOVE_RANGE TRAVERSE DEACTIVATE ACTIVATE SET_CELL CLEAR_CELL CHANGED NEW_COL_WIDTH NEW_ROW_WIDTH If you want to catch these signals , you must connect them to a callback(function that treats the signal/event). The most used signals are : ACTIVATE,DEACTIVATE,TRAVERSE . Callback functions for different signals have different parameters. For a correct use you should check out the Gtk-Extra Reference Manual , the examples or GtkExtra source code. Incorrect use of the callback function parameters will have an undefined result(in the worst case). The ACTIVATE signal should be connected if you want to do something when a cell is clicked: g_signal_connect(G_OBJECT(sheet), "activate", alarm_activate, NULL); //The callback function should have these parameters: gint alarm_activate(GtkWidget *sheet, gint row, gint col, gpointer data) { ................ } If you have different functions that require the same cell to behave in a different way , I suggest that instead of writing "n" alarm_activate() callbacks , write just one callback function that looks like this: g_signal_connect(G_OBJECT(sheet), "activate", alarm_activate, (gpointer)function_name); When the signal is connected , pass the function name (for example) as the last parameter. gint alarm_activate(GtkWidget *sheet, gint row, gint col, gpointer function_name) { if(strcmp(function_name,"table_new")==0){ .....do_some_stuf() } else if(strcmp(function_name,"table_edit")==0){ .....do_other_stuf() } } In this way , you will have a much cleaner code with fewer functions as possible. It is better to have a single callback function that treats all posible behaviour cases , instead of many functions which make the code harder to read. A very important signal is TRAVERSE. gtk_signal_connect(G_OBJECT(sheet), "traverse", alarm_traverse, NULL); //The callback function should have these parameters: gint alarm_traverse(GtkWidget *widget, gint row, gint col, gint *new_row, gint *new_col, gpointer data) { ........... } The "traverse" signal is emited before "deactivate_cell" and allows to veto the movement. In such case, the entry will remain in the site, and the other signals will not be emited. The traverse signal is useful when you need to know what cell have you previously clicked or what was selected. The explanation for the the other signals is quite straightforward so if you want more details you should check GtkExtra Reference Manual or the GtkExtra source code. Modifying cell contents As previously stated , a cell may contain text, picture or other widgets. GtkSheet functions can be categorized after the number of modified cells: Functions that modify a cell A cell text is set by: /* Set a cell text with justification */ void gtk_sheet_set_cell (GtkSheet *sheet, gint row, gint col, GtkJustification justification, const gchar *text); /* No justification is made */ void gtk_sheet_set_cell_text (GtkSheet *sheet, gint row, gint col, const gchar *text); The text string will be strdup()ed by the gtkextra library so you may free your string after this line. Do not free the internally allocated string ! This will be done by the library at the destruction of the sheet or when the gtk_sheet_set_cell is called again. The text justification in the cell may be : GTK_JUSTIFY_LEFT, GTK_JUSTIFY_RIGHT, GTK_JUSTIFY_CENTER A cell text is read by: gchar * gtk_sheet_cell_get_text (GtkSheet *sheet, gint row, gint col); A cell text is deleted by: void gtk_sheet_cell_clear(GtkSheet *sheet, gint row, gint col); /*- delete cell contents */ void gtk_sheet_cell_delete(GGtSheet *sheet, gint row, gint col); /* - delete + remove links*/ You can pack a xpm into a cell like this: GtkWidget *sheet,*bullet; GdkPixmap *pixmap; GdkColormap *colormap; GdkBitmap *mask; ............ sheet=gtk_sheet_new(...); ....... colormap = gdk_colormap_get_system(); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, bullet_xpm); bullet = gtk_pixmap_new(pixmap, mask); gtk_sheet_attach(GTK_SHEET(sheet), bullet, 1, 1, 0,0 ,.5, .5); ........ gtk_widget_show_all (bullet); gtk_widget_show_all (window); See full example here: xpm.c You can pack a combo box into a cell: GtkWidget *sheet,*combo; GList *combo_items; .................. combo=gtk_combo_new(); combo_items=NULL; combo_items=g_list_append (combo_items, "NULL"); combo_items=g_list_append (combo_items, "NOT NULL"); gtk_combo_set_popdown_strings (GTK_COMBO (nul_combo), combo_items); g_list_free(combo_items); // From GtkExtra 1.0 the cell may be resized automatically to fit the widget gtk_sheet_attach_default (GTK_SHEET(sheet), current_combo, row, col,0,0); The widgets can be added to a cell using these functions. Some of them expand/shrink cell depending of widget size ,others don't. See the GtkSheet manual for details. /* Attach widget at (row x,col y) starting at the upper left of the cell */ GtkSheetChild *gtk_sheet_put (GtkSheet *sheet, GtkWidget *widget, gint x, gint y); void gtk_sheet_attach (GtkSheet *sheet,GtkWidget *widget,gint row, gint col,gint xoptions,gint yoptions,gint xpadding,gint ypadding); void gtk_sheet_attach_default (GtkSheet *sheet,GtkWidget *widget,gint row, gint col); void gtk_sheet_attach_floating (GtkSheet *sheet,GtkWidget *widget,gint row, gint col); You can set a link for each cell. This is in fact a pointer you want to be associated to the cell. void gtk_sheet_link_cell(GtkSheet *sheet, gint row, gint col,gpointer link); gpointer gtk_sheet_get_link(GtkSheet *sheet, gint row, gint col); void gtk_sheet_remove_link(GtkSheet *sheet, gint row, gint col); Functions that modify a range of cells A range of cellsis in fact: struct _GtkSheetRange { gint row0,col0; /* upper-left cell */ gint rowi,coli; /* lower-right cell */ }; Some functions operating on range of cells: void gtk_sheet_get_visible_range (GtkSheet *sheet,GtkSheetRange *range); void gtk_sheet_range_set_background (GtkSheet *sheet, const GtkSheetRange *range, const GdkColor *color); void gtk_sheet_range_set_foreground (GtkSheet *sheet, const GtkSheetRange *range,const GdkColor *color); void gtk_sheet_select_range (GtkSheet *sheet, const GtkSheetRange *range); void gtk_sheet_unselect_range (GtkSheet *sheet); void gtk_sheet_range_clear (GtkSheet *sheet, const GtkSheetRange *range); void gtk_sheet_range_delete (GtkSheet *sheet, const GtkSheetRange *range); void gtk_sheet_range_set_editable (GtkSheet *sheet, const GtkSheetRange *range, gint editable); void gtk_sheet_range_set_visible (GtkSheet *sheet, const GtkSheetRange *range, gboolean visible); void gtk_sheet_range_set_border (GtkSheet *sheet, const GtkSheetRange *range, gint mask, guint width, gint line_style); void gtk_sheet_range_set_border_color GtkSheet *sheet, const GtkSheetRange *range, const GdkColor *color); Remark: /* When you declare a range like this:*/ ...... GtkSheetRange range; ................. /* You must call the range functions like this : */ void gtk_sheet_range_clear (sheet, &range); Screenshot:Modifying the background color of a range. Functions that modify all cells from sheet These functions are used if you want the cells to contain the same widget. These are some of them: GtkWidget *gtk_sheet_new_with_custom_entry (guint rows, guint columns, const gchar *title,GtkType entry_type); void gtk_sheet_set_foreground (GtkSheet *sheet,GdkColor *fg_color); void gtk_sheet_set_background (GtkSheet *sheet,GdkColor *bg_color); Functions that set row/column titles , sheet title , etc A row/column title can be set with: void gtk_sheet_row_button_add_label (GtkSheet *sheet, gint row, const gchar *label); void gtk_sheet_column_button_add_label (GtkSheet *sheet, gint row, const gchar *label); gtk_sheet_set_row_title() is used for setting an internal label associated with a row. The sheet title may be set with : void gtk_sheet_set_title (GtkSheet *sheet, const gchar *title); The dimensions of the row/column titles may be set with the next functions: These functions exist because you may want to resize the width of a column or height of a row, unless you set the autoresize flag, which will do it automaticaly for you. void gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width); void gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height); Row/column title justification is done by: void gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width); void gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height); Modifying sheet state You can freeze/unfreeze the sheet by: void gtk_sheet_freeze (GtkSheet *sheet); void gtk_sheet_thaw (GtkSheet *sheet); /*thaw means unfreeze*/ Set if cell contents can be edited or not in the given range: void gtk_sheet_range_set_editable (GtkSheet *sheet, const GtkSheetRange *range, gint editable); Remark: From GtkExtra 1.0 sheet state will be set with functions: void gtk_sheet_set_autoresize (GtkSheet *sheet, gboolean autoresize); gboolean gtk_sheet_autoresize (GtkSheet *sheet); void gtk_sheet_set_autoscroll (GtkSheet *sheet, gboolean autoscroll); gboolean gtk_sheet_autoscroll(GtkSheet *sheet); void gtk_sheet_set_clip_text (GtkSheet *sheet, gboolean clip_text); gboolean gtk_sheet_clip_text (GtkSheet *sheet); void gtk_sheet_set_locked (GtkSheet *sheet, gboolean lock); void gtk_sheet_locked (GtkSheet *sheet); void gtk_sheet_rows_set_resizable (GtkSheet *sheet, gboolean resizable); gboolean gtk_sheet_rows_resizable (GtkSheet *sheet); void gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable); gboolean gtk_sheet_columns_resizable (GtkSheet *sheet); void gtk_sheet_show_column_titles (GtkSheet *sheet); void gtk_sheet_show_row_titles (GtkSheet *sheet); void gtk_sheet_hide_column_titles (GtkSheet *sheet); void gtk_sheet_hide_row_titles (GtkSheet *sheet); gboolean gtk_sheet_column_titles_visible (GtkSheet *sheet); gboolean gtk_sheet_row_titles_visible (GtkSheet *sheet); void gtk_sheet_set_justify_entry (GtkSheet *sheet, gboolean justify); gboolean gtk_sheet_justify_entry (GtkSheet *sheet); Up to (including) GtkExtra 0.99.17 Sheet state is mainly set by a set of macros. GTK_SHEET_AUTORESIZE(sheet) GTK_SHEET_ROW_FROZEN(sheet) GTK_SHEET_COLUMN_FROZEN(sheet) GTK_SHEET_CLIP_TEXT(sheet) GTK_SHEET_AUTO_SCROLL(sheet) GTK_SHEET_JUSTIFY_ENTRY(sheet) GTK_SHEET_ROW_TITLES_VISIBLE(sheet) GTK_SHEET_COL_TITLES_VISIBLE(sheet) Selections Select a row/column: void gtk_sheet_select_row (GtkSheet * sheet,gint row); void gtk_sheet_select_column (GtkSheet * sheet,gint column); Unselect a range: void gtk_sheet_select_range (GtkSheet *sheet, const GtkSheetRange *range); void gtk_sheet_unselect_range (GtkSheet *sheet); A row/column selection can be catched using "select_row" and "select_column" signals: void (*select_row) (GtkSheet *sheet, gint row); void (*select_column) (GtkSheet *sheet, gint column); Row/column operations The most common row/column operations are: insertion deletion findind the number of rows/columns void gtk_sheet_add_column (GtkSheet *sheet, guint ncols); void gtk_sheet_add_row (GtkSheet *sheet, guint nrows); void gtk_sheet_insert_rows (GtkSheet *sheet, guint row, guint nrows); void gtk_sheet_insert_columns (GtkSheet *sheet, guint col, guint ncols); void gtk_sheet_delete_rows (GtkSheet *sheet, guint row, guint nrows); void gtk_sheet_delete_columns (GtkSheet *sheet, guint col, guint ncols); guint gtk_sheet_get_columns_count (GtkSheet *sheet); guint gtk_sheet_get_rows_count (GtkSheet *sheet); GtkPlot THIS SECTION IS A STUB!! PLEASE CONTRIBUTE ! Credits GtkExtra documentation authors are: Victor Mierla, victor.mierla@flash.ro GtkSheet tutorial. Contributing This document, like so much other great software out there, was created for free by volunteers. If you are at all knowledgeable about any aspect of GTK that does not already have documentation, please consider contributing to this document. If you do decide to contribute, please mail your text to Victor Mierla, victor.mierla@flash.ro. Also, be aware that the entirety of this document is free, and any addition by you provide must also be free. That is, people may use any portion of your examples in their programs, and copies of this document may be distributed at will, etc. Thank you. Tips For Writing GtkExtra Applications This section is simply a gathering of wisdom, general style guidelines and hints to creating good GtkExtra applications. Currently this section is very short, but I hope it will get longer in future editions of this tutorial. Use GNU autoconf and automake! They are your friends :) Automake examines C files, determines how they depend on each other, and generates a Makefile so the files can be compiled in the correct order. Autoconf permits automatic configuration of software installation, handling a large number of system quirks to increase portability. I am planning to make a quick intro on them here. When writing C code, use only C comments (beginning with "/*" and ending with "*/"), and don't use C++-style comments ("//"). Although many C compilers understand C++ comments, others don't, and the ANSI C standard does not require that C++-style comments be processed as comments. gtkextra-3.2.0/docs/tutorial/images/0000755000076400001440000000000012604172532014410 500000000000000gtkextra-3.2.0/docs/tutorial/images/gtksheet_cell_text.jpg0000755000076400001440000001560712603754176020740 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bcccccccccccccccccccccccccccccccccccccccccccccccccc9"H !1S"Q3ATaq#2RrB¡$46bdcst ?obvWUzwj1S4gwO13\?3OwyT1S4gwO13\?fmii'XAq}x>bߊaWAKaEұvSEY_w,݈;7;V3(9nn/{ ^SpYܝ^hյRDf-G H6mU(FJ$h6L7riG೹:=7wm;:Vf X~h'P<Ԏ[\n-&kxɶhAEH^X#@7ܪPO7]xqsGaEUkj$mEH=ζ}_OKM?Ȏ҆Ț)Bz nHeVv+G4a})!{;auA91}t?YQJC%k!m$e7 96Q6dK]U/MΔ: zvnhqX_MN-hԵWJ],LeaPoc@3öN!Q&bUp A;-W)!{'5@hjǃ5`È_[mm٪G4R*V>\Tlu,5iAҰN4NSI1ч;4 lj.K@GᶖZ;b=SJL<ߺ,"1ukz,4Pbm͘bt9E孝.b6C[\BRXXZ޽OBykgz? ǯԜcjNh>ykgz? 孝/K_RsO%_9孝'wSP,zI<=~疶wSP)0 {ʟcjNjեu˨:ʷN6{Zt&BPAjiٔUMk4n )}zcv?}Sj&O -~l?Teat_^L?~''I>f_L?t_^ |̿R~l?TeyɟC3ß  u+pp]QIa ~j8]z |̿R~l?Teat_^CT=ςF5sZ@rnB_$~zZw3uu}̓ O5΍qZ 'W<<(!$Wz<<(!:<<(!$Wz<<(!:<<(!%Vm G9*`-~ ?N ?AA4'NtxxQBtxxQB HxxQBtxxQB H(,EkN#AIfD}&bٌ_s[LS13sT slnGǖA`>lYev'&9u>xn1{.6ݧ)汍ckZ, bf mؕ#Rf*]=PU=6ɬdI|AS?5hWE-46D.,.w˯EWneAoޱc]}?$DDD@DDqո>E# ̑!H:{VЊ}O$# b܁"SQ6Zf9,;ܑ.oYャI67eZ͉#L؄.mhpuhA:ԬM-{n`⹹/%AEW+!щ o5]n.E@wGQ_gs#-̨CK0Xobk i:crKא_{+ &T~H4B!is<TmN!cI()mz"9Й儁M \1OQ,ſMyյ{FiI h?K=:LԱ\{ 紮i]-@2ñ\a`4(.""" ""*UrJ<4 ++&TZϝW%Sk>vovo#ʍ Pќp%.~nzs[:J;Or&sIh7{` Y'w4glԨ,v2Y'w5* %|GsLvJ"gl%|GsRY,D~# S*TD@DDDA*vT#ypNָ8 TDD@\+̞mQYoII4TQe'sy&[w7 QE4oIH%E[w7e'sy YL)d. 7Fcn_2Ɠ9t! #O4ala' H}=6D2QS436|nku&.l@VƓ-i;g:vTOdxH#ms[ j57:8ˈtq_rƓ-i;NLo$-i;2ƓJ,o$NA*(Ɠ-i;_9ҥP9l#:~S5Zg  Oo`It7Th.,&ڋlVRMS8a##I6,@_Z`xG5ϰZ, w2y{s'wDDD@DDDA^GN_ CW8%h&^iY<:ŷ: ^P*IDZȞ} 8n$8kh+&m D.btl,i߸mނ~}ա1PÉgx"53SI,jH{p{}7-U{>:ʆc.-;݈<Wl};!w8imxn{Mf5O.v7ae\[kka _1K"(Cdqk78t{4&;eM8JS&VGk]Ğ7\h-C.3/I*_R*Fu8txv,׶\mxd&C;̳CGP7;H~u= \ɣ|f ]p&: QJ0 XGcI{`7v]I:ٛ6pkkHjZu@f M;ZÅι=vG[~ME\6\RH苞9-6ݿvU*gRDHqu[mЂw뮗(iz$ "CTR_*" """ DDD@EVJHd8FyѠINw^x%΂9p>e2:^<}6k{nÏy.'2Iv0 &y :x2Zy݅ XZSfS Y t2h<6G X3hoVNpIyq$r=Y-]OK3=_:魵/q?kI=9uDXW~q6:KÏy gS>ZKNcs8,p=>yM@iH+kN`A yq$8g }e,YX [,utּ=%%?7gKv^aۖ&s;$nTQg3OI> YỒg3OH%Es;$nỒ b8 卒.u6Ewg_0f_^'` ;s;$n业Pdk[!%wgQg3OI> YỒg3OH%Es;$nỒ QE>&s;$nTQg3OI> YỒg3OH_*,!:#{T5ug.WQ{ D@DDD@DDD@DDD@DDD@DDD@DDD@DDDAgtkextra-3.2.0/docs/tutorial/images/gtksheet_pack_xpm.jpg0000755000076400001440000000622312603754176020551 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bccccccccccccccccccccccccccccccccccccccccccccccccccw"F !S1Tr4AQRaq"6UVt5cdB$2Cb! ?av>E5E ,KOH=ŠI$M֮)¾fnQߓaHZ+ff+ffL3+ff+ffL3+ff+ffL3+ff*)ha880BK9\|e݈9}%|r@d2=lQUNn4A 0hPhW ֓Ld{ʚ<~Q壕[qW3Uv f52 ~O+UO3Xw BHcJ9}su'*jS.LF]a\| }su ˰WY3'ωhp$}a\| .)>GVUG5I|>FHi"SЃB- rܣWsBqy85gz X|ma]wȼ6Z4ִX<@-5gzpX|m2"a]wvރ"-|5gzpX|m2" 4N788O>OZa]wȋ_vޜ5gz 3CDNx,ncQn;`Oiط'~NF?կ8^q3&q3=V u$Ui^3UZ?Ɨ9oϳ9\>>Rkq?؟%tr7ˁb=撚kEˉi>RkqqH;hä%iG """ """ ?ET @v*""" 6bYȅ#rz]$Asڃ;~-t7?jPQP|lZ 8|Lsȑ&'&X[sxi]$Asڃ2`X. @y "?r8 hxc?XFoUSMW~jz;P|zj{SLW5_&5;Uߚ|zj{SLW5_&5xO k[A0;ORyqOtb ^m\{gr^m\{gr Ƕw%Ƕw* ^m\{gr^m\{gr Ƕw%Ƕw* sٌ#$Z>ORyqOtb ^m\{gr^m\{gr Ƕw%Ƕw* ^m\{gr^m\{gr Ƕw%Ƕw* sٌ#$Z>ORyqOtb ^m\{gr^m\{gr Ƕw" "" ]̀vFIŢaX\nSuC$MF4F XhѡD@DDi.UD@DDD@DDDA*;QJTDD@DDgtkextra-3.2.0/docs/tutorial/images/gtksheet_range_bg.jpg0000755000076400001440000002136512603754176020517 00000000000000JFIFGGCreated with The GIMPC#;&# #H36+;UKZXTKRQ^js^deQRvw[qC##E&&EaRaX"B !R5S13qsAQa"Te24t$bB+Q!1R23qAa ?eQ:7/entS^Q>f>$ψUܓcNXmnuK\]ǒZ~vk_$ψUy%|GmfuK\]ǒZ~vk_$ψUy%|GmfdYz-\_(Eʩ+Lzs~r*Qg,USүn45*O$g+zk5*O$g+zkCV=S]s7Muf&D=3^IWWy%_c?Q_Y~IWWy%_c?Q_Y S7nWMM3]S3LgUi_:usOW4]\5?7 0:*wE航E3DG 5?3]\pusOW4]\5?79W4usOu?3]\pDٻnʬ9jy<O(Df뫚~f:柙iκk~nsi柛뫚~f:1MګvMSrkהE<'?(柙iκk~nsi柛뫚~f:柙iܦժ\"l_co爢U6*#U\8}i i柛뫚~f:柙iκk~nsi柛nͦUZw+.S5irq_4?3]\pusOW4]\5?79W4usOu?3]\pw+sUU~j49GEZrUuOxr?[KKEYsΪgvnݪ&',:r?ȶ+oeZݟ_ZFZ}fzb/p.EVYPfvUM4ժfes}].]]bg/5Sr+"Les-kO 55I,mX۽}Zgy_@]mG%*?j=)u\`6V\樷38ChQ\n(b&Dje&?{}s3M6b))"#([=aÛ=a}<,jh{u)XnNwm]jf+5e1DG {y zѸOqo 7?kpg y7?kꙦj兿8;ɢmΪfsʩ |[ n5 !_<[ l⩿r{jtqQ?{{?Gk/|=DTNsYQ9CsQE'Q_ạV=yOgɫSsQE'uS3N:5EQު'85wMZW>›DG"[6l\ݚgESzOLɫSghm,(fji\1K՝{YzɚqI4MSNr:>ƔuFyV*K՝{Yzɚq0K՝{YzɚqH/sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|,VVuue&j,VVuue&j N9Lw5+^ib{/Y3V^&ib{/Y3V^)p8y:c_*K՝{Yzɚq0K՝{YzɚqHyJWX>L՗X>L՗@sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|,VVuue&j,VVuue&j N9Lw5+^ib{/Y3V^&ib{/Y3V^)p8y:c_*K՝{Yzɚq0K՝{YzɚqHyJWX>L՗X>L՗@sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|,VVuue&j,VVuue&j N9Lw5+^ib{/Y3V^&ib{/Y3V^)p8y:c_*K՝{Yzɚq0K՝{YzɚqHyJWX>L՗X>L՗@sΘjWʼ.ag^V^fL.ag^V^fRptsRUv+:5eav+:5e'; X}Y׽՗/g X}Y׽՗/g8<1ԯx]νdY{8]νdY{8 <|쭼W~nۻ&)O7x-'ǽ\# >'݅ j6]\? |Kv-]){&j_)y@%j9 yu A.fw~ >'݅⪩ifrEOf?<"r)]){%k/|=DWc (3:UUU3Te#Ҹp}f3NYMN[\MriNs9L?h4|Kv-]){&j_)y@%3A5g,]c?~KIozZNnW쮏 ͝ѸOqo {}P]){%k/|=DWc (^r&jf]cp?fw7x-'7WGIf'݅ wF=ž(xc"mUUzc)ۧ~bkQ12ZfՊf6LsS`zmҗ"[R݄Ly:RK5SUS4PU5U3LeSp}fA.fw~ >'݅*k*bc8y۱S5zjgfg/]){%k/|=DWc (TM5LS9}T.\>A.fw~ >'݅*i. {5^ݷhks8U<">zTسMff)Lf~}2@-R݄KvJ^{2W@P fibi)u>.sozZL߳}swڿetxTfl{}Pgtn[€y߹6\MQVG\U.LU"bV|4'?AX]){%k/|=DWc (F3&Lg}T\}پ]i3~KIjR@7 -aB}ѸOqo wS~57)fcӔN,E޹Mw+)J4Q O=|Kv-]){&j_)y@%4U1ahu>W.sozZL߳}swڿetxTfl{}Pgtn[€رrq3MfvWE)Q(~jM3b*˄g>Ę,&ۛ65M;XJ^{nKv3UXH,U5LU9M5STSO~KIozZNnW쮏 ͝ѸOqo {}PF&>q\)4s1gUD]QE:UNYQO3O9 |Kv-]){&j_)y@%ʨמ~НZ_u>W.sozZL߳}swڿetxTfl{}Pgtn[€2WlMuh&~bub"ݹ1"UOq+|Kv>18]wf),F_oS4lQVsٌ6|u~m:?j|(諆0oSyp:$諆0oSyp:$諆0oSyp:$談NS5}wMSe;vtֱ"jt nypݪ5qnW՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟cXcs\w[Uypݪ ՟c[fwda.`u=٦k'݅+؋6&nܦU3g<MUX)j#14U$31M陘Dh?P>,wfl{}Pgtn[€qUTTSg3tzժ(ʈ/(ϫpf'݅i[Vf/[TsNy~mXkmYܪ>ϫpgtkextra-3.2.0/docs/tutorial/images/gtksheet_new_sheet.jpg0000755000076400001440000001443412603754176020733 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bcccccccccccccccccccccccccccccccccccccccccccccccccc"I SQ!3Rar"124ATs#BqUV5bt$Cc ? BhfPH$TIJ+DDN>tW噑: כWBӤ 'ELY3""Ӥ 'ELY3""Ӥ 'ELY3""Ӥ 'ELY'Z-H *5U?'<"~sZ2W?H1)/lPEVQFWIM|,(<,(hg88ZCTbq5ƧI\Ј:#sH$W"9j hbЌHcUʍNryWUx )GDID9^檢Q88865fUTxDj-|j8Cp%J|Q&w95WN5EN?&3M%Lȣg9Yb"xnq%\a m!Z+lOͩjEZZxS|z+W#v'\+Z\h^P`kGZWךMP<+cs\-'^ -njʹ>o%Mݼ|}_A(?`^ݼ-M~J>o%Mݼ|}_A(?`^ݼ~>fDr**yOy/֬GM J]T8?`Ќf;ģ_Jʑs.>vP|O46[n6>' VSE{E/`,2QeHWRKx\ˁICu(UkTd\BG+)_~51v5 תv5j]s 5]s z?gq\gXr ?Ï 4] 3)0I zѲ1ZY=}(8^TRJMz)RPrkwyJ(95뻼IAɯ]*׮&wwPt3RdjHFDErVp4x!H3](.CAcGeH|ovPCAfV偌|_~tu!EȍG $r7Ȋo;<ovP7Ge;դ)(R8QS>F׭MDUH⫋545/h{*\O榕򏚚WuO榕򏚚WuO榕򏚚WuO榕5c;)m8.W1ZvX#~R%n[`g tTtvosrrkwyJ+7I 7IJnnBnnE@}}P}&,}&Tܬ_zx7j}& ׮Vosrosr*܅܊%f77!f77" YMYMȨ<1X\n=پMAɯ]*}&,}&T+7I 7IJnnBnnE@}}Pxcr~;ݫ{}^T YMYMȨVosrosr*܅܊%f77!f77" QҨ+w95뻼@ 7o z7: UU]IUu~螎{*\FIl"VJ_Zk.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮3’w]{k.`Tk.b#PJ#A**< < k.` ׮Gk^@ 7o z73dNtQ?(ҾER_IKHpT]Kĕ**z- 좹*|VVpiZqgJ Q8j5=>|T 'PrkwyJ^T Aɯ]*JMz)P%&ww(95뻼@R׮Prkwy@^t@{ Q~\MZ>M V{s{sdţdAɯ]*gG#^3mڽ'GɽPJ2onb2on`T}̛ۘ}̛ۘs&-s&A+GɽGɽ^T F/Խ|gz۵zOv{sdţd%h71h70* Z>MZ>M V{s{s&ww_zjs&A+GɽGɽPJ2onb2on`T}̛ۘ}̛ۘs&-s&Mz(u%ZĽe|Q~\(. .#dUQ"ԪWCJCH,`lOl=YbֈU|IWUKR4+i HUYmڕ/7DtR({*\ Aɯ]*JMz)P%&ww(95뻼@R׮PrkwyJ^T Aɯ]Mz(=B(FM!p4Qtȣor5SGƲQf"ԮEZP(ҵ"*>_Zf;7dyz:}p%l͒vn[3d*6Iٻ!l͒vnȨV'f셳6Iٻ" [3d'f슀33Q9aWl͒vnAɯ]*N flvE@f;7d-NJٛ$ݐf;7dT+flvBٛ$ݑPxfj1x;;j홲N95뻼@6Iٻ!l͒vnȨV'f셳6Iٻ" [3d'f슀%l͒vn[3d* F/}m^ݳ6Iٻ!&wwf;7d-NJٛ$ݐf;7dT+flvBٛ$ݑPN flvE@ᙨ{f;7d ׮V'f셳6Iٻ" [3d'f슀%l͒vn[3d*6Iٻ!l͒vnȨTu%]wAɯ]|Q~\(.=,@u卍|nWUlTwHZE<|T^TRJMz)RPrkwyJ(95뻼IAɯ]*׮%&ww^Pˠz7P=By{$nFr*9JQ}J0GA"F1O` tOGO.| 9G}y<A:sAɯ]*s<A:s&ww:s<A>R<A:s<rkwyJ<A:sAɯ]Pgtkextra-3.2.0/docs/tutorial/images/gtksheet_pack_combo.jpg0000755000076400001440000006037712603754176021056 00000000000000JFIFHHCreated with The GIMPC   (1#%(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egcC//cB8Bcccccccccccccccccccccccccccccccccccccccccccccccccc"S !1"AQ2SUas#35RTqt6V$4BrbcCd%$Qaq!1BR ?0>|*jYf7$1{A$.I$\x2ٙءߗÇp+[O' e39' e3IƂ>I¼CNI¼CRmG*)ha880.--gpk$舀j~3QU Jftz.tEY) h*%+\ f\jv[=+ [K:Fm-q7am䒡:voN^ԋ[q@DD^Z,VCOX,+qz!q/U }N/D'!a_S 6+8}N/D+D XWBr8mh!a_S XWBYQ3"ʹmNg4<-8}N/D*428KiiIh]@XzZ3Y6ܖ=hGdXWBr8&{%l2hYAe'YZ XWBr8mh!a_S XWBM }N/D'!a_S 6+8`Ѳ[M )6i'%CSFb?4(NO~3LX pjaJvVklMu<5tϞGG"Ld,vQd|;_\E>"5SA}ko: ,& Ih̢0nNKn[h1c8F9ڑ &a ZHu6Jx@/3qp˿!QbVT2G65ZCön6}WT5{x-FvMW58 i}/" ǡ À{twKou;1s߇R97.0|˞F¼G؂-~ݿHyԼx679 mobCΛv!R6?Pl+~"۷:mKWhC{ nߤ<5(~ Z#a^ _F00F؂+Dcs-WڻzgEc B֗m@6ew]zg"/h :ڀmq<(`e 41ǘ?##fk K]zgx \A2do>¥V?EޙN+w{PTEo]zgW խ'P*/Viye{AsI6_~ A&ʣTw} A> A&ʣTw} A> A&ʣTw} A> A&ʣȧ1>7gdlGH#q#QҺe4&ros$N p%*_J*p%*_J (Ro(RoJ&J&6 cԿqUMC4qq }lsPztcԿAs-f1M :H'Mm{oVv$Um/Pzh#q3xoWػٿIobSV)PE~ٿIobE~ٿIobE~ٿIobE~OWDH`A 'xh~bt(<^Ec,z*%,c`/8 SBʤSvл#߈Gk\?dE$^nbTj*I)%i![[uLU1DF0OO *|??'KVSᙰHcHY^5fr|6LͶoMPa ŸT7 OVZI"`l4c/ua'9`&-%~=k͚ݦcgG7Y^p/ܐK#\s]Wp㩺T;p` sfH"è/ &Ώok\w~qL !JwF^cѸYM˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}˸?h}\?A6t}s{XK~˸?h}é#8)ZG`|kl HǵhKMAcOb-'MX[BF?pw$W"Ǝ-x8Y(qeM3-I#3lbä.SEQ0W<>fGksGQi~RԨ?@?@?@(RowڸK[=ּk5/e}m7/4sgy tc"/Ov|g泵nelE_OgjfQΌZ/OvelE_OgjfQΌZ/OvelE_OgjfQΌw*~ȿ%k3?Yڤf _SO5]>7Zvv+]3DJq=gϺE?=}/p-Q|)TQ| j" """ """ #9@{W* w3ؗ* w3ؗ* w3ؗ* w3ؗ* } UF_$4;q"_̽,s`6oi;<4 ZKt0Jy,L^Gi9[ƀX7 ÇdmyYPӗ;^ho]K0c|[X1nwH9#09H$5 ZvBbȣlA9s^:SWSt:Y&gj^ָ  XX,u55lYMcg(/r#s~ -Ռ 9FL f@nݧ%Xq {iˍ,b@!|i Š慭5 =GǛD!Ff xnREq>g:gy6f2 tH $fW]QѨ_]a=^82h&F3aթ'N Ey<[8 vU2Gm֤8e1uP۶W=*$k\@@l)WLiG5tNv-n]zCI˨VaXtU56:ZgG<x4tczފ[$q{v9G\u&®[askIˀkG۽cҸ{3>wG >dXG >dX~at Ag{ ^Z3Q" """ """ X4̑{(bs\b)b b5cw39D4CchqxiQpJh+inhmpiz9i8w6p ;ZH\\tp:>" """ """ ,|-k|->Hf"" """ "" $D@DDD@DDDAi1#{P湦ŤR2 TbϖW>Բ ]Y-%qY: y)`c{\f4^RjbkIvA4 S,i*+3ŵr?w;pu$l\C@Nu?iP8cdve%#1Y5VG >dXG >dX~at Ag{ ^Z3Q" """ """ X4̑{(bs\b)b W$Դ&Q}D5&W9 s.[/opJh+inhmpin,h!w\Im{udrY[Pa$1Ē۞I,/{њZWRK<3Mr-},wn[Xu-\ImsC^S5=er.c DƌA0o>~dϯi*_$r2VԲ θu›kas-LI \qKmfɼa9 =G׬:vDܭ/sȽsDD@DDD@DDD@DDD@Y(ZbY(Zb ?=}/p-3{h """ """ """ """ DDD@DDD@DDH`>.c2F1졉sMHe+V7SإDpbTL2k:XkU8%u474RNǶ4h=DO3sE+  Sfb5Z#XHċ_aMw2Sw,#{ ݶKptpxc?l>`FYd2Gs˚i)m{ }PAK=%/a<58DnB2Ŧ:퀹15ad0C+\3I{{ti qG !ɳncB uߡhR6Pߍ{:I |$DDD@DDD@DDD@DDV-uV g"Y>" """ """ """ "" D@DDD@DDDA>|goh3ΛF}6v>|goh3ΛF}6v>|go|\dcCHWt# m<2lӾQaIX8%u474RNǶ4h .OK!=F\LH k^: .mS[lf˳\mof$se:2n:ujIӤKl_>|W^|wt:YY%ݵrK AnAI3j1T P . 1׾ma=^82h&F3aթ'EL'1 F)cݲQ#Ze:7kd8s_5C咗Ɇٵ+m-q^QfKXK ˕Rf'1˩'KY^@DDD@DDD@DDD@Y(ZbY(Zb ?=}/p-8=UA.6mџMthϦ:mA.6mџMthϦ:mA.6mџMthϦ:mA.6mџMthϦ: +q&Pj }Cۚw}XN[X[wcYKO\G"s 氌op`EOYY T]Q8)lX1e듉;k]can S{-nx7eVbR5c \9#58Y&'=?|Ѱ x渆!ڇ,MnJ TT0ʹ$5 ->k{kįTGTmQ6|n:EhOQX*( $.˔"뾖!W1 {)ɘ=u ūaV>]jter\J',V cAoK\RH|KY7N]rӚ*:6Namlܣz+짝6i10UsuݐT4#+۴t8=w]NaStw7&-5Q 'd66ӽ[V#${F9Ĵ\Krۺa㔶g:CSapֳ#X֎8D@DDD@DDD@DDV-uV a- iY-k e\st:3{h st:rf9:Oe?o" L<'I&cS st:rf9:Oe?o" L<'I&cS st:rf9:Oe?o" L<'I&cS st:rf9:Oe?o" L<'ID,Y66Rs2YN]꺛WI#_lh$nqظXX:iS8])^32g urp=ds<ۅ" a$k;   @ Q$شAmt: MMՔA5$4Aε${IOS wZ5[k*s!Fs^=qeH5؍J,L3kp>":V }7b03;aĴw é4i-1nWjc\gl`g4{+7=8sPzaqeke$e1'57ݡQ9!#ǜN^vUsS7=ExsS7=ExsS7=ExsS7=4̑{(bs\b)b .aMw2Sw,#{ ݶKptGfX)d2Gs˚i)m{ }PAK=%/a<58DnB2Ŧ:퀹15ad0C+\3I{{ti qG !ɳncB uߡhR6Pߍ{:I |0x8MA<{kNaTgg ;]?4s7~o{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fSo{=U?j\fS 0ɉITRDqm;pqpw߹*c%SO,RO$4o7ۡS宖=2<ݔY4-tIAguM֚>,|r afmdX/؋j1R"J&Jmm4k}2Rx$A9ݧz+Zhc1\ ;?L #2?AZ#2?AA?gϺE?=}/p-D@DDD@DDD@DDD@DD -*Ș\hmxNUAƫތ Wz0~Aw&ƫތDlj-]Iw) Wz0~lj-]JtAƫތ Wz0~cpJQD kG1ZA xb0aaf^P27^ƱξH:*xelǕX:m;?kQ_,330֛^H8!e=>̇l^5m-; u;)?wS5[D@DDD@DDD@Y(ZbY(Zb ,U'- 4vkD6o4h/>rj-]J ,?^Aƫތ Wz0~Aw&ƫތDlj-]Iw) Wz0~lj-]JtAƫތ Wz0~Aw&ƫތDlj-]Iw) Wz0~)rsCA'+KRY4tgٸq5q6'r혤zYG+c7kH$͹uR ȨcV8$a8<4mF\c$m75pi 􂃤UN%H*Leָ1)IX^tyR eso1278#)67Aq7qcccs ^\Xu.%IBs5Ɨ; nM:s9Yź뎻Xj(sˉ/{bcql},.m`N!qc_J$f(-I#As󠺲1% j(y5#- <100ʊ/(n2 X[Y\p+j-<p6Z8͐Z#$ɦ$TGu^-=}3CJhӚyݛY]*69"k y smZpJ  :i[QCl5]s{QII+$ff:rGqpw5@9d1^.>5znE\Eˋ$OI:h%\0a9sowBr~_6Al2 )^̭P/iqnk}IVxlʹzvW8=[]oa1eg+I&ps4_@[qAeA0Y\@?̫(R^״?qX,q Dz|K;ZM _q[ƴ lBbso>V8: ̸qD6fqX^]4~qk>F麈3*(*ad_-TS9 3gpMwL{T>$fk34RQsmisNVe\ VS}8D=oZ{޵ݫAS&LM]ںD=oZ{޵ݫA($i;slޙI5UeL-NCfbfMٕ8 |Gz8'gL7rAƾJj \f.quK=%/a<58DnB2Ŧ:퀹&KD9hecU+ln) 8Gٷ1!д M2GbF*d& gܙͮX.kbBiv{KZX@DDD@DDD@DDD@DDV-uV 4#Ʈ=oZO~WsɽkWD2? #=2MA" MAtt~P{] """ """ ""mTi'e:G=ױAqGQHזvۡ54l*LlsA˕\ EU\,Ī_QE%"9fnPRTI$I$AcrIm;f4uoAje#t yxmlNb>A|}edy`ja&g6bl[pAfG%e\GQ@ cm"m;W%H.#iqU6_S$141/X-4f<9|~KCOIǓ,Ls2FY"Vy^ݥcCpȞė7sks4Y;GNțyqq>rT8Q#Ů8Q#?GyQb̿!/WK~B_&ts&\\ɺ?(=.r~_6].Oy:DDD@DDD@DDD@DDD@DDuQ<ncwxBoeEY7}LXm\Gr-_85N5iv{KZ̳[/_tۍ@[g hZsUQؾ4XSg7k& 7iYZSKA.I5 r\ě8BX#Fп; 8` ۊS'X(W7 .w='(] Q5E@2ma6sp@ʜ2IlTI$r_>u̸E6@b-D26E@΂1*K;YM(6;1䜤nk6I窨VVT9\휭c^=VVOU M^\{\z|.}${Gei09Opi&#$g8 {i=$77 #Bܬo䓩$I&䓩&DD@DDD@DDD@Y(ZbY(Zb XݣB1av _ɿ+̿!/Pt9t~P{].dH:},qkT?IQwa)i+!l~G؇w6yƎ#+?9]a?11JXi^^^4Ef[7rރMLqT:G0!kCA|5F)jMd4RSFati6tH+bjy+cb Im.$ c 2Hcˤq,vfI"=eMv)=\tBΧs'mi[#1_Km $<ϖG_R]^0Ygo4s46:wK:Lk+&8F,(IˑcNk'/toC#䣑="qg?,ۿ.mS[lf˳\mo ) mdXG >dXhЯ*8XݣB%oJs/K""dK7G" """ """ (!i8^*m8&Ren7L5vwf{I'p """ """ """ """ 4̑{(bs\b)b b5cw39D4CchqxiQpJh+inhmpiz9i8\@c}rګk]!H#Z HAdEL'1 F >GkT(l:$^Lj{)ư2G5r =)cݲQ#Ze:7kd .d惕Xj r 8&j!Zj}<Ŕu&2ѷ^彅9d>HH`Z XZ`\5Me, .H$QȣlqckZ`7t #2?AZ#2?AA[~W,?^@\7t%oJ2nu˥̛r+r/AS5+yCu+c)0昘{1i$Rn7A59ك_ qX8Ă7 ʶʓ[T%60 mvh;w-5VZ'9k/`fu4 b!M lg3\ "yUTꆍgF.F7@N=SSi #mrV m(i:ahY&K2-NIނ9?N;v;mԘtpus{]F[ۯ#}jdth7]ՊziaJꊀE>kAAC jYύm5qibaľ7 De`ܺ)|sÝżgUi$R;6)Z6h6l;nUsNX;G |;w67۰񉦆 ȸhoN掕,0jL,<n`-~Yd4H<.i!.xy~mtG$Cd >(+7yKzDa^%=Kֽ[M˺ZN/$ig4&PrY =AH9Dz'56-" S%=h](Z5pH VK;00,+%^|t(*6YʙLR6i(f$vM,MtL0gM%[ :A}mpԜz#.i| /mAHiiLTŎNB䃿K2j%F)?{fږ|&Fnnrw[A5Mn`X4JV;N 5W*zHjasĢ0Hkbmk.,5ZӠ -1k8G̃k|RrY06%p͠n*Dj&ԸC,ٝ9LY ŶuqM,sc5,&C.VJǛ.-e3i :;WystXXXZ3jh#v;fjɠWfwNiQPʂߍcƺ$.c2F1졉sMHe+N±)c^9KdCn,6ۣz(# v=`#E&G4n522h-T~q5ALN )v:,qXsl-e;۝,dwGyׯP!kKKO$Mt䘟ۂgPPSbdgpJ2>kI.4.՜ IFh - BnAl`r>\ G}4nsn\KE*hhi<^# \rܷR⧅bm`8Q#Ů8Q#?GyP$`\h´>w39w3,]+C N]+C A?p C;Sp C;Ph"´>´>w39w3G̏~+Vڳ8Ca8QWMVG3\:PwŇ?t+ʎhЯ """ MAtt~P{] """ """ ""\,Ks^R:KmBJL4j%S2&X0OMXhj7{j\`cn1amhfKM ct`) RgnGݠnPc υΫ0H#t6%huxo\AQ %1d9w0^֖c8ȉ,kXa7ym-;*]R"Y҆ hNA#[Ly%ßUg05s6[rY-E $o&HZnHi2ɒ&7f܌@4CA(⢥41捱\Xt1їJQ0ɚZӶjXeFׇ}WCd}۷Awɴo32so32mz̺Dz̛Aަ7*U8=5SD5E `om|>\'b Syh;feː}V$N\'b Syh;feː}V$N\'b[`k kZ,xzh;w?\'brUI;|Z]ODZ]OE I؜kN9{SQ9{SQ}>_v'.AZdE5NE5_yr$ː}V$Ah;w?h;w?\'brUI;|Z]ODZ]OE I؜kN9{SQ9{SQ}>_v'.AZdE5NE5_yr$ː}V$Ah;w?h;w?\'brUI;|Z]ODZ]OE I؜kN9{SQ9{SQ}>_v'.AZd<3686Xiwo32>_v'.AZdwd;9Vjm >_v)!2ȪX] fnA}s&\\ɺ?(=.r~_6DA" """ """ "" xW>#h"" """ """ """ """ """ """ ""t>H%DDɺ?(=.gtkextra-3.2.0/docs/tutorial/Makefile.in0000644000076400001440000003054312604172272015136 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/tutorial DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLADE_CATALOG_DIR = @GLADE_CATALOG_DIR@ GLADE_CFLAGS = @GLADE_CFLAGS@ GLADE_LIBS = @GLADE_LIBS@ GLADE_MODULE_DIR = @GLADE_MODULE_DIR@ GLADE_PIXMAP_DIR = @GLADE_PIXMAP_DIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_EXTRA_MAJOR_VERSION = @GTK_EXTRA_MAJOR_VERSION@ GTK_EXTRA_MICRO_VERSION = @GTK_EXTRA_MICRO_VERSION@ GTK_EXTRA_MINOR_VERSION = @GTK_EXTRA_MINOR_VERSION@ GTK_EXTRA_VERSION = @GTK_EXTRA_VERSION@ GTK_EXTRA_VERSION_SHORT = @GTK_EXTRA_VERSION_SHORT@ GTK_LIBS = @GTK_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGTKEXTRA_SO_VERSION = @LIBGTKEXTRA_SO_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gdktarget = @gdktarget@ gtkextratargetlib = @gtkextratargetlib@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgladegtkextra_soname = @libgladegtkextra_soname@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ms_librarian = @ms_librarian@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ gtkextra-tutorial.sgml \ images/gtksheet_cell_text.jpg \ images/gtksheet_new_sheet.jpg \ images/gtksheet_pack_combo.jpg \ images/gtksheet_pack_xpm.jpg \ images/gtksheet_range_bg.jpg all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/tutorial/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign docs/tutorial/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: @HAVE_DOCBOOK_FALSE@html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool @HAVE_DOCBOOK_FALSE@pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am @HAVE_DOCBOOK_TRUE@all: html @HAVE_DOCBOOK_TRUE@html: @HAVE_DOCBOOK_TRUE@ if test -w $(srcdir); then \ @HAVE_DOCBOOK_TRUE@ (cd $(srcdir); \ @HAVE_DOCBOOK_TRUE@ db2html gtkextra-tutorial.sgml; \ @HAVE_DOCBOOK_TRUE@ test -d html && rm -r html; \ @HAVE_DOCBOOK_TRUE@ mv gtkextra-tutorial html; \ @HAVE_DOCBOOK_TRUE@ mkdir html/images; \ @HAVE_DOCBOOK_TRUE@ cp images/*.* html/images); \ @HAVE_DOCBOOK_TRUE@ fi @HAVE_DOCBOOK_TRUE@pdf: @HAVE_DOCBOOK_TRUE@ if test -w $(srcdir); then \ @HAVE_DOCBOOK_TRUE@ (cd $(srcdir); db2pdf gtkextra-tutorial.sgml); \ @HAVE_DOCBOOK_TRUE@ fi @HAVE_DOCBOOK_TRUE@dist-hook: html @HAVE_DOCBOOK_TRUE@ cp -Rp $(srcdir)/html $(distdir) @HAVE_DOCBOOK_FALSE@dist-hook: @HAVE_DOCBOOK_FALSE@ echo "***" @HAVE_DOCBOOK_FALSE@ echo "*** Warning: Tutorial not built" @HAVE_DOCBOOK_FALSE@ echo "*** DISTRIBUTION IS INCOMPLETE" @HAVE_DOCBOOK_FALSE@ echo "***" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gtkextra-3.2.0/INSTALL0000644000076400001440000001722712603754176011343 00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. gtkextra-3.2.0/ChangeLog0000755000076400001440000020670312604172055012055 000000000000002015-10-03 Fredy Paquet * GtkPlot*: merged api fixes to support binding generation via Gir-File * GtkPlotCanvas: new enum GtkPlotCanvasChildFlags * GtkPlotCanvas: changed type of a struct member in _GtkPlotCanvasChild from GtkPlotCanvasFlag to GtkPlotCanvasChildFlags * updated gtkextra-3 version to 3.2.0, Libtool Revision 8.0.0 * published gtkextra-3 version 3.2.0 2015-08-07 Fredy Paquet * GtkPlot*: fixed types and annotations for interface generation via Gir file 2015-08-01 Fredy Paquet * GtkDataEntry: fix dataformat race condition in gtk_data_entry_get_text() PR#205431 * updated gtkextra-3 version to 3.1.5, Libtool Revision 7.5.0 * published gtkextra-3 version 3.1.5 2015-07-04 Fredy Paquet * GtkSheet: fix SEGV in draw_xor_rectangle() PR#203012,201893,203139,204742 * GtkSheet: fix Invalid read of size 4 in _gtk_sheet_move_query() * updated gtkextra-3 version to 3.1.4, Libtool Revision 7.4.0 * published gtkextra-3 version 3.1.4 2015-05-29 Tom Schoonjans * spec file: docs install path updated 2015-02-07 Fredy Paquet * GtkSheet: fixed auto-scrolling for invisible columns PR#202688 * GtkSheet: changed gtk_sheet_moveto() enum params from gdouble to gint * updated gtkextra-3 version to 3.1.3, Libtool Revision 7.3.0 * published gtkextra-3 version 3.1.3 2015-02-01 Fredy Paquet * fixed docs install path (conflicts with gtkextra-2) 2014-12-26 Fredy Paquet * updated gtkextra-3 version to 3.1.2, Libtool Revision 7.2.0 * published gtkextra-3 version 3.1.2 2014-07-31 Fredy Paquet * GtkSheet: fixed sheet editor contents when setting text of active cell PR#104553 2014-07-13 Fredy Paquet * GtkSheet: fixed dataformat on cell deactivation PR#104167 2014-05-31 Fredy Paquet * GtkPSFont, GtkSheet, GtkSheetColumn: fixed some compiler warnings 2014-03-16 Fredy Paquet * GtkSheet: fixed several critical warnings during object destruction PR#102114 2014-03-09 Fredy Paquet * Merged bugfix branch * updated gtkextra-3 version to 3.1.1, Libtool Revision 7.1.0 2014-03-08 Fredy Paquet * GtkItemEntry: prefix all functions with "_item_entry" to prevent confusion with GtkEntry * GtkItemEntry: fix SEGV, correctly chain up object destruction, PR#101967, PR#101214, PR#100847, PR#101004 2014-02-02 Fredy Paquet * Reworked libtool versioning scheme, now documented in developer CMS * configure.ac - re-initialized libtool versioning removed GTK_EXTRA_INTERFACE_AGE and GTK_EXTRA_BINARY_AGE * updated gtkextra-3 version to 3.1.0, Libtool Revision 7.0.0 * published gtkextra-3 version 3.1.0 2013-12-31 Fredy Paquet * GtkSheet: fixed SEGV caused by missing child reference counting PR#100392 * GtkSheet: added parameter checks to gtk_sheet_attach() * GtkSheet: optimized scrolling behaviour with many sheet childs PR#99118 * GtkSheet: fixed SEGV in _get_string_extent() * GtkSheet: set focus when tabbing into the sheet (prevent invisible focus) PR#95144 2013-12-30 Fredy Paquet * GtkSheet: fixed warnings and SEGV in gtk_sheet_forall_handler() for invalid childs 2013-12-08 Fredy Paquet * GtkSheet: fixed maximum autosized row height * GtkSheet: fixed typo, reworked debug output * GtkDataTextView: cut too long texts when pasting into length limited buffer * GtkSheet: finished GtkSheetColumn->wrap_mode in cell drawing PR#95931 * GtkSheet: fixed SEGV in _gtk_sheet_entry_size_allocate * GtkSheet: fixed vertical scrolling problems 2013-07-19 Fredy Paquet * GtkSheetColumn: fixed sheet realized check that caused SEGV 2013-07-02 Fredy Paquet * merged branch gtk3 into master 2013-06-28 Fredy Paquet * replaced deprecated accessor: GtkWidget->parent * replaced deprecated accessor: GdkCursor->type * replaced deprecated accessor: GtkContainer->border_width * replaced deprecated accessor: GtkEntry->is_cell_renderer * GtkSheet: fixed custom sheet_entry assignment, update testgtksheet * GtkDataTextView: fixed entry setup during cell activation 2013-06-27 Fredy Paquet * replaced deprecated GTK_SIGNAL_FUNC with G_CALLBACK * disabled deprecated GTK_TYPE_COMBO_BOX_ENTRY from Gtk 2.24 * disabled deprecated GTK_TYPE_COMBO from Gtk 2.4 (yes, 2.4!) * GtkSheet: clean out deprecated GtkAdjustment accessors 2013-06-26 Fredy Paquet * GtkSheet: pango font description handling rewritten to prevent occasional crashes * GtkSheet: fixed memory leak in font description handling * merged branch GtkDataTextView into master * GtkSheet: doc fix 2013-06-25 Fredy Paquet * GtkSheet: code cleanup, GtkDataTextView key binding in sheet fixed 2013-06-24 Fredy Paquet * GtkDataTextView: new subclass of GtkTextView to limit multiline text length * GtkDataEntry: resolved deprecated G_CONST_RETURN * GtkItemEntry: added internal max_length_bytes property * GtkSheetColumn: added max_length, max_length_bytes, wrap_mode properties * GtkSheet: added new sheet_entry-editor GtkDataTextView * GtkSheet: reworked editor type switching for GtkDataTextView * GtkSheet: update new editor properties in sheet-entry 2013-06-23 Fredy Paquet * GtkItemEntry: fixed UTF-8 character insertion, killing trailing text (PR#96868) * new branch GtkDataTextView for development of property enhancements * GtkDataEntry: added new property max-length-bytes * Glade-Integration: added tag to catalog 2013-06-22 Fredy Paquet * GtkSheet: fixed memory leak in _gtk_sheet_entry_setup() * GtkSheet: fixed memory leak in DeleteRow() * GtkSheet: fixed memory leak in DeleteColumn() * GtkSheet: fixed cell activation in gtk_sheet_delete_columns() 2013-06-19 Fredy Paquet * GtkSheet: signal documentation fixed 2013-05-26 Fredy Paquet * published gtkextra-3 version 3.0.5 * updated gtkextra-3 version to 3.0.6 2013-05-26 Fredy Paquet * GtkSheet: fixed drawing with invisible columns at realize PR#92947 * GtkSheet: cleanup debug defines 2013-05-19 Fredy Paquet * GtkSheet: added 'window' param to gtk_sheet_get_pixel_info() - enabling correct decoding of clicks into the row/column header area * GtkSheet: reworked global sheet button press handler - will only handle single-press button1 events internally - propagate all other button-press-events to the sheet - allows you to connect your own handler to process right-clicks now 2013-05-18 Fredy Paquet * Merged Tom Schoonjans packaging branch into master * packages can now be created using: rpmbuild on Fedora/Centos/ScientificLinux dh_make on Debian/Ubuntu 2013-04-19 Fredy Paquet * Glade Integration: added gtk+extra-catalog.xml to .gitignore (generated) 2013-04-07 Fredy Paquet * Glade Integration: fixed soname generation in glade catalog xml for win32 2013-03-23 Fredy Paquet * published gtkextra-3 version 3.0.4 * updated gtkextra-3 git version to 3.0.5 2013-03-23 Fredy Paquet * GtkItemEntry: remove debug output when debug is off * GtkSheet: fixed h/voffset when deleting rows PR#90224, PR#95088 * GtkSheet: fixed horizontal scrollbar size * GtkExtra: removed Makefile.mingw, config.h.win32 * GtkExtra: cleanup extra distribution files 2013-03-19 Daisuke Shimamura * GtkPlot: patch for UTF-8 string handling 2013-03-17 Fredy Paquet * MinGW: fixed autoconf environment, reworked Git exceptions * Glade integration: fixed build problems in MinGW 2013-03-16 Fredy Paquet * cleanup build environment * migration to git repo * cleanup handling of generated files for git 2013-03-13 Tom Schoonjans * fixed build problem of 3.0.3 * upgraded configure.in script to latest autoconf standards including rename to configure.ac * removed several non-essential buildscript files that can be generated by the developer with autoreconf * removed several non-essential source files that can be generated by the user when running make 2013-03-10 Fredy Paquet * cleanup configure.in and automake problems on MinGW 2013-03-10 Fredy Paquet * published gtkextra-3 version 3.0.3 * updated gtkextra-3 cvs version to 3.0.4 2013-03-10 Fredy Paquet * GtkPlot: doc update 2013-03-10 Daisuke Shimamura * GtkPlot: patch to fix MinGW missing drawing problem Bug ID: 3182951 * GtkPlot: patch for SEGV in gtk_plot_cairo_draw_pixmap() * GtkPlot: patch for image size in testgtkplot.c 2013-03-03 Fredy Paquet * published gtkextra-3 version 3.0.2 * updated gtkextra-3 cvs version to 3.0.3 2013-02-17 Fredy Paquet * GtkSheet: fixed vertical and horizontal GtkItemEntry alignment * GtkSheet: fixed dirty text redraw when clip_text is off 2012-12-20 Fredy Paquet * GtkSheet: fixed SEGV when deleting rows with unrealized childs 2012-11-30 Fredy Paquet * GtkSheet: fixed entry_type switching when moving around the sheet 2012-11-25 Fredy Paquet * GtkSheet: new signal GtkSheet::enter-pressed to intercept default action 2012-11-11 Fredy Paquet * GtkSheet: fixed update of sheet_entry style when moving around colored cells * GtkItemEntry: fixed justification propagation to GtkEntry alignment * GtkSheet: fixed clipping of active cell border * GtkSheet: fixed sheet_move_query check when tabbing around w/scrollbars * GtkSheet: fixed set_active_cell to scroll active cell into view range * GtkSheet: fixed signal documentation bug: NEW_ROW_HEIGHT, NEW_COL_WIDTH 2012-10-04 Fredy Paquet * GtkSheet: new signal #GtkSheet::populate-popup propagates sheet_entry signal 2012-10-03 Fredy Paquet * GtkSheet: auto-resize on window size modification fixed * GtkSheet: cleanup debug defines 2012-09-28 Fredy Paquet * GtkDataEntry, GtkSheetColumn: fixed removal of thousands separator 2012-09-14 Fredy Paquet * GtkDataEntry, GtkSheetColumn: fixed formatting for non POSIX/C locales (UTF-8) 2012-09-09 Fredy Paquet * GtkDataEntry, GtkSheetColumn: fixed formatting for non POSIX/C locales * GtkSheet: experimental support for cell text preselection (incomplete) * GtkSheet: fixed missing return value in _gtk_sheet_move_query() * GtkSheet: fixed return type of _gtk_sheet_count_visible() 2012-09-01 Fredy Paquet * GtkSheet: reworked drag/resize of sheet selection w/invisible columns 2012-09-01 Fredy Paquet * GtkSheet: fixed drawing, dirty edges beyond rightmost column * GtkSheet: use style background for area beyond outmost row/column * GtkSheet: reworked drag/resize of sheet selection w/invisible columns 2012-08-01 Fredy Paquet * GtkSheet: fixed extent calculation and autoresize w/unrealized window * added misc/gtkextra.vpj (slickedit project file) * GtkSheet: horizontal adjustment partially fixed 2012-07-31 Fredy Paquet * GtkSheet: removed obsolete Sheet::changed signal emissions for column width modifications connect to Sheet::new-column-width for row height modifications connect to Sheet::new-column-width * GtkSheet: reworked emission of Sheet::changed gtk_sheet_column_button_add_label() always emitted (even when frozen) gtk_sheet_column_button_justify() no longer emitted (contents unchanged) gtk_sheet_column_label_set_visibility() no longer emitted (contents unchanged) gtk_sheet_row_button_add_label() always emitted (even when frozen) gtk_sheet_row_label_set_visibility() no longer emitted (contents unchanged) gtk_sheet_row_button_justify() no longer emitted (contents unchanged) * GtkSheet: sheet button drawing reworked and optimized * GtkSheet: autoresize completely rewritten and optimized 2012-07-29 Fredy Paquet * gtkplot.h: replaced callbacks in _GtkPlotAxis with function typedefs https://bugzilla.gnome.org/show_bug.cgi?id=674002 * cleanup documentation tags (introspection warnings) * re-generated GtkExtra-3.0.gir, added GtkExtra-3.0.typelib * GtkSheet: new properties autoresize-rows, autoresize-cells * GtkSheet: experimental support for autoresize-rows (not optimized) 2012-07-22 Fredy Paquet * GtkSheet: improved autoresize columns (max width limit) 2012-06-04 Fredy Paquet * fixed autoconf m4 includedir in autogen.sh - Bug ID 3471311 2012-06-04 Fredy Paquet * fixed autoconf m4 includedir - Bug ID 3471311 2012-06-03 Fredy Paquet * Added m4/introspection.m4 to the distribution - Bug ID 3471311 * fixed dimension name dz - Bug ID 3450154 2012-04-28 Fredy Paquet * GtkSheet: reworked KeyBindings to use Alt-Mod instead of Super-Mod (collisions on Win7) 2012-04-22 Fredy Paquet * Gtk+3 Migration: Prepare: cleanup single includes 2012-04-15 Fredy Paquet * GtkSheet: fixed redraw problems when mapping a hidden, modified sheet 2012-04-12 Fredy Paquet * GtkSheet: rewritten key event processing code to use GtkBindings * GtkSheet: new move-cursor signal to support GtkBindings * GtkSheet: advanced TAB control via gtk_sheet_set_tab_direction() * GtkSheet: documented default bindings http://gtkextra.sourceforge.net/cms/index.php?option=com_content&view=article&id=33&Itemid=19 * support for gobject-introspection V1.31.20 * build with --enable-introspection is broken (g-ir-compiler crashes) * GtkExtra: raised version to 3.0.2 2012-04-06 Fredy Paquet * replaced all keysyms with new names GDK_KEY_ (from Gtk 2.22, with compatibility support) 2012-03-31 Fredy Paquet * GtkSheet: fixed uninitialized memory access in gtk_sheet_realize_handler() 2012-03-30 Fredy Paquet * GtkSheet: eliminated ** CRITICAL **: gtk_sheet_set_title: assertion `title != NULL' failed * GtkSheet: fixed invalid memory access in gtk_sheet_cell_draw_label() 2012-03-11 Fredy Paquet * GtkSheet: fixed memory corruption in gtk_sheet_realize_handler() 2012-02-19 Fredy Paquet * GtkSheet: prevent drawing outside of sheet area 2012-01-04 Fredy Paquet * GtkItemEntry: incorporated patch from Bug ID 3439972 2011-12-25 Fredy Paquet * GtkDataEntry: formatted display of contents is working now * data formatter documented 2011-12-24 Fredy Paquet * split gtksheet.[ch] into smaller pieces: gtksheetcolumn.[ch] * added data formatting library (gtkdataformat.[ch]) * GtkSheet: new - formatted display of numeric cell data is now possible! 2011-12-18 Roy Rankin * gtkextra/gtkcolorcombo.c: Fix array overflow - Bug ID 3316408 2011-11-26 Fredy Paquet * fixed configure options - Bug ID 3414011 2011-11-16 Fredy Paquet * fixed include problem with glib V2.31.0 (only glib.h can be included directly) 2011-10-30 Fredy Paquet * GtkSheet: improved column button redraw, reduced flickering 2011-10-29 Fredy Paquet * GtkSheet: fixed dirty text display w/ clip_text off and ivisible columns * GtkSheet: fixed gtk_sheet_set_active_cell() into invisible columns 2011-10-09 Fredy Paquet * GtkSheet: fixed gtk warning in gtk_sheet_set_active_cell() * GtkSheet: new property 'description' for application use * GtkSheetColumn: new method gtk_sheet_column_get() to get GtkSheetColumn objects 2011-10-08 Fredy Paquet * GtkSheet: fixed gtk_sheet_cell_get_tooltip_text() * GtkSheet: global button press now toggles sheet selection * GtkSheet: optimize: removed double cell activation on map * GtkSheet, GtkSheetColumn: honor can-focus widget properties * GtkSheetColumn: changed can-focus default setting to TRUE * GtkSheet: fixed critical warning upon unmap 2011-09-17 Fredy Paquet * GtkSheet: fixed redraw problems when switching row/columns visible on/off * GtkSheet: disable active cell when hiding active row/column * GtkSheet: fixed sheet range when switching row/columns visible on/off 2011-09-16 Fredy Paquet * GtkSheet: fixed application crash when making hidden sheet columns visible 2011-09-10 Fredy Paquet * GtkSheet: fixed colormap allocation problem in gtk_sheet_range_set_background, gtk_sheet_range_set_foreground * GtkSheet: optimized pixmap copy in gtk_sheet_cell_draw_label 2011-08-19 Fredy Paquet * fixed more redraw problems on sheets without scrollbars 2011-08-14 Fredy Paquet * modified GtkSheetColumn property 'datatype' to match GtkDataEntry definition * replaced 'class' by 'klass' - as class is a registered c++ keyword 2011-08-12 Fredy Paquet * new GtkDataEntry widget with formatting capabilities, not yet finished * added GtkExtra-3.0.gir to the CVS repo 2011-08-07 Fredy Paquet * documentation update - added own page for GtkSheetColumn and related * updated documentation on sf project web http://gtkextra.sourceforge.net/docs/reference/index.html * old reference manual moved to a subdirectory: http://gtkextra.sourceforge.net/docs/reference/gtkextra-2/index.html 2011-08-05 Fredy Paquet * gtksheet.c: gtk_sheet_thaw() fixed redraw range and execution 2011-05-01 Fredy Paquet * updated gtkextra-3 version to 3.0.1 * added Makefile.mingw in glade support files works together with a fresh build of glade3-3.8.0 on MinGW * fixed bug ID 3250296: added gtkextra-compat.h to the gtkextra-3 distribution * eliminated autoconf warnings on LT_CURRENT, LT_REVISION, LT_AGE ref: http://bugs.gentoo.org/show_bug.cgi?id=230199 2011-04-10 Fredy Paquet * ./configure: better CFLAGS handling, respect environment and do not combine -g -O2 (it kills the debugger) 2011-03-24 Fredy Paquet * GtkSheet: allow gtk_sheet_set_active_cell(sheet, -1, -1) to deactivate current cell 2011-03-23 Fredy Paquet * GtkSheet: fixed unwanted entry activation during hide_active_cell() which lead to multiple focus signal emissions 2011-03-22 Fredy Paquet * GtkSheet: new signals entry-focus-in, entry-focus-out in order to be able to track focus on the underlying sheet-entry 2011-03-20 Fredy Paquet * gtkitementry.c: fixed bug ID: 3170287 in gtkextra-3 2011-02-1 Fredy Paquet * added Makefile.mingw install target 2011-02-1 Fredy Paquet * fixed Windows build environment tested on a fresh MinGW installation see build instructions in Makefile.mingw * replaced Makefile.win32 by Makefile.mingw 2011-01-09 Fredy Paquet * GtkSheetColumn: fixed abort() during gtk_widget_set_parent() * replaced some deprecated GtkWidget macros 2011-01-08 Fredy Paquet * fixed library naming in docs 2011-01-07 Fredy Paquet * GtkSheetColumn: setup correct parent widget 2010-12-17 Fredy Paquet * fixed library naming, now corresponding to V3.0 and the content of gtkextra-3.0.pc * fixed gobject-introspection to include Gtk-2.0.gir * Linux compilation tested * fixed missing GLIB_GENMARSHAL in configure.in * added missing VOID:INT,BOXED to gtkextra-marshal.list 2010-11-30 Fredy Paquet * doc/tutorial/Makefile.am: fixed automake warnings *** GtkSheet: new feature: added optional GObject-Introspection Reference: http://live.gnome.org/GObjectIntrospection * added new ./configure option --enable-introspection to build GtkExtra-3.0.gir: cd gtkextra ; make GtkExtra-3.0.gir 2010-10-18 Fredy Paquet *** GtkItemEntry: fixed major crash source in item entry buffer handling 2010-10-15 Fredy Paquet * GtkSheet: fixed cell and row/column deactivation while paging around * GtkSheet: fixed background redraw when outmost column is invisible 2010-08-21 Fredy Paquet * GtkSheet: new public interface function gtk_sheet_get_selection() 2010-08-20 Fredy Paquet * GtkSheet: eliminated recursive call to from hide/show active cell (SEGV) * GtkSheet: fixed auto-switch entry with active sheet range selections * GtkSheet: added a set of signal debugging functions (GTK_SHEET_DEBUG_SIGNALS) 2010-08-14 Fredy Paquet *** GtkSheet: auto-switch column sheet entry, if defined auto-switching will only take place, if the column or sheet entry_type is explicitly set * GtkSheet: fixed GtkTextView positioning * GtkSheet: fixed set-cell signal * gtkextra/Makefile.am: fixed Bug ID 3021754 2010-08-13 Fredy Paquet *** GtkSheetColumn: new properties: vertical cell text justification * GtkSheet: fixed SEGV on global button press 2010-08-07 Fredy Paquet * GtkSheet: reworked "changed" signal emission, cell data updates and cell redraw * testgtksheet.c: reworked sheet_entry change, GtkSpinButton works now 2010-08-07 Fredy Paquet * GtkSheet: replaced deprecated signal "pressed" on the global sheet button *** GtkSheet: new feature: entry of multiline text via GtkTextView as sheet_entry * GtkSheet: reworked sheet_entry widget processing * GtkSheet: new public interface functions gtk_sheet_*entry* to access * testgtksheet.c: use GtkTextView for editing of column 3 in sheet 2 2010-08-06 Fredy Paquet * GtkSheet: created a new GtkSheetEntryType in order to control it from glade-3 * GtkSheet: replaced column is_multiline property with entry_type * GtkSheet: new public interface function gtk_sheet_get_entry_type() * GtkSheet: re-activated sheet entry justification property, it works 2010-08-05 Fredy Paquet * GtkSheet: added row and column tooltip markers *** GtkSheetColumn: new properties is_key, is_readonly, is_multiline, data_format, data_type, description is_key, description have only informational character for the application is_readonly is implemented, others not yet * GtkSheet: new public interface function to get/set the new properties * gtkextra/*.c: documentation fixes - no more warnings by docgen 2010-08-04 Fredy Paquet * GtkSheet: new tooltip feature, added to sheet, column, row and cell * GtkSheet: new public interface functions to get/set tooltips on sheet, column, row and cell * GtkSheet: added a small red triangle in the top right cell corner, if there is a tooltip attached * gtksheettest: added some tooltips to the first sheet * GtkSheet: fixed a bug in AddRow() which was destroying column data * GtkSheet: reworked cell data allocation and deallocation * GtkSheet: the cell is no longer cleared, when the text is deleted manually, so attributes, tooltips, links remain in the cell, when you press the delete key * GtkSheet: Calling gtk_sheet_cell_clear() function erases all data in the cells, to remove only the text, call gtk_sheet_set_cell_text() with NULL 2010-08-03 Fredy Paquet * GtkSheet: Glade-3: cut/paste of sheets now works without dropping all columns * GtkSheetColumn: new properties 'width', 'justification', also working with glade-3 * GtkSheetColumn: added column icons 2010-07-30 Fredy Paquet * GtkSheet: fixed cursor key handling in rightmost column * GtkSheet: fixed deactivation of active cell on row deletion 2010-07-30 Fredy Paquet * GtkSheet: fixed cell editor width * GtkSheet: fixed active cell redraw conditions 2010-07-23 Fredy Paquet * GtkSheet: fixed SEGV when resizing columns and there is no scrolled window below * GtkSheet: fixed SEGV when resizing columns and there is no active cell * GtkSheet: fixed redraw of visible cell area when row or column titles are switched off 2010-07-16 Fredy Paquet * GtkSheet: fixed: placement of the cell editor when clicking into empty cells * GtkSheetColumn: defintively using visibility property of the underlying GtkWidget now * GtkSheetColumn: using sensitivity property of the underlying GtkWidget now * GtkSheet: new interface functions: gtk_sheet_column_visible() gtk_sheet_row_visible() gtk_sheet_column_sensitive() gtk_sheet_row_sensitive() * GtkSheet: resizeability of rows/cols was coupled to the sensitive property, rows/cols can now always be resized, independent of the sensitive property * GtkSheet: fixed: the last row of the sheet could not be resized * GtkSheet: fixed: left/right and up/down scrolling during sheet range selection 2010-07-09 Fredy Paquet * new include file gtkextra-compat.h to maintain backward compatibility for older gtk releases * added Pixmaps for Glade-3 integration: glade/pixmaps/hicolor * GtkSheet: fixed SEGV when extending cell selection beyond sheet boundaries * GtkSheet: double click between column titles will now always fit column width, not only enlarge 2010-07-07 Roy Rankin * gtkextra/*.c : Remove instances of direct bin, widget usage 2010-07-05 Roy Rankin * gtkextra/* : start remove depreciated GTK calls 2010-06-26 Roy Rankin * configure.in : link with math lib required by Fedora 13 2010-06-12 Roy Rankin * gtkextra/gtkitementry.c : patch to allow build with gtk2-21 2010-05-22 Fredy Paquet *** GtkSheet: glade column editor implemented * GtkSheet: still more SEGV fixed, concerning empty sheets (no cols, no rows) 2010-05-21 Fredy Paquet * GtkSheet: fixed sheet_editor size request * GtkSheet: reworked resizing a cell selection range (better, but still not very good) 2010-05-20 Fredy Paquet * GtkSheet: fixed lots of SEGV in empty sheets (no rows, no cols) * GtkSheet: moved all glade integration procs into glade-gtksheet-editor.c * GtkSheet: removed all sheet debug output ifndef DEBUG * GtkSheet: reworked selection range dragging code (more failsafe) 2010-05-19 Fredy Paquet * GtkSheet: fixed several SEGV in glade gtkextra integration * GtkSheet: adding/removing columns from within glade works now * GtkSheet: setting column property 'label' now works with GtkBuilder * GtkSheet: moved column visibility flag from GtkSheetColumn into the embedded GtkWidget * GtkSheet: SEGV in keyboard processing fixed *** added new ./configure option --enable-glade * GtkSheet: added glade sheet editor source (not yet finished) * GtkSheet: added po directory (glade support needs gettext installed) 2010-05-18 Fredy Paquet *** GtkSheet: changed GtkSheetColumn into an object, subtype of GtkWidget * GtkSheet: fixed several SEGV errors, most of them incorrect boundary handling * GtkSheet: fixed scrollbar behaviour near the end of the sheet * GtkSheet: experimental integration into GtkBuilder - not yet finished 2010-05-14 Fredy Paquet * GtkSheet: fixed gtk_sheet_get_child_at(): returned wrong child under certain conditions * GtkSheet: fixed some function declarations * GtkSheet: fixed some +1/-1 problems that caused SEGV * GtkSheet: fixed some doc tags 2010-05-12 Fredy Paquet * GtkSheet: fixed doc generation - there is still a problem with gtk_plot_marker_get_type * GtkSheet: fixed redraw problems on sheets with 0 rows or 0 columns * GtkSheet: fixed doc comments in gtksheet 2010-05-11 Fredy Paquet * GtkSheet properties completed * GtkSheet: bugfix: default grid color is now uniq * GtkSheet: replaced obsolete function gdk_color_alloc() * GtkSheet: fixed gtk_sheet_set_selection_mode() parameter type 2010-05-09 Fredy Paquet * changed --enable-debug option to non destructive behaviour *** Added initial Glade support to GtkSheet * properties "title", "n-rows", "n-cols" * class initialisation code adapted * GtkSheet: some drawing problems need fixing when the sheet gets 0 rows/cols 2010-05-08 Fredy Paquet *** added --enable-debug option to the configure script, default is off (-O2). * GtkSheet: Fixed a crash when double clicking between column headers 2010-05-04 Fredy Paquet * Fixed some minor portability issues: * test -e is not available in /bin/sh * echo -n doesn't work with all versions of 'echo' * Added some portability checks to configure.in (using autoscan) * Fixed spaces in front of two make commandlines (@GLIB_GENMARSHAL@) 2010-04-20 Roy Rankin * gtkitementry.h gtkitementry.c gtksheet.c gtkplotbox.c: add gtkextra-2 patches to work with gtk+2.18 2006-05-15 Jacek Sieka jsieka at memphite.se , from Memphite AB * Fixed memory leak in gtk_plot_canvas_destroy * Fixed font names for Windows in gtkpsfont.c 2005-09-19 Stefan Kost * gtkextra/gtksheet.c: (gtk_sheet_range_get_type), (gtk_sheet_class_init): example inline docs 2005-09-19 Stefan Kost * .cvsignore: * autogen.sh: * configure.in: * docs/Makefile.am: * docs/reference/Makefile.am: * docs/reference/gtkextra-docs.sgml: * docs/reference/gtkextra-sections.txt: * docs/reference/gtkextra.types: * gtkextra/gtkextrafeatures.h: * gtkextra/gtkextratypebuiltins.h: added gtk-doc api doc generation 2005-5-17 Adrian Feiguin * Port to gtk+-2 * So many changes, it's hard to keep track of: - GtkArgs - widgetization of canvas items - dozens of fixes and improvements 2002-5-21 Patches by Michael S. Noble (mnoble@space.mit.edu) * gtkplotcanvas.c: Support the creation of polygon children, via gtk_plot_canvas_put_polygon() gtk_plot_canvas_polygon_set_attributes() These mirror similar functions for rectangles and ellipses, and so require points in canvas-space (not pixel- or data-space), only more of them. The draw child code will automatically scale/move/etc the polygons when required. * The following functions were also added to gtkplotcanvas.c gtk_plot_canvas_child_get_position() gtk_plot_canvas_get_active_item_data() gtk_plot_canvas_get_active_item_type() to permit language bindings to query the "current/active item" on the canvas, without referencing canvas/child struct internals. * gtkplot3d.c: * gtkplotsurface.c: Moved _sqrt() from gtkplot3d.c to gtkplotsurface.c. It was referenced only in the latter file, but having it in the former could cause symbol referencing problems (an inlined static) with SparWorks 6.2 (cc version 5.3) on Solaris 8. * gtkplotps.c: the inclusion #include causes problems with gcc (GCC) 3.1 20020420 (prerelease) bundled with the Mac OS/X 10.2 developers toolkit (the file is missing). Since none of the wide character functions from wctype.h are actually being used within gtkplotps.c, it was simply removed. * gtkplotdt.c: the inclusion #include causes similar problems with gcc (GCC) 3.1 20020420 (prerelease) bundled with the Mac OS/X 10.2 developers toolkit (again, the file is missing). Since malloc.h is not a standard C header file (stdlib.h should be used instead), and none of the malloc.h functions are even being used in the source module, it was removed. * gtkextra.c: At line 123 the statement gboolean *result = *(gboolean **)var_args; is unportable to platforms on which va_list is not a void* (e.g., Compaq True64 Unix). In correcting this problem the GValue collection logic was simplified. *** Of all the mods this one needs perhaps the most careful review. *** * gtkpsfont.c: There's no point in allowing gtk_psfont_unref() to drop refcount below zero. It can cause spurious font init warnings later. * gtkplotdata.c: performance enhancement for spline connectors. Namely to precompute the number of points and alloate the spline array outside of the spline_eval loop. This simplifies the code and avoids numerous repetition of trivial g_realloc(previous_size+2) calls. There are other instances in the code where this optimization can be applied. The peformance hit becomes moe apparent when dataset sizes scale to 500,000+ points (even on my dual 2-Ghz cpu desktop). 2002-12-31 Toby D. Reeves * docs/Makefile.am, gtkextra/Makefile.am : Ensured variables set with == before using +=. * gtkextra.spec.in : Make the rpm name a variable. Set rpm name to gtk+extra2 allowing both 0.99.x and 1.1.x to be installed on same machine. * gtkextra/gtkplotcsurface.c : Changed function names to those found function prototypes. gtk_plot_csurface_get_level_attributes => gtk_plot_csurface_get_levels_attributes gtk_plot_csurface_set_level_attributes => gtk_plot_csurface_set_levels_attributes gtk_plot_csurface_get_sublevel_attributes => gtk_plot_csurface_get_sublevels_attributes gtk_plot_csurface_set_sublevel_attributes => gtk_plot_csurface_set_sublevels_attributes 2002-07-21 Allin Cottrell - Fix breakage in application of earlier gtkiconfilesel patch 2002-07-18 Toby D. Reeves * gtkextra.spec.in : Corrected %install to use DESTDIR. Make gtk+extra-devel package require gtk+extra. Added *.so to devel files. * gtkextra/Makefile.am : Added generated files gtkextratypebuiltins.[hc]. Necessary for proper Python wrappers. * gtkextra/gtkextra.c : gtk_extra_check_version --to-- gtkextra_check_version * gtkextra/gtkextra.h : Commented addition of "#include ". Unless Makefile.am is changed to use stamp files, would cause massive code rebuilds to often. * gtkextra/gtkiconlist.h : Identified an anonymous enum that should be named. Did not know what developers might choose. Needed for proper Python wrappers. * gtkextra/gtkplotdt.c : gtk_plot_dt_set_quatrilateral --to-- gtk_plot_dt_set_quadrilateral * gtkextra/gtkplotdt.h : gtk_plot_dt_set_quadtrilateral --to-- gtk_plot_dt_set_quadrilateral * gtkextra/gtkpsfont.[hc] : changed return type of gtk_psfont_get_psfontname() to "const gchar *" instead of "gchar *". * gtkextra/gtksheet.h : gtk_sheet_row_resizable --to-- gtk_sheet_rows_resizable Allin Cottrell - Update signal handling in gtkiconfilesel.c to avoid segfault in gtk_icon_file_selection_set_filter(). 11/20/2001 Summary of changes - gtkextrafeatures.h is now generated automatically by the configure script through gtkextrafeatures.h.in - gtkextra.h includes the new headers for gtkplotdt.h GtkIconFileSel ============== - New history combo to jump directly to a directory of choice, either typing in, or using the previous entries. GtkPlotCanvas ============= - New child: CANVAS_MARKERS to handle dataset markers (see gtkplotdata below) - New selection stretegy. - New function gtk_plot_set_pc - gtk_plot_canvas_freeze/thaw methods GtkPlotCSurface =============== - Gradient with sublevels. GtkPlotSurface ============== - Use new Delaunay triangulization algorithm (gtkplotdt) - New functions to colour the surface using a gradient proportional to the height field: void gtk_plot_surface_use_height_gradient (GtkPlotSurface *data, gboolean use_gradient); void gtk_plot_surface_set_transparent(GtkPlotSurface *data, gboolean transparent); GtkPlotData =========== - New alternative to retrieve data points trough a callback function using gtk_plot_data_new_iterator(...). See demo program testiterator.c - Scale points size using gtk_plot_data_set_a/da_scale(...) This is actually aplicable only for bubbles, boxes and arrows. - New functions: void gtk_plot_data_draw_gradient (GtkPlotData *data, gint x, gint y); void gtk_plot_data_gradient_autoscale_a (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_da (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_z (GtkPlotData *data); to autoscale gradient according to field. - gtk_plot_data_get_point() to retrieve values - Data markers: GtkPlotMarker * gtk_plot_data_add_marker (GtkPlotData *data, guint point); gboolean gtk_plot_data_remove_marker (GtkPlotData *data, GtkPlotMarker *marker); void gtk_plot_data_remove_markers (GtkPlotData *data); void gtk_plot_data_show_markers (GtkPlotData *data, gboolean show); gboolean gtk_plot_data_markers_visible (GtkPlotData *data); GtkPlot ======= - Eric Monsler Fixes for autoscaling. - New function gtk_plot_set_pc - New signal "tick_label" to retrieve axes tick labels. - New functions to handle axes labels: void gtk_plot_axis_set_labels_offset (GtkPlot *plot, GtkPlotAxisPos axis, gint offset); gint gtk_plot_axis_get_labels_offset (GtkPlot *plot, GtkPlotAxisPos axis); GtkPlotPC ========= - New function void gtk_plot_pc_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h); - Bugfixes and enhancements after working on gtkplotart (a driver for libart) and gtkplotgnome (a driver for gnomt-print) for SciGraphica. GtkSheet ======== - New function GtkWidget * gtk_sheet_get_entry_widget (GtkSheet *sheet); - Background colors and grid handling using: void gtk_sheet_set_background (GtkSheet *sheet, GdkColor *bg_color); void gtk_sheet_set_grid (GtkSheet *sheet, GdkColor *grid_color); void gtk_sheet_show_grid (GtkSheet *sheet, gboolean show); gboolean gtk_sheet_grid_visible (GtkSheet *sheet); 08/08/2001 Summary of changes - some minor cleanups to the cvs repository: copied autogen.sh from scigraphica and removed all files generated through autogen.sh/configure GtkPlotPC ========= - Tobias Rapp's () patch for numpoints < 1 in draw_polygon/lines - Several enhancements. GtkPlotDT ========= - fixed memory leak - test for triangle bounding box before testing if node is inside triangle -> speedup of factor 2! - calculate triangle area and emtpy circle when they are actually needed. -> minor speedup - skip nodes with same (x,y) as already inserted node. - bugfix for triangle bounding box calculation - added testgtkplotdtflux.c for displaying the generated mesh (testgtkplotdt.in can be used as test data!) 08/08/2001 Summary of changes GtkPlotDT ========= - added gtkplotdt.h, gtkplotdt.c (delaunay triangulization algorithm) - added testgtkplotdt.c, testgtkplotdt.in to test the above - added Makefile rule "testdt" to access this test 24/07/2001 Summary of changes GtkSheet ======== - bugfix in gtk_sheet_thaw - bugfix: FALSE return value after "deactivate" signal GtkPlotGdk ========== - memory leak in draw_lines/draw_polygon, by Damian Gilmurray GtkPlotCanvas ============= - memory leaks, by Damian Gilmurray GtkPlot ======= - memory leaks, by Damian Gilmurray - New functions: void gtk_plot_grids_set_on_top (GtkPlot *plot, gboolean on_top); gboolean gtk_plot_grids_on_top (GtkPlot *plot); display grids on top/below data. 27/06/2001 Summary of changes Gtk+Extra-0.99.15 includes new widgets, and important bugfixes and enhancements. GtkFileList =========== - New "gnome-like" icons. - Option to show/hide hidden files (name starting with ".")/directories - New functions (example in testgtkfilesel.c): gboolean gtk_file_list_open_dir (GtkFileList *file_list, const gchar *path); gint gtk_file_list_get_filetype (GtkFileList *file_list); gint gtk_file_list_add_type (GtkFileList *file_list, const gchar **pixmap_data); void gtk_file_list_add_type_filter(GtkFileList *file_list, gint type, const gchar *filter); GtkIconFileSelection ==================== - Enhancements and bugfixes. - Horizontal scrollbar only. - Directories in the iconlist and hidden files. - New option (example in testgtkfilesel.c): void gtk_icon_file_selection_show_tree (GtkIconFileSel *filesel, gboolean show); GtkIconList =========== - New function: GtkIconListItem *gtk_icon_list_add_from_pixmap (GtkIconList *icon_list, GdkPixmap *pixmap, GdkBitmap *bitmap, const gchar *label, gpointer link); - Enhancements and bugfixes. GtkPlot ======= - New function (example in testimage.c): void gtk_plot_set_background_pixmap (GtkPlot *plot, GdkPixmap *pixmap); - FLAGS removed an replaced by: void gtk_plot_set_transparent (GtkPlot *plot, gboolean transparent); gboolean gtk_plot_is_transparent (GtkPlot *plot); - text borders (example in testgtkplot.c): void gtk_plot_text_set_border (GtkPlotText *text, GtkPlotBorderStyle border, gint border_space, gint border_width, gint shadow_width); - Enhancements and bugfixes: memory leaks, WYSIWYG. GtkPlotCanvas ============ - New Canvas child GTK_PLOT_CANVAS_PIXMAP (example in testgtkplot.c): GtkPlotCanvasChild * gtk_plot_canvas_put_pixmap (GtkPlotCanvas *canvas, GdkPixmap *pixmap, gdouble x1, gdouble y1); GtkPlotFlux =========== - New option to center vectors: void gtk_plot_flux_center (GtkPlotFlux *flux, gboolean center); gboolean gtk_plot_flux_is_centered (GtkPlotFlux *flux); GtkPlotPC, GtkPlotGDK, GtkPlotPS ================================ - New functions to draw pixmaps: void gtk_plot_pc_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, GdkBitmap *mask); void gtk_plot_pc_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y); GtkPlotPrint ============ - Important bugfixes concerning the WYSIWYG behavior. GtkSheet ======== - bugfix in gtk_sheet_thaw. New widgets: GtkPlotPixmap ============= GtkPlotData subclass for using pixmaps as symbols. Demo example in testpixmap.c GtkCharSelection ================ A table of togglebuttons to select a symbol among several fontsets. 17/04/2001 Summary of changes GtkSheet ======== - Bugfixes removing widgets, and memory leaks. By Chris Howell (Applix) 09/03/2001 Summary of changes 21/02/2001: - GtkExtra version checks. gtkextra.c 15/02/2001: Murray Cumming: - Made GdkColor* and GtkSheetRange* args const in most set_ functions. - Fixed some "may have been used uninitialised" and "not handled in switch" warnings. - Change Plot style args to GtkPlotLineStyle from gint. GtkSheet ======== - Bugfixes in DeleteColumn/DeleteRow - Bugfix in delete_columns/delete_rows 25/02/2001: Murray Cumming: - Changed some function args to guint from gint. - Changed some gint funtion returns to gboolean. GtkPlot ======= - Return values in gtk_plot_get_pixel are gdouble. - For consistency, the functions gtk_plot_axis_labels_set... were renamed as gtk_plot_axis_set_labels... New functions: - You can set axis labels suffix and prefix using gtk_plot_axis_set_labels_prefix/suffix GtkPlot ======= - Return values in gtk_plot3d_get_pixel are gdouble. - Fixed problem with declaration of gtk_plot_axis_get_type - Fixes in logscale GtkPlotPC, GtkPlotGdk, GtkPlotPS ================================ - All arguments in drawing methods changed to gdouble to improve quality of PostScript output. GtkPlotData =========== - Silly bug with gtk_widget_show/hide - gtk_plot_data_draw_symbol has gdouble arguments now GtkIconList =========== New functions: void gtk_icon_list_set_mode (GtkIconList *iconlist, guint mode); guint gtk_icon_list_get_mode (GtkIconList *iconlist); void gtk_icon_list_set_row_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_row_spacing (GtkIconList *iconlist); void gtk_icon_list_set_col_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_col_spacing (GtkIconList *iconlist); void gtk_icon_list_set_text_space (GtkIconList *iconlist, guint space); guint gtk_icon_list_get_text_space (GtkIconList *iconlist); void gtk_icon_list_set_icon_border (GtkIconList *iconlist, guint space); guint gtk_icon_list_get_icon_border (GtkIconList *iconlist); void gtk_icon_list_set_icon_width (GtkIconList *iconlist, guint space); guint gtk_icon_list_get_icon_width (GtkIconList *iconlist); 06/12/2000 Summary of changes - Construct functions added to all the widgets. Useful for C++ and other language bindings. By Murray Cumming GtkIconFileSel ============== New functions: - gtk_icon_file_selection_show_hidden(GTK_ICON_FILESEL(filesel), TRUE); It allows to show files with names beggining in "." - gtk_icon_file_selection_set_filter(GtkIconFileSel *filesel, const gchar *filter); Sets the filter but also displays it. Both by Allin Cotrell GtkDirTree ========== - Fix to display directories beggining with "." - Fix to move to the selected directory at start time. Also by Allin Cotrell GtkPlot ======= - New Function: gtk_plot_clip_data If TRUE, the data is clipped to fit the frame. - GtkPlotAxis is now a GtkObject subclass - gtk_plot_axis_set_tick_labels removed. - New method for setting custom labels: connect the signal "tick_label" using gtk_signal_connect(GTK_OBJECT(axis), "tick_label", GTK_SIGNAL_FUNC(parse_tick_label), NULL); the return value is a string with the customized label generated in "parse_tick_label", a function defined by the user Thanks to Alexander Havng" for the suggestion and the patches. - gtk_plot_data_show/hide removed. We use gtk_widget_show/hide instead. - All functions called ..._get_visible are now ..._visible - The order of the arguments in gtk_plot_put_text is now font, height, angle. GtkPlot3D ========= - All functions called ..._get_visible are now ..._visible GtkPlotCanvas ============= - gtk_plot_canvas_get_active_point returns -1 if no point is active - The order of the arguments in gtk_plot_canvas_put_text is now font, height, angle. GtkPlotData =========== - gtk_plot_data_gradient_set/get_mask renamed as gtk_plot_data_set/get_gradient_mask - All functions called ..._get_visible are now ..._visible 21/11/2000 Summary of changes - New plot subclasses for 3D and polar plots: GtkPlot3d and GtkPlotPolar. GtkPlot3D has its own API, but GtkPlotPolar can be casted as a GtkPlot considering the equivalence x->r, y->angle. - GtkPlotData is a widget. The API is almost the same. You may have to cast the widget using data = GTK_PLOT_DATA(gtk_plot_data_new()); - The other Data subclasses are Bar, Box, Flux, Surface and CSurface. - I added new arguments to the datasets (z, dz, a, da): z is obviously for 3d plots. However, it is used in GtkPlotBox to specify the size of the boxes. "a" is used to determine the size of the symbols, and "da", the color. - The color of the symbols, when "da" is specified, is detemined using the gradient. the gradient has (min, max) values, and corresponding colors. The symbol's color is interpolated between these values using hue/saturation/value depending on the gradient_mask. - GtkOrientation was replaced with GtkPlotOrientation (GTK_PLOT_AXIS_X/Y/Z) - the fields xticks and yticks were removed from gtkplot. - GtkPlotSymbol has a new field GtkPlotLine border and you set/get the attributes with gtk_plot_data_set/get_symbol - I removed the symbol type: GTK_PLOT_SYMBOL_BAR, because this is a new data subclass. I added TRIANGLE_LEFT/RIGHT and DOT. - After gtk_plot_canvas_paint, you have to use gtk_plot_canvas_refresh to refresh the pixmap in the window. This is because paint can be used to print or save plots in other formats, depending on the GtkPlotPC you are using (see below). - The drawing engine, called GtkPlotPC has been rewritten. Now it's a GtkObject, and you can derive subclasses as GtkPlotGdk and GtkPlotPS in our case (You can define your own if you want to use a different library to draw your plots!). How does it work: 1) Instead of creating a GdkGC, you create either a GtkPlotGdk or GtkPlotPS. 2) you do the following replacements: gdk_gc_set_foreground -> gtk_plot_pc_set_color gdk_gc_set_dash -> gtk_plot_pc_set_dash gdk_gc_set_line_attributes -> gtk_plot_pc_set_lineattr gdk_gc_draw_... -> gtk_plot_pc_draw_... The output will be either on a drawable or a file according to the GtkPlotPC you chose. All the redundant code for the PS output in gtkplotprint was eliminated! Elegant, isn't it? - I also added a new widget: gtktogglecombo, a gtkcombobox subclass (See it in action in testgtksheet) - New demos are included. 01/09/2000 Summary of changes BugFixes in GtkColorCombo, and improvements GtkPlotCanvas. 29/08/2000 Summary of changes BugFixes in GtkColorCombo, GtkSheet, Gtkplot, GtkPlotCanvas and GtkPlotPS. GtkIconList =========== - More memory leaks GtkDirTree & GtkFileList ======================== - Modifications for Win32 compatibility, due to Hans Breuer 04/08/2000 Summary of changes Bugfixes in GtkSheet, GtkPlot, and GtkPlotCanvas. GtkIconList =========== - New function: gtk_icon_list_update(GtkIconList *iconlist) Reorders the icons. - Memory leaks. 05/06/2000 Summary of changes GtkPlot ======= - New element in the struct GtkPlotData gpointer link; It allows to link data to the dataset. - New functions: gtk_plot_data_set_link gtk_plot_data_get_link gtk_plot_data_remove_link gtk_plot_data_draw_points (draws last n points). See example of use in testrealdemo.c GtkIconList =========== - Went back to version before Allin Cottrell's changes until I am back from Argentina. 28/06/2000 Summary of changes Misc: ===== - Andreas Voegele sent the patches to add the following functions: gtk_sheet_range_get_type(); gtk_plot_canvas_child_get_type(); gtk_icon_list_item_get_type(); and the corresponding macros GTK_TYPE_SHEET_RANGE, GTK_TYPE_PLOT_CANVAS_CHILD, GTK_TYPE_ICON_LIST_ITEM. GtkSheet ======== - Argument GtkSheetRange changed to GtkSheetRange *: (Arnaud Charlet, GtkAda team) gtk_sheet_clip_range, gtk_sheet_range_set_background, gtk_sheet_range_set_foreground, gtk_sheet_range_set_justification, gtk_sheet_range_set_editable, gtk_sheet_range_set_visible, gtk_sheet_range_set_border, gtk_sheet_range_set_border_color, gtk_sheet_range_set_font - gtk_sheet_get_max_alloc_col/row removed. (Murray Cumming) - gtk_sheet_get_maxcol/maxrow cnaged to gtk_sheet_get_columns/row_count (Murray Cumming) - gtk_sheet_unselect_range. Bugfixes, and GtkSheetRange * argument removed. It unselects the selection, and reactivates the editing entry. - New flag: GTK_SHEET_JUSTIFY_ENTRY Justifies entry's text according to the cell attributes. If unset, the entry's text is left justified as a normal entry. Default value: ON - Memory leaks in DeleteRow/Column fixed by Allin Cottrell GtkItemEntry ============ - Bugfixes by Chris Howell (Applix team). GtkPlot ======= - Argument GtkPlotText changed to GtkPlotText *: (Arnaud Charlet, GtkAda team) gtk_plot_text_get_size, gtk_plot_text_get_area. - Bugfixes GtkPlotCanvas ============= - child->draw/print changed to child->draw/print_child to avoid compatibility problems with other languages. - Bugfixes. GtkIconList =========== - Memory leaks fixed by Allin Cottrell 12/06/2000 Summary of changes GtkPlotCanvas ============= - GtkPlotCanvasItem struct removed and replaced by GtkPlotCanvasChild - New policy for handling canvas child objects: GtkPlotCanvas has a field GList *childs, replacing the old GList *text. Now, it can contain diferent kind of objects, like GTK_PLOT_CANVAS_TEXT, GTK_PLOT_CANVAS_LINE, GTK_PLOT_CANVAS_RECTANGLE, GTK_PLOT_CANVAS_ELLIPSE. These childs are predefined in the code, and you don't have to care about. You just use the new functions: gtk_plot_canvas_put_line gtk_plot_canvas_put_rectangle gtk_plot_canvas_put_ellipse I have included also the type GTK_PLOT_CANVAS_CUSTOM. It allows to define your custom childs, like the pixmap in testgtkplot. To do this, you should use child = gtk_plot_canvas_child_new(GTK_PLOT_CANVAS_CUSTOM); and define your drawing and printing routines and redirect as child->data = my_data; child->draw = my_drawing_code; child->print = my_printing_code; This should allow to insert images in the plots. By default, the child can only be moved. If you also want to allow to resize it, you should set the child->flags. - You can use the following functions to set the childs' attributes gtk_plot_line/rectangle/ellipse_set_attributes - I added guiding grids to the canvas. This grids can be displayed in the canvas to guide the eyes, but they are not printed. To do so use: gtk_plot_canvas_grid_set_visible gtk_plot_canvas_grid_set_step gtk_plot_canvas_grid_set_attributes - Signal handling for "select_item" has changed. Now the signal handler returns a GtkPlotCanvasChild struct. The contentd of the selection are in child->data, and the type is declared in child->type. See the demo. - gtk_plot_canvas_put_text has a new field "transparent". If TRUE, the text background is not drawn. GtkPlot ======= - Silly bugfixes - gtk_plot_put_text has a new field "transparent". If TRUE, the text background is not drawn. GtkSheet ======== - New functions gtk_sheet_row/column_label_set_visibility gtk_sheet_rows/columns_labels_set_visibility GtkPSFont ========= - New handling to avoid memory leaks: Every time you plan to use PSfonts you should initialize the tables and lists using gtk_psfont_init(); inmediately after gtk_init, or at the begining of a subroutine. At the end of the program or subroutine you should use gtk_psfont_unref(); GtkFontCombo ============ - Changed to complain the new gtkpsfont concept. GtkComboBox =========== - Bugfix in the size allocation routine. 08/05/2000 Summary of changes GtkPlotCanvas ============= - GtkPlotLayout was merged with GtkPlotCanvas and removed from the dirtribution. All the gtk_plot_layout... functions are now called gtk_plot_canvas... - GtkPlotCanvas has been changed to be a GtkFixed subclass. - gtk_plot_canvas_new has a new argument "magnification" Magnification: With gtk_plot_canvas_set_magnification you can choose the page magnification. The page, and all the plots contained are rescaled. It's completely WYSIWYG. GtkPlotLayout ============= Removed from the distribution. GtkPlot ======= - All the functions "gtk_plot_dataset..." are now "gtk_plot_data..." - Magnification - Data labels: you can add individual labels to each point. - New functions: gtk_plot_set_magnification gtk_plot_data_set_labels gtk_plot_data_labels_set_attributes gtk_plot_data_show/hide labels GtkItemEntry ============ - GtkIEntry is now called GtkItemEntry. - GTK_IENTRY is now GTK_ITEM_ENTRY GtkIconList =========== - GtkIconList was changed to be a GtkFixed subclass. Much, much faster... GtkIconFileSelection is now very usable. 19/04/2000 Summary of changes GtkPlotCanvas ============= Completely redesigned and re-written, almost from scratch, using the same API. The new changes will make easier to add new objects in the future, like arrows. - New structure GtkPlotCanvasItem: item->type item->data ------------------------------------------------ GTK_PLOT_CANVAS_PLOT GtkPlot * GTK_PLOT_CANVAS_TITLE GtkPlotAxis * GTK_PLOT_CANVAS_AXIS GtkPlotAxis * GTK_PLOT_CANVAS_LEGEND GtkPlot * GTK_PLOT_CANVAS_TEXT GtkPlotText * - Signals: "select_item", "move_item", "resize_item", "select_region" - FLAGS: GTK_PLOT_CANVAS_CAN_SELECT allows to select a region, a simple box inside a plot. GTK_PLOT_CANVAS_CAN_SELECT_ITEM allows to select objects, but not datapoints. GTK_PLOT_CANVAS_CAN_SELECT_POINT allows to select datapoints, but not other objects. GTK_PLOT_CANVAS_CAN_DND allows to DnD objects, once selected. GTK_PLOT_CANVAS_CAN_DND_POINT allows to DnD datapoints, once selected. If you want to use DnD, you have to set both flags: GTK_PLOT_CANVAS_CAN_SELECT_ITEM and GTK_PLOT_CANVAS_CAN_DND. If you set only CAN_SETECT_ITEM, you won't be able to DnD. If you set only CAN_DND, it won't work if CAN_SELECT_ITEM is off. Same for datapoints. You already know that if your signal handler returns the value FALSE, the selection or action will be ignored. GtkPlot ======= - Memory leaks fixed in gtk_plot_finalize. - New function: gtk_plot_remove_text. GtkPlotLayout ============= - Memory leaks fixed in gtk_plot_layout_finalize. - New function: gtk_plot_layout_remove_text. GtkPSFont ========= - Patched to handle multi-enconded character sets by Hiroyuki ARAKI GtkSheet ======== - Macro GTK_TYPE_SHEET added. 10/04/2000 Summary of changes GtkSheet ======== - GtkSheetAttr removed. New strategy for cell attributes, using cell->attributes, now. Cells and their attributes are allocated. - Memory leaks Thanks to the contributions by the Applix team: Chris Howell, Eric Ding, and Geoffrey. - New function: gtk_sheet_button_attach. Attach widgets to the buttons (like the pixmap in the demo). You can also use gtk_sheet_attach. GtkPlot (and GtkPlotPrint) ======= - gdk_font_unrefs added. - Improvements in the WYSIWYG output. - Bugfixes. More about tickmarks. GtkPlotCanvas ============= - New signals: "move_text", "move_legends", "move_plot", "resize_plot" - BugFixes. GtkPSFont ========= - Bugfixes. Patches by Andreas Voegele. GtkColorCombo ============= -Bugfixes. Size of arrays, by Andreas Voegele. GtkIconList =========== - gtk_icon_list_destroy fixes memory leaks. MISC ==== - Patches to pixmaps.h by Andreas Voegele. - spec.in file by Conrad Steenberg - more const and gboolean patches by Murray Cumming - testgtksheet.c modified to show pixmaps in buttons. - testgtkcheck. Simple demo for gtkcheckitem by Stephen Witkop 14/03/2000 Summary of changes GtkPlot (and GtkPlotPrint) ======= - Bugfixes: - Minor ticks drawing out of the plot frame. - points' xy lines drawing out of the plot frame. GtkComboBox =========== - size allocation. 13/03/2000 Summary of changes GtkDirTree ========== - Bugfixes: - open_dir when the path does not end with a "/" GtkIconFileSelection ==================== - Bugfixes - Added a label on the top-left corner with the current path. GtkPlotCanvas ============= - Replaced GTK_TYPE_POINTER by GTK_TYPE_GDK_EVENT in signals deffinitions. (Andreas Voegele) GtkPlot ======= - Bugfixes: - Minor ticks drawing out of the plot frame. 10/03/2000 Summary of changes - Fixes for ANSI C, by Aaron Lehman and Arnaud Charlet GtkSheet -------- - gchar* arguments replaced by const gchar* (Murray Cumming ) - enums have a type - Bugfixes: - top-left corner button drawing. - gtk_sheet_get_link. (Andreas Voegele ) - initialization and GrowSheet. (Chris Howell ) - fixes when frozen. Ralf Forsberg GtkIconList ----------- - GdkColor argument replaced by GdkColor * (Emmanuel Briot ) - gchar* arguments replaced by const gchar* (Murray Cumming ) - Bugfixes: - signal handlers. (Andreas Voegele ) - icon selection. GtkPSFont --------- - New function names: gtk_psfont_add_font gtk_psfont_get_font GtkFontCombo ------------ - Default size set to 12 (Andreas Voegele ) - New functions: gtk_font_combo_select gtk_font_combo_select_nth GtkPlotPC --------- - GdkColor argument replaced by GdkColor * (Emmanuel Briot ) - pc->drawstring has new arguments (font, height) GtkPlot ------- - gtk_plot_paint argument changed to GtkPlot* - GdkColor argument replaced by GdkColor* (Emmanuel Briot ) - gchar* arguments replaced by const gchar* (Murray Cumming ) - gtk_plot_dataset_get_points (Andreas Voegele) - enums have a type - Logarithmic scales (Torsten Luettgert ) - Autoscale function: gtk_plot_autoscale Rearranges the visible range to display all dataset points. (Thanks to Aaron Lehmann and Peter Wurmsdobler . Finally I did it in my own way) - Text formatting. Special characters: \B : bold \i : italics \g or \8 : greek \s or \_: subindices \S or \^: supraindices \+ : increment size \- : decrement size \b : backspace \N : normal \0, \1, \2, \3, \4, \5, \6, \7, \8, \9 : font foundry - New tick labels format GTK_PLOT_LABEL_POW. in powers of 10 with the exponent as a supraindex. - gtk_plot_axis_set_ticks changed: You have to set the number of minor ticks between major ticks. - New functions: - gtk_plot_autoscale - gtk_plot_axis_set_labels - gtk_plot_axis_use_custom_tick_labels - gtk_plot_set_legends_border - gtk_plot_show/hide_legends - gtk_plot_set_x_attrributes - gtk_plot_set_y_attrributes - gtk_plot_axis_set_major_ticks - gtk_plot_axis_set_minor_ticks - Bugfixes. GtkPlotLayout ------------- - GdkColor argument replaced by GdkColor* (Emmanuel Briot ) - gchar* arguments replaced by const gchar* (Murray Cumming ) - New function gtk_plot_layout_set_size. GtkPlotCanvas ------------- - New function gtk_plot_canvas_set_size. Rescales resizing all plots to fit into the canvas with the same ratio. - Bugfixes: - signal handlers (Andreas Voegele) - signal emission GtkComboBox ----------- - New function: gtk_combo_box_hide_popdown_window 21/12/1999 Adrian E. Feiguin * gtkplotlayout.c : new function gtk_plot_layout_set_size * gtkplotcanvas.c : new function gtk_plot_canvas_set_size * gtkpsfont.c : fixes for min_height in get_gdkfont 17/12/1999 Adrian E. Feiguin * Released GtkExtra 0.99.0 17/12/1999 Adrian E. Feiguin * Configure script based on the ones provided by Andreas Voegele for GtkSheet and Peter Lerner for GtkPlot, and GTK+. 15/12/1999 * gtkplotpc.c : memory leaks fixes. 15/12/1999 Adrian E. Feiguin * gtkiconlist.c : entry_out removed. * gtkplot.c : several functions renamed for consistence gtk_plot_axis_set/get_visible, gtk_plot_grids_set/get_visible, gtk_plot_x0/y0_set/get_visible. gtkextra-3.2.0/aclocal.m40000644000076400001440000016316712604172271012146 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gtk-doc.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) dnl -*- mode: autoconf -*- dnl Copyright 2009 Johan Dahlin dnl dnl This file is free software; the author(s) gives unlimited dnl permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl # serial 1 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([LT_INIT],[$0])dnl setup libtool first dnl enable/disable introspection m4_if([$2], [require], [dnl enable_introspection=yes ],[dnl AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),, [enable_introspection=auto]) ])dnl AC_MSG_CHECKING([for gobject-introspection]) dnl presence/version checking AS_CASE([$enable_introspection], [no], [dnl found_introspection="no (disabled, use --enable-introspection to enable)" ],dnl [yes],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0],, AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) ],dnl [auto],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) dnl Canonicalize enable_introspection enable_introspection=$found_introspection ],dnl [dnl AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) ])dnl AC_MSG_RESULT([$found_introspection]) INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR) AC_SUBST(INTROSPECTION_TYPELIBDIR) AC_SUBST(INTROSPECTION_CFLAGS) AC_SUBST(INTROSPECTION_LIBS) AC_SUBST(INTROSPECTION_MAKEFILE) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) dnl Usage: dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) ]) dnl Usage: dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) ]) m4_include([acinclude.m4]) gtkextra-3.2.0/README0000644000076400001440000000561012603754176011163 00000000000000General Information =================== This library is GTK+extra vesion 3. It is a useful widget set complementary to GTK+ for creating graphical interfaces for the X Window System. It is written in C and requires GTK+ version 2.x. The official web site is: http://gtkextra.sourceforge.net Prerequisites ============= GtkExtra requires the following packages: - The GTK+ , GLib, Pango, ATK and cairo libraries GTK+ 2.14.4 requires at least GLib 2.17.6, Pango 1.20, ATK 1.13.0 and cairo 1.6.0. - The TIFF, PNG, and JPEG image loading libraries. You most likely have these installed on your system already. If not these libraries are available from: http://www.libtiff.org/ http://www.libpng.org/ http://www.ijg.org/ libtiff must be version 3.6.0 or higher. - For generating GtkDoc reference docs and tutorial you need GtkDoc 1.8 , Docbook 4.5 with all dependencies (docbook-to-man,docbook-xls,docbook-utils , openjade , jadetex , tex-common , sgmlspl ,texlive ,tipa ,etc) Installation ============ See the file 'INSTALL' Documentation ============= In preparation. Read the header files and test programs in the directory ./src for further information and examples. Release notes for GtkExtra-3: ============================ - Gtk 2.x support. - Cairo support implemented. - Deprecating some widgets: GtkFileList, GtkIconFileSelection and GtkCheckItem. - Documentation rewritten in GtkDoc format. How to report bugs ================== Bugs should be reported to the GtkExtra mailing list. You will need to create an account for yourself. In the bug report please include: * Information about your system. For instance: - What operating system and version - What version of X - For Linux, what version of the C and GTK libraries. And anything else you think is relevant. * How to reproduce the bug. Please include a short test program that exhibits the behavior. As a last resort, you can also provide a pointer to a larger piece of software that can be downloaded. * If the bug was a crash, the exact text that was printed out when the crash occured. * Further information such as stack traces may be useful, but is not necessary. If you do send a stack trace, and the error is an X error, it will be more useful if the stacktrace is produced running the test program with the --sync command line option. Patches ======= Patches should also be submitted to gtkextra.sourceforge. If the patch fixes an existing bug, add the patch as an attachment to that bug report. Otherwise, enter a new bug report that describes the patch, and attach the patch to that bug report. Bug reports containing patches should include the PATCH keyword in their keyword fields. If the patch adds to or changes the GtkExtra programming interface, the API keyword should also be included. Patches should be in unified diff form. (The -u option to GNU diff.) (END) gtkextra-3.2.0/Makefile.in0000644000076400001440000006633412604172273012353 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/gtkextra-3.0.pc.in $(srcdir)/gtkextra-3.0.spec.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO build-aux/config.guess build-aux/config.sub \ build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ build-aux/missing depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = gtkextra-3.0.spec gtkextra-3.0.pc CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = gtkextra glade docs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLADE_CATALOG_DIR = @GLADE_CATALOG_DIR@ GLADE_CFLAGS = @GLADE_CFLAGS@ GLADE_LIBS = @GLADE_LIBS@ GLADE_MODULE_DIR = @GLADE_MODULE_DIR@ GLADE_PIXMAP_DIR = @GLADE_PIXMAP_DIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_EXTRA_MAJOR_VERSION = @GTK_EXTRA_MAJOR_VERSION@ GTK_EXTRA_MICRO_VERSION = @GTK_EXTRA_MICRO_VERSION@ GTK_EXTRA_MINOR_VERSION = @GTK_EXTRA_MINOR_VERSION@ GTK_EXTRA_VERSION = @GTK_EXTRA_VERSION@ GTK_EXTRA_VERSION_SHORT = @GTK_EXTRA_VERSION_SHORT@ GTK_LIBS = @GTK_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGTKEXTRA_SO_VERSION = @LIBGTKEXTRA_SO_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gdktarget = @gdktarget@ gtkextratargetlib = @gtkextratargetlib@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgladegtkextra_soname = @libgladegtkextra_soname@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ms_librarian = @ms_librarian@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 @ENABLE_GLADE_TRUE@GLADE_SUBDIR = glade SRC_SUBDIRS = gtkextra $(GLADE_SUBDIR) SUBDIRS = $(SRC_SUBDIRS) docs # require automake 1.7 #AUTOMAKE_OPTIONS = 1.7 EXTRA_DIST = \ TODO \ gtkextra-3.0.m4 \ makecopyright \ gtkextra-3.0.spec pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gtkextra-3.0.pc DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 gtkextra-3.0.spec: $(top_builddir)/config.status $(srcdir)/gtkextra-3.0.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ gtkextra-3.0.pc: $(top_builddir)/config.status $(srcdir)/gtkextra-3.0.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA .PHONY: files release sanity snapshot files: @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ echo $$p; \ done @for subdir in $(SUBDIRS); do \ files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \ for file in $$files; do \ echo $$subdir/$$file; \ done; \ done release: rm -rf .deps */.deps $(MAKE) distcheck sanity: ./sanity_check $(VERSION) snapshot: $(MAKE) dist distdir=$(PACKAGE)-`date +"%y%m%d"` ChangeLog.cvs: cvs log | perl mkchlog > ChangeLog.cvs #DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gtkextra-3.2.0/gtkextra-3.0.m40000644000076400001440000001763212603754176012703 00000000000000# Configure paths for GTK_EXTRA+ # Owen Taylor 1997-2001 dnl AM_PATH_GTK_EXTRA_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK_EXTRA+, and define GTK_EXTRA_CFLAGS and GTK_EXTRA_LIBS, if gthread is specified in MODULES, dnl pass to pkg-config dnl AC_DEFUN([AM_PATH_GTK_EXTRA_3_0], [dnl dnl Get the cflags and libraries from pkg-config dnl AC_ARG_ENABLE(gtkextratest, [ --disable-gtkextratest do not try to compile and run a test GTK_EXTRA+ program], , enable_gtkextratest=yes) pkg_config_args=gtkextra-3.0 for module in . $4 do case "$module" in gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done no_gtkextra="" AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test x$PKG_CONFIG != xno ; then if pkg-config --atleast-pkgconfig-version 0.7 ; then : else echo "*** pkg-config too old; version 0.7 or better required." no_gtkextra=yes PKG_CONFIG=no fi else no_gtkextra=yes fi min_gtkextra_version=ifelse([$1], ,3.0.0,$1) AC_MSG_CHECKING(for GTK_EXTRA+ - version >= $min_gtkextra_version) if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GTK_EXTRA+ found in PKG_CONFIG_PATH" enable_gtkextratest=no fi if $PKG_CONFIG --atleast-version $min_gtkextra_version $pkg_config_args; then : else no_gtkextra=yes fi fi if test x"$no_gtkextra" = x ; then GTK_EXTRA_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` GTK_EXTRA_LIBS=`$PKG_CONFIG $pkg_config_args --libs` gtkextra_config_major_version=`$PKG_CONFIG --modversion gtkextra-3.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtkextra_config_minor_version=`$PKG_CONFIG --modversion gtkextra-3.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtkextra_config_micro_version=`$PKG_CONFIG --modversion gtkextra-3.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtkextratest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_EXTRA_CFLAGS" LIBS="$GTK_EXTRA_LIBS $LIBS" dnl dnl Now check if the installed GTK_EXTRA+ is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.gtkextratest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtkextratest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtkextra_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtkextra_version"); exit(1); } if ((gtkextra_major_version != $gtkextra_config_major_version) || (gtkextra_minor_version != $gtkextra_config_minor_version) || (gtkextra_micro_version != $gtkextra_config_micro_version)) { printf("\n*** 'pkg-config --modversion gtkextra-3.0' returned %d.%d.%d, but GTK_EXTRA+ (%d.%d.%d)\n", $gtkextra_config_major_version, $gtkextra_config_minor_version, $gtkextra_config_micro_version, gtkextra_major_version, gtkextra_minor_version, gtkextra_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK_EXTRA+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((gtkextra_major_version != GTK_EXTRA_MAJOR_VERSION) || (gtkextra_minor_version != GTK_EXTRA_MINOR_VERSION) || (gtkextra_micro_version != GTK_EXTRA_MICRO_VERSION)) { printf("*** GTK_EXTRA+ header files (version %d.%d.%d) do not match\n", GTK_EXTRA_MAJOR_VERSION, GTK_EXTRA_MINOR_VERSION, GTK_EXTRA_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtkextra_major_version, gtkextra_minor_version, gtkextra_micro_version); } else { if ((gtkextra_major_version > major) || ((gtkextra_major_version == major) && (gtkextra_minor_version > minor)) || ((gtkextra_major_version == major) && (gtkextra_minor_version == minor) && (gtkextra_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK_EXTRA+ (%d.%d.%d) was found.\n", gtkextra_major_version, gtkextra_minor_version, gtkextra_micro_version); printf("*** You need a version of GTK_EXTRA+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK_EXTRA+ is always available from ftp://ftp.gtkextra.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK_EXTRA+, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtkextra=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtkextra" = x ; then AC_MSG_RESULT(yes (version $gtkextra_config_major_version.$gtkextra_config_minor_version.$gtkextra_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtkextratest ; then : else echo "*** Could not run GTK_EXTRA+ test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_EXTRA_CFLAGS" LIBS="$LIBS $GTK_EXTRA_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtkextra_major_version) || (gtkextra_minor_version) || (gtkextra_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK_EXTRA+ or finding the wrong" echo "*** version of GTK_EXTRA+. If it is not finding GTK_EXTRA+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK_EXTRA+ is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_EXTRA_CFLAGS="" GTK_EXTRA_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_EXTRA_CFLAGS) AC_SUBST(GTK_EXTRA_LIBS) rm -f conf.gtkextratest ]) gtkextra-3.2.0/NEWS0000644000076400001440000000000012603754176010766 00000000000000gtkextra-3.2.0/gtkextra-3.0.pc.in0000644000076400001440000000044012603754176013357 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ target=@gdktarget@ Name: GtkExtra Description: Extra widget set for for GTK+ Requires: glib-2.0 gtk+-2.0 Version: @VERSION@ Libs: -L${libdir} -lgtkextra-${target}-3.0 Cflags: -I${includedir}/gtkextra-3.0 gtkextra-3.2.0/m4/0000755000076400001440000000000012604172531010667 500000000000000gtkextra-3.2.0/m4/ltversion.m40000644000076400001440000000127712604172267013113 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) gtkextra-3.2.0/m4/libtool.m40000644000076400001440000077341112604172267012540 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) gtkextra-3.2.0/m4/gtk-doc.m40000644000076400001440000000245412603754176012420 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))]) fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) ]) gtkextra-3.2.0/m4/lt~obsolete.m40000644000076400001440000001311312604172267013430 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) gtkextra-3.2.0/m4/ltoptions.m40000644000076400001440000002724212604172267013121 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) gtkextra-3.2.0/m4/ltsugar.m40000644000076400001440000001042412604172267012541 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) gtkextra-3.2.0/COPYING0000644000076400001440000006131412603754176011341 00000000000000 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! gtkextra-3.2.0/gtkextra/0000755000076400001440000000000012604172532012201 500000000000000gtkextra-3.2.0/gtkextra/gtkplot3d.h0000644000076400001440000002551712603754176014230 00000000000000/* gtkplot - 2d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT3D_H__ #define __GTK_PLOT3D_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT3D(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot3d_get_type (), GtkPlot3D) #define G_TYPE_PLOT3D (gtk_plot3d_get_type ()) #define GTK_PLOT3D_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot3d_get_type(), GtkPlot3DClass) #define GTK_IS_PLOT3D(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot3d_get_type ()) #define GTK_PLOT3D_FLAGS(plot) (GTK_PLOT3D(plot)->flags) #define GTK_PLOT3D_SET_FLAGS(plot,flag) (GTK_PLOT3D_FLAGS(plot) |= (flag)) #define GTK_PLOT3D_UNSET_FLAGS(plot,flag) (GTK_PLOT3D_FLAGS(plot) &= ~(flag)) #define GTK_PLOT3D_TRANSPARENT(plot) (GTK_PLOT3D_FLAGS(plot) & GTK_PLOT3D_TRANSPARENT) typedef struct _GtkPlot3D GtkPlot3D; typedef struct _GtkPlot3DClass GtkPlot3DClass; typedef enum { GTK_PLOT_PLANE_XY = 0, GTK_PLOT_PLANE_YX = 0, GTK_PLOT_PLANE_XZ = 1, GTK_PLOT_PLANE_ZX = 1, GTK_PLOT_PLANE_YZ = 2, GTK_PLOT_PLANE_ZY = 2, } GtkPlotPlane; typedef enum { GTK_PLOT_SIDE_XY = 1 << 0 , GTK_PLOT_SIDE_XZ = 1 << 1 , GTK_PLOT_SIDE_YX = 1 << 2 , GTK_PLOT_SIDE_YZ = 1 << 3 , GTK_PLOT_SIDE_ZX = 1 << 4 , GTK_PLOT_SIDE_ZY = 1 << 5 , } GtkPlotSide; /** * GtkPlot3D: * * The GtkPlot3D struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlot3D { GtkPlot plot; GtkPlotVector e1, e2, e3; GtkPlotVector center; GtkPlotVector origin; gdouble a1, a2, a3; gdouble ncos[360]; gdouble nsin[360]; GtkPlotAxis *ax, *ay, *az; gboolean xy_visible; gboolean yz_visible; gboolean zx_visible; GdkColor color_xy; GdkColor color_yz; GdkColor color_zx; GtkPlotLine frame; GtkPlotLine corner; gboolean corner_visible; gdouble zmin, zmax; GtkPlotScale zscale; gint titles_offset; GtkPlotAxis xy, xz; GtkPlotAxis yx, yz; GtkPlotAxis zx, zy; gdouble xfactor, yfactor, zfactor; }; struct _GtkPlot3DClass { GtkPlotClass parent_class; void (* get_pixel) (GtkWidget *widget, gdouble x, gdouble y, gdouble z, gdouble *px, gdouble *py, gdouble *pz); }; /* Plot3D */ GType gtk_plot3d_get_type (void); GtkWidget* gtk_plot3d_new (GdkDrawable *drawable); GtkWidget* gtk_plot3d_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot3d_construct (GtkPlot3D *plot, GdkDrawable *drawable); void gtk_plot3d_construct_with_size (GtkPlot3D *plot, GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot3d_autoscale (GtkPlot3D *plot); /* rotations around global axes */ void gtk_plot3d_rotate (GtkPlot3D *plot, gdouble angle_x, gdouble angle_y, gdouble angle_z); void gtk_plot3d_rotate_vector (GtkPlot3D *plot, GtkPlotVector *vector, gdouble a1, gdouble a2, gdouble a3); /* rotations around local axes */ void gtk_plot3d_reset_angles (GtkPlot3D *plot); void gtk_plot3d_rotate_x (GtkPlot3D *plot, gdouble angle); void gtk_plot3d_rotate_y (GtkPlot3D *plot, gdouble angle); void gtk_plot3d_rotate_z (GtkPlot3D *plot, gdouble angle); void gtk_plot3d_get_pixel (GtkPlot3D *plot, gdouble x, gdouble y, gdouble z, gdouble *px, gdouble *py, gdouble *pz); void gtk_plot3d_set_xrange (GtkPlot3D *plot, gdouble min, gdouble max); void gtk_plot3d_set_yrange (GtkPlot3D *plot, gdouble min, gdouble max); void gtk_plot3d_set_zrange (GtkPlot3D *plot, gdouble min, gdouble max); void gtk_plot3d_set_xfactor (GtkPlot3D *plot, gdouble xfactor); void gtk_plot3d_set_yfactor (GtkPlot3D *plot, gdouble yfactor); void gtk_plot3d_set_zfactor (GtkPlot3D *plot, gdouble zfactor); gdouble gtk_plot3d_get_xfactor (GtkPlot3D *plot); gdouble gtk_plot3d_get_yfactor (GtkPlot3D *plot); gdouble gtk_plot3d_get_zfactor (GtkPlot3D *plot); /* Planes */ void gtk_plot3d_plane_set_color (GtkPlot3D *plot, GtkPlotPlane plane, const GdkColor *color); void gtk_plot3d_plane_set_visible (GtkPlot3D *plot, GtkPlotPlane plane, gboolean visible); gboolean gtk_plot3d_plane_visible (GtkPlot3D *plot, GtkPlotPlane plane); void gtk_plot3d_corner_set_visible (GtkPlot3D *plot, gboolean visible); gboolean gtk_plot3d_corner_visible (GtkPlot3D *plot); void gtk_plot3d_corner_set_attributes(GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_corner_get_attributes(GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); void gtk_plot3d_frame_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_frame_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); /* Axes */ GtkPlotAxis * gtk_plot3d_get_axis (GtkPlot3D *plot, GtkPlotOrientation orientation); GtkPlotAxis * gtk_plot3d_get_side (GtkPlot3D *plot, GtkPlotSide side); void gtk_plot3d_show_major_ticks (GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask); void gtk_plot3d_show_minor_ticks (GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask); void gtk_plot3d_show_labels (GtkPlot3D *plot, GtkPlotSide side, gint label_mask); void gtk_plot3d_show_title (GtkPlot3D *plot, GtkPlotSide side); void gtk_plot3d_hide_title (GtkPlot3D *plot, GtkPlotSide side); void gtk_plot3d_set_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step, gint nminor); void gtk_plot3d_set_major_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step); void gtk_plot3d_set_minor_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gint nminor); void gtk_plot3d_set_ticks_length (GtkPlot3D *plot, GtkPlotOrientation direction, gint length); void gtk_plot3d_set_ticks_width (GtkPlot3D *plot, GtkPlotOrientation direction, gfloat width); void gtk_plot3d_show_ticks (GtkPlot3D *plot, GtkPlotSide side, gint major_mask, gint minor_mask); void gtk_plot3d_set_titles_offset (GtkPlot3D *plot, gint offset); gint gtk_plot3d_get_titles_offset (GtkPlot3D *plot); void gtk_plot3d_set_scale (GtkPlot3D *plot, GtkPlotOrientation axis, GtkPlotScale scale); GtkPlotScale gtk_plot3d_get_scale (GtkPlot3D *plot, GtkPlotOrientation axis); /* Grids */ void gtk_plot3d_major_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z); void gtk_plot3d_minor_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z); void gtk_plot3d_major_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z); void gtk_plot3d_minor_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z); void gtk_plot3d_major_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_major_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); void gtk_plot3d_minor_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot3d_minor_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT3D_H__ */ gtkextra-3.2.0/gtkextra/gtkplotcanvasellipse.c0000644000076400001440000002645112603754176016544 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasellipse.h" #include "gtkplotgdk.h" #include "gtkplotps.h" /** * SECTION: gtkplotcanvasellipse * @short_description: * * FIXME:: need long description */ #define DEFAULT_MARKER_SIZE 6 #define P_(string) string enum { ARG_0, ARG_LINE, ARG_FILLED, ARG_BG }; static void gtk_plot_canvas_ellipse_init (GtkPlotCanvasEllipse *ellipse); static void gtk_plot_canvas_ellipse_class_init (GtkPlotCanvasChildClass *klass); static void gtk_plot_canvas_ellipse_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_ellipse_select (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area); static void gtk_plot_canvas_ellipse_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y); static void gtk_plot_canvas_ellipse_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); static void gtk_plot_canvas_ellipse_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_ellipse_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); extern gint roundint (gdouble x); static GtkPlotCanvasChildClass *parent_class = NULL; GType gtk_plot_canvas_ellipse_get_type (void) { static GType plot_canvas_ellipse_type = 0; if (!plot_canvas_ellipse_type) { plot_canvas_ellipse_type = g_type_register_static_simple ( gtk_plot_canvas_child_get_type(), "GtkPlotCanvasEllipse", sizeof (GtkPlotCanvasEllipseClass), (GClassInitFunc) gtk_plot_canvas_ellipse_class_init, sizeof (GtkPlotCanvasEllipse), (GInstanceInitFunc) gtk_plot_canvas_ellipse_init, 0); } return plot_canvas_ellipse_type; } GtkPlotCanvasChild* gtk_plot_canvas_ellipse_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, gboolean fill) { GtkPlotCanvasEllipse *ellipse; ellipse = g_object_new (gtk_plot_canvas_ellipse_get_type (), NULL); ellipse->line.line_width = width; if(fg) ellipse->line.color = *fg; if(bg) ellipse->bg = *bg; ellipse->filled = fill; return GTK_PLOT_CANVAS_CHILD (ellipse); } static void gtk_plot_canvas_ellipse_init (GtkPlotCanvasEllipse *ellipse) { gdk_color_black(gdk_colormap_get_system(), &ellipse->line.color); gdk_color_white(gdk_colormap_get_system(), &ellipse->bg); ellipse->line.line_style = GTK_PLOT_LINE_SOLID; ellipse->line.line_width = 0; ellipse->filled = TRUE; } static void gtk_plot_canvas_ellipse_class_init (GtkPlotCanvasChildClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_canvas_child_get_type ()); klass->draw = gtk_plot_canvas_ellipse_draw; klass->move = gtk_plot_canvas_ellipse_move; klass->move_resize = gtk_plot_canvas_ellipse_resize; klass->draw_selection = gtk_plot_canvas_ellipse_select; gobject_class->get_property = gtk_plot_canvas_ellipse_get_property; gobject_class->set_property = gtk_plot_canvas_ellipse_set_property; /** * GtkPlotCanvasEllipse:line: * * **/ g_object_class_install_property (gobject_class, ARG_LINE, g_param_spec_pointer ("line", P_("Line"), P_("Line Attributes"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasEllipse:filled: * * **/ g_object_class_install_property (gobject_class, ARG_FILLED, g_param_spec_boolean ("filled", P_("Filled"), P_("Fill Figure"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasEllipse:color_bg: * * **/ g_object_class_install_property (gobject_class, ARG_BG, g_param_spec_pointer ("color_bg", P_("Filling Color"), P_("Filling Color"), G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_canvas_ellipse_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCanvasEllipse *ellipse = GTK_PLOT_CANVAS_ELLIPSE (object); switch(prop_id){ case ARG_LINE: g_value_set_pointer(value, &ellipse->line); break; case ARG_FILLED: g_value_set_boolean(value, ellipse->filled); break; case ARG_BG: g_value_set_pointer(value, &ellipse->bg); break; } } static void gtk_plot_canvas_ellipse_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCanvasEllipse *ellipse = GTK_PLOT_CANVAS_ELLIPSE (object); switch(prop_id){ case ARG_LINE: ellipse->line = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_FILLED: ellipse->filled = g_value_get_boolean(value); break; case ARG_BG: ellipse->bg = *((GdkColor *)g_value_get_pointer(value)); break; } } static void gtk_plot_canvas_ellipse_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasEllipse *ellipse = GTK_PLOT_CANVAS_ELLIPSE(child); gint width = child->allocation.width; gint height = child->allocation.height; if(width == 0 && height == 0) return; if(ellipse->filled){ gtk_plot_pc_set_color(canvas->pc, &ellipse->bg); gtk_plot_pc_draw_ellipse(canvas->pc, TRUE, child->allocation.x, child->allocation.y, width, height); } gtk_plot_canvas_set_line_attributes(canvas, ellipse->line); if(ellipse->line.line_style != GTK_PLOT_LINE_NONE) gtk_plot_pc_draw_ellipse(canvas->pc, FALSE, child->allocation.x, child->allocation.y, width, height); } static void draw_marker(GtkPlotCanvas *canvas, GdkGC *gc, gint x, gint y) { GdkDrawable *darea; darea = gtk_widget_get_window(GTK_WIDGET(canvas)); gdk_draw_rectangle(darea, gc, TRUE, x - DEFAULT_MARKER_SIZE / 2, y - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); } static void gtk_plot_canvas_ellipse_select(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area) { GdkGC *xor_gc = NULL; GdkGCValues values; gdk_gc_get_values(gtk_widget_get_style(GTK_WIDGET(canvas))->fg_gc[0], &values); values.function = GDK_INVERT; values.foreground = gtk_widget_get_style(GTK_WIDGET(canvas))->white; values.subwindow_mode = GDK_INCLUDE_INFERIORS; xor_gc = gdk_gc_new_with_values(gtk_widget_get_window(GTK_WIDGET(canvas)), &values, GDK_GC_FOREGROUND | GDK_GC_FUNCTION | GDK_GC_SUBWINDOW); gdk_draw_rectangle (gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, FALSE, area.x, area.y, area.width, area.height); draw_marker(canvas, xor_gc, area.x, area.y); draw_marker(canvas, xor_gc, area.x, area.y + area.height); draw_marker(canvas, xor_gc, area.x + area.width, area.y); draw_marker(canvas, xor_gc, area.x + area.width, area.y + area.height); if(area.height > DEFAULT_MARKER_SIZE * 2){ draw_marker(canvas, xor_gc, area.x, area.y + area.height / 2); draw_marker(canvas, xor_gc, area.x + area.width, area.y + area.height / 2); } if(area.width > DEFAULT_MARKER_SIZE * 2){ draw_marker(canvas, xor_gc, area.x + area.width / 2, area.y); draw_marker(canvas, xor_gc, area.x + area.width / 2, area.y + area.height); } gdk_gc_set_line_attributes(xor_gc, 1, 1, 0, 0); gdk_draw_arc (gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, FALSE, roundint(area.x), roundint(area.y), roundint(area.width), roundint(area.height), 0, 25000); if(xor_gc) gdk_gc_unref(xor_gc); } static void gtk_plot_canvas_ellipse_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y) { return; } static void gtk_plot_canvas_ellipse_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { return; } /** * gtk_plot_canvas_ellipse_set_attributes: * @ellipse: a #GtkPlotCanvasEllipse widget. * @style: * @width: * @fg: * @bg: * @fill: * * */ void gtk_plot_canvas_ellipse_set_attributes (GtkPlotCanvasEllipse *ellipse, GtkPlotLineStyle style, gdouble width, const GdkColor *fg, const GdkColor *bg, gboolean fill) { if(fg) ellipse->line.color = *fg; if(bg) ellipse->bg = *bg; ellipse->line.line_width = width; ellipse->line.line_style = style; ellipse->filled = fill; } gtkextra-3.2.0/gtkextra/gtksheet.h0000644000076400001440000006736512603754176014142 00000000000000/* GtkSheet widget for Gtk+. * Copyright (C) 1999-2001 Adrian E. Feiguin * * Based on GtkClist widget by Jay Painter, but major changes. * Memory allocation routines inspired on SC (Spreadsheet Calculator) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) && !defined (__GTKEXTRA_H_INSIDE__) # error "Only can be included directly." #endif #ifndef __GTK_SHEET_H__ #define __GTK_SHEET_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ G_BEGIN_DECLS typedef enum { GTK_SHEET_FOREGROUND, GTK_SHEET_BACKGROUND, GTK_SHEET_FONT, GTK_SHEET_JUSTIFICATION, GTK_SHEET_BORDER, GTK_SHEET_BORDER_COLOR, GTK_SHEET_IS_EDITABLE, GTK_SHEET_IS_VISIBLE } GtkSheetAttrType; /** * GtkSheetState: * @GTK_SHEET_NORMAL: nothing selected * @GTK_SHEET_ROW_SELECTED: one row selected * @GTK_SHEET_COLUMN_SELECTED: one column selected * @GTK_SHEET_RANGE_SELECTED: rectangular area of cells selected * * Selection state of the #GtkSheet * **/ typedef enum { GTK_SHEET_NORMAL, GTK_SHEET_ROW_SELECTED, GTK_SHEET_COLUMN_SELECTED, GTK_SHEET_RANGE_SELECTED } GtkSheetState; enum { GTK_SHEET_LEFT_BORDER = 1 << 0, GTK_SHEET_RIGHT_BORDER = 1 << 1, GTK_SHEET_TOP_BORDER = 1 << 2, GTK_SHEET_BOTTOM_BORDER = 1 << 3 }; /** * GtkSheetEntryType: * @GTK_SHEET_ENTRY_TYPE_DEFAULT: default, applicat. controlled * @GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY: GtkItemEntry * @GTK_SHEET_ENTRY_TYPE_GTK_ENTRY: GtkEntry * @GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW: GtkTextView * @GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW: GtkDataTextView * @GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON: GtkSpinButton * @GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX: GtkComboBox * @GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY: GtkComboBoxEntry * @GTK_SHEET_ENTRY_TYPE_GTK_COMBO: GtkCombo, Deprecated * * Subset of GtkEditable Widgets to allow selecting a widget * from glade-3 * **/ typedef enum { GTK_SHEET_ENTRY_TYPE_DEFAULT, GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY, GTK_SHEET_ENTRY_TYPE_GTK_ENTRY, GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW, GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW, GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON, GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX, GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY, GTK_SHEET_ENTRY_TYPE_GTK_COMBO, } GtkSheetEntryType; /** * GtkSheetVerticalJustification: * @GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT: default * @GTK_SHEET_VERTICAL_JUSTIFICATION_TOP: top aligned * @GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE: middle aligned * @GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM: bottom aligned * * Vertical text alignment. * **/ typedef enum { GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT, GTK_SHEET_VERTICAL_JUSTIFICATION_TOP, GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE, GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM, } GtkSheetVerticalJustification; #define G_TYPE_SHEET \ (gtk_sheet_get_type ()) #define GTK_SHEET(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SHEET, GtkSheet)) #define GTK_IS_SHEET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SHEET)) #define GTK_SHEET_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_SHEET, GtkSheetClass)) #define GTK_IS_SHEET_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_SHEET)) #define GTK_SHEET_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_SHEET, GtkSheetClass)) #define G_TYPE_SHEET_RANGE \ (gtk_sheet_range_get_type ()) /* Public flags, for compatibility */ #define GTK_SHEET_IS_LOCKED(sheet) gtk_sheet_locked(sheet) #define GTK_SHEET_ROW_FROZEN(sheet) !gtk_sheet_rows_resizable(sheet) #define GTK_SHEET_COLUMN_FROZEN(sheet) !gtk_sheet_columns_resizable(sheet) #define GTK_SHEET_AUTORESIZE(sheet) gtk_sheet_autoresize(sheet) #define GTK_SHEET_CLIP_TEXT(sheet) gtk_sheet_clip_text(sheet) #define GTK_SHEET_ROW_TITLES_VISIBLE(sheet) gtk_sheet_row_titles_visible(sheet) #define GTK_SHEET_COL_TITLES_VISIBLE(sheet) gtk_sheet_column_titles_visible(sheet) #define GTK_SHEET_AUTO_SCROLL(sheet) gtk_sheet_autoscroll(sheet) #define GTK_SHEET_JUSTIFY_ENTRY(sheet) gtk_sheet_justify_entry(sheet) typedef struct _GtkSheet GtkSheet; typedef struct _GtkSheetClass GtkSheetClass; typedef struct _GtkSheetChild GtkSheetChild; typedef struct _GtkSheetRow GtkSheetRow; typedef struct _GtkSheetColumn GtkSheetColumn; typedef struct _GtkSheetColumnClass GtkSheetColumnClass; typedef struct _GtkSheetCell GtkSheetCell; typedef struct _GtkSheetRange GtkSheetRange; typedef struct _GtkSheetButton GtkSheetButton; typedef struct _GtkSheetCellAttr GtkSheetCellAttr; typedef struct _GtkSheetCellBorder GtkSheetCellBorder; #define GTK_SHEET_OPTIMIZE_COLUMN_DRAW 0 /* 0=off, 1=on */ /** * GtkSheetChild: * * The GtkSheetChild struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheetChild { /*< private >*/ GtkWidget *widget; gint x,y; gboolean attached_to_cell; gboolean floating; gint row, col; guint16 xpadding; guint16 ypadding; gboolean xexpand; gboolean yexpand; gboolean xshrink; gboolean yshrink; gboolean xfill; gboolean yfill; }; /** * GtkSheetButton: * * The GtkSheetButton struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheetButton { /*< private >*/ GtkStateType state; gchar *label; gboolean label_visible; GtkSheetChild *child; GtkJustification justification; }; /** * GtkSheetCellBorder: * * The GtkSheetCellBorder struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheetCellBorder { /*< private >*/ gint8 mask; guint width; GdkLineStyle line_style; GdkCapStyle cap_style; GdkJoinStyle join_style; GdkColor color; }; /** * GtkSheetCellAttr: * * The GtkSheetCellAttr struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheetCellAttr { /*< private >*/ GtkJustification justification; GdkFont *font; PangoFontDescription *font_desc; GdkColor foreground; GdkColor background; GtkSheetCellBorder border; gboolean is_editable; gboolean is_visible; gboolean do_font_desc_free; /* TRUE if font_desc needs free */ }; /** * GtkSheetCell: * * The GtkSheetCell struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheetCell { /*< private >*/ GdkRectangle extent; /* extent of pango layout + cell attributes.border (used for column auto-resize) */ gint row; gint col; GtkSheetCellAttr *attributes; gchar *text; gpointer link; gchar *tooltip_markup; /* tooltip, which is marked up with the Pango text markup language */ gchar *tooltip_text; /* tooltip, without markup */ }; /** * GtkSheetRange: * @row0: upper left cell * @col0: upper left cell * @rowi: lower right cell * @coli: lower right cell * * Defines a rectangular range of cells. */ struct _GtkSheetRange { /*< public >*/ gint row0,col0; /* upper-left cell */ gint rowi,coli; /* lower-right cell */ }; /** * GtkSheetRow: * * The GtkSheetRow struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheetRow { /*< private >*/ gchar *name; gint height; guint16 requisition; gint top_ypixel; gint max_extent_height; /* := max(Cell.extent.height) */ GtkSheetButton button; gboolean is_sensitive; gboolean is_visible; gchar *tooltip_markup; /* tooltip, which is marked up with the Pango text markup language */ gchar *tooltip_text; /* tooltip, without markup */ }; #include "gtksheetcolumn.h" /** * GtkSheet: * * The GtkSheet struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheet { GtkContainer container; /* parent instance */ guint16 flags; GtkSelectionMode selection_mode; gboolean autoresize_columns; gboolean autoresize_rows; gboolean autoscroll; gboolean clip_text; gboolean justify_entry; gboolean locked; guint freeze_count; GdkColor bg_color; /* cell background color */ GdkColor grid_color; /* grid color */ GdkColor tm_color; /* tooltip marker color */ gboolean show_grid; GList *children; /* sheet children */ /* allocation rectangle after the container_border_width and the width of the shadow border */ GdkRectangle internal_allocation; gchar *title; gchar *description; /* sheet description and further information for application use */ GtkSheetRow *row; GtkSheetColumn **column; /* flexible array of column pointers */ gboolean rows_resizable; gboolean columns_resizable; /* max number of diplayed cells */ gint maxrow; gint maxcol; /* Displayed range */ GtkSheetRange view; /* sheet data: dynamically allocated array of cell pointers */ GtkSheetCell ***data; /* max number of allocated cells in **data */ gint maxallocrow; gint maxalloccol; /* active cell */ GtkSheetCell active_cell; GtkWidget *sheet_entry; GType entry_type; /* wanted entry type */ GType installed_entry_type; /* installed entry type */ /* expanding selection */ GtkSheetCell selection_cell; /* timer for automatic scroll during selection */ gint32 timer; /* timer for flashing clipped range */ gint32 clip_timer; gint interval; /* global selection button */ GtkWidget *button; /* sheet state */ GtkSheetState state; /* selected range */ GtkSheetRange range; /*the scrolling window and it's height and width to * make things a little speedier */ GdkWindow *sheet_window; guint sheet_window_width; guint sheet_window_height; /* sheet backing pixmap */ GdkWindow *pixmap; /* offsets for scrolling */ gint hoffset; gint voffset; gfloat old_hadjustment; gfloat old_vadjustment; /* border shadow style */ GtkShadowType shadow_type; GtkSheetVerticalJustification vjust; /* default vertical text justification */ /* Column Titles */ GdkRectangle column_title_area; GdkWindow *column_title_window; gboolean column_titles_visible; /* Row Titles */ GdkRectangle row_title_area; GdkWindow *row_title_window; gboolean row_titles_visible; /*scrollbars*/ GtkAdjustment *hadjustment; GtkAdjustment *vadjustment; /* xor GC for the verticle drag line */ GdkGC *xor_gc; /* gc for drawing unselected cells */ GdkGC *fg_gc; GdkGC *bg_gc; /* cursor used to indicate dragging */ GdkCursor *cursor_drag; /* the current x-pixel location of the xor-drag vline */ gint x_drag; /* the current y-pixel location of the xor-drag hline */ gint y_drag; /* current cell being dragged */ GtkSheetCell drag_cell; /* current range being dragged */ GtkSheetRange drag_range; /* clipped range */ GtkSheetRange clip_range; }; struct _GtkSheetClass { GtkContainerClass parent_class; void (*set_scroll_adjustments)(GtkSheet *sheet, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); void (*select_row)(GtkSheet *sheet, gint row); void (*select_column)(GtkSheet *sheet, gint column); void (*select_range)(GtkSheet *sheet, GtkSheetRange *range); void (*clip_range)(GtkSheet *sheet, GtkSheetRange *clip_range); void (*resize_range)(GtkSheet *sheet, GtkSheetRange *old_range, GtkSheetRange *new_range); void (*move_range)(GtkSheet *sheet, GtkSheetRange *old_range, GtkSheetRange *new_range); gboolean(*traverse)(GtkSheet *sheet, gint row, gint column, gint *new_row, gint *new_column); gboolean(*deactivate)(GtkSheet *sheet, gint row, gint column); gboolean(*activate)(GtkSheet *sheet, gint row, gint column); void (*set_cell)(GtkSheet *sheet, gint row, gint column); void (*clear_cell)(GtkSheet *sheet, gint row, gint column); void (*changed)(GtkSheet *sheet, gint row, gint column); void (*new_column_width)(GtkSheet *sheet, gint col, guint width); void (*new_row_height)(GtkSheet *sheet, gint row, guint height); gboolean(*focus_in_event)(GtkSheet *sheet, GdkEventFocus *event); gboolean(*focus_out_event)(GtkSheet *sheet, GdkEventFocus *event); void (*move_cursor)(GtkSheet *sheet, GtkMovementStep step, gint count, gboolean extend_selection); }; GType gtk_sheet_get_type(void); GType gtk_sheet_range_get_type(void); /* create a new sheet */ GtkWidget *gtk_sheet_new(guint rows, guint columns, const gchar *title); void gtk_sheet_construct(GtkSheet *sheet, guint rows, guint columns, const gchar *title); /* create a new browser sheet. It cells can not be edited */ GtkWidget *gtk_sheet_new_browser(guint rows, guint columns, const gchar *title); void gtk_sheet_construct_browser(GtkSheet *sheet, guint rows, guint columns, const gchar *title); /* create a new sheet with custom entry */ GtkWidget *gtk_sheet_new_with_custom_entry(guint rows, guint columns, const gchar *title, GType entry_type); void gtk_sheet_construct_with_custom_entry(GtkSheet *sheet, guint rows, guint columns, const gchar *title, GType entry_type); /* change scroll adjustments */ void gtk_sheet_set_hadjustment(GtkSheet *sheet, GtkAdjustment *adjustment); void gtk_sheet_set_vadjustment(GtkSheet *sheet, GtkAdjustment *adjustment); /* sheet entry */ void gtk_sheet_change_entry(GtkSheet *sheet, const GType entry_type); GType gtk_sheet_get_entry_type(GtkSheet *sheet); GtkWidget *gtk_sheet_get_entry(GtkSheet *sheet); GtkWidget *gtk_sheet_get_entry_widget(GtkSheet *sheet); gchar *gtk_sheet_get_entry_text(GtkSheet *sheet); void gtk_sheet_set_entry_text(GtkSheet *sheet, const gchar *text); void gtk_sheet_set_entry_editable(GtkSheet *sheet, const gboolean editable); void gtk_sheet_entry_select_region(GtkSheet *sheet, gint start_pos, gint end_pos); gulong gtk_sheet_entry_signal_connect_changed(GtkSheet *sheet, GCallback handler); void gtk_sheet_entry_signal_disconnect_by_func(GtkSheet *sheet, GCallback handler); /* Added by Steven Rostedt */ GtkSheetState gtk_sheet_get_state(GtkSheet *sheet); guint gtk_sheet_get_rows_count(GtkSheet *sheet); guint gtk_sheet_get_columns_count(GtkSheet *sheet); /* sheet's ranges - Added by Murray Cumming */ void gtk_sheet_get_visible_range(GtkSheet *sheet, GtkSheetRange *range); gboolean gtk_sheet_get_selection(GtkSheet *sheet, GtkSheetState *state, GtkSheetRange *range); void gtk_sheet_set_selection_mode(GtkSheet *sheet, GtkSelectionMode mode); void gtk_sheet_set_autoresize(GtkSheet *sheet, gboolean autoresize); void gtk_sheet_set_autoresize_columns(GtkSheet *sheet, gboolean autoresize); void gtk_sheet_set_autoresize_rows(GtkSheet *sheet, gboolean autoresize); gboolean gtk_sheet_autoresize(GtkSheet *sheet); gboolean gtk_sheet_autoresize_columns(GtkSheet *sheet); gboolean gtk_sheet_autoresize_rows(GtkSheet *sheet); void gtk_sheet_set_autoscroll(GtkSheet *sheet, gboolean autoscroll); gboolean gtk_sheet_autoscroll(GtkSheet *sheet); void gtk_sheet_set_clip_text(GtkSheet *sheet, gboolean clip_text); gboolean gtk_sheet_clip_text(GtkSheet *sheet); void gtk_sheet_set_justify_entry(GtkSheet *sheet, gboolean justify); gboolean gtk_sheet_justify_entry(GtkSheet *sheet); void gtk_sheet_set_vjustification(GtkSheet *sheet, GtkSheetVerticalJustification vjust); GtkSheetVerticalJustification gtk_sheet_get_vjustification(GtkSheet *sheet); void gtk_sheet_set_locked(GtkSheet *sheet, gboolean locked); gboolean gtk_sheet_locked(GtkSheet *sheet); /* set sheet title */ void gtk_sheet_set_title(GtkSheet *sheet, const gchar *title); void gtk_sheet_set_description(GtkSheet *sheet, const gchar *description); const gchar *gtk_sheet_get_description(GtkSheet *sheet, const gchar *description); /* freeze all visual updates of the sheet. * Then thaw the sheet after you have made a number of changes. * The updates will occure in a more efficent way than if you made * them on a unfrozen sheet */ gboolean gtk_sheet_is_frozen(GtkSheet *sheet); void gtk_sheet_freeze(GtkSheet *sheet); void gtk_sheet_thaw(GtkSheet *sheet); /* Background colors */ void gtk_sheet_set_background(GtkSheet *sheet, GdkColor *color); void gtk_sheet_set_grid(GtkSheet *sheet, GdkColor *color); void gtk_sheet_show_grid(GtkSheet *sheet, gboolean show); gboolean gtk_sheet_grid_visible(GtkSheet *sheet); /* set/get row title */ void gtk_sheet_set_row_title(GtkSheet *sheet, gint row, const gchar *title); const gchar *gtk_sheet_get_row_title(GtkSheet *sheet, gint row); /* set/get button label */ void gtk_sheet_row_button_add_label(GtkSheet *sheet, gint row, const gchar *label); const gchar *gtk_sheet_row_button_get_label(GtkSheet *sheet, gint row); void gtk_sheet_row_button_justify(GtkSheet *sheet, gint row, GtkJustification justification); /* scroll the viewing area of the sheet to the given column * and row; row_align and col_align are between 0-1 representing the * location the row should appear on the screnn, 0.0 being top or left, * 1.0 being bottom or right; if row or column is negative then there * is no change */ void gtk_sheet_moveto(GtkSheet *sheet, gint row, gint column, gint row_align, gint col_align); /* resize column/row titles window */ void gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width); /* show/hide column/row titles window */ void gtk_sheet_show_row_titles(GtkSheet *sheet); void gtk_sheet_hide_row_titles(GtkSheet *sheet); gboolean gtk_sheet_row_titles_visible(GtkSheet *sheet); /* row button sensitivity */ gboolean gtk_sheet_row_sensitive(GtkSheet *sheet, gint row); void gtk_sheet_row_set_sensitivity(GtkSheet *sheet, gint row, gboolean sensitive); void gtk_sheet_rows_set_sensitivity(GtkSheet *sheet, gboolean sensitive); /* row resizeability */ gboolean gtk_sheet_rows_resizable(GtkSheet *sheet); void gtk_sheet_rows_set_resizable(GtkSheet *sheet, gboolean resizable); /* row visibility */ gboolean gtk_sheet_row_visible(GtkSheet *sheet, gint row); void gtk_sheet_row_set_visibility(GtkSheet *sheet, gint row, gboolean visible); void gtk_sheet_row_label_set_visibility(GtkSheet *sheet, gint row, gboolean visible); void gtk_sheet_rows_labels_set_visibility(GtkSheet *sheet, gboolean visible); /* sheet tooltips */ gchar *gtk_sheet_get_tooltip_markup(GtkSheet *sheet); void gtk_sheet_set_tooltip_markup(GtkSheet *sheet, const gchar *markup); gchar *gtk_sheet_get_tooltip_text(GtkSheet *sheet); void gtk_sheet_set_tooltip_text(GtkSheet *sheet, const gchar *text); /* row tooltips */ gchar *gtk_sheet_row_get_tooltip_markup(GtkSheet *sheet, const gint row); void gtk_sheet_row_set_tooltip_markup(GtkSheet *sheet, const gint row, const gchar *markup); gchar *gtk_sheet_row_get_tooltip_text(GtkSheet *sheet, const gint row); void gtk_sheet_row_set_tooltip_text(GtkSheet *sheet, const gint row, const gchar *text); /* cell tooltips */ gchar *gtk_sheet_cell_get_tooltip_markup(GtkSheet *sheet, const gint row, const gint col); void gtk_sheet_cell_set_tooltip_markup(GtkSheet *sheet, const gint row, const gint col, const gchar *markup); gchar *gtk_sheet_cell_get_tooltip_text(GtkSheet *sheet, const gint row, const gint col); void gtk_sheet_cell_set_tooltip_text(GtkSheet *sheet, const gint row, const gint col, const gchar *text); /* selection range. The range gets highlighted, and its bounds are stored in sheet->range */ void gtk_sheet_select_row(GtkSheet *sheet, gint row); void gtk_sheet_select_column(GtkSheet *sheet, gint column); void gtk_sheet_select_range(GtkSheet *sheet, const GtkSheetRange *range); /* clipboard */ void gtk_sheet_clip_range(GtkSheet *sheet, const GtkSheetRange *clip_range); void gtk_sheet_unclip_range(GtkSheet *sheet); gboolean gtk_sheet_in_clip(GtkSheet *sheet); /* get scrollbars adjustment */ GtkAdjustment *gtk_sheet_get_vadjustment(GtkSheet *sheet); GtkAdjustment *gtk_sheet_get_hadjustment(GtkSheet *sheet); /* obvious */ void gtk_sheet_unselect_range(GtkSheet *sheet); /* set active cell where the entry will be displayed * returns FALSE if current cell can't be deactivated or * requested cell can't be activated */ gboolean gtk_sheet_set_active_cell(GtkSheet *sheet, gint row, gint column); void gtk_sheet_get_active_cell(GtkSheet *sheet, gint *row, gint *column); /* movement */ void gtk_sheet_set_tab_direction(GtkSheet *sheet, GtkDirectionType dir); /* set cell contents and allocate memory if needed */ void gtk_sheet_set_cell(GtkSheet *sheet, gint row, gint col, GtkJustification justification, const gchar *text); void gtk_sheet_set_cell_text(GtkSheet *sheet, gint row, gint col, const gchar *text); /* get cell contents */ gchar *gtk_sheet_cell_get_text(GtkSheet *sheet, gint row, gint col); /* clear cell contents */ void gtk_sheet_cell_clear(GtkSheet *sheet, gint row, gint column); /* clear cell contents and remove links */ void gtk_sheet_cell_delete(GtkSheet *sheet, gint row, gint column); /* clear range contents. If range==NULL the whole sheet will be cleared */ void gtk_sheet_range_clear(GtkSheet *sheet, const GtkSheetRange *range); /* clear range contents and remove links */ void gtk_sheet_range_delete(GtkSheet *sheet, const GtkSheetRange *range); /* get cell state: GTK_STATE_NORMAL, GTK_STATE_SELECTED */ GtkStateType gtk_sheet_cell_get_state(GtkSheet *sheet, gint row, gint col); /* Handles cell links */ void gtk_sheet_link_cell(GtkSheet *sheet, gint row, gint col, gpointer link); gpointer gtk_sheet_get_link(GtkSheet *sheet, gint row, gint col); void gtk_sheet_remove_link(GtkSheet *sheet, gint row, gint col); /* get row and column correspondig to the given position in the screen */ gboolean gtk_sheet_get_pixel_info(GtkSheet *sheet, GdkWindow *window, gint x, gint y, gint *row, gint *column); /* get area of a given cell */ gboolean gtk_sheet_get_cell_area(GtkSheet *sheet, gint row, gint column, GdkRectangle *area); /* set row height */ void gtk_sheet_set_row_height(GtkSheet *sheet, gint row, guint height); /* append ncols columns to the end of the sheet */ void gtk_sheet_add_column(GtkSheet *sheet, guint ncols); /* append nrows row to the end of the sheet */ void gtk_sheet_add_row(GtkSheet *sheet, guint nrows); /* insert nrows rows before the given row and pull right */ void gtk_sheet_insert_rows(GtkSheet *sheet, guint row, guint nrows); /* insert ncols columns before the given col and pull down */ void gtk_sheet_insert_columns(GtkSheet *sheet, guint col, guint ncols); /* delete nrows rows starting in row */ void gtk_sheet_delete_rows(GtkSheet *sheet, guint row, guint nrows); /* delete ncols columns starting in col */ void gtk_sheet_delete_columns(GtkSheet *sheet, guint col, guint ncols); /* set abckground color of the given range */ void gtk_sheet_range_set_background(GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); /* set foreground color (text color) of the given range */ void gtk_sheet_range_set_foreground(GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); /* set text justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER) of the given range. * The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the * default justification for numbers is GTK_JUSTIFY_RIGHT */ void gtk_sheet_range_set_justification(GtkSheet *sheet, const GtkSheetRange *urange, GtkJustification just); /* set if cell contents can be edited or not in the given range: * accepted values are TRUE or FALSE. */ void gtk_sheet_range_set_editable(GtkSheet *sheet, const GtkSheetRange *urange, gint editable); /* set if cell contents are visible or not in the given range: * accepted values are TRUE or FALSE.*/ void gtk_sheet_range_set_visible(GtkSheet *sheet, const GtkSheetRange *urange, gboolean visible); /* set cell border style in the given range. * mask values are CELL_LEFT_BORDER, CELL_RIGHT_BORDER, CELL_TOP_BORDER, * CELL_BOTTOM_BORDER * width is the width of the border line in pixels * line_style is the line_style for the border line */ void gtk_sheet_range_set_border(GtkSheet *sheet, const GtkSheetRange *urange, gint mask, guint width, gint line_style); /* set border color for the given range */ void gtk_sheet_range_set_border_color(GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color); /* set font for the given range */ void gtk_sheet_range_set_font(GtkSheet *sheet, const GtkSheetRange *urange, PangoFontDescription *font_desc); /* get cell attributes of the given cell */ /* TRUE means that the cell is currently allocated */ gboolean gtk_sheet_get_attributes(GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr *attributes); GtkSheetChild *gtk_sheet_put(GtkSheet *sheet, GtkWidget *child, gint x, gint y); void gtk_sheet_attach_floating(GtkSheet *sheet, GtkWidget *widget, gint row, gint col); void gtk_sheet_attach_default(GtkSheet *sheet, GtkWidget *widget, gint row, gint col); void gtk_sheet_attach(GtkSheet *sheet, GtkWidget *widget, gint row, gint col, gint xoptions, gint yoptions, gint xpadding, gint ypadding); void gtk_sheet_move_child(GtkSheet *sheet, GtkWidget *widget, gint x, gint y); const GtkSheetChild *gtk_sheet_get_child_at(GtkSheet *sheet, gint row, gint col); void gtk_sheet_button_attach(GtkSheet *sheet, GtkWidget *widget, gint row, gint col); /*< private >*/ void _gtk_sheet_range_fixup(GtkSheet *sheet, GtkSheetRange *range); void _gtk_sheet_entry_size_allocate(GtkSheet *sheet); void _gtk_sheet_button_size_request(GtkSheet *sheet, GtkSheetButton *button, GtkRequisition *requisition); void _gtk_sheet_scrollbar_adjust(GtkSheet *sheet); void _gtk_sheet_recalc_top_ypixels(GtkSheet *sheet); void _gtk_sheet_recalc_left_xpixels(GtkSheet *sheet); void _gtk_sheet_recalc_view_range(GtkSheet *sheet); void _gtk_sheet_reset_text_column(GtkSheet *sheet, gint start_column); void _gtk_sheet_range_draw(GtkSheet *sheet, const GtkSheetRange *range, gboolean activate_active_cell); void _gtk_sheet_hide_active_cell(GtkSheet *sheet); void _gtk_sheet_redraw_internal(GtkSheet *sheet, gboolean reset_hadjustment, gboolean reset_vadjustment); void _gtk_sheet_draw_button(GtkSheet *sheet, gint row, gint col); GtkSheetEntryType _gtk_sheet_entry_type_from_gtype(GType entry_type); GType _gtk_sheet_entry_type_to_gtype(GtkSheetEntryType ety); guint _gtk_sheet_row_default_height(GtkWidget *widget); void _gtk_sheet_child_hide(GtkSheetChild *child); void _gtk_sheet_child_show(GtkSheetChild *child); G_END_DECLS #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_SHEET_H__ */ gtkextra-3.2.0/gtkextra/gtkpsfont.h0000644000076400001440000000766412603754176014337 00000000000000/* gtkpsfont - PostScript Fonts handling * Copyright 1999-2001 Adrian E. Feiguin * * Some code borrowed from * DiaCanvas -- a technical canvas widget * Copyright (C) 1999 Arjan Molenaar * Dia -- an diagram creation/manipulation program * Copyright (C) 1998 Alexander Larsson * * and Xfig * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PS_FONT_H__ #define __GTK_PS_FONT_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* List of names of the 35 default Adobe fonts "Times-Roman", "Times-Italic", "Times-Bold", "Times-BoldItalic", "AvantGarde-Book", "AvantGarde-BookOblique", "AvantGarde-Demi", "AvantGarde-DemiOblique", "Bookman-Light", "Bookman-LightItalic", "Bookman-Demi", "Bookman-DemiItalic", "Courier", "Courier-Oblique", "Courier-Bold", "Courier-BoldOblique", "Helvetica", "Helvetica-Oblique", "Helvetica-Bold", "Helvetica-BoldOblique", "Helvetica-Narrow", "Helvetica-Narrow-Oblique", "Helvetica-Narrow-Bold", "Helvetica-Narrow-BoldOblique", "NewCenturySchoolbook-Roman", "NewCenturySchoolbook-Italic", "NewCenturySchoolbook-Bold", "NewCenturySchoolbook-BoldItalic", "Palatino-Roman", "Palatino-Italic", "Palatino-Bold", "Palatino-BoldItalic", "Symbol", "ZapfChancery-MediumItalic", "ZapfDingbats", */ typedef struct _GtkPSFont GtkPSFont; /** * GtkPSFont: * * The GtkPSFont struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPSFont { /*< private >*/ gchar *fontname; gchar *psname; gchar *family; gchar *pango_description; gchar *i18n_latinfamily; gboolean italic; gboolean bold; gboolean vertical; }; gint gtk_psfont_init (); void gtk_psfont_unref (); GtkPSFont* gtk_psfont_get_by_name (const gchar *name); GtkPSFont* gtk_psfont_get_by_family (const gchar *family_name, gboolean italic, gboolean bold); GdkFont* gtk_psfont_get_gdkfont (GtkPSFont *font, gint height); PangoFontDescription* gtk_psfont_get_font_description (GtkPSFont *font, gint height); const gchar * gtk_psfont_get_psfontname (GtkPSFont *psfont); void gtk_psfont_add_font (const char *fontname, const gchar *psname, const gchar *family, const gchar *pango_description, gboolean italic, gboolean bold); void gtk_psfont_add_i18n_font (const char *fontname, const gchar *psname, const gchar *family, const gchar *i18n_latinfamily, const gchar *pango_description, gboolean italic, gboolean bold, gboolean vertical); void gtk_psfont_get_families (GList **families, gint *num_families); void gtk_psfont_get_char_size (GtkPSFont *psfont, GdkFont *font, GdkFont *latin_font, GdkWChar wc, gint *width, gint *ascent, gint *descent); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PS_FONT_H__ */ gtkextra-3.2.0/gtkextra/gtkplotarray.h0000644000076400001440000001166612603754176015040 00000000000000/* gtkplotarray - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_ARRAY_H__ #define __GTK_PLOT_ARRAY_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_PLOT_ARRAY_LIST(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_array_list_get_type (), GtkPlotArrayList) #define G_TYPE_PLOT_ARRAY_LIST (gtk_plot_array_list_get_type ()) #define GTK_PLOT_ARRAY_LIST_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_array_list_get_type(), GtkPlotArrayListClass) #define GTK_IS_PLOT_ARRAY_LIST(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_array_list_get_type ()) #define GTK_PLOT_ARRAY(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_array_get_type (), GtkPlotArray) #define G_TYPE_PLOT_ARRAY (gtk_plot_array_get_type ()) #define GTK_PLOT_ARRAY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_array_get_type(), GtkPlotArrayClass) #define GTK_IS_PLOT_ARRAY(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_array_get_type ()) typedef struct _GtkPlotArrayList GtkPlotArrayList; typedef struct _GtkPlotArrayListClass GtkPlotArrayListClass; typedef struct _GtkPlotArray GtkPlotArray; typedef struct _GtkPlotArrayClass GtkPlotArrayClass; typedef union { gdouble *data_double; gfloat *data_float; gint *data_int; gboolean *data_bool; gchar **data_string; gpointer *data_pointer; } GtkPlotArrayArg; /** * GtkPlotArrayList: * * The GtkPlotArrayList struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotArrayList { /*< private >*/ GObject object; GList *arrays; }; struct _GtkPlotArrayListClass { GObjectClass parent_class; }; /** * GtkPlotArray: * * The GtkPlotArray struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotArray { GObject object; gchar *name; gchar *label; gchar *description; GtkPlotArrayArg data; GType type; gboolean own_data; gint size; gboolean required; gboolean independent; gdouble scale; }; struct _GtkPlotArrayClass { GObjectClass parent_class; }; GType gtk_plot_array_get_type (void); GObject* gtk_plot_array_new (const gchar *name, gpointer array, gint size, GType type, gboolean own_data); void gtk_plot_array_set (GtkPlotArray *array, gpointer data_array, gint size, GType type); void gtk_plot_array_set_label (GtkPlotArray *array, const gchar *label); void gtk_plot_array_set_description (GtkPlotArray *array, const gchar *desc); void gtk_plot_array_set_scale (GtkPlotArray *array, gdouble scale); void gtk_plot_array_set_required (GtkPlotArray *array, gboolean required); void gtk_plot_array_set_independent (GtkPlotArray *array, gboolean independent); GType gtk_plot_array_get_data_type (GtkPlotArray *array); const gchar * gtk_plot_array_get_name (GtkPlotArray *array); const gchar * gtk_plot_array_get_label (GtkPlotArray *array); const gchar * gtk_plot_array_get_description (GtkPlotArray *array); gboolean gtk_plot_array_required (GtkPlotArray *array); gboolean gtk_plot_array_independent (GtkPlotArray *array); gdouble gtk_plot_array_get_scale (GtkPlotArray *array); gint gtk_plot_array_get_size (GtkPlotArray *array); gfloat* gtk_plot_array_get_float (GtkPlotArray *array); gdouble* gtk_plot_array_get_double (GtkPlotArray *array); gint* gtk_plot_array_get_int (GtkPlotArray *array); gboolean* gtk_plot_array_get_bool (GtkPlotArray *array); gchar** gtk_plot_array_get_string (GtkPlotArray *array); gpointer* gtk_plot_array_get_pointer (GtkPlotArray *array); void gtk_plot_array_free (GtkPlotArray *array); GType gtk_plot_array_list_get_type (void); GObject* gtk_plot_array_list_new (void); void gtk_plot_array_list_add (GtkPlotArrayList *set, GtkPlotArray *array); void gtk_plot_array_list_remove (GtkPlotArrayList *set, GtkPlotArray *array); GtkPlotArray* gtk_plot_array_list_get (GtkPlotArrayList *set, const gchar *name); void gtk_plot_array_list_clear (GtkPlotArrayList *set); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_ARRAY_H__ */ gtkextra-3.2.0/gtkextra/testdt.c0000644000076400001440000000304112603754176013603 00000000000000#include #include #include #include #include #include "gtkplotdt.h" static gint simpleprogressbar(double p) { static int lastprog= -1; int prog,i; if (p<0) p=0; if (p>1) p=1; prog= 70*p; if (prog>lastprog) { fprintf(stderr,"\r %3d%% ",(int)(p*100)); for (i=0; ipbar= simpleprogressbar; /* read X/Y pairs from f: */ while (fgets(buffer,100,f)) { if (sscanf(buffer,"%lf %lf", &p.x, &p.y)==2) { /* add this node */ gtk_plot_dt_add_node(data,p); } } fclose(f); /* start the triangulation */ gtk_plot_dt_set_subsampling(data,FALSE); gtk_plot_dt_triangulate(data); fprintf(stderr,"\n"); list = data->triangles; while(list){ t = (GtkPlotDTtriangle *)list->data; printf("%d %d %d\n",t->a,t->b,t->c); list = list->next; } /* clean up data and exit */ gtk_object_destroy(GTK_OBJECT(data)); return 0; } gtkextra-3.2.0/gtkextra/testiterator.c0000644000076400001440000001352712603754176015037 00000000000000#include #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvastext.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkPlotData *dataset; gint nlayers = 0; gint32 timer; GtkWidget *canvas; gdouble *px; gdouble *py; static gchar point_label[100]; void quit () { gtk_main_quit(); g_free(plots); } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; nlayers++; plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .65, .45); return plots[nlayers-1]; } void iter (GtkPlot *plot, GtkPlotData *data, gint iter, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error) { *x = iter; *y = rand()%10/10.; sprintf(point_label, "%d\n", iter); *label = point_label; *error = FALSE; } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *active_plot; GdkColor color; gint page_width, page_height; gfloat scale = 1.; GtkPlotCanvasChild *child; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlot Real Time Demo"); gtk_widget_set_size_request(window1,550,600); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_UNSET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); gtk_widget_show(canvas); active_plot = new_layer(canvas); gdk_color_parse("light yellow", &color); gdk_color_alloc(gtk_widget_get_colormap(active_plot), &color); gtk_plot_set_background(GTK_PLOT(active_plot), &color); gdk_color_parse("white", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_legends_set_attributes(GTK_PLOT(active_plot), NULL, 0, NULL, &color); gtk_plot_set_range(GTK_PLOT(active_plot), 0. ,20., 0., 1.); gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_X, 2, 1); gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_Y, .1, 1); gtk_plot_axis_set_labels_style(gtk_plot_get_axis(GTK_PLOT(active_plot), 2), 0, 0); gtk_plot_axis_set_labels_style(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 0, 0); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_grids_set_visible(GTK_PLOT(active_plot), TRUE, TRUE, TRUE, TRUE); gtk_widget_show(active_plot); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .15, .80, .65); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT)); gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_LEFT), "Intensity"); gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_BOTTOM), "Point"); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 2, 3); gtk_plot_legends_move(GTK_PLOT(active_plot), .60, .10); gtk_widget_show(window1); child = gtk_plot_canvas_text_new("Times-BoldItalic", 20, 0, NULL, NULL, TRUE, GTK_JUSTIFY_CENTER, "Iterator Demo"); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .45, .05, 0., 0.); dataset = GTK_PLOT_DATA(gtk_plot_data_new_iterator((GtkPlotIterator)iter, 20, GTK_PLOT_DATA_X|GTK_PLOT_DATA_Y|GTK_PLOT_DATA_LABELS)); gtk_plot_data_show_labels(dataset, TRUE); gtk_plot_add_data(GTK_PLOT(active_plot), dataset); gtk_widget_show(GTK_WIDGET(dataset)); gdk_color_parse("red", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_legend(dataset, "Iterator"); gtk_plot_data_set_symbol(dataset, GTK_PLOT_SYMBOL_DIAMOND, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset, GTK_PLOT_LINE_SOLID, 0, 0, 1, &color); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(canvas)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(canvas)); /* gtk_plot_clip_data(GTK_PLOT(active_plot), TRUE); */ gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkextra-marshal.list0000644000076400001440000000071612603754176016311 00000000000000BOOL:INT,INT,POINTER,POINTER BOOL:BOXED,POINTER BOOL:BOXED,STRING BOOL:BOXED,BOXED BOOL:BOXED,DOUBLE,DOUBLE BOOL:POINTER,POINTER BOOL:POINTER,BOXED BOOL:POINTER,STRING BOOL:POINTER BOOL:BOXED BOOL:INT,INT VOID:INT VOID:INT,STRING VOID:BOXED VOID:VOID VOID:BOOL VOID:POINTER VOID:INT,BOXED VOID:INT,INT VOID:INT,POINTER VOID:POINTER,POINTER VOID:BOXED,POINTER VOID:BOXED,BOXED VOID:OBJECT VOID:OBJECT,OBJECT VOID:DOUBLE,DOUBLE,DOUBLE,DOUBLE VOID:ENUM,INT,BOOLEAN gtkextra-3.2.0/gtkextra/gtkplotcanvaspixmap.h0000644000076400001440000000422512603754176016405 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANVAS_PIXMAP_H__ #define __GTK_PLOT_CANVAS_PIXMAP_H__ #define GTK_PLOT_CANVAS_PIXMAP(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_pixmap_get_type (), GtkPlotCanvasPixmap) #define GTK_PLOT_CANVAS_PIXMAP_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_pixmap_get_type(), GtkPlotCanvasPixmapClass) #define GTK_IS_PLOT_CANVAS_PIXMAP(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_pixmap_get_type ()) #define G_TYPE_PLOT_CANVAS_PIXMAP (gtk_plot_canvas_pixmap_get_type ()) #include #include "gtkplotpc.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GtkPlotCanvasPixmap GtkPlotCanvasPixmap; typedef struct _GtkPlotCanvasPixmapClass GtkPlotCanvasPixmapClass; /** * GtkPlotCanvasPixmap: * * The GtkPlotCanvasPixmap struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvasPixmap { GtkPlotCanvasChild parent; GdkPixmap *pixmap; GdkBitmap *mask; }; struct _GtkPlotCanvasPixmapClass { GtkPlotCanvasChildClass parent_class; }; GType gtk_plot_canvas_pixmap_get_type (void); GtkPlotCanvasChild * gtk_plot_canvas_pixmap_new(GdkPixmap *_pixmap, GdkBitmap *mask); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANVAS_PIXMAP_H__ */ gtkextra-3.2.0/gtkextra/gtkplotbox.c0000644000076400001440000003325712603754176014505 00000000000000/* gtkplotbox - box plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotbox * @short_description: * * FIXME:: need long description. */ #include #include #include #include #include #include "gtkextra-compat.h" #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotbox.h" #include "gtkpsfont.h" #define P_(string) string static void gtk_plot_box_class_init (GtkPlotBoxClass *klass); static void gtk_plot_box_init (GtkPlotBox *data); static void gtk_plot_box_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_box_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_box_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_box_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); static void gtk_plot_box_clone (GtkPlotData *data, GtkPlotData *copy); extern gint roundint (gdouble x); enum { ARG_0, ARG_ORIENTATION, }; static GtkPlotDataClass *parent_class = NULL; GType gtk_plot_box_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotBox", sizeof (GtkPlotBoxClass), (GClassInitFunc) gtk_plot_box_class_init, sizeof (GtkPlotBox), (GInstanceInitFunc) gtk_plot_box_init, 0); } return data_type; } static void gtk_plot_box_class_init (GtkPlotBoxClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; gobject_class->set_property = gtk_plot_box_set_property; gobject_class->get_property = gtk_plot_box_get_property; g_object_class_install_property(gobject_class, ARG_ORIENTATION, g_param_spec_enum ("orientation", P_("Orientation"), P_("Orientation"), gtk_orientation_get_type (), 0, G_PARAM_READABLE|G_PARAM_WRITABLE)); data_class->clone = gtk_plot_box_clone; data_class->draw_legend = gtk_plot_box_draw_legend; data_class->draw_symbol = gtk_plot_box_draw_symbol; /* data_class->draw_data = gtk_plot_box_draw; */ } static void gtk_plot_box_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotBox *data; data = GTK_PLOT_BOX (object); switch (prop_id) { case ARG_ORIENTATION: data->orientation = g_value_get_enum(value); break; } } static void gtk_plot_box_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotBox *data; data = GTK_PLOT_BOX (object); switch (prop_id) { case ARG_ORIENTATION: g_value_set_enum(value, data->orientation); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_plot_box_init (GtkPlotBox *dataset) { GtkWidget *widget; GdkColor black, white; GdkColormap *colormap; widget = GTK_WIDGET(dataset); colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); GTK_PLOT_DATA(dataset)->symbol.symbol_style = GTK_PLOT_SYMBOL_FILLED; GTK_PLOT_DATA(dataset)->symbol.color = white; GTK_PLOT_DATA(dataset)->line.line_style = GTK_PLOT_LINE_SOLID; GTK_PLOT_DATA(dataset)->line.line_width = 1; GTK_PLOT_DATA(dataset)->line.color = black; } /** * gtk_plot_box_new: * @orientation: GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. * * Create a new GtkPlotBox widget. * * Return value: a new GtkWidget. */ GtkWidget* gtk_plot_box_new (GtkOrientation orientation) { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_box_get_type (), NULL); gtk_plot_box_construct(GTK_PLOT_BOX(widget), orientation); return (widget); } /** * gtk_plot_box_construct: * @box: a #GtkPlotBox widget. * @orientation: GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. * * Initializes a #GtkPlotBar structure. */ void gtk_plot_box_construct (GtkPlotBox *box, GtkOrientation orientation) { box->orientation = orientation; } static void gtk_plot_box_clone(GtkPlotData *data, GtkPlotData *copy) { GTK_PLOT_DATA_CLASS(parent_class)->clone(data, copy); GTK_PLOT_BOX(copy)->orientation = GTK_PLOT_BOX(data)->orientation; } static void gtk_plot_box_draw_symbol(GtkPlotData *dataset, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot; GtkPlotBox *box = NULL; GtkPlotPoint errbar[6]; gdouble px, py; gdouble px0, py0; gdouble px1, py1; gdouble x1 = 0.0, y1 = 0.0, width = 0.0, height = 0.0; gdouble el_x, el_y, er_x, er_y, ed_x, ed_y, eu_x, eu_y; gdouble m; gdouble a_scale; g_return_if_fail(GTK_IS_PLOT_BOX(dataset)); box = GTK_PLOT_BOX(dataset); g_return_if_fail(dataset->plot != NULL); plot = dataset->plot; a_scale = gtk_plot_data_get_a_scale(dataset); m = plot->magnification * a_scale; gtk_plot_pc_set_lineattr (plot->pc, dataset->symbol.border.line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); if(x >= plot->xmin && x <= plot->xmax){ if(GTK_IS_PLOT3D(plot)){ }else{ if(dataset->show_zerrbars){ gtk_plot_pc_set_color(plot->pc, &dataset->symbol.border.color); switch(box->orientation){ case GTK_ORIENTATION_VERTICAL: gtk_plot_get_pixel(plot, x, y, &px, &py); gtk_plot_get_pixel(plot, x, y, &px0, &py0); gtk_plot_get_pixel(plot, x, z, &px1, &py1); width = roundint(dataset->symbol.size * m); height = abs(py1 - py0); gtk_plot_get_pixel(plot, x, z + dy, &eu_x, &eu_y); gtk_plot_get_pixel(plot, x, y - dy, &ed_x, &ed_y); errbar[0].x = px-roundint(m * dataset->symbol.size/2); errbar[0].y = eu_y; errbar[1].x = px+roundint(m * dataset->symbol.size/2); errbar[1].y = eu_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = px; errbar[0].y = eu_y; errbar[1].x = px; errbar[1].y = py1; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = px-roundint(m * dataset->symbol.size/2); errbar[0].y = ed_y; errbar[1].x = px+roundint(m * dataset->symbol.size/2); errbar[1].y = ed_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = px; errbar[0].y = ed_y; errbar[1].x = px; errbar[1].y = py0; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); break; case GTK_ORIENTATION_HORIZONTAL: gtk_plot_get_pixel(plot, y, x, &px, &py); gtk_plot_get_pixel(plot, y, x, &px0, &py0); gtk_plot_get_pixel(plot, z, x, &px1, &py1); height = roundint(dataset->symbol.size * m); gtk_plot_get_pixel(plot, z + dy, x, &er_x, &er_y); gtk_plot_get_pixel(plot, y - dy, x, &el_x, &el_y); errbar[0].x = el_x; errbar[0].y = py-roundint(m * dataset->symbol.size / 2.); errbar[1].x = el_x; errbar[1].y = py+roundint(m * dataset->symbol.size / 2.); gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = el_x; errbar[0].y = py; errbar[1].x = px0; errbar[1].y = py; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = er_x; errbar[0].y = py-roundint(m * dataset->symbol.size / 2.); errbar[1].x = er_x; errbar[1].y = py+roundint(m * dataset->symbol.size / 2.); gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = er_x; errbar[0].y = py; errbar[1].x = px1; errbar[1].y = py; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); break; } } switch(box->orientation){ case GTK_ORIENTATION_VERTICAL: gtk_plot_get_pixel(plot, x, y, &px, &py); gtk_plot_get_pixel(plot, x, y, &px0, &py0); gtk_plot_get_pixel(plot, x, z, &px1, &py1); y1 = MIN(py0,py1); height = fabs(py0-py1); width = roundint(dataset->symbol.size * m); x1 = px0 - width / 2; break; case GTK_ORIENTATION_HORIZONTAL: gtk_plot_get_pixel(plot, y, x, &px, &py); gtk_plot_get_pixel(plot, y, x, &px0, &py0); gtk_plot_get_pixel(plot, z, x, &px1, &py1); x1 = MIN(px0,px1); width = fabs(px0-px1); height = roundint(dataset->symbol.size * m); y1 = py0 - height / 2; break; } if(dataset->symbol.symbol_style == GTK_PLOT_SYMBOL_OPAQUE){ gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_rectangle (plot->pc, TRUE, x1, y1, width, height); } if(dataset->symbol.symbol_style == GTK_PLOT_SYMBOL_FILLED){ gtk_plot_pc_set_color(plot->pc, &dataset->symbol.color); gtk_plot_pc_draw_rectangle (plot->pc, TRUE, x1, y1, width, height); } gtk_plot_pc_set_color(plot->pc, &dataset->symbol.border.color); gtk_plot_pc_draw_rectangle (plot->pc, FALSE, x1, y1, width, height); switch(box->orientation){ case GTK_ORIENTATION_VERTICAL: gtk_plot_pc_draw_line(plot->pc, px-width/2, py, px+width/2, py); break; case GTK_ORIENTATION_HORIZONTAL: gtk_plot_pc_draw_line(plot->pc, px, py-height/2, px, py+height/2); break; } } } } static void gtk_plot_box_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotBox *box; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; GtkAllocation allocation; box = GTK_PLOT_BOX(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); //g_return_if_fail(gtk_widget_get_realized(data->plot)); // is this required?? RRR plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); legend.x = (gdouble)(area.x + x + roundint((plot->legends_line_width + 4) * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_OPAQUE){ gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); } gtk_plot_pc_set_lineattr (plot->pc, data->symbol.border.line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_FILLED){ gtk_plot_pc_set_color(plot->pc, &data->symbol.color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); } gtk_plot_pc_set_color(plot->pc, &data->symbol.border.color); gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); } gtkextra-3.2.0/gtkextra/gtkplotpc.c0000644000076400001440000003045012603754176014307 00000000000000/* gtkplotpc - gtkplot print context - a renderer for printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotpc * @short_description: Plot Context * * Base Class for #GtkPlotCairo, #GtkPlotGdk and #GtkPlotPS. */ #include #include #include #include #include #include #include #include "gtkplotpc.h" #include "gtkplotgdk.h" #include "gtkplot.h" #include "gtkpsfont.h" #include "gtkplotcanvas.h" static void gtk_plot_pc_class_init (GtkPlotPCClass *klass); static void gtk_plot_pc_real_init (GtkPlotPC *pc); static GtkObjectClass *parent_class = NULL; GType gtk_plot_pc_get_type (void) { static GType pc_type = 0; if (!pc_type) { pc_type = g_type_register_static_simple ( gtk_object_get_type(), "GtkPlotPC", sizeof (GtkPlotPCClass), (GClassInitFunc) gtk_plot_pc_class_init, sizeof (GtkPlotPC), (GInstanceInitFunc) gtk_plot_pc_real_init, 0); } return pc_type; } static void gtk_plot_pc_class_init (GtkPlotPCClass *klass) { GtkObjectClass *object_class; GtkPlotPCClass *pc_class; parent_class = g_type_class_ref (gtk_object_get_type ()); object_class = (GtkObjectClass *) klass; pc_class = (GtkPlotPCClass *) klass; } static void gtk_plot_pc_real_init (GtkPlotPC *pc) { gdk_color_black(gdk_colormap_get_system(), &pc->color); pc->width = pc->height = 0; pc->init_count = 0; pc->use_pixmap = TRUE; } GtkObject * gtk_plot_pc_new (void) { GtkObject *object; object = g_object_new (gtk_plot_pc_get_type(), NULL); return (object); } /** * gtk_plot_pc_init: * @pc: * * * * Return value: */ gboolean gtk_plot_pc_init (GtkPlotPC *pc) { pc->init_count++; if(pc->init_count > 1) return TRUE; return(GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->init(pc)); } /** * gtk_plot_pc_leave: * @pc: * * */ void gtk_plot_pc_leave (GtkPlotPC *pc) { pc->init_count--; if(pc->init_count > 0) return; GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->leave(pc); } /** * gtk_plot_pc_set_viewport: * @pc: * @w: * @h: * * */ void gtk_plot_pc_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h) { pc->width = w; pc->height = h; GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->set_viewport(pc, w, h); } /** * gtk_plot_pc_gsave: * @pc: * * */ void gtk_plot_pc_gsave (GtkPlotPC *pc) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->gsave(pc); } /** * gtk_plot_pc_grestore: * @pc: * * */ void gtk_plot_pc_grestore (GtkPlotPC *pc) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->grestore(pc); } /** * gtk_plot_pc_clip: * @pc: * @area: * * */ void gtk_plot_pc_clip (GtkPlotPC *pc, GdkRectangle *area) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->clip(pc, area); } /** * gtk_plot_pc_clip_mask: * @pc: * @x: * @y: * @mask: * * */ void gtk_plot_pc_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, GdkBitmap *mask) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->clip_mask(pc, x, y, mask); } /** * gtk_plot_pc_set_color: * @pc: * @color: * * */ void gtk_plot_pc_set_color (GtkPlotPC *pc, GdkColor *color) { pc->color = *color; GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->set_color(pc, color); } /** * gtk_plot_pc_set_lineattr: * @pc: * @line_width: * @line_style: * @cap_style: * @join_style: * * */ void gtk_plot_pc_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->set_lineattr(pc, line_width, line_style, cap_style, join_style); } /** * gtk_plot_pc_set_dash: * @pc: * @offset_: * @values: * @num_values: * * */ void gtk_plot_pc_set_dash (GtkPlotPC *pc, gdouble offset_, gdouble *values, gint num_values) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->set_dash(pc, offset_, values, num_values); } /** * gtk_plot_pc_draw_line: * @pc: * @x1: * @y1: * @x2: * @y2: * * */ void gtk_plot_pc_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_line(pc, x1, y1, x2, y2); } /** * gtk_plot_pc_draw_lines: * @points: * @numpoints: * * */ void gtk_plot_pc_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints) { if(!points || numpoints <= 1) return; GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_lines(pc, points, numpoints); } /** * gtk_plot_pc_draw_point: * @pc: * @x: * @y: * * */ void gtk_plot_pc_draw_point (GtkPlotPC *pc, gdouble x, gdouble y) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_point(pc, x, y); } /** * gtk_plot_pc_draw_rectangle: * @pc: * @filled: * @x: * @y: * @width: * @height: * * */ void gtk_plot_pc_draw_rectangle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_rectangle(pc, filled, x, y, width, height); } /** * gtk_plot_pc_draw_polygon: * @pc: * @filled: * @points: * * */ void gtk_plot_pc_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints) { if(!points || numpoints < 1) return; GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_polygon(pc, filled, points, numpoints); } /** * gtk_plot_pc_draw_circle: * @pc: * @filled: * @x: * @y: * @size: * * */ void gtk_plot_pc_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_circle(pc, filled, x, y, size); } /** * gtk_plot_pc_draw_ellipse: * @pc: * @filled: * @x: * @y: * @width: * @height: * * */ void gtk_plot_pc_draw_ellipse (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_ellipse(pc, filled, x, y, width, height); } /** * gtk_plot_pc_set_font: * @pc: * @psfont: * @height: * * */ void gtk_plot_pc_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->set_font(pc, psfont, height); } /** * gtk_plot_pc_draw_string: * @pc: * @x: * @y: * @angle: * @fg: * @bg: * @transparent: * @border: * @border_space: * @border_width: * @shadow_width: * @font: * @height: * @just: * @text: * * */ void gtk_plot_pc_draw_string (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text) { if(!text) return; if(strlen(text) == 0) return; GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_string(pc, x, y, angle, fg, bg, transparent, border, border_space, border_width, shadow_width, font, height, just, text); } /** * gtk_plot_pc_draw_pixmap: * @pc: * @pixmap: * @mask: * @xsrc: * @ysrc: * @xdest: * @ydest: * @width: * @height: * @scale_x: * @scale_y: * * */ void gtk_plot_pc_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y) { GTK_PLOT_PC_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(pc)))->draw_pixmap(pc, pixmap, mask, xsrc, ysrc, xdest, ydest, width, height, scale_x, scale_y); } gtkextra-3.2.0/gtkextra/gtkdirtree.c0000644000076400001440000004522512603754176014452 00000000000000/* gtkdirtree - gtkdirtree widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * check_dir - taken from gtk+ (gtkfilesel.c) * Copyright (C) 2001 Chris Kuklewicz * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkdirtree * @short_description: A directory tree widget for GTK. * * It is a GtkCTree subclass that allows you to navigate the file-system. */ /** * GtkDirTree: * * The GtkDirTree struct contains only private data. * It should only be accessed through the functions described below. */ #include "config.h" #include #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_DIRENT_H #include #endif #ifdef G_OS_WIN32 #define STRICT #include /* GetLogicalDriveStrings */ #ifndef S_ISDIR #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #define S_ISLNK(m) (0) #elif defined(_WIN32) #define S_ISLNK(m) (0) #endif #endif #include #include "gtkdirtree.h" #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif static void destroy_tree(gpointer data); static void expand_tree(GtkCTree *ctree,GtkCTreeNode *parent_node, gpointer data); static gboolean accept_dirname (char *dirname, gboolean show_hidden); gboolean check_dir_extra (gchar *dir_name, struct stat *result, gboolean *stat_subdirs); /* XPM */ static char * dennied_xpm[] = { "16 16 9 1", " c None", ". c #000000", "X c #EFE8EF", "o c #FFF8CF", "O c #FFF890", "+ c #CFC860", "@ c #FF0000", "# c #FFC890", "x c #909000", " ", " xxxxx. ", " xXooOO . ", "x++++@@@@xxxx ", "xoo@@@@@@@@oO+. ", "xoO@@OOOO@@O#+. ", "xo@@OOOO@@@@O+. ", "xo@@OOO@@O@@#+. ", "xo@@OO@@O#@@O+. ", "xo@@O@@O#O@@#+. ", "xo@@@@O#O#@@#+. ", "xo#@@O#O#@@##+. ", "x++@@@@@@@@+++. ", " ....@@@@...... ", " ", " "}; static char * folder_xpm[] = { "16 16 8 1", " c None", ". c #909000", "+ c #000000", "@ c #EFE8EF", "# c #FFF8CF", "$ c #FFF890", "% c #CFC860", "& c #FFC890", " ", " .....+ ", " .@##$$.+ ", ".%%%%%%%...... ", ".###########$%+ ", ".#$$$$$$$$$$&%+ ", ".#$$$$$$$&$&$%+ ", ".#$$$$$$$$&$&%+ ", ".#$$$$$&$&$&$%+ ", ".#$$$$$$&$&$&%+ ", ".#$$$&$&$&$&&%+ ", ".#&$&$&$&$&&&%+ ", ".%%%%%%%%%%%%%+ ", " ++++++++++++++ ", " ", " "}; /* XPM */ static char * ofolder_xpm[] = { "16 16 12 1", " c None", ". c #808080", "+ c #E0E0D0", "@ c #4F484F", "# c #909000", "$ c #FFF8EF", "% c #CFC860", "& c #003090", "* c #7F7800", "= c #FFC890", "- c #FFF890", "; c #2F3000", " . ", " .+@ ", " ###.$$+@ ", " #%%.$$$$+@ ", " #%.$$$&$$+@** ", " #.+++&+&+++@* ", "############++@ ", "#$$$$$$$$$=%#++@", "#$-------=-=#+; ", " #---=--=-==%#; ", " #-----=-=-==#; ", " #-=--=-=-=-=#; ", " #=-=-=-=-==#; ", " ############; ", " ;;;;;;;;;;; ", " "}; /* XPM */ static char * mypc_xpm[] = { "18 18 7 1", " c None", ". c #808080", "+ c #C0C0C0", "@ c #000000", "# c #FFFFFF", "$ c #0000FF", "% c #FFFF00", " ", " ", " ", " ......... ", " .++++++++.@ ", " .########..@ ", " .#$$$$$$#..@ ", " .#$%$$$$#..@ ", " .#$$$$$$#..@ ", " .#$$$$$$#..@ ", " .########.@. ", " .@@@@@@@@@.+@ ", " .#########.+.@ ", " ..@.@.@.@.@..@ ", " .+@+@+@+@+@+@@ ", ".###########+@ ", "@@@@@@@@@@@@@ ", " "}; static void gtk_dir_tree_class_init (GtkDirTreeClass *klass); static void gtk_dir_tree_init (GtkDirTree *dir_tree); static GtkCTreeClass *parent_class = NULL; GType gtk_dir_tree_get_type (void) { static GType dir_tree_type = 0; if (!dir_tree_type) { dir_tree_type = g_type_register_static_simple ( gtk_ctree_get_type(), "GtkDirTree", sizeof (GtkDirTreeClass), (GClassInitFunc) gtk_dir_tree_class_init, sizeof (GtkDirTree), (GInstanceInitFunc) gtk_dir_tree_init, 0); } return dir_tree_type; } GtkWidget* gtk_dir_tree_new (void) { GtkWidget *widget; widget = gtk_widget_new (gtk_dir_tree_get_type(), NULL); return widget; } static void gtk_dir_tree_class_init (GtkDirTreeClass *klass) { GtkWidgetClass *widget_class; GtkObjectClass *object_class; parent_class = g_type_class_ref (gtk_ctree_get_type ()); widget_class = (GtkWidgetClass*) klass; object_class = (GtkObjectClass *) klass; } static void gtk_dir_tree_init (GtkDirTree *dir_tree) { GtkCTreeNode *root_node,*mypc_node,*node; GtkDirTreeNode *dirnode; gchar *root_text=G_DIR_SEPARATOR_S,*node_text="dummy"; gchar localhost[MAXHOSTNAMELEN]; GtkWidget *widget; GdkColormap *colormap; #ifdef G_OS_WIN32 gchar drives[128]; gchar* drive; #endif widget = GTK_WIDGET(dir_tree); colormap = gdk_colormap_get_system(); dir_tree->show_hidden = TRUE; /* Get the local hostname. */ #ifndef G_OS_WIN32 if ((gethostname (localhost, MAXHOSTNAMELEN) != 0) && (getdomainname (localhost, MAXHOSTNAMELEN) != 0)) strcpy (localhost, "LocalHost"); #else strcpy (localhost, "My PC"); #endif dir_tree->local_hostname = g_strdup(localhost); g_object_set(G_OBJECT(widget), "n_columns", 1, "tree_column", 0, NULL); gtk_clist_set_row_height (GTK_CLIST (dir_tree), 18); dir_tree->my_pc=gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &dir_tree->my_pc_mask, NULL,mypc_xpm); dir_tree->folder=gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &dir_tree->folder_mask, NULL,folder_xpm); dir_tree->ofolder=gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &dir_tree->ofolder_mask, NULL,ofolder_xpm); dir_tree->dennied=gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &dir_tree->dennied_mask, NULL,dennied_xpm); gtk_clist_set_column_auto_resize(GTK_CLIST(dir_tree),0,TRUE); gtk_clist_set_selection_mode(GTK_CLIST(dir_tree),GTK_SELECTION_SINGLE); gtk_ctree_set_line_style(GTK_CTREE(dir_tree),GTK_CTREE_LINES_DOTTED); g_signal_connect(GTK_OBJECT(dir_tree),"tree_expand",G_CALLBACK(expand_tree), NULL); mypc_node=gtk_ctree_insert_node(GTK_CTREE(dir_tree),NULL,NULL,&dir_tree->local_hostname,4,dir_tree->my_pc,dir_tree->my_pc_mask,dir_tree->my_pc,dir_tree->my_pc_mask,FALSE,FALSE); dirnode=g_malloc0(sizeof(GtkDirTreeNode)); dirnode->path = dir_tree->local_hostname; gtk_ctree_node_set_row_data_full(GTK_CTREE(dir_tree),mypc_node,dirnode,destroy_tree); #ifndef G_OS_WIN32 root_node=gtk_ctree_insert_node(GTK_CTREE(dir_tree),mypc_node,NULL,&root_text,4,dir_tree->folder,dir_tree->folder_mask,dir_tree->ofolder,dir_tree->ofolder_mask,FALSE,FALSE); dirnode=g_malloc0(sizeof(GtkDirTreeNode)); dirnode->path=g_strdup(G_DIR_SEPARATOR_S); gtk_ctree_node_set_row_data_full(GTK_CTREE(dir_tree),root_node,dirnode,destroy_tree); node=gtk_ctree_insert_node(GTK_CTREE(dir_tree),root_node,NULL,&node_text,4,NULL,NULL,NULL,NULL,TRUE,TRUE); gtk_ctree_expand(GTK_CTREE(dir_tree),mypc_node); gtk_ctree_select(GTK_CTREE(dir_tree),root_node); #else /* On Windoze there isn't one unique root directory "/" but instead * there are logical drives a:, c: ... . Insert them into the dir_tree. */ /* Get the Drives string */ GetLogicalDriveStrings(sizeof(drives), drives); drive = drives; /* add an entry for every existing drive */ while (*drive != '\0') { root_node=gtk_ctree_insert_node(GTK_CTREE(dir_tree),mypc_node,NULL,&drive,4,dir_tree->folder,dir_tree->folder_mask,dir_tree->ofolder,dir_tree->ofolder_mask,FALSE,FALSE); dirnode = g_malloc0(sizeof(GtkDirTreeNode)); dirnode->path = g_strdup(drive); gtk_ctree_node_set_row_data_full(GTK_CTREE(dir_tree),root_node,dirnode,destroy_tree); node=gtk_ctree_insert_node(GTK_CTREE(dir_tree),root_node,NULL,&node_text, 4,NULL,NULL,NULL,NULL,TRUE,TRUE); drive += (strlen(drive) + 1); } gtk_ctree_expand(GTK_CTREE(dir_tree),mypc_node); gtk_ctree_select(GTK_CTREE(dir_tree),mypc_node); #endif } static gboolean accept_dirname (char *dirname, gboolean show_hidden) { if(dirname[0]!='.') return TRUE; if (show_hidden) if (strcmp(dirname, ".") && strcmp(dirname, "..")) return TRUE; return FALSE; } static gboolean check_for_subdir(gchar *path, gboolean show_hidden) { DIR *dir; struct dirent *dirent; struct stat statbuf; gchar *npath; if((dir=opendir(path))!=NULL) { while((dirent=readdir(dir))!=NULL) { if(accept_dirname(dirent->d_name,show_hidden)) { #ifndef G_OS_WIN32 npath=g_strconcat(path,dirent->d_name,G_DIR_SEPARATOR_S,NULL); #else /* the M$ stat is somewhat pedantic ... */ npath=g_strconcat(path,dirent->d_name,NULL); #endif if(0!=stat(npath,&statbuf)) { g_free(npath); continue; } g_free(npath); if(S_ISDIR(statbuf.st_mode)) { closedir(dir); return TRUE; } } } closedir(dir); } /* else g_warning("check_for_subdir: opendir(%s) failed", path); */ return FALSE; } static void destroy_tree(gpointer data) { GtkDirTreeNode *node; node = data; g_free(node->path); g_free(node); } static void expand_tree(GtkCTree *ctree,GtkCTreeNode *parent_node, gpointer data) { DIR *dir; struct dirent *dirent; gchar *path,*text,*dummy="dummy"; struct stat statbuf; GtkCTreeNode *node,*sub_node; GtkDirTreeNode *parent_dirnode,*dirnode; gboolean has_subdir=FALSE; gboolean show_hidden; gboolean stat_subdirs=TRUE; gboolean can_open_subdir; GtkDirTree *dir_tree; GtkWidget *widget; widget = GTK_WIDGET(ctree); dir_tree = GTK_DIR_TREE(widget); show_hidden = dir_tree->show_hidden; parent_dirnode=gtk_ctree_node_get_row_data(GTK_CTREE(widget),parent_node); if(parent_dirnode->path == dir_tree->local_hostname) return; if(!parent_dirnode->scanned) { gtk_clist_freeze(GTK_CLIST(widget)); node=gtk_ctree_find_by_row_data(GTK_CTREE(widget),parent_node,NULL); gtk_ctree_remove_node(GTK_CTREE(widget),node); if((dir=opendir(parent_dirnode->path))!=NULL) { if(!check_dir_extra(parent_dirnode->path,&statbuf,&stat_subdirs)) { closedir(dir); gtk_clist_thaw(GTK_CLIST(widget)); return; } while((dirent=readdir(dir))!=NULL) { path=g_strconcat(parent_dirnode->path,dirent->d_name,NULL); if (stat_subdirs) { if(0!=stat(path,&statbuf)) { g_free(path); continue; } } if(((!stat_subdirs)&&accept_dirname(dirent->d_name,show_hidden)) || (S_ISDIR(statbuf.st_mode)&&accept_dirname(dirent->d_name,show_hidden))) { DIR *dir_sub; dirnode=g_malloc0(sizeof(GtkDirTreeNode)); dirnode->path=g_strconcat(path,G_DIR_SEPARATOR_S,NULL); text=dirent->d_name; if (stat_subdirs) { if(check_for_subdir(dirnode->path,show_hidden)) has_subdir=TRUE; else has_subdir=FALSE; dir_sub = opendir(dirnode->path); if( dir_sub != NULL ) { closedir(dir_sub); can_open_subdir=TRUE; } else { can_open_subdir=FALSE; } } else { has_subdir=TRUE; can_open_subdir=TRUE; } if(can_open_subdir) { node=gtk_ctree_insert_node(GTK_CTREE(widget),parent_node,NULL,&text,4,dir_tree->folder,dir_tree->folder_mask,dir_tree->ofolder,dir_tree->ofolder_mask,!has_subdir,FALSE); } else { node=gtk_ctree_insert_node(GTK_CTREE(widget),parent_node,NULL,&text,4,dir_tree->dennied,dir_tree->dennied_mask,dir_tree->dennied,dir_tree->dennied_mask,!has_subdir,FALSE); } gtk_ctree_node_set_row_data_full(GTK_CTREE(widget),node,dirnode,destroy_tree); if(has_subdir) sub_node=gtk_ctree_insert_node(GTK_CTREE(widget),node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE); } g_free(path); } closedir(dir); gtk_ctree_sort_node(GTK_CTREE(widget),parent_node); } gtk_clist_thaw(GTK_CLIST(widget)); parent_dirnode->scanned=TRUE; } } /** * gtk_dir_tree_open_dir: * @dir_tree: #GtkDirTree widget. * @path: #gchar path to the dir to be opened. * * Open files from directory path in dir_tree widget. * * Returns: TRUE(succes) or FALSE(failure). */ gint gtk_dir_tree_open_dir(GtkDirTree *dir_tree, const gchar *path) { GtkCTreeNode *root_node, *node; GtkDirTreeNode *dir_node; DIR *dir; gchar *c; gchar *folder; gint nlen; gint new_path, new_node; gchar *text; gchar root[5], root1[5], root2[5], root3[5], root4[5]; gchar *aux_path = NULL, *real_path = NULL; if((dir=opendir(path)) == NULL) return FALSE; closedir(dir); /* GET ABSOLUTE PATH */ sprintf(root,"%s",G_DIR_SEPARATOR_S); sprintf(root1,"%s.",G_DIR_SEPARATOR_S); sprintf(root2,"%s..",G_DIR_SEPARATOR_S); sprintf(root3,"%s..%s",G_DIR_SEPARATOR_S,G_DIR_SEPARATOR_S); sprintf(root4,"%s.%s",G_DIR_SEPARATOR_S,G_DIR_SEPARATOR_S); if(path){ gint length; aux_path = g_strdup(path); length = strlen(aux_path); if(strcmp(aux_path + length - 2, root1) == 0){ if(length == 2) { g_free(aux_path); aux_path = g_strdup(root); } else { aux_path[length - 1] = '\0'; } } else if(strcmp(aux_path + length - 3, root2) == 0){ if(length == 3) { g_free(aux_path); aux_path = g_strdup(root); } else { gint i = length - 4; while(i >= 0){ if(aux_path[i] == root[0]){ aux_path[i+1] = '\0'; break; } i--; } } } else if(strcmp(aux_path + length - 4, root3) == 0){ if(length == 4) { g_free(aux_path); aux_path = g_strdup(root); } else { gint i = length - 5; while(i >= 0){ if(aux_path[i] == root[0]){ aux_path[i+1] = '\0'; break; } i--; } } } else if(strcmp(aux_path + length - 3, root4) == 0){ if(length == 3) { g_free(aux_path); aux_path = g_strdup(root); } else { aux_path[length - 2] = '\0'; } } } if(strlen(aux_path) == 0) real_path = g_strdup(G_DIR_SEPARATOR_S); else real_path = g_strconcat(aux_path,G_DIR_SEPARATOR_S,NULL); g_free(aux_path); c = (gchar *)real_path; folder = NULL; nlen = 0; root_node = gtk_ctree_node_nth(GTK_CTREE(dir_tree), 1); gtk_ctree_expand(GTK_CTREE(dir_tree), root_node); new_path = FALSE; new_node = TRUE; while(*c != '\0' && *c != '\n' && c != NULL){ nlen++; folder = (char *)g_realloc(folder, (nlen+1)*sizeof(char)); folder[nlen-1] = *c; folder[nlen]='\0'; if(*c == G_DIR_SEPARATOR){ if(new_path){ node = GTK_CTREE_ROW(root_node)->children; while(node){ dir_node = gtk_ctree_node_get_row_data(GTK_CTREE(dir_tree), node); text = dir_node->path; if(strcmp(text, folder) == 0){ gtk_ctree_expand(GTK_CTREE(dir_tree), node); root_node = node; break; } node = GTK_CTREE_NODE_NEXT(node); } } else { new_path = TRUE; } new_node = FALSE; } else { new_node = TRUE; } c++; } if(new_node){ nlen++; folder = (char *)g_realloc(folder, (nlen+1)*sizeof(char)); folder[nlen-1] = G_DIR_SEPARATOR; folder[nlen]='\0'; node = GTK_CTREE_ROW(root_node)->children; while(node){ dir_node = gtk_ctree_node_get_row_data(GTK_CTREE(dir_tree), node); text = dir_node->path; if(strcmp(text, folder) == 0){ gtk_ctree_expand(GTK_CTREE(dir_tree), node); root_node = node; break; } node = GTK_CTREE_NODE_NEXT(node); } } g_free(folder); if (gtk_ctree_node_is_visible(GTK_CTREE(dir_tree), root_node) != GTK_VISIBILITY_FULL) { gtk_widget_map(GTK_WIDGET(dir_tree)); gtk_ctree_node_moveto(GTK_CTREE(dir_tree), root_node, 0, 0.5, 0.5); } gtk_ctree_select(GTK_CTREE(dir_tree), root_node); g_free(real_path); return TRUE; } gboolean check_dir_extra (gchar *dir_name, struct stat *result, gboolean *stat_subdirs) { /* A list of directories that we know only contain other directories. * Trying to stat every file in these directories would be very * expensive. */ static struct { gchar *name; gboolean present; struct stat statbuf; } no_stat_dirs[] = { { "/afs", FALSE, { 0 } }, { "/net", FALSE, { 0 } } }; static const gint n_no_stat_dirs = sizeof(no_stat_dirs) / sizeof(no_stat_dirs[0]); static gboolean initialized = FALSE; gint i; if (!initialized) { initialized = TRUE; for (i = 0; i < n_no_stat_dirs; i++) { if (stat (no_stat_dirs[i].name, &no_stat_dirs[i].statbuf) == 0) no_stat_dirs[i].present = TRUE; } } if(stat(dir_name, result) < 0) { /* cmpl_errno = errno;*/ return FALSE; } *stat_subdirs = TRUE; for (i=0; ist_dev) && (no_stat_dirs[i].statbuf.st_ino == result->st_ino)) { *stat_subdirs = FALSE; break; } } return TRUE; } gtkextra-3.2.0/gtkextra/testcandles.c0000644000076400001440000002656212603754176014622 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotcandle.h" #include "gtkplotcanvas.h" #include "gtkplotps.h" #include "gtkplotprint.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvaspixmap.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gdouble gaussian(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = .65*exp(-.5*pow(x-.5,2)/.02); return y; } gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } widget_list = plots; active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); } return TRUE; } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkColor color1, color2; static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py1[]={.56, .12, .12, .5, .2, .21}; static gdouble pz1[]={.60, .22, .27, .45, .22, .18}; static gdouble dy1[]={.52, .10, .12, .40, .16, .16}; static gdouble dz1[]={.62, .24, .30, .54, .24, .22}; dataset[0] = GTK_PLOT_DATA(gtk_plot_candle_new()); /* dataset[0] = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_autoscale(GTK_PLOT(active_plot)); */ gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, NULL, dy1, 6); gtk_plot_data_set_z(dataset[0], pz1); gtk_plot_data_set_dz(dataset[0], dz1); gtk_plot_data_show_zerrbars(dataset[0]); gdk_color_parse("red", &color1); gdk_color_alloc(gdk_colormap_get_system(), &color1); gdk_color_parse("blue", &color2); gdk_color_alloc(gdk_colormap_get_system(), &color2); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_EMPTY, 10, 2, &color2, &color1); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_NONE, 0, 0, 1, &color1); /* gtk_plot_data_set_x_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, &active_plot->style->black); gtk_plot_data_set_y_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, &active_plot->style->black); */ gtk_plot_data_set_legend(dataset[0], "Candle Sticks"); } void build_example2(GtkWidget *active_plot) { GdkColor color1, color2; static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py1[]={.56, .12, .12, .5, .2, .21}; /* Open */ static gdouble pz1[]={.60, .22, .27, .45, .22, .18}; /* Close */ static gdouble dy1[]={.52, .10, .12, .40, .16, .16}; /* Low */ static gdouble dz1[]={.62, .24, .30, .54, .24, .22}; /* High */ dataset[0] = GTK_PLOT_DATA(gtk_plot_candle_new()); /* dataset[0] = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_autoscale(GTK_PLOT(active_plot)); */ gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, NULL, dy1, 6); gtk_plot_data_set_z(dataset[0], pz1); gtk_plot_data_set_dz(dataset[0], dz1); gtk_plot_data_show_zerrbars(dataset[0]); gdk_color_parse("black", &color1); gdk_color_alloc(gdk_colormap_get_system(), &color1); gdk_color_parse("red", &color2); gdk_color_alloc(gdk_colormap_get_system(), &color2); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_FILLED, 10, 1, &color2, &color1); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_NONE, 0, 0, 1, &color1); /* gtk_plot_data_set_x_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, &active_plot->style->black); gtk_plot_data_set_y_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, &active_plot->style->black); */ gtk_plot_data_set_legend(dataset[0], "Japanese Candles"); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; gint page_width, page_height; gfloat scale = 1.; GtkPlotCanvasChild *child; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotBox Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); gtk_plot_set_range(GTK_PLOT(active_plot), -0.1 , 1.1, 0., 1.0); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 0), 1., 1); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 1), 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .65, .31); gtk_widget_show(active_plot); build_example1(active_plot); active_plot = new_layer(canvas); gtk_plot_set_range(GTK_PLOT(active_plot), -0.1 , 1.1, 0., 1.0); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 0), 1., 1); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 1), 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .46, .65, .65); gtk_widget_show(active_plot); build_example2(active_plot); g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "democandles.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/Makefile.am0000644000076400001440000003047712603754176014201 00000000000000# Makefile.am for gtk+extra #AUTOMAKE_OPTIONS = 1.7 gtarget=@gdktarget@ if PLATFORM_WIN32 no_undefined = -no-undefined endif if OS_WIN32 gtkextra_def = gtkextra.def gtkextra_win32_symbols = -export-symbols $(gtkextra_def) #Not yet supported #gtkextra_win32res_lo = gtkextra-win32res.lo gtkextra_win32res_lo = gtkextra-win32res.lo : gtkextra-win32.rc $(LT_COMPILE_RESOURCE) gtkextra-win32.rc gtkextra-win32res.lo install-libtool-import-lib: $(INSTALL) .libs/libgtkextra-win32-3.0.dll.a $(DESTDIR)$(libdir) uninstall-libtool-import-lib: -rm $(DESTDIR)$(libdir)/libgtkextra-win32-3.0.dll.a install-exec-local: install-libtool-import-lib else install-libtool-import-lib: uninstall-libtool-import-lib: endif if MS_LIB_AVAILABLE noinst_DATA = gtkextra-win32-3.0.lib gtkextra-win32-3.0.lib: libgtkextra-win32-3.0.la gtkextra.def lib -name:libgtkextra-win32-3.0-@LT_CURRENT_MINUS_AGE@.dll -def:gtkextra.def -out:$@ install-ms-lib: $(INSTALL) gtkextra-win32-3.0.lib $(DESTDIR)$(libdir) uninstall-ms-lib: -rm $(DESTDIR)$(libdir)/gtkextra-win32-3.0.lib else install-ms-lib: uninstall-ms-lib: endif # libtool stuff: set version and export symbols for resolving # since automake doesn't support conditionalized libsomething_la_LDFLAGS # we use the general approach here libgtkextraincludedir = $(includedir)/gtkextra-3.0/gtkextra AM_LDFLAGS = \ -version-info $(LIBGTKEXTRA_SO_VERSION) \ -export-dynamic \ -rpath $(libdir) \ $(no_undefined) \ $(GTK_LIBS) # # setup source file variables # gtkextra_public_h_sources = \ gtkbordercombo.h \ gtkcharsel.h \ gtkcheckitem.h \ gtkcolorcombo.h \ gtkcombobutton.h \ gtkdataentry.h \ gtkdataformat.h \ gtkdatatextview.h \ gtkdirtree.h \ gtkextra.h \ gtkextraicons.h \ gtkfileicons.h \ gtkfilelist.h \ gtkfontcombo.h \ gtkiconfilesel.h \ gtkiconlist.h \ gtkitementry.h \ gtkplot.h \ gtkplot3d.h \ gtkplotarray.h \ gtkplotbar.h \ gtkplotbox.h \ gtkplotbubble.h \ gtkplotcairo.h \ gtkplotcandle.h \ gtkplotcanvas.h \ gtkplotcanvasellipse.h \ gtkplotcanvasline.h \ gtkplotcanvaspixmap.h \ gtkplotcanvasplot.h \ gtkplotcanvasrectangle.h \ gtkplotcanvastext.h \ gtkplotcsurface.h \ gtkplotdata.h \ gtkplotdt.h \ gtkplotflux.h \ gtkplotgdk.h \ gtkplotpc.h \ gtkplotpixmap.h \ gtkplotpolar.h \ gtkplotprint.h \ gtkplotps.h \ gtkplotsegment.h \ gtkplotsurface.h \ gtkpsfont.h \ gtksheet.h \ gtksheetcolumn.h \ gtktogglecombo.h gtkextra_c_sources = \ gtkbordercombo.c \ gtkcharsel.c \ gtkcheckitem.c \ gtkcolorcombo.c \ gtkcombobutton.c \ gtkdataentry.c \ gtkdataformat.c \ gtkdatatextview.c \ gtkdirtree.c \ gtkextra.c \ gtkfilelist.c \ gtkfontcombo.c \ gtkiconfilesel.c \ gtkiconlist.c \ gtkitementry.c \ gtkplot.c \ gtkplot3d.c \ gtkplotarray.c \ gtkplotbar.c \ gtkplotbox.c \ gtkplotbubble.c \ gtkplotcairo.c \ gtkplotcandle.c \ gtkplotcanvas.c \ gtkplotcanvasellipse.c \ gtkplotcanvasline.c \ gtkplotcanvaspixmap.c \ gtkplotcanvasplot.c \ gtkplotcanvasrectangle.c \ gtkplotcanvastext.c \ gtkplotcsurface.c \ gtkplotdata.c \ gtkplotdt.c \ gtkplotflux.c \ gtkplotgdk.c \ gtkplotpc.c \ gtkplotpixmap.c \ gtkplotpolar.c \ gtkplotprint.c \ gtkplotps.c \ gtkplotsegment.c \ gtkplotsurface.c \ gtkpsfont.c \ gtksheet.c \ gtksheetcolumn.c \ gtktogglecombo.c gtkextra_private_h_sources = \ gtkextra-compat.h \ icons.h \ pixmaps.h gtkextra_built_public_sources = \ gtkextra-marshal.h \ gtkextratypebuiltins.h gtkextra_built_sources = \ gtkextra-marshal.c \ gtkextratypebuiltins.c \ ${gtkextra_built_public_sources} gtkextra_extra_sources = \ gtkextrafeatures.h.in \ gtkextra-marshal.list AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(GTK_CFLAGS) # target platform: lib_LTLIBRARIES = $(gtkextratargetlib) gtkextraincludedir = $(includedir)/gtkextra-3.0/gtkextra gtkextrainclude_HEADERS = $(gtkextra_public_h_sources) nodist_gtkextrainclude_HEADERS = $(gtkextra_built_public_sources) gtkextrafeatures.h libgtkextra_x11_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_x11_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_linux_fb_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_linux_fb_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_win32_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_win32_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_quartz_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_quartz_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_win32_3_0_la_LIBADD = $(gtkextra_win32res_lo) libgtkextra_win32_3_0_la_DEPENDENCIES = $(gtkextra_def) $(gtkextra_win32res_lo) if USE_WIN32 libgtkextra_target_ldflags = $(gtkextra_win32_symbols) -lwsock32 endif EXTRA_LTLIBRARIES = libgtkextra-x11-3.0.la libgtkextra-linux-fb-3.0.la libgtkextra-win32-3.0.la libgtkextra-quartz-3.0.la MAINTAINERCLEANFILES = $(gtkextra_built_sources) CLEANFILES = $(gtkextra_built_sources) EXTRA_DIST = $(gtkextra_private_h_sources) $(gtkextra_extra_sources) #EXTRA_DIST += $(gtkextra_built_sources) EXTRA_DIST += gtkextra.def sat.xpm sg_small.xpm cloud.xpm suncloud.xpm testgtkplotdt.in $(libgtkextra_x11_3_0_la_OBJECTS) $(libgtkextra_linux_fb_3_0_la_OBJECTS) $(libgtkextra_win32_3_0_la_OBJECTS) $(libgtkextra_quartz_3_0_la_OBJECTS): ${gtkextra_built_public_sources} ${gtkextra_built_private_headers} gtkextra-marshal.h: $(builddir)/gtkextra-marshal.list ( @GLIB_GENMARSHAL@ --prefix=gtkextra $(srcdir)/gtkextra-marshal.list --header > gtkextra-marshal.tmp \ && mv gtkextra-marshal.tmp gtkextra-marshal.h ) \ || ( rm -f gtkextra-marshal.tmp && exit 1 ) gtkextra-marshal.c: $(builddir)/gtkextra-marshal.h ( @GLIB_GENMARSHAL@ --prefix=gtkextra $(srcdir)/gtkextra-marshal.list --body > gtkextra-marshal.tmp \ && mv gtkextra-marshal.tmp gtkextra-marshal.c ) \ || ( rm -f gtkextra-marshal.tmp && exit 1 ) gtkextratypebuiltins.h: $(gtkextra_public_h_sources) ( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef __GTKEXTRA_TYPE_BUILTINS_H__\n#define __GTKEXTRA_TYPE_BUILTINS_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __GTKEXTRA_TYPE_BUILTINS_H__ */" \ $(gtkextra_public_h_sources) ) > $(builddir)/gtkextratypebuiltins.h gtkextratypebuiltins.c: $(gtkextra_public_h_sources) ( cd $(srcdir) && glib-mkenums \ --fhead "#define GTKEXTRA_ENABLE_BROKEN\n#include \"gtkextra.h\"" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ $(gtkextra_public_h_sources) ) > $(builddir)/gtkextratypebuiltins.c # test programs, not to be installed if ENABLE_TESTS noinst_PROGRAMS = testgtksheet testgtkiconlist testgtkfilesel testgtkplot testgtkfont testgtkplotcanvas testrealtime testiterator testpolar testgtkplot3d testcontour testbubbles testflux testboxes testcandles testimage testpixmap testcharsel testdt testgtkplotdt testsegment testprintexport endif DEPS = $(gtkextratargetlib) LDADDS = $(gtkextratargetlib) $(GTK_LIBS) testprintexport_DEPENDENCIES = $(DEPS) testgtksheet_DEPENDENCIES = $(DEPS) testgtkplot_DEPENDENCIES = $(DEPS) testdt_DEPENDENCIES = $(DEPS) testgtkplotdt_DEPENDENCIES = $(DEPS) testpolar_DEPENDENCIES = $(DEPS) testgtkplot3d_DEPENDENCIES = $(DEPS) testcontour_DEPENDENCIES = $(DEPS) testrealtime_DEPENDENCIES = $(DEPS) testgtkfilesel_DEPENDENCIES = $(DEPS) testgtkiconlist_DEPENDENCIES = $(DEPS) testgtkfont_DEPENDENCIES = $(DEPS) testbubbles_DEPENDENCIES = $(DEPS) testflux_DEPENDENCIES = $(DEPS) testboxes_DEPENDENCIES = $(DEPS) testcandles_DEPENDENCIES = $(DEPS) testpixmap_DEPENDENCIES = $(DEPS) testimage_DEPENDENCIES = $(DEPS) testcharsel_DEPENDENCIES = $(DEPS) testiterator_DEPENDENCIES = $(DEPS) testsegment_DEPENDENCIES = $(DEPS) testgtkplotcanvas_DEPENDENCIES = $(DEPS) testgtksheet_LDADD = $(LDADDS) testgtkplot_LDADD = $(LDADDS) testdt_LDADD = $(LDADDS) testgtkplotdt_LDADD = $(LDADDS) testimage_LDADD = $(LDADDS) testcharsel_LDADD = $(LDADDS) testpixmap_LDADD = $(LDADDS) testpolar_LDADD = $(LDADDS) testgtkplot3d_LDADD = $(LDADDS) testcontour_LDADD = $(LDADDS) testrealtime_LDADD = $(LDADDS) testgtkfilesel_LDADD = $(LDADDS) testgtkiconlist_LDADD = $(LDADDS) testgtkfont_LDADD = $(LDADDS) testbubbles_LDADD = $(LDADDS) testflux_LDADD = $(LDADDS) testboxes_LDADD = $(LDADDS) testcandles_LDADD = $(LDADDS) testiterator_LDADD = $(LDADDS) testsegment_LDADD = $(LDADDS) testgtkplotcanvas_LDADD = $(LDADDS) testprintexport_LDADD = $(LDADDS) # gobject-introspection (begin) if ENABLE_INTROSPECTION -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = GtkExtra-3.0.gir INTROSPECTION_SCANNER_ARGS = --accept-unprefixed --identifier-prefix="Gtk" --symbol-prefix="gtk" --warn-all --add-include-path=$(srcdir) INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) introspection_sources = $(gtkextra_c_sources) $(gtkextra_public_h_sources) GtkExtra-3.0.gir: $(gtkextratargetlib) GtkExtra_3_0_gir_NAMESPACE = GtkExtra GtkExtra_3_0_gir_VERSION = $(GTK_EXTRA_VERSION) GtkExtra_3_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gtk-2.0 GtkExtra_3_0_gir_CFLAGS = $(AM_CPPFLAGS) GtkExtra_3_0_gir_LIBS = $(gtkextratargetlib) GtkExtra_3_0_gir_FILES = $(introspection_sources) girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(gir_DATA) # $(typelib_DATA) endif # gobject-introspection (end) files: @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ echo $$p; \ done #test: testgtksheet testgtkiconlist testgtkfilesel testgtkplot testgtkfont testrealtime testpolar testgtkplot3d testcontour testbubbles testflux testboxes testcandles testimage testpixmap testcharsel testdt testgtkplotdt testiterator # builddir=`pwd`; cd $(top_builddir); top_builddir=`pwd`; export HAVE_PROGRESSBAR=1; \ # cd $$builddir; cd $(srcdir); \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtksheet; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkplot; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkpolar; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkplot3d; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkbubble; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkflux; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testcontour; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkiconlist; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkfilesel; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkfont; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testrealtime; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testiterator; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testimage; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testcandles; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testpixmap; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testcharsel; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testdt \ # $$builddir/testgtkplotdt.in > $$builddir/testgtkplotdt.out; echo clean-local: rm -rf gtkextrafeatures.h gtkextra-3.2.0/gtkextra/gtksheet.c0000644000076400001440000145357312603754176014136 00000000000000/* GtkSheet widget for Gtk+. * Copyright (C) 1999-2001 Adrian E. Feiguin * * Based on GtkClist widget by Jay Painter, but major changes. * Memory allocation routines inspired on SC (Spreadsheet Calculator) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtksheet * @short_description: A spreadsheet widget for Gtk+ * * #GtkSheet is a matrix widget for GTK+. It consists of an scrollable grid of * cells where you can put text or other #GtkWidget's in. Cells * are organized in rows (#GtkSheetRow) and columns * (#GtkSheetColumn). Cell contents can be edited interactively * through a specially designed entry (#GtkItemEntry). A * #GtkSheet is also a container subclass, allowing you to * display buttons, curves, pixmaps and any other widget in it. * You can also set many attributes as: border, foreground and * background color, text justification, and more. The * testgtksheet program shows how easy is to create a * spreadsheet-like GUI using this widget set. */ #include #include #include #include #include #include #include #include #include #include #define __GTKEXTRA_H_INSIDE__ #include "gtkextra-compat.h" #include "gtkitementry.h" #include "gtkdatatextview.h" #include "gtksheet.h" #include "gtkdataformat.h" #include "gtkextra-marshal.h" #include "gtkextratypebuiltins.h" #undef GTK_SHEET_DEBUG #ifdef DEBUG # undef GTK_SHEET_DEBUG #define GTK_SHEET_DEBUG 0 /* define to activate debug output */ #endif #ifdef GTK_SHEET_DEBUG # define GTK_SHEET_DEBUG_ADJUSTMENT 0 # define GTK_SHEET_DEBUG_ALLOCATION 0 # define GTK_SHEET_DEBUG_BUILDER 0 # define GTK_SHEET_DEBUG_CELL_ACTIVATION 0 # define GTK_SHEET_DEBUG_CHILDREN 0 # define GTK_SHEET_DEBUG_CLICK 0 # define GTK_SHEET_DEBUG_COLORS 0 # define GTK_SHEET_DEBUG_DRAW 0 # define GTK_SHEET_DEBUG_DRAW_BACKGROUND 0 # define GTK_SHEET_DEBUG_DRAW_BUTTON 0 # define GTK_SHEET_DEBUG_DRAW_LABEL 0 # define GTK_SHEET_DEBUG_ENTER_PRESSED 0 # define GTK_SHEET_DEBUG_ENTRY 0 # define GTK_SHEET_DEBUG_EXPOSE 0 # define GTK_SHEET_DEBUG_FINALIZE 0 # define GTK_SHEET_DEBUG_FONT_METRICS 0 # define GTK_SHEET_DEBUG_FREEZE 0 # define GTK_SHEET_DEBUG_KEYPRESS 0 # define GTK_SHEET_DEBUG_MOUSE 0 # define GTK_SHEET_DEBUG_MOVE 0 # define GTK_SHEET_DEBUG_MOTION 0 # define GTK_SHEET_DEBUG_PIXEL_INFO 0 # define GTK_SHEET_DEBUG_PROPERTIES 0 # define GTK_SHEET_DEBUG_REALIZE 0 # define GTK_SHEET_DEBUG_SELECTION 0 # define GTK_SHEET_DEBUG_SIGNALS 0 # define GTK_SHEET_DEBUG_SIZE 0 # define GTK_SHEET_DEBUG_SET_CELL_TIMER 0 # define GTK_SHEET_DEBUG_SET_CELL_TEXT 0 #endif #define GTK_SHEET_MOD_MASK GDK_MOD1_MASK /* main modifier for sheet navigation */ #ifndef GDK_KEY_KP_Up # define GDK_KEY_KP_Up GDK_KP_Up # define GDK_KEY_KP_Down GDK_KP_Down # define GDK_KEY_KP_Page_Up GDK_KP_Page_Up # define GDK_KEY_KP_Page_Down GDK_KP_Page_Down # define GDK_KEY_KP_Page_Left GDK_KP_Page_Left # define GDK_KEY_KP_Page_Right GDK_KP_Page_Right # define GDK_KEY_KP_Home GDK_KP_Home # define GDK_KEY_KP_End GDK_KP_End # define GDK_KEY_KP_Left GDK_KP_Left # define GDK_KEY_KP_Right GDK_KP_Right # define GDK_KEY_KP_Enter GDK_KP_Enter #endif #if !GTK_CHECK_VERSION(2,22,0) static GdkCursorType gdk_cursor_get_cursor_type (GdkCursor *cursor) { g_return_val_if_fail (cursor != NULL, GDK_BLANK_CURSOR); return cursor->type; } #endif /* sheet flags */ enum _GtkSheetFlags { GTK_SHEET_IS_LOCKED = 1 << 0, /* sheet is not editable */ GTK_SHEET_IS_FROZEN = 1 << 1, /* frontend updates temporarily disabled */ GTK_SHEET_IN_XDRAG = 1 << 2, /* column being resized */ GTK_SHEET_IN_YDRAG = 1 << 3, /* row being resized */ GTK_SHEET_IN_DRAG = 1 << 4, /* cell selection being moved */ GTK_SHEET_IN_SELECTION = 1 << 5, /* cell selection being created */ GTK_SHEET_IN_RESIZE = 1 << 6, /* cell selection being resized */ GTK_SHEET_IN_CLIP = 1 << 7, /* cell selection in clipboard */ GTK_SHEET_IN_REDRAW_PENDING = 1 << 8, /* redraw on deactivate */ GTK_SHEET_IN_AUTORESIZE_PENDING = 1 << 9, /* autoresize pending */ GTK_SHEET_IS_DESTROYED = 1 << 10, /* set by destruct handler */ }; enum _GtkSheetProperties { PROP_GTK_SHEET_0, /* dummy */ PROP_GTK_SHEET_TITLE, /* gtk_sheet_set_title() */ PROP_GTK_SHEET_DESCRIPTION, /* gtk_sheet_set_description() */ PROP_GTK_SHEET_NCOLS, /* number of colunms - necessary for glade object creation */ PROP_GTK_SHEET_NROWS, /* number of rows - necessary for glade object creation */ PROP_GTK_SHEET_LOCKED, /* gtk_sheet_set_locked() */ PROP_GTK_SHEET_SELECTION_MODE, /* gtk_sheet_set_selection_mode() */ PROP_GTK_SHEET_AUTO_RESIZE, /* gtk_sheet_set_autoresize() */ PROP_GTK_SHEET_AUTO_RESIZE_ROWS, /* gtk_sheet_set_autoresize_rows() */ PROP_GTK_SHEET_AUTO_RESIZE_COLUMNS, /* gtk_sheet_set_autoresize_columns() */ PROP_GTK_SHEET_AUTO_SCROLL, /* gtk_sheet_set_autoscroll() */ PROP_GTK_SHEET_CLIP_TEXT, /* gtk_sheet_set_clip_text() */ PROP_GTK_SHEET_JUSTIFY_ENTRY, /* gtk_sheet_set_justify_entry() */ PROP_GTK_SHEET_BG_COLOR, /* gtk_sheet_set_background() */ PROP_GTK_SHEET_GRID_VISIBLE, /* gtk_sheet_show_grid() */ PROP_GTK_SHEET_GRID_COLOR, /* gtk_sheet_set_grid() */ PROP_GTK_SHEET_COLUMN_TITLES_VISIBLE, /* gtk_sheet_show_column_titles() */ PROP_GTK_SHEET_COLUMNS_RESIZABLE, /* gtk_sheet_columns_set_resizable() */ PROP_GTK_SHEET_COLUMN_TITLES_HEIGHT, /* gtk_sheet_set_column_titles_height() */ PROP_GTK_SHEET_ROW_TITLES_VISIBLE, /* gtk_sheet_show_row_titles() */ PROP_GTK_SHEET_ROWS_RESIZABLE, /* gtk_sheet_rows_set_resizable() */ PROP_GTK_SHEET_ROW_TITLES_WIDTH, /* gtk_sheet_set_row_titles_width() */ PROP_GTK_SHEET_ENTRY_TYPE, /* gtk_sheet_change_entry() */ PROP_GTK_SHEET_VJUST, /* gtk_sheet_set_vjustification() */ }; /* Signals */ enum _GtkSheetSignals { SELECT_ROW, SELECT_COLUMN, SELECT_RANGE, CLIP_RANGE, RESIZE_RANGE, MOVE_RANGE, TRAVERSE, DEACTIVATE, ACTIVATE, SET_CELL, CLEAR_CELL, CHANGED, NEW_COL_WIDTH, NEW_ROW_HEIGHT, ENTRY_FOCUS_IN, ENTRY_FOCUS_OUT, ENTRY_POPULATE_POPUP, MOVE_CURSOR, ENTER_PRESSED, LAST_SIGNAL }; static guint sheet_signals[LAST_SIGNAL] = { 0 }; typedef enum _GtkSheetArea { ON_SHEET_BUTTON_AREA, ON_ROW_TITLES_AREA, ON_COLUMN_TITLES_AREA, ON_CELL_AREA } GtkSheetArea; #define GTK_SHEET_FLAGS(sheet) (GTK_SHEET (sheet)->flags) #define GTK_SHEET_SET_FLAGS(sheet,flag) (GTK_SHEET_FLAGS (sheet) |= (flag)) #define GTK_SHEET_UNSET_FLAGS(sheet,flag) (GTK_SHEET_FLAGS (sheet) &= ~(flag)) #define GTK_SHEET_IS_FROZEN(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IS_FROZEN) #define GTK_SHEET_IN_XDRAG(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IN_XDRAG) #define GTK_SHEET_IN_YDRAG(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IN_YDRAG) #define GTK_SHEET_IN_DRAG(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IN_DRAG) #define GTK_SHEET_IN_SELECTION(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IN_SELECTION) #define GTK_SHEET_IN_RESIZE(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IN_RESIZE) #define GTK_SHEET_IN_CLIP(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IN_CLIP) #define GTK_SHEET_REDRAW_PENDING(sheet) (GTK_SHEET_FLAGS (sheet) & GTK_SHEET_IN_REDRAW_PENDING) /* data access macros - no frontend update! */ #define COLPTR(sheet, colidx) (sheet->column[colidx]) #define ROWPTR(sheet, rowidx) (&sheet->row[rowidx]) #define GTK_SHEET_ROW_IS_VISIBLE(rowptr) ((rowptr)->is_visible) #define GTK_SHEET_ROW_SET_VISIBLE(rowptr, value) ((rowptr)->is_visible = (value)) #define GTK_SHEET_ROW_IS_SENSITIVE(rowptr) ((rowptr)->is_sensitive) #define GTK_SHEET_ROW_SET_SENSITIVE(rowptr, value) ((rowptr)->is_sensitive = (value)) #define GTK_SHEET_ROW_CAN_FOCUS(rowptr) GTK_SHEET_ROW_IS_SENSITIVE(rowptr) #define MIN_VIEW_ROW(sheet) (sheet->view.row0) #define MAX_VIEW_ROW(sheet) (sheet->view.rowi) /* beware: MAX_VISIBLE_ROW() can be maxrow+1 */ #define MIN_VIEW_COLUMN(sheet) (sheet->view.col0) #define MAX_VIEW_COLUMN(sheet) (sheet->view.coli) /* beware: MAX_VISIBLE_COLUMN() can be maxcol+1 */ #define COLUMN_UNREALIZED_MAX_WIDTH 512 /* unrealized maximum width */ #define COLUMN_REMNANT_PIXELS 32 /* maximized: free space left for others */ #define ROW_UNREALIZED_MAX_HEIGHT 128 /* unrealized maximum height */ #define ROW_REMNANT_PIXELS 32 /* maximized: free space left for others */ #define COLUMN_MAX_WIDTH(sheet) \ (sheet->sheet_window_width < COLUMN_REMNANT_PIXELS ? \ COLUMN_UNREALIZED_MAX_WIDTH : \ sheet->sheet_window_width - COLUMN_REMNANT_PIXELS ) #if 0 # define ROW_MAX_HEIGHT(sheet) \ (sheet->sheet_window_height < ROW_REMNANT_PIXELS ? \ ROW_UNREALIZED_MAX_HEIGHT : \ sheet->sheet_window_height - ROW_REMNANT_PIXELS ) #else # define ROW_MAX_HEIGHT(sheet) \ (sheet->sheet_window_height < ROW_REMNANT_PIXELS ? \ ROW_UNREALIZED_MAX_HEIGHT : \ sheet->sheet_window_height * 1/3 ) #endif #define CELL_EXTENT_WIDTH(text_width, attr_border_width) \ (text_width + attr_border_width) #define CELL_EXTENT_HEIGHT(text_height, attr_border_height) \ (text_height + attr_border_height) #define COLUMN_EXTENT_TO_WIDTH(extent_width) \ (extent_width + 2*CELLOFFSET > COLUMN_MAX_WIDTH(sheet) ? \ COLUMN_MAX_WIDTH(sheet) : \ extent_width + 2*CELLOFFSET) #define ROW_EXTENT_TO_HEIGHT(extent_height) \ (extent_height + 2*CELLOFFSET > ROW_MAX_HEIGHT(sheet) ? \ ROW_MAX_HEIGHT(sheet) : \ extent_height + 2*CELLOFFSET) /* GtkSheetRange macros */ #define _RECT_IN_RANGE(row_0, row_i, col_0, col_i, range) \ ((range)->row0 <= (row_0) && (row_i) <= (range)->rowi \ && (range)->col0 <= (col_0) && (col_i) <= (range)->coli) #define _POINT_IN_RANGE(row, col, range) \ _RECT_IN_RANGE(row, row, col, col, range) #define _RECT_EQ_RANGE(row_0, row_i, col_0, col_i, range) \ ((row_0) == (range)->row0 && (row_i) == (range)->rowi \ && (col_0) == (range)->col0 && (col_i) == (range)->coli) #define _RECT_NEQ_RANGE(row_0, row_i, col_0, col_i, range) \ ((row_0) != (range)->row0 || (row_i) != (range)->rowi \ || (col_0) != (range)->col0 || (col_i) != (range)->coli) #define _RANGE_EQ_RANGE(range1, range2) \ ((range1)->row0 == (range2)->row0 && (range1)->rowi == (range2)->rowi \ && (range1)->col0 == (range2)->col0 && (range1)->coli == (range2)->coli) #define _RANGE_NEQ_RANGE(range1, range2) \ ((range1)->row0) != (range2)->row0 || (range1)->rowi != (range2)->rowi \ || (range1)->col0 != (range2)->col0 || (range1)->coli != (range2)->coli) /* defaults */ #define CELL_SPACING 1 #define DRAG_WIDTH 6 #define TIMEOUT_SCROLL 20 #define TIMEOUT_FLASH 200 #define TIME_INTERVAL 8 #define MINROWS 0 #define MINCOLS 0 #define MAXLENGTH 30 #define CELLOFFSET 4 #define GTK_SHEET_ROW_DEFAULT_HEIGHT 24 #define GTK_SHEET_DEFAULT_FONT_ASCENT 12 #define GTK_SHEET_DEFAULT_FONT_DESCENT 12 #define GTK_SHEET_DEFAULT_BG_COLOR "lightgray" #define GTK_SHEET_DEFAULT_GRID_COLOR "gray" #define GTK_SHEET_DEFAULT_TM_COLOR "red" /* tooltip marker */ #define GTK_SHEET_DEFAULT_TM_SIZE 4 /* pixels, size of tooltip marker */ #define GTK_SHEET_PAGE_OVERLAP 1 /* rows to stay visible with PageUp/Dn */ #ifdef GTK_SHEET_DEBUG # define GTK_SHEET_DEBUG_COLOR "green" static GdkColor debug_color; # if 0 # include static void g_debug_popup(char *fmt, ...) /* used to intercept/debug drawing sequences */ { va_list ap; va_start(ap, fmt); GtkWidget *dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, fmt, ap); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } # endif #endif /** * _gtk_sheet_row_default_height: * @widget: a #GtkWidget * * Returns: row height in pixels * * calculate row height from font or return default row height * when there is no font associated */ guint _gtk_sheet_row_default_height(GtkWidget *widget) { PangoFontDescription *font_desc = gtk_widget_get_style(GTK_WIDGET(widget))->font_desc; if (!font_desc) return (GTK_SHEET_ROW_DEFAULT_HEIGHT); PangoContext *context = gtk_widget_get_pango_context(widget); PangoFontMetrics *metrics = pango_context_get_metrics(context, font_desc, pango_context_get_language(context)); guint val = pango_font_metrics_get_descent(metrics) + pango_font_metrics_get_ascent(metrics); pango_font_metrics_unref(metrics); return (PANGO_PIXELS(val) + 2 * CELLOFFSET); } static inline guint _default_font_ascent(GtkWidget *widget) { PangoFontDescription *font_desc = gtk_widget_get_style(GTK_WIDGET(widget))->font_desc; if (!font_desc) return (GTK_SHEET_DEFAULT_FONT_ASCENT); PangoContext *context = gtk_widget_get_pango_context(widget); PangoFontMetrics *metrics = pango_context_get_metrics(context, font_desc, pango_context_get_language(context)); guint val = pango_font_metrics_get_ascent(metrics); pango_font_metrics_unref(metrics); return (PANGO_PIXELS(val)); } static void _get_string_extent(GtkSheet *sheet, GtkSheetColumn *colptr, PangoFontDescription *font_desc, const gchar *text, guint *width, guint *height) { PangoRectangle extent; PangoLayout *layout; layout = gtk_widget_create_pango_layout(GTK_WIDGET(sheet), text); pango_layout_set_font_description(layout, font_desc); if (colptr && !gtk_sheet_autoresize_columns(sheet)) { switch(colptr->wrap_mode) { case GTK_WRAP_NONE: break; case GTK_WRAP_CHAR: pango_layout_set_width(layout, colptr->width * PANGO_SCALE); pango_layout_set_wrap(layout, PANGO_WRAP_CHAR); break; case GTK_WRAP_WORD: pango_layout_set_width(layout, colptr->width * PANGO_SCALE); pango_layout_set_wrap(layout, PANGO_WRAP_WORD); break; case GTK_WRAP_WORD_CHAR: pango_layout_set_width(layout, colptr->width * PANGO_SCALE); pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); break; } } pango_layout_get_pixel_extents(layout, NULL, &extent); #if GTK_SHEET_DEBUG_FONT_METRICS > 0 { PangoContext *context = gtk_widget_get_pango_context(GTK_WIDGET(sheet)); PangoFontMetrics *metrics = pango_context_get_metrics( context, font_desc, pango_context_get_language(context)); gint ascent = pango_font_metrics_get_ascent(metrics) / PANGO_SCALE; gint descent = pango_font_metrics_get_descent(metrics) / PANGO_SCALE; gint spacing = pango_layout_get_spacing(layout) / PANGO_SCALE; pango_font_metrics_unref(metrics); g_debug("_get_string_extent(%s): ext (%d, %d, %d, %d) asc %d desc %d spac %d", text, extent.x, extent.y, extent.width, extent.height, ascent, descent, spacing); } #endif g_object_unref(G_OBJECT(layout)); if (width) *width = extent.width; if (height) *height = extent.height; } static inline guint _default_font_descent(GtkWidget *widget) { PangoFontDescription *font_desc = gtk_widget_get_style(GTK_WIDGET(widget))->font_desc; if (!font_desc) return (GTK_SHEET_DEFAULT_FONT_DESCENT); PangoContext *context = gtk_widget_get_pango_context(widget); PangoFontMetrics *metrics = pango_context_get_metrics(context, font_desc, pango_context_get_language(context)); guint val = pango_font_metrics_get_descent(metrics); pango_font_metrics_unref(metrics); return (PANGO_PIXELS(val)); } /* gives the top/bottom pixel of the given row in context of the sheet's voffset */ static inline gint _gtk_sheet_row_top_ypixel(GtkSheet *sheet, gint row) { if (row < 0 || row > sheet->maxrow) return (sheet->voffset); return (sheet->voffset + sheet->row[row].top_ypixel); } static inline gint _gtk_sheet_row_bottom_ypixel(GtkSheet *sheet, gint row) { gint ypixel = _gtk_sheet_row_top_ypixel(sheet, row); if (0 <= row && row <= sheet->maxrow) ypixel += sheet->row[row].height; return (ypixel); } /** * _gtk_sheet_row_from_ypixel: * @sheet: the sheet * @y: the pixel * * get row from y pixel location. returns the row index * from a y pixel location (relative to the sheet window) * honoring the sheet's scrolling offset and title visibility. * * beware: the top border belongs to the row, the bottom border to the next * * Returns: row index, -1 or maxcol+1 (beyond right edge) */ static inline gint _gtk_sheet_row_from_ypixel(GtkSheet *sheet, gint y) { gint i, cy; cy = sheet->voffset; if (sheet->column_titles_visible) cy += sheet->column_title_area.height; if (y < cy) return (-1); /* top outside */ for (i = 0; i <= sheet->maxrow; i++) { if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) { if (cy <= y && y < (cy + sheet->row[i].height)) return (i); cy += sheet->row[i].height; } } /* no match */ return (sheet->maxrow + 1); } /** * _gtk_sheet_column_from_xpixel: * @sheet: the sheet * @x: the pixel * * get column from x pixel location. returns the column index * from a x pixel location (relative to the sheet window) * honoring the sheet's scrolling offset and title visibility. * * beware: the left border belongs to the column, the right border to the next * * Returns: column index, or maxcol+1 (beyond right edge) */ static inline gint _gtk_sheet_column_from_xpixel(GtkSheet *sheet, gint x) { gint i, cx; cx = sheet->hoffset; if (sheet->row_titles_visible) cx += sheet->row_title_area.width; if (x < cx) { return (-1); /* left outside */ } for (i = 0; i <= sheet->maxcol; i++) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) { if (cx <= x && x < (cx + COLPTR(sheet, i)->width)) return (i); cx += COLPTR(sheet, i)->width; } } /* no match */ return (sheet->maxcol + 1); } /** * _gtk_sheet_first_visible_colidx: * @sheet: the sheet * * find index of leftmost visible column >= startidx * * returns: column index or -1 */ static inline gint _gtk_sheet_first_visible_colidx(GtkSheet *sheet, gint startidx) { gint i; for (i = startidx; i <= sheet->maxcol; i++) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) return (i); } return (-1); } /** * _gtk_sheet_last_visible_colidx: * @sheet: the sheet * * find index of rightmost visible column <= startidx * * returns: column index or -1 */ static inline gint _gtk_sheet_last_visible_colidx(GtkSheet *sheet, gint startidx) { gint i; for (i = startidx; i >= 0; i--) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) return (i); } return (-1); } /** * _gtk_sheet_first_visible_rowidx: * @sheet: the sheet * * find index of topmost visible row >= startidx * * returns: row index or -1 */ static inline gint _gtk_sheet_first_visible_rowidx(GtkSheet *sheet, gint startidx) { gint i; for (i = startidx; i <= sheet->maxrow; i++) { if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) return (i); } return (-1); } /** * _gtk_sheet_last_visible_rowidx: * @sheet: the sheet * * find index of bottommost visible row <= startidx * * returns: row index or -1 */ static inline gint _gtk_sheet_last_visible_rowidx(GtkSheet *sheet, gint startidx) { gint i; for (i = startidx; i >= 0; i--) { if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) return (i); } return (-1); } /** * _gtk_sheet_get_visible_range: * @sheet: the sheet * @visr: pointer to store results * * return visible sheet area * [first visible row/col .. last visible row/col] * * returns: TRUE if any visible cells exist and range is valid */ static inline gboolean _gtk_sheet_get_visible_range(GtkSheet *sheet, GtkSheetRange *visr) { visr->row0 = visr->rowi = visr->col0 = visr->coli = -1; visr->row0 = _gtk_sheet_first_visible_rowidx(sheet, 0); if (visr->row0 < 0) return (FALSE); visr->rowi = _gtk_sheet_last_visible_rowidx(sheet, sheet->maxrow); if (visr->rowi < 0) return (FALSE); visr->col0 = _gtk_sheet_first_visible_colidx(sheet, 0); if (visr->col0 < 0) return (FALSE); visr->coli = _gtk_sheet_last_visible_colidx(sheet, sheet->maxcol); if (visr->coli < 0) return (FALSE); return (TRUE); } /** * _gtk_sheet_count_visible: * @sheet: the sheet * @range: the #GtkSheetRange to inspect * @nrows: number of visible rows in range (out) * @ncols: number of visible columns in range (out) * * count visible rows/cols in range */ static inline void _gtk_sheet_count_visible(GtkSheet *sheet, GtkSheetRange *range, gint *nrows, gint *ncols) { gint i; *nrows = *ncols = 0; for (i = range->row0; i <= range->rowi; i++) { if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) ++(*nrows); } for (i = range->col0; i <= range->coli; i++) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) ++(*ncols); } } /** * _gtk_sheet_height: * @sheet: the #GtkSheet * * returns the total height of the sheet * * returns: total height of all visible rows, including * col_titles area */ static inline gint _gtk_sheet_height(GtkSheet *sheet) { gint i, cx; cx = (sheet->column_titles_visible ? sheet->column_title_area.height : 0); for (i = 0; i <= sheet->maxrow; i++) { if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) cx += sheet->row[i].height; } return (cx); } /** * _gtk_sheet_width: * @sheet: the #GtkSheet * * total width of the sheet * * returns: total width of all visible columns, including * row_titles area */ static inline gint _gtk_sheet_width(GtkSheet *sheet) { gint i, cx; cx = (sheet->row_titles_visible ? sheet->row_title_area.width : 0); for (i = 0; i <= sheet->maxcol; i++) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) cx += COLPTR(sheet, i)->width; } return (cx); } /** * _gtk_sheet_recalc_view_range: * @sheet: the #GtkSheet * * recalculate visible sheet range */ void _gtk_sheet_recalc_view_range(GtkSheet *sheet) { sheet->view.row0 = _gtk_sheet_row_from_ypixel(sheet, sheet->column_titles_visible ? sheet->column_title_area.height : 0); sheet->view.rowi = _gtk_sheet_row_from_ypixel(sheet, sheet->sheet_window_height - 1); sheet->view.col0 = _gtk_sheet_column_from_xpixel(sheet, sheet->row_titles_visible ? sheet->row_title_area.width : 0); sheet->view.coli = _gtk_sheet_column_from_xpixel(sheet, sheet->sheet_window_width - 1); } /** * _gtk_sheet_range_fixup: * * @param sheet the #GtkSheet * @param range the range * * force range into bounds */ void _gtk_sheet_range_fixup(GtkSheet *sheet, GtkSheetRange *range) { if (range->row0 < 0) range->row0 = 0; if (range->rowi > sheet->maxrow) range->rowi = sheet->maxrow; if (range->col0 < 0) range->col0 = 0; if (range->coli > sheet->maxcol) range->coli = sheet->maxcol; } /* * POSSIBLE_XDRAG * * Drag grip test for column width dragging * * @param sheet * @param x * @param drag_column * * @return */ static inline gint POSSIBLE_XDRAG(GtkSheet *sheet, gint x, gint *drag_column) { gint column, xdrag; column = _gtk_sheet_column_from_xpixel(sheet, x); if (column < 0 || column > sheet->maxcol) return (FALSE); xdrag = _gtk_sheet_column_left_xpixel(sheet, column); if (column > 0 && x <= xdrag + DRAG_WIDTH / 2) /* you pick it at the left border */ { while (column > 0 && !GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, column - 1))) column--; --column; /* you really want to resize the column on the left side */ if (column < 0 || column > sheet->maxcol) return (FALSE); *drag_column = column; return (TRUE); #if 0 return(GTK_SHEET_COLUMN_IS_SENSITIVE(COLPTR(sheet, column))); #endif } xdrag = _gtk_sheet_column_right_xpixel(sheet, column); if (xdrag - DRAG_WIDTH / 2 <= x && x <= xdrag + DRAG_WIDTH / 2) { *drag_column = column; return (TRUE); #if 0 return(GTK_SHEET_COLUMN_IS_SENSITIVE(COLPTR(sheet, column))); #endif } return (FALSE); } /* * POSSIBLE_YDRAG * * Drag grip test for row height dragging * * @param sheet * @param y * @param drag_row * * @return */ static inline gint POSSIBLE_YDRAG(GtkSheet *sheet, gint y, gint *drag_row) { gint row, ydrag; row = _gtk_sheet_row_from_ypixel(sheet, y); if (row < 0 || row > sheet->maxrow) return (FALSE); ydrag = _gtk_sheet_row_top_ypixel(sheet, row); if (row > 0 && y <= ydrag + DRAG_WIDTH / 2) /* you pick it at the top border */ { while (row > 0 && !GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row - 1))) row--; --row; /* you really want to resize the row above */ if (row < 0 || row > sheet->maxrow) return (FALSE); *drag_row = row; return (TRUE); #if 0 return(GTK_SHEET_ROW_IS_SENSITIVE(ROWPTR(sheet, row))); #endif } ydrag = _gtk_sheet_row_bottom_ypixel(sheet, row); if (ydrag - DRAG_WIDTH / 2 <= y && y <= ydrag + DRAG_WIDTH / 2) { *drag_row = row; return (TRUE); #if 0 return(GTK_SHEET_ROW_IS_SENSITIVE(ROWPTR(sheet, row))); #endif } return (FALSE); } /* * POSSIBLE_DRAG * * Dragging grip test for a cell range * * @param sheet * @param x * @param y * @param drag_row * @param drag_column * * @return */ static inline gint POSSIBLE_DRAG(GtkSheet *sheet, gint x, gint y, gint *drag_row, gint *drag_column) { gint ydrag, xdrag; *drag_column = _gtk_sheet_column_from_xpixel(sheet, x); *drag_row = _gtk_sheet_row_from_ypixel(sheet, y); /* drag grip at top/bottom border */ if (x >= _gtk_sheet_column_left_xpixel(sheet, sheet->range.col0) - DRAG_WIDTH / 2 && x <= _gtk_sheet_column_right_xpixel(sheet, sheet->range.coli) + DRAG_WIDTH / 2) { ydrag = _gtk_sheet_row_top_ypixel(sheet, sheet->range.row0); if (ydrag - DRAG_WIDTH / 2 <= y && y <= ydrag + DRAG_WIDTH / 2) { *drag_row = sheet->range.row0; return (TRUE); } ydrag = _gtk_sheet_row_bottom_ypixel(sheet, sheet->range.rowi); if (ydrag - DRAG_WIDTH / 2 <= y && y <= ydrag + DRAG_WIDTH / 2) { *drag_row = sheet->range.rowi; return (TRUE); } } /* drag grip at left/right border */ if (y >= _gtk_sheet_row_top_ypixel(sheet, sheet->range.row0) - DRAG_WIDTH / 2 && y <= _gtk_sheet_row_bottom_ypixel(sheet, sheet->range.rowi) + DRAG_WIDTH / 2) { xdrag = _gtk_sheet_column_left_xpixel(sheet, sheet->range.col0); if (xdrag - DRAG_WIDTH / 2 <= x && x <= xdrag + DRAG_WIDTH / 2) { *drag_column = sheet->range.col0; return (TRUE); } xdrag = _gtk_sheet_column_right_xpixel(sheet, sheet->range.coli); if (xdrag - DRAG_WIDTH / 2 <= x && x <= xdrag + DRAG_WIDTH / 2) { *drag_column = sheet->range.coli; return (TRUE); } } return (FALSE); } static inline gint POSSIBLE_RESIZE(GtkSheet *sheet, gint x, gint y, gint *drag_row, gint *drag_column) { gint xdrag, ydrag; xdrag = _gtk_sheet_column_right_xpixel(sheet, sheet->range.coli); ydrag = _gtk_sheet_row_bottom_ypixel(sheet, sheet->range.rowi); if (sheet->state == GTK_SHEET_COLUMN_SELECTED) ydrag = _gtk_sheet_row_top_ypixel(sheet, sheet->view.row0); if (sheet->state == GTK_SHEET_ROW_SELECTED) xdrag = _gtk_sheet_column_left_xpixel(sheet, sheet->view.col0); *drag_column = _gtk_sheet_column_from_xpixel(sheet, x); *drag_row = _gtk_sheet_row_from_ypixel(sheet, y); if (xdrag - DRAG_WIDTH / 2 <= x && x <= xdrag + DRAG_WIDTH / 2 && ydrag - DRAG_WIDTH / 2 <= y && y <= ydrag + DRAG_WIDTH / 2) { return (TRUE); } return (FALSE); } /* Prototypes (extern) */ extern void _gtkextra_signal_emit(GtkObject *object, guint signal_id, ...); /* Prototypes (static) */ static void gtk_sheet_class_init(GtkSheetClass *klass); static void gtk_sheet_init(GtkSheet *sheet); static void gtk_sheet_destroy_handler(GtkObject *object); static void gtk_sheet_finalize_handler(GObject *object); static void gtk_sheet_style_set_handler(GtkWidget *widget, GtkStyle *previous_style); static void gtk_sheet_realize_handler(GtkWidget *widget); static void gtk_sheet_unrealize_handler(GtkWidget *widget); static void gtk_sheet_map_handler(GtkWidget *widget); static void gtk_sheet_unmap_handler(GtkWidget *widget); static gboolean gtk_sheet_expose_handler(GtkWidget *widget, GdkEventExpose *event); static void gtk_sheet_forall_handler(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data); static void gtk_sheet_set_scroll_adjustments(GtkSheet *sheet, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); static gboolean gtk_sheet_button_press_handler(GtkWidget *widget, GdkEventButton *event); static gboolean gtk_sheet_button_release_handler(GtkWidget *widget, GdkEventButton *event); static gboolean gtk_sheet_motion_handler(GtkWidget *widget, GdkEventMotion *event); static gboolean gtk_sheet_entry_key_press_handler(GtkWidget *widget, GdkEventKey *key, gpointer user_data); static gboolean gtk_sheet_key_press_handler(GtkWidget *widget, GdkEventKey *key); static void gtk_sheet_size_request_handler(GtkWidget *widget, GtkRequisition *requisition); static void gtk_sheet_size_allocate_handler(GtkWidget *widget, GtkAllocation *allocation); static gboolean gtk_sheet_focus(GtkWidget *widget, GtkDirectionType direction); static void _gtk_sheet_move_cursor(GtkSheet *sheet, GtkMovementStep step, gint count, gboolean extend_selection); /* Sheet queries */ static gint gtk_sheet_range_isvisible(GtkSheet *sheet, GtkSheetRange range); static gint gtk_sheet_cell_isvisible(GtkSheet *sheet, gint row, gint column); /* Clipped Range */ static gint _gtk_sheet_scroll_to_pointer(gpointer data); static gint gtk_sheet_flash(gpointer data); /* Drawing Routines */ /* draw cell background and frame */ static void _cell_draw_background(GtkSheet *sheet, gint row, gint column); /* draw cell border */ static void _cell_draw_border(GtkSheet *sheet, gint row, gint column, gint mask); /* draw cell contents */ static void _cell_draw_label(GtkSheet *sheet, gint row, gint column); /* highlight the visible part of the selected range */ static void gtk_sheet_range_draw_selection(GtkSheet *sheet, GtkSheetRange range); /* Selection */ static gint _gtk_sheet_move_query(GtkSheet *sheet, gint row, gint column, gboolean need_focus); static void gtk_sheet_real_select_range(GtkSheet *sheet, GtkSheetRange *range); static void gtk_sheet_real_unselect_range(GtkSheet *sheet, GtkSheetRange *range); static void gtk_sheet_extend_selection(GtkSheet *sheet, gint row, gint column); static void gtk_sheet_new_selection(GtkSheet *sheet, GtkSheetRange *range); static void gtk_sheet_draw_border(GtkSheet *sheet, GtkSheetRange range); static void gtk_sheet_draw_corners(GtkSheet *sheet, GtkSheetRange range); /* Active Cell handling */ static void gtk_sheet_entry_changed_handler(GtkWidget *widget, gpointer data); static gboolean gtk_sheet_deactivate_cell(GtkSheet *sheet); static gboolean gtk_sheet_activate_cell(GtkSheet *sheet, gint row, gint col); static void gtk_sheet_draw_active_cell(GtkSheet *sheet); static void gtk_sheet_show_active_cell(GtkSheet *sheet); static void gtk_sheet_click_cell(GtkSheet *sheet, gint row, gint column, gboolean *veto); /* Backing Pixmap */ static void gtk_sheet_make_backing_pixmap(GtkSheet *sheet, guint width, guint height); static void gtk_sheet_draw_backing_pixmap(GtkSheet *sheet, GtkSheetRange range); /* Scrollbars */ static void _vadjustment_changed_handler(GtkAdjustment *adjustment, gpointer data); static void _hadjustment_changed_handler(GtkAdjustment *adjustment, gpointer data); static void _vadjustment_value_changed_handler(GtkAdjustment *adjustment, gpointer data); static void _hadjustment_value_changed_handler(GtkAdjustment *adjustment, gpointer data); static void draw_xor_vline(GtkSheet *sheet); static void draw_xor_hline(GtkSheet *sheet); static void draw_xor_rectangle(GtkSheet *sheet, GtkSheetRange range); static void gtk_sheet_draw_flashing_range(GtkSheet *sheet, GtkSheetRange range); static guint new_column_width(GtkSheet *sheet, gint column, gint *x); static guint new_row_height(GtkSheet *sheet, gint row, gint *y); /* Sheet Button */ static void create_global_button(GtkSheet *sheet); /* Sheet Entry */ static void create_sheet_entry(GtkSheet *sheet, GType new_entry_type); static void gtk_sheet_entry_set_max_size(GtkSheet *sheet); /* Sheet button gadgets */ static void size_allocate_row_title_buttons(GtkSheet *sheet); static void row_button_set(GtkSheet *sheet, gint row); static void row_button_release(GtkSheet *sheet, gint row); static void size_allocate_global_button(GtkSheet *sheet); /* Attributes routines */ static void gtk_sheet_set_cell_attributes(GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr attributes); static void init_attributes(GtkSheet *sheet, gint col, GtkSheetCellAttr *attributes); /* Memory allocation routines */ static void gtk_sheet_real_range_clear(GtkSheet *sheet, const GtkSheetRange *range, gboolean delete); static void gtk_sheet_real_cell_clear(GtkSheet *sheet, gint row, gint column, gboolean delete); static GtkSheetCell *gtk_sheet_cell_new(void); static void AddRows(GtkSheet *sheet, gint position, gint nrows); static void AddColumns(GtkSheet *sheet, gint position, gint ncols); static void InsertRow(GtkSheet *sheet, gint row, gint nrows); static void InsertColumn(GtkSheet *sheet, gint col, gint ncols); static void DeleteRow(GtkSheet *sheet, gint row, gint nrows); static void DeleteColumn(GtkSheet *sheet, gint col, gint ncols); static gint GrowSheet(GtkSheet *sheet, gint newrows, gint newcols); static void CheckBounds(GtkSheet *sheet, gint row, gint col); static void CheckCellData(GtkSheet *sheet, const gint row, const gint col); /* Container Functions */ static void gtk_sheet_remove_handler(GtkContainer *container, GtkWidget *widget); static void gtk_sheet_realize_child(GtkSheet *sheet, GtkSheetChild *child); static void gtk_sheet_position_child(GtkSheet *sheet, GtkSheetChild *child); static void gtk_sheet_position_children(GtkSheet *sheet); static void gtk_sheet_row_size_request(GtkSheet *sheet, gint row, guint *requisition); /* GtkBuildableIface */ /* * gtk_sheet_buildable_add_child_internal * * embed a foreign created #GtkSheetColumn into an existing #GtkSheet * Used by GtkBuilder and Glade. * * @param sheet The sheet where the column should be added * @param child The column to be added * @param name The #GtkWidget name of the column */ void gtk_sheet_buildable_add_child_internal(GtkSheet *sheet, GtkSheetColumn *child, const char *name) { int col; g_return_if_fail(GTK_IS_SHEET(sheet)); g_return_if_fail(GTK_IS_SHEET_COLUMN(child)); gtk_sheet_add_column(sheet, 1); col = gtk_sheet_get_columns_count(sheet) - 1; if (sheet->column[col]) { COLPTR(sheet, col)->sheet = NULL; g_object_unref(sheet->column[col]); sheet->column[col] = NULL; } child->sheet = sheet; sheet->column[col] = child; g_object_ref_sink(G_OBJECT(child)); #if GTK_SHEET_DEBUG_BUILDER > 0 g_debug("gtk_sheet_buildable_add_child_internal: %s, m %d r %d v %d", name ? name : "NULL", gtk_widget_get_mapped(GTK_WIDGET(child)), gtk_widget_get_realized(GTK_WIDGET(child)), gtk_widget_get_visible(GTK_WIDGET(child)) ); #endif /* we always set the parent in order to track into what sheet the column belongs, which leads to problems with invisible columns. When trying to set them visible, Gtk 2.24.5 terminates the application with ? Gtk - gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed see also the fix in gtk_sheet_column_set_visibility() */ gtk_widget_set_parent(GTK_WIDGET(child), GTK_WIDGET(sheet)); if (name) gtk_widget_set_name(GTK_WIDGET(child), name); _gtk_sheet_reset_text_column(sheet, col); _gtk_sheet_recalc_left_xpixels(sheet); } static void gtk_sheet_buildable_add_child( GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const gchar *type) { GtkSheet *sheet; GtkSheetColumn *newcol; const gchar *name = gtk_widget_get_name(GTK_WIDGET(child)); #if GTK_SHEET_DEBUG_BUILDER > 0 g_debug("gtk_sheet_buildable_add_child %p: %s type %s", child, name ? name : "NULL", type ? type : "NULL"); #endif sheet = GTK_SHEET(buildable); newcol = GTK_SHEET_COLUMN(child); #if GTK_SHEET_DEBUG_BUILDER > 0 { gchar *strval; g_object_get(G_OBJECT(newcol), "label", &strval, NULL); g_debug("gtk_sheet_buildable_add_child: label=%s", strval ? strval : "NULL"); g_free(strval); } #endif gtk_sheet_buildable_add_child_internal(sheet, newcol, name); } static void gtk_sheet_buildable_init(GtkBuildableIface *iface) { #if GTK_SHEET_DEBUG_BUILDER > 0 g_debug("gtk_sheet_buildable_init"); #endif iface->add_child = gtk_sheet_buildable_add_child; } static GtkSheetArea gtk_sheet_get_area_at(GtkSheet *sheet, gint x, gint y) { if (sheet->column_titles_visible && (y < sheet->column_title_area.height)) { if (sheet->row_titles_visible && (x < sheet->row_title_area.width)) return (ON_SHEET_BUTTON_AREA); return (ON_COLUMN_TITLES_AREA); } else { if (sheet->row_titles_visible && (x < sheet->row_title_area.width)) return (ON_ROW_TITLES_AREA); } return (ON_CELL_AREA); } /* * gtk_sheet_query_tooltip - tooltip handler * * Preference rule for the tooltip search is cell->row->column->sheet * * @param widget * @param x * @param y * @param keyboard_mode * @param tooltip * @param user_data * * @return TRUE or FALSE wether to show the tip or not */ static gboolean gtk_sheet_query_tooltip_handler(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data) { gchar *tip; GtkSheetArea area; gint row = -1, col = -1; GtkSheet *sheet = GTK_SHEET(widget); if (!sheet) return (FALSE); area = gtk_sheet_get_area_at(sheet, x, y); if (area == ON_CELL_AREA) { if (row < 0) row = _gtk_sheet_row_from_ypixel(sheet, y); if (col < 0) col = _gtk_sheet_column_from_xpixel(sheet, x); if ((0 <= row && row <= sheet->maxrow && 0 <= col && col <= sheet->maxcol) && (row <= sheet->maxallocrow && col <= sheet->maxalloccol) && (sheet->data[row] && sheet->data[row][col])) { GtkSheetCell *cell = sheet->data[row][col]; tip = cell->tooltip_markup; if (tip && tip[0]) { gtk_tooltip_set_markup(tooltip, tip); return (TRUE); } tip = cell->tooltip_text; if (tip && tip[0]) { gtk_tooltip_set_text(tooltip, tip); return (TRUE); } } area = ON_ROW_TITLES_AREA; /* fallback */ } if (area == ON_ROW_TITLES_AREA) { if (row < 0) row = _gtk_sheet_row_from_ypixel(sheet, y); if (0 <= row && row <= sheet->maxrow) { GtkSheetRow *rowp = ROWPTR(sheet, row); tip = rowp->tooltip_markup; if (tip && tip[0]) { gtk_tooltip_set_markup(tooltip, tip); return (TRUE); } tip = rowp->tooltip_text; if (tip && tip[0]) { gtk_tooltip_set_text(tooltip, tip); return (TRUE); } } area = ON_COLUMN_TITLES_AREA; /* fallback */ } if (area == ON_COLUMN_TITLES_AREA) { if (col < 0) col = _gtk_sheet_column_from_xpixel(sheet, x); if (0 <= col && col <= sheet->maxcol) { GtkSheetColumn *column = COLPTR(sheet, col); tip = gtk_widget_get_tooltip_markup(GTK_WIDGET(column)); if (tip && tip[0]) { gtk_tooltip_set_markup(tooltip, tip); g_free(tip); return (TRUE); } tip = gtk_widget_get_tooltip_text(GTK_WIDGET(column)); if (tip && tip[0]) { gtk_tooltip_set_text(tooltip, tip); g_free(tip); return (TRUE); } } } /* fallback to sheet tip */ tip = gtk_widget_get_tooltip_markup(widget); if (tip && tip[0]) { gtk_tooltip_set_markup(tooltip, tip); g_free(tip); return (TRUE); } tip = gtk_widget_get_tooltip_text(widget); if (tip && tip[0]) { gtk_tooltip_set_text(tooltip, tip); g_free(tip); return (TRUE); } return (FALSE); } /* Type initialisation */ static GtkContainerClass *sheet_parent_class = NULL; GType gtk_sheet_get_type(void) { static GType sheet_type = 0; if (!sheet_type) { static const GTypeInfo sheet_info = { sizeof(GtkSheetClass), NULL, NULL, (GClassInitFunc)gtk_sheet_class_init, NULL, NULL, sizeof(GtkSheet), 0, (GInstanceInitFunc)gtk_sheet_init, NULL, }; static const GInterfaceInfo interface_info = { (GInterfaceInitFunc)gtk_sheet_buildable_init, (GInterfaceFinalizeFunc)NULL, (gpointer)NULL }; sheet_type = g_type_register_static(gtk_container_get_type(), "GtkSheet", &sheet_info, 0); g_type_add_interface_static(sheet_type, GTK_TYPE_BUILDABLE, &interface_info); } return (sheet_type); } static GtkSheetRange * gtk_sheet_range_copy(const GtkSheetRange *range) { GtkSheetRange *new_range; g_return_val_if_fail(range != NULL, NULL); new_range = g_new(GtkSheetRange, 1); *new_range = *range; return (new_range); } static void gtk_sheet_range_free(GtkSheetRange *range) { g_return_if_fail(range != NULL); g_free(range); } GType gtk_sheet_range_get_type(void) { static GType sheet_range_type = 0; if (!sheet_range_type) { sheet_range_type = g_boxed_type_register_static("GtkSheetRange", (GBoxedCopyFunc)gtk_sheet_range_copy, (GBoxedFreeFunc)gtk_sheet_range_free); } return (sheet_range_type); } /** * _gtk_sheet_entry_type_from_gtype: * @entry_type: type to be mapped * * map gtype to #GtkSheetEntryType * * Returns: #GtkSheetEntryType or #GTK_SHEET_ENTRY_TYPE_DEFAULT */ GtkSheetEntryType _gtk_sheet_entry_type_from_gtype(GType entry_type) { if (entry_type == G_TYPE_ITEM_ENTRY) return (GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY); else if (entry_type == GTK_TYPE_ENTRY) return (GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY); else if (entry_type == GTK_TYPE_TEXT_VIEW) return (GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW); else if (entry_type == GTK_TYPE_DATA_TEXT_VIEW) return (GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW); else if (entry_type == GTK_TYPE_SPIN_BUTTON) return (GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON); else if (entry_type == GTK_TYPE_COMBO_BOX) return (GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX); #if !GTK_CHECK_VERSION(2,24,0) else if (entry_type == GTK_TYPE_COMBO_BOX_ENTRY) return (GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY); #endif #if !GTK_CHECK_VERSION(2,4,0) else if (entry_type == GTK_TYPE_COMBO) return (GTK_SHEET_ENTRY_TYPE_GTK_COMBO); #endif return (GTK_SHEET_ENTRY_TYPE_DEFAULT); } /** * _gtk_sheet_entry_type_to_gtype: * @ety: type to be mapped * * map #GType to #GtkSheetEntryType * * Returns: #GType or #G_TYPE_NONE */ GType _gtk_sheet_entry_type_to_gtype(GtkSheetEntryType ety) { switch(ety) { case GTK_SHEET_ENTRY_TYPE_GTK_ITEM_ENTRY: return (G_TYPE_ITEM_ENTRY); case GTK_SHEET_ENTRY_TYPE_GTK_ENTRY: return (GTK_TYPE_ENTRY); case GTK_SHEET_ENTRY_TYPE_GTK_TEXT_VIEW: return (GTK_TYPE_TEXT_VIEW); case GTK_SHEET_ENTRY_TYPE_GTK_DATA_TEXT_VIEW: return (GTK_TYPE_DATA_TEXT_VIEW); case GTK_SHEET_ENTRY_TYPE_GTK_SPIN_BUTTON: return (GTK_TYPE_SPIN_BUTTON); case GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX: return (GTK_TYPE_COMBO_BOX); #if !GTK_CHECK_VERSION(2,24,0) case GTK_SHEET_ENTRY_TYPE_GTK_COMBO_BOX_ENTRY: return (GTK_TYPE_COMBO_BOX_ENTRY); #endif #if !GTK_CHECK_VERSION(2,4,0) case GTK_SHEET_ENTRY_TYPE_GTK_COMBO: return (GTK_TYPE_COMBO); #endif default: break; } return (G_TYPE_NONE); } /* * gtk_sheet_set_property - set sheet property * gtk_sheet_get_property - get sheet property * gtk_sheet_class_init_properties - initialize class properties * gtk_sheet_class_init_signals - initialize class signals * gtk_sheet_class_init_bindings - initialize class key bindings */ static void gtk_sheet_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { GtkSheet *sheet = GTK_SHEET(object); #if GTK_SHEET_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_set_property: %s", pspec->name); #endif switch(property_id) { case PROP_GTK_SHEET_TITLE: gtk_sheet_set_title(sheet, g_value_get_string(value)); break; case PROP_GTK_SHEET_DESCRIPTION: gtk_sheet_set_description(sheet, g_value_get_string(value)); break; case PROP_GTK_SHEET_NROWS: { gint newval = g_value_get_int(value); if (newval < 0) break; #if GTK_SHEET_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_set_property: newval = %d sheet->maxrow %d", newval, sheet->maxrow); #endif if (newval < (sheet->maxrow + 1)) { gtk_sheet_delete_rows(sheet, newval, (sheet->maxrow + 1) - newval); _gtk_sheet_recalc_view_range(sheet); } else if (newval > (sheet->maxrow + 1)) { gtk_sheet_add_row(sheet, newval - (sheet->maxrow + 1)); _gtk_sheet_recalc_view_range(sheet); } } break; case PROP_GTK_SHEET_NCOLS: { gint newval = g_value_get_int(value); if (newval < 0) break; #if GTK_SHEET_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_set_property: newval = %d sheet->maxcol %d", newval, sheet->maxcol); #endif if (newval < (sheet->maxcol + 1)) { gtk_sheet_delete_columns(sheet, newval, (sheet->maxcol + 1) - newval); _gtk_sheet_recalc_view_range(sheet); } else if (newval > (sheet->maxcol + 1)) { gtk_sheet_add_column(sheet, newval - (sheet->maxcol + 1)); _gtk_sheet_recalc_view_range(sheet); } } break; case PROP_GTK_SHEET_LOCKED: gtk_sheet_set_locked(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_SELECTION_MODE: gtk_sheet_set_selection_mode(sheet, g_value_get_enum(value)); break; case PROP_GTK_SHEET_AUTO_RESIZE: gtk_sheet_set_autoresize(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_AUTO_RESIZE_ROWS: gtk_sheet_set_autoresize_rows(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_AUTO_RESIZE_COLUMNS: gtk_sheet_set_autoresize_columns(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_AUTO_SCROLL: gtk_sheet_set_autoscroll(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_CLIP_TEXT: gtk_sheet_set_clip_text(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_JUSTIFY_ENTRY: gtk_sheet_set_justify_entry(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_BG_COLOR: gtk_sheet_set_background(sheet, g_value_get_boxed(value)); break; case PROP_GTK_SHEET_GRID_VISIBLE: gtk_sheet_show_grid(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_GRID_COLOR: gtk_sheet_set_grid(sheet, g_value_get_boxed(value)); break; case PROP_GTK_SHEET_COLUMN_TITLES_VISIBLE: if (g_value_get_boolean(value)) gtk_sheet_show_column_titles(sheet); else gtk_sheet_hide_column_titles(sheet); break; case PROP_GTK_SHEET_COLUMNS_RESIZABLE: gtk_sheet_columns_set_resizable(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_COLUMN_TITLES_HEIGHT: gtk_sheet_set_column_titles_height(sheet, g_value_get_uint(value)); break; case PROP_GTK_SHEET_ROW_TITLES_VISIBLE: if (g_value_get_boolean(value)) gtk_sheet_show_row_titles(sheet); else gtk_sheet_hide_row_titles(sheet); break; case PROP_GTK_SHEET_ROWS_RESIZABLE: gtk_sheet_rows_set_resizable(sheet, g_value_get_boolean(value)); break; case PROP_GTK_SHEET_ROW_TITLES_WIDTH: gtk_sheet_set_row_titles_width(sheet, g_value_get_uint(value)); break; case PROP_GTK_SHEET_ENTRY_TYPE: { GType entry_type = _gtk_sheet_entry_type_to_gtype(g_value_get_enum(value)); sheet->entry_type = entry_type; /* wanted entry type */ gtk_sheet_change_entry(sheet, entry_type); } break; case PROP_GTK_SHEET_VJUST: gtk_sheet_set_vjustification(sheet, g_value_get_enum(value)); break; default: /* We don't have any other property... */ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } _gtk_sheet_range_draw(sheet, NULL, TRUE); /* this one will not work, it simply does noop gtk_widget_queue_draw(GTK_WIDGET(sheet));*/ } static void gtk_sheet_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { GtkSheet *sheet = GTK_SHEET(object); switch(property_id) { case PROP_GTK_SHEET_TITLE: g_value_set_string(value, sheet->title); break; case PROP_GTK_SHEET_DESCRIPTION: g_value_set_string(value, sheet->description); break; case PROP_GTK_SHEET_NROWS: g_value_set_int(value, sheet->maxrow + 1); break; case PROP_GTK_SHEET_NCOLS: g_value_set_int(value, sheet->maxcol + 1); break; case PROP_GTK_SHEET_LOCKED: g_value_set_boolean(value, sheet->locked); break; case PROP_GTK_SHEET_SELECTION_MODE: g_value_set_enum(value, sheet->selection_mode); break; case PROP_GTK_SHEET_AUTO_RESIZE: g_value_set_boolean(value, gtk_sheet_autoresize(sheet)); break; case PROP_GTK_SHEET_AUTO_RESIZE_ROWS: g_value_set_boolean(value, gtk_sheet_autoresize_rows(sheet)); break; case PROP_GTK_SHEET_AUTO_RESIZE_COLUMNS: g_value_set_boolean(value, gtk_sheet_autoresize_columns(sheet)); break; case PROP_GTK_SHEET_AUTO_SCROLL: g_value_set_boolean(value, sheet->autoscroll); break; case PROP_GTK_SHEET_CLIP_TEXT: g_value_set_boolean(value, sheet->clip_text); break; case PROP_GTK_SHEET_JUSTIFY_ENTRY: g_value_set_boolean(value, sheet->justify_entry); break; case PROP_GTK_SHEET_BG_COLOR: g_value_set_boxed(value, &sheet->bg_color); break; case PROP_GTK_SHEET_GRID_VISIBLE: g_value_set_boolean(value, sheet->show_grid); break; case PROP_GTK_SHEET_GRID_COLOR: g_value_set_boxed(value, &sheet->grid_color); break; case PROP_GTK_SHEET_COLUMN_TITLES_VISIBLE: g_value_set_boolean(value, sheet->column_titles_visible); break; case PROP_GTK_SHEET_COLUMNS_RESIZABLE: g_value_set_boolean(value, sheet->columns_resizable); break; case PROP_GTK_SHEET_COLUMN_TITLES_HEIGHT: g_value_set_uint(value, sheet->column_title_area.height); break; case PROP_GTK_SHEET_ROW_TITLES_VISIBLE: g_value_set_boolean(value, sheet->row_titles_visible); break; case PROP_GTK_SHEET_ROWS_RESIZABLE: g_value_set_boolean(value, sheet->rows_resizable); break; case PROP_GTK_SHEET_ROW_TITLES_WIDTH: g_value_set_uint(value, sheet->row_title_area.width); break; case PROP_GTK_SHEET_ENTRY_TYPE: g_value_set_enum(value, _gtk_sheet_entry_type_from_gtype(sheet->entry_type)); break; case PROP_GTK_SHEET_VJUST: g_value_set_enum(value, sheet->vjust); break; default: /* We don't have any other property... */ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void gtk_sheet_class_init_properties(GObjectClass *gobject_class) { GParamSpec *pspec; gobject_class->set_property = gtk_sheet_set_property; gobject_class->get_property = gtk_sheet_get_property; /** * GtkSheet:title: * * The sheets title string */ pspec = g_param_spec_string("title", "Sheet title", "The sheets title string", "GtkSheet" /* default value */, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_TITLE, pspec); /** * GtkSheet:description: * * The sheets description, a place to store further information * for application use * */ pspec = g_param_spec_string("description", "Sheet description", "The sheets description and further information for application use", "" /* default value */, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_DESCRIPTION, pspec); #if 0 /** * GtkSheet:n-cols: * * Number of columns in the sheet */ pspec = g_param_spec_int ("n-cols", "Number of columns", "Number of columns in the sheet", 0, 1024, 0, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, PROP_GTK_SHEET_NCOLS, pspec); #endif /** * GtkSheet:n-rows: * * Number of rows in the sheet */ pspec = g_param_spec_int("n-rows", "Number of rows", "Number of rows in the sheet", 0, 1000000, 0, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_NROWS, pspec); /** * GtkSheet:locked: * * If the sheet ist locked, it is not editable, cell contents * cannot be modified by the user. */ pspec = g_param_spec_boolean("locked", "Locked", "If the sheet is locked, it is not editable, cell contents cannot be modified by the user", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_LOCKED, pspec); /** * GtkSheet:selection-mode: * * Sets the selection mode of the cells in a #GtkSheet */ pspec = g_param_spec_enum("selection-mode", "Selection mode", "Sets the selection mode of the cells in a sheet", gtk_selection_mode_get_type(), GTK_SELECTION_BROWSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_SELECTION_MODE, pspec); #if 1 /** * GtkSheet:autoresize: * * Autoreisize cells while typing (rows and columns) * * deprecated: 3.0: use autoresize-rows, autoresize-columns * instead */ pspec = g_param_spec_boolean("autoresize", "Autoresize cells", "Autoreisize rows and columns while typing", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_AUTO_RESIZE, pspec); #endif /** * GtkSheet:autoresize-rows: * * Autoreisize rows while typing */ pspec = g_param_spec_boolean("autoresize-rows", "Autoresize rows", "Autoreisize rows while typing", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_AUTO_RESIZE_ROWS, pspec); /** * GtkSheet:autoresize-cols: * * Autoreisize columns while typing */ pspec = g_param_spec_boolean("autoresize-cols", "Autoresize cols", "Autoreisize columns while typing", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_AUTO_RESIZE_COLUMNS, pspec); /** * GtkSheet:autoscroll: * * The sheet will be automatically scrolled when you move beyond * the last visible row/column */ pspec = g_param_spec_boolean("autoscroll", "Autoscroll sheet", "The sheet will be automatically scrolled when you move beyond the last row/column", TRUE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_AUTO_SCROLL, pspec); /** * GtkSheet:clip-text: * * Clip text in cells */ pspec = g_param_spec_boolean("clip-text", "Clip cell text", "Clip text in cells", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_CLIP_TEXT, pspec); pspec = g_param_spec_boolean("justify-entry", "Justify cell entry", "Adapt cell entry editor to the cell justification", TRUE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_JUSTIFY_ENTRY, pspec); /** * GtkSheet:bgcolor: * * Background color of the sheet */ pspec = g_param_spec_boxed("bgcolor", "Background color", "Background color of the sheet", GDK_TYPE_COLOR, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_BG_COLOR, pspec); /** * GtkSheet:grid-visible: * * Sets the visibility of grid */ pspec = g_param_spec_boolean("grid-visible", "Grid visible", "Sets the visibility of grid", TRUE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_GRID_VISIBLE, pspec); /** * GtkSheet:grid-color: * * Color of the grid */ pspec = g_param_spec_boxed("grid-color", "Grid color", "Color of the grid", GDK_TYPE_COLOR, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_GRID_COLOR, pspec); /** * GtkSheet:col-titles-visible: * * Visibility of the column titles */ pspec = g_param_spec_boolean("col-titles-visible", "Column titles visible", "Visibility of the column titles", TRUE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_COLUMN_TITLES_VISIBLE, pspec); /** * GtkSheet:columns-resizable: * * Columns resizable */ pspec = g_param_spec_boolean("columns-resizable", "Columns resizable", "Columns resizable", TRUE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_COLUMNS_RESIZABLE, pspec); /** * GtkSheet:col-titles-height: * * Height of the column titles */ pspec = g_param_spec_uint("col-titles-height", "Column titles height", "Height of the column title area", 0, 1024, GTK_SHEET_ROW_DEFAULT_HEIGHT, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_COLUMN_TITLES_HEIGHT, pspec); /** * GtkSheet:row-titles-visible: * * Row titles visible */ pspec = g_param_spec_boolean("row-titles-visible", "Row titles visible", "Row titles visible", TRUE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_ROW_TITLES_VISIBLE, pspec); /** * GtkSheet:rows-resizable: * * Rows resizable */ pspec = g_param_spec_boolean("rows-resizable", "Rows resizable", "Rows resizable", TRUE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_ROWS_RESIZABLE, pspec); /** * GtkSheet:row-titles-width: * * Width of the row title area */ pspec = g_param_spec_uint("row-titles-width", "Row titles width", "Width of the row title area", 0, 2048, GTK_SHEET_COLUMN_DEFAULT_WIDTH, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_ROW_TITLES_WIDTH, pspec); /** * GtkSheet:entry-type: * * Sheet cell entry widget type */ pspec = g_param_spec_enum("entry-type", "Entry Type", "Sheet entry type, if not default", gtk_sheet_entry_type_get_type(), GTK_SHEET_ENTRY_TYPE_DEFAULT, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_ENTRY_TYPE, pspec); /** * GtkSheet:vjust: * * Default vertical cell text justification */ pspec = g_param_spec_enum("vjust", "Vertical justification", "Default sheet vertical cell text justification", gtk_sheet_vertical_justification_get_type(), GTK_SHEET_VERTICAL_JUSTIFICATION_TOP, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_GTK_SHEET_VJUST, pspec); } #if GTK_SHEET_DEBUG_SIGNALS > 0 static void gtk_sheet_debug_select_row(GtkSheet *sheet, gint row) { g_debug("SIGNAL select-row %p row %d", sheet, row); } static void gtk_sheet_debug_select_column(GtkSheet *sheet, gint column) { g_debug("SIGNAL select-column %p col %d", sheet, column); } static void gtk_sheet_debug_select_range(GtkSheet *sheet, GtkSheetRange *range) { g_debug("SIGNAL select-range %p {%d, %d, %d, %d}", sheet, range->row0, range->col0, range->rowi, range->coli); } static void gtk_sheet_debug_clip_range(GtkSheet *sheet, GtkSheetRange *range) { g_debug("SIGNAL clip-range %p {%d, %d, %d, %d}", sheet, range->row0, range->col0, range->rowi, range->coli); } static void gtk_sheet_debug_resize_range(GtkSheet *sheet, GtkSheetRange *old_range, GtkSheetRange *new_range) { g_debug("SIGNAL resize-range %p {%d, %d, %d, %d} -> {%d, %d, %d, %d}", sheet, old_range->row0, old_range->col0, old_range->rowi, old_range->coli, new_range->row0, new_range->col0, new_range->rowi, new_range->coli); } static void gtk_sheet_debug_move_range(GtkSheet *sheet, GtkSheetRange *old_range, GtkSheetRange *new_range) { g_debug("SIGNAL move-range %p {%d, %d, %d, %d} -> {%d, %d, %d, %d}", sheet, old_range->row0, old_range->col0, old_range->rowi, old_range->coli, new_range->row0, new_range->col0, new_range->rowi, new_range->coli); } static gboolean gtk_sheet_debug_traverse(GtkSheet *sheet, gint row, gint column, gint *new_row, gint *new_column) { g_debug("SIGNAL traverse %p row %d col %d nrow %d ncol %d", sheet, row, column, *new_row, *new_column); return (TRUE); } static gboolean gtk_sheet_debug_deactivate(GtkSheet *sheet, gint row, gint column) { g_debug("SIGNAL deactivate %p row %d col %d", sheet, row, column); return (TRUE); } static gboolean gtk_sheet_debug_activate(GtkSheet *sheet, gint row, gint column) { g_debug("SIGNAL activate %p row %d col %d", sheet, row, column); return (TRUE); } static void gtk_sheet_debug_set_cell(GtkSheet *sheet, gint row, gint column) { g_debug("SIGNAL set-cell %p row %d col %d", sheet, row, column); } static void gtk_sheet_debug_clear_cell(GtkSheet *sheet, gint row, gint column) { g_debug("SIGNAL clear-cell %p row %d col %d", sheet, row, column); } # if 0 static void gtk_sheet_debug_changed(GtkSheet *sheet, gint row, gint column) { g_debug("SIGNAL changed %p row %d col %d", sheet, row, column); } # endif static void gtk_sheet_debug_new_column_width(GtkSheet *sheet, gint col, guint width) { g_debug("SIGNAL new-column-width %p col %d width %d", sheet, col, width); } static void gtk_sheet_debug_new_row_height(GtkSheet *sheet, gint row, guint height) { g_debug("SIGNAL new-row-height %p row %d height %d", sheet, row, height); } static gboolean gtk_sheet_debug_focus_in_event(GtkSheet *sheet, GdkEventFocus *event) { g_debug("SIGNAL focus-in-event %p event %p", sheet, event); return (FALSE); } static gboolean gtk_sheet_debug_focus_out_event(GtkSheet *sheet, GdkEventFocus *event) { g_debug("SIGNAL focus-out-event %p event %p", sheet, event); return (FALSE); } #endif static void _gtk_sheet_class_init_signals(GtkObjectClass *object_class, GtkWidgetClass *widget_class) { /** * GtkSheet::select-row: * @sheet: the sheet widget that emitted the signal * @row: the newly selected row index * * Emmited when a row has been selected. */ sheet_signals[SELECT_ROW] = g_signal_new("select-row", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, select_row), NULL, NULL, gtkextra_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); /** * GtkSheet::select-column: * @sheet: the sheet widget that emitted the signal * @select_column: the newly selected column index * * Emmited when a column has been selected. */ sheet_signals[SELECT_COLUMN] = g_signal_new("select-column", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, select_column), NULL, NULL, gtkextra_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); /** * GtkSheet::select-range: * @sheet: the sheet widget that emitted the signal * @select_range: the newly selected #GtkSheetRange * * Emmited when a #GtkSheetRange has been selected. */ sheet_signals[SELECT_RANGE] = g_signal_new("select-range", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, select_range), NULL, NULL, gtkextra_VOID__BOXED, G_TYPE_NONE, 1, G_TYPE_SHEET_RANGE); /** * GtkSheet::clip-range: * @sheet: the sheet widget that emitted the signal * @clip_range: the newly selected #GtkSheetRange * * Emmited when a #GtkSheetRange is clipping. */ sheet_signals[CLIP_RANGE] = g_signal_new("clip-range", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, clip_range), NULL, NULL, gtkextra_VOID__BOXED, G_TYPE_NONE, 1, G_TYPE_SHEET_RANGE); /** * GtkSheet::resize-range: * @sheet: the sheet widget that emitted the signal * @old_range: the previous selected #GtkSheetRange. * @new_range: the newly selected #GtkSheetRange. * * Emmited when a #GtkSheetRange is resized. */ sheet_signals[RESIZE_RANGE] = g_signal_new("resize-range", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, resize_range), NULL, NULL, gtkextra_VOID__BOXED_BOXED, G_TYPE_NONE, 2, G_TYPE_SHEET_RANGE, G_TYPE_SHEET_RANGE); /** * GtkSheet::move-range: * @sheet: the sheet widget that emitted the signal. * @old_range: the previous selected #GtkSheetRange. * @new_range: the newly selected #GtkSheetRange. * * Emmited when a #GtkSheetRange is moved. */ sheet_signals[MOVE_RANGE] = g_signal_new("move-range", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, move_range), NULL, NULL, gtkextra_VOID__BOXED_BOXED, G_TYPE_NONE, 2, G_TYPE_SHEET_RANGE, G_TYPE_SHEET_RANGE); /** * GtkSheet::traverse: * @sheet: the sheet widget that emitted the signal. * @row: row number of old cell * @column: column number of old cell * @*new_row: row number of target cell, changeable * @*new_column: column number of target cell, changeable * * The "traverse" is emited before "deactivate" and allows to * veto the movement. In such case, the entry will remain in the * site and the other signals will not be emited. * * The signal handler must return TRUE to allow the movement, * FALSE to veto the movement. */ sheet_signals[TRAVERSE] = g_signal_new("traverse", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, traverse), NULL, NULL, gtkextra_BOOLEAN__INT_INT_POINTER_POINTER, G_TYPE_BOOLEAN, 4, G_TYPE_INT, G_TYPE_INT, G_TYPE_POINTER, G_TYPE_POINTER); /** * GtkSheet::deactivate: * @sheet: the sheet widget that emitted the signal * @row: row number of deactivated cell. * @column: column number of deactivated cell. * * Emmited whenever a cell is deactivated(you click on other * cell or start a new selection). * * The signal handler must return TRUE in order to allow * deactivation, FALSE to deny deactivation. */ sheet_signals[DEACTIVATE] = g_signal_new("deactivate", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, deactivate), NULL, NULL, gtkextra_BOOLEAN__INT_INT, G_TYPE_BOOLEAN, 2, G_TYPE_INT, G_TYPE_INT); /** * GtkSheet::activate: * @sheet: the sheet widget that emitted the signal * @row: row number of activated cell. * @column: column number of activated cell. * * Emmited whenever a cell is activated(you click on it). * * FIXME:: The return value is ignored (not yet implemented). */ sheet_signals[ACTIVATE] = g_signal_new("activate", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, activate), NULL, NULL, gtkextra_BOOLEAN__INT_INT, G_TYPE_BOOLEAN, 2, G_TYPE_INT, G_TYPE_INT); /** * GtkSheet::set-cell: * @sheet: the sheet widget that emitted the signal * @row: row number of activated cell. * @column: column number of activated cell. * * Emited when clicking on a non-empty cell. */ sheet_signals[SET_CELL] = g_signal_new("set-cell", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, set_cell), NULL, NULL, gtkextra_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); /** * GtkSheet::clear-cell: * @sheet: the sheet widget that emitted the signal * @row: row number of cleared cell. * @column: column number of cleared cell. * * Emited when when the content of the cell is erased. */ sheet_signals[CLEAR_CELL] = g_signal_new("clear-cell", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, clear_cell), NULL, NULL, gtkextra_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); /** * GtkSheet::changed: * @sheet: the sheet widget that emitted the signal * @row: row number of changed cell. * @column: column number of changed cell. * * "Emited when typing into the active cell, changing its content. * It is emitted after each key press in cell and after deactivating cell. */ sheet_signals[CHANGED] = g_signal_new("changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, changed), NULL, NULL, gtkextra_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); /** * GtkSheet::new-column-width: * @sheet: the sheet widget that emitted the signal * @col: modified column number. * @width: new column width * * Emited when the width of a column is modified. */ sheet_signals[NEW_COL_WIDTH] = g_signal_new("new-column-width", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, changed), NULL, NULL, gtkextra_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); /** * GtkSheet::new-row-height: * @sheet: the sheet widget that emitted the signal * @row: modified row number. * @height: new row height. * * Emited when the height of a row is modified. */ sheet_signals[NEW_ROW_HEIGHT] = g_signal_new("new-row-height", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, changed), NULL, NULL, gtkextra_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); /** * GtkSheet::entry-focus-in: * @sheet: the sheet widget that emitted the signal * @event: the #GdkEventFocus which triggered this signal * * The ::entry-focus-in signal will be emitted when the keyboard * focus enters the sheet_entry editor. * * Returns: %TRUE to stop other handlers from being invoked for the event. * %FALSE to propagate the event further. * * Since: 3.0.1 */ sheet_signals[ENTRY_FOCUS_IN] = g_signal_new("entry-focus-in", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, focus_in_event), NULL, NULL, gtkextra_BOOLEAN__BOXED, G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * GtkSheet::entry-focus-out: * @sheet: the sheet widget that emitted the signal * @event: the #GdkEventFocus which triggered this signal * * The ::entry-focus-out signal will be emitted when the * keyboard focus leaves the sheet_entry editor. * * Returns: %TRUE to stop other handlers from being invoked for the event. * %FALSE to propagate the event further. * * Since: 3.0.1 */ sheet_signals[ENTRY_FOCUS_OUT] = g_signal_new("entry-focus-out", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, focus_out_event), NULL, NULL, gtkextra_BOOLEAN__BOXED, G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); /** * GtkSheet::populate-popup: * @sheet: the sheet widget that emitted the signal * @menu: the menu that ist being populated * * The ::populate-popup signal will be emitted when the user * activates the popup menu of the sheet_entry editor. * * The emission of this signal is only supported for #GtkEntry, * #GtkDataEntry, #GtkItemEntry and #GtkTextView. * * Since: 3.0.1 */ sheet_signals[ENTRY_POPULATE_POPUP] = g_signal_new("populate-popup", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, gtkextra_VOID__OBJECT, G_TYPE_NONE, 1, gtk_menu_get_type()); /** * GtkSheet::set-scroll-adjustments: * @sheet: the sheet widget that emitted the signal * @hadjustment: horizontal #GtkAdjustment. * @vadjustment: vertical #GtkAdkjustment. * * Emited when scroll adjustments are set. */ widget_class->set_scroll_adjustments_signal = g_signal_new("set-scroll-adjustments", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkSheetClass, set_scroll_adjustments), NULL, NULL, gtkextra_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, gtk_adjustment_get_type(), gtk_adjustment_get_type()); /** * GtkSheet::move-cursor: * @sheet: the sheet widget that emitted the signal * @step: the granularity of the move, as a #GtkMovementStep * @count: the number of @step units to move * @extend_selection: %TRUE if the move should extend the selection * * The ::move-cursor signal is a keybinding signal which gets * emitted when the user initiates a cursor movement. * * Applications should not connect to it, but may emit it with * g_signal_emit_by_name() if they need to control the cursor * programmatically. * * Since: 3.0.2 */ sheet_signals[MOVE_CURSOR] = g_signal_new("move-cursor", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(GtkSheetClass, move_cursor), NULL, NULL, gtkextra_VOID__ENUM_INT_BOOLEAN, G_TYPE_NONE, 3, GTK_TYPE_MOVEMENT_STEP, G_TYPE_INT, G_TYPE_BOOLEAN); /** * GtkSheet::enter-pressed: * @sheet: the sheet widget that emitted the signal * @event: (type Gdk.EventKey): the #GdkEventKey which triggered this signal. * * This signal intercepts RETURN and ENTER key-press-events * before they are processed by the sheet-entry editor. Any * modifier combinations on these keys may trigger the signal. * * The default behaviour of the sheet-entry editor is to move * the active cell, which might not be appropriate for the type * of application. * * Returns: %TRUE to block the sheet-entry from processing * the event. %FALSE to propagate the event to the * sheet-entry. */ sheet_signals[ENTER_PRESSED] = g_signal_new("enter-pressed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, gtkextra_BOOLEAN__BOXED, G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); } static void _add_binding_ext(GtkBindingSet *binding_set, gint key, gint alt_key, GdkModifierType mods, GtkMovementStep step, gint count, gboolean extend_selection) { gtk_binding_entry_remove(binding_set, key, mods); gtk_binding_entry_add_signal(binding_set, key, mods, "move-cursor", 3, G_TYPE_ENUM, step, G_TYPE_INT, count, G_TYPE_BOOLEAN, extend_selection); if (alt_key) { gtk_binding_entry_remove(binding_set, alt_key, mods); gtk_binding_entry_add_signal(binding_set, alt_key, mods, "move-cursor", 3, G_TYPE_ENUM, step, G_TYPE_INT, count, G_TYPE_BOOLEAN, extend_selection); } } static void _add_mod_binding(GtkBindingSet *binding_set, gint key, gint alt_key, GdkModifierType mods, GtkMovementStep step, gint count) { _add_binding_ext(binding_set, key, alt_key, GTK_SHEET_MOD_MASK | mods, step, count, FALSE); _add_binding_ext(binding_set, key, alt_key, GTK_SHEET_MOD_MASK | GDK_SHIFT_MASK | mods, step, count, TRUE); } static void _add_normal_binding(GtkBindingSet *binding_set, gint key, gint alt_key, GdkModifierType mods, GtkMovementStep step, gint count) { _add_binding_ext(binding_set, key, alt_key, mods, step, count, FALSE); _add_binding_ext(binding_set, key, alt_key, GDK_SHIFT_MASK | mods, step, count, TRUE); } static void _gtk_sheet_class_init_tab_bindings(GtkSheetClass *klass, GtkDirectionType dir) { GtkBindingSet *b = gtk_binding_set_by_class(klass); GtkDirectionType prim_forw, prim_back, sec_forw, sec_back; switch(dir) { case GTK_DIR_TAB_FORWARD: case GTK_DIR_RIGHT: prim_forw = GTK_DIR_TAB_FORWARD; prim_back = GTK_DIR_TAB_BACKWARD; sec_forw = GTK_DIR_DOWN; sec_back = GTK_DIR_UP; break; case GTK_DIR_TAB_BACKWARD: case GTK_DIR_LEFT: prim_forw = GTK_DIR_TAB_BACKWARD; prim_back = GTK_DIR_TAB_FORWARD; sec_forw = GTK_DIR_UP; sec_back = GTK_DIR_DOWN; break; case GTK_DIR_UP: prim_forw = GTK_DIR_UP; prim_back = GTK_DIR_DOWN; sec_forw = GTK_DIR_TAB_BACKWARD; sec_back = GTK_DIR_TAB_FORWARD; break; case GTK_DIR_DOWN: prim_forw = GTK_DIR_DOWN; prim_back = GTK_DIR_UP; sec_forw = GTK_DIR_TAB_FORWARD; sec_back = GTK_DIR_TAB_BACKWARD; break; } /* Tab / Backtab (Normal) */ _add_binding_ext(b, GDK_KEY_Tab, 0, 0, GTK_MOVEMENT_LOGICAL_POSITIONS, prim_forw, FALSE); _add_binding_ext(b, GDK_KEY_ISO_Left_Tab, 0, GDK_SHIFT_MASK, GTK_MOVEMENT_LOGICAL_POSITIONS, prim_back, FALSE); /* Tab / Backtab (Mod-Ctrl) */ _add_binding_ext(b, GDK_KEY_Tab, 0, GTK_SHEET_MOD_MASK | GDK_CONTROL_MASK, GTK_MOVEMENT_LOGICAL_POSITIONS, sec_forw, FALSE); _add_binding_ext(b, GDK_KEY_ISO_Left_Tab, 0, GTK_SHEET_MOD_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_MOVEMENT_LOGICAL_POSITIONS, sec_back, FALSE); #if 1 /* Return / Enter (Normal) */ _add_binding_ext(b, GDK_KEY_Return, GDK_KEY_KP_Enter, 0, GTK_MOVEMENT_LOGICAL_POSITIONS, prim_forw, FALSE); _add_binding_ext(b, GDK_KEY_Return, GDK_KEY_KP_Enter, GDK_SHIFT_MASK, GTK_MOVEMENT_LOGICAL_POSITIONS, prim_back, FALSE); /* Return / Enter (Mod-Ctrl) */ _add_binding_ext(b, GDK_KEY_Return, GDK_KEY_KP_Enter, GTK_SHEET_MOD_MASK | GDK_CONTROL_MASK, GTK_MOVEMENT_LOGICAL_POSITIONS, sec_forw, FALSE); _add_binding_ext(b, GDK_KEY_Return, GDK_KEY_KP_Enter, GTK_SHEET_MOD_MASK | GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_MOVEMENT_LOGICAL_POSITIONS, sec_back, FALSE); #endif } static void _gtk_sheet_class_init_bindings(GtkSheetClass *klass) { GtkBindingSet *b = gtk_binding_set_by_class(klass); /* Up/Down (Normal) */ _add_normal_binding(b, GDK_KEY_Up, GDK_KEY_KP_Up, 0, GTK_MOVEMENT_DISPLAY_LINES, -1); _add_normal_binding(b, GDK_KEY_Down, GDK_KEY_KP_Down, 0, GTK_MOVEMENT_DISPLAY_LINES, 1); /* Up / Down (Mod) */ _add_mod_binding(b, GDK_KEY_Up, GDK_KEY_KP_Up, 0, GTK_MOVEMENT_DISPLAY_LINES, -1); _add_mod_binding(b, GDK_KEY_Down, GDK_KEY_KP_Down, 0, GTK_MOVEMENT_DISPLAY_LINES, 1); /* Up / Down (Mod-Ctrl) */ _add_mod_binding(b, GDK_KEY_Up, GDK_KEY_KP_Up, GDK_CONTROL_MASK, GTK_MOVEMENT_PAGES, -1); _add_mod_binding(b, GDK_KEY_Down, GDK_KEY_KP_Down, GDK_CONTROL_MASK, GTK_MOVEMENT_PAGES, 1); /* PgUp / PgDn (Normal) */ _add_normal_binding(b, GDK_KEY_Page_Up, GDK_KEY_KP_Page_Up, 0, GTK_MOVEMENT_PAGES, -1); _add_normal_binding(b, GDK_KEY_Page_Down, GDK_KEY_KP_Page_Down, 0, GTK_MOVEMENT_PAGES, 1); /* PgUp / PgDn (Mod) */ _add_mod_binding(b, GDK_KEY_Page_Up, GDK_KEY_KP_Page_Up, 0, GTK_MOVEMENT_PAGES, -1); _add_mod_binding(b, GDK_KEY_Page_Down, GDK_KEY_KP_Page_Down, 0, GTK_MOVEMENT_PAGES, 1); /* Left / Right (Mod) */ _add_mod_binding(b, GDK_KEY_Left, GDK_KEY_KP_Left, 0, GTK_MOVEMENT_VISUAL_POSITIONS, -1); _add_mod_binding(b, GDK_KEY_Right, GDK_KEY_KP_Right, 0, GTK_MOVEMENT_VISUAL_POSITIONS, 1); /* Left / Right (Mod-Ctrl) */ _add_mod_binding(b, GDK_KEY_Left, GDK_KEY_KP_Left, GDK_CONTROL_MASK, GTK_MOVEMENT_HORIZONTAL_PAGES, -1); _add_mod_binding(b, GDK_KEY_Right, GDK_KEY_KP_Right, GDK_CONTROL_MASK, GTK_MOVEMENT_HORIZONTAL_PAGES, 1); /* Home / End (Mod) */ _add_mod_binding(b, GDK_KEY_Home, GDK_KEY_KP_Home, 0, GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1); _add_mod_binding(b, GDK_KEY_End, GDK_KEY_KP_End, 0, GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1); /* Home / End (Mod-Ctrl) */ _add_mod_binding(b, GDK_KEY_Home, GDK_KEY_KP_Home, GDK_CONTROL_MASK, GTK_MOVEMENT_BUFFER_ENDS, -1); _add_mod_binding(b, GDK_KEY_End, GDK_KEY_KP_End, GDK_CONTROL_MASK, GTK_MOVEMENT_BUFFER_ENDS, 1); /* Tab, Return, Enter */ _gtk_sheet_class_init_tab_bindings(klass, GTK_DIR_TAB_FORWARD); } /** * _gtk_sheet_binding_filter: * @sheet: The #GtkSheet * @key: The keypress event * * keypress binding filter * * Some keypress events (with no MODS) are very convenient for the user to navigate the sheet may be processed by a sheet_entry itself. For example the Up/Down keys are very handy to navigate from row to row are used by GtkTextView to move Up/Down within a multi line text. * * In order to get most out of both worlds, we generally allow useful bindings for all sheet_entry types and filter out useage collisions depending on the type of the sheet_entry. * * Returns: TRUE to activate the binding on the sheet, FALSE to * let the sheet_entry process the keypress */ static gboolean _gtk_sheet_binding_filter(GtkSheet *sheet, GdkEventKey *key) { if (key->state & GTK_SHEET_MOD_MASK) return (TRUE); if ( GTK_IS_DATA_TEXT_VIEW(sheet->sheet_entry) || GTK_IS_TEXT_VIEW(sheet->sheet_entry) ) { switch(key->keyval) { case GDK_KEY_Return: case GDK_KEY_Up: case GDK_KEY_Down: case GDK_KEY_Page_Up: case GDK_KEY_Page_Down: return (FALSE); default: break; } } return (TRUE); } /* * gtk_sheet_class_init - GtkSheet class initialisation * * @param klass */ static void gtk_sheet_class_init(GtkSheetClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkContainerClass *container_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); object_class = (GtkObjectClass *)klass; widget_class = (GtkWidgetClass *)klass; container_class = (GtkContainerClass *)klass; sheet_parent_class = g_type_class_peek_parent(klass); _gtk_sheet_class_init_signals(object_class, widget_class); _gtk_sheet_class_init_bindings(klass); container_class->add = NULL; container_class->remove = gtk_sheet_remove_handler; container_class->forall = gtk_sheet_forall_handler; object_class->destroy = gtk_sheet_destroy_handler; gobject_class->finalize = gtk_sheet_finalize_handler; gtk_sheet_class_init_properties(gobject_class); widget_class->realize = gtk_sheet_realize_handler; widget_class->unrealize = gtk_sheet_unrealize_handler; widget_class->map = gtk_sheet_map_handler; widget_class->unmap = gtk_sheet_unmap_handler; widget_class->style_set = gtk_sheet_style_set_handler; widget_class->button_press_event = gtk_sheet_button_press_handler; widget_class->button_release_event = gtk_sheet_button_release_handler; widget_class->motion_notify_event = gtk_sheet_motion_handler; widget_class->key_press_event = gtk_sheet_key_press_handler; widget_class->expose_event = gtk_sheet_expose_handler; widget_class->size_request = gtk_sheet_size_request_handler; widget_class->size_allocate = gtk_sheet_size_allocate_handler; widget_class->focus = gtk_sheet_focus; widget_class->focus_in_event = NULL; widget_class->focus_out_event = NULL; klass->select_row = NULL; klass->select_column = NULL; klass->select_range = NULL; klass->clip_range = NULL; klass->resize_range = NULL; klass->move_range = NULL; klass->traverse = NULL; klass->deactivate = NULL; klass->activate = NULL; klass->set_cell = NULL; klass->clear_cell = NULL; klass->changed = NULL; klass->new_column_width = NULL; klass->new_row_height = NULL; klass->focus_in_event = NULL; klass->focus_out_event = NULL; #if GTK_SHEET_DEBUG_SIGNALS > 0 klass->select_row = gtk_sheet_debug_select_row; klass->select_column = gtk_sheet_debug_select_column; klass->select_range = gtk_sheet_debug_select_range; klass->clip_range = gtk_sheet_debug_clip_range; klass->resize_range = gtk_sheet_debug_resize_range; klass->move_range = gtk_sheet_debug_move_range; klass->traverse = gtk_sheet_debug_traverse; klass->deactivate = gtk_sheet_debug_deactivate; klass->activate = gtk_sheet_debug_activate; klass->set_cell = gtk_sheet_debug_set_cell; klass->clear_cell = gtk_sheet_debug_clear_cell; /*klass->changed = gtk_sheet_debug_changed;*/ klass->new_column_width = gtk_sheet_debug_new_column_width; klass->new_row_height = gtk_sheet_debug_new_row_height; klass->focus_in_event = gtk_sheet_debug_focus_in_event; klass->focus_out_event = gtk_sheet_debug_focus_out_event; #endif klass->set_scroll_adjustments = gtk_sheet_set_scroll_adjustments; klass->move_cursor = _gtk_sheet_move_cursor; } static void gtk_sheet_init(GtkSheet *sheet) { sheet->flags = 0; sheet->selection_mode = GTK_SELECTION_BROWSE; sheet->autoresize_columns = FALSE; sheet->autoresize_rows = FALSE; sheet->autoscroll = TRUE; sheet->clip_text = FALSE; sheet->justify_entry = TRUE; sheet->locked = FALSE; sheet->freeze_count = 0; #if GTK_SHEET_DEBUG_COLORS > 0 gdk_color_parse(GTK_SHEET_DEBUG_COLOR, &debug_color); gdk_colormap_alloc_color(gdk_colormap_get_system(), &debug_color, FALSE, TRUE); #endif gdk_color_parse(GTK_SHEET_DEFAULT_BG_COLOR, &sheet->bg_color); gdk_colormap_alloc_color(gdk_colormap_get_system(), &sheet->bg_color, FALSE, TRUE); gdk_color_parse(GTK_SHEET_DEFAULT_GRID_COLOR, &sheet->grid_color); gdk_colormap_alloc_color(gdk_colormap_get_system(), &sheet->grid_color, FALSE, TRUE); sheet->show_grid = TRUE; gdk_color_parse(GTK_SHEET_DEFAULT_TM_COLOR, &sheet->tm_color); gdk_colormap_alloc_color(gdk_colormap_get_system(), &sheet->tm_color, FALSE, TRUE); sheet->children = NULL; sheet->internal_allocation.x = 0; sheet->internal_allocation.y = 0; sheet->internal_allocation.width = 0; sheet->internal_allocation.height = 0; sheet->title = NULL; sheet->row = NULL; sheet->column = NULL; sheet->rows_resizable = TRUE; sheet->columns_resizable = TRUE; sheet->maxrow = -1; sheet->maxcol = -1; sheet->view.row0 = -1; sheet->view.col0 = -1; sheet->view.rowi = -1; sheet->view.coli = -1; sheet->data = NULL; sheet->maxallocrow = -1; sheet->maxalloccol = -1; sheet->active_cell.row = -1; sheet->active_cell.col = -1; sheet->sheet_entry = NULL; sheet->entry_type = G_TYPE_NONE; sheet->installed_entry_type = G_TYPE_NONE; sheet->selection_cell.row = -1; sheet->selection_cell.col = -1; sheet->timer = 0; sheet->clip_timer = 0; sheet->interval = 0; sheet->button = NULL; sheet->state = GTK_SHEET_NORMAL; sheet->range.row0 = -1; sheet->range.rowi = -1; sheet->range.col0 = -1; sheet->range.coli = -1; sheet->sheet_window = NULL; sheet->sheet_window_width = 0; sheet->sheet_window_height = 0; sheet->pixmap = NULL; sheet->hoffset = 0; sheet->voffset = 0; sheet->old_hadjustment = 0; sheet->old_vadjustment = 0; sheet->hadjustment = NULL; sheet->vadjustment = NULL; sheet->shadow_type = GTK_SHADOW_NONE; sheet->vjust = GTK_SHEET_VERTICAL_JUSTIFICATION_TOP; sheet->column_title_area.x = 0; sheet->column_title_area.y = 0; sheet->column_title_area.width = 0; sheet->column_title_area.height = _gtk_sheet_row_default_height(GTK_WIDGET(sheet)); sheet->column_title_window = NULL; sheet->column_titles_visible = TRUE; sheet->row_title_window = NULL; sheet->row_title_area.x = 0; sheet->row_title_area.y = 0; sheet->row_title_area.width = GTK_SHEET_COLUMN_DEFAULT_WIDTH; sheet->row_title_area.height = 0; sheet->row_titles_visible = TRUE; sheet->xor_gc = NULL; sheet->fg_gc = NULL; sheet->bg_gc = NULL; sheet->cursor_drag = gdk_cursor_new(GDK_PLUS); sheet->x_drag = 0; sheet->y_drag = 0; /* uninitialized sheet->drag_cell; sheet->drag_range; sheet->clip_range; */ gtk_widget_set_has_window(GTK_WIDGET(sheet), TRUE); gtk_widget_set_can_focus(GTK_WIDGET(sheet), TRUE); /* for glade to be able to construct the object, we need to complete initialisation here */ gtk_sheet_construct(sheet, 0, 0, "GtkSheet"); g_signal_connect(G_OBJECT(sheet), "query-tooltip", (void *)gtk_sheet_query_tooltip_handler, NULL); /* make sure the tooltip signal fires even if the sheet itself has no tooltip */ gtk_widget_set_has_tooltip(GTK_WIDGET(sheet), TRUE); } static void _gtk_sheet_row_init(GtkSheetRow *row) { row->name = NULL; row->height = GTK_SHEET_ROW_DEFAULT_HEIGHT; row->requisition = GTK_SHEET_ROW_DEFAULT_HEIGHT; row->top_ypixel = 0; row->max_extent_height = 0; row->button.state = GTK_STATE_NORMAL; row->button.label = NULL; row->button.label_visible = TRUE; row->button.child = NULL; row->button.justification = GTK_JUSTIFY_CENTER; row->tooltip_markup = NULL; row->tooltip_text = NULL; GTK_SHEET_ROW_SET_VISIBLE(row, TRUE); GTK_SHEET_ROW_SET_SENSITIVE(row, TRUE); } static void gtk_sheet_row_finalize(GtkSheetRow *row) { if (row->name) { g_free(row->name); row->name = NULL; } if (row->button.label) { g_free(row->button.label); row->button.label = NULL; } if (row->tooltip_markup) { g_free(row->tooltip_markup); row->tooltip_markup = NULL; } if (row->tooltip_text) { g_free(row->tooltip_text); row->tooltip_text = NULL; } } /** * gtk_sheet_new: * @rows: initial number of rows * @columns: initial number of columns * @title: sheet title * * Creates a new sheet widget with the given number of rows and columns. * * Returns: the new sheet #GtkSheet */ GtkWidget * gtk_sheet_new(guint rows, guint columns, const gchar *title) { GtkWidget *widget; /* sanity check */ g_return_val_if_fail(columns >= MINCOLS, NULL); g_return_val_if_fail(rows >= MINROWS, NULL); widget = gtk_widget_new(gtk_sheet_get_type(), NULL); gtk_sheet_construct(GTK_SHEET(widget), rows, columns, title); return (widget); } /** * gtk_sheet_construct: * @sheet: a #GtkSheet * @rows: number of rows * @columns: number of columns * @title: sheet title * * Initializes an existent #GtkSheet with the given number of rows and columns. */ void gtk_sheet_construct(GtkSheet *sheet, guint rows, guint columns, const gchar *title) { sheet->data = (GtkSheetCell ***)g_malloc(sizeof(GtkSheetCell **)); sheet->data[0] = (GtkSheetCell **)g_malloc(sizeof(GtkSheetCell *)+sizeof(gdouble)); sheet->data[0][0] = NULL; /* set number of rows and columns */ GrowSheet(sheet, MINROWS, MINCOLS); /* Init heading row/column, add normal rows/columns */ AddRows(sheet, sheet->maxrow + 1, rows); AddColumns(sheet, sheet->maxcol + 1, columns); /* create sheet entry */ create_sheet_entry(sheet, G_TYPE_NONE); /* create global selection button */ create_global_button(sheet); if (title) { if (sheet->title) g_free(sheet->title); sheet->title = g_strdup(title); } } /** * gtk_sheet_new_browser: * @rows: initial number of rows * @columns: initial number of columns * @title: sheet title * * Creates a new browser sheet. Its cells cannot be edited(read-only). * * Returns: the new read-only #GtkSheet */ GtkWidget * gtk_sheet_new_browser(guint rows, guint columns, const gchar *title) { GtkWidget *widget; widget = gtk_widget_new(gtk_sheet_get_type(), NULL); gtk_sheet_construct_browser(GTK_SHEET(widget), rows, columns, title); return (widget); } /** * gtk_sheet_construct_browser: * @sheet: a #GtkSheet * @rows: number of rows * @columns: number of columns * @title: sheet title * * Initializes an existent read-only #GtkSheet with the given number of rows and columns. */ void gtk_sheet_construct_browser(GtkSheet *sheet, guint rows, guint columns, const gchar *title) { gtk_sheet_construct(sheet, rows, columns, title); gtk_sheet_set_locked(sheet, TRUE); } /** * gtk_sheet_new_with_custom_entry: * @rows: initial number of rows * @columns: initial number of columns * @title: sheet title * @entry_type: a #GType * * Creates a new sheet widget with the given number of rows and columns and a custome entry type. * * Returns: the new sheet #GtkSheet */ GtkWidget * gtk_sheet_new_with_custom_entry(guint rows, guint columns, const gchar *title, GType entry_type) { GtkWidget *widget; widget = gtk_widget_new(gtk_sheet_get_type(), NULL); gtk_sheet_construct_with_custom_entry(GTK_SHEET(widget), rows, columns, title, entry_type ? entry_type : G_TYPE_NONE); return (widget); } /** * gtk_sheet_construct_with_custom_entry: * @sheet: a #GtkSheet * @rows: number of rows * @columns: number of columns * @title: sheet title * @entry_type: a #GType * * Initializes an existent read-only #GtkSheet * with the given number of rows and columns and a custom entry. */ void gtk_sheet_construct_with_custom_entry(GtkSheet *sheet, guint rows, guint columns, const gchar *title, GType entry_type) { gtk_sheet_construct(sheet, rows, columns, title); create_sheet_entry(sheet, entry_type ? entry_type : G_TYPE_NONE); } /** * gtk_sheet_change_entry: * @sheet: a #GtkSheet * @entry_type: a #GType * * Changes the current entry of the cell in #GtkSheet. The old * sheet entry widget gets dropped and a new entry widget is * created. Beware: You will have to reconnect all your signal * handlers after changing an entry. */ void gtk_sheet_change_entry(GtkSheet *sheet, const GType entry_type) { gint state; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); state = sheet->state; if (state == GTK_SHEET_NORMAL) _gtk_sheet_hide_active_cell(sheet); create_sheet_entry(sheet, entry_type ? entry_type : G_TYPE_NONE); sheet->entry_type = entry_type; /* save wanted type, no matter wether it failed */ if (state == GTK_SHEET_NORMAL) { gtk_sheet_show_active_cell(sheet); /* if the application changes the entry during emission of the TRAVERSE signal an initialisation of the new entry can fire the "changed" signal and the text will be written into the old active cell (which is WRONG) gtk_sheet_entry_signal_connect_changed(sheet, G_CALLBACK(gtk_sheet_entry_changed_handler)); */ } } /** * gtk_sheet_show_grid: * @sheet: a #GtkSheet * @show: TRUE(grid visible) or FALSE(grid invisible) * * Sets the visibility of grid in #GtkSheet. */ void gtk_sheet_show_grid(GtkSheet *sheet, gboolean show) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (show == sheet->show_grid) return; sheet->show_grid = show; if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, NULL, TRUE); } /** * gtk_sheet_grid_visible: * @sheet: a #GtkSheet * * Gets the visibility of grid in #GtkSheet. * * Returns: TRUE(grid visible) or FALSE(grid invisible) */ gboolean gtk_sheet_grid_visible(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); return (sheet->show_grid); } /** * gtk_sheet_set_background: * @sheet: a #GtkSheet * @color: a #GdkColor structure * * Sets the background color of the #GtkSheet. * If pass NULL, the sheet will be reset to the default color. */ void gtk_sheet_set_background(GtkSheet *sheet, GdkColor *color) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!color) { gdk_color_parse(GTK_SHEET_DEFAULT_BG_COLOR, &sheet->bg_color); } else { sheet->bg_color = *color; } gdk_colormap_alloc_color(gdk_colormap_get_system(), &sheet->bg_color, FALSE, TRUE); if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, NULL, TRUE); } /** * gtk_sheet_set_grid: * @sheet: a #GtkSheet * @color: a #GdkColor structure * * Set the grid color. * If pass NULL, the grid will be reset to the default color. */ void gtk_sheet_set_grid(GtkSheet *sheet, GdkColor *color) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!color) { gdk_color_parse(GTK_SHEET_DEFAULT_GRID_COLOR, &sheet->grid_color); } else { sheet->grid_color = *color; } gdk_colormap_alloc_color(gdk_colormap_get_system(), &sheet->grid_color, FALSE, TRUE); if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, NULL, TRUE); } /** * gtk_sheet_get_rows_count: * @sheet: a #GtkSheet * * Get the number of the rows of the #GtkSheet. * * Returns: number of rows. */ guint gtk_sheet_get_rows_count(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); return (sheet->maxrow + 1); } /** * gtk_sheet_get_columns_count: * @sheet: a #GtkSheet * * Get the number of the columns of the #GtkSheet. * * Returns: number of columns. */ guint gtk_sheet_get_columns_count(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); return (sheet->maxcol + 1); } /** * gtk_sheet_get_state: * @sheet: a #GtkSheet * * Get the selection state of the sheet (#GtkSheetState). * * Returns: * GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED */ GtkSheetState gtk_sheet_get_state(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); return (sheet->state); } /** * gtk_sheet_get_selection: * @sheet: a #GtkSheet * @state: where to store the #GtkSheetState, may be NULL * @range: where to store the #GtkSheetRange * * Inquire current cell selection state and range. * * Returns: TRUE: there is a selection, FALSE: no selection or error */ gboolean gtk_sheet_get_selection(GtkSheet *sheet, GtkSheetState *state, GtkSheetRange *range) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); g_return_val_if_fail(range != NULL, FALSE); if (state) *state = sheet->state; *range = sheet->range; return (TRUE); } /** * gtk_sheet_set_selection_mode: * @sheet: a #GtkSheet * @mode: GTK_SELECTION_SINGLE or GTK_SELECTION_BROWSE * * Sets the selection mode of the cells in a #GtkSheet. */ void gtk_sheet_set_selection_mode(GtkSheet *sheet, GtkSelectionMode mode) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); gtk_sheet_real_unselect_range(sheet, NULL); sheet->selection_mode = mode; } /** * gtk_sheet_set_autoresize: * @sheet: a #GtkSheet * @autoresize: TRUE or FALSE * * Controls wether cells will be autoresized upon deactivation, * as you type text or set a cell_text value. If you want the * cells to be autoresized when you pack widgets look at * gtk_sheet_attach_*(). This function sets both: * autoresize_columns and autoresize_cells. */ void gtk_sheet_set_autoresize(GtkSheet *sheet, gboolean autoresize) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->autoresize_columns = autoresize; sheet->autoresize_rows = autoresize; } /** * gtk_sheet_set_autoresize_columns: * @sheet: a #GtkSheet * @autoresize: TRUE or FALSE * * Controls wether columns will be autoresized upon * deactivation, as you type text or set a cell_text value. If * you want the cells to be autoresized when you pack widgets * look at gtk_sheet_attach_*(). */ void gtk_sheet_set_autoresize_columns(GtkSheet *sheet, gboolean autoresize) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->autoresize_columns = autoresize; } /** * gtk_sheet_set_autoresize_rows: * @sheet: a #GtkSheet * @autoresize: TRUE or FALSE * * Controls wether rows will be autoresized upon deactivation, * as you type text or set a cell_text value. If you want the * cells to be autoresized when you pack widgets look at * gtk_sheet_attach_*(). */ void gtk_sheet_set_autoresize_rows(GtkSheet *sheet, gboolean autoresize) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->autoresize_rows = autoresize; } /** * gtk_sheet_autoresize: * @sheet: a #GtkSheet * * Gets the autoresize mode of #GtkSheet. * * Returns: TRUE if autoresize_columns or autoresize_rows was * set, or FALSE if none */ gboolean gtk_sheet_autoresize(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->autoresize_columns || sheet->autoresize_rows); } /** * gtk_sheet_autoresize_columns: * @sheet: a #GtkSheet * * Gets the autoresize mode for #GtkSheet columns. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_autoresize_columns(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->autoresize_columns); } /** * gtk_sheet_autoresize_rows: * @sheet: a #GtkSheet * * Gets the autoresize mode for #GtkSheet rows. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_autoresize_rows(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->autoresize_rows); } /** * _gtk_sheet_recalc_extent_width: * @sheet: the #GtkSheet * @col: column to be recalculated * * recalc maximum column extent width */ static void _gtk_sheet_recalc_extent_width(GtkSheet *sheet, gint col) { gint new_width = 0; gint row; #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_recalc_extent_width[%d]: called", col); #endif if (col < 0 || col > sheet->maxalloccol || col > sheet->maxcol) return; for (row = 0; row <= sheet->maxallocrow; row++) { GtkSheetRow *rowptr = ROWPTR(sheet, row); if (GTK_SHEET_ROW_IS_VISIBLE(rowptr)) { GtkSheetCell *cell = sheet->data[row][col]; if (cell && cell->text && cell->text[0]) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); if (attributes.is_visible) { if (cell->extent.width > new_width) { new_width = cell->extent.width; } } } } } COLPTR(sheet, col)->max_extent_width = new_width; } /** * _gtk_sheet_recalc_extent_height: * @sheet: the #GtkSheet * @row: row to be recalculated * * recalc maximum row extent height */ static void _gtk_sheet_recalc_extent_height(GtkSheet *sheet, gint row) { gint new_height = 0; gint col; #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_recalc_extent_height[%d]: called", row); #endif if (row < 0 || row > sheet->maxallocrow || row > sheet->maxrow) return; for (col = 0; col <= sheet->maxalloccol; col++) { GtkSheetColumn *colptr = COLPTR(sheet, col); if (GTK_SHEET_COLUMN_IS_VISIBLE(colptr)) { GtkSheetCell *cell = sheet->data[row][col]; if (cell && cell->text && cell->text[0]) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); if (attributes.is_visible) { if (cell->extent.height > new_height) { new_height = cell->extent.height; } } } } } ROWPTR(sheet, row)->max_extent_height = new_height; } /** * _gtk_sheet_update_extent: * @sheet: the #GtkSheet * @cell: the #GtkSheetCell * @row: the row * @col: the column * * update cell extent and propagate to max row/column extent */ static void _gtk_sheet_update_extent(GtkSheet *sheet, GtkSheetCell *cell, gint row, gint col) { guint text_width = 0, text_height = 0; guint new_extent_width = 0, new_extent_height = 0; GdkRectangle old_extent; GtkSheetColumn *colptr = COLPTR(sheet, col); GtkSheetRow *rowptr = ROWPTR(sheet, row); g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); g_return_if_fail(cell != NULL); #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_update_extent[%d,%d]: called cell (xw %d,xh %d) colxw %d rowxh %d", row, col, cell->extent.width, cell->extent.height, colptr->max_extent_width, rowptr->max_extent_height); #endif old_extent = cell->extent; /* to check wether it was increased */ if (!cell->text || !cell->text[0]) { cell->extent.width = 0; cell->extent.height = 0; if (old_extent.height != 0) _gtk_sheet_recalc_extent_height(sheet, row); if (old_extent.width != 0) _gtk_sheet_recalc_extent_width(sheet, col); return; } GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); _get_string_extent(sheet, colptr, attributes.font_desc, cell->text, &text_width, &text_height); /* add borders */ new_extent_width = CELL_EXTENT_WIDTH(text_width, attributes.border.width); new_extent_height = CELL_EXTENT_HEIGHT(text_height, 0); cell->extent.width = new_extent_width; cell->extent.height = new_extent_height; if (!GTK_SHEET_COLUMN_IS_VISIBLE(colptr)) return; if (!GTK_SHEET_ROW_IS_VISIBLE(rowptr)) return; if (new_extent_width > old_extent.width) /* wider */ { if (new_extent_width > colptr->max_extent_width) { colptr->max_extent_width = new_extent_width; } } else if (new_extent_width < old_extent.width) /* narrower */ { _gtk_sheet_recalc_extent_width(sheet, col); } if (new_extent_height > old_extent.height) /* higher */ { if (new_extent_height > rowptr->max_extent_height) { rowptr->max_extent_height = new_extent_height; } } else if (new_extent_height < old_extent.height) /* lower */ { _gtk_sheet_recalc_extent_height(sheet, row); } #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_update_extent[%d,%d]: done cell (xw %d,xh %d) colxw %d rowxh %d", row, col, cell->extent.width, cell->extent.height, colptr->max_extent_width, rowptr->max_extent_height); #endif } static void _gtk_sheet_autoresize_column_internal(GtkSheet *sheet, gint col) { gint new_width; GtkSheetColumn *colptr; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxalloccol || col > sheet->maxcol) return; colptr = COLPTR(sheet, col); if (!GTK_SHEET_COLUMN_IS_VISIBLE(colptr)) return; new_width = COLUMN_EXTENT_TO_WIDTH(colptr->max_extent_width); #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_autoresize_column_internal[%d]: called col w %d new w %d", col, colptr->width, new_width); #endif if (new_width != colptr->width) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_autoresize_column_internal[%d]: set width %d", col, new_width); #endif gtk_sheet_set_column_width(sheet, col, new_width); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_REDRAW_PENDING); } } static void _gtk_sheet_autoresize_row_internal(GtkSheet *sheet, gint row) { gint new_height; GtkSheetRow *rowptr; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxallocrow || row > sheet->maxrow) return; rowptr = ROWPTR(sheet, row); if (!GTK_SHEET_ROW_IS_VISIBLE(rowptr)) return; new_height = ROW_EXTENT_TO_HEIGHT(rowptr->max_extent_height); #if 0 && GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_autoresize_row_internal[%d]: win_h %d ext_h %d row_max_h %d", row, sheet->sheet_window_height, rowptr->max_extent_height, ROW_MAX_HEIGHT(sheet)); g_debug("_gtk_sheet_autoresize_row_internal[%d]: called row h %d new h %d", row, rowptr->height, new_height); #endif if (new_height != rowptr->height) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_autoresize_row_internal[%d]: set height %d", row, new_height); #endif gtk_sheet_set_row_height(sheet, row, new_height); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_REDRAW_PENDING); } } static void gtk_sheet_autoresize_all(GtkSheet *sheet) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_autoresize_all: not realized"); #endif return; } #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_autoresize_all: running"); #endif if (gtk_sheet_autoresize_columns(sheet)) { gint col; #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_autoresize_all: columns"); #endif for (col = 0; col <= sheet->maxalloccol; col++) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) { _gtk_sheet_autoresize_column_internal(sheet, col); } } } if (gtk_sheet_autoresize_rows(sheet)) { gint row; #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_autoresize_all: rows"); #endif for (row = 0; row <= sheet->maxallocrow; row++) { if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) { _gtk_sheet_autoresize_row_internal(sheet, row); } } } } /** * gtk_sheet_set_autoscroll: * @sheet: a #GtkSheet * @autoscroll: TRUE or FALSE * * The sheet will be automatically scrolled when you move beyond * the last row/col in #GtkSheet. */ void gtk_sheet_set_autoscroll(GtkSheet *sheet, gboolean autoscroll) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->autoscroll = autoscroll; } /** * gtk_sheet_autoscroll: * @sheet: a #GtkSheet * * Get the autoscroll mode of #GtkSheet. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_autoscroll(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->autoscroll); } /** * gtk_sheet_set_clip_text: * @sheet: a #GtkSheet * @clip_text: TRUE or FALSE * * Clip text in cell. When clip text mode is turned off, cell * text is written over neighbour columns, as long as their * contents are empty. */ void gtk_sheet_set_clip_text(GtkSheet *sheet, gboolean clip_text) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->clip_text = clip_text; } /** * gtk_sheet_clip_text: * @sheet: a #GtkSheet * * Get clip text mode in #GtkSheet. When clip text mode is * turned off, cell text is written over neighbour columns, as * long as their contents are empty. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_clip_text(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->clip_text); } /** * gtk_sheet_set_justify_entry: * @sheet: a #GtkSheet * @justify: TRUE or FALSE * * Justify cell entry editor in #GtkSheet. */ void gtk_sheet_set_justify_entry(GtkSheet *sheet, gboolean justify) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->justify_entry = justify; } /** * gtk_sheet_justify_entry: * @sheet: a #GtkSheet * * Get the cell entry editor justification setting from * #GtkSheet. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_justify_entry(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->justify_entry); } /** * gtk_sheet_set_vjustification: * @sheet: a #GtkSheet * @vjust: a #GtkSheetVerticalJustification * * Set the default vertical cell text justification for * #GtkSheet. */ void gtk_sheet_set_vjustification(GtkSheet *sheet, GtkSheetVerticalJustification vjust) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->vjust = vjust; } /** * gtk_sheet_get_vjustification: * @sheet: a #GtkSheet * * Get the default vertical cell text justification from * #GtkSheet. * * Returns: the default #GtkSheetVerticalJustification */ GtkSheetVerticalJustification gtk_sheet_get_vjustification(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->vjust); } /** * gtk_sheet_set_locked: * @sheet: a #GtkSheet * @locked: TRUE or FALSE * * Lock the #GtkSheet, which means it is no longer editable, * cell contents cannot be modified by the user. */ void gtk_sheet_set_locked(GtkSheet *sheet, gboolean locked) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->locked = locked; } /** * gtk_sheet_locked: * @sheet: a #GtkSheet * * Get the lock status of #GtkSheet, locked means the sheet is * not editable, cell contents cannot be modified by the user. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_locked(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->locked); } /* This routine has problems with gtk+-1.2 related with the * label/button drawing - I think it's a bug in gtk+-1.2 */ /** * gtk_sheet_set_title: * @sheet: a #GtkSheet * @title: #GtkSheet title * * Set #GtkSheet title. The widget will keep a copy of the * string. */ void gtk_sheet_set_title(GtkSheet *sheet, const gchar *title) { GtkWidget *label; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (sheet->title) { g_free(sheet->title); sheet->title = NULL; } if (title) { sheet->title = g_strdup(title); } if (!gtk_widget_get_realized(GTK_WIDGET(sheet)) || !title) return; if (gtk_bin_get_child(GTK_BIN(sheet->button))) label = gtk_bin_get_child(GTK_BIN(sheet->button)); /* gtk_label_set_text(GTK_LABEL(label), title); */ size_allocate_global_button(sheet); /* remove and destroy the old widget */ /* old_widget = gtk_bin_get_child(GTK_BIN (sheet->button)); if (old_widget) { gtk_container_remove (GTK_CONTAINER (sheet->button), old_widget); } label = gtk_label_new (title); gtk_misc_set_alignment(GTK_MISC(label), 0.5 , 0.5 ); gtk_container_add (GTK_CONTAINER (sheet->button), label); gtk_widget_show (label); size_allocate_global_button(sheet); g_signal_emit(GTK_OBJECT(sheet),sheet_signals[CHANGED], 0, -1, -1); if(old_widget) gtk_widget_destroy (old_widget); */ } /** * gtk_sheet_set_description: * @sheet: a #GtkSheet * @description: #GtkSheet description * * Set #GtkSheet description for application use. */ void gtk_sheet_set_description(GtkSheet *sheet, const gchar *description) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (sheet->description) g_free(sheet->description); sheet->description = g_strdup(description); } /** * gtk_sheet_get_description: * @sheet: a #GtkSheet * @description: #GtkSheet description * * Get sheet description. * * Returns: sheet description or NULL, do not modify or free it */ const gchar * gtk_sheet_get_description(GtkSheet *sheet, const gchar *description) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); return (sheet->description); } /** * gtk_sheet_is_frozen: * @sheet: the #GtkSheet * * Get freeze status. * * Returns: TRUE or FALSE wether the sheet is frozen */ gboolean gtk_sheet_is_frozen(GtkSheet *sheet) { return (GTK_SHEET_IS_FROZEN(sheet)); } /** * gtk_sheet_freeze: * @sheet: a #GtkSheet * * Freeze all visual updates of the #GtkSheet. * The updates will occure in a more efficient way than if you made them on a unfrozen #GtkSheet . */ void gtk_sheet_freeze(GtkSheet *sheet) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->freeze_count++; GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IS_FROZEN); #if GTK_SHEET_DEBUG_FREEZE > 0 g_debug("gtk_sheet_freeze: freeze_count == %d", sheet->freeze_count); #endif } /** * _gtk_sheet_redraw_internal: * @sheet: to be redrawn * @reset_hadjustment: wether to reset horizontal adjustment * @reset_vadjustment: wether to reset vertical adjustment * * do a complete sheet redraw. used after rows/cols have been * appended/deleted or after combined operations while the * sheet was frozen */ void _gtk_sheet_redraw_internal(GtkSheet *sheet, gboolean reset_hadjustment, gboolean reset_vadjustment) { gboolean done = FALSE; /* handle sheets with no scrollbars */ if (reset_hadjustment) sheet->old_hadjustment = -1.; /* causes redraw */ if (reset_vadjustment) sheet->old_vadjustment = -1.; /* causes redraw */ if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (GTK_SHEET_IS_FROZEN(sheet)) return; #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_redraw_internal: called"); #endif _gtk_sheet_recalc_view_range(sheet); if (sheet->row_titles_visible || sheet->column_titles_visible) { size_allocate_global_button(sheet); } if (sheet->row_titles_visible) { size_allocate_row_title_buttons(sheet); } if (sheet->column_titles_visible) { _gtk_sheet_column_buttons_size_allocate(sheet); } /* send value_changed or redraw directly */ if (sheet->vadjustment) { g_signal_emit_by_name(GTK_OBJECT(sheet->vadjustment), "value_changed"); done = TRUE; } if (sheet->hadjustment) { g_signal_emit_by_name(GTK_OBJECT(sheet->hadjustment), "value_changed"); done = TRUE; } if (!done) { _gtk_sheet_range_draw(sheet, NULL, TRUE); } } /** * gtk_sheet_thaw: * @sheet: a #GtkSheet * * Thaw the sheet after you have made a number of changes on a frozen sheet. * The updates will occure in a more efficient way than if you made them on a unfrozen sheet . */ void gtk_sheet_thaw(GtkSheet *sheet) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (sheet->freeze_count == 0) return; sheet->freeze_count--; if (sheet->freeze_count > 0) { #if GTK_SHEET_DEBUG_FREEZE > 0 g_warning("gtk_sheet_thaw: ignored (freeze_count > 0)"); #endif return; } #if GTK_SHEET_DEBUG_FREEZE > 0 g_debug("gtk_sheet_thaw: freeze_count == %d", sheet->freeze_count); #endif _gtk_sheet_scrollbar_adjust(sheet); if (gtk_widget_get_realized(GTK_WIDGET(sheet))) { if (sheet->row_titles_visible) { size_allocate_row_title_buttons(sheet); gdk_window_show(sheet->row_title_window); } if (sheet->column_titles_visible) { _gtk_sheet_column_buttons_size_allocate(sheet); gdk_window_show(sheet->column_title_window); } } GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IS_FROZEN); if (gtk_sheet_autoresize(sheet)) { GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_AUTORESIZE_PENDING); } _gtk_sheet_redraw_internal(sheet, TRUE, TRUE); if (sheet->state == GTK_STATE_NORMAL) { if (sheet->sheet_entry && gtk_widget_get_mapped(sheet->sheet_entry)) { gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); /* gtk_sheet_entry_signal_connect_changed(sheet, gtk_sheet_entry_changed_handler); gtk_sheet_show_active_cell(sheet); */ } } } /** * gtk_sheet_set_row_titles_width: * @sheet: a #GtkSheet * @width: row titles width. * * Resize row titles area. */ void gtk_sheet_set_row_titles_width(GtkSheet *sheet, guint width) { if (width < GTK_SHEET_COLUMN_MIN_WIDTH) return; sheet->row_title_area.width = width; _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_left_xpixels(sheet); _gtk_sheet_recalc_view_range(sheet); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, TRUE, FALSE); } /** * gtk_sheet_show_row_titles: * @sheet: a #GtkSheet * * Show row titles . */ void gtk_sheet_show_row_titles(GtkSheet *sheet) { gint row; if (sheet->row_titles_visible) return; sheet->row_titles_visible = TRUE; _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_left_xpixels(sheet); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (GTK_SHEET_IS_FROZEN(sheet)) return; gdk_window_show(sheet->row_title_window); gdk_window_move_resize(sheet->row_title_window, sheet->row_title_area.x, sheet->row_title_area.y, sheet->row_title_area.width, sheet->row_title_area.height); for (row = MIN_VIEW_ROW(sheet); row <= MAX_VIEW_ROW(sheet) && row <= sheet->maxrow; row++) { GtkSheetChild *child; if (row < 0 || row > sheet->maxrow) continue; child = sheet->row[row].button.child; if (child) _gtk_sheet_child_show(child); } _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, TRUE, FALSE); } /** * gtk_sheet_hide_row_titles: * @sheet: a #GtkSheet * * Hide row titles . */ void gtk_sheet_hide_row_titles(GtkSheet *sheet) { gint row; if (!sheet->row_titles_visible) return; sheet->row_titles_visible = FALSE; _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_left_xpixels(sheet); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (GTK_SHEET_IS_FROZEN(sheet)) return; if (sheet->row_title_window) gdk_window_hide(sheet->row_title_window); if (gtk_widget_get_visible(sheet->button)) gtk_widget_hide(sheet->button); for (row = MIN_VIEW_ROW(sheet); row <= MAX_VIEW_ROW(sheet) && row <= sheet->maxrow; row++) { GtkSheetChild *child; if (row < 0 || row > sheet->maxrow) continue; child = sheet->row[row].button.child; if (child) _gtk_sheet_child_hide(child); } _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, TRUE, FALSE); } /** * gtk_sheet_row_titles_visible: * @sheet: a #GtkSheet * * Get the visibility of row column titles . * * Returns: TRUE or FALSE */ gboolean gtk_sheet_row_titles_visible(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->row_titles_visible); } /** * gtk_sheet_set_row_title: * @sheet: a #GtkSheet * @row: row number * @title: row title * * Set row title. */ void gtk_sheet_set_row_title(GtkSheet *sheet, gint row, const gchar *title) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (sheet->row[row].name) g_free(sheet->row[row].name); sheet->row[row].name = g_strdup(title); } /** * gtk_sheet_get_row_title: * @sheet: a #GtkSheet * @row: row number * * Get row title. * * Returns: a pointer to the row title or NULL. * Do not modify or free it. */ const gchar * gtk_sheet_get_row_title(GtkSheet *sheet, gint row) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); return (sheet->row[row].name); } /** * gtk_sheet_row_button_add_label: * @sheet: a #GtkSheet * @row: row number * @label: text label * * Set button label.It is used to set a row title. */ void gtk_sheet_row_button_add_label(GtkSheet *sheet, gint row, const gchar *label) { GtkSheetButton *button; GtkRequisition req; gboolean aux_c, aux_r; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; button = &sheet->row[row].button; if (button->label) g_free(button->label); button->label = g_strdup(label); aux_c = gtk_sheet_autoresize_columns(sheet); aux_r = gtk_sheet_autoresize_rows(sheet); gtk_sheet_set_autoresize(sheet, FALSE); gtk_sheet_set_autoresize_rows(sheet, TRUE); _gtk_sheet_button_size_request(sheet, button, &req); gtk_sheet_set_autoresize_columns(sheet, aux_c); gtk_sheet_set_autoresize_rows(sheet, aux_r); if (req.height > sheet->row[row].height) gtk_sheet_set_row_height(sheet, row, req.height); if (req.width > sheet->row_title_area.width) { gtk_sheet_set_row_titles_width(sheet, req.width); } if (!GTK_SHEET_IS_FROZEN(sheet)) { _gtk_sheet_draw_button(sheet, row, -1); } g_signal_emit(GTK_OBJECT(sheet), sheet_signals[CHANGED], 0, row, -1); } /** * gtk_sheet_row_button_get_label: * @sheet: a #GtkSheet * @row: row number * * Get a row button label. * * Returns: In case of succes , a pointer to label * text.Otherwise NULL */ const gchar * gtk_sheet_row_button_get_label(GtkSheet *sheet, gint row) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (row < 0 || row > sheet->maxrow) return (NULL); return (sheet->row[row].button.label); } /** * gtk_sheet_row_label_set_visibility: * @sheet: a #GtkSheet * @row: row number * @visible: TRUE or FALSE * * Set row label visibility. */ void gtk_sheet_row_label_set_visibility(GtkSheet *sheet, gint row, gboolean visible) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; sheet->row[row].button.label_visible = visible; if (!GTK_SHEET_IS_FROZEN(sheet)) { _gtk_sheet_draw_button(sheet, row, -1); g_signal_emit(GTK_OBJECT(sheet), sheet_signals[CHANGED], 0, row, -1); } } /** * gtk_sheet_rows_labels_set_visibility: * @sheet: a #GtkSheet * @visible: TRUE or FALSE * * Set all rows label visibility. The sheet itself * has no such property, this is a convenience function to set * the property for all existing rows. */ void gtk_sheet_rows_labels_set_visibility(GtkSheet *sheet, gboolean visible) { gint i; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); for (i = 0; i <= sheet->maxrow; i++) gtk_sheet_row_label_set_visibility(sheet, i, visible); } /** * gtk_sheet_row_button_justify: * @sheet: a #GtkSheet. * @row: row number * @justification: a #GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, * CENTER * * Set the justification(alignment) of the row buttons. */ void gtk_sheet_row_button_justify(GtkSheet *sheet, gint row, GtkJustification justification) { GtkSheetButton *button; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; button = &sheet->row[row].button; button->justification = justification; if (!GTK_SHEET_IS_FROZEN(sheet)) { _gtk_sheet_draw_button(sheet, row, -1); } } /** * gtk_sheet_moveto: * @sheet: a #GtkSheet. * @row: row number * @column: column number * @row_align: row alignment * @col_align: column alignment * * Scroll the viewing area of the sheet to the given column and row; * * row_align and col_align are between 0-1 representing the location * the row should appear on the screnn, 0 being top or left, * 1 being bottom or right. * * passing row_align/col_align of -1 will suppress movement in * that direction. * * if row or column is negative then there is no change */ void gtk_sheet_moveto(GtkSheet *sheet, gint row, gint col, gint row_align, gint col_align) { gint x, y; guint width, height; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); g_return_if_fail(sheet->hadjustment != NULL); g_return_if_fail(sheet->vadjustment != NULL); #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_moveto: row %d col %d row_align %d col_align %d", row, col, row_align, col_align); #endif if (row < 0 || row > sheet->maxrow) return; if (col < 0 || col > sheet->maxcol) return; height = sheet->sheet_window_height; width = sheet->sheet_window_width; /* adjust vertical scrollbar */ if (row >= 0 && row_align >= 0) { if (row_align == 0) /* align top cell border */ { y = _gtk_sheet_row_top_ypixel(sheet, row) - sheet->voffset; if (sheet->column_titles_visible) y -= sheet->column_title_area.height; /* to bottom edge of title area*/ } else /* align bottom cell border */ { y = _gtk_sheet_row_top_ypixel(sheet, row) - sheet->voffset + sheet->row[row].height; y -= height; /* to bottom edge of window */ } #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("gtk_sheet_moveto: rowTpx %d voffs %d height %d rheight %d colTw %s y %d", _gtk_sheet_row_top_ypixel(sheet, row), sheet->voffset, height, sheet->row[row].height, sheet->column_titles_visible ? "Yes" : "No", y); #endif if (y < 0) gtk_adjustment_set_value(sheet->vadjustment, 0.0); else gtk_adjustment_set_value(sheet->vadjustment, y); sheet->old_vadjustment = -1.; if (sheet->vadjustment) { g_signal_emit_by_name(GTK_OBJECT(sheet->vadjustment), "value_changed"); } } /* adjust horizontal scrollbar */ if (col >= 0 && col_align >= 0) /* left or right align */ { if (col_align == 0) /* align left cell border */ { x = _gtk_sheet_column_left_xpixel(sheet, col) - sheet->hoffset; if (sheet->row_titles_visible) x -= sheet->row_title_area.width; /* to right edge of title area*/ } else /* align right cell border */ { x = _gtk_sheet_column_left_xpixel(sheet, col) - sheet->hoffset + COLPTR(sheet, col)->width; x -= width; /* to right edge of window */ } #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("gtk_sheet_moveto: colLpx %d hoffs %d width %d cwidth %d rowTw %s x %d", _gtk_sheet_column_left_xpixel(sheet, col), sheet->hoffset, width, COLPTR(sheet, col)->width, sheet->row_titles_visible ? "Yes" : "No", x); #endif if (x < 0) gtk_adjustment_set_value(sheet->hadjustment, 0.0); else gtk_adjustment_set_value(sheet->hadjustment, x); sheet->old_hadjustment = -1.; if (sheet->hadjustment) { g_signal_emit_by_name(GTK_OBJECT(sheet->hadjustment), "value_changed"); } } } /** * gtk_sheet_row_sensitive: * @sheet: a #GtkSheet. * @row: row number * * Get row button sensitivity. * * Returns: * TRUE - is sensitive, * FALSE - insensitive or not existant */ gboolean gtk_sheet_row_sensitive(GtkSheet *sheet, gint row) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if (row < 0 || row > sheet->maxrow) return (FALSE); return (GTK_SHEET_ROW_IS_SENSITIVE(ROWPTR(sheet, row))); } /** * gtk_sheet_row_set_sensitivity: * @sheet: a #GtkSheet. * @row: row number * @sensitive: TRUE or FALSE * * Set row button sensitivity. If sensitivity is TRUE can be toggled, otherwise it acts as a title . */ void gtk_sheet_row_set_sensitivity(GtkSheet *sheet, gint row, gboolean sensitive) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; GTK_SHEET_ROW_SET_SENSITIVE(ROWPTR(sheet, row), sensitive); if (!sensitive) sheet->row[row].button.state = GTK_STATE_INSENSITIVE; else sheet->row[row].button.state = GTK_STATE_NORMAL; if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && !GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_draw_button(sheet, row, -1); } /** * gtk_sheet_rows_set_sensitivity: * @sheet: a #GtkSheet. * @sensitive: TRUE or FALSE * * Set rows buttons sensitivity. If sensitivity is TRUE button * can be toggled, otherwise act as titles. The sheet itself * has no such property, it is a convenience function to set the * property for all existing rows. */ void gtk_sheet_rows_set_sensitivity(GtkSheet *sheet, gboolean sensitive) { gint i; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); for (i = 0; i <= sheet->maxrow; i++) gtk_sheet_row_set_sensitivity(sheet, i, sensitive); } /** * gtk_sheet_rows_set_resizable: * @sheet: a #GtkSheet. * @resizable: TRUE or FALSE * * Set rows resizable status. */ void gtk_sheet_rows_set_resizable(GtkSheet *sheet, gboolean resizable) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->rows_resizable = resizable; } /** * gtk_sheet_rows_resizable: * @sheet: a #GtkSheet. * * Get rows resizable status. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_rows_resizable(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->rows_resizable); } /** * gtk_sheet_row_visible: * @sheet: a #GtkSheet. * @row: row number * * Get row visibility. * * Returns: * TRUE - is visible * FALSE - invisible or not existant */ gboolean gtk_sheet_row_visible(GtkSheet *sheet, gint row) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if (row < 0 || row > sheet->maxrow) return (FALSE); return (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))); } /** * gtk_sheet_row_set_visibility: * @sheet: a #GtkSheet. * @row: row number * @visible: TRUE or FALSE * * Set row visibility. The default value is TRUE. If FALSE, the row is hidden. */ void gtk_sheet_row_set_visibility(GtkSheet *sheet, gint row, gboolean visible) { GtkSheetRow *rowobj; gint act_row, act_col; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; rowobj = ROWPTR(sheet, row); if (GTK_SHEET_ROW_IS_VISIBLE(rowobj) == visible) return; act_row = sheet->active_cell.row; act_col = sheet->active_cell.col; if (act_row == row) /* hide active column -> disable active cell */ { _gtk_sheet_hide_active_cell(sheet); sheet->active_cell.row = -1; sheet->active_cell.col = -1; } act_row = sheet->active_cell.row; act_col = sheet->active_cell.col; GTK_SHEET_ROW_SET_VISIBLE(rowobj, visible); _gtk_sheet_range_fixup(sheet, &sheet->range); _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, FALSE, TRUE); } /** * gtk_sheet_get_tooltip_markup: * @sheet: a #GtkSheet. * * Gets the contents of the tooltip (markup) for sheet * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_get_tooltip_markup(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); return (gtk_widget_get_tooltip_markup(GTK_WIDGET(sheet))); } /** * gtk_sheet_set_tooltip_markup: * @sheet: a #GtkSheet. * @markup: the contents of the tooltip for widget, or NULL. * * Sets markup as the contents of the tooltip, which is marked * up with the Pango text markup language. */ void gtk_sheet_set_tooltip_markup(GtkSheet *sheet, const gchar *markup) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); gtk_widget_set_tooltip_markup(GTK_WIDGET(sheet), markup); } /** * gtk_sheet_get_tooltip_text: * @sheet: a #GtkSheet. * * Gets the contents of the tooltip for the #GtkSheet * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_get_tooltip_text(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); return (gtk_widget_get_tooltip_text(GTK_WIDGET(sheet))); } /** * gtk_sheet_set_tooltip_text: * @sheet: a #GtkSheet. * @text: the contents of the tooltip for widget * * Sets text as the contents of the tooltip. */ void gtk_sheet_set_tooltip_text(GtkSheet *sheet, const gchar *text) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); gtk_widget_set_tooltip_text(GTK_WIDGET(sheet), text); } /** * gtk_sheet_row_get_tooltip_markup: * @sheet: a #GtkSheet. * @row: row index * * Gets the contents of the tooltip (markup) for the column * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_row_get_tooltip_markup(GtkSheet *sheet, const gint row) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (row < 0 || row > sheet->maxrow) return (NULL); return (g_strdup(ROWPTR(sheet, row)->tooltip_markup)); } /** * gtk_sheet_row_set_tooltip_markup: * @sheet: a #GtkSheet. * @row: row index * @markup: the contents of the tooltip for widget, or NULL. * * Sets markup as the contents of the tooltip, which is marked * up with the Pango text markup language. */ void gtk_sheet_row_set_tooltip_markup(GtkSheet *sheet, const gint row, const gchar *markup) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; if (sheet->row[row].tooltip_markup) g_free(sheet->row[row].tooltip_markup); sheet->row[row].tooltip_markup = g_strdup(markup); } /** * gtk_sheet_row_get_tooltip_text: * @sheet: a #GtkSheet. * @row: row index * * Gets the contents of the tooltip for the column * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_row_get_tooltip_text(GtkSheet *sheet, const gint row) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (row < 0 || row > sheet->maxrow) return (NULL); return (g_strdup(ROWPTR(sheet, row)->tooltip_text)); } /** * gtk_sheet_row_set_tooltip_text: * @sheet: a #GtkSheet. * @row: row index * @text: the contents of the tooltip for widget * * Sets text as the contents of the tooltip. */ void gtk_sheet_row_set_tooltip_text(GtkSheet *sheet, const gint row, const gchar *text) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; if (sheet->row[row].tooltip_text) g_free(sheet->row[row].tooltip_text); sheet->row[row].tooltip_text = g_strdup(text); } /** * gtk_sheet_cell_get_tooltip_markup: * @sheet: a #GtkSheet. * @row: row index * @col: column index * * Gets the contents of the tooltip (markup) for the column * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_cell_get_tooltip_markup(GtkSheet *sheet, const gint row, const gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); if (row < 0 || row > sheet->maxrow) return (NULL); if (row > sheet->maxallocrow || col > sheet->maxalloccol) return (NULL); if (!sheet->data[row]) return (NULL); if (!sheet->data[row][col]) return (NULL); return (g_strdup(sheet->data[row][col]->tooltip_markup)); } /** * gtk_sheet_cell_set_tooltip_markup: * @sheet: a #GtkSheet. * @row: row index * @col: column index * @markup: the contents of the tooltip for widget, or NULL. * * Sets markup as the contents of the tooltip, which is marked * up with the Pango text markup language. */ void gtk_sheet_cell_set_tooltip_markup(GtkSheet *sheet, const gint row, const gint col, const gchar *markup) { GtkSheetCell *cell; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; if (row < 0 || row > sheet->maxrow) return; CheckCellData(sheet, row, col); cell = sheet->data[row][col]; if (cell->tooltip_markup) { g_free(cell->tooltip_markup); cell->tooltip_markup = NULL; } cell->tooltip_markup = g_strdup(markup); } /** * gtk_sheet_cell_get_tooltip_text: * @sheet: a #GtkSheet. * @row: row index * @col: column index * * Gets the contents of the tooltip for the column * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_cell_get_tooltip_text(GtkSheet *sheet, const gint row, const gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); if (row < 0 || row > sheet->maxrow) return (NULL); if (row > sheet->maxallocrow || col > sheet->maxalloccol) return (NULL); if (!sheet->data[row]) return (NULL); if (!sheet->data[row][col]) return (NULL); return (g_strdup(sheet->data[row][col]->tooltip_text)); } /** * gtk_sheet_cell_set_tooltip_text: * @sheet: a #GtkSheet. * @row: row index * @col: column index * @text: the contents of the tooltip for widget * * Sets text as the contents of the tooltip. */ void gtk_sheet_cell_set_tooltip_text(GtkSheet *sheet, const gint row, const gint col, const gchar *text) { GtkSheetCell *cell; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; if (row < 0 || row > sheet->maxrow) return; CheckCellData(sheet, row, col); cell = sheet->data[row][col]; if (cell->tooltip_text) { g_free(cell->tooltip_text); cell->tooltip_text = NULL; } cell->tooltip_text = g_strdup(text); } /** * gtk_sheet_select_row: * @sheet: a #GtkSheet. * @row: row number * * Select the row. The range is then highlighted, and the bounds are stored in sheet->range. */ void gtk_sheet_select_row(GtkSheet *sheet, gint row) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; if (sheet->state != GTK_SHEET_NORMAL) { gtk_sheet_real_unselect_range(sheet, NULL); } else { gboolean veto = TRUE; veto = gtk_sheet_deactivate_cell(sheet); if (!veto) return; } sheet->state = GTK_SHEET_ROW_SELECTED; sheet->range.row0 = row; sheet->range.col0 = 0; sheet->range.rowi = row; sheet->range.coli = sheet->maxcol; sheet->active_cell.row = row; sheet->active_cell.col = 0; g_signal_emit(GTK_OBJECT(sheet), sheet_signals[SELECT_ROW], 0, row); gtk_sheet_real_select_range(sheet, NULL); } /** * gtk_sheet_select_column: * @sheet: a #GtkSheet. * @column: column number * * Select the column. The range is then highlighted, and the bounds are stored in sheet->range. */ void gtk_sheet_select_column(GtkSheet *sheet, gint column) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (column < 0 || column > sheet->maxcol) return; if (sheet->state != GTK_SHEET_NORMAL) { gtk_sheet_real_unselect_range(sheet, NULL); } else { gboolean veto = TRUE; veto = gtk_sheet_deactivate_cell(sheet); if (!veto) return; } sheet->state = GTK_SHEET_COLUMN_SELECTED; sheet->range.row0 = 0; sheet->range.col0 = column; sheet->range.rowi = sheet->maxrow; sheet->range.coli = column; sheet->active_cell.row = 0; sheet->active_cell.col = column; g_signal_emit(GTK_OBJECT(sheet), sheet_signals[SELECT_COLUMN], 0, column); gtk_sheet_real_select_range(sheet, NULL); } /** * gtk_sheet_clip_range: * @sheet: a #GtkSheet. * @clip_range: #GtkSheetRange to be saved * * Save selected range to "clipboard". */ void gtk_sheet_clip_range(GtkSheet *sheet, const GtkSheetRange *clip_range) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (GTK_SHEET_IN_CLIP(sheet)) return; GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_CLIP); if (clip_range == NULL) sheet->clip_range = sheet->range; else sheet->clip_range = *clip_range; sheet->interval = 0; sheet->clip_timer = g_timeout_add_full(0, TIMEOUT_FLASH, gtk_sheet_flash, sheet, NULL); g_signal_emit(GTK_OBJECT(sheet), sheet_signals[CLIP_RANGE], 0, &sheet->clip_range); } /** * gtk_sheet_unclip_range: * @sheet: a #GtkSheet. * * Free clipboard. */ void gtk_sheet_unclip_range(GtkSheet *sheet) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!GTK_SHEET_IN_CLIP(sheet)) return; GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_CLIP); g_source_remove(sheet->clip_timer); _gtk_sheet_range_draw(sheet, &sheet->clip_range, TRUE); if (gtk_sheet_range_isvisible(sheet, sheet->range)) _gtk_sheet_range_draw(sheet, &sheet->range, TRUE); } /** * gtk_sheet_in_clip: * @sheet: a #GtkSheet. * * Get the clip status of #GtkSheet. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_in_clip(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (GTK_SHEET_IN_CLIP(sheet)); } static gint gtk_sheet_flash(gpointer data) { GtkSheet *sheet; gint x, y, width, height; GdkRectangle clip_area; sheet = GTK_SHEET(data); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return (TRUE); if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return (TRUE); if (!gtk_sheet_range_isvisible(sheet, sheet->clip_range)) return (TRUE); if (GTK_SHEET_IN_XDRAG(sheet)) return (TRUE); if (GTK_SHEET_IN_YDRAG(sheet)) return (TRUE); GDK_THREADS_ENTER(); x = _gtk_sheet_column_left_xpixel(sheet, sheet->clip_range.col0) + 1; y = _gtk_sheet_row_top_ypixel(sheet, sheet->clip_range.row0) + 1; width = _gtk_sheet_column_left_xpixel(sheet, sheet->clip_range.coli) - x + COLPTR(sheet, sheet->clip_range.coli)->width - 1; height = _gtk_sheet_row_top_ypixel(sheet, sheet->clip_range.rowi) - y + sheet->row[sheet->clip_range.rowi].height - 1; clip_area.x = _gtk_sheet_column_left_xpixel(sheet, MIN_VIEW_COLUMN(sheet)); clip_area.y = _gtk_sheet_row_top_ypixel(sheet, MIN_VIEW_ROW(sheet)); clip_area.width = sheet->sheet_window_width; clip_area.height = sheet->sheet_window_height; if (x < 0) { width = width + x + 1; x = -1; } if (width > clip_area.width) width = clip_area.width + 10; if (y < 0) { height = height + y + 1; y = -1; } if (height > clip_area.height) height = clip_area.height + 10; gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x, y, x, y, 1, height); gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x, y, x, y, width, 1); gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x, y + height, x, y + height, width, 1); gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x + width, y, x + width, y, 1, height); sheet->interval = sheet->interval + 1; if (sheet->interval == TIME_INTERVAL) sheet->interval = 0; gdk_gc_set_dashes(sheet->xor_gc, sheet->interval, (gint8 *)"\4\4", 2); gtk_sheet_draw_flashing_range(sheet, sheet->clip_range); gdk_gc_set_dashes(sheet->xor_gc, 0, (gint8 *)"\4\4", 2); GDK_THREADS_LEAVE(); return (TRUE); } static void gtk_sheet_draw_flashing_range(GtkSheet *sheet, GtkSheetRange range) { GdkRectangle clip_area; gint x, y, width, height; if (!gtk_sheet_range_isvisible(sheet, sheet->clip_range)) return; clip_area.x = _gtk_sheet_column_left_xpixel(sheet, MIN_VIEW_COLUMN(sheet)); clip_area.y = _gtk_sheet_row_top_ypixel(sheet, MIN_VIEW_ROW(sheet)); clip_area.width = sheet->sheet_window_width; clip_area.height = sheet->sheet_window_height; gdk_gc_set_clip_rectangle(sheet->xor_gc, &clip_area); x = _gtk_sheet_column_left_xpixel(sheet, sheet->clip_range.col0) + 1; y = _gtk_sheet_row_top_ypixel(sheet, sheet->clip_range.row0) + 1; width = _gtk_sheet_column_left_xpixel(sheet, sheet->clip_range.coli) - x + COLPTR(sheet, sheet->clip_range.coli)->width - 1; height = _gtk_sheet_row_top_ypixel(sheet, sheet->clip_range.rowi) - y + sheet->row[sheet->clip_range.rowi].height - 1; if (x < 0) { width = width + x + 1; x = -1; } if (width > clip_area.width) width = clip_area.width + 10; if (y < 0) { height = height + y + 1; y = -1; } if (height > clip_area.height) height = clip_area.height + 10; gdk_gc_set_line_attributes(sheet->xor_gc, 1, 1, 0, 0); gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, FALSE, x, y, width, height); gdk_gc_set_line_attributes(sheet->xor_gc, 1, 0, 0, 0); gdk_gc_set_clip_rectangle(sheet->xor_gc, NULL); } static gint gtk_sheet_range_isvisible(GtkSheet *sheet, GtkSheetRange range) { g_return_val_if_fail(sheet != NULL, FALSE); if (range.row0 > MAX_VIEW_ROW(sheet)) return (FALSE); if (range.rowi < MIN_VIEW_ROW(sheet)) return (FALSE); if (range.col0 > MAX_VIEW_COLUMN(sheet)) return (FALSE); if (range.coli < MIN_VIEW_COLUMN(sheet)) return (FALSE); return (TRUE); } static gint gtk_sheet_cell_isvisible(GtkSheet *sheet, gint row, gint column) { GtkSheetRange range; range.row0 = row; range.col0 = column; range.rowi = row; range.coli = column; return (gtk_sheet_range_isvisible(sheet, range)); } /** * gtk_sheet_get_visible_range: * @sheet: a #GtkSheet. * @range: a selected #GtkSheetRange * struct _GtkSheetRange { gint row0,col0; // upper-left cell * gint rowi,coli; // lower-right cell }; * * Get sheet's ranges in a #GkSheetRange structure. */ void gtk_sheet_get_visible_range(GtkSheet *sheet, GtkSheetRange *range) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); g_return_if_fail(range != NULL); range->row0 = MIN_VIEW_ROW(sheet); range->col0 = MIN_VIEW_COLUMN(sheet); range->rowi = MAX_VIEW_ROW(sheet); range->coli = MAX_VIEW_COLUMN(sheet); } /** * gtk_sheet_get_vadjustment: * @sheet: a #GtkSheet. * * Get vertical scroll adjustments. * * Returns: (transfer none) a #GtkAdjustment */ GtkAdjustment * gtk_sheet_get_vadjustment(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); return (sheet->vadjustment); } /** * gtk_sheet_get_hadjustment: * @sheet: a #GtkSheet. * * Get horizontal scroll adjustments. * * Returns: (transfer none) a #GtkAdjustment */ GtkAdjustment * gtk_sheet_get_hadjustment(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); return (sheet->hadjustment); } /** * gtk_sheet_set_vadjustment: * @sheet: a #GtkSheet. * @adjustment: a #GtkAdjustment * * Change vertical scroll adjustments. */ void gtk_sheet_set_vadjustment(GtkSheet *sheet, GtkAdjustment *adjustment) { GtkAdjustment *old_adjustment; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (adjustment) g_return_if_fail(GTK_IS_ADJUSTMENT(adjustment)); if (sheet->vadjustment == adjustment) return; old_adjustment = sheet->vadjustment; if (sheet->vadjustment) { g_signal_handlers_disconnect_matched( GTK_OBJECT(sheet->vadjustment), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, sheet); g_object_unref(G_OBJECT(sheet->vadjustment)); } sheet->vadjustment = adjustment; if (sheet->vadjustment) { g_object_ref(G_OBJECT(sheet->vadjustment)); g_object_ref_sink(G_OBJECT(sheet->vadjustment)); g_object_unref(G_OBJECT(sheet->vadjustment)); g_signal_connect(GTK_OBJECT(sheet->vadjustment), "changed", (void *)_vadjustment_changed_handler, (gpointer)sheet); g_signal_connect(GTK_OBJECT(sheet->vadjustment), "value_changed", (void *)_vadjustment_value_changed_handler, (gpointer)sheet); } if (!sheet->vadjustment || !old_adjustment) { gtk_widget_queue_resize(GTK_WIDGET(sheet)); return; } sheet->old_vadjustment = gtk_adjustment_get_value(sheet->vadjustment); } /** * gtk_sheet_set_hadjustment: * @sheet: a #GtkSheet. * @adjustment: a #GtkAdjustment * * Change horizontal scroll adjustments. */ void gtk_sheet_set_hadjustment(GtkSheet *sheet, GtkAdjustment *adjustment) { GtkAdjustment *old_adjustment; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (adjustment) g_return_if_fail(GTK_IS_ADJUSTMENT(adjustment)); if (sheet->hadjustment == adjustment) return; old_adjustment = sheet->hadjustment; if (sheet->hadjustment) { g_signal_handlers_disconnect_matched( GTK_OBJECT(sheet->hadjustment), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, sheet); g_object_unref(GTK_OBJECT(sheet->hadjustment)); } sheet->hadjustment = adjustment; if (sheet->hadjustment) { g_object_ref(G_OBJECT(sheet->hadjustment)); g_object_ref_sink(G_OBJECT(sheet->hadjustment)); g_object_unref(G_OBJECT(sheet->hadjustment)); g_signal_connect(GTK_OBJECT(sheet->hadjustment), "changed", (void *)_hadjustment_changed_handler, (gpointer)sheet); g_signal_connect(GTK_OBJECT(sheet->hadjustment), "value_changed", (void *)_hadjustment_value_changed_handler, (gpointer)sheet); } if (!sheet->hadjustment || !old_adjustment) { gtk_widget_queue_resize(GTK_WIDGET(sheet)); return; } sheet->old_hadjustment = gtk_adjustment_get_value(sheet->hadjustment); } /** * gtk_sheet_set_scroll_adjustments: * @sheet: a #GtkSheet. * @hadjustment: a #GtkAdjustment * @vadjustment: a #GtkAdjustment * * Change horizontal and vertical scroll adjustments. */ static void gtk_sheet_set_scroll_adjustments(GtkSheet *sheet, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment) { #if GTK_SHEET_DEBUG_SIGNALS > 0 g_debug("SIGNAL set-scroll-adjustments %p", sheet); #endif if (sheet->hadjustment != hadjustment) gtk_sheet_set_hadjustment(sheet, hadjustment); if (sheet->vadjustment != vadjustment) gtk_sheet_set_vadjustment(sheet, vadjustment); } /* * gtk_sheet_finalize_handler: * * this is the #GtkSheet object class "finalize" signal handler * * @param object the #GtkSheet */ static void gtk_sheet_finalize_handler(GObject *object) { GtkSheet *sheet; g_return_if_fail(object != NULL); g_return_if_fail(GTK_IS_SHEET(object)); sheet = GTK_SHEET(object); /* get rid of all the cells */ gtk_sheet_range_clear(sheet, NULL); gtk_sheet_range_delete(sheet, NULL); gtk_sheet_delete_rows(sheet, 0, sheet->maxrow + 1); gtk_sheet_delete_columns(sheet, 0, sheet->maxcol + 1); DeleteRow(sheet, 0, sheet->maxrow + 1); DeleteColumn(sheet, 0, sheet->maxcol + 1); g_free(sheet->row); sheet->row = NULL; if (sheet->column) /* free remaining column array, no gobjects there */ { g_free(sheet->column); sheet->column = NULL; } g_free(sheet->data); sheet->data = NULL; if (sheet->title) { g_free(sheet->title); sheet->title = NULL; } if (G_OBJECT_CLASS(sheet_parent_class)->finalize) (*G_OBJECT_CLASS(sheet_parent_class)->finalize)(object); } /* * gtk_sheet_destroy_handler: * * this is the #GtkSheet object class "finalize" handler * * @param object */ static void gtk_sheet_destroy_handler(GtkObject *object) { GtkSheet *sheet; GList *children; g_return_if_fail(object != NULL); g_return_if_fail(GTK_IS_SHEET(object)); sheet = GTK_SHEET(object); /* destroy the entry */ if (sheet->sheet_entry && GTK_IS_WIDGET(sheet->sheet_entry)) { gtk_widget_destroy(sheet->sheet_entry); sheet->sheet_entry = NULL; } /* destroy the global selection button */ if (sheet->button && GTK_IS_WIDGET(sheet->button)) { #if GTK_SHEET_DEBUG_REALIZE > 0 g_debug("gtk_sheet_destroy: destroying old entry %p", sheet->button); #endif gtk_widget_destroy(sheet->button); sheet->button = NULL; } if (sheet->timer) { g_source_remove(sheet->timer); sheet->timer = 0; } if (sheet->clip_timer) { g_source_remove(sheet->clip_timer); sheet->clip_timer = 0; } /* unref adjustments */ if (sheet->hadjustment) { g_signal_handlers_disconnect_matched( GTK_OBJECT(sheet->hadjustment), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, sheet); g_object_unref(G_OBJECT(sheet->hadjustment)); sheet->hadjustment = NULL; } if (sheet->vadjustment) { g_signal_handlers_disconnect_matched( GTK_OBJECT(sheet->vadjustment), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, sheet); g_object_unref(G_OBJECT(sheet->vadjustment)); sheet->vadjustment = NULL; } children = sheet->children; while (children) { GtkSheetChild *child = (GtkSheetChild *)children->data; if (child && child->widget) gtk_sheet_remove_handler(GTK_CONTAINER(sheet), child->widget); children = sheet->children; } sheet->children = NULL; GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IS_DESTROYED); if (GTK_OBJECT_CLASS(sheet_parent_class)->destroy) (*GTK_OBJECT_CLASS(sheet_parent_class)->destroy)(object); } /* * gtk_sheet_style_set_handler: * * this is the #GtkSheet widget class "style-set" signal handler * * @param widget the #GtkSheet * @param previous_style */ static void gtk_sheet_style_set_handler(GtkWidget *widget, GtkStyle *previous_style) { GtkSheet *sheet; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_SHEET(widget)); if (GTK_WIDGET_CLASS(sheet_parent_class)->style_set) (*GTK_WIDGET_CLASS(sheet_parent_class)->style_set)(widget, previous_style); sheet = GTK_SHEET(widget); if (gtk_widget_get_realized(widget)) { gtk_style_set_background(gtk_widget_get_style(widget), gtk_widget_get_window(widget), gtk_widget_get_state(widget)); } } /* * gtk_sheet_realize_handler: * * this is the #GtkSheet widget class "realize" signal handler * * @param widget the #GtkSheet */ static void gtk_sheet_realize_handler(GtkWidget *widget) { GtkSheet *sheet; GdkWindowAttr attributes; gint attributes_mask; GdkGCValues values, auxvalues; GdkColormap *colormap; GtkSheetChild *child; GList *children; GtkAllocation allocation; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_SHEET(widget)); sheet = GTK_SHEET(widget); /* we need to recalc all positions, because row/column visibility may have changed between adding rows/cols and realisation PR#92947 */ _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_left_xpixels(sheet); #if GTK_SHEET_DEBUG_REALIZE > 0 g_debug("gtk_sheet_realize_handler: called (%p)", sheet->sheet_entry); #endif gtk_widget_set_realized_true(GTK_WIDGET(widget)); gtk_widget_get_allocation(widget, &allocation); attributes.window_type = GDK_WINDOW_CHILD; attributes.x = allocation.x; attributes.y = allocation.y; attributes.width = allocation.width; attributes.height = allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual(widget); attributes.colormap = gtk_widget_get_colormap(widget); attributes.event_mask = gtk_widget_get_events(widget); attributes.event_mask |= ( GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_CURSOR; attributes.cursor = gdk_cursor_new(GDK_TOP_LEFT_ARROW); /* main window */ gtk_widget_set_window(widget, gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask)); gdk_window_set_user_data(gtk_widget_get_window(widget), sheet); gtk_widget_set_style(widget, gtk_style_attach(gtk_widget_get_style(widget), gtk_widget_get_window(widget))); gtk_style_set_background(gtk_widget_get_style(widget), gtk_widget_get_window(widget), GTK_STATE_NORMAL); attributes.x = 0; if (sheet->row_titles_visible) attributes.x = sheet->row_title_area.width; attributes.y = 0; attributes.width = sheet->column_title_area.width; attributes.height = sheet->column_title_area.height; /* column-title window */ sheet->column_title_window = gdk_window_new( gtk_widget_get_window(widget), &attributes, attributes_mask); gdk_window_set_user_data(sheet->column_title_window, sheet); gtk_style_set_background(gtk_widget_get_style(widget), sheet->column_title_window, GTK_STATE_NORMAL); attributes.x = 0; attributes.y = 0; if (sheet->column_titles_visible) attributes.y = sheet->column_title_area.height; attributes.width = sheet->row_title_area.width; attributes.height = sheet->row_title_area.height; /* row-title window */ sheet->row_title_window = gdk_window_new( gtk_widget_get_window(widget), &attributes, attributes_mask); gdk_window_set_user_data(sheet->row_title_window, sheet); gtk_style_set_background(gtk_widget_get_style(widget), sheet->row_title_window, GTK_STATE_NORMAL); /* sheet-window */ attributes.cursor = gdk_cursor_new(GDK_PLUS); attributes.x = 0; attributes.y = 0; attributes.width = sheet->sheet_window_width; attributes.height = sheet->sheet_window_height; sheet->sheet_window = gdk_window_new( gtk_widget_get_window(widget), &attributes, attributes_mask); gdk_window_set_user_data(sheet->sheet_window, sheet); gdk_window_set_background(sheet->sheet_window, &(gtk_widget_get_style(widget)->white)); gdk_window_show(sheet->sheet_window); /* backing_pixmap */ gtk_sheet_make_backing_pixmap(sheet, 0, 0); /* GCs */ if (sheet->fg_gc) gdk_gc_unref(sheet->fg_gc); sheet->fg_gc = gdk_gc_new(gtk_widget_get_window(widget)); if (sheet->bg_gc) gdk_gc_unref(sheet->bg_gc); sheet->bg_gc = gdk_gc_new(gtk_widget_get_window(widget)); colormap = gtk_widget_get_colormap(widget); gdk_color_white(colormap, &(gtk_widget_get_style(widget)->white)); gdk_color_black(colormap, &(gtk_widget_get_style(widget)->black)); gdk_gc_get_values(sheet->fg_gc, &auxvalues); values.foreground = gtk_widget_get_style(widget)->white; values.function = GDK_INVERT; values.subwindow_mode = GDK_INCLUDE_INFERIORS; if (sheet->xor_gc) gdk_gc_unref(sheet->xor_gc); sheet->xor_gc = gdk_gc_new_with_values(gtk_widget_get_window(widget), &values, GDK_GC_FOREGROUND | GDK_GC_FUNCTION | GDK_GC_SUBWINDOW); if (gtk_widget_get_parent(sheet->sheet_entry)) { g_object_ref(sheet->sheet_entry); gtk_widget_unparent(sheet->sheet_entry); } gtk_widget_set_parent_window(sheet->sheet_entry, sheet->sheet_window); gtk_widget_set_parent(sheet->sheet_entry, GTK_WIDGET(sheet)); if (sheet->button && gtk_widget_get_parent(sheet->button)) { g_object_ref(sheet->button); gtk_widget_unparent(sheet->button); } gtk_widget_set_parent_window(sheet->button, sheet->sheet_window); gtk_widget_set_parent(sheet->button, GTK_WIDGET(sheet)); /* gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); */ if (!sheet->cursor_drag) sheet->cursor_drag = gdk_cursor_new(GDK_PLUS); if (sheet->column_titles_visible) gdk_window_show(sheet->column_title_window); if (sheet->row_titles_visible) gdk_window_show(sheet->row_title_window); size_allocate_row_title_buttons(sheet); _gtk_sheet_column_buttons_size_allocate(sheet); if (sheet->title) /* re-initialize title to update GUI */ { gchar *existing_title = g_strdup(sheet->title); gtk_sheet_set_title(sheet, existing_title); g_free(existing_title); } children = sheet->children; while (children) { child = children->data; children = children->next; gtk_sheet_realize_child(sheet, child); } } /* * global_button_clicked_handler: * this is the #GtkSheet global sheet button "button-press-event" handler. * * It will handle single-clicks of button 1 internally, selecting/deselecting * all sheet cells. All other button press events are propagated to the sheet. * * You cann connect your own "button-press-event" handler to the sheet * widget, and will receive all non-internally handled button-press-events. * * @param widget the global sheet button that received the signal * @param event the GdkEventButton which triggered this signal * @param data the #GtkSheet passed on signal connection * * @return TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. */ static gboolean global_button_press_handler(GtkWidget *widget, GdkEventButton *event, gpointer data) { gboolean veto; GtkSheet *sheet = GTK_SHEET(data); gboolean retval = FALSE; if (!retval && (event->type == GDK_BUTTON_PRESS) && (event->button == 1)) { gtk_sheet_click_cell(sheet, -1, -1, &veto); gtk_widget_grab_focus(GTK_WIDGET(sheet)); } else { g_signal_emit_by_name(GTK_WIDGET(sheet), "button_press_event", event, &retval); } return(retval); } static void create_global_button(GtkSheet *sheet) { sheet->button = gtk_button_new_with_label(" "); g_signal_connect(GTK_OBJECT(sheet->button), "button-press-event", G_CALLBACK(global_button_press_handler), (gpointer)sheet); } static void size_allocate_global_button(GtkSheet *sheet) { GtkAllocation allocation; if (!sheet->column_titles_visible) return; if (!sheet->row_titles_visible) return; gtk_widget_size_request(sheet->button, NULL); allocation.x = 0; allocation.y = 0; allocation.width = sheet->row_title_area.width; allocation.height = sheet->column_title_area.height; gtk_widget_size_allocate(sheet->button, &allocation); gtk_widget_show(sheet->button); } /* * gtk_sheet_unrealize_handler: * * this is the #GtkSheet widget class "unrealize" signal handler * * @param widget the #GtkSheet */ static void gtk_sheet_unrealize_handler(GtkWidget *widget) { GtkSheet *sheet; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_SHEET(widget)); sheet = GTK_SHEET(widget); gdk_cursor_destroy(sheet->cursor_drag); gdk_gc_destroy(sheet->xor_gc); gdk_gc_destroy(sheet->fg_gc); gdk_gc_destroy(sheet->bg_gc); gdk_window_destroy(sheet->sheet_window); gdk_window_destroy(sheet->column_title_window); gdk_window_destroy(sheet->row_title_window); if (sheet->pixmap) { g_object_unref(G_OBJECT(sheet->pixmap)); sheet->pixmap = NULL; } sheet->column_title_window = NULL; sheet->sheet_window = NULL; sheet->cursor_drag = NULL; sheet->xor_gc = NULL; sheet->fg_gc = NULL; sheet->bg_gc = NULL; if (GTK_WIDGET_CLASS(sheet_parent_class)->unrealize) (*GTK_WIDGET_CLASS(sheet_parent_class)->unrealize)(widget); } /* * gtk_sheet_map_handler: * * this is the #GtkSheet widget class "map" signal handler * * @param widget the #GtkSheet */ static void gtk_sheet_map_handler(GtkWidget *widget) { GtkSheet *sheet; GtkWidget *WdChild; GtkSheetChild *child; GList *children; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_SHEET(widget)); sheet = GTK_SHEET(widget); #if GTK_SHEET_DEBUG_EXPOSE > 0 g_debug("gtk_sheet_map_handler: called"); #endif if (!gtk_widget_get_mapped(widget)) { gtk_widget_set_mapped_true(GTK_WIDGET(widget)); if (!sheet->cursor_drag) sheet->cursor_drag = gdk_cursor_new(GDK_PLUS); gdk_window_show(gtk_widget_get_window(widget)); gdk_window_show(sheet->sheet_window); if (sheet->column_titles_visible) { _gtk_sheet_column_buttons_size_allocate(sheet); gdk_window_show(sheet->column_title_window); } if (sheet->row_titles_visible) { size_allocate_row_title_buttons(sheet); gdk_window_show(sheet->row_title_window); } #if 0 /* this will be done by gtk_sheet_activate_cell() below, it causes trouble when there is no active cell in the sheet, because sheet_entry will start to process events */ if (!gtk_widget_get_mapped (sheet->sheet_entry)) { gtk_widget_show (sheet->sheet_entry); gtk_widget_map (sheet->sheet_entry); } #endif if (gtk_widget_get_visible(sheet->button) && !gtk_widget_get_mapped(sheet->button)) { gtk_widget_show(sheet->button); gtk_widget_map(sheet->button); } if ((WdChild = gtk_bin_get_child(GTK_BIN(sheet->button)))) { if (gtk_widget_get_visible(WdChild) && !gtk_widget_get_mapped(WdChild)) { gtk_widget_map(WdChild); } } #if GTK_SHEET_DEBUG_EXPOSE > 0 g_debug("gtk_sheet_map_handler: calling _gtk_sheet_range_draw"); #endif _gtk_sheet_recalc_view_range(sheet); _gtk_sheet_range_draw(sheet, NULL, TRUE); /* this was already done above - why again? gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); */ children = sheet->children; while (children) { child = children->data; children = children->next; if (gtk_widget_get_visible(child->widget) && !gtk_widget_get_mapped(child->widget)) { gtk_widget_map(child->widget); gtk_sheet_position_child(sheet, child); } } } } /* * gtk_sheet_unmap_handler: * * this is the #GtkSheet widget class "unmap" signal handler * * @param widget the #GtkSheet */ static void gtk_sheet_unmap_handler(GtkWidget *widget) { GtkSheet *sheet; GtkSheetChild *child; GList *children; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_SHEET(widget)); sheet = GTK_SHEET(widget); #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("gtk_sheet_unmap: called"); #endif if (gtk_widget_get_mapped(widget)) { gtk_widget_set_mapped_false(GTK_WIDGET(widget)); gdk_window_hide(sheet->sheet_window); if (sheet->column_titles_visible) gdk_window_hide(sheet->column_title_window); if (sheet->row_titles_visible) gdk_window_hide(sheet->row_title_window); gdk_window_hide(gtk_widget_get_window(widget)); if (gtk_widget_get_mapped(sheet->sheet_entry)) gtk_widget_unmap(sheet->sheet_entry); if (gtk_widget_get_mapped(sheet->button)) gtk_widget_unmap(sheet->button); children = sheet->children; while (children) { child = children->data; children = children->next; if (gtk_widget_get_visible(child->widget) && gtk_widget_get_mapped(child->widget)) { gtk_widget_unmap(child->widget); } } } } /* * gtk_sheet_draw_tm - draw tooltip marker * * @param sheet */ static void gtk_sheet_draw_tooltip_marker(GtkSheet *sheet, GtkSheetArea area, const gint row, const gint col) { switch(area) { case ON_CELL_AREA: if (row <= sheet->maxallocrow && col <= sheet->maxalloccol && sheet->data[row] && sheet->data[row][col]) { GtkSheetCell *cell = sheet->data[row][col]; if (cell->tooltip_markup || cell->tooltip_text) { GdkPoint p[3]; gdk_gc_set_foreground(sheet->bg_gc, &sheet->tm_color); p[0].x = _gtk_sheet_column_left_xpixel(sheet, col) + COLPTR(sheet, col)->width - GTK_SHEET_DEFAULT_TM_SIZE; p[0].y = _gtk_sheet_row_top_ypixel(sheet, row) + 1; p[1].x = p[0].x + GTK_SHEET_DEFAULT_TM_SIZE; p[1].y = p[0].y; p[2].x = p[1].x; p[2].y = p[1].y + GTK_SHEET_DEFAULT_TM_SIZE; /* draw cell tooltip marker */ gdk_draw_polygon(sheet->pixmap, sheet->bg_gc, TRUE, p, 3); } } break; case ON_ROW_TITLES_AREA: if (0 <= row && row <= sheet->maxrow) { GtkSheetRow *rowp = ROWPTR(sheet, row); GdkWindow *window = sheet->row_title_window; if (rowp->tooltip_markup || rowp->tooltip_text) { GdkPoint p[3]; gdk_gc_set_foreground(sheet->bg_gc, &sheet->tm_color); p[0].x = sheet->row_title_area.width - 1 - GTK_SHEET_DEFAULT_TM_SIZE; p[0].y = _gtk_sheet_row_top_ypixel(sheet, row) + 1; if (sheet->column_titles_visible) p[0].y -= sheet->column_title_area.height; p[1].x = p[0].x + GTK_SHEET_DEFAULT_TM_SIZE; p[1].y = p[0].y; p[2].x = p[1].x; p[2].y = p[1].y + GTK_SHEET_DEFAULT_TM_SIZE; /* draw cell tooltip marker */ gdk_draw_polygon(window, sheet->bg_gc, TRUE, p, 3); } } break; case ON_COLUMN_TITLES_AREA: if (0 <= col && col <= sheet->maxcol) { GtkSheetColumn *column = COLPTR(sheet, col); GdkWindow *window = sheet->column_title_window; if (gtk_widget_get_has_tooltip(GTK_WIDGET(column))) { GdkPoint p[3]; gdk_gc_set_foreground(sheet->bg_gc, &sheet->tm_color); p[0].x = _gtk_sheet_column_right_xpixel(sheet, col) + CELL_SPACING - 1 - GTK_SHEET_DEFAULT_TM_SIZE; if (sheet->row_titles_visible) p[0].x -= sheet->row_title_area.width; p[0].y = 0; p[1].x = p[0].x + GTK_SHEET_DEFAULT_TM_SIZE; p[1].y = p[0].y; p[2].x = p[1].x; p[2].y = p[1].y + GTK_SHEET_DEFAULT_TM_SIZE; /* draw cell tooltip marker */ gdk_draw_polygon(window, sheet->bg_gc, TRUE, p, 3); } } break; default: return; } } static void _cell_draw_background(GtkSheet *sheet, gint row, gint col) { GtkWidget *widget; GdkGC * fg_gc, *bg_gc; GdkRectangle area; g_return_if_fail(sheet != NULL); /* bail now if we arn't drawable yet */ if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return; if (row < 0 || row > sheet->maxrow) return; if (col < 0 || col > sheet->maxcol) return; if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) return; if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) return; widget = GTK_WIDGET(sheet); GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); /* select GC for background rectangle */ gdk_gc_set_foreground(sheet->fg_gc, &attributes.foreground); gdk_gc_set_foreground(sheet->bg_gc, &attributes.background); fg_gc = sheet->fg_gc; bg_gc = sheet->bg_gc; area.x = _gtk_sheet_column_left_xpixel(sheet, col); area.y = _gtk_sheet_row_top_ypixel(sheet, row); area.width = COLPTR(sheet, col)->width; area.height = ROWPTR(sheet, row)->height; #if GTK_SHEET_DEBUG_DRAW_BACKGROUND>0 #if 1 g_debug("_cell_draw_background(%d,%d): cellbg x %d y %d w %d h %d %s", row, col, area.x, area.y, area.width, area.height, gdk_color_to_string(&attributes.background)); #endif #endif /* fill cell background */ gdk_draw_rectangle(sheet->pixmap, bg_gc, TRUE, area.x, area.y, area.width, area.height); gdk_gc_set_line_attributes(sheet->fg_gc, 1, 0, 0, 0); if (sheet->show_grid) { gdk_gc_set_foreground(sheet->bg_gc, &sheet->grid_color); #if GTK_SHEET_DEBUG_DRAW_BACKGROUND>0 #if 0 g_debug("_cell_draw_background(%d,%d): grid x %d y %d w %d h %d %s", row, col, area.x, area.y, area.width, area.height, gdk_color_to_string(&attributes.background)); #endif #endif /* draw grid rectangle */ gdk_draw_rectangle(sheet->pixmap, sheet->bg_gc, FALSE, area.x, area.y, area.width, area.height); } gtk_sheet_draw_tooltip_marker(sheet, ON_CELL_AREA, row, col); } static void _cell_draw_border(GtkSheet *sheet, gint row, gint col, gint mask) { GtkWidget *widget; GdkGC * fg_gc, *bg_gc; GdkRectangle area; guint width; g_return_if_fail(sheet != NULL); /* bail now if we arn't drawable yet */ if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return; if (row < 0 || row > sheet->maxrow) return; if (col < 0 || col > sheet->maxcol) return; if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) return; if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) return; widget = GTK_WIDGET(sheet); GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); /* select GC for background rectangle */ gdk_gc_set_foreground(sheet->fg_gc, &attributes.border.color); gdk_gc_set_foreground(sheet->bg_gc, &attributes.background); fg_gc = sheet->fg_gc; bg_gc = sheet->bg_gc; area.x = _gtk_sheet_column_left_xpixel(sheet, col); area.y = _gtk_sheet_row_top_ypixel(sheet, row); area.width = COLPTR(sheet, col)->width; area.height = sheet->row[row].height; width = attributes.border.width; gdk_gc_set_line_attributes(sheet->fg_gc, attributes.border.width, attributes.border.line_style, attributes.border.cap_style, attributes.border.join_style); if (width > 0) { if (attributes.border.mask & GTK_SHEET_LEFT_BORDER & mask) gdk_draw_line(sheet->pixmap, sheet->fg_gc, area.x, area.y - width / 2, area.x, area.y + area.height + width / 2 + 1); if (attributes.border.mask & GTK_SHEET_RIGHT_BORDER & mask) gdk_draw_line(sheet->pixmap, sheet->fg_gc, area.x + area.width, area.y - width / 2, area.x + area.width, area.y + area.height + width / 2 + 1); if (attributes.border.mask & GTK_SHEET_TOP_BORDER & mask) gdk_draw_line(sheet->pixmap, sheet->fg_gc, area.x - width / 2, area.y, area.x + area.width + width / 2 + 1, area.y); if (attributes.border.mask & GTK_SHEET_BOTTOM_BORDER & mask) gdk_draw_line(sheet->pixmap, sheet->fg_gc, area.x - width / 2, area.y + area.height, area.x + area.width + width / 2 + 1, area.y + area.height); } } static void _cell_draw_label(GtkSheet *sheet, gint row, gint col) { GtkWidget *widget; GdkRectangle area, clip_area; gint i; gint text_width, text_height, y; gint xoffset = 0; gint size, sizel, sizer; GdkGC *gc; PangoLayout *layout; PangoRectangle rect; PangoFontMetrics *metrics; PangoContext *context = gtk_widget_get_pango_context(GTK_WIDGET(sheet)); gint ascent, descent, spacing, y_pos; GtkSheetVerticalJustification vjust; gchar * label, *dataformat; g_return_if_fail(sheet != NULL); /* bail now if we aren't drawable yet */ if (!GTK_WIDGET_DRAWABLE(sheet)) return; if (row < 0 || row > sheet->maxallocrow) return; if (col < 0 || col > sheet->maxalloccol) return; if (!sheet->data[row]) return; if (!sheet->data[row][col]) return; if (!sheet->data[row][col]->text || !sheet->data[row][col]->text[0]) return; if (row < 0 || row > sheet->maxrow) return; if (col < 0 || col > sheet->maxcol) return; /* bail now if we aren't drawable yet */ if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return; GtkSheetColumn *colptr = COLPTR(sheet, col); if (!GTK_SHEET_COLUMN_IS_VISIBLE(colptr)) return; if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) return; widget = GTK_WIDGET(sheet); label = sheet->data[row][col]->text; dataformat = gtk_sheet_column_get_format(sheet, col); if (dataformat) label = gtk_data_format(label, dataformat); GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); /* select GC for background rectangle */ gdk_gc_set_foreground(sheet->fg_gc, &attributes.foreground); gdk_gc_set_background(sheet->fg_gc, &attributes.background); gc = sheet->fg_gc; area.x = _gtk_sheet_column_left_xpixel(sheet, col); area.y = _gtk_sheet_row_top_ypixel(sheet, row); area.width = colptr->width; area.height = ROWPTR(sheet, row)->height; clip_area = area; layout = gtk_widget_create_pango_layout(GTK_WIDGET(sheet), label); pango_layout_set_font_description(layout, attributes.font_desc); if (!gtk_sheet_autoresize_columns(sheet)) { switch(colptr->wrap_mode) { case GTK_WRAP_NONE: break; case GTK_WRAP_CHAR: pango_layout_set_width(layout, colptr->width * PANGO_SCALE); pango_layout_set_wrap(layout, PANGO_WRAP_CHAR); break; case GTK_WRAP_WORD: pango_layout_set_width(layout, colptr->width * PANGO_SCALE); pango_layout_set_wrap(layout, PANGO_WRAP_WORD); break; case GTK_WRAP_WORD_CHAR: pango_layout_set_width(layout, colptr->width * PANGO_SCALE); pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); break; } } pango_layout_get_pixel_extents(layout, NULL, &rect); metrics = pango_context_get_metrics(context, attributes.font_desc, pango_context_get_language(context)); ascent = pango_font_metrics_get_ascent(metrics) / PANGO_SCALE; descent = pango_font_metrics_get_descent(metrics) / PANGO_SCALE; spacing = pango_layout_get_spacing(layout) / PANGO_SCALE; pango_font_metrics_unref(metrics); /* Align primarily for locale's ascent/descent */ /* vertical cell text justification */ { /* column->vjust overrides sheet->vjust */ vjust = colptr->vjust; if (vjust == GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT) vjust = sheet->vjust; /* Vertical justification is quantisized, so that all text lines using the same font appear vertically aligned, even if adjacent columns have different vjust settings. */ switch(vjust) { case GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT: case GTK_SHEET_VERTICAL_JUSTIFICATION_TOP: y_pos = CELLOFFSET; break; case GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE: { /* the following works only if the whole text is set with same metrics */ register gint line_height = ascent + descent + spacing; register gint area_lines = area.height / line_height; register gint text_lines = rect.height / line_height; y_pos = CELLOFFSET - ((text_lines - area_lines) / 2) * line_height; } break; case GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM: { /* the following works only if the whole text is set with same metrics */ register gint line_height = ascent + descent + spacing; register gint area_lines = area.height / line_height; register gint area_height_quant = area_lines * line_height; y_pos = CELLOFFSET + area_height_quant - rect.height; } break; } y = area.y + y_pos; } text_width = rect.width; text_height = rect.height; switch(attributes.justification) { case GTK_JUSTIFY_RIGHT: size = area.width; /* start with col size */ area.x += area.width; /* anchor clip_area at right */ if (!gtk_sheet_clip_text(sheet)) /* text extends multiple cells */ { for (i = col - 1; i >= MIN_VIEW_COLUMN(sheet); i--) { GtkSheetColumn *cpi = COLPTR(sheet, i); if (i < 0 || i > sheet->maxcol) break; if (!GTK_SHEET_COLUMN_IS_VISIBLE(cpi)) continue; if (gtk_sheet_cell_get_text(sheet, row, i)) break; if (size >= text_width + CELLOFFSET) break; size += cpi->width; /* extend to left */ #if GTK_SHEET_OPTIMIZE_COLUMN_DRAW>0 /* note: this column draws text on cpi */ cpi->right_text_column = MAX(col, cpi->right_text_column); #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_cell_draw_label: right_text_column %d = %d", i, cpi->right_text_column); #endif #endif } area.width = size; /* extend clip area */ } area.x -= size; /* shift left */ xoffset += area.width - text_width - 2 * CELLOFFSET - attributes.border.width / 2; break; case GTK_JUSTIFY_CENTER: sizel = sizer = area.width / 2; /* start with half col size*/ area.x += area.width / 2; /* anchor clip_area at center */ if (!gtk_sheet_clip_text(sheet)) /* text extends multiple cells */ { for (i = col + 1; i <= MAX_VIEW_COLUMN(sheet) && i <= sheet->maxcol; i++) { GtkSheetColumn *cpi = COLPTR(sheet, i); if (!GTK_SHEET_COLUMN_IS_VISIBLE(cpi)) continue; if (gtk_sheet_cell_get_text(sheet, row, i)) break; if (sizer >= text_width / 2) break; sizer += cpi->width; /* extend to right */ #if GTK_SHEET_OPTIMIZE_COLUMN_DRAW>0 /* note: this column draws text on cpi */ cpi->left_text_column = MIN(col, cpi->left_text_column); #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_cell_draw_label: left_text_column %d = %d", i, cpi->left_text_column); #endif #endif } for (i = col - 1; i >= MIN_VIEW_COLUMN(sheet); i--) { GtkSheetColumn *cpi = COLPTR(sheet, i); if (i < 0 || i > sheet->maxcol) break; if (!GTK_SHEET_COLUMN_IS_VISIBLE(cpi)) continue; if (gtk_sheet_cell_get_text(sheet, row, i)) break; if (sizel >= text_width / 2) break; sizel += cpi->width; /* extend to left */ #if GTK_SHEET_OPTIMIZE_COLUMN_DRAW>0 /* note: this column draws text on cpi */ cpi->right_text_column = MAX(col, cpi->right_text_column); #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_cell_draw_label: right_text_column %d = %d", i, cpi->right_text_column); #endif #endif } area.width = sizel + sizer; /* extend clip area */ } area.x -= sizel; /* shift left */ xoffset += sizel - text_width / 2 - CELLOFFSET; break; case GTK_JUSTIFY_LEFT: default: size = area.width; /* start with col size, anchor at left */ if (!gtk_sheet_clip_text(sheet)) /* text extends multiple cells */ { for (i = col + 1; i <= MAX_VIEW_COLUMN(sheet) && i <= sheet->maxcol; i++) { GtkSheetColumn *cpi = COLPTR(sheet, i); if (!GTK_SHEET_COLUMN_IS_VISIBLE(cpi)) continue; if (gtk_sheet_cell_get_text(sheet, row, i)) break; if (size >= text_width + CELLOFFSET) break; size += cpi->width; /* extend to right */ #if GTK_SHEET_OPTIMIZE_COLUMN_DRAW>0 /* note: this column draws text on cpi */ cpi->left_text_column = MIN(col, cpi->left_text_column); #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_cell_draw_label: left_text_column %d = %d", i, cpi->left_text_column); #endif #endif } area.width = size; /* extend clip area */ } xoffset += attributes.border.width / 2; break; } if (!gtk_sheet_clip_text(sheet)) /* text extends multiple cells */ clip_area = area; gdk_gc_set_clip_rectangle(gc, &clip_area); #if GTK_SHEET_DEBUG_DRAW_LABEL>0 #if 0 g_debug("_cell_draw_label(%d,%d): clip x %d y %d w %d h %d", row, col, clip_area.x, clip_area.y, clip_area.width, clip_area.height); #endif #endif #if GTK_SHEET_DEBUG_DRAW_LABEL>0 #if 1 g_debug("_cell_draw_label(%d,%d): x %d y %d fg %s bg %s", row, col, area.x + xoffset + CELLOFFSET, y, gdk_color_to_string(&attributes.foreground), gdk_color_to_string(&attributes.background) ); #endif #endif gdk_draw_layout(sheet->pixmap, gc, area.x + xoffset + CELLOFFSET, y, layout); g_object_unref(G_OBJECT(layout)); /* copy sheet->pixmap to window */ gdk_draw_pixmap(sheet->sheet_window, gc, sheet->pixmap, area.x, area.y, area.x, area.y, area.width, area.height); gdk_gc_set_clip_rectangle(gc, NULL); } /** * _gtk_sheet_range_draw: * @sheet: the #GtkSheet * @range: the #GtkSheetRange or NULL * @activate_active_cell: TRUE to activate active cell after * drawing * * draw visible part of range. * If @range == NULL then draw the whole screen. * */ void _gtk_sheet_range_draw(GtkSheet *sheet, const GtkSheetRange *range, gboolean activate_active_cell) { gint row, col; GtkSheetRange drawing_range; GdkRectangle area; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_SHEET(sheet)); #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: called"); #endif if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (!gtk_widget_get_mapped(GTK_WIDGET(sheet))) return; if (range) { drawing_range.row0 = MAX(range->row0, MIN_VIEW_ROW(sheet)); drawing_range.rowi = MIN(range->rowi, MAX_VIEW_ROW(sheet)); drawing_range.col0 = MAX(range->col0, MIN_VIEW_COLUMN(sheet)); drawing_range.coli = MIN(range->coli, MAX_VIEW_COLUMN(sheet)); } else { drawing_range.row0 = MIN_VIEW_ROW(sheet); drawing_range.rowi = MAX_VIEW_ROW(sheet); drawing_range.col0 = MIN_VIEW_COLUMN(sheet); drawing_range.coli = MAX_VIEW_COLUMN(sheet); } #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: row %d - %d col %d - %d", drawing_range.row0, drawing_range.rowi, drawing_range.col0, drawing_range.coli); #endif if (drawing_range.row0 > drawing_range.rowi) return; if (drawing_range.col0 > drawing_range.coli) return; /* gdk_draw_rectangle (sheet->pixmap, GTK_WIDGET(sheet)->style->white_gc, TRUE, 0,0, sheet->sheet_window_width,sheet->sheet_window_height); */ /* clear outer area beyond rightmost column */ if (drawing_range.coli >= MAX_VIEW_COLUMN(sheet)) { gint maxcol = MAX_VIEW_COLUMN(sheet); /* might not be visible */ if (maxcol > sheet->maxcol) maxcol = sheet->maxcol; while (maxcol >= 0 && !GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, maxcol))) --maxcol; if (maxcol >= 0) { area.x = _gtk_sheet_column_left_xpixel(sheet, maxcol) + COLPTR(sheet, maxcol)->width; } else { area.x = sheet->hoffset; if (sheet->row_titles_visible) area.x += sheet->row_title_area.width; } area.width = sheet->sheet_window_width - area.x; area.y = 0; area.height = sheet->sheet_window_height; if (area.width > 0) /* beware, rightmost column might be partially visible */ { #if 0 gdk_gc_set_foreground(sheet->fg_gc, &sheet->bg_color); #else gdk_gc_set_foreground(sheet->fg_gc, >k_widget_get_style(GTK_WIDGET(sheet))->bg[GTK_STATE_NORMAL]); #endif gdk_draw_rectangle(sheet->pixmap, sheet->fg_gc, TRUE, /* filled */ area.x, area.y, area.width, area.height); gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, area.x, area.y, area.x, area.y, area.width, area.height); } } /* clear outer area beyond last row */ if (drawing_range.rowi >= MAX_VIEW_ROW(sheet)) { gint maxrow = MAX_VIEW_ROW(sheet); /* might not be visible */ if (maxrow > sheet->maxrow) maxrow = sheet->maxrow; while (maxrow >= 0 && !GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, maxrow))) --maxrow; area.x = 0; area.width = sheet->sheet_window_width; if (maxrow >= 0) { area.y = _gtk_sheet_row_top_ypixel(sheet, maxrow) + ROWPTR(sheet, maxrow)->height; } else { area.y = sheet->voffset; if (sheet->column_titles_visible) area.y += sheet->column_title_area.height; } area.height = sheet->sheet_window_height - area.y; if (area.height > 0) /* beware, last row might be partially visible */ { #if 0 gdk_gc_set_foreground(sheet->fg_gc, &sheet->bg_color); #else gdk_gc_set_foreground(sheet->fg_gc, >k_widget_get_style(GTK_WIDGET(sheet))->bg[GTK_STATE_NORMAL]); #endif gdk_draw_rectangle(sheet->pixmap, sheet->fg_gc, TRUE, /* filled */ area.x, area.y, area.width, area.height); gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, area.x, area.y, area.x, area.y, area.width, area.height); } } /* extend the drawing range to include all text sources */ if (drawing_range.col0 < 0) drawing_range.col0 = 0; if (drawing_range.col0 > sheet->maxcol) drawing_range.col0 = sheet->maxcol; if (drawing_range.coli < 0) drawing_range.coli = 0; if (drawing_range.coli > sheet->maxcol) drawing_range.coli = sheet->maxcol; if (!gtk_sheet_clip_text(sheet)) /* text extends multiple cells */ { drawing_range.col0 = MIN_VIEW_COLUMN(sheet); drawing_range.coli = MAX_VIEW_COLUMN(sheet); #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: extended: row %d - %d col %d - %d", drawing_range.row0, drawing_range.rowi, drawing_range.col0, drawing_range.coli); #endif } /* draw grid and cells */ for (row = drawing_range.row0; row <= drawing_range.rowi; row++) { for (col = drawing_range.col0; col <= drawing_range.coli; col++) { _cell_draw_background(sheet, row, col); } } for (row = drawing_range.row0; row <= drawing_range.rowi; row++) { for (col = drawing_range.col0; col <= drawing_range.coli; col++) { _cell_draw_border(sheet, row - 1, col, GTK_SHEET_BOTTOM_BORDER); _cell_draw_border(sheet, row + 1, col, GTK_SHEET_TOP_BORDER); _cell_draw_border(sheet, row, col - 1, GTK_SHEET_RIGHT_BORDER); _cell_draw_border(sheet, row, col + 1, GTK_SHEET_LEFT_BORDER); _cell_draw_border(sheet, row, col, 15); } } /* draw text within range (1) */ #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: (1) row %d - %d col %d - %d", drawing_range.row0, drawing_range.rowi, drawing_range.col0, drawing_range.coli); #endif for (row = drawing_range.row0; row <= drawing_range.rowi; row++) { for (col = drawing_range.col0; col <= drawing_range.coli; col++) { if (row <= sheet->maxallocrow && col <= sheet->maxalloccol && sheet->data[row] && sheet->data[row][col]) { _cell_draw_label(sheet, row, col); } } } #if 0 /* draw text left outside range (2) */ if (0 <= drawing_range.col0 && drawing_range.col0 <= sheet->maxcol) { #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: (2) row %d - %d col %d - %d", drawing_range.row0, drawing_range.rowi, COLPTR(sheet, drawing_range.col0)->left_text_column, drawing_range.col0 - 1); #endif for (row = drawing_range.row0; row <= drawing_range.rowi; row++) { for (col = COLPTR(sheet, drawing_range.col0)->left_text_column; col < drawing_range.col0; col++) { #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: (2) %d %d", row, col); #endif if (row <= sheet->maxallocrow && col <= sheet->maxalloccol && sheet->data[row] && sheet->data[row][col]) { _cell_draw_background(sheet, row, col); _cell_draw_label(sheet, row, col); } } } } /* draw text right outside range (3) */ if (0 <= drawing_range.coli && drawing_range.coli <= sheet->maxcol) { #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: (3) row %d - %d col %d - %d", drawing_range.row0, drawing_range.rowi, drawing_range.coli + 1, COLPTR(sheet, drawing_range.coli)->right_text_column); #endif for (row = drawing_range.row0; row <= drawing_range.rowi; row++) { for (col = drawing_range.coli + 1; col <= COLPTR(sheet, drawing_range.coli)->right_text_column; col++) { #if GTK_SHEET_DEBUG_DRAW > 0 g_debug("_gtk_sheet_range_draw: (3) %d %d", row, col); #endif _cell_draw_background(sheet, row, col); if (row <= sheet->maxallocrow && col <= sheet->maxalloccol && sheet->data[row] && sheet->data[row][col]) { _cell_draw_label(sheet, row, col); } } } } #endif gtk_sheet_draw_backing_pixmap(sheet, drawing_range); if (sheet->state != GTK_SHEET_NORMAL && gtk_sheet_range_isvisible(sheet, sheet->range)) { gtk_sheet_range_draw_selection(sheet, drawing_range); } if (activate_active_cell && sheet->state == GTK_STATE_NORMAL && sheet->active_cell.row >= drawing_range.row0 && sheet->active_cell.row <= drawing_range.rowi && sheet->active_cell.col >= drawing_range.col0 && sheet->active_cell.col <= drawing_range.coli) { gtk_sheet_show_active_cell(sheet); } } static void gtk_sheet_range_draw_selection(GtkSheet *sheet, GtkSheetRange range) { GdkRectangle area; gint i, j; GtkSheetRange aux; if (range.col0 > sheet->range.coli || range.coli < sheet->range.col0 || range.row0 > sheet->range.rowi || range.rowi < sheet->range.row0) { #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_range_draw_selection: range outside"); #endif return; } if (!gtk_sheet_range_isvisible(sheet, range)) { #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_range_draw_selection: range invisible"); #endif return; } if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; aux = range; range.col0 = MAX(sheet->range.col0, range.col0); range.coli = MIN(sheet->range.coli, range.coli); range.row0 = MAX(sheet->range.row0, range.row0); range.rowi = MIN(sheet->range.rowi, range.rowi); range.col0 = MAX(range.col0, MIN_VIEW_COLUMN(sheet)); range.coli = MIN(range.coli, MAX_VIEW_COLUMN(sheet)); range.row0 = MAX(range.row0, MIN_VIEW_ROW(sheet)); range.rowi = MIN(range.rowi, MAX_VIEW_ROW(sheet)); #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_range_draw_selection: range r %d-%d c %d-%d", range.row0, range.rowi, range.col0, range.coli); #endif for (i = range.row0; i <= range.rowi; i++) { if (i > sheet->maxrow) break; for (j = range.col0; j <= range.coli; j++) { if (j > sheet->maxcol) break; if (gtk_sheet_cell_get_state(sheet, i, j) == GTK_STATE_SELECTED && GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, j)) && GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) { row_button_set(sheet, i); _gtk_sheet_column_button_set(sheet, j); area.x = _gtk_sheet_column_left_xpixel(sheet, j); area.y = _gtk_sheet_row_top_ypixel(sheet, i); area.width = COLPTR(sheet, j)->width; area.height = sheet->row[i].height; if (i == sheet->range.row0) { area.y = area.y + 2; area.height = area.height - 2; } if (i == sheet->range.rowi) area.height = area.height - 3; if (j == sheet->range.col0) { area.x = area.x + 2; area.width = area.width - 2; } if (j == sheet->range.coli) area.width = area.width - 3; if (i != sheet->active_cell.row || j != sheet->active_cell.col) { gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, area.x + 1, area.y + 1, area.width, area.height); } } } } gtk_sheet_draw_border(sheet, sheet->range); } static void gtk_sheet_draw_backing_pixmap(GtkSheet *sheet, GtkSheetRange range) { gint x, y, width, height; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; x = _gtk_sheet_column_left_xpixel(sheet, range.col0); y = _gtk_sheet_row_top_ypixel(sheet, range.row0); width = _gtk_sheet_column_left_xpixel(sheet, range.coli) - x; if (0 <= range.coli && range.coli <= sheet->maxcol) width += COLPTR(sheet, range.coli)->width; height = _gtk_sheet_row_top_ypixel(sheet, range.rowi) - y; if (0 <= range.rowi && range.rowi <= sheet->maxrow) height += sheet->row[range.rowi].height; if (range.row0 == sheet->range.row0) { y = y - 5; height = height + 5; } if (range.rowi == sheet->range.rowi) height = height + 5; if (range.col0 == sheet->range.col0) { x = x - 5; width = width + 5; } if (range.coli == sheet->range.coli) width = width + 5; width = MIN(width, sheet->sheet_window_width - x); height = MIN(height, sheet->sheet_window_height - y); x--; y--; width += 2; height += 2; x = (sheet->row_titles_visible) ? MAX(x, sheet->row_title_area.width) : MAX(x, 0); y = (sheet->column_titles_visible) ? MAX(y, sheet->column_title_area.height) : MAX(y, 0); if (range.coli >= sheet->maxcol) width = sheet->sheet_window_width - x; if (range.rowi >= sheet->maxrow) height = sheet->sheet_window_height - y; #if GTK_SHEET_DEBUG_EXPOSE > 0 g_debug("gtk_sheet_draw_backing_pixmap: x %d y %d w %d h %d", x, y, width + 1, height + 1); #endif gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x, y, x, y, width + 1, height + 1); } static inline void gtk_sheet_cell_init(GtkSheetCell *cell) { cell->extent.x = cell->extent.y = 0; cell->extent.width = cell->extent.height = 0; cell->row = cell->col = -1; cell->attributes = NULL; cell->text = cell->link = NULL; cell->tooltip_markup = cell->tooltip_text = NULL; } static void gtk_sheet_cell_finalize(GtkSheet *sheet, GtkSheetCell *cell) { g_return_if_fail(cell != NULL); if (cell->text) { g_free(cell->text); cell->text = NULL; if (GTK_IS_OBJECT(sheet) && G_OBJECT(sheet)->ref_count > 0) g_signal_emit(GTK_OBJECT(sheet), sheet_signals[CLEAR_CELL], 0, cell->row, cell->col); } if (cell->link) { cell->link = NULL; } if (cell->tooltip_markup) { g_free(cell->tooltip_markup); cell->tooltip_markup = NULL; } if (cell->tooltip_text) { g_free(cell->tooltip_text); cell->tooltip_text = NULL; } if (cell->attributes) { GtkSheetCellAttr *attributes = cell->attributes; if (attributes->font_desc && attributes->do_font_desc_free) { pango_font_description_free(attributes->font_desc); /* free */ attributes->font_desc = NULL; } g_free(attributes); cell->attributes = NULL; } } static GtkSheetCell * gtk_sheet_cell_new(void) { GtkSheetCell *cell = g_new(GtkSheetCell, 1); gtk_sheet_cell_init(cell); return (cell); } /** * gtk_sheet_set_cell_text: * @sheet: a #GtkSheet. * @row: row_number * @col: column number * @text: cell text * * Set cell contents and allocate memory if needed. No * justifcation is made. attributes and links remain unchanged. */ void gtk_sheet_set_cell_text(GtkSheet *sheet, gint row, gint col, const gchar *text) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col > sheet->maxcol || row > sheet->maxrow) return; if (col < 0 || row < 0) return; GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); gtk_sheet_set_cell(sheet, row, col, attributes.justification, text); } /** * gtk_sheet_set_cell: * @sheet: a #GtkSheet. * @row: row_number * @col: column number * @justification: a #GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER * @text: cell text * * Set cell contents and allocate memory if needed. */ void gtk_sheet_set_cell(GtkSheet *sheet, gint row, gint col, GtkJustification justification, const gchar *text) { GtkSheetCell *cell; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col > sheet->maxcol || row > sheet->maxrow) return; if (col < 0 || row < 0) return; #if GTK_SHEET_DEBUG_SET_CELL_TIMER > 0 GTimer *tm = g_timer_new(); #endif CheckCellData(sheet, row, col); #if 0 && GTK_SHEET_DEBUG_SET_CELL_TIMER > 0 g_debug("st1: %0.6f", g_timer_elapsed(tm, NULL)); #endif cell = sheet->data[row][col]; GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); attributes.justification = justification; gtk_sheet_set_cell_attributes(sheet, row, col, attributes); if (cell->text) { g_free(cell->text); cell->text = NULL; } if (text) { gchar *dataformat = gtk_sheet_column_get_format(sheet, col); if (dataformat) text = gtk_data_format_remove(text, dataformat); #if GTK_SHEET_DEBUG_SET_CELL_TEXT > 0 g_debug("gtk_sheet_set_cell[%p]: r %d c %d ar %d ac %d <%s>", sheet, row, col, sheet->active_cell.row, sheet->active_cell.col, text); #endif cell->text = g_strdup(text); } #if 0 && GTK_SHEET_DEBUG_SET_CELL_TIMER > 0 g_debug("st2: %0.6f", g_timer_elapsed(tm, NULL)); #endif _gtk_sheet_update_extent(sheet, cell, row, col); #if GTK_SHEET_DEBUG_SET_CELL_TIMER > 0 g_debug("st3: %0.6f", g_timer_elapsed(tm, NULL)); #endif if (attributes.is_visible) { gboolean need_draw = TRUE; /* PR#104553 - if sheet entry editor is active on the cell being modified, we need to update it's contents */ if (row == sheet->active_cell.row && col == sheet->active_cell.col) { #if GTK_SHEET_DEBUG_SET_CELL_TEXT > 0 g_debug("gtk_sheet_set_cell[%p]: update sheet entry"); #endif gtk_sheet_set_entry_text(sheet, text); /* PR#104553 */ } if (gtk_sheet_autoresize(sheet)) /* handle immediate resize */ { if (cell->text && cell->text[0]) { if (gtk_sheet_autoresize_columns(sheet)) { GtkSheetColumn *colptr = COLPTR(sheet, col); gint new_width = COLUMN_EXTENT_TO_WIDTH(colptr->max_extent_width); if (new_width != colptr->width) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_set_cell[%d]: set col width %d", col, new_width); #endif gtk_sheet_set_column_width(sheet, col, new_width); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_REDRAW_PENDING); need_draw = FALSE; } } if (gtk_sheet_autoresize_rows(sheet)) { GtkSheetRow *rowptr = ROWPTR(sheet, row); gint new_height = ROW_EXTENT_TO_HEIGHT(rowptr->max_extent_height); if (new_height != rowptr->height) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_set_cell[%d]: set row height %d", row, new_height); #endif gtk_sheet_set_row_height(sheet, row, new_height); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_REDRAW_PENDING); need_draw = FALSE; } } } } if (need_draw) { GtkSheetRange range; range.row0 = row; range.rowi = row; range.col0 = sheet->view.col0; range.coli = sheet->view.coli; if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } } #if GTK_SHEET_DEBUG_SET_CELL_TIMER > 0 g_debug("st4: %0.6f", g_timer_elapsed(tm, NULL)); #endif g_signal_emit(GTK_OBJECT(sheet), sheet_signals[CHANGED], 0, row, col); #if GTK_SHEET_DEBUG_SET_CELL_TIMER > 0 g_debug("st9: %0.6f", g_timer_elapsed(tm, NULL)); g_timer_destroy(tm); #endif } /** * gtk_sheet_cell_clear: * @sheet: a #GtkSheet. * @row: row_number * @column: column number * * Clear cell contents. */ void gtk_sheet_cell_clear(GtkSheet *sheet, gint row, gint column) { GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (column > sheet->maxcol || row > sheet->maxrow) return; if (column > sheet->maxalloccol || row > sheet->maxallocrow) return; if (column < 0 || row < 0) return; range.row0 = row; range.rowi = row; range.col0 = sheet->view.col0; range.coli = sheet->view.coli; gtk_sheet_real_cell_clear(sheet, row, column, FALSE); if (!GTK_SHEET_IS_FROZEN(sheet)) { _gtk_sheet_range_draw(sheet, &range, TRUE); } } /** * gtk_sheet_cell_delete: * @sheet: a #GtkSheet. * @row: row_number * @column: column number * * Clear cell contents and remove links. */ void gtk_sheet_cell_delete(GtkSheet *sheet, gint row, gint column) { GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (column > sheet->maxcol || row > sheet->maxrow) return; if (column > sheet->maxalloccol || row > sheet->maxallocrow) return; if (column < 0 || row < 0) return; range.row0 = row; range.rowi = row; range.col0 = sheet->view.col0; range.coli = sheet->view.coli; gtk_sheet_real_cell_clear(sheet, row, column, TRUE); if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } static void gtk_sheet_real_cell_clear(GtkSheet *sheet, gint row, gint column, gboolean delete) { GtkSheetCell *cell; if (row > sheet->maxallocrow || column > sheet->maxalloccol) return; if (!sheet->data[row]) return; cell = sheet->data[row][column]; if (!cell) return; if (cell->text) { g_free(cell->text); cell->text = NULL; if (GTK_IS_OBJECT(sheet) && G_OBJECT(sheet)->ref_count > 0) g_signal_emit(GTK_OBJECT(sheet), sheet_signals[CLEAR_CELL], 0, row, column); } if (cell->link) { cell->link = NULL; } if (cell->tooltip_markup) { g_free(cell->tooltip_markup); cell->tooltip_markup = NULL; } if (cell->tooltip_text) { g_free(cell->tooltip_text); cell->tooltip_text = NULL; } if (delete) { gtk_sheet_cell_finalize(sheet, cell); #if GTK_SHEET_DEBUG_ALLOCATION > 0 g_debug("gtk_sheet_real_cell_clear: freeing %d %d", row, column); #endif g_free(cell); sheet->data[row][column] = NULL; } } /** * gtk_sheet_range_clear: * @sheet: a #GtkSheet. * @range: a #GtkSheetRange * * Clear range contents. If range==NULL the whole sheet will be cleared. */ void gtk_sheet_range_clear(GtkSheet *sheet, const GtkSheetRange *range) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); gtk_sheet_real_range_clear(sheet, range, FALSE); } /** * gtk_sheet_range_delete: * @sheet: a #GtkSheet. * @range: a #GtkSheetRange * * Clear range contents and remove links. * FIXME:: if range==NULL whole sheet is deleted? */ void gtk_sheet_range_delete(GtkSheet *sheet, const GtkSheetRange *range) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); gtk_sheet_real_range_clear(sheet, range, TRUE); } static void gtk_sheet_real_range_clear(GtkSheet *sheet, const GtkSheetRange *range, gboolean delete) { gint i, j; GtkSheetRange clear; if (!range) { clear.row0 = 0; clear.rowi = sheet->maxallocrow; clear.col0 = 0; clear.coli = sheet->maxalloccol; } else { clear = *range; } clear.row0 = MAX(clear.row0, 0); clear.col0 = MAX(clear.col0, 0); clear.rowi = MIN(clear.rowi, sheet->maxallocrow); clear.coli = MIN(clear.coli, sheet->maxalloccol); for (i = clear.row0; i <= clear.rowi; i++) { for (j = clear.col0; j <= clear.coli; j++) { gtk_sheet_real_cell_clear(sheet, i, j, delete); } } _gtk_sheet_range_draw(sheet, NULL, TRUE); } /** * gtk_sheet_cell_get_text: * @sheet: a #GtkSheet * @row: row number * @col: column number * * Get cell text. * * Returns: a pointer to the cell text, or NULL. * Do not modify or free it. */ gchar * gtk_sheet_cell_get_text (GtkSheet *sheet, gint row, gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col > sheet->maxcol || row > sheet->maxrow) return (NULL); if (col < 0 || row < 0) return (NULL); if (row > sheet->maxallocrow || col > sheet->maxalloccol) return (NULL); if (!sheet->data[row]) return (NULL); if (!sheet->data[row][col]) return (NULL); if (!sheet->data[row][col]->text) return (NULL); if (!sheet->data[row][col]->text[0]) return (NULL); return (sheet->data[row][col]->text); } /** * gtk_sheet_link_cell: * @sheet: a #GtkSheet * @row: row number * @col: column number * @link: pointer linked to the cell * * Link pointer to a cell. */ void gtk_sheet_link_cell(GtkSheet *sheet, gint row, gint col, gpointer link) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col > sheet->maxcol || row > sheet->maxrow) return; if (col < 0 || row < 0) return; CheckCellData(sheet, row, col); sheet->data[row][col]->link = link; } /** * gtk_sheet_get_link: * @sheet: a #GtkSheet * @row: row number * @col: column number * * Get link pointer from a cell. * * Returns: (transfer none) pointer linked to the cell */ gpointer gtk_sheet_get_link(GtkSheet *sheet, gint row, gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col > sheet->maxcol || row > sheet->maxrow) return (NULL); if (col < 0 || row < 0) return (NULL); if (row > sheet->maxallocrow || col > sheet->maxalloccol) return (NULL); if (!sheet->data[row]) return (NULL); /* Added by Chris Howell */ if (!sheet->data[row][col]) return (NULL); /* Added by Bob Lissner */ return (sheet->data[row][col]->link); } /** * gtk_sheet_remove_link: * @sheet: a #GtkSheet * @row: row number * @col: column number * * Remove link pointer from a cell. */ void gtk_sheet_remove_link(GtkSheet *sheet, gint row, gint col) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col > sheet->maxcol || row > sheet->maxrow) return; if (col < 0 || row < 0) return; /* Fixed by Andreas Voegele */ if (row <= sheet->maxallocrow && col <= sheet->maxalloccol && sheet->data[row] && sheet->data[row][col] && sheet->data[row][col]->link) sheet->data[row][col]->link = NULL; } /** * gtk_sheet_cell_get_state: * @sheet: a #GtkSheet * @row: row number * @col: column number * * Get status of a cell. * * Returns: a #GtkStateType: * GTK_SHEET_NORMAL,GTK_SHEET_ROW_SELECTED,GTK_SHEET_COLUMN_SELECTED,GTK_SHEET_RANGE_SELECTED */ GtkStateType gtk_sheet_cell_get_state(GtkSheet *sheet, gint row, gint col) { gint state; GtkSheetRange *range; g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); if (col > sheet->maxcol || row > sheet->maxrow) return (0); if (col < 0 || row < 0) return (0); state = sheet->state; range = &sheet->range; switch(state) { case GTK_SHEET_NORMAL: return (GTK_STATE_NORMAL); break; case GTK_SHEET_ROW_SELECTED: if (row >= range->row0 && row <= range->rowi) return (GTK_STATE_SELECTED); break; case GTK_SHEET_COLUMN_SELECTED: if (col >= range->col0 && col <= range->coli) return (GTK_STATE_SELECTED); break; case GTK_SHEET_RANGE_SELECTED: if (row >= range->row0 && row <= range->rowi &&\ col >= range->col0 && col <= range->coli) return (GTK_STATE_SELECTED); break; } return (GTK_STATE_NORMAL); } /** * gtk_sheet_get_pixel_info: * @sheet: a #GtkSheet * @window: base window for coordinates (null) * @x: x coordinate * @y: y coordinate * @row: cell row number * @column: cell column number * * Get row and column correspondig to the given position within * the sheet. * * In order to decode clicks into to title area correctly, pass * the GdkWindow from the button event. Omitting the * window (NULL) defaults to the sheet window. * * row and column may return values in the range [-1 .. max+1] * depending on wether the position lies within the title area, * the sheet cell area or beyond the outermost row/column. * * All 9 sheet areas can be reliably determined by evaluating * the returned row/column values (title area/cell * area/outside). * * Returns: TRUE if the position lies within the sheet cell area * or FALSE when outside (title area f.e.) */ gboolean gtk_sheet_get_pixel_info(GtkSheet *sheet, GdkWindow *window, gint x, gint y, gint *row, gint *column) { gint trow, tcol; *row = *column = -1; /* init all output vars */ g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); /* there is a coordinate shift to be considered when clicking into a title area because: - the sheet window covers the whole sheet - the column titles window overlaps the sheet window, but may be shifted right when row titles are visible - the row titles window overlaps the sheet window, but may be shifted down when column titles are visible */ if (sheet->column_titles_visible && window == sheet->column_title_window) { if (sheet->row_titles_visible) { #if GTK_SHEET_DEBUG_PIXEL_INFO > 0 g_debug("gtk_sheet_get_pixel_info: shift x"); #endif x += sheet->row_title_area.width; } #if GTK_SHEET_DEBUG_PIXEL_INFO > 0 g_debug("gtk_sheet_get_pixel_info: r1"); #endif trow = -1; tcol = _gtk_sheet_column_from_xpixel(sheet, x); } else if (sheet->row_titles_visible && window == sheet->row_title_window) { if (sheet->column_titles_visible) { #if GTK_SHEET_DEBUG_PIXEL_INFO > 0 g_debug("gtk_sheet_get_pixel_info: shift y"); #endif y += sheet->column_title_area.height; } #if GTK_SHEET_DEBUG_PIXEL_INFO > 0 g_debug("gtk_sheet_get_pixel_info: c1"); #endif trow = _gtk_sheet_row_from_ypixel(sheet, y); tcol = -1; } else if (sheet->column_titles_visible && sheet->row_titles_visible && x < sheet->row_title_area.width && y < sheet->column_title_area.height ) { #if GTK_SHEET_DEBUG_PIXEL_INFO > 0 g_debug("gtk_sheet_get_pixel_info: sb"); #endif trow = -1; tcol = -1; } else { #if GTK_SHEET_DEBUG_PIXEL_INFO > 0 g_debug("gtk_sheet_get_pixel_info: rN/cN"); #endif trow = _gtk_sheet_row_from_ypixel(sheet, y); tcol = _gtk_sheet_column_from_xpixel(sheet, x); } #if GTK_SHEET_DEBUG_PIXEL_INFO > 0 g_debug("gtk_sheet_get_pixel_info: x %d y %d row %d col %d", x, y, trow, tcol); #endif *row = trow; *column = tcol; /* bounds checking, return false if the user clicked * on a blank area */ if (trow < 0 || trow > sheet->maxrow) return (FALSE); if (tcol < 0 || tcol > sheet->maxcol) return (FALSE); return (TRUE); } /** * gtk_sheet_get_cell_area: * @sheet: a #GtkSheet * @row: row number * @column: column number * @area: a #GdkRectangle area of the cell * * Get area of a given cell. * * Returns: TRUE(success) or FALSE(failure) */ gboolean gtk_sheet_get_cell_area(GtkSheet *sheet, gint row, gint col, GdkRectangle *area) { g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); if (row > sheet->maxrow || col > sheet->maxcol) return (FALSE); area->x = (col == -1) ? 0 : (_gtk_sheet_column_left_xpixel(sheet, col) - (sheet->row_titles_visible ? sheet->row_title_area.width : 0)); area->y = (row == -1) ? 0 : (_gtk_sheet_row_top_ypixel(sheet, row) - (sheet->column_titles_visible ? sheet->column_title_area.height : 0)); area->width = (col == -1) ? sheet->row_title_area.width : COLPTR(sheet, col)->width; area->height = (row == -1) ? sheet->column_title_area.height : sheet->row[row].height; /* if(row < 0 || col < 0) return FALSE; area->x = COLUMN_LEFT_XPIXEL(sheet, col); area->y = ROW_TOP_YPIXEL(sheet, row); if(sheet->row_titles_visible) area->x -= sheet->row_title_area.width; if(sheet->column_titles_visible) area->y -= sheet->column_title_area.height; area->width = COLPTR(sheet, col)->width; area->height = sheet->row[row].height; */ return (TRUE); } /** * gtk_sheet_set_active_cell: * @sheet: a #GtkSheet * @row: row number * @column: column number * * Set active cell where the cell entry will be displayed. * Use (row,col) = (-1,-1) to deactivate active cell. * * Returns: FALSE if current cell can't be deactivated or * requested cell can't be activated */ gboolean gtk_sheet_set_active_cell(GtkSheet *sheet, gint row, gint col) { g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); if (row > sheet->maxrow || col > sheet->maxcol) return (FALSE); #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_set_active_cell: row %d col %d", row, col); #endif if (!gtk_widget_get_can_focus(GTK_WIDGET(sheet))) { #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_set_active_cell: row %d col %d abort: sheet, can-focus false", row, col); #endif return (FALSE); } if (col >= 0 && !gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col)))) { #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_set_active_cell: row %d col %d abort: sheet column, can-focus false", row, col); #endif return (FALSE); } if (col >= 0 && !GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) { #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_set_active_cell: row %d col %d abort: sheet column, visible false", row, col); #endif return (FALSE); } if (gtk_widget_get_realized(GTK_WIDGET(sheet))) { #if 0 gint old_row = sheet->active_cell.row; gint old_col = sheet->active_cell.col; #endif if (!gtk_sheet_deactivate_cell(sheet)) { #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_set_active_cell: abort: deactivation false"); #endif return (FALSE); } /* the deactivate signal handler may have activated another cell here */ #if 0 if ((sheet->active_cell.row != old_row) || (sheet->active_cell.col != old_col)) { #ifdef GTK_SHEET_DEBUG g_debug("gtk_sheet_set_active_cell: deactivation moved active cell to row %d col %d", sheet->active_cell.row, sheet->active_cell.col); #endif return(FALSE); } #endif } if (row < 0 || col < 0) { sheet->range.row0 = -1; sheet->range.rowi = -1; sheet->range.col0 = -1; sheet->range.coli = -1; return (TRUE); } sheet->active_cell.row = row; sheet->active_cell.col = col; if (!gtk_sheet_activate_cell(sheet, row, col)) return (FALSE); _gtk_sheet_move_query(sheet, row, col, TRUE); return (TRUE); } /** * gtk_sheet_get_active_cell: * @sheet: a #GtkSheet * @row: row number * @column: column number * * Store the coordinates of the active cell in row,col. * If (row<0 || col<0) then there was no active cell in the * sheet. */ void gtk_sheet_get_active_cell(GtkSheet *sheet, gint *row, gint *column) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); *row = sheet->active_cell.row; *column = sheet->active_cell.col; } /** * gtk_sheet_set_tab_direction: * @sheet: a #GtkSheet * @dir: the primary tab direction * * Sets a primary movement direction to the Tab, Return and * Enter keys, and assigns the opposite direction to the same * keys with GDK_SHIFT_MASK. * * Transposed movement direction can be accessed with * GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK and * GTK_SHEET_MOD_MASK|GDK_CONTROL_MASK|GDK_SHIFT_MASK. * * All bindings are defined for the #GtkSheetClass, so all sheet * instances use the same movement directions. * * Default: GTK_DIR_TAB_FORWARD. * * Since: 3.0.2 */ void gtk_sheet_set_tab_direction(GtkSheet *sheet, GtkDirectionType dir) { GtkSheetClass *klass; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); klass = GTK_SHEET_GET_CLASS(sheet); _gtk_sheet_class_init_tab_bindings(klass, dir); } /* * gtk_sheet_entry_changed_handler: * * this is the sheet_entry editable "changed" signal handler * * The signal is emited when typing into the entry, or changing * its content. * * Its main purpose is to update the cell data text * * @param widget the sheet_entry widget * @param data the #GtkSheet, passed on signal creation */ static void gtk_sheet_entry_changed_handler(GtkWidget *widget, gpointer data) { GtkSheet *sheet; gint row, col; char *text; g_return_if_fail(data != NULL); g_return_if_fail(GTK_IS_SHEET(data)); sheet = GTK_SHEET(data); if (!gtk_widget_get_visible(gtk_sheet_get_entry_widget(sheet))) return; if (sheet->state != GTK_STATE_NORMAL) return; row = sheet->active_cell.row; col = sheet->active_cell.col; if (row < 0 || col < 0) return; sheet->active_cell.row = -1; sheet->active_cell.col = -1; GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IS_FROZEN); text = gtk_sheet_get_entry_text(sheet); gtk_sheet_set_cell_text(sheet, row, col, text); g_free(text); if (sheet->freeze_count == 0) GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IS_FROZEN); sheet->active_cell.row = row;; sheet->active_cell.col = col; } static gboolean gtk_sheet_deactivate_cell(GtkSheet *sheet) { gboolean veto = TRUE; gint row, col; g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); row = sheet->active_cell.row; col = sheet->active_cell.col; #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_deactivate_cell: called, row %d col %d", row, col); #endif if (row < 0 || row > sheet->maxrow) return (TRUE); if (col < 0 || col > sheet->maxcol) return (TRUE); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return (FALSE); if (sheet->state != GTK_SHEET_NORMAL) return (FALSE); gtk_sheet_entry_signal_disconnect_by_func(sheet, G_CALLBACK(gtk_sheet_entry_changed_handler)); _gtk_sheet_hide_active_cell(sheet); sheet->active_cell.row = -1; /* reset before signal emission, to prevent recursion */ sheet->active_cell.col = -1; /* beware: DEACTIVATE handler may call gtk_sheet_set_active_cell() */ _gtkextra_signal_emit(GTK_OBJECT(sheet), sheet_signals[DEACTIVATE], row, col, &veto); if (!veto) { sheet->active_cell.row = row; sheet->active_cell.col = col; return (FALSE); } #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_deactivate_cell: running"); #endif if (GTK_SHEET_REDRAW_PENDING(sheet)) { GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_REDRAW_PENDING); _gtk_sheet_range_draw(sheet, NULL, TRUE); } #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_deactivate_cell: done row %d col %d", row, col); #endif return (TRUE); } /** * _gtk_sheet_hide_active_cell: * * @param sheet the #GtkSheet * * hide active cell */ void _gtk_sheet_hide_active_cell(GtkSheet *sheet) { gint row, col; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (!gtk_widget_get_visible(sheet->sheet_entry)) return; row = sheet->active_cell.row; col = sheet->active_cell.col; #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_hide_active_cell: called row %d col %d", row, col); #endif if (row < 0 || row > sheet->maxrow) return; if (col < 0 || col > sheet->maxcol) return; if (sheet->freeze_count == 0) GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IS_FROZEN); #if 0 /* transferring entry text to the cell gives problems when gtk_sheet_change_entry() is called during TRAVERSE signal emission. The text of the already changed entry gets written into the deactivated cell */ { char *text = gtk_sheet_get_entry_text(sheet); /* todo: compare with existing text, only notify if text changes */ gtk_sheet_set_cell_text(sheet, row, col, text); g_free(text); } #endif #if 0 /* why shoud we first set the cursor to the cell we want hide ? */ g_signal_emit(GTK_OBJECT(sheet),sheet_signals[SET_CELL], 0, row, col); #endif if (!GTK_SHEET_IS_FROZEN(sheet)) { GtkSheetRange range; range.row0 = range.rowi = row; range.col0 = range.coli = col; _gtk_sheet_range_draw(sheet, &range, FALSE); /* do not reactivate active cell!!! */ } #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_hide_active_cell: _gtk_sheet_column_button_release"); #endif _gtk_sheet_column_button_release(sheet, col); row_button_release(sheet, row); #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_hide_active_cell: gtk_widget_unmap"); #endif gtk_widget_unmap(sheet->sheet_entry); gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, _gtk_sheet_column_left_xpixel(sheet, col) - 1, _gtk_sheet_row_top_ypixel(sheet, row) - 1, _gtk_sheet_column_left_xpixel(sheet, col) - 1, _gtk_sheet_row_top_ypixel(sheet, row) - 1, COLPTR(sheet, col)->width + 4, sheet->row[row].height + 4); #if 0 /* why shoud we first set the cursor to the cell we want hide ? */ gtk_widget_grab_focus(GTK_WIDGET(sheet)); #endif #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_hide_active_cell: gtk_widget_set_visible"); #endif gtk_widget_set_visible(GTK_WIDGET(sheet->sheet_entry), FALSE); #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_hide_active_cell: done"); #endif } static gboolean gtk_sheet_activate_cell(GtkSheet *sheet, gint row, gint col) { gboolean veto = TRUE; g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if (GTK_SHEET_FLAGS(sheet) & GTK_SHEET_IS_DESTROYED) return(FALSE); /* PR#102114 */ if (row < 0 || col < 0) return (FALSE); if (row > sheet->maxrow || col > sheet->maxcol) return (FALSE); if (!gtk_widget_get_can_focus(GTK_WIDGET(sheet))) { #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_activate_cell: row %d col %d abort: sheet, can-focus false", row, col); #endif return (FALSE); } if (!gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col)))) { #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_activate_cell: row %d col %d abort: sheet column, can-focus false", row, col); #endif return (FALSE); } /* _gtkextra_signal_emit(GTK_OBJECT(sheet),sheet_signals[ACTIVATE], row, col, &veto); if(!gtk_widget_get_realized(GTK_WIDGET(sheet))) return veto; if (!veto) return FALSE; */ if (sheet->state != GTK_SHEET_NORMAL) { sheet->state = GTK_SHEET_NORMAL; gtk_sheet_real_unselect_range(sheet, NULL); } sheet->range.row0 = row; sheet->range.col0 = col; sheet->range.rowi = row; sheet->range.coli = col; sheet->active_cell.row = row; sheet->active_cell.col = col; sheet->selection_cell.row = row; sheet->selection_cell.col = col; row_button_set(sheet, row); _gtk_sheet_column_button_set(sheet, col); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); gtk_sheet_show_active_cell(sheet); #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_activate_cell: signal setup"); #endif gtk_sheet_entry_signal_connect_changed(sheet, G_CALLBACK(gtk_sheet_entry_changed_handler)); _gtkextra_signal_emit(GTK_OBJECT(sheet), sheet_signals[ACTIVATE], row, col, &veto); return (TRUE); } static void _gtk_sheet_entry_preselect(GtkSheet *sheet) { gboolean select_on_focus; gboolean editable = TRUE; /* incomplete - refer to gtkitementry::gtk_entry_grab_focus() */ gboolean in_click = FALSE; /* incomplete - refer to gtkitementry::gtk_entry_grab_focus() */ #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("_gtk_sheet_entry_preselect: called"); #endif g_object_get(G_OBJECT(gtk_settings_get_default()), "gtk-entry-select-on-focus", &select_on_focus, NULL); if (select_on_focus && editable && !in_click) { gtk_sheet_entry_select_region(sheet, 0, -1); } } /** * _gtk_sheet_entry_setup: * @sheet: the #GtkSheet * @row: row index * @col: column index * @entry_widget: entry widget * * configure sheet_entry for use within the active cell * - justification * - editable * - max_length * - wrap_mode * - color attributes * - font * * this function must not dependant on any text contents. */ static void _gtk_sheet_entry_setup(GtkSheet *sheet, gint row, gint col, GtkWidget *entry_widget) { GtkJustification justification = GTK_JUSTIFY_LEFT; gboolean editable; GtkStyle *style; GtkSheetColumn *colptr = COLPTR(sheet, col); #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_entry_setup: row %d col %d", row, col); #endif if (row < 0 || col < 0) return; GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, row, col, &attributes); if (gtk_sheet_justify_entry(sheet)) justification = attributes.justification; editable = !(gtk_sheet_locked(sheet) || !attributes.is_editable || colptr->is_readonly); gtk_sheet_set_entry_editable(sheet, editable); if (GTK_IS_ITEM_ENTRY(entry_widget)) { GtkItemEntry *item_entry = GTK_ITEM_ENTRY(entry_widget); GtkEntry *entry = GTK_ENTRY(entry_widget); /* 5.8.2010/fp - the code below has no effect in GTK 2.18.9, a right justified editable will pop to left justification as soon as something gets selected, and will pop back to right aligment, as soon as the cursor ist moved. When this happens, the justification value in the editable is correct. */ #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_entry_setup: GtkItemEntry justification %d", justification); #endif gtk_item_entry_set_justification(item_entry, justification); gtk_item_entry_set_max_length_bytes(item_entry, colptr->max_length_bytes); gtk_entry_set_max_length(entry, colptr->max_length); } else if (GTK_IS_DATA_TEXT_VIEW(entry_widget)) { GtkDataTextView *data_textview = GTK_DATA_TEXT_VIEW(entry_widget); GtkTextView *textview = GTK_TEXT_VIEW(entry_widget); gtk_text_view_set_wrap_mode(textview, colptr->wrap_mode); gtk_data_text_view_set_max_length(data_textview, colptr->max_length); gtk_data_text_view_set_max_length_bytes(data_textview, colptr->max_length_bytes); } else if (GTK_IS_TEXT_VIEW(entry_widget)) { GtkTextView *textview = GTK_TEXT_VIEW(entry_widget); #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_entry_setup: GtkTextView justification %d", justification); #endif gtk_text_view_set_justification(textview, justification); gtk_text_view_set_wrap_mode(textview, colptr->wrap_mode); } else if (GTK_IS_ENTRY(entry_widget)) { GtkEntry *entry = GTK_ENTRY(entry_widget); gtk_entry_set_max_length(entry, colptr->max_length); } #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("_gtk_sheet_entry_setup: style bg color %s", gdk_color_to_string(&attributes.background)); #endif #if 1 if (gtk_widget_get_realized(entry_widget)) { style = gtk_widget_get_style(entry_widget); if (!style) gtk_widget_ensure_style(entry_widget); /* why this ?? */ style = gtk_widget_get_style(entry_widget); style = gtk_style_copy(style); style->bg[GTK_STATE_NORMAL] = attributes.background; style->base[GTK_STATE_NORMAL] = attributes.background; style->fg[GTK_STATE_NORMAL] = attributes.foreground; style->text[GTK_STATE_NORMAL] = attributes.foreground; style->bg[GTK_STATE_ACTIVE] = attributes.background; style->base[GTK_STATE_ACTIVE] = attributes.background; style->fg[GTK_STATE_ACTIVE] = attributes.foreground; style->text[GTK_STATE_ACTIVE] = attributes.foreground; pango_font_description_free(style->font_desc); style->font_desc = pango_font_description_copy(attributes.font_desc); gtk_widget_set_style(entry_widget, style); g_object_unref(style); /* 22.06.13/fp */ } #endif } static void gtk_sheet_show_active_cell(GtkSheet *sheet) { gchar *text = NULL; gchar *old_text; gint row, col; gboolean is_visible = TRUE; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); row = sheet->active_cell.row; col = sheet->active_cell.col; #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_show_active_cell: called row %d col %d", row, col); #endif if (row < 0 || col < 0) return; if (row > sheet->maxrow || col > sheet->maxcol) return; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (sheet->state != GTK_SHEET_NORMAL) return; if (GTK_SHEET_IN_SELECTION(sheet)) return; if (!sheet->sheet_entry) /* PR#102114 */ return; /* we should send a ENTRY_CHANGE_REQUEST signal here */ if ((row <= sheet->maxallocrow) && (col <= sheet->maxalloccol) && sheet->data[row]) { GtkSheetCell *cell = sheet->data[row][col]; if (cell) { if (cell->text) text = g_strdup(cell->text); if (cell->attributes) is_visible = cell->attributes->is_visible; } } GtkWidget *entry_widget = gtk_sheet_get_entry(sheet); /* update visibility */ gtk_widget_set_visible(GTK_WIDGET(sheet->sheet_entry), is_visible); if (GTK_IS_ENTRY(entry_widget)) { gtk_entry_set_visibility(GTK_ENTRY(entry_widget), is_visible); } /* update text */ if (!text) text = g_strdup(""); old_text = gtk_sheet_get_entry_text(sheet); /* the entry setup must be done before the text assigment, otherwise max_length may cause text assignment to fail */ _gtk_sheet_entry_setup(sheet, row, col, entry_widget); #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_show_active_cell: old_text <%s> text <%s>", old_text, text); #endif if (!old_text || (old_text[0] != text[0]) || strcmp(old_text, text) != 0) { gtk_sheet_set_entry_text(sheet, text); } /* we should send an ENTRY_CONFIGURATION signal here */ gtk_sheet_entry_set_max_size(sheet); _gtk_sheet_entry_size_allocate(sheet); gtk_widget_map(sheet->sheet_entry); gtk_sheet_draw_active_cell(sheet); _gtk_sheet_entry_preselect(sheet); gtk_widget_grab_focus(entry_widget); g_free(text); g_free(old_text); } static void gtk_sheet_draw_active_cell(GtkSheet *sheet) { gint row, col; if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; row = sheet->active_cell.row; col = sheet->active_cell.col; if (row < 0 || row > sheet->maxrow) return; if (col < 0 || col > sheet->maxcol) return; if (!gtk_sheet_cell_isvisible(sheet, row, col)) return; row_button_set(sheet, row); _gtk_sheet_column_button_set(sheet, col); gtk_sheet_draw_backing_pixmap(sheet, sheet->range); gtk_sheet_draw_border(sheet, sheet->range); } static void gtk_sheet_make_backing_pixmap(GtkSheet *sheet, guint width, guint height) { gint pixmap_width, pixmap_height; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (width == 0 && height == 0) { width = sheet->sheet_window_width + 80; height = sheet->sheet_window_height + 80; } if (!sheet->pixmap) { /* allocate */ sheet->pixmap = gdk_pixmap_new(sheet->sheet_window, width, height, -1); if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, NULL, TRUE); } else { /* reallocate if sizes don't match */ gdk_window_get_size(sheet->pixmap, &pixmap_width, &pixmap_height); if ((pixmap_width != width) || (pixmap_height != height)) { g_object_unref(G_OBJECT(sheet->pixmap)); sheet->pixmap = gdk_pixmap_new(sheet->sheet_window, width, height, -1); if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, NULL, TRUE); } } } static void gtk_sheet_new_selection(GtkSheet *sheet, GtkSheetRange *range) { gint i, j, mask1, mask2; gint state, selected; gint x, y, width, height; GtkSheetRange new_range, aux_range; g_return_if_fail(sheet != NULL); if (range == NULL) range = &sheet->range; new_range = *range; range->row0 = MIN(range->row0, sheet->range.row0); range->rowi = MAX(range->rowi, sheet->range.rowi); range->col0 = MIN(range->col0, sheet->range.col0); range->coli = MAX(range->coli, sheet->range.coli); range->row0 = MAX(range->row0, MIN_VIEW_ROW(sheet)); range->rowi = MIN(range->rowi, MAX_VIEW_ROW(sheet)); range->col0 = MAX(range->col0, MIN_VIEW_COLUMN(sheet)); range->coli = MIN(range->coli, MAX_VIEW_COLUMN(sheet)); aux_range.row0 = MAX(new_range.row0, MIN_VIEW_ROW(sheet)); aux_range.rowi = MIN(new_range.rowi, MAX_VIEW_ROW(sheet)); aux_range.col0 = MAX(new_range.col0, MIN_VIEW_COLUMN(sheet)); aux_range.coli = MIN(new_range.coli, MAX_VIEW_COLUMN(sheet)); for (i = range->row0; i <= range->rowi; i++) { if (i > sheet->maxrow) break; for (j = range->col0; j <= range->coli; j++) { if (j > sheet->maxcol) break; state = gtk_sheet_cell_get_state(sheet, i, j); selected = (i <= new_range.rowi && i >= new_range.row0 && j <= new_range.coli && j >= new_range.col0) ? TRUE : FALSE; if (state == GTK_STATE_SELECTED && selected && GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, j)) && GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i)) && (i == sheet->range.row0 || i == sheet->range.rowi || j == sheet->range.col0 || j == sheet->range.coli || i == new_range.row0 || i == new_range.rowi || j == new_range.col0 || j == new_range.coli)) { mask1 = i == sheet->range.row0 ? 1 : 0; mask1 = i == sheet->range.rowi ? mask1 + 2 : mask1; mask1 = j == sheet->range.col0 ? mask1 + 4 : mask1; mask1 = j == sheet->range.coli ? mask1 + 8 : mask1; mask2 = i == new_range.row0 ? 1 : 0; mask2 = i == new_range.rowi ? mask2 + 2 : mask2; mask2 = j == new_range.col0 ? mask2 + 4 : mask2; mask2 = j == new_range.coli ? mask2 + 8 : mask2; if (mask1 != mask2) { x = _gtk_sheet_column_left_xpixel(sheet, j); y = _gtk_sheet_row_top_ypixel(sheet, i); width = _gtk_sheet_column_left_xpixel(sheet, j) - x + COLPTR(sheet, j)->width; height = _gtk_sheet_row_top_ypixel(sheet, i) - y + sheet->row[i].height; if (i == sheet->range.row0) { y = y - 3; height = height + 3; } if (i == sheet->range.rowi) height = height + 3; if (j == sheet->range.col0) { x = x - 3; width = width + 3; } if (j == sheet->range.coli) width = width + 3; gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x + 1, y + 1, x + 1, y + 1, width, height); if (i != sheet->active_cell.row || j != sheet->active_cell.col) { x = _gtk_sheet_column_left_xpixel(sheet, j); y = _gtk_sheet_row_top_ypixel(sheet, i); width = _gtk_sheet_column_left_xpixel(sheet, j) - x + COLPTR(sheet, j)->width; height = _gtk_sheet_row_top_ypixel(sheet, i) - y + sheet->row[i].height; if (i == new_range.row0) { y = y + 2; height = height - 2; } if (i == new_range.rowi) height = height - 3; if (j == new_range.col0) { x = x + 2; width = width - 2; } if (j == new_range.coli) width = width - 3; gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x + 1, y + 1, width, height); } } } } } for (i = range->row0; i <= range->rowi; i++) { for (j = range->col0; j <= range->coli; j++) { state = gtk_sheet_cell_get_state(sheet, i, j); selected = (i <= new_range.rowi && i >= new_range.row0 && j <= new_range.coli && j >= new_range.col0) ? TRUE : FALSE; if (state == GTK_STATE_SELECTED && !selected && GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, j)) && GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) { x = _gtk_sheet_column_left_xpixel(sheet, j); y = _gtk_sheet_row_top_ypixel(sheet, i); width = _gtk_sheet_column_left_xpixel(sheet, j) - x + COLPTR(sheet, j)->width; height = _gtk_sheet_row_top_ypixel(sheet, i) - y + sheet->row[i].height; if (i == sheet->range.row0) { y = y - 3; height = height + 3; } if (i == sheet->range.rowi) height = height + 3; if (j == sheet->range.col0) { x = x - 3; width = width + 3; } if (j == sheet->range.coli) width = width + 3; gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x + 1, y + 1, x + 1, y + 1, width, height); } } } for (i = range->row0; i <= range->rowi; i++) { for (j = range->col0; j <= range->coli; j++) { state = gtk_sheet_cell_get_state(sheet, i, j); selected = (i <= new_range.rowi && i >= new_range.row0 && j <= new_range.coli && j >= new_range.col0) ? TRUE : FALSE; if (state != GTK_STATE_SELECTED && selected && GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, j)) && GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i)) && (i != sheet->active_cell.row || j != sheet->active_cell.col)) { x = _gtk_sheet_column_left_xpixel(sheet, j); y = _gtk_sheet_row_top_ypixel(sheet, i); width = _gtk_sheet_column_left_xpixel(sheet, j) - x + COLPTR(sheet, j)->width; height = _gtk_sheet_row_top_ypixel(sheet, i) - y + sheet->row[i].height; if (i == new_range.row0) { y = y + 2; height = height - 2; } if (i == new_range.rowi) height = height - 3; if (j == new_range.col0) { x = x + 2; width = width - 2; } if (j == new_range.coli) width = width - 3; gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x + 1, y + 1, width, height); } } } for (i = aux_range.row0; i <= aux_range.rowi; i++) { for (j = aux_range.col0; j <= aux_range.coli; j++) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, j)) && GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) { state = gtk_sheet_cell_get_state(sheet, i, j); mask1 = i == sheet->range.row0 ? 1 : 0; mask1 = i == sheet->range.rowi ? mask1 + 2 : mask1; mask1 = j == sheet->range.col0 ? mask1 + 4 : mask1; mask1 = j == sheet->range.coli ? mask1 + 8 : mask1; mask2 = i == new_range.row0 ? 1 : 0; mask2 = i == new_range.rowi ? mask2 + 2 : mask2; mask2 = j == new_range.col0 ? mask2 + 4 : mask2; mask2 = j == new_range.coli ? mask2 + 8 : mask2; if (mask2 != mask1 || (mask2 == mask1 && state != GTK_STATE_SELECTED)) { x = _gtk_sheet_column_left_xpixel(sheet, j); y = _gtk_sheet_row_top_ypixel(sheet, i); width = COLPTR(sheet, j)->width; height = sheet->row[i].height; if (mask2 & 1) gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x + 1, y - 1, width, 3); if (mask2 & 2) gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x + 1, y + height - 1, width, 3); if (mask2 & 4) gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x - 1, y + 1, 3, height); if (mask2 & 8) gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x + width - 1, y + 1, 3, height); } } } } *range = new_range; gtk_sheet_draw_corners(sheet, new_range); } static void gtk_sheet_draw_border(GtkSheet *sheet, GtkSheetRange new_range) { GdkRectangle clip_area, area; gint i; area.x = _gtk_sheet_column_left_xpixel(sheet, new_range.col0); area.y = _gtk_sheet_row_top_ypixel(sheet, new_range.row0); area.width = _gtk_sheet_column_right_xpixel(sheet, new_range.coli) - area.x; area.height = _gtk_sheet_row_bottom_ypixel(sheet, new_range.rowi) - area.y; clip_area.x = sheet->row_title_area.width; clip_area.y = sheet->column_title_area.height; clip_area.width = sheet->sheet_window_width; clip_area.height = sheet->sheet_window_height; if (!sheet->row_titles_visible) clip_area.x = 0; if (!sheet->column_titles_visible) clip_area.y = 0; if (area.x < 0) { area.width = area.width + area.x; area.x = 0; } if (area.width > clip_area.width) area.width = clip_area.width + 10; if (area.y < 0) { area.height = area.height + area.y; area.y = 0; } if (area.height > clip_area.height) area.height = clip_area.height + 10; #if GTK_SHEET_DEBUG_CELL_ACTIVATION > 0 g_debug("gtk_sheet_draw_border: clip_area (%d, %d, %d, %d)", clip_area.x, clip_area.y, clip_area.width, clip_area.height); #endif clip_area.x--; clip_area.y--; clip_area.width += 3; clip_area.height += 3; gdk_gc_set_clip_rectangle(sheet->xor_gc, &clip_area); for (i = -1; i <= 1; ++i) { gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, FALSE, area.x + i, area.y + i, area.width - 2 * i, area.height - 2 * i); } gdk_gc_set_clip_rectangle(sheet->xor_gc, NULL); gtk_sheet_draw_corners(sheet, new_range); } static void gtk_sheet_draw_corners(GtkSheet *sheet, GtkSheetRange range) { gint x, y; guint width = 1; if (gtk_sheet_cell_isvisible(sheet, range.row0, range.col0)) { x = _gtk_sheet_column_left_xpixel(sheet, range.col0); y = _gtk_sheet_row_top_ypixel(sheet, range.row0); gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x - 1, y - 1, x - 1, y - 1, 3, 3); gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x - 1, y - 1, 3, 3); } if (gtk_sheet_cell_isvisible(sheet, range.row0, range.coli) || sheet->state == GTK_SHEET_COLUMN_SELECTED) { x = _gtk_sheet_column_left_xpixel(sheet, range.coli) + COLPTR(sheet, range.coli)->width; y = _gtk_sheet_row_top_ypixel(sheet, range.row0); width = 1; if (sheet->state == GTK_SHEET_COLUMN_SELECTED) { y = _gtk_sheet_row_top_ypixel(sheet, sheet->view.row0) + 3; width = 3; } gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x - width, y - width, x - width, y - width, 2 * width + 1, 2 * width + 1); gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x - width + width / 2, y - width + width / 2, 2 + width, 2 + width); } if (gtk_sheet_cell_isvisible(sheet, range.rowi, range.col0) || sheet->state == GTK_SHEET_ROW_SELECTED) { x = _gtk_sheet_column_left_xpixel(sheet, range.col0); y = _gtk_sheet_row_top_ypixel(sheet, range.rowi) + sheet->row[range.rowi].height; width = 1; if (sheet->state == GTK_SHEET_ROW_SELECTED) { x = _gtk_sheet_column_left_xpixel(sheet, sheet->view.col0) + 3; width = 3; } gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x - width, y - width, x - width, y - width, 2 * width + 1, 2 * width + 1); gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x - width + width / 2, y - width + width / 2, 2 + width, 2 + width); } if (gtk_sheet_cell_isvisible(sheet, range.rowi, range.coli)) { x = _gtk_sheet_column_left_xpixel(sheet, range.coli) + COLPTR(sheet, range.coli)->width; y = _gtk_sheet_row_top_ypixel(sheet, range.rowi) + sheet->row[range.rowi].height; width = 1; if (sheet->state == GTK_SHEET_RANGE_SELECTED) width = 3; if (sheet->state == GTK_SHEET_NORMAL) width = 3; gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, x - width, y - width, x - width, y - width, 2 * width + 1, 2 * width + 1); gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, TRUE, x - width + width / 2, y - width + width / 2, 2 + width, 2 + width); } } static void gtk_sheet_real_select_range(GtkSheet *sheet, GtkSheetRange *range) { gint i; gint state; g_return_if_fail(sheet != NULL); if (range == NULL) range = &sheet->range; if (range->row0 < 0 || range->rowi < 0) return; if (range->col0 < 0 || range->coli < 0) return; #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_real_select_range: {%d, %d, %d, %d}", range->row0, range->col0, range->rowi, range->coli); #endif state = sheet->state; if (state == GTK_SHEET_COLUMN_SELECTED || state == GTK_SHEET_RANGE_SELECTED) { for (i = sheet->range.col0; i < range->col0; i++) _gtk_sheet_column_button_release(sheet, i); for (i = range->coli + 1; i <= sheet->range.coli; i++) _gtk_sheet_column_button_release(sheet, i); for (i = range->col0; i <= range->coli; i++) { _gtk_sheet_column_button_set(sheet, i); } } if (state == GTK_SHEET_ROW_SELECTED || state == GTK_SHEET_RANGE_SELECTED) { for (i = sheet->range.row0; i < range->row0; i++) row_button_release(sheet, i); for (i = range->rowi + 1; i <= sheet->range.rowi; i++) row_button_release(sheet, i); for (i = range->row0; i <= range->rowi; i++) { row_button_set(sheet, i); } } if (range->coli != sheet->range.coli || range->col0 != sheet->range.col0 || range->rowi != sheet->range.rowi || range->row0 != sheet->range.row0) { gtk_sheet_new_selection(sheet, range); sheet->range.col0 = range->col0; sheet->range.coli = range->coli; sheet->range.row0 = range->row0; sheet->range.rowi = range->rowi; } else { gtk_sheet_draw_backing_pixmap(sheet, sheet->range); gtk_sheet_range_draw_selection(sheet, sheet->range); } g_signal_emit(GTK_OBJECT(sheet), sheet_signals[SELECT_RANGE], 0, range); } /** * gtk_sheet_select_range: * @sheet: a #GtkSheet * @range: a #GtkSheetRange * * Highlight the selected range and store bounds in sheet->range */ void gtk_sheet_select_range(GtkSheet *sheet, const GtkSheetRange *range) { GtkSheetRange new_range; /* buffer needed because gtk_sheet_real_unselect_range() will clear it */ g_return_if_fail(sheet != NULL); if (!range) range = &sheet->range; new_range = *range; if (new_range.row0 < 0 || new_range.rowi < 0) return; if (new_range.col0 < 0 || new_range.coli < 0) return; if (sheet->state != GTK_SHEET_NORMAL) { /* this will clear sheet->range */ gtk_sheet_real_unselect_range(sheet, NULL); } else { gboolean veto = TRUE; veto = gtk_sheet_deactivate_cell(sheet); if (!veto) return; } sheet->range.row0 = new_range.row0; sheet->range.rowi = new_range.rowi; sheet->range.col0 = new_range.col0; sheet->range.coli = new_range.coli; sheet->active_cell.row = new_range.row0; sheet->active_cell.col = new_range.col0; sheet->selection_cell.row = new_range.rowi; sheet->selection_cell.col = new_range.coli; sheet->state = GTK_SHEET_RANGE_SELECTED; gtk_sheet_real_select_range(sheet, NULL); } /** * gtk_sheet_unselect_range: * @sheet: a #GtkSheet * * Unselect the current selected range and clears the bounds in sheet->range. */ void gtk_sheet_unselect_range(GtkSheet *sheet) { gtk_sheet_real_unselect_range(sheet, NULL); sheet->state = GTK_SHEET_NORMAL; gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); } static void gtk_sheet_real_unselect_range(GtkSheet *sheet, GtkSheetRange *range) { gint i; g_return_if_fail(sheet != NULL); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (!range) range = &sheet->range; #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_real_unselect_range: called {%d, %d, %d, %d}", range->row0, range->col0, range->rowi, range->coli); #endif if (range->row0 < 0 || range->rowi < 0) return; if (range->col0 < 0 || range->coli < 0) return; if (gtk_sheet_range_isvisible(sheet, *range)) { #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_real_unselect_range: gtk_sheet_draw_backing_pixmap"); #endif gtk_sheet_draw_backing_pixmap(sheet, *range); } for (i = range->col0; i <= range->coli; i++) { #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_real_unselect_range: _gtk_sheet_column_button_release(%d)", i); #endif _gtk_sheet_column_button_release(sheet, i); } for (i = range->row0; i <= range->rowi; i++) { #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_real_unselect_range: row_button_release(%d)", i); #endif row_button_release(sheet, i); } #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_real_unselect_range: gtk_sheet_position_children()"); #endif gtk_sheet_position_children(sheet); /* reset range */ range->row0 = range->rowi = range->col0 = range->coli = -1; } /* * gtk_sheet_expose_handler: * * this is the #GtkSheet widget class "expose-event" signal handler * * @param widget the #GtkSheet * @param event the GdkEventExpose which triggered this signal * * @return TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. */ static gboolean gtk_sheet_expose_handler(GtkWidget *widget, GdkEventExpose *event) { GtkSheet *sheet; gint i; g_return_val_if_fail(widget != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(widget), FALSE); g_return_val_if_fail(event != NULL, FALSE); sheet = GTK_SHEET(widget); if (gtk_widget_is_drawable(widget)) { #if GTK_SHEET_DEBUG_EXPOSE > 0 g_debug("gtk_sheet_expose_handler: called"); #endif if (event->window == sheet->row_title_window && sheet->row_titles_visible) { #if GTK_SHEET_DEBUG_EXPOSE > 0 g_debug("gtk_sheet_expose_handler: row buttons"); #endif for (i = MIN_VIEW_ROW(sheet); i <= MAX_VIEW_ROW(sheet) && i <= sheet->maxrow; i++) { _gtk_sheet_draw_button(sheet, i, -1); } } if (event->window == sheet->column_title_window && sheet->column_titles_visible) { #if GTK_SHEET_DEBUG_EXPOSE > 0 g_debug("gtk_sheet_expose_handler: column buttons"); #endif for (i = MIN_VIEW_COLUMN(sheet); i <= MAX_VIEW_COLUMN(sheet) && i <= sheet->maxcol; i++) { _gtk_sheet_draw_button(sheet, -1, i); } } if (event->window == sheet->sheet_window) { GtkSheetRange range; range.row0 = _gtk_sheet_row_from_ypixel(sheet, event->area.y); range.col0 = _gtk_sheet_column_from_xpixel(sheet, event->area.x); range.rowi = _gtk_sheet_row_from_ypixel(sheet, event->area.y + event->area.height); range.coli = _gtk_sheet_column_from_xpixel(sheet, event->area.x + event->area.width); #if GTK_SHEET_DEBUG_EXPOSE > 0 g_debug("gtk_sheet_expose_handler: backing pixmap (%d,%d) (%d,%d)", range.row0, range.col0, range.rowi, range.coli); #endif gtk_sheet_draw_backing_pixmap(sheet, range); if (sheet->state != GTK_SHEET_NORMAL) { if (gtk_sheet_range_isvisible(sheet, sheet->range)) gtk_sheet_draw_backing_pixmap(sheet, sheet->range); if (GTK_SHEET_IN_RESIZE(sheet) || GTK_SHEET_IN_DRAG(sheet)) gtk_sheet_draw_backing_pixmap(sheet, sheet->drag_range); if (gtk_sheet_range_isvisible(sheet, sheet->range)) gtk_sheet_range_draw_selection(sheet, sheet->range); if (GTK_SHEET_IN_RESIZE(sheet) || GTK_SHEET_IN_DRAG(sheet)) draw_xor_rectangle(sheet, sheet->drag_range); } if ((!GTK_SHEET_IN_XDRAG(sheet)) && (!GTK_SHEET_IN_YDRAG(sheet))) { if (sheet->state == GTK_SHEET_NORMAL) { gtk_sheet_draw_active_cell(sheet); if (!GTK_SHEET_IN_SELECTION(sheet)) gtk_widget_queue_draw(sheet->sheet_entry); } } } } if (sheet->state != GTK_SHEET_NORMAL && GTK_SHEET_IN_SELECTION(sheet)) gtk_widget_grab_focus(GTK_WIDGET(sheet)); (*GTK_WIDGET_CLASS(sheet_parent_class)->expose_event)(widget, event); return (FALSE); } /* * gtk_sheet_button_press_handler: * * this is the #GtkSheet widget class "button-press-event" handler * * @param widget the #GtkSheet * @param event the GdkEventButton which triggered this signal * * @return TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. */ static gboolean gtk_sheet_button_press_handler(GtkWidget *widget, GdkEventButton *event) { GtkSheet *sheet; GdkModifierType mods; gint x, y, row, column; gboolean veto; g_return_val_if_fail(widget != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(widget), FALSE); g_return_val_if_fail(event != NULL, FALSE); /* if(event->type != GDK_BUTTON_PRESS) return(TRUE); */ #if GTK_SHEET_DEBUG_MOUSE > 0 g_debug("gtk_sheet_button_press_handler: called"); #endif gdk_window_get_pointer(gtk_widget_get_window(widget), NULL, NULL, &mods); if (!(mods & GDK_BUTTON1_MASK)) return (TRUE); sheet = GTK_SHEET(widget); /* press on resize windows */ if (event->window == sheet->column_title_window && gtk_sheet_columns_resizable(sheet)) { gtk_widget_get_pointer(widget, &sheet->x_drag, NULL); if (POSSIBLE_XDRAG(sheet, sheet->x_drag, &sheet->drag_cell.col)) { guint req; if (event->type == GDK_2BUTTON_PRESS) { _gtk_sheet_autoresize_column_internal(sheet, sheet->drag_cell.col); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_XDRAG); return (TRUE); } _gtk_sheet_column_size_request(sheet, sheet->drag_cell.col, &req); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_XDRAG); gdk_pointer_grab(sheet->column_title_window, FALSE, GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); draw_xor_vline(sheet); return (TRUE); } } if (event->window == sheet->row_title_window && gtk_sheet_rows_resizable(sheet)) { gtk_widget_get_pointer(widget, NULL, &sheet->y_drag); if (POSSIBLE_YDRAG(sheet, sheet->y_drag, &sheet->drag_cell.row)) { guint req; gtk_sheet_row_size_request(sheet, sheet->drag_cell.row, &req); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_YDRAG); gdk_pointer_grab(sheet->row_title_window, FALSE, GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); draw_xor_hline(sheet); return (TRUE); } } /* the sheet itself does not handle other than single click events */ if (event->type != GDK_BUTTON_PRESS) return (FALSE); /* selections on the sheet */ if (event->window == sheet->sheet_window) { #if GTK_SHEET_DEBUG_MOUSE > 0 g_debug("gtk_sheet_button_press_handler: on sheet"); #endif gtk_widget_get_pointer(widget, &x, &y); gtk_sheet_get_pixel_info(sheet, NULL, x, y, &row, &column); if (row < 0 && column < 0) return(FALSE); /* chain up to global button press handler*/ #if GTK_SHEET_DEBUG_MOUSE > 0 g_debug("gtk_sheet_button_press_handler: pointer grab (%d,%d) r %d c %d mr %d mc %d", x, y, row, column, sheet->maxrow, sheet->maxcol ); #endif gdk_pointer_grab(sheet->sheet_window, FALSE, GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); gtk_grab_add(GTK_WIDGET(sheet)); sheet->timer = g_timeout_add_full(0, TIMEOUT_SCROLL, _gtk_sheet_scroll_to_pointer, sheet, NULL); #if GTK_SHEET_DEBUG_MOUSE > 0 g_debug("gtk_sheet_button_press_handler: grab focus"); #endif gtk_widget_grab_focus(GTK_WIDGET(sheet)); if (sheet->selection_mode != GTK_SELECTION_SINGLE && gdk_cursor_get_cursor_type(sheet->cursor_drag) == GDK_SIZING && !GTK_SHEET_IN_SELECTION(sheet) && !GTK_SHEET_IN_RESIZE(sheet)) { if (sheet->state == GTK_STATE_NORMAL) { gint row = sheet->active_cell.row; /* PR#203012 */ gint column = sheet->active_cell.col; /* PR#203012 */ if (!gtk_sheet_deactivate_cell(sheet)) return (FALSE); sheet->active_cell.row = row; sheet->active_cell.col = column; sheet->drag_range = sheet->range; sheet->state = GTK_SHEET_RANGE_SELECTED; gtk_sheet_select_range(sheet, &sheet->drag_range); } sheet->x_drag = x; sheet->y_drag = y; if (row > sheet->range.rowi) row--; if (column > sheet->range.coli) column--; sheet->drag_cell.row = row; sheet->drag_cell.col = column; sheet->drag_range = sheet->range; draw_xor_rectangle(sheet, sheet->drag_range); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_RESIZE); } else if (gdk_cursor_get_cursor_type(sheet->cursor_drag) == GDK_TOP_LEFT_ARROW && !GTK_SHEET_IN_SELECTION(sheet) && !GTK_SHEET_IN_DRAG(sheet)) { if (sheet->state == GTK_STATE_NORMAL) { gint row = sheet->active_cell.row; /* PR#203012 */ gint column = sheet->active_cell.col; /* PR#203012 */ if (!gtk_sheet_deactivate_cell(sheet)) return (FALSE); sheet->active_cell.row = row; sheet->active_cell.col = column; sheet->drag_range = sheet->range; sheet->state = GTK_SHEET_RANGE_SELECTED; gtk_sheet_select_range(sheet, &sheet->drag_range); } sheet->x_drag = x; sheet->y_drag = y; if (row < sheet->range.row0) row++; if (row > sheet->range.rowi) row--; if (column < sheet->range.col0) column++; if (column > sheet->range.coli) column--; sheet->drag_cell.row = row; sheet->drag_cell.col = column; sheet->drag_range = sheet->range; #if GTK_SHEET_DEBUG_MOUSE > 0 g_debug("gtk_sheet_button_press_handler: drag_range r %d c %d (%d,%d, %d, %d) mr %d mc %d", sheet->drag_cell.row, sheet->drag_cell.col, sheet->drag_range.row0, sheet->drag_range.rowi, sheet->drag_range.col0, sheet->drag_range.coli, sheet->maxrow, sheet->maxcol ); #endif draw_xor_rectangle(sheet, sheet->drag_range); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_DRAG); } else { #if GTK_SHEET_DEBUG_MOUSE > 0 g_debug("gtk_sheet_button_press_handler: on click cell"); #endif gtk_sheet_click_cell(sheet, row, column, &veto); if (veto) GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); } return(TRUE); } if (event->window == sheet->column_title_window) { gtk_widget_get_pointer(widget, &x, &y); column = _gtk_sheet_column_from_xpixel(sheet, x); if (column < 0 || column > sheet->maxcol) return (FALSE); if (GTK_SHEET_COLUMN_IS_SENSITIVE(COLPTR(sheet, column))) { gtk_sheet_click_cell(sheet, -1, column, &veto); gtk_grab_add(GTK_WIDGET(sheet)); sheet->timer = g_timeout_add_full(0, TIMEOUT_SCROLL, _gtk_sheet_scroll_to_pointer, sheet, NULL); gtk_widget_grab_focus(GTK_WIDGET(sheet)); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); } } if (event->window == sheet->row_title_window) { gtk_widget_get_pointer(widget, &x, &y); row = _gtk_sheet_row_from_ypixel(sheet, y); if (row < 0 || row > sheet->maxrow) return (FALSE); if (GTK_SHEET_ROW_IS_SENSITIVE(ROWPTR(sheet, row))) { gtk_sheet_click_cell(sheet, row, -1, &veto); gtk_grab_add(GTK_WIDGET(sheet)); sheet->timer = g_timeout_add_full(0, TIMEOUT_SCROLL, _gtk_sheet_scroll_to_pointer, sheet, NULL); gtk_widget_grab_focus(GTK_WIDGET(sheet)); GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); } } return (TRUE); } static gint _gtk_sheet_scroll_to_pointer(gpointer data) { GtkSheet *sheet = GTK_SHEET(data); gint x, y, row, column; gint move = TRUE; GDK_THREADS_ENTER(); gtk_widget_get_pointer(GTK_WIDGET(sheet), &x, &y); gtk_sheet_get_pixel_info(sheet, NULL, x, y, &row, &column); if (GTK_SHEET_IN_SELECTION(sheet)) { GtkSheetRange visr; /* beware of invisible columns/rows */ if (!_gtk_sheet_get_visible_range(sheet, &visr)) return (TRUE); if (_POINT_IN_RANGE(row, column, &visr)) { gtk_sheet_extend_selection(sheet, row, column); } } if (GTK_SHEET_IN_DRAG(sheet) || GTK_SHEET_IN_RESIZE(sheet)) { move = _gtk_sheet_move_query(sheet, row, column, FALSE); if (move) draw_xor_rectangle(sheet, sheet->drag_range); } GDK_THREADS_LEAVE(); return (TRUE); } static void gtk_sheet_click_cell(GtkSheet *sheet, gint row, gint col, gboolean *veto) { *veto = TRUE; #if GTK_SHEET_DEBUG_CLICK > 0 g_debug("gtk_sheet_click_cell: called, row %d col %d", row, col); #endif /* allow row,col < 0 here, see below */ if (row > sheet->maxrow || col > sheet->maxcol) { *veto = FALSE; return; } if (col >= 0 && row >= 0) { if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) || !GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) { *veto = FALSE; return; } } /* if we do not grab focus here, some entry widgets (i.e. GtkSpinButton) will not format contents correctly on field exit */ gtk_widget_grab_focus(GTK_WIDGET(sheet)); _gtkextra_signal_emit(GTK_OBJECT(sheet), sheet_signals[TRAVERSE], sheet->active_cell.row, sheet->active_cell.col, &row, &col, veto); if (!*veto) { if (sheet->state == GTK_STATE_NORMAL) return; row = sheet->active_cell.row; col = sheet->active_cell.col; gtk_sheet_activate_cell(sheet, row, col); return; } if (row == -1 && col >= 0) /* column button clicked */ { if (gtk_sheet_autoscroll(sheet)) _gtk_sheet_move_query(sheet, row, col, FALSE); gtk_sheet_select_column(sheet, col); return; } if (col == -1 && row >= 0) /* row button clicked */ { if (gtk_sheet_autoscroll(sheet)) _gtk_sheet_move_query(sheet, row, col, FALSE); gtk_sheet_select_row(sheet, row); return; } if (row == -1 && col == -1) /* global button clicked */ { sheet->range.row0 = 0; sheet->range.col0 = 0; sheet->range.rowi = sheet->maxrow; sheet->range.coli = sheet->maxcol; sheet->active_cell.row = 0; sheet->active_cell.col = 0; if (sheet->state != GTK_STATE_NORMAL) /* if any range is selected, clear it */ gtk_sheet_unselect_range(sheet); else gtk_sheet_select_range(sheet, NULL); return; } if (row != -1 && col != -1) /* sheet cell clicked */ { GtkSheetColumn *colp = COLPTR(sheet, col); if (!gtk_widget_get_can_focus(GTK_WIDGET(sheet))) { #if GTK_SHEET_DEBUG_CLICK > 0 g_debug("gtk_sheet_click_cell: row %d col %d VETO: sheet, can-focus false", row, col); #endif *veto = FALSE; return; } if (!gtk_widget_get_can_focus(GTK_WIDGET(colp))) { #if GTK_SHEET_DEBUG_CLICK > 0 g_debug("gtk_sheet_click_cell: row %d col %d VETO: sheet column, can-focus false", row, col); #endif *veto = FALSE; return; } if (sheet->state != GTK_SHEET_NORMAL) { sheet->state = GTK_SHEET_NORMAL; gtk_sheet_real_unselect_range(sheet, NULL); } else { #if GTK_SHEET_DEBUG_CLICK > 0 g_debug("gtk_sheet_click_cell: row %d col %d calling deactivate", row, col); #endif if (!gtk_sheet_deactivate_cell(sheet)) { #if GTK_SHEET_DEBUG_CLICK > 0 g_debug("gtk_sheet_click_cell: row %d col %d VETO: deactivate false", row, col); #endif *veto = FALSE; return; } #if GTK_SHEET_DEBUG_CLICK > 0 g_debug("gtk_sheet_click_cell: row %d col %d back from deactivate", row, col); #endif } /* auto switch column entry_type */ /* not sure wether to move this code to gtk_sheet_show_active_cell() */ { GType installed_entry_type = sheet->installed_entry_type; GType wanted_type = (colp->entry_type != G_TYPE_NONE) ? colp->entry_type : sheet->entry_type; if (installed_entry_type != wanted_type) { if (sheet->state == GTK_SHEET_NORMAL) _gtk_sheet_hide_active_cell(sheet); create_sheet_entry(sheet, wanted_type ? wanted_type : G_TYPE_NONE); } } /* DEACTIVATE handler might have called gtk_sheet_set_active_cell(), so wie leave it, if it was changed */ #if 0 { gint act_row = sheet->active_cell.row; gint act_col = sheet->active_cell.col; if (act_row != -1 && act_col != -1 && (sheet->active_cell.row != row || sheet->active_cell.col != col)) { row = sheet->active_cell.row; col = sheet->active_cell.col; } } #endif if (gtk_sheet_autoscroll(sheet)) _gtk_sheet_move_query(sheet, row, col, TRUE); sheet->active_cell.row = row; sheet->active_cell.col = col; sheet->selection_cell.row = row; sheet->selection_cell.col = col; sheet->range.row0 = row; sheet->range.col0 = col; sheet->range.rowi = row; sheet->range.coli = col; sheet->state = GTK_SHEET_NORMAL; GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); gtk_sheet_draw_active_cell(sheet); return; } g_assert_not_reached(); gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); } /* * gtk_sheet_button_release_handler: * * this is the #GtkSheet widget class "button-release-event" handler * * @param widget the #GtkSheet * @param event the GdkEventButton which triggered this signal * * @return TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. */ static gboolean gtk_sheet_button_release_handler(GtkWidget *widget, GdkEventButton *event) { GtkSheet *sheet; gint x, y; sheet = GTK_SHEET(widget); /* release on resize windows */ if (GTK_SHEET_IN_XDRAG(sheet)) { GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_XDRAG); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); gtk_widget_get_pointer(widget, &x, NULL); gdk_pointer_ungrab(event->time); draw_xor_vline(sheet); #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_button_release_handler[%d]: set width %d", sheet->drag_cell.col, new_column_width(sheet, sheet->drag_cell.col, &x)); #endif gtk_sheet_set_column_width(sheet, sheet->drag_cell.col, new_column_width(sheet, sheet->drag_cell.col, &x)); sheet->old_hadjustment = -1.; if (sheet->hadjustment) { g_signal_emit_by_name(GTK_OBJECT(sheet->hadjustment), "value_changed"); } return (TRUE); } if (GTK_SHEET_IN_YDRAG(sheet)) { GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_YDRAG); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); gtk_widget_get_pointer(widget, NULL, &y); gdk_pointer_ungrab(event->time); draw_xor_hline(sheet); gtk_sheet_set_row_height(sheet, sheet->drag_cell.row, new_row_height(sheet, sheet->drag_cell.row, &y)); sheet->old_vadjustment = -1.; if (sheet->vadjustment) { g_signal_emit_by_name(GTK_OBJECT(sheet->vadjustment), "value_changed"); } return (TRUE); } if (GTK_SHEET_IN_DRAG(sheet)) { GtkSheetRange old_range; draw_xor_rectangle(sheet, sheet->drag_range); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_DRAG); gdk_pointer_ungrab(event->time); gtk_sheet_real_unselect_range(sheet, NULL); sheet->active_cell.row = sheet->active_cell.row + (sheet->drag_range.row0 - sheet->range.row0); sheet->active_cell.col = sheet->active_cell.col + (sheet->drag_range.col0 - sheet->range.col0); sheet->selection_cell.row = sheet->selection_cell.row + (sheet->drag_range.row0 - sheet->range.row0); sheet->selection_cell.col = sheet->selection_cell.col + (sheet->drag_range.col0 - sheet->range.col0); old_range = sheet->range; sheet->range = sheet->drag_range; sheet->drag_range = old_range; g_signal_emit(GTK_OBJECT(sheet), sheet_signals[MOVE_RANGE], 0, &sheet->drag_range, &sheet->range); gtk_sheet_select_range(sheet, &sheet->range); } if (GTK_SHEET_IN_RESIZE(sheet)) { GtkSheetRange old_range; draw_xor_rectangle(sheet, sheet->drag_range); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_RESIZE); gdk_pointer_ungrab(event->time); gtk_sheet_real_unselect_range(sheet, NULL); sheet->active_cell.row = sheet->active_cell.row + (sheet->drag_range.row0 - sheet->range.row0); sheet->active_cell.col = sheet->active_cell.col + (sheet->drag_range.col0 - sheet->range.col0); if (sheet->drag_range.row0 < sheet->range.row0) sheet->selection_cell.row = sheet->drag_range.row0; if (sheet->drag_range.rowi >= sheet->range.rowi) sheet->selection_cell.row = sheet->drag_range.rowi; if (sheet->drag_range.col0 < sheet->range.col0) sheet->selection_cell.col = sheet->drag_range.col0; if (sheet->drag_range.coli >= sheet->range.coli) sheet->selection_cell.col = sheet->drag_range.coli; old_range = sheet->range; sheet->range = sheet->drag_range; sheet->drag_range = old_range; if (sheet->state == GTK_STATE_NORMAL) sheet->state = GTK_SHEET_RANGE_SELECTED; g_signal_emit(GTK_OBJECT(sheet), sheet_signals[RESIZE_RANGE], 0, &sheet->drag_range, &sheet->range); gtk_sheet_select_range(sheet, &sheet->range); } if (sheet->state == GTK_SHEET_NORMAL && GTK_SHEET_IN_SELECTION(sheet)) { GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); gdk_pointer_ungrab(event->time); gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); } if (GTK_SHEET_IN_SELECTION) gdk_pointer_ungrab(event->time); if (sheet->timer) g_source_remove(sheet->timer); gtk_grab_remove(GTK_WIDGET(sheet)); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); return (TRUE); } /* * gtk_sheet_motion_handler:

* this is the #GtkSheet widget class "motion-notify-event" signal handler * * @param widget the #GtkSheet * @param event the GdkEventMotion which triggered this signal * * @return TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. */ static gboolean gtk_sheet_motion_handler(GtkWidget *widget, GdkEventMotion *event) { GtkSheet *sheet; GdkModifierType mods; GdkCursorType new_cursor; gint x, y, row, column; g_return_val_if_fail(widget != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(widget), FALSE); g_return_val_if_fail(event != NULL, FALSE); sheet = GTK_SHEET(widget); /* selections on the sheet */ x = event->x; y = event->y; #if GTK_SHEET_DEBUG_MOTION > 0 g_debug("gtk_sheet_motion_handler: (%d,%d) inSel %s", x, y, GTK_SHEET_IN_SELECTION(sheet) ? "Yes" : "No" ); #endif if (event->window == sheet->column_title_window && gtk_sheet_columns_resizable(sheet)) { gtk_widget_get_pointer(widget, &x, &y); if (!GTK_SHEET_IN_SELECTION(sheet) && POSSIBLE_XDRAG(sheet, x, &column)) { new_cursor = GDK_SB_H_DOUBLE_ARROW; if (new_cursor != gdk_cursor_get_cursor_type(sheet->cursor_drag)) { gdk_cursor_destroy(sheet->cursor_drag); sheet->cursor_drag = gdk_cursor_new(GDK_SB_H_DOUBLE_ARROW); gdk_window_set_cursor(sheet->column_title_window, sheet->cursor_drag); } } else { new_cursor = GDK_TOP_LEFT_ARROW; if (!GTK_SHEET_IN_XDRAG(sheet) && new_cursor != gdk_cursor_get_cursor_type(sheet->cursor_drag)) { gdk_cursor_destroy(sheet->cursor_drag); sheet->cursor_drag = gdk_cursor_new(GDK_TOP_LEFT_ARROW); gdk_window_set_cursor(sheet->column_title_window, sheet->cursor_drag); } } } if (event->window == sheet->row_title_window && gtk_sheet_rows_resizable(sheet)) { gtk_widget_get_pointer(widget, &x, &y); if (!GTK_SHEET_IN_SELECTION(sheet) && POSSIBLE_YDRAG(sheet, y, &column)) { new_cursor = GDK_SB_V_DOUBLE_ARROW; if (new_cursor != gdk_cursor_get_cursor_type(sheet->cursor_drag)) { gdk_cursor_destroy(sheet->cursor_drag); sheet->cursor_drag = gdk_cursor_new(GDK_SB_V_DOUBLE_ARROW); gdk_window_set_cursor(sheet->row_title_window, sheet->cursor_drag); } } else { new_cursor = GDK_TOP_LEFT_ARROW; if (!GTK_SHEET_IN_YDRAG(sheet) && new_cursor != gdk_cursor_get_cursor_type(sheet->cursor_drag)) { gdk_cursor_destroy(sheet->cursor_drag); sheet->cursor_drag = gdk_cursor_new(GDK_TOP_LEFT_ARROW); gdk_window_set_cursor(sheet->row_title_window, sheet->cursor_drag); } } } new_cursor = GDK_PLUS; if (!POSSIBLE_DRAG(sheet, x, y, &row, &column) && !GTK_SHEET_IN_DRAG(sheet) && !POSSIBLE_RESIZE(sheet, x, y, &row, &column) && !GTK_SHEET_IN_RESIZE(sheet) && event->window == sheet->sheet_window && new_cursor != gdk_cursor_get_cursor_type(sheet->cursor_drag)) { gdk_cursor_destroy(sheet->cursor_drag); sheet->cursor_drag = gdk_cursor_new(GDK_PLUS); gdk_window_set_cursor(sheet->sheet_window, sheet->cursor_drag); } new_cursor = GDK_TOP_LEFT_ARROW; if (!(POSSIBLE_RESIZE(sheet, x, y, &row, &column) || GTK_SHEET_IN_RESIZE(sheet)) && (POSSIBLE_DRAG(sheet, x, y, &row, &column) || GTK_SHEET_IN_DRAG(sheet)) && event->window == sheet->sheet_window && new_cursor != gdk_cursor_get_cursor_type(sheet->cursor_drag)) { gdk_cursor_destroy(sheet->cursor_drag); sheet->cursor_drag = gdk_cursor_new(GDK_TOP_LEFT_ARROW); gdk_window_set_cursor(sheet->sheet_window, sheet->cursor_drag); } new_cursor = GDK_SIZING; if (!GTK_SHEET_IN_DRAG(sheet) && (POSSIBLE_RESIZE(sheet, x, y, &row, &column) || GTK_SHEET_IN_RESIZE(sheet)) && event->window == sheet->sheet_window && new_cursor != gdk_cursor_get_cursor_type(sheet->cursor_drag)) { gdk_cursor_destroy(sheet->cursor_drag); sheet->cursor_drag = gdk_cursor_new(GDK_SIZING); gdk_window_set_cursor(sheet->sheet_window, sheet->cursor_drag); } gdk_window_get_pointer(gtk_widget_get_window(widget), &x, &y, &mods); if (!(mods & GDK_BUTTON1_MASK)) return (FALSE); if (GTK_SHEET_IN_XDRAG(sheet)) { if (event->is_hint || event->window != gtk_widget_get_window(widget)) { gtk_widget_get_pointer(widget, &x, NULL); } else x = event->x; new_column_width(sheet, sheet->drag_cell.col, &x); if (x != sheet->x_drag) { draw_xor_vline(sheet); sheet->x_drag = x; draw_xor_vline(sheet); } return (TRUE); } if (GTK_SHEET_IN_YDRAG(sheet)) { if (event->is_hint || event->window != gtk_widget_get_window(widget)) { gtk_widget_get_pointer(widget, NULL, &y); } else y = event->y; new_row_height(sheet, sheet->drag_cell.row, &y); if (y != sheet->y_drag) { draw_xor_hline(sheet); sheet->y_drag = y; draw_xor_hline(sheet); } return (TRUE); } if (GTK_SHEET_IN_DRAG(sheet)) { GtkSheetRange aux, visr; gint current_row = MIN(sheet->maxrow, _gtk_sheet_row_from_ypixel(sheet, y)); gint current_col = MIN(sheet->maxcol, _gtk_sheet_column_from_xpixel(sheet, x)); row = current_row - sheet->drag_cell.row; column = current_col - sheet->drag_cell.col; if (sheet->state == GTK_SHEET_ROW_SELECTED) column = 0; if (sheet->state == GTK_SHEET_COLUMN_SELECTED) row = 0; sheet->x_drag = x; sheet->y_drag = y; aux = sheet->range; /* beware of invisible columns/rows */ if (!_gtk_sheet_get_visible_range(sheet, &visr)) return (TRUE); if (_RECT_IN_RANGE(aux.row0 + row, aux.rowi + row, aux.col0 + column, aux.coli + column, &visr)) { aux = sheet->drag_range; #if 1 /* The following code doesn't behave properly when there are invisible columns in the sheet. For a proper user experience it should 1. _gtk_sheet_count_visible(drag_range) 2. try to move the outer edge into the given direction 3. find and add enough visible columns backwards Beware: above algo will modify width/height of the drag area */ if (row > 0) { gint nrow0 = _gtk_sheet_first_visible_rowidx(sheet, sheet->range.row0 + row); gint nrowi = _gtk_sheet_first_visible_rowidx(sheet, sheet->range.rowi + row); if (nrow0 >= 0 && nrowi >= 0) { sheet->drag_range.row0 = nrow0; sheet->drag_range.rowi = nrowi; } } else { gint nrow0 = _gtk_sheet_last_visible_rowidx(sheet, sheet->range.row0 + row); gint nrowi = _gtk_sheet_last_visible_rowidx(sheet, sheet->range.rowi + row); if (nrow0 >= 0 && nrowi >= 0) { sheet->drag_range.row0 = nrow0; sheet->drag_range.rowi = nrowi; } } if (column > 0) { gint ncol0 = _gtk_sheet_first_visible_colidx(sheet, sheet->range.col0 + column); gint ncoli = _gtk_sheet_first_visible_colidx(sheet, sheet->range.coli + column); if (ncol0 >= 0 && ncoli >= 0) { sheet->drag_range.col0 = ncol0; sheet->drag_range.coli = ncoli; } } else { gint ncol0 = _gtk_sheet_last_visible_colidx(sheet, sheet->range.col0 + column); gint ncoli = _gtk_sheet_last_visible_colidx(sheet, sheet->range.coli + column); if (ncol0 >= 0 && ncoli >= 0) { sheet->drag_range.col0 = ncol0; sheet->drag_range.coli = ncoli; } } #endif if (aux.row0 != sheet->drag_range.row0 || aux.col0 != sheet->drag_range.col0) { draw_xor_rectangle(sheet, aux); draw_xor_rectangle(sheet, sheet->drag_range); } } return (TRUE); } if (GTK_SHEET_IN_RESIZE(sheet)) { GtkSheetRange aux, visr; gint current_col, current_row, col_threshold, row_threshold; g_assert(0 <= sheet->drag_cell.row && sheet->drag_cell.row <= sheet->maxrow); g_assert(0 <= sheet->drag_cell.col && sheet->drag_cell.col <= sheet->maxcol); current_row = MIN(sheet->maxrow, _gtk_sheet_row_from_ypixel(sheet, y)); current_col = MIN(sheet->maxcol, _gtk_sheet_column_from_xpixel(sheet, x)); row = current_row - sheet->drag_cell.row; column = current_col - sheet->drag_cell.col; #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_motion: RESIZE row %d col %d cr %d cc %d", row, column, current_row, current_col); #endif /*use half of column width resp. row height as threshold to expand selection*/ row_threshold = _gtk_sheet_row_top_ypixel(sheet, current_row); if (current_row >= 0) row_threshold += (ROWPTR(sheet, current_row)->height) / 2; if (current_row > sheet->drag_range.row0 && y < row_threshold) current_row = _gtk_sheet_last_visible_rowidx(sheet, current_row - 1); else if (current_row < sheet->drag_range.row0 && y < row_threshold) current_row = _gtk_sheet_first_visible_rowidx(sheet, current_row + 1); col_threshold = _gtk_sheet_column_left_xpixel(sheet, current_col); if (current_col >= 0) col_threshold += (COLPTR(sheet, current_col)->width) / 2; if (current_col > sheet->drag_range.col0 && x < col_threshold) current_col = _gtk_sheet_last_visible_colidx(sheet, current_col - 1); else if (current_col < sheet->drag_range.col0 && x > col_threshold) current_col = _gtk_sheet_first_visible_colidx(sheet, current_col + 1); sheet->x_drag = x; sheet->y_drag = y; aux = sheet->range; /* beware of invisible columns/rows */ if (!_gtk_sheet_get_visible_range(sheet, &visr)) return (TRUE); #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_motion: RESIZE th %d row %d col %d cr %d cc %d", row_threshold, row, column, current_row, current_col); #endif if (_POINT_IN_RANGE(current_row, current_col, &visr)) { aux = sheet->drag_range; sheet->drag_range = sheet->range; if (sheet->state != GTK_SHEET_COLUMN_SELECTED) { if (current_row >= sheet->drag_range.row0) { sheet->drag_range.rowi = current_row; } else if (current_row < sheet->drag_range.row0) { sheet->drag_range.rowi = sheet->drag_range.row0; sheet->drag_range.row0 = current_row; } } if (sheet->state != GTK_SHEET_ROW_SELECTED) { if (current_col >= sheet->drag_range.col0) { sheet->drag_range.coli = current_col; } else if (current_col < sheet->drag_range.col0) { sheet->drag_range.coli = sheet->drag_range.col0; sheet->drag_range.col0 = current_col; } } if (_RANGE_NEQ_RANGE(&aux, &sheet->drag_range) { draw_xor_rectangle(sheet, aux); draw_xor_rectangle(sheet, sheet->drag_range); } } return (TRUE); } gtk_sheet_get_pixel_info(sheet, NULL, x, y, &row, &column); if (sheet->state == GTK_SHEET_NORMAL && row == sheet->active_cell.row && column == sheet->active_cell.col) { return (TRUE); } if (GTK_SHEET_IN_SELECTION(sheet) && (mods & GDK_BUTTON1_MASK)) { GtkSheetRange visr; if (!_gtk_sheet_get_visible_range(sheet, &visr)) return (TRUE); if (_POINT_IN_RANGE( row >= 0 ? row : _gtk_sheet_first_visible_rowidx(sheet, 0), column >= 0 ? column : _gtk_sheet_first_visible_colidx(sheet, 0), &visr)) { gtk_sheet_extend_selection(sheet, row, column); } } return (TRUE); } /* _HUNT_() statement macros find visible row/col into hunting direction */ #define _HUNT_VISIBLE_LEFT(col) \ while (col > 0 \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) ) \ col--; \ if (col < 0) col = 0; \ while (col < sheet->maxcol \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) ) \ col++; \ if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) ) \ col = -1; #define _HUNT_VISIBLE_RIGHT(col) \ while (col < sheet->maxcol \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) ) \ col++; \ if (col > sheet->maxcol) col = sheet->maxcol; \ while (col > 0 \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) ) \ col--; \ if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) ) \ col = -1; #define _HUNT_VISIBLE_UP(row) \ while (row > 0 \ && !GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) row--; \ if (row < 0) row = 0; \ while (row < sheet->maxrow \ && !GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) row++; \ if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) row = -1; #define _HUNT_VISIBLE_DOWN(row) \ while (row < sheet->maxrow \ && ((row < 0) || !GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) ) \ row++; \ if (row > sheet->maxrow) row = sheet->maxrow; \ while (row > 0 \ && !GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) row--; \ if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) row = -1; #define _HUNT_FOCUS_LEFT(col) \ while (col > 0 \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) \ || !gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col)))) ) \ col--; \ if (col < 0) col = 0; \ while (col < sheet->maxcol \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) \ || !gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col)))) ) \ col++; \ if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) \ || !gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col))) ) \ col = -1; #define _HUNT_FOCUS_RIGHT(col) \ while (col < sheet->maxcol \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) \ || !gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col)))) ) \ col++; \ if (col > sheet->maxcol) col = sheet->maxcol; \ while (col > 0 \ && (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) \ || !gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col)))) ) \ col--; \ if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col)) \ || !gtk_widget_get_can_focus(GTK_WIDGET(COLPTR(sheet, col))) ) \ col = -1; #define _HUNT_FOCUS_UP(row) \ while (row > 0 \ && (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row)) \ || !GTK_SHEET_ROW_CAN_FOCUS(ROWPTR(sheet, row)))) \ row--; \ if (row < 0) row = 0; \ while (row < sheet->maxrow \ && (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row)) \ || !GTK_SHEET_ROW_CAN_FOCUS(ROWPTR(sheet, row)))) \ row++; \ if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row)) \ || !GTK_SHEET_ROW_CAN_FOCUS(ROWPTR(sheet, row))) \ row = -1; #define _HUNT_FOCUS_DOWN(row) \ while (row < sheet->maxrow \ && (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row)) \ || !GTK_SHEET_ROW_CAN_FOCUS(ROWPTR(sheet, row)))) \ row++; \ if (row > sheet->maxrow) row = sheet->maxrow; \ while (row > 0 \ && (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row)) \ || !GTK_SHEET_ROW_CAN_FOCUS(ROWPTR(sheet, row)))) \ row--; \ if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row)) \ || !GTK_SHEET_ROW_CAN_FOCUS(ROWPTR(sheet, row))) \ row = -1; static gint _gtk_sheet_move_query(GtkSheet *sheet, gint row, gint column, gboolean need_focus) { gint row_move = FALSE, column_move = FALSE; gint row_align = -1, col_align = -1; /* undef. */ guint height, width; gint new_row = row; gint new_col = column; GtkSheetRange visr; #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_move_query: row %d column %d view row %d-%d col %d-%d", row, column, MIN_VIEW_ROW(sheet), MAX_VIEW_ROW(sheet), MIN_VIEW_COLUMN(sheet), MAX_VIEW_COLUMN(sheet)); #endif height = sheet->sheet_window_height; width = sheet->sheet_window_width; /* beware of invisible columns/rows */ if (!_gtk_sheet_get_visible_range(sheet, &visr)) return (0); #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_move_query: state %d visr row %d-%d col %d-%d", sheet->state, visr.row0, visr.rowi, visr.col0, visr.coli); #endif if (row >= MAX_VIEW_ROW(sheet) && row <= visr.rowi && sheet->state != GTK_SHEET_COLUMN_SELECTED) { #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_move_query: row %d > maxvr %d visr.rowi %d", row, MAX_VIEW_ROW(sheet), visr.rowi); #endif row_align = 1; /* bottom */ if (need_focus) { _HUNT_FOCUS_DOWN(new_row); } else { _HUNT_VISIBLE_DOWN(new_row); } if (new_row >= 0) row_move = TRUE; if (MAX_VIEW_ROW(sheet) == sheet->maxrow && _gtk_sheet_row_bottom_ypixel(sheet, sheet->maxrow) < height) { row_move = FALSE; row_align = -1; } } if (row <= MIN_VIEW_ROW(sheet) && row >= visr.row0 && sheet->state != GTK_SHEET_COLUMN_SELECTED) { #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_move_query: row %d < minvr %d visr.row0 %d", row, MIN_VIEW_ROW(sheet), visr.row0); #endif row_align = 0; /* top */ if (need_focus) { _HUNT_FOCUS_UP(new_row); } else { _HUNT_VISIBLE_UP(new_row); } if (new_row >= 0) row_move = TRUE; } if (column >= MAX_VIEW_COLUMN(sheet) && column <= visr.coli && sheet->state != GTK_SHEET_ROW_SELECTED) { #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_move_query: col %d > maxvc %d visr.coli %d", column, MAX_VIEW_COLUMN(sheet), visr.coli); #endif col_align = 1; /* right */ if (need_focus) { _HUNT_FOCUS_RIGHT(new_col); } else { _HUNT_VISIBLE_RIGHT(new_col); } if (new_col >= 0) column_move = TRUE; if (MAX_VIEW_COLUMN(sheet) == sheet->maxcol && _gtk_sheet_column_right_xpixel(sheet, sheet->maxcol) < width) { column_move = FALSE; col_align = -1; } } if (column <= MIN_VIEW_COLUMN(sheet) && column >= visr.col0 && sheet->state != GTK_SHEET_ROW_SELECTED) { #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_move_query: col %d < minvc %d visr.col0 %d", column, MIN_VIEW_COLUMN(sheet), visr.col0); #endif col_align = 0; /* left */ if (need_focus) { _HUNT_FOCUS_LEFT(new_col); } else { _HUNT_VISIBLE_LEFT(new_col); } if (new_col >= 0) column_move = TRUE; } #if GTK_SHEET_DEBUG_MOVE > 0 g_debug("gtk_sheet_move_query: rowMv %d colMv %d newR %d newC %d", row_move, column_move, new_row, new_col); #endif if (row_move || column_move) { gtk_sheet_moveto(sheet, new_row, new_col, row_align, col_align); } return (row_move || column_move); } static void gtk_sheet_extend_selection(GtkSheet *sheet, gint row, gint column) { GtkSheetRange range; gint state; gint r, c; #if GTK_SHEET_DEBUG_SELECTION > 0 g_debug("gtk_sheet_extend_selection: row %d column %d", row, column); #endif if (sheet->selection_mode == GTK_SELECTION_SINGLE) return; if (row == sheet->selection_cell.row && column == sheet->selection_cell.col) return; if (sheet->active_cell.row < 0 || sheet->active_cell.row > sheet->maxrow) return; if (sheet->active_cell.col < 0 || sheet->active_cell.col > sheet->maxcol) return; _gtk_sheet_move_query(sheet, row, column, FALSE); gtk_widget_grab_focus(GTK_WIDGET(sheet)); if (GTK_SHEET_IN_DRAG(sheet)) return; state = sheet->state; switch(sheet->state) { case GTK_SHEET_ROW_SELECTED: column = sheet->maxcol; break; case GTK_SHEET_COLUMN_SELECTED: row = sheet->maxrow; break; case GTK_SHEET_NORMAL: r = sheet->active_cell.row; c = sheet->active_cell.col; sheet->range.col0 = c; sheet->range.row0 = r; sheet->range.coli = c; sheet->range.rowi = r; gdk_draw_pixmap(sheet->sheet_window, gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[GTK_STATE_NORMAL], sheet->pixmap, _gtk_sheet_column_left_xpixel(sheet, c) - 1, _gtk_sheet_row_top_ypixel(sheet, r) - 1, _gtk_sheet_column_left_xpixel(sheet, c) - 1, _gtk_sheet_row_top_ypixel(sheet, r) - 1, COLPTR(sheet, c)->width + 4, sheet->row[r].height + 4); sheet->state = GTK_SHEET_RANGE_SELECTED; gtk_sheet_range_draw_selection(sheet, sheet->range); /* FALLTHROUGH */ case GTK_SHEET_RANGE_SELECTED: sheet->state = GTK_SHEET_RANGE_SELECTED; /* FALLTHROUGH */ } sheet->selection_cell.row = row; sheet->selection_cell.col = column; range.col0 = MIN(column, sheet->active_cell.col); range.coli = MAX(column, sheet->active_cell.col); range.row0 = MIN(row, sheet->active_cell.row); range.rowi = MAX(row, sheet->active_cell.row); range.coli = MIN(range.coli, sheet->maxcol); range.rowi = MIN(range.rowi, sheet->maxrow); if (range.row0 != sheet->range.row0 || range.rowi != sheet->range.rowi || range.col0 != sheet->range.col0 || range.coli != sheet->range.coli || state == GTK_SHEET_NORMAL) { gtk_sheet_real_select_range(sheet, &range); } } /* * gtk_sheet_entry_key_press_handler: * * this event handler propagates the "key-press-event" signal * from the sheet_entry to the #GtkSheet * * @param widget the #GtkSheet (connected "swapped") * @param key the GdkEventKey which triggered this signal * * @return TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. */ static gboolean gtk_sheet_entry_key_press_handler(GtkWidget *widget, GdkEventKey *key, gpointer user_data) { gboolean stop_emission = FALSE; GtkSheet *sheet = GTK_SHEET(widget); #if GTK_SHEET_DEBUG_KEYPRESS > 0 g_debug("gtk_sheet_entry_key_press_handler: called, key %s", gtk_accelerator_name(key->keyval, key->state)); #endif if (!_gtk_sheet_binding_filter(sheet, key)) { #if GTK_SHEET_DEBUG_KEYPRESS > 0 g_debug("gtk_sheet_entry_key_press_handler: filtered binding"); #endif return (FALSE); } #if 1 /* process enter-event - detect wether Return or Enter was pressed - detect wether the application wants it to be handled by the sheet - if unwanted: execute appropriate application handler - use a new signal for this ? */ if ((key->keyval == GDK_KEY_Return) || (key->keyval == GDK_KEY_KP_Enter)) { #if GTK_SHEET_DEBUG_ENTER_PRESSED > 0 g_debug("gtk_sheet_entry_key_press_handler: enter-pressed: invoke"); #endif _gtkextra_signal_emit(GTK_OBJECT(sheet), sheet_signals[ENTER_PRESSED], key, &stop_emission); #if GTK_SHEET_DEBUG_ENTER_PRESSED > 0 g_debug("gtk_sheet_entry_key_press_handler: enter-pressed: returns %d", stop_emission); #endif } #endif if (!stop_emission) { /* intercept item_entry processing if there exists a key binding on the sheet */ if (gtk_bindings_activate_event(GTK_OBJECT(sheet), key)) { stop_emission = TRUE; } else { g_signal_emit_by_name(GTK_OBJECT(widget), "key_press_event", key, &stop_emission); } } #if GTK_SHEET_DEBUG_KEYPRESS > 0 g_debug("gtk_sheet_entry_key_press_handler: done, key %s stop %d", gtk_accelerator_name(key->keyval, key->state), stop_emission); #endif return (stop_emission); } /* * gtk_sheet_key_press_handler: * * this is the #GtkSheet widget class "key-press-event" handler. * * @param widget the #GtkSheet * @param key the GdkEventKey which triggered this signal * * @return TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. */ static gboolean gtk_sheet_key_press_handler(GtkWidget *widget, GdkEventKey *key) { GtkSheet *sheet; gint state; gboolean extend_selection = FALSE; gboolean in_selection = FALSE; sheet = GTK_SHEET(widget); extend_selection = (key->state & GDK_SHIFT_MASK) || key->keyval == GDK_KEY_Shift_L || key->keyval == GDK_KEY_Shift_R; state = sheet->state; in_selection = GTK_SHEET_IN_SELECTION(sheet); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_SELECTION); #if GTK_SHEET_DEBUG_KEYPRESS > 0 g_debug("gtk_sheet_key_press_handler: key %s", gtk_accelerator_name(key->keyval, key->state)); #endif /* if there is a key_binding, use implementation from _gtk_sheet_move_cursor() */ if (_gtk_sheet_binding_filter(sheet, key) && gtk_bindings_activate_event(GTK_OBJECT(sheet), key)) { #if GTK_SHEET_DEBUG_KEYPRESS > 0 g_debug("gtk_sheet_key_press_handler: done %s (binding)", gtk_accelerator_name(key->keyval, key->state)); #endif return (TRUE); } return (FALSE); } /** * _gtk_sheet_move_cursor: * @sheet: the sheet * @step: type of movement * @count: number of steps to move * @extend_selection: TRUE if the move should extend the * selection default handler for move-cursor signal */ static void _gtk_sheet_move_cursor(GtkSheet *sheet, GtkMovementStep step, gint count, gboolean extend_selection) { gint row, col; gboolean veto = TRUE; #if GTK_SHEET_DEBUG_SIGNALS > 0 g_debug("SIGNAL _gtk_sheet_move_cursor %p step %d count %d extend %d", sheet, step, count, extend_selection); #endif row = sheet->active_cell.row; col = sheet->active_cell.col; switch(step) { case GTK_MOVEMENT_PAGES: count = count * (MAX_VIEW_ROW(sheet) - MIN_VIEW_ROW(sheet) - GTK_SHEET_PAGE_OVERLAP); /* FALLTHROUGH */ case GTK_MOVEMENT_DISPLAY_LINES: if (count < 0) /* Move Up */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.row > 0) { row = sheet->selection_cell.row + count; _HUNT_VISIBLE_UP(row); gtk_sheet_extend_selection(sheet, row, sheet->selection_cell.col); } return; } if (sheet->state == GTK_SHEET_COLUMN_SELECTED) row = MIN_VIEW_ROW(sheet); if (sheet->state == GTK_SHEET_ROW_SELECTED) col = MIN_VIEW_COLUMN(sheet); if (row > 0) { row = row + count; _HUNT_FOCUS_UP(row); } } else if (count > 0) /* Move Down */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.row < sheet->maxrow) { row = sheet->selection_cell.row + count; _HUNT_VISIBLE_DOWN(row); gtk_sheet_extend_selection(sheet, row, sheet->selection_cell.col); } return; } if (sheet->state == GTK_SHEET_COLUMN_SELECTED) row = MIN_VIEW_ROW(sheet) - 1; if (sheet->state == GTK_SHEET_ROW_SELECTED) col = MIN_VIEW_COLUMN(sheet); if (row < sheet->maxrow) { row = row + count; _HUNT_FOCUS_DOWN(row); } } gtk_sheet_click_cell(sheet, row, col, &veto); break; case GTK_MOVEMENT_HORIZONTAL_PAGES: count = count * (MAX_VIEW_COLUMN(sheet) - MIN_VIEW_COLUMN(sheet) - GTK_SHEET_PAGE_OVERLAP); /* FALLTHROUGH */ case GTK_MOVEMENT_VISUAL_POSITIONS: if (count < 0) /* Move Left */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.col > 0) { col = sheet->selection_cell.col + count; _HUNT_VISIBLE_LEFT(col); gtk_sheet_extend_selection(sheet, sheet->selection_cell.row, col); } return; } if (sheet->state == GTK_SHEET_ROW_SELECTED) col = MIN_VIEW_COLUMN(sheet) - 1; if (sheet->state == GTK_SHEET_COLUMN_SELECTED) row = MIN_VIEW_ROW(sheet); if (col > 0) { col = col + count; _HUNT_FOCUS_LEFT(col); } } else if (count > 0) /* Move Right */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.col < sheet->maxcol) { col = sheet->selection_cell.col + count; _HUNT_VISIBLE_RIGHT(col); gtk_sheet_extend_selection(sheet, sheet->selection_cell.row, col); } return; } if (sheet->state == GTK_SHEET_ROW_SELECTED) col = MIN_VIEW_COLUMN(sheet) - 1; if (sheet->state == GTK_SHEET_COLUMN_SELECTED) row = MIN_VIEW_ROW(sheet); if (col < sheet->maxcol) { col = col + count; _HUNT_FOCUS_RIGHT(col); } } gtk_sheet_click_cell(sheet, row, col, &veto); break; case GTK_MOVEMENT_BUFFER_ENDS: if (count < 0) /* Topmost Row */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.row > 0) { row = 0; _HUNT_VISIBLE_UP(row); gtk_sheet_extend_selection(sheet, row, sheet->selection_cell.col); } return; } row = 0; _HUNT_FOCUS_UP(row); } else if (count > 0) /* Last Row */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.row < sheet->maxrow) { row = sheet->maxrow; _HUNT_VISIBLE_DOWN(row); gtk_sheet_extend_selection(sheet, row, sheet->selection_cell.col); } return; } row = sheet->maxrow; _HUNT_FOCUS_DOWN(row); } gtk_sheet_click_cell(sheet, row, col, &veto); break; case GTK_MOVEMENT_DISPLAY_LINE_ENDS: if (count < 0) /* First Column */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.col > 0) { col = 0; _HUNT_VISIBLE_LEFT(col); gtk_sheet_extend_selection(sheet, sheet->selection_cell.row, col); } return; } col = 0; _HUNT_FOCUS_LEFT(col); } else if (count > 0) /* Last Column */ { if (extend_selection) { if (sheet->state == GTK_STATE_NORMAL) { gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) break; } if (sheet->selection_cell.col < sheet->maxcol) { col = sheet->maxcol; _HUNT_VISIBLE_RIGHT(col); gtk_sheet_extend_selection(sheet, sheet->selection_cell.row, col); } return; } col = sheet->maxcol; _HUNT_FOCUS_RIGHT(col); } gtk_sheet_click_cell(sheet, row, col, &veto); break; case GTK_MOVEMENT_LOGICAL_POSITIONS: if (sheet->state == GTK_SHEET_ROW_SELECTED) col = MIN_VIEW_COLUMN(sheet) - 1; if (sheet->state == GTK_SHEET_COLUMN_SELECTED) row = MIN_VIEW_ROW(sheet); if ((count == GTK_DIR_LEFT) /* Tab horizontal backward */ || (count == GTK_DIR_TAB_BACKWARD)) /* Tab horizontal backward */ { gint old_col = col; if (col > 0) /* move left within line */ { col = col - 1; _HUNT_FOCUS_LEFT(col); } if (col == old_col && row > 0) /* wrap at eol */ { col = sheet->maxcol; _HUNT_FOCUS_LEFT(col); row = row - 1; _HUNT_FOCUS_UP(row); } } else if ((count == GTK_DIR_RIGHT) /* Tab horizontal forward */ || (count == GTK_DIR_TAB_FORWARD)) { gint old_col = col; if (col < sheet->maxcol) /* move right within line */ { col = col + 1; _HUNT_FOCUS_RIGHT(col); } if (col == old_col && row < sheet->maxrow) /* wrap at eol */ { col = 0; _HUNT_FOCUS_RIGHT(col); row = row + 1; _HUNT_FOCUS_DOWN(row); } } else if (count == GTK_DIR_UP) /* Tab vertical backward */ { gint old_row = row; if (row > 0) /* move up within column */ { row = row - 1; _HUNT_FOCUS_UP(row); } if (row == old_row && col > 0) /* wrap at eol */ { row = sheet->maxrow; _HUNT_FOCUS_UP(row); col = col - 1; _HUNT_FOCUS_LEFT(col); } } else if (count == GTK_DIR_DOWN) /* Tab vertical forward */ { gint old_row = row; if (row < sheet->maxrow) /* move down within column */ { row = row + 1; _HUNT_FOCUS_DOWN(row); } if (row == old_row && col < sheet->maxcol) /* wrap at eol */ { row = 0; _HUNT_FOCUS_DOWN(row); col = col + 1; _HUNT_FOCUS_RIGHT(col); } } gtk_sheet_click_cell(sheet, row, col, &veto); break; default: break; } gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); #if GTK_SHEET_DEBUG_SIGNALS > 0 g_debug("SIGNAL _gtk_sheet_move_cursor %p done", sheet); #endif } /* * gtk_sheet_size_request_handler: * * this is the #GtkSheet widget class "size-request" signal handler * * @param widget the #GtkSheet * @param requisition * the #GtkRequisition */ static void gtk_sheet_size_request_handler(GtkWidget *widget, GtkRequisition *requisition) { GtkSheet *sheet; GList *children; GtkSheetChild *child; GtkRequisition child_requisition; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_SHEET(widget)); g_return_if_fail(requisition != NULL); #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_size_request_handler: called"); #endif sheet = GTK_SHEET(widget); requisition->width = 3 * GTK_SHEET_COLUMN_DEFAULT_WIDTH; requisition->height = 3 * _gtk_sheet_row_default_height(widget); /* compute the size of the column title area */ if (sheet->column_titles_visible) requisition->height += sheet->column_title_area.height; /* compute the size of the row title area */ if (sheet->row_titles_visible) requisition->width += sheet->row_title_area.width; _gtk_sheet_recalc_view_range(sheet); children = sheet->children; while (children) { child = children->data; children = children->next; gtk_widget_size_request(child->widget, &child_requisition); } } /* * gtk_sheet_size_allocate_handler: * * this is the #GtkSheet widget class "size-allocate" signal handler * * @param widget the #GtkSheet * @param allocation the #GtkAllocation */ static void gtk_sheet_size_allocate_handler(GtkWidget *widget, GtkAllocation *allocation) { GtkSheet *sheet; GtkAllocation sheet_allocation; gint border_width; gboolean modified; g_return_if_fail(widget != NULL); g_return_if_fail(GTK_IS_SHEET(widget)); g_return_if_fail(allocation != NULL); #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_size_allocate_handler: called (%d, %d, %d, %d)", allocation->x, allocation->y, allocation->width, allocation->height); #endif sheet = GTK_SHEET(widget); gtk_widget_set_allocation(widget, allocation); border_width = gtk_container_get_border_width(GTK_CONTAINER(widget)); if (gtk_widget_get_realized(widget)) { gdk_window_move_resize(gtk_widget_get_window(widget), allocation->x + border_width, allocation->y + border_width, allocation->width - 2 * border_width, allocation->height - 2 * border_width); } /* use internal allocation structure for all the math * because it's easier than always subtracting the container * border width */ sheet->internal_allocation.x = 0; sheet->internal_allocation.y = 0; sheet->internal_allocation.width = allocation->width - 2 * border_width; sheet->internal_allocation.height = allocation->height - 2 * border_width; sheet_allocation.x = 0; sheet_allocation.y = 0; sheet_allocation.width = allocation->width - 2 * border_width; sheet_allocation.height = allocation->height - 2 * border_width; modified = (sheet->sheet_window_width != sheet_allocation.width) || (sheet->sheet_window_height != sheet_allocation.height); sheet->sheet_window_width = sheet_allocation.width; sheet->sheet_window_height = sheet_allocation.height; if (gtk_widget_get_realized(widget)) { gdk_window_move_resize(sheet->sheet_window, sheet_allocation.x, sheet_allocation.y, sheet_allocation.width, sheet_allocation.height); } /* position the window which holds the column title buttons */ sheet->column_title_area.x = 0; sheet->column_title_area.y = 0; if (sheet->row_titles_visible) sheet->column_title_area.x = sheet->row_title_area.width; sheet->column_title_area.width = sheet_allocation.width - sheet->column_title_area.x; if (gtk_widget_get_realized(widget) && sheet->column_titles_visible) { gdk_window_move_resize(sheet->column_title_window, sheet->column_title_area.x, sheet->column_title_area.y, sheet->column_title_area.width, sheet->column_title_area.height); } /* column button allocation */ _gtk_sheet_column_buttons_size_allocate(sheet); /* position the window which holds the row title buttons */ sheet->row_title_area.x = 0; sheet->row_title_area.y = 0; if (sheet->column_titles_visible) sheet->row_title_area.y = sheet->column_title_area.height; sheet->row_title_area.height = sheet_allocation.height - sheet->row_title_area.y; if (gtk_widget_get_realized(widget) && sheet->row_titles_visible) { gdk_window_move_resize(sheet->row_title_window, sheet->row_title_area.x, sheet->row_title_area.y, sheet->row_title_area.width, sheet->row_title_area.height); } /* row button allocation */ size_allocate_row_title_buttons(sheet); if (gtk_sheet_autoresize(sheet) && (modified || (GTK_SHEET_FLAGS(sheet) & GTK_SHEET_IN_AUTORESIZE_PENDING))) { /* autoresize here, because window was changed -> max col_width */ gtk_sheet_autoresize_all(sheet); GTK_SHEET_UNSET_FLAGS(sheet, GTK_SHEET_IN_AUTORESIZE_PENDING); } _gtk_sheet_recalc_view_range(sheet); /* re-scale backing pixmap */ gtk_sheet_make_backing_pixmap(sheet, 0, 0); gtk_sheet_position_children(sheet); /* set the scrollbars adjustments */ _gtk_sheet_scrollbar_adjust(sheet); } static gboolean gtk_sheet_focus(GtkWidget *widget, GtkDirectionType direction) { g_return_val_if_fail(GTK_IS_SHEET(widget), FALSE); GtkSheet *sheet = GTK_SHEET(widget); if (!gtk_widget_is_sensitive(GTK_WIDGET(sheet))) { g_debug("gtk_sheet_focus: X"); return(FALSE); } #if GTK_SHEET_DEBUG_KEYPRESS > 0 g_debug("gtk_sheet_focus: %p %d", widget, direction); #endif if (!gtk_widget_has_focus (widget)) { gtk_widget_grab_focus (widget); } gint row = sheet->active_cell.row; gint col = sheet->active_cell.col; if (row < 0 || col < 0) /* not in sheet */ { _gtk_sheet_move_cursor(sheet, GTK_MOVEMENT_VISUAL_POSITIONS, 1, FALSE); return(TRUE); } gboolean veto; gtk_sheet_click_cell(sheet, row, col, &veto); if (!veto) return(FALSE); return(TRUE); } static void size_allocate_row_title_buttons(GtkSheet *sheet) { gint i, y, height; GdkRectangle *rta = &sheet->row_title_area; if (!sheet->row_titles_visible) return; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; #if GTK_SHEET_DEBUG_ALLOCATION > 0 g_debug("size_allocate_row_title_buttons: called"); #endif height = sheet->sheet_window_height; y = 0; if (sheet->column_titles_visible) { height -= sheet->column_title_area.height; y = sheet->column_title_area.height; } /* if neccessary, resize the row title window */ if (rta->height != height || rta->y != y) { rta->y = y; rta->height = height; gdk_window_move_resize(sheet->row_title_window, rta->x, rta->y, rta->width, rta->height); } /* if the right edge of the sheet is visible, clear it */ if (MAX_VIEW_ROW(sheet) >= sheet->maxrow) { /* this one causes flicker */ gdk_window_clear_area(sheet->row_title_window, 0, 0, rta->width, rta->height); } if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return; for (i = MIN_VIEW_ROW(sheet); i <= MAX_VIEW_ROW(sheet) && i <= sheet->maxrow; i++) _gtk_sheet_draw_button(sheet, i, -1); } /** * gtk_sheet_recalc_top_ypixels: * @sheet: the #GtkSheet * * recalculate topmost pixel of all rows */ void _gtk_sheet_recalc_top_ypixels(GtkSheet *sheet) { gint i, cy; if (sheet->column_titles_visible) cy = sheet->column_title_area.height; else cy = 0; for (i = 0; i <= sheet->maxrow; i++) { sheet->row[i].top_ypixel = cy; if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) cy += sheet->row[i].height; } } /** * _gtk_sheet_recalc_left_xpixels: * @sheet: the #GtkSheet * * recalculate left pixel index of all columns */ void _gtk_sheet_recalc_left_xpixels(GtkSheet *sheet) { gint i, cx; if (sheet->row_titles_visible) cx = sheet->row_title_area.width; else cx = 0; for (i = 0; i <= sheet->maxcol; i++) { COLPTR(sheet, i)->left_xpixel = cx; if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) cx += COLPTR(sheet, i)->width; } } /** * _gtk_sheet_reset_text_column: * @sheet: the #GtkSheet * @start_column: left most column to start from * * reset left/right text column index to initial state */ void _gtk_sheet_reset_text_column(GtkSheet *sheet, gint start_column) { #if GTK_SHEET_OPTIMIZE_COLUMN_DRAW>0 int i; g_assert(start_column >= -1); for (i = start_column + 1; i <= sheet->maxcol; i++) /* for the fresh columns */ { GtkSheetColumn *colptr = COLPTR(sheet, i); colptr->left_text_column = i; colptr->right_text_column = i; } #endif } static void _get_entry_window_size(GtkEntry *entry, gint *x, gint *y, gint *width, gint *height) { GtkRequisition requisition; GtkAllocation allocation; GtkWidget *widget = GTK_WIDGET(entry); /* GtkEntry->is_cell_renderer is a GSEAL()ed structure member. It will only be set to TRUE when calling the GtkEntry's GtkCellEditable interface function gtk_entry_cell_editable_init(). This should never be the case in GtkSheet or GtkItemEntry. Anyhow, if the above statement wasn't true, solutions could be: - ask the Gtk maintainers to add the function GtkEntry::get_widget_window_size() to the public GtkEntry interface - last resort work-around: use the sealed member anyhow GtkEntry->GSEAL(is_cell_renderer) */ #if 0 # define ENTRY_IS_CELL_RENDERER entry->is_cell_renderer #else # define ENTRY_IS_CELL_RENDERER FALSE #endif gtk_widget_get_child_requisition(widget, &requisition); gtk_widget_get_allocation(widget, &allocation); if (x) *x = allocation.x; if (y) { if (ENTRY_IS_CELL_RENDERER) *y = allocation.y; else *y = allocation.y + (allocation.height - requisition.height) / 2; } if (width) *width = allocation.width; if (height) { if (ENTRY_IS_CELL_RENDERER) *height = allocation.height; else *height = requisition.height; } } /** * _gtk_sheet_entry_size_allocate: * @sheet: the #GtkSheet * * size allocation handler for the sheet entry */ void _gtk_sheet_entry_size_allocate(GtkSheet *sheet) { GtkAllocation shentry_allocation; gint row, col; gint size, entry_max_size, column_width, row_height; guint text_width, text_height; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (!gtk_widget_get_mapped(GTK_WIDGET(sheet))) return; if (sheet->maxrow < 0 || sheet->maxcol < 0) return; if (!sheet->sheet_entry) /* PR#102114 */ return; #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_entry_size_allocate: called"); #endif GtkWidget *entry_widget = gtk_sheet_get_entry(sheet); #if 0 /* the entry setup must be done before the text assigment, otherwise max_length may cause text assignment to fail */ _gtk_sheet_entry_setup(sheet, sheet->active_cell.row, sheet->active_cell.col, entry_widget); #endif GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, sheet->active_cell.row, sheet->active_cell.col, &attributes); if (gtk_widget_get_realized(sheet->sheet_entry)) { gtk_widget_size_request(sheet->sheet_entry, NULL); } if (GTK_IS_ITEM_ENTRY(entry_widget)) { entry_max_size = GTK_ITEM_ENTRY(entry_widget)->text_max_size; } else entry_max_size = 0; row = sheet->active_cell.row; col = sheet->active_cell.col; text_width = 0; text_height = 0; { gchar *text = gtk_sheet_get_entry_text(sheet); if (text && text[0]) { _get_string_extent(sheet, (0 <= col && col <= sheet->maxcol) ? COLPTR(sheet, col) : NULL, attributes.font_desc, text, &text_width, &text_height); } g_free(text); } if (0 <= col && col <= sheet->maxcol) column_width = COLPTR(sheet, col)->width; else column_width = GTK_SHEET_COLUMN_DEFAULT_WIDTH; if (0 <= row && row <= sheet->maxrow) row_height = sheet->row[row].height; else row_height = GTK_SHEET_ROW_DEFAULT_HEIGHT; size = MIN(text_width, entry_max_size); size = MAX(size, column_width - 2 * CELLOFFSET); shentry_allocation.x = _gtk_sheet_column_left_xpixel(sheet, col); shentry_allocation.y = _gtk_sheet_row_top_ypixel(sheet, row); shentry_allocation.width = column_width; shentry_allocation.height = row_height; if (GTK_IS_ITEM_ENTRY(sheet->sheet_entry)) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_entry_size_allocate: is_item_entry"); #endif shentry_allocation.height -= 2 * CELLOFFSET; shentry_allocation.y += CELLOFFSET; if (gtk_sheet_clip_text(sheet)) shentry_allocation.width = column_width - 2 * CELLOFFSET; else /* text extends multiple cells */ shentry_allocation.width = size; switch(GTK_ITEM_ENTRY(entry_widget)->justification) { case GTK_JUSTIFY_CENTER: shentry_allocation.x += (column_width) / 2 - size / 2; break; case GTK_JUSTIFY_RIGHT: shentry_allocation.x += column_width - size; break; case GTK_JUSTIFY_LEFT: case GTK_JUSTIFY_FILL: shentry_allocation.x += CELLOFFSET; break; } /* vertical justification */ { gint x, y, width, height; _get_entry_window_size(GTK_ENTRY(entry_widget), &x, &y, &width, &height); #if GTK_SHEET_DEBUG_SIZE>0 g_debug("_gtk_sheet_entry_size_allocate: get_widget_window_size (%d, %d, %d, %d)", x, y, width, height); #endif switch(sheet->vjust) { case GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT: case GTK_SHEET_VERTICAL_JUSTIFICATION_TOP: shentry_allocation.height = height; break; case GTK_SHEET_VERTICAL_JUSTIFICATION_MIDDLE: shentry_allocation.height = shentry_allocation.height / 2; break; case GTK_SHEET_VERTICAL_JUSTIFICATION_BOTTOM: break; } } } else if ( GTK_IS_DATA_TEXT_VIEW(sheet->sheet_entry) || GTK_IS_TEXT_VIEW(sheet->sheet_entry) ) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_entry_size_allocate: is_text_view"); #endif shentry_allocation.height -= 2 * CELLOFFSET; shentry_allocation.y += CELLOFFSET; shentry_allocation.x += CELLOFFSET; if (gtk_sheet_clip_text(sheet)) shentry_allocation.width = column_width - 2 * CELLOFFSET; else /* text extends multiple cells */ shentry_allocation.width = size; } else { shentry_allocation.x += 2; shentry_allocation.y += 2; shentry_allocation.width -= MIN(shentry_allocation.width, 3); shentry_allocation.height -= MIN(shentry_allocation.height, 3); } #if 0 /* the following works with most widgets, but looks funny */ gtk_widget_set_size_request(sheet->sheet_entry, shentry_allocation.width, shentry_allocation.height); #endif #if GTK_SHEET_DEBUG_SIZE >0 g_debug("_gtk_sheet_entry_size_allocate: allocate (%d,%d,%d,%d)", shentry_allocation.x, shentry_allocation.y, shentry_allocation.width, shentry_allocation.height); #endif gtk_widget_size_allocate(sheet->sheet_entry, &shentry_allocation); #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("_gtk_sheet_entry_size_allocate: returned (%d,%d,%d,%d)", shentry_allocation.x, shentry_allocation.y, shentry_allocation.width, shentry_allocation.height); #endif } #if GTK_SHEET_DEBUG_FINALIZE > 0 /* obj_ref debug code */ static void weak_notify(gpointer data, GObject *o) { gchar *msg = data; /* assume a string was passed as data */ g_debug("weak_notify: %p finalized (%s)", o, msg ? msg : ""); } #endif static void gtk_sheet_entry_set_max_size(GtkSheet *sheet) { gint i; gint size = 0; gint sizel = 0, sizer = 0; gint row, col; GtkJustification justification; row = sheet->active_cell.row; col = sheet->active_cell.col; #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_entry_set_max_size: called"); #endif if (!GTK_IS_ITEM_ENTRY(sheet->sheet_entry) || gtk_sheet_clip_text(sheet)) return; justification = GTK_ITEM_ENTRY(sheet->sheet_entry)->justification; switch(justification) { case GTK_JUSTIFY_FILL: case GTK_JUSTIFY_LEFT: for (i = col + 1; i <= MAX_VIEW_COLUMN(sheet) && i <= sheet->maxcol; i++) { if (gtk_sheet_cell_get_text(sheet, row, i)) break; size += COLPTR(sheet, i)->width; } size = MIN(size, sheet->sheet_window_width - _gtk_sheet_column_left_xpixel(sheet, col)); break; case GTK_JUSTIFY_RIGHT: for (i = col - 1; i >= MIN_VIEW_COLUMN(sheet); i--) { if (gtk_sheet_cell_get_text(sheet, row, i)) break; if (i < 0 || i > sheet->maxcol) continue; size += COLPTR(sheet, i)->width; } break; case GTK_JUSTIFY_CENTER: for (i = col + 1; i <= MAX_VIEW_COLUMN(sheet) && i <= sheet->maxcol; i++) { /* if (gtk_sheet_cell_get_text(sheet, row, i)) break; */ sizer += COLPTR(sheet, i)->width; } for (i = col - 1; i >= MIN_VIEW_COLUMN(sheet); i--) { if (gtk_sheet_cell_get_text(sheet, row, i)) break; if (i < 0 || i > sheet->maxcol) continue; sizel += COLPTR(sheet, i)->width; } size = 2 * MIN(sizel, sizer); break; } if (size != 0) size += COLPTR(sheet, col)->width; GTK_ITEM_ENTRY(sheet->sheet_entry)->text_max_size = size; } static gboolean sheet_entry_focus_in_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) { gboolean retval = FALSE; g_signal_emit(GTK_OBJECT(widget), sheet_signals[ENTRY_FOCUS_IN], 0, event, &retval); return (retval); } static gboolean sheet_entry_focus_out_handler(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) { gboolean retval = FALSE; g_signal_emit(GTK_OBJECT(widget), sheet_signals[ENTRY_FOCUS_OUT], 0, event, &retval); return (retval); } static void sheet_entry_populate_popup_handler(GtkWidget *widget, GtkMenu *menu, gpointer user_data) { #if GTK_SHEET_DEBUG_SIGNALS > 0 g_debug("sheet_entry_populate_popup_handler: menu %p", menu); #endif g_signal_emit(GTK_OBJECT(widget), sheet_signals[ENTRY_POPULATE_POPUP], 0, menu); } static void create_sheet_entry(GtkSheet *sheet, GType new_entry_type) { GtkWidget *widget; GtkWidget * entry, *new_entry; GtkStyle *style; widget = GTK_WIDGET(sheet); #if GTK_SHEET_DEBUG_ENTRY > 0 g_debug("create_sheet_entry: called"); #endif style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(sheet))); if (sheet->sheet_entry) { /* avoids warnings */ g_object_ref(sheet->sheet_entry); gtk_widget_unparent(sheet->sheet_entry); #if GTK_SHEET_DEBUG_ENTRY > 0 g_debug("create_sheet_entry: destroying old entry %p", sheet->sheet_entry); #endif gtk_widget_destroy(sheet->sheet_entry); sheet->sheet_entry = NULL; } if (new_entry_type == G_TYPE_NONE) new_entry_type = G_TYPE_ITEM_ENTRY; #if GTK_SHEET_DEBUG_ENTRY > 0 g_debug("create_sheet_entry: new_entry type %s", g_type_name(new_entry_type)); #endif new_entry = gtk_widget_new(new_entry_type, NULL); #if GTK_SHEET_DEBUG_ENTRY > 0 g_debug("create_sheet_entry: got new_entry %p", new_entry); #endif /* connect focus signal propagation handlers */ g_signal_connect_swapped(new_entry, "focus-in-event", G_CALLBACK(sheet_entry_focus_in_handler), sheet); g_signal_connect_swapped(new_entry, "focus-out-event", G_CALLBACK(sheet_entry_focus_out_handler), sheet); if (GTK_IS_ENTRY(new_entry) || GTK_IS_DATA_TEXT_VIEW(new_entry) || GTK_IS_TEXT_VIEW(new_entry)) { g_signal_connect_swapped(new_entry, "populate-popup", G_CALLBACK(sheet_entry_populate_popup_handler), sheet); } sheet->installed_entry_type = new_entry_type; sheet->sheet_entry = new_entry; entry = gtk_sheet_get_entry(sheet); if (!entry) /* this was an unsupported entry type */ { g_warning("Unsupported entry type - widget must contain an GtkEditable or GtkTextView"); gtk_widget_destroy(new_entry); new_entry = gtk_item_entry_new(); sheet->sheet_entry = new_entry; sheet->installed_entry_type = G_TYPE_ITEM_ENTRY; } g_object_ref_sink(sheet->sheet_entry); #if GTK_SHEET_DEBUG_FINALIZE > 0 g_object_weak_ref(G_OBJECT(sheet->sheet_entry), weak_notify, "Sheet-Entry"); #endif if (gtk_widget_get_realized(GTK_WIDGET(sheet))) { gtk_widget_size_request(sheet->sheet_entry, NULL); #if GTK_SHEET_DEBUG_ENTRY > 0 g_debug("create_sheet_entry: sheet was realized"); #endif gtk_widget_set_parent_window(sheet->sheet_entry, sheet->sheet_window); gtk_widget_set_parent(sheet->sheet_entry, GTK_WIDGET(sheet)); gtk_widget_realize(sheet->sheet_entry); } g_signal_connect_swapped(GTK_OBJECT(entry), "key_press_event", (void *)gtk_sheet_entry_key_press_handler, GTK_OBJECT(sheet)); gtk_widget_show(sheet->sheet_entry); } /** * gtk_sheet_get_entry_type: * @sheet: a #GtkSheet * * Get sheets entry type, if known * * Returns: a #GtkSheetEntryType or GTK_SHEET_ENTRY_TYPE_DEFAULT */ GType gtk_sheet_get_entry_type(GtkSheet *sheet) { g_return_val_if_fail(sheet, GTK_SHEET_ENTRY_TYPE_DEFAULT); g_return_val_if_fail(GTK_IS_SHEET(sheet), GTK_SHEET_ENTRY_TYPE_DEFAULT); return (sheet->entry_type); } /** * gtk_sheet_get_entry: * @sheet: a #GtkSheet * * Get sheet's entry widget. * * If the entry widget is a container, the direct childs of the * container are searched for a valid entry widget. If you want * the container itself to be returned, you should use * #gtk_sheet_get_entry_widget() instead. * * Returns: (transfer none) a #GtkWidget or NULL */ GtkWidget * gtk_sheet_get_entry(GtkSheet *sheet) { GtkWidget *parent; GtkWidget *entry = NULL; GtkTableChild *table_child; GtkBoxChild *box_child; GList *children = NULL; g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (!sheet->sheet_entry) /* PR#102114 */ return(NULL); if (GTK_IS_EDITABLE(sheet->sheet_entry)) return (sheet->sheet_entry); if (GTK_IS_DATA_TEXT_VIEW(sheet->sheet_entry)) return (sheet->sheet_entry); if (GTK_IS_TEXT_VIEW(sheet->sheet_entry)) return (sheet->sheet_entry); parent = GTK_WIDGET(sheet->sheet_entry); if (GTK_IS_TABLE(parent)) children = GTK_TABLE(parent)->children; if (GTK_IS_BOX(parent)) children = GTK_BOX(parent)->children; if (!children) return (NULL); while (children) { if (GTK_IS_TABLE(parent)) { table_child = children->data; entry = table_child->widget; } if (GTK_IS_BOX(parent)) { box_child = children->data; entry = box_child->widget; } if (GTK_IS_EDITABLE(entry)) return (entry); if (GTK_IS_DATA_TEXT_VIEW(entry)) return (entry); if (GTK_IS_TEXT_VIEW(entry)) return (entry); children = children->next; } return (NULL); } /** * gtk_sheet_get_entry_widget: * @sheet: a #GtkSheet * * Get sheet's entry widget. * * If the entry widget is a container, the container widget is * returned. In order to get the entry in the container child, * you might want to use #gtk_sheet_get_entry() instead. * * Returns: (transfer none) a #GtkWidget or NULL */ GtkWidget * gtk_sheet_get_entry_widget(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); g_return_val_if_fail(sheet->sheet_entry != NULL, NULL); return (sheet->sheet_entry); } /** * gtk_sheet_get_entry_text: * @sheet: a #GtkSheet * * Get the text out of the sheet_entry. * * This function is mainly used to synchronize the text of a * second entry with the sheet_entry. * * This function is necessary, because not all possible entry * widgets implement the GtkEditable interface yet. * * Returns: a copy of the sheet_entry text or NULL. This * function returns an allocated string, so g_free() it after * usage! */ gchar *gtk_sheet_get_entry_text(GtkSheet *sheet) { gchar *text = NULL; GtkWidget *entry = NULL; g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (!sheet->sheet_entry) /* PR#102114 */ return(NULL); entry = gtk_sheet_get_entry(sheet); g_return_val_if_fail(entry != NULL, NULL); if (GTK_IS_EDITABLE(entry)) { text = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); } else if ( GTK_IS_DATA_TEXT_VIEW(entry) || GTK_IS_TEXT_VIEW(entry) ) { GtkTextIter start, end; GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(entry)); gtk_text_buffer_get_bounds(buffer, &start, &end); text = gtk_text_buffer_get_text(buffer, &start, &end, TRUE); } else { g_warning("gtk_sheet_get_entry_text: no GTK_EDITABLE, don't know how to get the text."); } return (text); } /** * gtk_sheet_set_entry_text: * @sheet: a #GtkSheet * @text: the text to be set or NULL * * Set the text in the sheet_entry (and active cell). * * This function is mainly used to synchronize the text of a * second entry with the sheet_entry. * * This function is necessary, because not all possible entry * widgets implement the GtkEditable interface yet. */ void gtk_sheet_set_entry_text(GtkSheet *sheet, const gchar *text) { GtkWidget *entry = NULL; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!sheet->sheet_entry) /* PR#102114 */ return; entry = gtk_sheet_get_entry(sheet); g_return_if_fail(entry != NULL); if (GTK_IS_EDITABLE(entry)) { gint position = 0; gtk_editable_delete_text(GTK_EDITABLE(entry), 0, -1); gtk_editable_insert_text(GTK_EDITABLE(entry), text, -1, &position); } else if ( GTK_IS_DATA_TEXT_VIEW(entry) || GTK_IS_TEXT_VIEW(entry) ) { GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(entry)); GtkTextIter iter; gtk_text_buffer_set_text(buffer, text, -1); gtk_text_buffer_get_start_iter(buffer, &iter); gtk_text_buffer_place_cursor(buffer, &iter); } else { g_warning("gtk_sheet_set_entry_text: no GTK_EDITABLE, don't know how to set the text."); } } /** * gtk_sheet_set_entry_editable: * @sheet: a #GtkSheet * @editable: editable flag * * Set the editable flag in the sheet_entry * * This function is mainly used to synchronize the editable flag * of a second entry with the sheet_entry. * * This function is necessary, because not all possible entry * widgets implement the GtkEditable interface yet. */ void gtk_sheet_set_entry_editable(GtkSheet *sheet, const gboolean editable) { GtkWidget *entry = NULL; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!sheet->sheet_entry) /* PR#102114 */ return; entry = gtk_sheet_get_entry(sheet); g_return_if_fail(entry != NULL); if (GTK_IS_EDITABLE(entry)) { gtk_editable_set_editable(GTK_EDITABLE(entry), editable); } else if ( GTK_IS_DATA_TEXT_VIEW(entry) || GTK_IS_TEXT_VIEW(entry) ) { gtk_text_view_set_editable(GTK_TEXT_VIEW(entry), editable); } else { g_warning("gtk_sheet_set_entry_editable: no GTK_EDITABLE, don't know how to set editable."); } } /** * gtk_sheet_entry_select_region: * @sheet: a #GtkSheet * @start_pos: start of region * @end_pos: end of region * * Selects a region of text. * * This function is necessary, because not all possible entry * widgets implement the GtkEditable interface yet. */ void gtk_sheet_entry_select_region(GtkSheet *sheet, gint start_pos, gint end_pos) { GtkWidget *entry = NULL; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!sheet->sheet_entry) /* PR#102114 */ return; entry = gtk_sheet_get_entry(sheet); g_return_if_fail(entry != NULL); if (GTK_IS_EDITABLE(entry)) { gtk_editable_select_region(GTK_EDITABLE(entry), start_pos, end_pos); } else if ( GTK_IS_DATA_TEXT_VIEW(entry) || GTK_IS_TEXT_VIEW(entry) ) { GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(entry)); GtkTextIter start, end; gtk_text_buffer_get_iter_at_offset(buffer, &start, start_pos); gtk_text_buffer_get_iter_at_offset(buffer, &end, end_pos); gtk_text_buffer_select_range(buffer, &start, &end); } else { g_warning("gtk_sheet_entry_select_region: no GTK_EDITABLE, don't know how to select region."); } } /** * gtk_sheet_entry_signal_connect_changed: * @sheet: a #GtkSheet * @handler: (scope notified) the signal handler * * Connect a handler to the sheet_entry "changed" signal. The * user_data argument of the handler will be filled with the * #GtkSheet. * * This function is mainly used to synchronize a second entry * widget with the sheet_entry. * * This function is necessary, because not all possible entry * widgets implement the GtkEditable interface yet. * * Returns: the handler id */ gulong gtk_sheet_entry_signal_connect_changed(GtkSheet *sheet, GCallback handler) { GtkWidget *entry = NULL; gulong handler_id = 0; g_return_val_if_fail(sheet != NULL, handler_id); g_return_val_if_fail(GTK_IS_SHEET(sheet), handler_id); if (!sheet->sheet_entry) /* PR#102114 */ return(handler_id); entry = gtk_sheet_get_entry(sheet); g_return_val_if_fail(entry != NULL, handler_id); if (GTK_IS_EDITABLE(entry)) { handler_id = g_signal_connect(G_OBJECT(entry), "changed", handler, GTK_OBJECT(sheet)); } else if ( GTK_IS_DATA_TEXT_VIEW(entry) || GTK_IS_TEXT_VIEW(entry) ) { GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(entry)); handler_id = g_signal_connect(G_OBJECT(buffer), "changed", handler, GTK_OBJECT(sheet)); } else { g_warning("gtk_sheet_entry_signal_connect_changed: no GTK_EDITABLE, don't know how to get editable."); } return (handler_id); } /** * gtk_sheet_entry_signal_disconnect_by_func: * @sheet: a #GtkSheet * @handler: (scope call) the signal handler * * Disconnect a handler from the sheet_entry "changed" signal * * This function is mainly used to synchronize a second entry * widget with the sheet_entry. * * This function is necessary, because not all possible entry * widgets implement the GtkEditable interface yet. */ void gtk_sheet_entry_signal_disconnect_by_func(GtkSheet *sheet, GCallback handler) { GtkWidget *entry = NULL; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!sheet->sheet_entry) /* PR#102114 */ return; entry = gtk_sheet_get_entry(sheet); g_return_if_fail(entry != NULL); if (GTK_IS_EDITABLE(entry)) { g_signal_handlers_disconnect_by_func(G_OBJECT(entry), handler, GTK_OBJECT(sheet)); } else if ( GTK_IS_DATA_TEXT_VIEW(entry) || GTK_IS_TEXT_VIEW(entry) ) { GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(entry)); g_signal_handlers_disconnect_by_func(G_OBJECT(buffer), handler, GTK_OBJECT(sheet)); } else { g_warning("gtk_sheet_entry_signal_disconnect_by_func: no GTK_EDITABLE, don't know how to get editable."); } } /* BUTTONS */ static void row_button_set(GtkSheet *sheet, gint row) { if (row < 0 || row > sheet->maxrow) return; if (sheet->row[row].button.state == GTK_STATE_ACTIVE) return; sheet->row[row].button.state = GTK_STATE_ACTIVE; _gtk_sheet_draw_button(sheet, row, -1); } static void row_button_release(GtkSheet *sheet, gint row) { if (row < 0 || row > sheet->maxrow) return; if (sheet->row[row].button.state == GTK_STATE_NORMAL) return; sheet->row[row].button.state = GTK_STATE_NORMAL; _gtk_sheet_draw_button(sheet, row, -1); } /** * _gtk_sheet_draw_button: * @sheet: the #GtkSheet * @row: row index * @col: column index * * draw a sheet button * if row == -1 draw a column button * if col == -1 draw a row button * if both == -1 draw the sheet button * */ void _gtk_sheet_draw_button(GtkSheet *sheet, gint row, gint col) { GdkWindow *window = NULL; GtkShadowType shadow_type; guint width = 0, height = 0; gint x = 0, y = 0; gint index = 0; guint text_width = 0, text_height = 0; GtkSheetButton *button = NULL; GtkSheetChild *child = NULL; GdkRectangle allocation; gboolean sensitive = FALSE; gint state = 0; gchar * label, label_buf[10]; PangoAlignment pango_alignment = PANGO_ALIGN_LEFT; GtkSheetArea area = ON_SHEET_BUTTON_AREA; PangoFontDescription *font_desc = gtk_widget_get_style(GTK_WIDGET(sheet))->font_desc; PangoRectangle extent; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if ((row == -1) && (col == -1)) return; #if GTK_SHEET_DEBUG_DRAW_BUTTON > 0 g_debug("_gtk_sheet_draw_button: row %d col %d", row, col); #endif if (row >= 0) { if (row > sheet->maxrow) return; if (!sheet->row_titles_visible) return; if (!GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, row))) return; if (row < MIN_VIEW_ROW(sheet)) return; if (row > MAX_VIEW_ROW(sheet)) return; } if (col >= 0) { if (col > sheet->maxcol) return; if (!sheet->column_titles_visible) return; if (!GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, col))) return; if (col < MIN_VIEW_COLUMN(sheet)) return; if (col > MAX_VIEW_COLUMN(sheet)) return; } if (row == -1) { window = sheet->column_title_window; button = &COLPTR(sheet, col)->button; index = col; x = _gtk_sheet_column_left_xpixel(sheet, col) + CELL_SPACING; if (sheet->row_titles_visible) x -= sheet->row_title_area.width; y = 0; width = COLPTR(sheet, col)->width; height = sheet->column_title_area.height; sensitive = GTK_SHEET_COLUMN_IS_SENSITIVE(COLPTR(sheet, col)); area = ON_COLUMN_TITLES_AREA; } else if (col == -1) { window = sheet->row_title_window; button = &sheet->row[row].button; index = row; x = 0; y = _gtk_sheet_row_top_ypixel(sheet, row) + CELL_SPACING; if (sheet->column_titles_visible) y -= sheet->column_title_area.height; width = sheet->row_title_area.width; height = sheet->row[row].height; sensitive = GTK_SHEET_ROW_IS_SENSITIVE(ROWPTR(sheet, row)); area = ON_ROW_TITLES_AREA; } allocation.x = x; allocation.y = y; allocation.width = width; allocation.height = height; gdk_window_clear_area(window, x, y, width, height); state = button->state; if (!sensitive) state = GTK_STATE_INSENSITIVE; if (state == GTK_STATE_ACTIVE) shadow_type = GTK_SHADOW_IN; else shadow_type = GTK_SHADOW_OUT; if (state != GTK_STATE_NORMAL && state != GTK_STATE_INSENSITIVE) gtk_paint_box(gtk_widget_get_style(sheet->button), window, button->state, shadow_type, &allocation, GTK_WIDGET(sheet->button), "table-heading", x, y, width, height); else gtk_paint_box(gtk_widget_get_style(sheet->button), window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, &allocation, GTK_WIDGET(sheet->button), "table-heading", x, y, width, height); if (button->label_visible) { PangoLayout *layout = NULL; gint real_x = x, real_y; text_height = _gtk_sheet_row_default_height(GTK_WIDGET(sheet)) - 2 * CELLOFFSET; gdk_gc_set_clip_rectangle( gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[button->state], &allocation); gdk_gc_set_clip_rectangle( gtk_widget_get_style(GTK_WIDGET(sheet))->white_gc, &allocation); y += 2 * gtk_widget_get_style(sheet->button)->ythickness; real_y = y; label = button->label; if (!label || !label[0]) /* revert to auto-generated numeric label */ { sprintf(label_buf, "%d", index); label = label_buf; } layout = gtk_widget_create_pango_layout(GTK_WIDGET(sheet), label); pango_layout_set_font_description(layout, font_desc); pango_layout_get_pixel_extents(layout, NULL, &extent); text_width = extent.width; switch(button->justification) { case GTK_JUSTIFY_LEFT: real_x = x + CELLOFFSET; pango_alignment = PANGO_ALIGN_LEFT; break; case GTK_JUSTIFY_RIGHT: real_x = x + width - text_width - CELLOFFSET; pango_alignment = PANGO_ALIGN_RIGHT; break; case GTK_JUSTIFY_FILL: pango_layout_set_justify(layout, TRUE); /* FALLTHROUGH */ case GTK_JUSTIFY_CENTER: real_x = x + (width - text_width) / 2; pango_alignment = PANGO_ALIGN_CENTER; default: break; } pango_layout_set_alignment(layout, pango_alignment); gtk_paint_layout(gtk_widget_get_style(GTK_WIDGET(sheet)), window, state, FALSE, &allocation, GTK_WIDGET(sheet), "label", real_x, real_y, layout); g_object_unref(G_OBJECT(layout)); gdk_gc_set_clip_rectangle( gtk_widget_get_style(GTK_WIDGET(sheet))->fg_gc[button->state], NULL); gdk_gc_set_clip_rectangle( gtk_widget_get_style(GTK_WIDGET(sheet))->white_gc, NULL); } gtk_sheet_draw_tooltip_marker(sheet, area, row, col); if ((child = button->child) && (child->widget)) { GtkRequisition requisition; child->x = allocation.x; child->y = allocation.y; gtk_widget_get_requisition(child->widget, &requisition); child->x += (width - requisition.width) / 2; child->y += (height - requisition.height) / 2; allocation.x = child->x; allocation.y = child->y; allocation.width = requisition.width; allocation.height = requisition.height; x = child->x; y = child->y; gtk_widget_set_state(child->widget, button->state); if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && gtk_widget_get_mapped(child->widget)) { gtk_widget_size_allocate(child->widget, &allocation); gtk_widget_queue_draw(child->widget); } } } /* SCROLLBARS * * functions: * adjust_scrollbars * vadjustment_changed * hadjustment_changed * vadjustment_value_changed * hadjustment_value_changed */ /** * _gtk_sheet_scrollbar_adjust: * * @param sheet the #GtkSheet * * recalculate scrollbar adjustments and emit changed signals */ void _gtk_sheet_scrollbar_adjust(GtkSheet *sheet) { #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_gtk_sheet_scrollbar_adjust: called"); #endif if (sheet->vadjustment) { GtkAdjustment *va = sheet->vadjustment; gint upper = _gtk_sheet_height(sheet) + 80; gint page_size = sheet->sheet_window_height; gtk_adjustment_configure(va, gtk_adjustment_get_value(va), /* value */ 0.0, /* lower */ upper, /* upper */ _gtk_sheet_row_default_height(GTK_WIDGET(sheet)), /* step_increment */ sheet->sheet_window_height / 2, /* page_increment */ page_size /* page_size */ ); #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_gtk_sheet_scrollbar_adjust: va PS %d PI %g SI %g L %g U %d V %g VO %d", page_size, gtk_adjustment_get_page_increment(va), gtk_adjustment_get_step_increment(va), gtk_adjustment_get_lower(va), upper, gtk_adjustment_get_value(va), sheet->voffset); #endif if (upper <= page_size) /* whole sheet fits into window? */ { #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_gtk_sheet_scrollbar_adjust: reset V to 0"); #endif gtk_adjustment_set_value(va, 0); gtk_adjustment_value_changed(va); } /* can produce smudge effects - 23.3.13/fp else if (va->value >= va->upper - va->page_size) { va->value = va->upper - va->page_size; #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_gtk_sheet_scrollbar_adjust: reset to V %g VO %d", va->value, sheet->voffset); #endif g_signal_emit_by_name(GTK_OBJECT(va), "value_changed"); } */ gtk_adjustment_changed(va); } if (sheet->hadjustment) { GtkAdjustment *ha = sheet->hadjustment; /* gint upper = _gtk_sheet_width(sheet) * 3 / 2; */ gint upper = _gtk_sheet_width(sheet) + 80; gint page_size = sheet->sheet_window_width; gtk_adjustment_configure(ha, gtk_adjustment_get_value(ha), /* value */ 0.0, /* lower */ upper, /* upper */ GTK_SHEET_COLUMN_DEFAULT_WIDTH, /* step_increment */ sheet->sheet_window_width / 2, /* page_increment */ page_size /* page_size */ ); #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_gtk_sheet_scrollbar_adjust: ha PS %d PI %g SI %g L %g U %d V %g HO %d", page_size, gtk_adjustment_get_page_increment(ha), gtk_adjustment_get_step_increment(ha), gtk_adjustment_get_lower(ha), upper, gtk_adjustment_get_value(ha), sheet->hoffset); #endif if (upper <= page_size) /* whole sheet fits into window? */ { #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_gtk_sheet_scrollbar_adjust: reset V to 0"); #endif gtk_adjustment_set_value(ha, 0); gtk_adjustment_value_changed(ha); } /* can produce smudge effects - 23.3.13/fp else if (ha->value >= ha->upper - ha->page_size) { ha->value = ha->upper - ha->page_size; #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_gtk_sheet_scrollbar_adjust: reset to V %g HO %d", va->value, sheet->hoffset); #endif g_signal_emit_by_name(GTK_OBJECT(ha), "value_changed"); } */ gtk_adjustment_changed(ha); } } /* * _vadjustment_changed_handler: * * this is the #GtkSheet vertical adjustment "changed" signal handler * * @param adjustment the #GtkAdjustment that received the signal * @param data the #GtkSheet passed on signal creation */ static void _vadjustment_changed_handler(GtkAdjustment *adjustment, gpointer data) { GtkSheet *sheet; g_return_if_fail(adjustment != NULL); g_return_if_fail(data != NULL); sheet = GTK_SHEET(data); #if GTK_SHEET_DEBUG_ADJUSTMENT > 1 g_debug("_vadjustment_changed_handler: called: O VA %g VO %d", sheet->old_vadjustment, sheet->voffset); #endif } /* * _hadjustment_changed_handler: * * this is the #GtkSheet horizontal adjustment "change" handler * * @param adjustment the #GtkAdjustment that received the signal * @param data the #GtkSheet passed on signal creation */ static void _hadjustment_changed_handler(GtkAdjustment *adjustment, gpointer data) { GtkSheet *sheet; g_return_if_fail(adjustment != NULL); g_return_if_fail(data != NULL); sheet = GTK_SHEET(data); #if GTK_SHEET_DEBUG_ADJUSTMENT > 1 g_debug("_hadjustment_changed_handler: called: O VA %g VO %d", sheet->old_vadjustment, sheet->voffset); #endif } /* * vadjustment_value_changed_handler: * * this is the #GtkSheet vertical adjustment "value-changed" signal handler * * @param adjustment the #GtkAdjustment that received the signal * @param data the #GtkSheet passed on signal creation */ static void _vadjustment_value_changed_handler(GtkAdjustment *adjustment, gpointer data) { GtkSheet *sheet; gint old_value; g_return_if_fail(adjustment != NULL); g_return_if_fail(data != NULL); g_return_if_fail(GTK_IS_SHEET(data)); sheet = GTK_SHEET(data); #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_vadjustment_value_changed_handler: called: O VA %g VO %d", sheet->old_vadjustment, sheet->voffset); #endif if (GTK_SHEET_IS_FROZEN(sheet)) return; #if 0 if (sheet->column_titles_visible) row = _gtk_sheet_row_from_ypixel(sheet, sheet->column_title_area.height + CELL_SPACING); else row = _gtk_sheet_row_from_ypixel(sheet, CELL_SPACING); old_value = -sheet->voffset; for (i = 0; i < sheet->maxrow; i++) /* all but the last row */ { if (GTK_SHEET_ROW_IS_VISIBLE(ROWPTR(sheet, i))) y += sheet->row[i].height; if (y > gtk_adjustment_get_value(adjustment)) break; } if (0 <= i && i <= sheet->maxrow) y -= sheet->row[i].height; new_row = i; y = MAX(y, 0); #if 0 if (adjustment->value > sheet->old_vadjustment && sheet->old_vadjustment > 0. && 0 <= new_row && new_row <= sheet->maxrow && sheet->row[new_row].height > sheet->vadjustment->step_increment) { /* This avoids embarrassing twitching */ if (row == new_row && row != sheet->maxrow && adjustment->value - sheet->old_vadjustment >= sheet->vadjustment->step_increment && new_row + 1 != MIN_VISIBLE_ROW(sheet)) { new_row+=1; y=y+sheet->row[row].height; } } #else if (gtk_adjustment_get_value(adjustment) > sheet->old_vadjustment && sheet->old_vadjustment > 0. && 0 <= new_row && new_row <= sheet->maxrow && sheet->row[new_row].height > gtk_adjustment_get_step_increment(sheet->vadjustment)) { new_row += 1; y = y + sheet->row[row].height; } #endif /* Negative old_adjustment enforces the redraw, otherwise avoid spureous redraw */ if (sheet->old_vadjustment >= 0. && row == new_row) { sheet->old_vadjustment = gtk_adjustment_get_value(sheet->vadjustment); #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_vadjustment_value_changed_handler: return 1: vv %g", sheet->old_vadjustment); #endif return; } sheet->old_vadjustment = gtk_adjustment_get_value(sheet->vadjustment); gtk_adjustment_set_value(adjustment, y); if (new_row < 0 || new_row > sheet->maxrow) { gtk_adjustment_set_step_increment(sheet->vadjustment, GTK_SHEET_ROW_DEFAULT_HEIGHT); } else if (new_row == 0) { gtk_adjustment_set_step_increment(sheet->vadjustment, sheet->row[0].height); } else { gtk_adjustment_set_step_increment(sheet->vadjustment, MIN(sheet->row[new_row].height, sheet->row[new_row - 1].height)); } value = gtk_adjustment_get_value(adjustment); gtk_adjustment_set_value(sheet->vadjustment, value); if (value >= -sheet->voffset) { /* scroll down */ diff = value + sheet->voffset; } else { /* scroll up */ diff = -sheet->voffset - value; } sheet->voffset = -value; #else /* Negative old_adjustment enforces the redraw, otherwise avoid spureous redraw */ old_value = sheet->old_vadjustment; sheet->old_vadjustment = gtk_adjustment_get_value(sheet->vadjustment); if (old_value >= 0. && sheet->voffset == -1 * gtk_adjustment_get_value(adjustment)) return; gdouble value = gtk_adjustment_get_value(adjustment); gtk_adjustment_set_value(sheet->vadjustment, value); sheet->voffset = -value; #endif _gtk_sheet_recalc_view_range(sheet); if (gtk_widget_get_realized(sheet->sheet_entry) && sheet->state == GTK_SHEET_NORMAL && sheet->active_cell.row >= 0 && sheet->active_cell.col >= 0 && !gtk_sheet_cell_isvisible(sheet, sheet->active_cell.row, sheet->active_cell.col)) { gchar *text = gtk_sheet_get_entry_text(sheet); if (!text || !text[0]) { gtk_sheet_cell_clear(sheet, sheet->active_cell.row, sheet->active_cell.col); } g_free(text); gtk_widget_unmap(sheet->sheet_entry); } gtk_sheet_position_children(sheet); size_allocate_global_button(sheet); size_allocate_row_title_buttons(sheet); _gtk_sheet_range_draw(sheet, NULL, TRUE); } /* * hadjustment_value_changed_handler: * * this is the #GtkSheet horizontal adjustment "value-changed" handler * * @param adjustment the #GtkAdjustment that received the signal * @param data the #GtkSheet passed on signal creation */ static void _hadjustment_value_changed_handler(GtkAdjustment *adjustment, gpointer data) { GtkSheet *sheet; gint old_value; g_return_if_fail(adjustment != NULL); g_return_if_fail(data != NULL); g_return_if_fail(GTK_IS_SHEET(data)); sheet = GTK_SHEET(data); #if GTK_SHEET_DEBUG_ADJUSTMENT > 0 g_debug("_hadjustment_value_changed_handler: called: O HA %g HO %d", sheet->old_hadjustment, sheet->hoffset); #endif if (GTK_SHEET_IS_FROZEN(sheet)) return; #if 0 if (sheet->row_titles_visible) col = _gtk_sheet_column_from_xpixel(sheet, sheet->row_title_area.width + CELL_SPACING); else col = _gtk_sheet_column_from_xpixel(sheet, CELL_SPACING); old_value = -sheet->hoffset; for (i = 0; i < sheet->maxcol; i++) /* all but the last column */ { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) x += COLPTR(sheet, i)->width; if (x > adjustment->value) break; } if (0 <= i && i <= sheet->maxcol) x -= COLPTR(sheet, i)->width; new_col = i; x = MAX(x, 0); #if 0 if (adjustment->value > sheet->old_hadjustment && sheet->old_hadjustment > 0 && 0 <= new_col && new_col <= sheet->maxcol && COLPTR(sheet, new_col)->width > sheet->hadjustment->step_increment) { /* This avoids embarrassing twitching */ if (col == new_col && col != sheet->maxcol && adjustment->value - sheet->old_hadjustment >= sheet->hadjustment->step_increment && new_col + 1 != MIN_VISIBLE_COLUMN(sheet)) { new_col+=1; x=x+COLPTR(sheet, col)->width; } } #else if (adjustment->value > sheet->old_hadjustment && sheet->old_hadjustment > 0 && 0 <= new_col && new_col <= sheet->maxcol && COLPTR(sheet, new_col)->width > sheet->hadjustment->step_increment) { new_col += 1; x = x + COLPTR(sheet, col)->width; } #endif /* Negative old_adjustment enforces the redraw, otherwise avoid spureous redraw */ if (sheet->old_hadjustment >= 0. && new_col == col) { sheet->old_hadjustment = sheet->hadjustment->value; return; } sheet->old_hadjustment = sheet->hadjustment->value; adjustment->value = x; if (new_col < 0 || new_col > sheet->maxcol) { sheet->hadjustment->step_increment = GTK_SHEET_COLUMN_DEFAULT_WIDTH; } else if (new_col == 0) { sheet->hadjustment->step_increment = COLPTR(sheet, 0)->width; } else { sheet->hadjustment->step_increment = MIN(COLPTR(sheet, new_col)->width, COLPTR(sheet, new_col - 1)->width); } sheet->hadjustment->value = adjustment->value; value = adjustment->value; if (value >= -sheet->hoffset) { /* scroll right */ diff = value + sheet->hoffset; } else { /* scroll left */ diff = -sheet->hoffset - value; } sheet->hoffset = -value; #else /* Negative old_adjustment enforces the redraw, otherwise avoid spureous redraw */ old_value = sheet->old_hadjustment; sheet->old_hadjustment = gtk_adjustment_get_value(sheet->hadjustment); if (old_value >= 0. && sheet->hoffset == -1 * gtk_adjustment_get_value(adjustment)) return; gdouble value = gtk_adjustment_get_value(adjustment); gtk_adjustment_set_value(sheet->hadjustment, value); sheet->hoffset = -value; #endif _gtk_sheet_recalc_view_range(sheet); if (gtk_widget_get_realized(sheet->sheet_entry) && sheet->state == GTK_SHEET_NORMAL && sheet->active_cell.row >= 0 && sheet->active_cell.col >= 0 && !gtk_sheet_cell_isvisible(sheet, sheet->active_cell.row, sheet->active_cell.col)) { gchar *text = gtk_sheet_get_entry_text(sheet); if (!text || !text[0]) { gtk_sheet_cell_clear(sheet, sheet->active_cell.row, sheet->active_cell.col); } g_free(text); gtk_widget_unmap(sheet->sheet_entry); } gtk_sheet_position_children(sheet); size_allocate_global_button(sheet); _gtk_sheet_column_buttons_size_allocate(sheet); _gtk_sheet_range_draw(sheet, NULL, TRUE); } /* COLUMN RESIZING */ static void draw_xor_vline(GtkSheet *sheet) { GtkWidget *widget; g_return_if_fail(sheet != NULL); widget = GTK_WIDGET(sheet); gdk_draw_line(gtk_widget_get_window(widget), sheet->xor_gc, sheet->x_drag, sheet->column_title_area.height, sheet->x_drag, sheet->sheet_window_height + 1); } /* ROW RESIZING */ static void draw_xor_hline(GtkSheet *sheet) { GtkWidget *widget; g_return_if_fail(sheet != NULL); widget = GTK_WIDGET(sheet); gdk_draw_line(gtk_widget_get_window(widget), sheet->xor_gc, sheet->row_title_area.width, sheet->y_drag, sheet->sheet_window_width + 1, sheet->y_drag); } /* SELECTED RANGE */ static void draw_xor_rectangle(GtkSheet *sheet, GtkSheetRange range) { gint i; GdkRectangle clip_area, area; GdkGCValues values; if (range.col0 < 0 || range.coli < 0 || range.row0 < 0 || range.rowi < 0) return; /* PR#203012 */ area.x = _gtk_sheet_column_left_xpixel(sheet, range.col0); area.y = _gtk_sheet_row_top_ypixel(sheet, range.row0); area.width = _gtk_sheet_column_left_xpixel(sheet, range.coli) - area.x + COLPTR(sheet, range.coli)->width; area.height = _gtk_sheet_row_top_ypixel(sheet, range.rowi) - area.y + sheet->row[range.rowi].height; clip_area.x = sheet->row_title_area.width; clip_area.y = sheet->column_title_area.height; clip_area.width = sheet->sheet_window_width; clip_area.height = sheet->sheet_window_height; if (!sheet->row_titles_visible) clip_area.x = 0; if (!sheet->column_titles_visible) clip_area.y = 0; if (area.x < 0) { area.width = area.width + area.x; area.x = 0; } if (area.width > clip_area.width) area.width = clip_area.width + 10; if (area.y < 0) { area.height = area.height + area.y; area.y = 0; } if (area.height > clip_area.height) area.height = clip_area.height + 10; clip_area.x--; clip_area.y--; clip_area.width += 3; clip_area.height += 3; gdk_gc_get_values(sheet->xor_gc, &values); gdk_gc_set_clip_rectangle(sheet->xor_gc, &clip_area); for (i = -1; i <= 1; ++i) gdk_draw_rectangle(sheet->sheet_window, sheet->xor_gc, FALSE, area.x + i, area.y + i, area.width - 2 * i, area.height - 2 * i); gdk_gc_set_clip_rectangle(sheet->xor_gc, NULL); gdk_gc_set_foreground(sheet->xor_gc, &values.foreground); } /* this function returns the new width of the column being resized given * the column and x position of the cursor; the x cursor position is passed * in as a pointer and automaticaly corrected if it's beyond min/max limits */ static guint new_column_width(GtkSheet *sheet, gint col, gint *x) { gint cx, width; GtkRequisition requisition; #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("new_column_width: called"); #endif cx = *x; requisition.width = COLPTR(sheet, col)->requisition; /* you can't shrink a column to less than its minimum width */ if (cx < _gtk_sheet_column_left_xpixel(sheet, col) + requisition.width) { *x = cx = _gtk_sheet_column_left_xpixel(sheet, col) + requisition.width; } /* don't grow past the end of the window */ /* if (cx > sheet->sheet_window_width) { *x = cx = sheet->sheet_window_width; } */ /* calculate new column width making sure it doesn't end up * less than the minimum width */ width = cx - _gtk_sheet_column_left_xpixel(sheet, col); if (width < requisition.width) width = requisition.width; COLPTR(sheet, col)->width = width; _gtk_sheet_recalc_left_xpixels(sheet); _gtk_sheet_recalc_view_range(sheet); _gtk_sheet_column_buttons_size_allocate(sheet); return (width); } /* this function returns the new height of the row being resized given * the row and y position of the cursor; the y cursor position is passed * in as a pointer and automaticaly corrected if it's beyond min/max limits */ static guint new_row_height(GtkSheet *sheet, gint row, gint *y) { GtkRequisition requisition; gint cy, height; cy = *y; requisition.height = sheet->row[row].requisition; /* you can't shrink a row to less than its minimum height */ if (cy < _gtk_sheet_row_top_ypixel(sheet, row) + requisition.height) { *y = cy = _gtk_sheet_row_top_ypixel(sheet, row) + requisition.height; } /* don't grow past the end of the window */ /* if (cy > sheet->sheet_window_height) { *y = cy = sheet->sheet_window_height; } */ /* calculate new row height making sure it doesn't end up * less than the minimum height */ height = (cy - _gtk_sheet_row_top_ypixel(sheet, row)); if (height < requisition.height) height = requisition.height; sheet->row[row].height = height; _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_view_range(sheet); size_allocate_row_title_buttons(sheet); return (height); } /** * gtk_sheet_set_row_height: * @sheet: a #GtkSheet. * @row: row number. * @height: row height(in pixels). * * Set row height. */ void gtk_sheet_set_row_height(GtkSheet *sheet, gint row, guint height) { guint min_height; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (row < 0 || row > sheet->maxrow) return; gtk_sheet_row_size_request(sheet, row, &min_height); if (height < min_height) return; sheet->row[row].height = height; _gtk_sheet_recalc_top_ypixels(sheet); if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && !GTK_SHEET_IS_FROZEN(sheet)) { size_allocate_row_title_buttons(sheet); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_entry_size_allocate(sheet); _gtk_sheet_range_draw(sheet, NULL, TRUE); } g_signal_emit(GTK_OBJECT(sheet), sheet_signals[NEW_ROW_HEIGHT], 0, row, height); } /** * gtk_sheet_add_column: * @sheet: a #GtkSheet. * @ncols: number of columns to be appended. * * Append @ncols columns to the right of the sheet. */ void gtk_sheet_add_column(GtkSheet *sheet, guint ncols) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); AddColumns(sheet, sheet->maxcol + 1, ncols); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; _gtk_sheet_scrollbar_adjust(sheet); if (sheet->state == GTK_SHEET_ROW_SELECTED) sheet->range.coli += ncols; _gtk_sheet_redraw_internal(sheet, TRUE, FALSE); } /** * gtk_sheet_add_row: * @sheet: a #GtkSheet. * @nrows: number of rows to be appended. * * Append @nrows rows to the end of the sheet. */ void gtk_sheet_add_row(GtkSheet *sheet, guint nrows) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); AddRows(sheet, sheet->maxrow + 1, nrows); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (sheet->state == GTK_SHEET_COLUMN_SELECTED) sheet->range.rowi += nrows; _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, FALSE, TRUE); } /** * gtk_sheet_insert_rows: * @sheet: a #GtkSheet. * @row: row number. * @nrows: number of rows to be inserted. * * Insert @nrows rows before the given row and pull right. */ void gtk_sheet_insert_rows(GtkSheet *sheet, guint row, guint nrows) { GList *children; GtkSheetChild *child; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); gtk_sheet_real_unselect_range(sheet, NULL); InsertRow(sheet, row, nrows); children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->attached_to_cell) if (child->row >= row) child->row += nrows; children = children->next; } if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (sheet->state == GTK_SHEET_COLUMN_SELECTED) sheet->range.rowi += nrows; _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, FALSE, TRUE); } /** * gtk_sheet_insert_columns: * @sheet: a #GtkSheet. * @col: column number. * @ncols: number of columns to be inserted. * * Insert @ncols columns before the given row and pull right. */ void gtk_sheet_insert_columns(GtkSheet *sheet, guint col, guint ncols) { GList *children; GtkSheetChild *child; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); gtk_sheet_real_unselect_range(sheet, NULL); InsertColumn(sheet, col, ncols); children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->attached_to_cell) if (child->col >= col) child->col += ncols; children = children->next; } if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (sheet->state == GTK_SHEET_ROW_SELECTED) sheet->range.coli += ncols; _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, TRUE, FALSE); } /** * gtk_sheet_delete_rows: * @sheet: a #GtkSheet. * @row: row number. * @nrows: number of rows to be deleted. * * Delete @nrows rows starting from @row. */ void gtk_sheet_delete_rows(GtkSheet *sheet, guint row, guint nrows) { GList *children; GtkSheetChild *child; gint act_row, act_col; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); nrows = MIN(nrows, sheet->maxrow - row + 1); act_row = sheet->active_cell.row; act_col = sheet->active_cell.col; _gtk_sheet_hide_active_cell(sheet); gtk_sheet_real_unselect_range(sheet, NULL); DeleteRow(sheet, row, nrows); children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->attached_to_cell && child->row >= row && child->row < row + nrows && gtk_widget_get_realized(child->widget)) { gtk_container_remove(GTK_CONTAINER(sheet), child->widget); children = sheet->children; } else children = children->next; } children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->attached_to_cell && child->row > row) child->row -= nrows; children = children->next; } if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; sheet->active_cell.row = -1; sheet->active_cell.col = -1; /* if(sheet->state == GTK_SHEET_ROW_SELECTED) */ act_row = MIN(act_row, sheet->maxrow); act_row = MAX(act_row, 0); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, FALSE, TRUE); gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); } /** * gtk_sheet_delete_columns: * @sheet: a #GtkSheet. * @col: column number. * @ncols: number of columns to be deleted. * * Delete @ncols columns starting from @col. */ void gtk_sheet_delete_columns(GtkSheet *sheet, guint col, guint ncols) { GList *children; GtkSheetChild *child; gint act_row, act_col; gboolean veto; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); ncols = MIN(ncols, sheet->maxcol - col + 1); _gtk_sheet_hide_active_cell(sheet); gtk_sheet_real_unselect_range(sheet, NULL); DeleteColumn(sheet, col, ncols); children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->attached_to_cell && child->col >= col && child->col < col + ncols && gtk_widget_get_realized(child->widget)) { gtk_container_remove(GTK_CONTAINER(sheet), child->widget); children = sheet->children; } else children = children->next; } children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->attached_to_cell && child->col > col) child->col -= ncols; children = children->next; } if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; act_row = sheet->active_cell.row; act_col = sheet->active_cell.col; sheet->active_cell.row = -1; sheet->active_cell.col = -1; /* if(sheet->state == GTK_SHEET_COLUMN_SELECTED) */ act_col = MIN(act_col, sheet->maxcol); act_col = MAX(act_col, 0); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, TRUE, FALSE); /* 22.06.13/fp - want same behaviour as gtk_sheet_delete_rows() gtk_sheet_click_cell(sheet, act_row, act_col, &veto); */ gtk_sheet_activate_cell(sheet, sheet->active_cell.row, sheet->active_cell.col); } /** * gtk_sheet_range_set_background: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange. * @color: a #GdkColor. * * Set background color of the given range. */ void gtk_sheet_range_set_background(GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color) { gint i, j; GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; #if GTK_SHEET_DEBUG_COLORS > 0 g_debug("gtk_sheet_range_set_background: %s row %d-%d col %d-%d)", gdk_color_to_string(color), range.row0, range.rowi, range.col0, range.coli); #endif for (i = range.row0; i <= range.rowi; i++) for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); if (color != NULL) attributes.background = *color; else attributes.background = sheet->bg_color; gdk_colormap_alloc_color(gdk_colormap_get_system(), &attributes.background, FALSE, TRUE); gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } /** * gtk_sheet_range_set_foreground: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange. * @color: a #GdkColor. * * Set foreground color of the given range. */ void gtk_sheet_range_set_foreground(GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color) { gint i, j; GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; #if GTK_SHEET_DEBUG_COLORS > 0 g_debug("gtk_sheet_range_set_foreground: %s row %d-%d col %d-%d)", gdk_color_to_string(color), range.row0, range.rowi, range.col0, range.coli); #endif for (i = range.row0; i <= range.rowi; i++) for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); if (color != NULL) attributes.foreground = *color; else gdk_color_black(gdk_colormap_get_system(), &attributes.foreground); gdk_colormap_alloc_color(gdk_colormap_get_system(), &attributes.foreground, FALSE, TRUE); gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } /** * gtk_sheet_range_set_justification: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange. * @just: a #GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER. * * Set text justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER) of the given range. * The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the default justification for numbers is GTK_JUSTIFY_RIGHT. */ void gtk_sheet_range_set_justification(GtkSheet *sheet, const GtkSheetRange *urange, GtkJustification just) { gint i, j; GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; for (i = range.row0; i <= range.rowi; i++) { for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); attributes.justification = just; gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } } range.col0 = sheet->view.col0; range.coli = sheet->view.coli; if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } /** * gtk_sheet_range_set_editable: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange * @editable: TRUE or FALSE * * Set if cell contents can be edited or not in the given range. */ void gtk_sheet_range_set_editable(GtkSheet *sheet, const GtkSheetRange *urange, gboolean editable) { gint i, j; GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; for (i = range.row0; i <= range.rowi; i++) { for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); attributes.is_editable = editable; gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } } if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } /** * gtk_sheet_range_set_visible: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange. * @visible: TRUE or FALSE. * * Set if cell contents are visible or not in the given range: accepted values are TRUE or FALSE. */ void gtk_sheet_range_set_visible(GtkSheet *sheet, const GtkSheetRange *urange, gboolean visible) { gint i, j; GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; for (i = range.row0; i <= range.rowi; i++) { for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); attributes.is_visible = visible; gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } } if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } /** * gtk_sheet_range_set_border: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange where we set border style. * @mask: CELL_LEFT_BORDER, CELL_RIGHT_BORDER, CELL_TOP_BORDER,CELL_BOTTOM_BORDER * @width: width of the border line in pixels * @line_style: GdkLineStyle for the border line * * Set cell border style in the given range. */ void gtk_sheet_range_set_border(GtkSheet *sheet, const GtkSheetRange *urange, gint mask, guint width, gint line_style) { gint i, j; GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; for (i = range.row0; i <= range.rowi; i++) { for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); attributes.border.mask = mask; attributes.border.width = width; attributes.border.line_style = line_style; attributes.border.cap_style = GDK_CAP_NOT_LAST; attributes.border.join_style = GDK_JOIN_MITER; gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } } range.row0--; range.col0--; range.rowi++; range.coli++; if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } /** * gtk_sheet_range_set_border_color: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange where we set border color. * @color: a #GdkColor. * * Set border color for the given range. */ void gtk_sheet_range_set_border_color(GtkSheet *sheet, const GtkSheetRange *urange, const GdkColor *color) { gint i, j; GtkSheetRange range; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; for (i = range.row0; i <= range.rowi; i++) { for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); attributes.border.color = *color; gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } } if (!GTK_SHEET_IS_FROZEN(sheet)) _gtk_sheet_range_draw(sheet, &range, TRUE); } /** * gtk_sheet_range_set_font: * @sheet: a #GtkSheet. * @urange: a #GtkSheetRange where we set font_desc. * @font_desc: (transfer none) a #PangoFontDescription. * * Set font_desc for the given range. */ void gtk_sheet_range_set_font(GtkSheet *sheet, const GtkSheetRange *urange, PangoFontDescription *font_desc) { gint i, j; gint font_height; GtkSheetRange range; PangoContext *context; PangoFontMetrics *metrics; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (!urange) range = sheet->range; else range = *urange; gtk_sheet_freeze(sheet); context = gtk_widget_get_pango_context(GTK_WIDGET(sheet)); metrics = pango_context_get_metrics(context, font_desc, pango_context_get_language(context)); font_height = pango_font_metrics_get_descent(metrics) + pango_font_metrics_get_ascent(metrics); font_height = PANGO_PIXELS(font_height) + 2 * CELLOFFSET; for (i = range.row0; i <= range.rowi; i++) { for (j = range.col0; j <= range.coli; j++) { GtkSheetCellAttr attributes; gtk_sheet_get_attributes(sheet, i, j, &attributes); attributes.font_desc = pango_font_description_copy(font_desc); /* copy */ attributes.do_font_desc_free = TRUE; if (font_height > sheet->row[i].height) { sheet->row[i].height = font_height; _gtk_sheet_recalc_top_ypixels(sheet); } gtk_sheet_set_cell_attributes(sheet, i, j, attributes); } } gtk_sheet_thaw(sheet); pango_font_metrics_unref(metrics); } static void gtk_sheet_set_cell_attributes(GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr attributes) { GtkSheetCell *cell; if (row < 0 || row > sheet->maxrow) return; if (col < 0 || col > sheet->maxcol) return; CheckCellData(sheet, row, col); cell = sheet->data[row][col]; if (!cell->attributes) cell->attributes = g_new(GtkSheetCellAttr, 1); *(cell->attributes) = attributes; } /** * gtk_sheet_get_attributes: * @sheet: a #GtkSheet. * @row: row number * @col: column number * @attributes: #GtkSheetCellAttr of the given range * * Gett cell attributes of the given cell. * * Returns: TRUE means that the cell is currently allocated. */ gboolean gtk_sheet_get_attributes(GtkSheet *sheet, gint row, gint col, GtkSheetCellAttr *attributes) { GtkSheetCell *cell; g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if ((row < 0 || row > sheet->maxrow) || (col < 0 || col > sheet->maxcol)) { init_attributes(sheet, col, attributes); return (FALSE); } if (row > sheet->maxallocrow || col > sheet->maxalloccol || !sheet->data[row] || !sheet->data[row][col]) { init_attributes(sheet, col, attributes); return (FALSE); } cell = sheet->data[row][col]; if (!cell->attributes) { init_attributes(sheet, col, attributes); return (FALSE); } *attributes = *(cell->attributes); if (COLPTR(sheet, col)->justification != GTK_SHEET_COLUMN_DEFAULT_JUSTIFICATION) { attributes->justification = COLPTR(sheet, col)->justification; } return (TRUE); } static void init_attributes(GtkSheet *sheet, gint col, GtkSheetCellAttr *attributes) { /* DEFAULT VALUES */ attributes->foreground = gtk_widget_get_style(GTK_WIDGET(sheet))->black; attributes->background = sheet->bg_color; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) { GdkColormap *colormap; colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &attributes->foreground); attributes->background = sheet->bg_color; } if (col < 0 || col > sheet->maxcol) attributes->justification = GTK_SHEET_COLUMN_DEFAULT_JUSTIFICATION; else attributes->justification = COLPTR(sheet, col)->justification; attributes->border.width = 0; attributes->border.line_style = GDK_LINE_SOLID; attributes->border.cap_style = GDK_CAP_NOT_LAST; attributes->border.join_style = GDK_JOIN_MITER; attributes->border.mask = 0; attributes->border.color = gtk_widget_get_style(GTK_WIDGET(sheet))->black; attributes->is_editable = TRUE; attributes->is_visible = TRUE; attributes->font = gtk_widget_get_style(GTK_WIDGET(sheet))->private_font; attributes->font_desc = gtk_widget_get_style(GTK_WIDGET(sheet))->font_desc; /* no copy */ attributes->do_font_desc_free = FALSE; } /********************************************************************** * Memory allocation routines: * AddRow & AddColumn allocate memory for GtkSheetColumn & GtkSheetRow structs. * InsertRow * InsertColumn * DeleteRow * DeleteColumn * GrowSheet allocates memory for the sheet cells contents using an array of * pointers. Alternative to this could be a linked list or a hash table. * CheckBounds checks whether the given cell is currently allocated or not. * If not, it calls to GrowSheet. **********************************************************************/ static void AddColumns(GtkSheet *sheet, gint position, gint ncols) { gint c; GtkSheetColumn *newobj; g_assert(ncols >= 0); g_assert(position >= 0 && position <= sheet->maxcol + 1); if (ncols > 0) { sheet->column = (GtkSheetColumn **)g_realloc(sheet->column, (sheet->maxcol + 1 + ncols)* sizeof(GtkSheetColumn *)); for (c = sheet->maxcol; c >= position; c--) /* make space */ { sheet->column[c + ncols] = sheet->column[c]; sheet->column[c] = NULL; } for (c = 0; c < ncols; c++) { gint newidx = position + c; newobj = g_object_new(G_TYPE_SHEET_COLUMN, NULL); #if GTK_SHEET_DEBUG_FINALIZE > 0 g_object_weak_ref(G_OBJECT(newobj), weak_notify, "Sheet-Column"); #endif newobj->sheet = sheet; sheet->column[newidx] = newobj; gtk_widget_set_parent(GTK_WIDGET(newobj), GTK_WIDGET(sheet)); #if 0 g_debug("Setting Column %p Parent to GtkSheet %p - got %p", newobj, sheet, gtk_widget_get_parent(GTK_WIDGET(newobj))); #endif g_object_ref_sink(newobj); } sheet->maxcol += ncols; _gtk_sheet_reset_text_column(sheet, sheet->maxcol - ncols); _gtk_sheet_recalc_left_xpixels(sheet); } } static void InsertColumn(GtkSheet *sheet, gint position, gint ncols) { gint r, c; g_assert(ncols >= 0); g_assert(position >= 0); AddColumns(sheet, position, ncols); _gtk_sheet_reset_text_column(sheet, sheet->maxcol - ncols); _gtk_sheet_recalc_left_xpixels(sheet); if (position <= sheet->maxalloccol) /* adjust allocated cells */ { GrowSheet(sheet, 0, ncols); for (r = 0; r <= sheet->maxallocrow; r++) { for (c = sheet->maxalloccol; c >= position + ncols; c--) { gtk_sheet_real_cell_clear(sheet, r, c, TRUE); sheet->data[r][c] = sheet->data[r][c - ncols]; if (sheet->data[r][c]) sheet->data[r][c]->col = c; sheet->data[r][c - ncols] = NULL; } } } } static void DeleteColumn(GtkSheet *sheet, gint position, gint ncols) { gint c, r; g_assert(ncols >= 0); g_assert(position >= 0); ncols = MIN(ncols, sheet->maxcol - position + 1); if (ncols <= 0 || position > sheet->maxcol) return; #if GTK_SHEET_DEBUG_ALLOCATION > 0 g_debug("DeleteColumn: pos %d ncols %d mxr %d mxc %d mxar %d mxac %d ", position, ncols, sheet->maxrow, sheet->maxcol, sheet->maxallocrow, sheet->maxalloccol); #endif for (c = position; c < position + ncols; c++) /* dispose columns */ { sheet->column[c]->sheet = NULL; g_object_unref(sheet->column[c]); sheet->column[c] = NULL; } for (c = position; c <= sheet->maxcol - ncols; c++) /* shift columns into position*/ { sheet->column[c] = sheet->column[c + ncols]; } for (c = sheet->maxcol - ncols + 1; c <= sheet->maxcol; c++) /* clear tail */ { sheet->column[c] = NULL; } /* to be done: shrink pointer pool via realloc */ if (position <= sheet->maxalloccol) { for (c = position; c <= sheet->maxcol - ncols; c++) /* shift column data */ { if (c > sheet->maxalloccol) break; for (r = 0; r <= sheet->maxallocrow; r++) { gtk_sheet_real_cell_clear(sheet, r, c, TRUE); if (c + ncols <= sheet->maxalloccol) { sheet->data[r][c] = sheet->data[r][c + ncols]; sheet->data[r][c + ncols] = NULL; if (sheet->data[r][c]) sheet->data[r][c]->col = c; } } } for (c = sheet->maxcol - ncols + 1; c <= sheet->maxcol; c++) /* clear tail */ { if (c > sheet->maxalloccol) break; for (r = 0; r <= sheet->maxallocrow; r++) { gtk_sheet_real_cell_clear(sheet, r, c, TRUE); } } sheet->maxalloccol -= MIN(ncols, sheet->maxalloccol - position + 1); sheet->maxalloccol = MIN(sheet->maxalloccol, sheet->maxcol); } sheet->maxcol -= ncols; _gtk_sheet_range_fixup(sheet, &sheet->view); _gtk_sheet_range_fixup(sheet, &sheet->range); _gtk_sheet_reset_text_column(sheet, position); _gtk_sheet_recalc_left_xpixels(sheet); } static void AddRows(GtkSheet *sheet, gint position, gint nrows) { gint r; g_assert(nrows >= 0); g_assert(position >= 0 && position <= sheet->maxrow + 1); if (nrows > 0) { sheet->row = (GtkSheetRow *)g_realloc(sheet->row, (sheet->maxrow + 1 + nrows) * sizeof(GtkSheetRow)); for (r = sheet->maxrow; r >= position; r--) /* make space */ { sheet->row[r + nrows] = sheet->row[r]; _gtk_sheet_row_init(&sheet->row[r]); } for (r = 0; r < nrows; r++) { gint newidx = position + r; _gtk_sheet_row_init(&sheet->row[newidx]); sheet->row[newidx].requisition = sheet->row[newidx].height = _gtk_sheet_row_default_height(GTK_WIDGET(sheet)); } sheet->maxrow += nrows; _gtk_sheet_recalc_top_ypixels(sheet); } } static void InsertRow(GtkSheet *sheet, gint row, gint nrows) { gint r, c; AddRows(sheet, row, nrows); _gtk_sheet_recalc_top_ypixels(sheet); if (row <= sheet->maxallocrow) /* adjust allocated cells */ { GrowSheet(sheet, nrows, 0); /* append rows at end */ for (r = sheet->maxallocrow; r >= row + nrows; r--) /* swap new rows into position */ { GtkSheetCell **auxdata = sheet->data[r]; sheet->data[r] = sheet->data[r - nrows]; sheet->data[r - nrows] = auxdata; /* new cells have no data yet to update */ GtkSheetCell **pp = sheet->data[r]; /* update row in existing cells */ for (c = 0; c <= sheet->maxalloccol; c++, pp++) { if (*pp) (*pp)->row = r; } } } } static void DeleteRow(GtkSheet *sheet, gint position, gint nrows) { gint r, c; g_assert(nrows >= 0); g_assert(position >= 0); nrows = MIN(nrows, sheet->maxrow - position + 1); if (nrows <= 0 || position > sheet->maxrow) return; #if GTK_SHEET_DEBUG_ALLOCATION > 0 g_debug("DeleteRow: pos %d nrows %d mxr %d mxc %d mxar %d mxac %d ", position, nrows, sheet->maxrow, sheet->maxcol, sheet->maxallocrow, sheet->maxalloccol); #endif for (r = position; r < position + nrows; r++) /* dispose row data */ { gtk_sheet_row_finalize(&sheet->row[r]); } for (r = position; r <= sheet->maxrow - nrows; r++) /* shift rows into position*/ { sheet->row[r] = sheet->row[r + nrows]; } for (r = sheet->maxrow - nrows + 1; r <= sheet->maxrow; r++) /* clear tail */ { _gtk_sheet_row_init(&sheet->row[r]); } /* to be done: shrink pointer pool via realloc */ if (position <= sheet->maxallocrow) { for (r = position; r <= sheet->maxrow - nrows; r++) /* shift row data */ { if (r > sheet->maxallocrow) break; for (c = 0; c <= sheet->maxalloccol; c++) /* dispose cell data */ { gtk_sheet_real_cell_clear(sheet, r, c, TRUE); } if (sheet->data[r]) /* dispose row data pointer array */ { g_free(sheet->data[r]); sheet->data[r] = NULL; } if (r + nrows <= sheet->maxallocrow) /* shift tail down */ { sheet->data[r] = sheet->data[r + nrows]; sheet->data[r + nrows] = NULL; GtkSheetCell **pp = sheet->data[r]; /* update row in existing cells */ for (c = 0; c <= sheet->maxalloccol; c++, pp++) { if (*pp) (*pp)->row = r; } } } for (r = sheet->maxrow - nrows + 1; r <= sheet->maxrow; r++) /* clear tail */ { if (r > sheet->maxallocrow) break; for (c = 0; c <= sheet->maxalloccol; c++) /* dispose cell data */ { gtk_sheet_real_cell_clear(sheet, r, c, TRUE); } if (sheet->data[r]) /* dispose row data pointer array */ { g_free(sheet->data[r]); sheet->data[r] = NULL; } } sheet->maxallocrow -= MIN(nrows, sheet->maxallocrow - position + 1); sheet->maxallocrow = MIN(sheet->maxallocrow, sheet->maxrow); } sheet->maxrow -= nrows; _gtk_sheet_range_fixup(sheet, &sheet->view); _gtk_sheet_range_fixup(sheet, &sheet->range); _gtk_sheet_recalc_top_ypixels(sheet); } static gint GrowSheet(GtkSheet *tbl, gint newrows, gint newcols) { gint r, c; gint inirow, inicol; inirow = tbl->maxallocrow + 1; inicol = tbl->maxalloccol + 1; tbl->maxalloccol = tbl->maxalloccol + newcols; tbl->maxallocrow = tbl->maxallocrow + newrows; if (newrows > 0) { tbl->data = (GtkSheetCell ***) g_realloc(tbl->data, (tbl->maxallocrow + 1)*sizeof(GtkSheetCell **)+sizeof(double)); for (r = inirow; r <= tbl->maxallocrow; r++) { tbl->data[r] = (GtkSheetCell **) g_malloc((tbl->maxcol + 1)*sizeof(GtkSheetCell *)+sizeof(double)); for (c = 0; c < inicol; c++) { tbl->data[r][c] = NULL; } } } if (newcols > 0) { for (r = 0; r <= tbl->maxallocrow; r++) { tbl->data[r] = (GtkSheetCell **) g_realloc(tbl->data[r], (tbl->maxalloccol + 1)*sizeof(GtkSheetCell *)+sizeof(double)); for (c = inicol; c <= tbl->maxalloccol; c++) { tbl->data[r][c] = NULL; } } } return (0); } static void CheckBounds(GtkSheet *sheet, gint row, gint col) { gint newrows = 0, newcols = 0; if (col > sheet->maxalloccol) newcols = col - sheet->maxalloccol; if (row > sheet->maxallocrow) newrows = row - sheet->maxallocrow; if (newrows > 0 || newcols > 0) GrowSheet(sheet, newrows, newcols); } /* * CheckCellData - verify existance of cell data, allocate if necessary * * @param sheet * @param row * @param col */ static void CheckCellData(GtkSheet *sheet, const gint row, const gint col) { GtkSheetCell **cell; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col > sheet->maxcol || row > sheet->maxrow) return; if (col < 0 || row < 0) return; CheckBounds(sheet, row, col); cell = &sheet->data[row][col]; if (!(*cell)) (*cell) = gtk_sheet_cell_new(); (*cell)->row = row; (*cell)->col = col; } /******************************************************************** * Container Functions: * gtk_sheet_add * gtk_sheet_put * gtk_sheet_attach * gtk_sheet_remove * gtk_sheet_move_child * gtk_sheet_position_child * gtk_sheet_position_children * gtk_sheet_realize_child * gtk_sheet_get_child_at ********************************************************************/ /** * gtk_sheet_put: * @sheet: a #GtkSheet. * @child: GtkWidget to be put * @x: x coordinate where we put the widget * @y: y coordinate where we put the widget * * Add widgets to the sheet. * The widget is floating in one given position (x,y) regardless of the configurations of rows/columns. * This means that cells do not resize depending on the widgets' size. * You can resize it yourself or use gtk_sheet_attach_*() * You may remove it with gtk_container_remove(GTK_CONTAINER(sheet), GtkWidget *child); * * Returns: (transfer none) TRUE means that the cell is currently allocated. */ GtkSheetChild * gtk_sheet_put(GtkSheet *sheet, GtkWidget *child, gint x, gint y) { GtkRequisition child_requisition; GtkSheetChild *child_info; g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); g_return_val_if_fail(child != NULL, NULL); g_return_val_if_fail(gtk_widget_get_parent(child) == NULL, NULL); #if GTK_SHEET_DEBUG_CHILDREN > 0 g_debug("gtk_sheet_put: %p %s child %p", sheet, gtk_widget_get_name(sheet), child); #endif child_info = g_new(GtkSheetChild, 1); child_info->widget = child; child_info->x = x; child_info->y = y; child_info->attached_to_cell = FALSE; child_info->floating = TRUE; child_info->xpadding = child_info->ypadding = 0; child_info->xexpand = child_info->yexpand = FALSE; child_info->xshrink = child_info->yshrink = FALSE; child_info->xfill = child_info->yfill = FALSE; sheet->children = g_list_append(sheet->children, child_info); g_object_ref(child); gtk_widget_set_parent(child, GTK_WIDGET(sheet)); gtk_widget_size_request(child, &child_requisition); if (gtk_widget_get_visible(GTK_WIDGET(sheet))) { if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && (!gtk_widget_get_realized(child) || gtk_widget_get_has_window(child))) gtk_sheet_realize_child(sheet, child_info); if (gtk_widget_get_mapped(GTK_WIDGET(sheet)) && !gtk_widget_get_mapped(child)) gtk_widget_map(child); } gtk_sheet_position_child(sheet, child_info); /* This will avoid drawing on the titles */ if (gtk_widget_get_realized(GTK_WIDGET(sheet))) { if (sheet->row_titles_visible) gdk_window_show(sheet->row_title_window); if (sheet->column_titles_visible) gdk_window_show(sheet->column_title_window); } return (child_info); } /** * gtk_sheet_attach_floating: * @sheet: a #GtkSheet. * @widget: #GtkWidget to be put * @row: row number * @col: column number * * The widget is attached to the top-left corner of a cell (row,column) and moves with it when you change width, * height, or you delete of add row/columns */ void gtk_sheet_attach_floating(GtkSheet *sheet, GtkWidget *widget, gint row, gint col) { GdkRectangle area; GtkSheetChild *child; if (row < 0 || col < 0) { gtk_sheet_button_attach(sheet, widget, row, col); return; } gtk_sheet_get_cell_area(sheet, row, col, &area); child = gtk_sheet_put(sheet, widget, area.x, area.y); child->attached_to_cell = TRUE; child->row = row; child->col = col; } /** * gtk_sheet_attach_default: * @sheet: a #GtkSheet. * @widget: #GtkWidget to be put * @row: row number * @col: column number * * Attaches a child widget to the given cell with the 0,0 alignments. * Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the * cell, expands with it, or shrinks with it, depending on the options. * The child is reallocated each time the column or row changes, keeping attached to the same cell. * It's in fact gtk_sheet_attach() with GTK_EXPAND set. */ void gtk_sheet_attach_default(GtkSheet *sheet, GtkWidget *widget, gint row, gint col) { if (row < 0 || col < 0) { gtk_sheet_button_attach(sheet, widget, row, col); return; } gtk_sheet_attach(sheet, widget, row, col, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); } /** * gtk_sheet_attach: * @sheet: a #GtkSheet. * @widget: #GtkWidget to be put * @row: row number * @col: column number * @xoptions: if set GTK_EXPAND cell will expand/shrink on x direction * @yoptions: if set GTK_EXPAND cell will expand/shrink on y direction * @xpadding: x coordinate of the alignment * @ypadding: y coordinate of the alignment * * Attaches a child widget to the given cell with the given alignments. * Works basically like gtk_table_attach, with the same options, the widget is confined in the cell, and whether it fills the * cell, expands with it, or shrinks with it, depending on the options , if GTK_EXPAND is set. * The child is reallocated each time the column or row changes, keeping attached to the same cell. */ void gtk_sheet_attach(GtkSheet *sheet, GtkWidget *widget, gint row, gint col, gint xoptions, gint yoptions, gint xpadding, gint ypadding) { GdkRectangle area; GtkSheetChild *child = NULL; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); g_return_if_fail(widget != NULL); if (row < 0 || col < 0) { gtk_sheet_button_attach(sheet, widget, row, col); return; } #if GTK_SHEET_DEBUG_CHILDREN > 0 g_debug("gtk_sheet_attach: %p %s widget %p", sheet, gtk_widget_get_name(sheet), widget); #endif child = g_new0(GtkSheetChild, 1); child->attached_to_cell = TRUE; child->floating = FALSE; child->widget = widget; child->row = row; child->col = col; child->xpadding = xpadding; child->ypadding = ypadding; child->xexpand = (xoptions & GTK_EXPAND) != 0; child->yexpand = (yoptions & GTK_EXPAND) != 0; child->xshrink = (xoptions & GTK_SHRINK) != 0; child->yshrink = (yoptions & GTK_SHRINK) != 0; child->xfill = (xoptions & GTK_FILL) != 0; child->yfill = (yoptions & GTK_FILL) != 0; sheet->children = g_list_append(sheet->children, child); g_object_ref(child->widget); gtk_sheet_get_cell_area(sheet, row, col, &area); child->x = area.x + child->xpadding; child->y = area.y + child->ypadding; if (gtk_widget_get_visible(GTK_WIDGET(sheet))) { if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && (!gtk_widget_get_realized(widget) || gtk_widget_get_has_window(widget))) gtk_sheet_realize_child(sheet, child); if (gtk_widget_get_mapped(GTK_WIDGET(sheet)) && !gtk_widget_get_mapped(widget)) gtk_widget_map(widget); } gtk_sheet_position_child(sheet, child); /* This will avoid drawing on the titles */ if (gtk_widget_get_realized(GTK_WIDGET(sheet))) { if (GTK_SHEET_ROW_TITLES_VISIBLE(sheet)) gdk_window_show(sheet->row_title_window); if (GTK_SHEET_COL_TITLES_VISIBLE(sheet)) gdk_window_show(sheet->column_title_window); } } /** * gtk_sheet_button_attach: * @sheet: a #GtkSheet. * @widget: #GtkWidget to be put * @row: row number * @col: column number * * Button attach works like cell attach but for the buttons. */ void gtk_sheet_button_attach(GtkSheet *sheet, GtkWidget *widget, gint row, gint col) { GtkSheetButton *button; GtkSheetChild *child; GtkRequisition button_requisition; if (row >= 0 && col >= 0) return; if (row < 0 && col < 0) return; #if GTK_SHEET_DEBUG_CHILDREN > 0 g_debug("gtk_sheet_button_attach: called"); #endif child = g_new(GtkSheetChild, 1); child->widget = widget; child->x = 0; child->y = 0; child->attached_to_cell = TRUE; child->floating = FALSE; child->row = row; child->col = col; child->xpadding = child->ypadding = 0; child->xshrink = child->yshrink = FALSE; child->xfill = child->yfill = FALSE; if (row == -1) { button = &COLPTR(sheet, col)->button; button->child = child; } else { button = &sheet->row[row].button; button->child = child; } sheet->children = g_list_append(sheet->children, child); g_object_ref(child); _gtk_sheet_button_size_request(sheet, button, &button_requisition); if (row == -1) { if (button_requisition.height > sheet->column_title_area.height) sheet->column_title_area.height = button_requisition.height; if (button_requisition.width > COLPTR(sheet, col)->width) COLPTR(sheet, col)->width = button_requisition.width; } if (col == -1) { if (button_requisition.width > sheet->row_title_area.width) sheet->row_title_area.width = button_requisition.width; if (button_requisition.height > sheet->row[row].height) sheet->row[row].height = button_requisition.height; } if (gtk_widget_get_visible(GTK_WIDGET(sheet))) { if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && (!gtk_widget_get_realized(widget) || gtk_widget_get_has_window(widget))) gtk_sheet_realize_child(sheet, child); if (gtk_widget_get_mapped(GTK_WIDGET(sheet)) && !gtk_widget_get_mapped(widget)) gtk_widget_map(widget); } if (row == -1) _gtk_sheet_column_buttons_size_allocate(sheet); if (col == -1) size_allocate_row_title_buttons(sheet); } static void label_size_request(GtkSheet *sheet, gchar *label, GtkRequisition *req) { gchar *words; gchar word[1000]; gint n = 0; gint row_height = _gtk_sheet_row_default_height(GTK_WIDGET(sheet)) - 2 * CELLOFFSET + 2; req->height = 0; req->width = 0; words = label; while (words && *words != '\0') { if (*words == '\n' || *(words + 1) == '\0') { guint text_width, text_height; req->height += row_height; word[n] = '\0'; _get_string_extent(sheet, NULL, gtk_widget_get_style(GTK_WIDGET(sheet))->font_desc, word, &text_width, &text_height); req->width = MAX(req->width, text_width); n = 0; } else { word[n++] = *words; } words++; } if (n > 0) req->height -= 2; } /** * _gtk_sheet_button_size_request: * @sheet: the #GtkSheet * @button: the #GtkSheetButton requested * @button_requisition: the requisition * * size request handler for all sheet buttons */ void _gtk_sheet_button_size_request(GtkSheet *sheet, GtkSheetButton *button, GtkRequisition *button_requisition) { GtkRequisition requisition; GtkRequisition label_requisition; if (gtk_sheet_autoresize(sheet) && button->label && button->label[0]) { label_size_request(sheet, button->label, &label_requisition); label_requisition.width += 2 * CELLOFFSET; label_requisition.height += 2 * CELLOFFSET; } else { label_requisition.height = _gtk_sheet_row_default_height(GTK_WIDGET(sheet)); label_requisition.width = GTK_SHEET_COLUMN_MIN_WIDTH; } if (button->child) { gtk_widget_size_request(button->child->widget, &requisition); requisition.width += 2 * button->child->xpadding; requisition.height += 2 * button->child->ypadding; requisition.width += 2 * gtk_widget_get_style(sheet->button)->xthickness; requisition.height += 2 * gtk_widget_get_style(sheet->button)->ythickness; } else { requisition.height = _gtk_sheet_row_default_height(GTK_WIDGET(sheet)); requisition.width = GTK_SHEET_COLUMN_MIN_WIDTH; } *button_requisition = requisition; button_requisition->width = MAX(requisition.width, label_requisition.width); button_requisition->height = MAX(requisition.height, label_requisition.height); } static void gtk_sheet_row_size_request(GtkSheet *sheet, gint row, guint *requisition) { GtkRequisition button_requisition; GList *children; _gtk_sheet_button_size_request(sheet, &sheet->row[row].button, &button_requisition); *requisition = button_requisition.height; children = sheet->children; while (children) { GtkSheetChild *child = (GtkSheetChild *)children->data; GtkRequisition child_requisition; if (child->attached_to_cell && child->row == row && child->col != -1 && !child->floating && !child->yshrink) { gtk_widget_get_child_requisition(child->widget, &child_requisition); if (child_requisition.height + 2 * child->ypadding > *requisition) *requisition = child_requisition.height + 2 * child->ypadding; } children = children->next; } sheet->row[row].requisition = *requisition; } /** * gtk_sheet_move_child: * @sheet: a #GtkSheet. * @widget: #GtkWidget to be put. * @x: x coord at which we move the widget. * @y: y coord at which we move the widget. * * Move widgets added with gtk_sheet_put() in the sheet. */ void gtk_sheet_move_child(GtkSheet *sheet, GtkWidget *widget, gint x, gint y) { GtkSheetChild *child; GList *children; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); children = sheet->children; while (children) { child = children->data; if (child->widget == widget) { child->x = x; child->y = y; child->row = _gtk_sheet_row_from_ypixel(sheet, y); child->col = _gtk_sheet_column_from_xpixel(sheet, x); gtk_sheet_position_child(sheet, child); return; } children = children->next; } g_warning("Widget must be a GtkSheet child"); } static void gtk_sheet_position_child(GtkSheet *sheet, GtkSheetChild *child) { GtkRequisition child_requisition; GtkAllocation child_allocation; gint xoffset = 0; gint yoffset = 0; gint x = 0, y = 0; GdkRectangle area; /* PR#99118 - we cannot reposition all children while scrolling because with many offside rows it will consume lots of CPU and incredibly slow down scrolling. If we do not reposition all childs, we have to hide them whenn going off screen, in order not to stray around. We're using unmap/map here in order to leave hide/show available for the application */ if (child->attached_to_cell) { if ((child->row < MIN_VIEW_ROW(sheet) || child->row > MAX_VIEW_ROW(sheet)) || (child->col < MIN_VIEW_COLUMN(sheet) || child->col > MAX_VIEW_COLUMN(sheet)) ) { gtk_widget_unmap(child->widget); return; } if (gtk_widget_get_realized(child->widget) && !gtk_widget_get_mapped(child->widget)) { gtk_widget_map(child->widget); } } gtk_widget_get_child_requisition(child->widget, &child_requisition); if (sheet->column_titles_visible) yoffset = sheet->column_title_area.height; if (sheet->row_titles_visible) xoffset = sheet->row_title_area.width; if (child->attached_to_cell) { gtk_sheet_get_cell_area(sheet, child->row, child->col, &area); child->x = area.x + child->xpadding; child->y = area.y + child->ypadding; if (!child->floating) { if (child_requisition.width + 2 * child->xpadding <= COLPTR(sheet, child->col)->width) { if (child->xfill) { child_requisition.width = child_allocation.width = COLPTR(sheet, child->col)->width - 2 * child->xpadding; } else { if (child->xexpand) { child->x = area.x + COLPTR(sheet, child->col)->width / 2 - child_requisition.width / 2; } child_allocation.width = child_requisition.width; } } else { if (!child->xshrink) { #if GTK_SHEET_DEBUG_SIZE > 0 g_debug("gtk_sheet_position_child[%d]: set width %d", child->col, child_requisition.width + 2 * child->xpadding); #endif gtk_sheet_set_column_width(sheet, child->col, child_requisition.width + 2 * child->xpadding); } child_allocation.width = COLPTR(sheet, child->col)->width - 2 * child->xpadding; } if (child_requisition.height + 2 * child->ypadding <= sheet->row[child->row].height) { if (child->yfill) { child_requisition.height = child_allocation.height = sheet->row[child->row].height - 2 * child->ypadding; } else { if (child->yexpand) { child->y = area.y + sheet->row[child->row].height / 2 - child_requisition.height / 2; } child_allocation.height = child_requisition.height; } } else { if (!child->yshrink) { gtk_sheet_set_row_height(sheet, child->row, child_requisition.height + 2 * child->ypadding); } child_allocation.height = sheet->row[child->row].height - 2 * child->ypadding; } } else { child_allocation.width = child_requisition.width; child_allocation.height = child_requisition.height; } x = child_allocation.x = child->x + xoffset; y = child_allocation.y = child->y + yoffset; } else /* not attached_to_cell */ { x = child_allocation.x = child->x + sheet->hoffset + xoffset; x = child_allocation.x = child->x + xoffset; y = child_allocation.y = child->y + sheet->voffset + yoffset; y = child_allocation.y = child->y + yoffset; child_allocation.width = child_requisition.width; child_allocation.height = child_requisition.height; } gtk_widget_size_allocate(child->widget, &child_allocation); gtk_widget_queue_draw(child->widget); } /* * gtk_sheet_forall_handler: * * this is the #GtkSheet container child enumeration handler * * @param container the #GtkSheet * @param include_internals * Flag wether to include internal childs * @param callback a callback function * @param callback_data * callback user data */ static void gtk_sheet_forall_handler(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { GtkSheet *sheet; GtkSheetChild *child; GList *children; g_return_if_fail(GTK_IS_SHEET(container)); g_return_if_fail(callback != NULL); sheet = GTK_SHEET(container); children = sheet->children; #if GTK_SHEET_DEBUG_CHILDREN > 1 g_debug("gtk_sheet_forall_handler: Sheet <%s>", gtk_widget_get_name(GTK_WIDGET(sheet))); #endif while (children) { child = children->data; children = children->next; #if GTK_SHEET_DEBUG_CHILDREN > 1 g_debug("gtk_sheet_forall_handler: L1 %p", child->widget); #endif if (G_IS_OBJECT(child->widget) && GTK_IS_WIDGET(child->widget) ) { #if GTK_SHEET_DEBUG_CHILDREN > 1 g_debug("gtk_sheet_forall_handler: L2 %p", child->widget); #endif (*callback)(child->widget, callback_data); } } #if GTK_SHEET_DEBUG_CHILDREN > 1 g_debug("gtk_sheet_forall_handler: B1 %p %d", sheet->button, GTK_IS_WIDGET(sheet->button)); #endif if (sheet->button && G_IS_OBJECT(sheet->button) && GTK_IS_WIDGET(sheet->button) ) { #if GTK_SHEET_DEBUG_CHILDREN > 1 g_debug("gtk_sheet_forall_handler: B2 %p", sheet->button); #endif g_object_ref(sheet->button); (*callback)(sheet->button, callback_data); g_object_unref(sheet->button); } #if GTK_SHEET_DEBUG_CHILDREN > 1 g_debug("gtk_sheet_forall_handler: C1 %p %d", sheet->sheet_entry, GTK_IS_WIDGET(sheet->sheet_entry)); #endif if (sheet->sheet_entry && G_IS_OBJECT(sheet->sheet_entry) && GTK_IS_WIDGET(sheet->sheet_entry) ) { #if GTK_SHEET_DEBUG_CHILDREN > 1 g_debug("gtk_sheet_forall_handler: C2 %p IsObject %d IsWidget %d", sheet->sheet_entry, G_IS_OBJECT(sheet->sheet_entry), GTK_IS_WIDGET(sheet->sheet_entry)); #endif g_object_ref(sheet->sheet_entry); (*callback)(sheet->sheet_entry, callback_data); g_object_unref(sheet->sheet_entry); } } static void gtk_sheet_position_children(GtkSheet *sheet) { GList *children; GtkSheetChild *child; children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->col != -1 && child->row != -1) gtk_sheet_position_child(sheet, child); if (child->row == -1) { if (child->col < MIN_VIEW_COLUMN(sheet) || child->col > MAX_VIEW_COLUMN(sheet)) _gtk_sheet_child_hide(child); else _gtk_sheet_child_show(child); } if (child->col == -1) { if (child->row < MIN_VIEW_ROW(sheet) || child->row > MAX_VIEW_ROW(sheet)) _gtk_sheet_child_hide(child); else _gtk_sheet_child_show(child); } children = children->next; } } /* * gtk_sheet_remove_handler: * * this is the #GtkSheet container class "remove" handler * * @param container the #GtkSheet * @param widget the #GtkWidget to be removed */ static void gtk_sheet_remove_handler(GtkContainer *container, GtkWidget *widget) { GtkSheet *sheet; GList *children; GtkSheetChild *child = NULL; g_return_if_fail(container != NULL); g_return_if_fail(GTK_IS_SHEET(container)); sheet = GTK_SHEET(container); children = sheet->children; while (children) { child = (GtkSheetChild *)children->data; if (child->widget == widget) break; children = children->next; } if (children) { if (child->row == -1) sheet->row[child->col].button.child = NULL; if (child->col == -1) COLPTR(sheet, child->row)->button.child = NULL; #if GTK_SHEET_DEBUG_CHILDREN > 0 g_debug("gtk_sheet_remove_handler: %p %s widget %p", sheet, gtk_widget_get_name(sheet), widget); #endif gtk_widget_unparent(widget); if (G_IS_OBJECT(child->widget)) g_object_unref(child->widget); child->widget = NULL; sheet->children = g_list_remove_link(sheet->children, children); g_list_free_1(children); g_free(child); } } static void gtk_sheet_realize_child(GtkSheet *sheet, GtkSheetChild *child) { GtkWidget *widget; widget = GTK_WIDGET(sheet); if (gtk_widget_get_realized(widget)) { if (child->row == -1) gtk_widget_set_parent_window(child->widget, sheet->column_title_window); else if (child->col == -1) gtk_widget_set_parent_window(child->widget, sheet->row_title_window); else gtk_widget_set_parent_window(child->widget, sheet->sheet_window); } gtk_widget_set_parent(child->widget, widget); } /** * gtk_sheet_get_child_at: * @sheet: a #GtkSheet. * @row: row number * @col: column number * * Get the child attached at @row,@col. * * returns: the #GtkSheetChild attached to @row,@col or NULL */ const GtkSheetChild * gtk_sheet_get_child_at(GtkSheet *sheet, gint row, gint col) { GList *children; g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); children = sheet->children; while (children) { const GtkSheetChild *child = (GtkSheetChild *)children->data; if (child->attached_to_cell) { if (child->row == row && child->col == col) return (child); } children = children->next; } return (NULL); } /** * _gtk_sheet_child_hide: * @child: the child * * gtk_widget_hide(child) */ void _gtk_sheet_child_hide(GtkSheetChild *child) { g_return_if_fail(child != NULL); gtk_widget_hide(child->widget); } /** * _gtk_sheet_child_show: * @child: the child * * gtk_widget_show(child) */ void _gtk_sheet_child_show(GtkSheetChild *child) { g_return_if_fail(child != NULL); gtk_widget_show(child->widget); } gtkextra-3.2.0/gtkextra/testgtksheet.c0000644000076400001440000014605512603754176015027 00000000000000/* testgtksheet - GtkSheet widget for Gtk+. * Copyright (C) 1999-2001 Adrian E. Feiguin * * Based on GtkClist widget by Jay Painter, but major changes. * Memory allocation routines inspired on SC (Spreadsheet Calculator) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include "gtkextra.h" #include "pixmaps.h" #define DEFAULT_PRECISION 3 #define DEFAULT_SPACE 8 #define NUM_SHEETS 3 GtkWidget *window; GtkWidget *main_vbox; GtkWidget *notebook; GtkWidget **sheets; GtkWidget **scrolled_windows; GtkWidget *show_hide_box; GtkWidget *status_box; GtkWidget *location; GtkWidget *entry; GtkWidget *fgcolorcombo; GtkWidget *bgcolorcombo; GtkWidget *bordercombo; GdkPixmap *pixmap; GdkBitmap *mask; GtkWidget *bg_pixmap; GtkWidget *fg_pixmap; GtkWidget *toolbar; GtkWidget *left_button; GtkWidget *center_button; GtkWidget *right_button; GtkWidget *tpixmap; GtkWidget *bullet[10]; GtkWidget *smile; GtkWidget *curve; GtkWidget *popup; void quit () { gtk_main_quit(); } static gint popup_activated(GtkWidget *widget, gpointer data) { GtkSheet *sheet; gint cur_page; gchar *item; cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); sheet=GTK_SHEET(sheets[cur_page]); item = (gchar *)data; if (strcmp(item,"Add Column")==0) gtk_sheet_add_column(sheet,1); if (strcmp(item,"Add Row")==0) gtk_sheet_add_row(sheet,1); if (strcmp(item,"Insert Row")==0) { if (sheet->state==GTK_SHEET_ROW_SELECTED) gtk_sheet_insert_rows(sheet,sheet->range.row0, sheet->range.rowi-sheet->range.row0+1); } if (strcmp(item,"Insert Column")==0) { if (sheet->state==GTK_SHEET_COLUMN_SELECTED) gtk_sheet_insert_columns(sheet,sheet->range.col0, sheet->range.coli-sheet->range.col0+1); } if (strcmp(item,"Delete Row")==0) { if (sheet->state==GTK_SHEET_ROW_SELECTED) gtk_sheet_delete_rows(sheet,sheet->range.row0, sheet->range.rowi-sheet->range.row0+1); } if (strcmp(item,"Delete Column")==0) { if (sheet->state==GTK_SHEET_COLUMN_SELECTED) gtk_sheet_delete_columns(sheet,sheet->range.col0, sheet->range.coli-sheet->range.col0+1); } if (strcmp(item,"Clear Cells")==0) { if (sheet->state!=GTK_SHEET_NORMAL) gtk_sheet_range_clear(sheet, &sheet->range); } gtk_widget_destroy(popup); return (TRUE); } static GtkWidget * build_menu(GtkWidget *sheet) { static char *items[]={ "Add Column", "Add Row", "Insert Row", "Insert Column", "Delete Row", "Delete Column", "Clear Cells" }; GtkWidget *menu; GtkWidget *item; int i; menu=gtk_menu_new(); for (i=0; i < (sizeof(items)/sizeof(items[0])) ; i++) { item=gtk_menu_item_new_with_label(items[i]); g_signal_connect(GTK_OBJECT(item),"activate", (void *) popup_activated, items[i]); gtk_widget_set_sensitive(GTK_WIDGET(item), TRUE); gtk_widget_set_can_focus(GTK_WIDGET(item), TRUE); switch (i) { case 2: if (GTK_SHEET(sheet)->state!=GTK_SHEET_ROW_SELECTED) { gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE); gtk_widget_set_can_focus(GTK_WIDGET(item), FALSE); } break; case 3: if (GTK_SHEET(sheet)->state!=GTK_SHEET_COLUMN_SELECTED) { gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE); gtk_widget_set_can_focus(GTK_WIDGET(item), FALSE); } break; case 4: if (GTK_SHEET(sheet)->state!=GTK_SHEET_ROW_SELECTED) { gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE); gtk_widget_set_can_focus(GTK_WIDGET(item), FALSE); } break; case 5: if (GTK_SHEET(sheet)->state!=GTK_SHEET_COLUMN_SELECTED) { gtk_widget_set_sensitive(GTK_WIDGET(item), FALSE); gtk_widget_set_can_focus(GTK_WIDGET(item), FALSE); } break; } gtk_widget_show(item); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); } return (menu); } gint do_popup(GtkWidget *widget, GdkEventButton *event, gpointer data) { GdkModifierType mods; GtkWidget *sheet = GTK_WIDGET(widget); gdk_window_get_pointer (gtk_widget_get_window(sheet), NULL, NULL, &mods); if (mods&GDK_BUTTON3_MASK) { if (popup) { gtk_object_destroy(GTK_OBJECT(popup)); popup = NULL; } popup=build_menu(sheet); gtk_menu_popup(GTK_MENU(popup), NULL, NULL, NULL, NULL, event->button, event->time); } return (FALSE); } void format_text (GtkSheet *sheet, const gchar *text, gint *justification, char *label) { double auxval; int digspace=0; int cell_width, char_width; double val = 0.0; int format; double space; int intspace; int nonzero=FALSE; int ipos; char nchar; PangoContext *context; PangoFontMetrics *metrics; enum { EMPTY, TEXT, NUMERIC }; context = gtk_widget_get_pango_context(GTK_WIDGET(sheet)); metrics = pango_context_get_metrics(context, gtk_widget_get_style(GTK_WIDGET(sheet))->font_desc, pango_context_get_language(context)); char_width = pango_font_metrics_get_approximate_char_width(metrics); pango_font_metrics_unref(metrics); cell_width = gtk_sheet_get_column_width(sheet, sheet->active_cell.col); space= (double)cell_width/(double)char_width; intspace=MIN(space, DEFAULT_SPACE); format=EMPTY; if (strlen(text) != 0) { for (ipos=0; iposintspace || digspace > DEFAULT_PRECISION) { sprintf (label, "%*.*E", intspace, DEFAULT_PRECISION, val); } else { intspace=MIN(intspace, strlen(text)-digspace-1); sprintf (label, "%*.*f", intspace, DEFAULT_PRECISION, val); if (strlen(label) > space) sprintf (label, "%*.*E", intspace, DEFAULT_PRECISION, val); } } void parse_numbers(GtkWidget *widget, gpointer data) { GtkSheet *sheet; char label[400]; gint justification; GtkSheetCellAttr attr; gchar *text; sheet=GTK_SHEET(widget); gtk_sheet_get_attributes(sheet, sheet->active_cell.row, sheet->active_cell.col, &attr); justification = attr.justification; text = gtk_sheet_get_entry_text(sheet); format_text(sheet, text, &justification, label); gtk_sheet_set_cell(sheet, sheet->active_cell.row, sheet->active_cell.col, justification, label); g_free(text); } gint clipboard_handler(GtkWidget *widget, GdkEventKey *key) { GtkSheet *sheet; sheet = GTK_SHEET(widget); if (key->state & GDK_CONTROL_MASK || key->keyval == GDK_KEY_Control_L || key->keyval == GDK_KEY_Control_R) { if ((key->keyval=='c' || key->keyval == 'C') && sheet->state != GTK_STATE_NORMAL) { if (gtk_sheet_in_clip(sheet)) gtk_sheet_unclip_range(sheet); gtk_sheet_clip_range(sheet, &sheet->range); /* gtk_sheet_unselect_range(sheet); */ } if (key->keyval=='x' || key->keyval == 'X') gtk_sheet_unclip_range(sheet); } return (FALSE); } void sheet_entry_changed_handler(GtkWidget *widget, gpointer data) { char *text; GtkSheet *sheet; gint cur_page; cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); sheet = GTK_SHEET(sheets[cur_page]); if (!gtk_widget_has_focus(gtk_sheet_get_entry_widget(sheet))) return; if ((text = gtk_sheet_get_entry_text(sheet))) { gtk_entry_set_text(GTK_ENTRY(entry), text); g_free(text); } } void resize_handler(GtkWidget *widget, GtkSheetRange *old_range, GtkSheetRange *new_range, gpointer data) { printf("OLD SELECTION: %d %d %d %d\n",old_range->row0, old_range->col0, old_range->rowi, old_range->coli); printf("NEW SELECTION: %d %d %d %d\n",new_range->row0, new_range->col0, new_range->rowi, new_range->coli); } void move_handler(GtkWidget *widget, GtkSheetRange *old_range, GtkSheetRange *new_range, gpointer data) { printf("OLD SELECTION: %d %d %d %d\n",old_range->row0, old_range->col0, old_range->rowi, old_range->coli); printf("NEW SELECTION: %d %d %d %d\n",new_range->row0, new_range->col0, new_range->rowi, new_range->coli); } gboolean change_entry(GtkWidget *widget, gint row, gint col, gint *new_row, gint *new_col, gpointer data) { gboolean changed = FALSE; GtkSheet *sheet = GTK_SHEET(widget); printf("change_entry: %d %d -> %d %d\n", row, col, *new_row, *new_col); if (*new_col == 0 && (col != 0 || sheet->state != GTK_STATE_NORMAL)) { printf("change_entry: GtkCombo\n"); gtk_sheet_change_entry(sheet, gtk_combo_get_type()); changed = TRUE; } if (*new_col == 1 && (col != 1 || sheet->state != GTK_STATE_NORMAL)) { printf("change_entry: GtkEntry\n"); gtk_sheet_change_entry(sheet, gtk_entry_get_type()); changed = TRUE; } if (*new_col == 2 && (col != 2 || sheet->state != GTK_STATE_NORMAL)) { GtkSpinButton *spin_button; GtkAdjustment *adjustment; gdouble value = 0.0; gchar *text; printf("change_entry: GtkSpinButton\n"); gtk_sheet_change_entry(sheet, gtk_spin_button_get_type ()); changed = TRUE; text = gtk_sheet_cell_get_text(sheet, *new_row, *new_col); if (text) value = atof(text); adjustment = (GtkAdjustment *) gtk_adjustment_new(value, 0.0, 100.0, 1.0, 10.0, 0.0); spin_button = (GtkSpinButton *) gtk_sheet_get_entry(sheet); gtk_spin_button_configure(spin_button, adjustment, 0.0, 3); } if (*new_col == 3 && (col != 3 || sheet->state != GTK_STATE_NORMAL)) { printf("change_entry: GtkTextView\n"); gtk_sheet_change_entry(sheet, GTK_TYPE_TEXT_VIEW); changed = TRUE; } if (*new_col == 4 && (col != 4 || sheet->state != GTK_STATE_NORMAL)) { printf("change_entry: GtkItemEntry\n"); gtk_sheet_change_entry(sheet, G_TYPE_ITEM_ENTRY); changed = TRUE; } if (*new_col >= 5 && (col < 5 || sheet->state != GTK_STATE_NORMAL)) { printf("change_entry: GtkDataTextView\n"); gtk_sheet_change_entry(sheet, gtk_data_text_view_get_type()); changed = TRUE; } if (changed) { /* Beware: you need to reconnect the "changed" signal after every call to gtk_sheet_change_entry()! */ gtk_sheet_entry_signal_connect_changed(sheet, G_CALLBACK(sheet_entry_changed_handler)); } return (TRUE); } void alarm_change(GtkWidget *widget, gint row, gint col, gpointer data) { printf("CHANGE CELL: %d %d\n",row,col); } gboolean alarm_activate(GtkWidget *widget, gint row, gint col, gpointer data) { GtkSheetRange range; printf("ACTIVATE CELL: %d %d\n",row,col); range.row0 = range.rowi = row; range.col0 = range.coli = col; /* gtk_sheet_range_set_justification(GTK_SHEET(widget), &range, GTK_JUSTIFY_LEFT); */ return (TRUE); } gboolean alarm_deactivate(GtkWidget *widget, gint row, gint col, gpointer data) { GtkSheetRange range; gchar *text; GtkSheet *sheet = GTK_SHEET(widget); printf("DEACTIVATE CELL: %d %d\n",row,col); range.row0 = range.rowi = row; range.col0 = range.coli = col; /* gtk_sheet_range_set_justification(GTK_SHEET(widget), &range, GTK_JUSTIFY_RIGHT); */ text = g_strdup(gtk_sheet_cell_get_text(GTK_SHEET(widget), row, col)); if (text && strlen(text) > 0) { gtk_sheet_set_cell_text(sheet, row, col, text); g_free(text); } return (TRUE); } gboolean alarm_traverse(GtkWidget *widget, gint row, gint col, gint *new_row, gint *new_col, gpointer data) { printf("TRAVERSE: %d %d %d %d\n",row,col,*new_row,*new_col); return (TRUE); } void show_child(GtkWidget *widget, gpointer data) { if (!gtk_widget_get_mapped(curve)) gtk_sheet_attach_floating(GTK_SHEET(sheets[0]), curve, 2, 7); /* gtk_sheet_put(GTK_SHEET(sheets[0]), curve, 550, 120); */ } void build_example1(GtkWidget *widget) { GtkSheet *sheet; GtkWidget *show_button; GtkSheetRange range; GdkRectangle area; GdkColor color; GdkColormap *colormap; gchar font_name1[]="Arial 36"; gchar font_name2[]="Arial 28"; gchar name[10]; gint i; sheet=GTK_SHEET(widget); colormap = gdk_colormap_get_system(); gdk_color_parse("light yellow", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_set_background(sheet, &color); gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_set_grid(sheet, &color); for (i=0; i<=sheet->maxcol; i++) { name[0]='A'+i; name[1]='\0'; gtk_sheet_column_button_add_label(sheet, i, name); gtk_sheet_set_column_title(sheet, i, name); } gtk_sheet_row_button_add_label(sheet, 0, "This is\na multiline\nlabel"); gtk_sheet_row_button_add_label(sheet, 1, "This is long label"); gtk_sheet_row_set_tooltip_markup(sheet, 1, "This row has a long label."); /* gtk_sheet_column_button_add_label(sheet, 7, "This is\na multiline\nlabel"); gtk_sheet_column_button_add_label(sheet, 8, "This is long label"); */ gtk_sheet_row_button_justify(sheet, 0, GTK_JUSTIFY_RIGHT); range.row0=1; range.rowi=2; range.col0=1; range.coli=3; gtk_sheet_clip_range(sheet, &range); PangoFontDescription *font_desc; font_desc = pango_font_description_from_string (font_name2); gtk_sheet_range_set_font(sheet, &range, font_desc); pango_font_description_free(font_desc); gdk_color_parse("red", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_foreground(sheet, &range, &color); gtk_sheet_set_cell(sheet, 1,2, GTK_JUSTIFY_CENTER, "Welcome to"); range.row0=2; font_desc = pango_font_description_from_string (font_name1); gtk_sheet_range_set_font(sheet, &range, font_desc); pango_font_description_free(font_desc); gdk_color_parse("blue", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_foreground(sheet, &range, &color); gtk_sheet_set_cell(sheet, 2,2, GTK_JUSTIFY_CENTER, "GtkSheet"); range.row0=3; range.rowi=3; range.col0=0; range.coli=4; gdk_color_parse("dark gray", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_background(sheet, &range, &color); gdk_color_parse("green", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_foreground(sheet, &range, &color); gtk_sheet_set_cell(sheet,3,2,GTK_JUSTIFY_CENTER, "a Matrix widget for Gtk+"); gtk_sheet_set_cell(sheet,4,1,GTK_JUSTIFY_LEFT, "GtkSheet is a matrix where you can allocate cells of text."); gtk_sheet_set_cell(sheet,5,1,GTK_JUSTIFY_LEFT, "Cell contents can be edited interactively with an specially designed entry"); gtk_sheet_set_cell(sheet,6,1,GTK_JUSTIFY_LEFT, "You can change colors, borders, and many other attributes"); gtk_sheet_set_cell(sheet, 7,1, GTK_JUSTIFY_LEFT, "Drag & drop or resize the selection clicking the corner or border"); gtk_sheet_set_cell(sheet, 8, 1, GTK_JUSTIFY_LEFT, "Store the selection on the clipboard pressing Ctrl-C"); gtk_sheet_set_cell(sheet, 9, 1, GTK_JUSTIFY_LEFT, "(The selection handler has not been implemented yet)"); gtk_sheet_set_cell(sheet, 10, 1, GTK_JUSTIFY_LEFT, "You can add buttons, charts, pixmaps, and other widgets"); g_signal_connect(GTK_OBJECT(sheet), "key_press_event", (void *) clipboard_handler, NULL); g_signal_connect(GTK_OBJECT(sheet), "resize_range", (void *) resize_handler, NULL); g_signal_connect(GTK_OBJECT(sheet), "move_range", (void *) move_handler, NULL); g_signal_connect(GTK_OBJECT(sheet), "changed", (void *) alarm_change, NULL); g_signal_connect(GTK_OBJECT(sheet), "activate", (void *) alarm_activate, NULL); g_signal_connect(GTK_OBJECT(sheet), "deactivate", (void *) alarm_deactivate, NULL); g_signal_connect(GTK_OBJECT(sheet), "traverse", (void *) alarm_traverse, NULL); curve=gtk_curve_new(); gtk_curve_set_range(GTK_CURVE(curve), 0, 200, 0, 200); gtk_widget_show(curve); pixmap=gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, bullet_xpm); for (i=0; i<5; i++) { bullet[i] = gtk_image_new_from_pixmap(pixmap, mask); gtk_widget_show(bullet[i]); gtk_sheet_get_cell_area(GTK_SHEET(sheets[0]), 4+i, 0, &area); /* gtk_sheet_put(GTK_SHEET(sheets[0]), bullet[i], area.x+area.width/2-8, area.y+area.height/2-8); */ gtk_sheet_attach(GTK_SHEET(sheets[0]), bullet[i], 4+i, 0, GTK_EXPAND, GTK_EXPAND, 0, 0); } bullet[5] = gtk_image_new_from_pixmap(pixmap, mask); gtk_widget_show(bullet[5]); gtk_sheet_get_cell_area(GTK_SHEET(sheets[0]), 10, 0, &area); /* gtk_sheet_put(GTK_SHEET(sheets[0]), bullet[i], area.x+area.width/2-8, area.y+area.height/2-8); */ gtk_sheet_attach(GTK_SHEET(sheets[0]), bullet[5], 10, 0, GTK_EXPAND, GTK_EXPAND, 0, 0); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); pixmap=gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, smile_xpm); smile = gtk_image_new_from_pixmap(pixmap, mask); gtk_widget_show(smile); gtk_sheet_button_attach(GTK_SHEET(sheets[0]), smile, -1, 5); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); gtk_sheet_column_set_tooltip_markup(GTK_SHEET(sheets[0]), 5, "This column has a Smilie in the title button."); gtk_sheet_cell_set_tooltip_text(GTK_SHEET(sheets[0]), 1, 5, "This single cell has its own tooltip text"); show_button=gtk_button_new_with_label("Show me a plot"); gtk_widget_show(show_button); gtk_widget_set_size_request(show_button, 100,60); gtk_sheet_get_cell_area(GTK_SHEET(sheets[0]), 12, 2, &area); /* gtk_sheet_put(GTK_SHEET(sheets[0]), show_button, area.x, area.y); */ gtk_sheet_attach(GTK_SHEET(sheets[0]), show_button, 12, 2, GTK_FILL, GTK_FILL, 5, 5); g_signal_connect(GTK_OBJECT(show_button), "clicked", (void *) show_child, NULL); /* g_signal_connect(GTK_OBJECT(sheet), "button_press_event", (void *) do_popup, NULL); */ } void build_example2(GtkWidget *widget) { GtkSheet *sheet; GtkSheetRange range; GdkColor color; GtkWidget *b; sheet=GTK_SHEET(widget); gtk_sheet_set_autoscroll(sheet, TRUE); /* gtk_sheet_set_justify_entry(sheet, TRUE); */ gtk_sheet_set_selection_mode(sheet, GTK_SELECTION_SINGLE); range.row0=0; range.rowi=2; range.col0=0; range.coli=sheet->maxcol; gtk_sheet_range_set_editable(sheet, &range, FALSE); gdk_color_parse("light gray", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_background(sheet, &range, &color); gdk_color_parse("blue", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_foreground(sheet, &range, &color); range.row0=1; gdk_color_parse("red", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_foreground(sheet, &range, &color); range.row0=2; gdk_color_parse("black", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_foreground(sheet, &range, &color); /* gtk_sheet_row_set_sensitivity(sheet, 0, FALSE); gtk_sheet_row_set_sensitivity(sheet, 1, FALSE); gtk_sheet_row_set_sensitivity(sheet, 2, FALSE); */ gtk_sheet_set_cell(sheet, 0,2, GTK_JUSTIFY_CENTER, "Click the right mouse button to display a popup"); gtk_sheet_set_cell(sheet, 1,2, GTK_JUSTIFY_CENTER, "You can connect a parser to the 'set cell' signal"); gtk_sheet_set_cell(sheet, 2,2, GTK_JUSTIFY_CENTER, "(Try typing numbers)"); gtk_sheet_set_active_cell(sheet, 3, 0); /* gtk_sheet_set_update_policy(sheet, GTK_UPDATE_CONTINUOUS, GTK_UPDATE_CONTINUOUS); */ g_signal_connect(GTK_OBJECT(sheet), "button_press_event", (void *) do_popup, NULL); g_signal_connect(GTK_OBJECT(sheet), "set_cell", (void *) parse_numbers, NULL); g_signal_connect(GTK_OBJECT(sheet), "activate", (void *) alarm_activate, NULL); g_signal_connect(GTK_OBJECT(sheet), "deactivate", (void *) alarm_deactivate, NULL); g_signal_connect(GTK_OBJECT(sheet), "traverse", (void *) alarm_traverse, NULL); gtk_sheet_set_row_height(GTK_SHEET(sheets[1]), 12, 60); b = gtk_button_new_with_label("GTK_FILL"); gtk_sheet_attach(GTK_SHEET(sheets[1]), b, 12, 2, GTK_FILL, GTK_FILL, 5, 5); gtk_widget_show(b); b = gtk_button_new_with_label("GTK_EXPAND"); gtk_sheet_attach(GTK_SHEET(sheets[1]), b, 12, 3, GTK_EXPAND, GTK_EXPAND, 5, 5); gtk_widget_show(b); b = gtk_button_new_with_label("GTK_SHRINK"); gtk_sheet_attach(GTK_SHEET(sheets[1]), b, 12, 4, GTK_SHRINK, GTK_SHRINK, 5, 5); gtk_widget_show(b); } void build_example3(GtkWidget *widget) { GtkSheet *sheet; GtkSheetRange range; GdkColor color; sheet=GTK_SHEET(widget); gtk_sheet_show_grid(sheet, FALSE); range.row0=0; range.rowi=10; range.col0=0; range.coli=6; gdk_color_parse("orange", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_background(sheet, &range, &color); gdk_color_parse("violet", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_foreground(sheet, &range, &color); range.row0=1; gdk_color_parse("blue", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_background(sheet, &range, &color); range.coli=0; gdk_color_parse("dark green", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_background(sheet, &range, &color); range.row0=0; gdk_color_parse("dark blue", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_border_color(sheet, &range, &color); gtk_sheet_range_set_border(sheet, &range, GTK_SHEET_RIGHT_BORDER, 4, 1); range.coli=0; range.col0=0; range.rowi=0; gdk_color_parse("red", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_background(sheet, &range, &color); gtk_sheet_range_set_border(sheet, &range, GTK_SHEET_RIGHT_BORDER| GTK_SHEET_BOTTOM_BORDER, 4, 0); range.rowi=0; range.col0=1; range.coli=6; gdk_color_parse("dark blue", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); gtk_sheet_range_set_border_color(sheet, &range, &color); gtk_sheet_range_set_border(sheet, &range, GTK_SHEET_BOTTOM_BORDER, 4, 1); gtk_sheet_set_autoresize(sheet, TRUE); gtk_sheet_column_button_add_label(sheet, 0, "GtkCombo"); gtk_sheet_column_button_add_label(sheet, 1, "GtkEntry"); gtk_sheet_column_button_add_label(sheet, 2, "GtkSpinButton"); gtk_sheet_column_button_add_label(sheet, 3, "GtkTextView"); gtk_sheet_column_button_add_label(sheet, 4, "GtkItemEntry\nmax 10 chars"); g_object_set(gtk_sheet_column_get(sheet, 4),"max-length", 10, NULL); gtk_sheet_column_button_add_label(sheet, 5, "GtkDataTextView\nmax 20 chars"); g_object_set(gtk_sheet_column_get(sheet, 5),"max-length", 20, NULL); gtk_sheet_column_button_add_label(sheet, 6, "GtkDataTextView\nno limit"); gtk_sheet_change_entry(sheet, gtk_combo_get_type()); gtk_sheet_entry_signal_connect_changed(sheet, G_CALLBACK(sheet_entry_changed_handler)); g_signal_connect(GTK_OBJECT(sheet), "traverse", (void *) change_entry, NULL); } /* void build_example4(GtkWidget *widget) { GtkSheet *sheet; sheet=GTK_SHEET(widget); g_signal_connect(GTK_OBJECT(sheet), "button_press_event", (void *) do_popup, NULL); } */ void set_cell(GtkWidget *widget, gchar *insert, gint text_legth, gint position, gpointer data) { char *text; GtkSheet *sheet = GTK_SHEET(widget); GtkWidget *sheet_entry = gtk_sheet_get_entry(sheet); if ((text = gtk_sheet_get_entry_text(sheet))) { gtk_entry_set_text(GTK_ENTRY(entry), text); g_free(text); } GTK_WIDGET_UNSET_FLAGS(entry, GTK_HAS_FOCUS); GTK_WIDGET_SET_FLAGS(sheet_entry, GTK_HAS_FOCUS); } void entry_changed_handler(GtkWidget *widget, gpointer data) { const char *text; GtkSheet *sheet; gint cur_page; if (!gtk_widget_has_focus(widget)) return; cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); sheet = GTK_SHEET(sheets[cur_page]); if ((text = gtk_entry_get_text(GTK_ENTRY(entry)))) { gtk_sheet_set_entry_text(sheet, text); } } void activate_sheet_entry(GtkWidget *widget, gpointer data) { GtkSheet *sheet; gint cur_page, row, col; cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); sheet=GTK_SHEET(sheets[cur_page]); row=sheet->active_cell.row; col=sheet->active_cell.col; gtk_sheet_set_cell_text(sheet, row, col, gtk_sheet_get_entry_text(sheet)); } void justify_left(GtkWidget *widget) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(left_button), GTK_STATE_ACTIVE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(right_button), GTK_STATE_NORMAL); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(center_button), GTK_STATE_NORMAL); gtk_sheet_range_set_justification(current, ¤t->range, GTK_JUSTIFY_LEFT); } void justify_center(GtkWidget *widget) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(center_button), GTK_STATE_ACTIVE); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(right_button), GTK_STATE_NORMAL); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(left_button), GTK_STATE_NORMAL); gtk_sheet_range_set_justification(current, ¤t->range, GTK_JUSTIFY_CENTER); } void justify_right(GtkWidget *widget) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(right_button), GTK_STATE_ACTIVE); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(left_button), GTK_STATE_NORMAL); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(center_button), GTK_STATE_NORMAL); gtk_sheet_range_set_justification(current, ¤t->range, GTK_JUSTIFY_RIGHT); } gint activate_sheet_cell(GtkWidget *widget, gint row, gint column, gpointer data) { GtkSheet *sheet; GtkWidget *sheet_entry; char cell[100]; const char *text; GtkSheetCellAttr attributes; sheet=GTK_SHEET(widget); sheet_entry = gtk_sheet_get_entry(sheet); if (gtk_sheet_get_column_title(GTK_SHEET(widget), column)) sprintf(cell," %s:%d ", gtk_sheet_get_column_title(GTK_SHEET(widget), column), row); else sprintf(cell, " ROW: %d COLUMN: %d ", row, column); gtk_label_set(GTK_LABEL(location), cell); if (GTK_IS_ENTRY(sheet_entry) || GTK_IS_ITEM_ENTRY(sheet_entry)) { gtk_entry_set_max_length(GTK_ENTRY(entry), GTK_ENTRY(sheet_entry)->text_max_length); } if ((text = gtk_sheet_get_entry_text(sheet))) { gtk_entry_set_text(GTK_ENTRY(entry), text); } gtk_sheet_get_attributes(sheet,sheet->active_cell.row, sheet->active_cell.col, &attributes); gtk_editable_set_editable(GTK_EDITABLE(entry), attributes.is_editable); switch (attributes.justification) { case GTK_JUSTIFY_LEFT: justify_left(NULL); break; case GTK_JUSTIFY_CENTER: justify_center(NULL); break; case GTK_JUSTIFY_RIGHT: justify_right(NULL); break; default: justify_left(NULL); break; } return (TRUE); } void change_border (GtkWidget *widget, gint border) { GtkSheet *current; gint cur_page; GtkSheetRange range, auxrange; gint border_mask, border_width=3; gint auxcol, auxrow; gint i,j; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); range=current->range; gtk_sheet_range_set_border(current, &range, 0, 0, 0); switch (border) { case 0: break; case 1: border_mask = GTK_SHEET_TOP_BORDER; range.rowi = range.row0; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 2: border_mask = GTK_SHEET_BOTTOM_BORDER; range.row0 = range.rowi; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 3: border_mask = GTK_SHEET_RIGHT_BORDER; range.col0 = range.coli; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 4: border_mask = GTK_SHEET_LEFT_BORDER; range.coli = range.col0; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 5: if (range.col0 == range.coli) { border_mask = GTK_SHEET_LEFT_BORDER | GTK_SHEET_RIGHT_BORDER; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; } border_mask = GTK_SHEET_LEFT_BORDER; auxcol=range.coli; range.coli = range.col0; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); border_mask = GTK_SHEET_RIGHT_BORDER; range.col0 = range.coli=auxcol; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 6: if (range.row0 == range.rowi) { border_mask = GTK_SHEET_TOP_BORDER | GTK_SHEET_BOTTOM_BORDER; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; } border_mask = GTK_SHEET_TOP_BORDER; auxrow=range.rowi; range.rowi = range.row0; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); border_mask = GTK_SHEET_BOTTOM_BORDER; range.row0=range.rowi=auxrow; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 7: border_mask = GTK_SHEET_RIGHT_BORDER | GTK_SHEET_LEFT_BORDER; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 8: border_mask = GTK_SHEET_BOTTOM_BORDER | GTK_SHEET_TOP_BORDER; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; case 9: gtk_sheet_range_set_border(current, &range, 15, border_width, 0); for (i=range.row0; i<=range.rowi; i++) for (j=range.col0; j<=range.coli; j++) { border_mask = 15; auxrange.row0 = i; auxrange.rowi = i; auxrange.col0 = j; auxrange.coli = j; if (i == range.rowi) border_mask ^= GTK_SHEET_BOTTOM_BORDER; if (i == range.row0) border_mask ^= GTK_SHEET_TOP_BORDER; if (j == range.coli) border_mask ^= GTK_SHEET_RIGHT_BORDER; if (j == range.col0) border_mask ^= GTK_SHEET_LEFT_BORDER; if (border_mask != 15) gtk_sheet_range_set_border(current, &auxrange, border_mask, border_width, 0); } break; case 10: for (i=range.row0; i<=range.rowi; i++) for (j=range.col0; j<=range.coli; j++) { border_mask = 0; auxrange.row0 = i; auxrange.rowi = i; auxrange.col0 = j; auxrange.coli = j; if (i == range.rowi) border_mask |= GTK_SHEET_BOTTOM_BORDER; if (i == range.row0) border_mask |= GTK_SHEET_TOP_BORDER; if (j == range.coli) border_mask |= GTK_SHEET_RIGHT_BORDER; if (j == range.col0) border_mask |= GTK_SHEET_LEFT_BORDER; if (border_mask != 0) gtk_sheet_range_set_border(current, &auxrange, border_mask, border_width, 0); } break; case 11: border_mask = 15; gtk_sheet_range_set_border(current, &range, border_mask, border_width, 0); break; } } void change_fg(GtkWidget *widget, gint i, GdkColor *color) { GtkSheet *current; gint cur_page; GdkGC *tmp_gc; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_sheet_range_set_foreground(current, ¤t->range, color); tmp_gc=gdk_gc_new(gtk_widget_get_window(window)); gdk_gc_set_foreground(tmp_gc,color); gdk_draw_rectangle(GTK_PIXMAP(fg_pixmap)->pixmap, tmp_gc, TRUE, 5,20,16,4); gtk_widget_queue_draw(fg_pixmap); gdk_gc_unref(tmp_gc); } void change_bg(GtkWidget *widget, gint i, GdkColor *color) { GtkSheet *current; gint cur_page; GdkGC *tmp_gc; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_sheet_range_set_background(current, ¤t->range, color); tmp_gc=gdk_gc_new(gtk_widget_get_window(window)); gdk_gc_set_foreground(tmp_gc,color); gdk_draw_rectangle(GTK_PIXMAP(bg_pixmap)->pixmap, tmp_gc, TRUE, 4,20,18,4); gtk_widget_draw(bg_pixmap, NULL); gdk_gc_unref(tmp_gc); } void do_hide_row_titles(GtkWidget *widget) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_sheet_hide_row_titles(current); } void do_hide_column_titles(GtkWidget *widget) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_sheet_hide_column_titles(current); } void do_show_row_titles(GtkWidget *widget) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_sheet_show_row_titles(current); } void do_show_column_titles(GtkWidget *widget) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_sheet_show_column_titles(current); } void new_font(GtkFontCombo *font_combo, gpointer data) { GtkSheet *current; gint cur_page; cur_page=gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); current=GTK_SHEET(sheets[cur_page]); gtk_sheet_range_set_font(current, ¤t->range, gtk_font_combo_get_font_description(font_combo)); } int main(int argc, char *argv[]) { GtkWidget *label; GtkRequisition request; GtkWidget *hide_row_titles; GtkWidget *hide_column_titles; GtkWidget *show_row_titles; GtkWidget *show_column_titles; GtkWidget *font_combo; GtkWidget *toggle_combo; GdkColormap *colormap; gint i; char *title[]= {"Example 1", "Example 2", "Example 3", "Example 4"}; char *folder[]= {"Folder 1", "Folder 2", "Folder 3", "Folder 4"}; gtk_init(&argc, &argv); colormap = gdk_colormap_get_system(); window=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "GtkSheet Demo"); gtk_widget_set_size_request(GTK_WIDGET(window), 900, 600); g_signal_connect (GTK_OBJECT (window), "destroy", G_CALLBACK (quit), NULL); main_vbox=gtk_vbox_new(FALSE,1); gtk_container_set_border_width(GTK_CONTAINER(main_vbox),0); gtk_container_add(GTK_CONTAINER(window), main_vbox); gtk_widget_show(main_vbox); show_hide_box = gtk_hbox_new(FALSE, 1); hide_row_titles = gtk_button_new_with_label("Hide Row Titles"); hide_column_titles = gtk_button_new_with_label("Hide Column Titles"); show_row_titles = gtk_button_new_with_label("Show Row Titles"); show_column_titles = gtk_button_new_with_label("Show Column Titles"); gtk_box_pack_start(GTK_BOX(show_hide_box), hide_row_titles, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(show_hide_box), hide_column_titles, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(show_hide_box), show_row_titles, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(show_hide_box), show_column_titles, TRUE, TRUE, 0); gtk_widget_show(hide_row_titles); gtk_widget_show(hide_column_titles); gtk_widget_show(show_row_titles); gtk_widget_show(show_column_titles); g_signal_connect(GTK_OBJECT(hide_row_titles), "clicked", (void *) do_hide_row_titles, NULL); g_signal_connect(GTK_OBJECT(hide_column_titles), "clicked", (void *) do_hide_column_titles, NULL); g_signal_connect(GTK_OBJECT(show_row_titles), "clicked", (void *) do_show_row_titles, NULL); g_signal_connect(GTK_OBJECT(show_column_titles), "clicked", (void *) do_show_column_titles, NULL); gtk_box_pack_start(GTK_BOX(main_vbox), show_hide_box, FALSE, TRUE, 0); gtk_widget_show(show_hide_box); toolbar=gtk_toolbar_new(); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); font_combo = gtk_font_combo_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), font_combo, "font", "font"); gtk_widget_set_size_request(GTK_FONT_COMBO(font_combo)->italic_button, 32, 32); gtk_widget_set_size_request(GTK_FONT_COMBO(font_combo)->bold_button, 32, 32); gtk_widget_show(font_combo); g_signal_connect(GTK_OBJECT(font_combo), "changed", G_CALLBACK(new_font), NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); left_button = gtk_toggle_button_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), left_button, "justify left", "justify left"); gtk_widget_show(left_button); g_signal_connect(GTK_OBJECT(left_button),"released", (void *) justify_left, NULL); center_button = gtk_toggle_button_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), center_button, "justify center", "justify center"); gtk_widget_show(center_button); g_signal_connect(GTK_OBJECT(center_button), "released", (void *) justify_center, NULL); right_button = gtk_toggle_button_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), right_button, "justify right", "justify right"); gtk_widget_show(right_button); g_signal_connect(GTK_OBJECT(right_button), "released", (void *) justify_right, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); bordercombo=gtk_border_combo_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), bordercombo, "border", "border"); gtk_widget_set_size_request(GTK_COMBO_BUTTON(bordercombo)->button, 32, 32); gtk_widget_show(bordercombo); g_signal_connect(GTK_OBJECT(bordercombo), "changed", (void *)change_border, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); fgcolorcombo=gtk_color_combo_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), fgcolorcombo, "font color", "font color"); gtk_widget_show(fgcolorcombo); g_signal_connect(GTK_OBJECT(fgcolorcombo), "changed", (void *)change_fg, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); bgcolorcombo=gtk_color_combo_new(); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), bgcolorcombo, "background color", "background color"); gtk_widget_show(bgcolorcombo); g_signal_connect(GTK_OBJECT(bgcolorcombo), "changed", (void *)change_bg, NULL); gtk_toolbar_append_space(GTK_TOOLBAR(toolbar)); toggle_combo = gtk_toggle_combo_new(5, 5); gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), toggle_combo, "test", "test"); gtk_widget_set_size_request(GTK_COMBO_BUTTON(toggle_combo)->button, 32, 32); gtk_widget_show(toggle_combo); gtk_box_pack_start(GTK_BOX(main_vbox), toolbar, FALSE, TRUE, 0); gtk_widget_show(toolbar); status_box=gtk_hbox_new(FALSE, 1); gtk_container_set_border_width(GTK_CONTAINER(status_box),0); gtk_box_pack_start(GTK_BOX(main_vbox), status_box, FALSE, TRUE, 0); gtk_widget_show(status_box); location=gtk_label_new(""); gtk_widget_size_request(location, &request); gtk_widget_set_size_request(location, 160, request.height); gtk_box_pack_start(GTK_BOX(status_box), location, FALSE, TRUE, 0); gtk_widget_show(location); entry=gtk_entry_new(); gtk_box_pack_start(GTK_BOX(status_box), entry, TRUE, TRUE, 0); gtk_widget_show(entry); notebook=gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_BOTTOM); gtk_box_pack_start(GTK_BOX(main_vbox), notebook, TRUE, TRUE, 0); gtk_widget_show(notebook); for (i=0; ibutton), bg_pixmap); gtk_widget_show(bg_pixmap); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); pixmap=gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, font); fg_pixmap=gtk_image_new_from_pixmap(pixmap, mask); gtk_container_add(GTK_CONTAINER(GTK_COMBO_BUTTON(fgcolorcombo)->button), fg_pixmap); gtk_widget_show(fg_pixmap); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); gtk_widget_show(window); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkplotsegment.c0000644000076400001440000005255112603754176015355 00000000000000/* gtkplotsegment - segment plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotsegment * @short_description: * * FIXME:: need long description */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotsegment.h" #include "gtkpsfont.h" #define P_(string) string static void gtk_plot_segment_class_init (GtkPlotSegmentClass *klass); static void gtk_plot_segment_init (GtkPlotSegment *data); static void gtk_plot_segment_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_segment_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_segment_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_segment_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); static void gtk_plot_segment_draw_arrow (GtkPlotSegment *segment, gdouble x1, gdouble y1, gdouble x2, gdouble y2); extern gint roundint (gdouble x); enum { ARG_0, ARG_MASK, ARG_RELATIVE, ARG_CENTERED, ARG_STYLE, ARG_WIDTH, ARG_LENGTH, }; static GtkPlotDataClass *parent_class = NULL; GType gtk_plot_segment_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotSegment", sizeof (GtkPlotSegmentClass), (GClassInitFunc) gtk_plot_segment_class_init, sizeof (GtkPlotSegment), (GInstanceInitFunc) gtk_plot_segment_init, 0); } return data_type; } static void gtk_plot_segment_class_init (GtkPlotSegmentClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; gobject_class->set_property = gtk_plot_segment_set_property; gobject_class->get_property = gtk_plot_segment_get_property; /** * GtkPlotSegment:arrow_mask: * * **/ g_object_class_install_property (gobject_class, ARG_MASK, g_param_spec_int ("arrow_mask", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSegment:relative: * * **/ g_object_class_install_property (gobject_class, ARG_RELATIVE, g_param_spec_boolean ("relative", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSegment:centered: * * **/ g_object_class_install_property (gobject_class, ARG_CENTERED, g_param_spec_boolean ("centered", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSegment:style: * * **/ g_object_class_install_property (gobject_class, ARG_STYLE, g_param_spec_int ("style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSegment:width: * * **/ g_object_class_install_property (gobject_class, ARG_WIDTH, g_param_spec_int ("width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSegment:length: * * **/ g_object_class_install_property (gobject_class, ARG_LENGTH, g_param_spec_int ("length", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); data_class->draw_legend = gtk_plot_segment_draw_legend; data_class->draw_symbol = gtk_plot_segment_draw_symbol; } static void gtk_plot_segment_init (GtkPlotSegment *dataset) { GtkWidget *widget; GdkColor black, white; GdkColormap *colormap; GtkPlotArray *dim; widget = GTK_WIDGET(dataset); colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); GTK_PLOT_DATA(dataset)->symbol.symbol_style = GTK_PLOT_SYMBOL_EMPTY; GTK_PLOT_DATA(dataset)->symbol.color = black; GTK_PLOT_DATA(dataset)->line.line_style = GTK_PLOT_LINE_SOLID; GTK_PLOT_DATA(dataset)->line.line_width = 1; GTK_PLOT_DATA(dataset)->line.color = black; dataset->centered = TRUE; dataset->arrow_length = 8; dataset->arrow_width = 8; dataset->arrow_style = GTK_PLOT_SYMBOL_FILLED; dataset->arrow_mask = GTK_PLOT_ARROW_END; dataset->relative = TRUE; dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "x"); gtk_plot_array_set_label(dim, "X1"); gtk_plot_array_set_description(dim, "Origin X"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "y"); gtk_plot_array_set_label(dim, "Y1"); gtk_plot_array_set_description(dim, "Origin Y"); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "z"); gtk_plot_array_set_label(dim, "Z1"); gtk_plot_array_set_description(dim, "Origin Z"); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dx"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "X2"); gtk_plot_array_set_description(dim, "End X"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dy"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "Y2"); gtk_plot_array_set_description(dim, "End Y"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dz"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "Z2"); gtk_plot_array_set_description(dim, "End Z"); } static void gtk_plot_segment_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotSegment *data; data = GTK_PLOT_SEGMENT (object); switch (prop_id) { case ARG_MASK: data->arrow_mask = g_value_get_int(value); break; case ARG_RELATIVE: data->relative = g_value_get_boolean(value); break; case ARG_CENTERED: data->centered = g_value_get_boolean(value); break; case ARG_WIDTH: data->arrow_width = g_value_get_int(value); break; case ARG_LENGTH: data->arrow_length = g_value_get_int(value); break; case ARG_STYLE: data->arrow_style = g_value_get_int(value); break; } } static void gtk_plot_segment_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotSegment *data; data = GTK_PLOT_SEGMENT (object); switch (prop_id) { case ARG_MASK: g_value_set_int(value, data->arrow_mask); break; case ARG_RELATIVE: g_value_set_boolean(value, data->relative); break; case ARG_CENTERED: g_value_set_boolean(value, data->centered); break; case ARG_WIDTH: g_value_set_int(value, data->arrow_width); break; case ARG_LENGTH: g_value_set_int(value, data->arrow_length); break; case ARG_STYLE: g_value_set_int(value, data->arrow_style); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } GtkWidget* gtk_plot_segment_new () { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_segment_get_type (), NULL); return (widget); } static void gtk_plot_segment_draw_symbol(GtkPlotData *dataset, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot; GtkPlotSegment *segment = NULL; GdkRectangle area, clip_area; gdouble pz; gdouble m; gdouble x1 = 0.0, y1 = 0.0, x2 = 0.0, y2=0.0; GtkAllocation allocation; g_return_if_fail(GTK_IS_PLOT_SEGMENT(dataset)); segment = GTK_PLOT_SEGMENT(dataset); g_return_if_fail(dataset->plot != NULL); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(dataset->plot))); plot = dataset->plot; m = plot->magnification; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; clip_area.x = area.x + roundint(plot->x * area.width); clip_area.y = area.y + roundint(plot->y * area.height); clip_area.width = roundint(plot->width * area.width); clip_area.height = roundint(plot->height * area.height); /* gtk_plot_pc_clip(plot->pc, &clip_area); */ if(GTK_IS_PLOT3D(plot)){ if(segment->relative){ gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &x1, &y1, &pz); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x + dx, x + dy, x + dz, &x2, &y2, &pz); } else { gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &x1, &y1, &pz); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), dx, dy, dz, &x2, &y2, &pz); } }else{ if(plot->clip_data && (x < plot->xmin || x > plot->xmax || y ymin || y > plot->ymax)) return; if(segment->relative){ gtk_plot_get_pixel(plot, x, y, &x1, &y1); gtk_plot_get_pixel(plot, x + dx, y + dy, &x2, &y2); } else { gtk_plot_get_pixel(plot, x, y, &x1, &y1); gtk_plot_get_pixel(plot, dx, dy, &x2, &y2); } gtk_plot_segment_draw_arrow (segment, x1, y1, x2, y2); gtk_plot_data_draw_symbol(dataset, x1, y1); } /* gtk_plot_pc_clip(plot->pc, NULL); */ } static void gtk_plot_segment_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotSegment *segment; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; gint line_width; GtkAllocation allocation; segment = GTK_PLOT_SEGMENT(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(data->plot))); plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); if(data->show_legend){ gdouble vx; line_width = plot->legends_line_width; legend.x = (gdouble)(area.x + x + roundint(4 + line_width * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); if(segment->centered) vx = x + roundint(line_width / 2.0 * m); else{ vx = x + roundint(m * (data->symbol.size + data->symbol.border.line_width) / 2.0); line_width -= roundint(m * (data->symbol.size + data->symbol.border.line_width) / 2.0); } gtk_plot_segment_draw_arrow(segment, area.x + vx, area.y + y + (lascent + ldescent) / 2, area.x + vx + roundint(line_width * m), area.y + y + (lascent + ldescent) / 2); gtk_plot_data_draw_symbol(data, area.x + vx, area.y + y + (lascent + ldescent) / 2); y += 2 * lheight; } else y += lheight; } static void gtk_plot_segment_draw_arrow(GtkPlotSegment *segment, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkPlot *plot; GtkPlotData *data; GtkPlotPoint arrow[3]; gdouble xm, ym; gdouble width, height; gdouble arrow_width; gdouble line_width; gdouble angle; gdouble length; gdouble m; data = GTK_PLOT_DATA(segment); plot = data->plot; m = plot->magnification; width = fabs(x2 - x1); height = fabs(y2 - y1); if(width == 0 && height == 0) return; if(width != 0) angle = atan2((y2 - y1), (x2 - x1)); else angle = asin((y2 - y1)/height); length = (y2 - y1)*(y2 - y1) + (x2 - x1)*(x2 - x1); if(length > 0.0) length = sqrt(length); arrow_width = segment->arrow_width; line_width = data->symbol.border.line_width; gtk_plot_pc_set_color(plot->pc, &data->symbol.color); gtk_plot_pc_set_lineattr (plot->pc, line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); if(segment->centered && width != 0){ x1 -= cos(angle) * length / 2.0; x2 -= cos(angle) * length / 2.0; } if(segment->centered && height != 0){ y1 -= sin(angle) * length / 2.0; y2 -= sin(angle) * length / 2.0; } if(segment->arrow_style == GTK_PLOT_SYMBOL_EMPTY) gtk_plot_pc_draw_line(plot->pc, x1, y1, x2, y2); else gtk_plot_pc_draw_line(plot->pc, x1, y1, x2 - segment->arrow_length * m * cos(angle) / 2., y2 - segment->arrow_length * m * sin(angle) / 2.); if(segment->arrow_mask & GTK_PLOT_ARROW_ORIGIN){ arrow[1].x = x1; arrow[1].y = y1; xm = x1 + cos(angle) * segment->arrow_length * m; ym = y1 + sin(angle) * segment->arrow_length * m; arrow[0].x = xm + sin(angle)* arrow_width * m / 2.0; arrow[0].y = ym - cos(angle)* arrow_width * m / 2.0; arrow[2].x = xm - sin(angle)* arrow_width * m / 2.0; arrow[2].y = ym + cos(angle)* arrow_width * m / 2.0; switch(segment->arrow_style){ case GTK_PLOT_SYMBOL_EMPTY: gtk_plot_pc_draw_lines (plot->pc, arrow, 3); break; case GTK_PLOT_SYMBOL_OPAQUE: gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_polygon (plot->pc, TRUE, arrow, 3); gtk_plot_pc_set_color(plot->pc, &data->symbol.color); gtk_plot_pc_draw_polygon (plot->pc, FALSE, arrow, 3); break; case GTK_PLOT_SYMBOL_FILLED: gtk_plot_pc_draw_polygon (plot->pc, TRUE, arrow, 3); } } if(segment->arrow_mask & GTK_PLOT_ARROW_END){ arrow[1].x = x2; arrow[1].y = y2; xm = x2 - cos(angle) * segment->arrow_length * m; ym = y2 - sin(angle) * segment->arrow_length * m; arrow[0].x = xm - sin(angle)* arrow_width * m / 2.0; arrow[0].y = ym + cos(angle)* arrow_width * m / 2.0; arrow[2].x = xm + sin(angle)* arrow_width * m / 2.0; arrow[2].y = ym - cos(angle)* arrow_width * m / 2.0; switch(segment->arrow_style){ case GTK_PLOT_SYMBOL_EMPTY: gtk_plot_pc_draw_lines (plot->pc, arrow, 3); break; case GTK_PLOT_SYMBOL_OPAQUE: gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_polygon (plot->pc, TRUE, arrow, 3); gtk_plot_pc_set_color(plot->pc, &data->symbol.color); gtk_plot_pc_draw_polygon (plot->pc, FALSE, arrow, 3); break; case GTK_PLOT_SYMBOL_FILLED: gtk_plot_pc_draw_polygon (plot->pc, TRUE, arrow, 3); } } } /** * gtk_plot_segment_set_arrow: * @segment: a #GtkPlotSegment widget. * @arrow_length: * @arrow_width: * @arrow_style: * * */ void gtk_plot_segment_set_arrow (GtkPlotSegment *segment, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style) { segment->arrow_length = arrow_length; segment->arrow_width = arrow_width; segment->arrow_style = arrow_style; } /** * gtk_plot_segment_get_arrow: * @segment: a #GtkPlotSegment widget. * @arrow_length: * @arrow_width: * @arrow_style: * * */ void gtk_plot_segment_get_arrow (GtkPlotSegment *segment, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style) { *arrow_length = segment->arrow_length; *arrow_width = segment->arrow_width; *arrow_style = segment->arrow_style; } /** * gtk_plot_segment_relative: * @segment: a #GtkPlotSegment widget. * * * * Return value: */ gboolean gtk_plot_segment_relative (GtkPlotSegment *segment) { return(segment->relative); } /** * gtk_plot_segment_set_relative: * @segment: a #GtkPlotSegment widget. * @set: * * */ void gtk_plot_segment_set_relative (GtkPlotSegment *segment, gboolean set) { segment->relative = set; } /** * gtk_plot_segment_center: * @segment: a #GtkPlotSegment widget. * @center: * * */ void gtk_plot_segment_center (GtkPlotSegment *segment, gboolean center) { segment->centered = center; } /** * gtk_plot_segment_is_centered: * @segment: a #GtkPlotSegment widget. * * * * Return value: */ gboolean gtk_plot_segment_is_centered (GtkPlotSegment *segment) { return(segment->centered); } /** * gtk_plot_segment_set_arrow_mask: * @segment: a #GtkPlotSegment widget. * @mask: * * */ void gtk_plot_segment_set_arrow_mask(GtkPlotSegment *segment, GtkPlotArrow mask) { segment->arrow_mask = mask; } /** * gtk_plot_segment_get_arrow_mask: * @segment: a #GtkPlotSegment widget. * * * * Return value: */ guint gtk_plot_segment_get_arrow_mask(GtkPlotSegment *segment) { return segment->arrow_mask; } gtkextra-3.2.0/gtkextra/gtkbordercombo.c0000644000076400001440000003256312603754176015312 00000000000000/* gtkbordercombo - border_combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkbordercombo * @short_description: A border combo widget * * It is a #GtkComboBox subclass with a variety of border styles in the popdown window arranged in a table of togglebuttons. */ /** * GtkBorderCombo: * * The GtkBorderCombo struct contains only private data. * It should only be accessed through the functions described below. */ #include #include #include #include "gtkcombobutton.h" #include "gtkbordercombo.h" #include "gtkextra-marshal.h" /* SIGNALS */ enum { CHANGED, LAST_SIGNAL }; static gint border_combo_signals[LAST_SIGNAL] = {0}; static char *xpm_border[]={ "15 15 2 1", " c None", "X c #000000000000", " ", " X X X X X X X ", " ", " X X X ", " ", " X X X ", " ", " X X X X X X X ", " ", " X X X ", " ", " X X X ", " ", " X X X X X X X ", " "}; static char *full =" XXXXXXXXXXXXX "; static char *dotted =" X X X X X X X "; static char *side111=" X X X "; static char *side000=" "; static char *side101=" X X "; static char *side010=" X "; static char *side100=" X "; static char *side001=" X "; static void gtk_border_combo_class_init (GtkBorderComboClass *klass); static void gtk_border_combo_init (GtkBorderCombo *border_combo); static void gtk_border_combo_destroy (GtkObject *border_combo); static void gtk_border_combo_realize (GtkWidget *widget); static GtkWidget* create_border_pixmap (GtkBorderCombo *border_combo, gchar *border[18]); static GtkComboButtonClass *parent_class = NULL; static void gtk_border_combo_class_init (GtkBorderComboClass * klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; parent_class = g_type_class_ref (gtk_hbox_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; object_class->destroy = gtk_border_combo_destroy; widget_class->realize = gtk_border_combo_realize; /** * GtkBorderCombo::changed: * @border_combo: the #GtkBorderCombo object that received the signal * @selection: the number of selected item * * Emmited when the GtkBorderCombo's state is changed */ border_combo_signals[CHANGED]=g_signal_new("changed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(GtkBorderComboClass, changed), NULL, NULL, gtkextra_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); klass->changed = NULL; } static void gtk_border_combo_destroy (GtkObject * border_combo) { gint i,j; GtkBorderCombo *combo; combo=GTK_BORDER_COMBO(border_combo); if (combo->button) { for(i=0; inrows; i++) for(j=0; jncols; j++){ if(combo->button[i][j]){ gtk_widget_destroy(combo->button[i][j]); combo->button[i][j] = NULL; } } } if(GTK_BORDER_COMBO(border_combo)->table){ gtk_widget_destroy (GTK_BORDER_COMBO(border_combo)->table); GTK_BORDER_COMBO(border_combo)->table = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (border_combo); } static void gtk_border_combo_update (GtkWidget * widget, GtkBorderCombo * border_combo) { gint i,j; gint focus_row = -1, focus_col = -1; gint new_row = -1, new_col = -1; gint new_selection=FALSE; gint row,column; GdkPixmap *window; GdkPixmap *button; GtkImage *image; GdkBitmap *mask; row=border_combo->row; column=border_combo->column; printf("RRR gtk_border_combo_update\n"); for(i=0 ; inrows; i++) for(j=0; jncols; j++){ if(gtk_widget_has_focus(border_combo->button[i][j])){ focus_row=i; focus_col=j; } if(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ( border_combo->button[i][j]))) { if(i != row || j != column){ new_selection=TRUE; new_row=i; new_col=j; } } } if(!new_selection && focus_row >= 0 && focus_col >= 0){ if(focus_row != row || focus_col != column){ new_selection = TRUE; new_row=focus_row; new_col=focus_col; } } if(new_selection){ if(row >= 0 && column >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(border_combo->button[row][column]), FALSE); gtk_widget_queue_draw(border_combo->button[row][column]); } border_combo->row=new_row; border_combo->column=new_col; image = GTK_IMAGE( gtk_bin_get_child(GTK_BIN( GTK_COMBO_BUTTON(border_combo)->button))); gtk_image_get_pixmap(image, &window, &mask); gtk_image_get_pixmap ( GTK_IMAGE(gtk_bin_get_child(GTK_BIN(border_combo->button[new_row][new_col]))), &button, &mask); gdk_draw_drawable(window, gtk_widget_get_style(widget)->fg_gc[GTK_STATE_NORMAL], button, 0,0, 0,0,16,16); gtk_widget_queue_draw(GTK_COMBO_BUTTON(border_combo)->button); g_signal_emit (GTK_OBJECT(border_combo), border_combo_signals[CHANGED], 0, new_row * border_combo->ncols + new_col); } if(!new_selection && row >= 0 && column >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(border_combo->button[row][column]), TRUE); gtk_widget_queue_draw(border_combo->button[row][column]); g_signal_emit (GTK_OBJECT(border_combo), border_combo_signals[CHANGED], 0, row * border_combo->ncols + column); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(GTK_COMBO_BUTTON(border_combo)->arrow), FALSE); gtk_grab_remove(GTK_COMBO_BUTTON(border_combo)->popwin); gdk_pointer_ungrab(GDK_CURRENT_TIME); gtk_widget_hide(GTK_COMBO_BUTTON(border_combo)->popwin); return; } static void gtk_border_combo_init (GtkBorderCombo * border_combo) { GtkWidget *widget; widget=GTK_WIDGET(border_combo); border_combo->nrows = 3; border_combo->ncols = 4; border_combo->row = -1; border_combo->column = -1; } static GtkWidget * create_border_pixmap(GtkBorderCombo *border_combo, gchar *border[18]) { GtkWidget *widget; GtkWidget *pixmap; GdkPixmap *border_pixmap; widget=GTK_WIDGET(border_combo); border_pixmap=gdk_pixmap_create_from_xpm_d( gtk_widget_get_window(widget), NULL, &(gtk_widget_get_style(widget)->bg[GTK_STATE_NORMAL]), border); pixmap=gtk_image_new_from_pixmap(border_pixmap, NULL); return pixmap; } GType gtk_border_combo_get_type () { static GType border_combo_type = 0; if (!border_combo_type) { border_combo_type = g_type_register_static_simple( gtk_combo_button_get_type (), "GtkBorderCombo", sizeof (GtkBorderComboClass), (GClassInitFunc) gtk_border_combo_class_init, sizeof (GtkBorderCombo), (GInstanceInitFunc) gtk_border_combo_init, 0); } return border_combo_type; } GtkWidget * gtk_border_combo_new () { return(gtk_widget_new(gtk_border_combo_get_type (), NULL)); } static void gtk_border_combo_realize(GtkWidget *widget) { GtkComboButton *combo; GtkBorderCombo *border_combo; GtkWidget *pixmap; GtkRequisition requisition; GdkPixmap *border_pixmap; gint i,j; gchar *border[18]; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_BORDER_COMBO (widget)); GTK_WIDGET_CLASS (parent_class)->realize (widget); combo=GTK_COMBO_BUTTON(widget); border_combo=GTK_BORDER_COMBO(widget); border_combo->table = gtk_table_new (border_combo->nrows, border_combo->ncols, TRUE); border_combo->button = (GtkWidget ***)g_malloc(border_combo->nrows*sizeof(GtkWidget **)); for(i = 0; i < border_combo->nrows; i++){ border_combo->button[i] = (GtkWidget **)g_malloc(border_combo->ncols*sizeof(GtkWidget *)); for(j = 0; j < border_combo->ncols; j++){ border_combo->button[i][j] = gtk_toggle_button_new(); gtk_button_set_relief(GTK_BUTTON(border_combo->button[i][j]), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE(border_combo->table), border_combo->button[i][j], j, j+1, i, i+1, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_set_size_request(border_combo->button[i][j], 24, 24); gtk_widget_show(border_combo->button[i][j]); g_signal_connect (GTK_OBJECT (border_combo->button[i][j]), "toggled", (void *) gtk_border_combo_update, border_combo); } } gtk_container_add(GTK_CONTAINER(GTK_COMBO_BUTTON(border_combo)->frame), border_combo->table); gtk_widget_show(border_combo->table); if(!gtk_bin_get_child(GTK_BIN(combo->button)) && gtk_widget_get_window(widget)){ border_pixmap=gdk_pixmap_create_from_xpm_d( gtk_widget_get_window(widget), NULL, &(gtk_widget_get_style(combo->button)->bg[GTK_STATE_NORMAL]), xpm_border); pixmap = gtk_image_new_from_pixmap(border_pixmap, NULL); gtk_container_add(GTK_CONTAINER(combo->button), pixmap); gtk_widget_show(pixmap); } GTK_WIDGET_CLASS (parent_class)->size_request (widget, &requisition); /* EMPTY */ for(i=0; i<18; i++) border[i]=xpm_border[i]; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[0][0]), pixmap); gtk_widget_show(pixmap); /* TOP */ border[4]=full; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[0][1]), pixmap); gtk_widget_show(pixmap); /* BOTTOM */ border[4]=dotted; border[16]=full; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[0][2]), pixmap); gtk_widget_show(pixmap); /* RIGHT */ border[16]=dotted; for(i=5; i<16; i=i+2) border[i]=side001; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[0][3]), pixmap); gtk_widget_show(pixmap); /* LEFT */ for(i=5; i<16; i=i+2) border[i]=side100; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[1][0]), pixmap); gtk_widget_show(pixmap); /* v101 */ for(i=5; i<16; i=i+2) border[i]=side101; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[1][1]), pixmap); gtk_widget_show(pixmap); /* h101 */ for(i=5; i<16; i=i+2) border[i]=side000; border[4]=full; border[16]=full; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[1][2]), pixmap); gtk_widget_show(pixmap); /* v111 */ border[4]=dotted; border[16]=dotted; for(i=5; i<16; i=i+2) border[i]=side111; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[1][3]), pixmap); gtk_widget_show(pixmap); /* h111 */ for(i=5; i<16; i=i+2) border[i]=side000; border[4]=full; border[16]=full; border[10]=full; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[2][0]), pixmap); gtk_widget_show(pixmap); /* CROSS */ border[4]=dotted; border[16]=dotted; for(i=5; i<16; i=i+2) border[i]=side010; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[2][1]), pixmap); gtk_widget_show(pixmap); /* sides */ for(i=5; i<16; i=i+2) border[i]=side101; border[4]=full; border[16]=full; border[10]=dotted; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[2][2]), pixmap); gtk_widget_show(pixmap); /* FULL */ for(i=5; i<16; i=i+2) border[i]=side111; border[4]=full; border[10]=full; border[16]=full; pixmap=create_border_pixmap(border_combo, border); gtk_container_add(GTK_CONTAINER(border_combo->button[2][3]), pixmap); gtk_widget_show(pixmap); g_signal_connect (GTK_OBJECT (combo->button), "clicked", (void*) gtk_border_combo_update, border_combo); } gtkextra-3.2.0/gtkextra/testcontour.c0000644000076400001440000002623712603754176014701 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotsurface.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotcsurface.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; GtkPlot3D *plot3d; gint nlayers = 0; GtkWidget *active_plot; static void activate_plot(GtkWidget *widget, gpointer data); void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gdouble y, gboolean *err) { gdouble z; *err = FALSE; z = cos(((x-0.5)*(x-0.5) + (y-0.5)*(y-0.5))*24) / 3. + .5; return z; } gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } widget_list = plots; active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); } return TRUE; } static void activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } } GtkWidget * new_layer(GtkWidget *canvas, GType type) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*size, 0); gtk_widget_show(buttons[nlayers-1]); if(type == G_TYPE_PLOT3D) plots[nlayers-1] = gtk_plot3d_new_with_size(NULL, .50, .50); else plots[nlayers-1] = gtk_plot_new_with_size(NULL, .40, .40); gtk_widget_show(plots[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", G_CALLBACK(activate_plot), NULL); return plots[nlayers-1]; } void rotate_x(GtkWidget *button, gpointer data) { if(!GTK_IS_PLOT3D(active_plot)) return; gtk_plot3d_rotate_x(GTK_PLOT3D(active_plot), 10.); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(data)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(data)); } void rotate_y(GtkWidget *button, gpointer data) { if(!GTK_IS_PLOT3D(active_plot)) return; gtk_plot3d_rotate_y(GTK_PLOT3D(active_plot), 10.); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(data)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(data)); } void rotate_z(GtkWidget *button, gpointer data) { if(!GTK_IS_PLOT3D(active_plot)) return; gtk_plot3d_rotate_z(GTK_PLOT3D(active_plot), 10.); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(data)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(data)); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; GtkWidget *button; GtkWidget *surface; GtkPlotCanvasChild *child; gint page_width, page_height; gfloat scale = 1.; gint n; static gdouble *x, *y, *z; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlot3D Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); plot3d = GTK_PLOT3D(new_layer(canvas, G_TYPE_PLOT3D)); child = gtk_plot_canvas_plot_new(GTK_PLOT(plot3d)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .16, .05, .65, .45); gtk_widget_show(GTK_WIDGET(plot3d)); x = (gdouble *)g_malloc(1600 * sizeof(gdouble)); y = (gdouble *)g_malloc(1600 * sizeof(gdouble)); z = (gdouble *)g_malloc(1600 * sizeof(gdouble)); n = 0; /* for(nx = 0; nx < 40; nx++) for(ny = 0; ny < 40; ny++) { x[n]=0.025*(gdouble)nx; y[n]=0.025*(gdouble)ny; z[n]=cos(((x[n]-0.5)*(x[n]-0.5) + (y[n]-0.5)*(y[n]-0.5))*24) / 4. + .5; n++; } surface = gtk_plot_csurface_new(); gtk_plot_surface_set_points(GTK_PLOT_SURFACE(surface), x, y, z, NULL, NULL, NULL, 40, 40); gtk_plot_data_set_legend(GTK_PLOT_DATA(surface), "cos ((r-r\\s0\\N)\\S2\\N)"); */ /* for(nx = 0; nx < 10; nx++) for(ny = 0; ny < 10; ny++) { x[n]=(gdouble)0.1*(gdouble)nx; y[n]=(gdouble)0.1*(gdouble)ny; z[n]=(x[n]-0.5)*(x[n]-0.5) + (y[n]-0.5)*(y[n]-0.5); z[n]=x[n]*x[n] + y[n]*y[n]; n++; } surface = gtk_plot_csurface_new(); gtk_plot_surface_set_points(GTK_PLOT_SURFACE(surface), x, y, z, NULL, NULL, NULL, 10, 10); */ gtk_plot3d_set_minor_ticks(GTK_PLOT3D(plot3d), GTK_PLOT_AXIS_X, 3); gtk_plot3d_set_minor_ticks(GTK_PLOT3D(plot3d), GTK_PLOT_AXIS_Y, 3); gtk_plot3d_minor_grids_set_visible(GTK_PLOT3D(plot3d), FALSE, FALSE, FALSE); surface = gtk_plot_csurface_new_function((GtkPlotFunc3D) function); gtk_plot_surface_set_xstep(GTK_PLOT_SURFACE(surface), .05); gtk_plot_surface_set_ystep(GTK_PLOT_SURFACE(surface), .05); gtk_plot_data_set_legend(GTK_PLOT_DATA(surface), "cos ((r-r\\s0\\N)\\S2\\N)"); gtk_plot_add_data(GTK_PLOT(plot3d), GTK_PLOT_DATA(surface)); gtk_widget_show(surface); gtk_plot_data_set_gradient(GTK_PLOT_DATA(surface), .2, .8, 6, 0); gtk_plot_data_set_gradient(GTK_PLOT_DATA(surface), 0.00001, 0.99999, 10, 0); /* gtk_plot_surface_set_transparent(GTK_PLOT_SURFACE(surface), TRUE); */ gtk_plot_surface_set_transparent(GTK_PLOT_SURFACE(surface), FALSE); gtk_plot_csurface_set_projection(GTK_PLOT_CSURFACE(surface), GTK_PLOT_PROJECT_EMPTY); GTK_PLOT_CSURFACE(surface)->levels_line.line_style = GTK_PLOT_LINE_NONE; GTK_PLOT_CSURFACE(surface)->sublevels_line.line_style = GTK_PLOT_LINE_NONE; /*******************/ active_plot = new_layer(canvas, G_TYPE_PLOT); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .26, .54, .65, .90); gtk_plot_axis_set_minor_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_LEFT), 1); gtk_plot_axis_set_minor_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_BOTTOM), 1); surface = gtk_plot_csurface_new_function((GtkPlotFunc3D) function); gtk_plot_surface_set_xstep(GTK_PLOT_SURFACE(surface), .050); gtk_plot_surface_set_ystep(GTK_PLOT_SURFACE(surface), .050); gtk_plot_data_set_legend(GTK_PLOT_DATA(surface), "cos ((r-r\\s0\\N)\\S2\\N)"); gtk_plot_add_data(GTK_PLOT(active_plot), GTK_PLOT_DATA(surface)); gtk_widget_show(surface); gtk_plot_data_set_gradient(GTK_PLOT_DATA(surface), .2, .8, 3, 0); gtk_plot_surface_set_grid_visible(GTK_PLOT_SURFACE(surface), FALSE); gtk_plot_surface_set_transparent(GTK_PLOT_SURFACE(surface), TRUE); gtk_plot_csurface_set_projection(GTK_PLOT_CSURFACE(surface), GTK_PLOT_PROJECT_FULL); /* gtk_plot_csurface_set_lines_visible(GTK_PLOT_CSURFACE(surface), FALSE); */ button = gtk_button_new_with_label("Rotate X"); gtk_fixed_put(GTK_FIXED(canvas), button, 80, 0); gtk_widget_show(button); g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(rotate_x), canvas); button = gtk_button_new_with_label("Rotate Y"); gtk_fixed_put(GTK_FIXED(canvas), button, 160, 0); gtk_widget_show(button); g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(rotate_y), canvas); button = gtk_button_new_with_label("Rotate Z"); gtk_fixed_put(GTK_FIXED(canvas), button, 240, 0); gtk_widget_show(button); g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(rotate_z), canvas); g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "democsurface.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkextrafeatures.h.in0000644000076400001440000000362012603754176016301 00000000000000/* gtkextra - set of widgets for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef GTK_EXTRA_FEATURES_H #define GTK_EXTRA_FEATURES_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* GtkExtra version. */ #define GTKEXTRA_MAJOR_VERSION (@GTK_EXTRA_MAJOR_VERSION@) #define GTKEXTRA_MINOR_VERSION (@GTK_EXTRA_MINOR_VERSION@) #define GTKEXTRA_MICRO_VERSION (@GTK_EXTRA_MICRO_VERSION@) #define GTKEXTRA_CHECK_VERSION(major,minor,micro) \ (GTKEXTRA_MAJOR_VERSION > (major) || \ (GTKEXTRA_MAJOR_VERSION == (major) && GTKEXTRA_MINOR_VERSION > (minor)) || \ (GTKEXTRA_MAJOR_VERSION == (major) && GTKEXTRA_MINOR_VERSION == (minor) && \ GTKEXTRA_MICRO_VERSION >= (micro))) extern const guint gtkextra_major_version; extern const guint gtkextra_minor_version; extern const guint gtkextra_micro_version; extern const guint gtkextra_binary_age; extern const guint gtkextra_interface_age; gchar* gtkextra_check_version (guint required_major, guint required_minor, guint required_micro); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* GTK_EXTRA_FEATURES_H */ gtkextra-3.2.0/gtkextra/gtkplotps.h0000644000076400001440000001007712603754176014337 00000000000000/* gtkplotps - postscript driver * Copyright 1999-2001 Adrian E. Feiguin * * Some few lines of code borrowed from * DiaCanvas -- a technical canvas widget * Copyright (C) 1999 Arjan Molenaar * Dia -- an diagram creation/manipulation program * Copyright (C) 1998 Alexander Larsson * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_PS_H__ #define __GTK_PLOT_PS_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_PLOT_PS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_ps_get_type (), GtkPlotPS) #define G_TYPE_PLOT_PS (gtk_plot_ps_get_type ()) #define GTK_PLOT_PS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_ps_get_type(), GtkPlotPSClass) #define GTK_IS_PLOT_PS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_ps_get_type ()) typedef struct _GtkPlotPS GtkPlotPS; typedef struct _GtkPlotPSClass GtkPlotPSClass; struct _GtkPlotPS { GtkPlotPC pc; FILE *psfile; gchar *psname; gint orientation; gint epsflag; gint units; gint page_size; gint width, height; gint page_width; gint page_height; gdouble scalex, scaley; gboolean gsaved; }; struct _GtkPlotPSClass { GtkPlotPCClass parent_class; }; GType gtk_plot_ps_get_type (void); GtkObject *gtk_plot_ps_new (const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley); GtkObject *gtk_plot_ps_new_with_size (const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley); void gtk_plot_ps_construct (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley); void gtk_plot_ps_construct_with_size (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley); void gtk_plot_ps_set_size (GtkPlotPS *ps, gint units, gdouble width, gdouble height); void gtk_plot_ps_set_scale (GtkPlotPS *ps, gdouble scalex, gdouble scaley); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_PS_H__ */ gtkextra-3.2.0/gtkextra/gtkplotpolar.c0000644000076400001440000007501312603754176015026 00000000000000/* gtkplotpolar - polar plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotpolar * @short_description: * * FIXME:: Need long description. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotpolar.h" #include "gtkpsfont.h" #include "gtkplotpc.h" #define P_(string) string #ifndef PI #define PI 3.14159265358979323846 #endif static void gtk_plot_polar_class_init (GtkPlotPolarClass *klass); static void gtk_plot_polar_init (GtkPlotPolar *plot); static void gtk_plot_polar_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_polar_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_polar_real_paint (GtkWidget *widget); static void gtk_plot_polar_draw_grids (GtkPlotPolar *plot); static void gtk_plot_polar_draw_axis (GtkPlotPolar *plot, GtkPlotAxis *axis, GtkPlotVector tick_direction); static void gtk_plot_polar_draw_circle (GtkPlotPolar *polar); static void gtk_plot_polar_draw_labels (GtkPlotPolar *plot, GtkPlotAxis *axis, GtkPlotVector tick_direction ); static void gtk_plot_polar_real_get_pixel (GtkWidget *widget, gdouble x, gdouble y, gdouble *px, gdouble *py); static void gtk_plot_polar_real_get_point (GtkWidget *widget, gint px, gint py, gdouble *x, gdouble *y); extern gint roundint (gdouble x); static GtkPlotClass *parent_class = NULL; enum { ARG_0, ARG_ROTATION, }; GType gtk_plot_polar_get_type (void) { static GType plot_type = 0; if (!plot_type) { plot_type = g_type_register_static_simple ( gtk_plot_get_type(), "GtkPlotPolar", sizeof (GtkPlotPolarClass), (GClassInitFunc) gtk_plot_polar_class_init, sizeof (GtkPlotPolar), (GInstanceInitFunc) gtk_plot_polar_init, 0); } return plot_type; } static void gtk_plot_polar_class_init (GtkPlotPolarClass *klass) { GObjectClass *gobject_class; GtkWidgetClass *widget_class; GtkPlotClass *plot_class; parent_class = g_type_class_ref (gtk_plot_get_type ()); gobject_class = G_OBJECT_CLASS(klass); widget_class = (GtkWidgetClass *) klass; plot_class = (GtkPlotClass *) klass; gobject_class->set_property = gtk_plot_polar_set_property; gobject_class->get_property = gtk_plot_polar_get_property; plot_class->plot_paint = gtk_plot_polar_real_paint; plot_class->get_point = gtk_plot_polar_real_get_point; plot_class->get_pixel = gtk_plot_polar_real_get_pixel; /** * GtkPlotPolar:rotation: * * **/ g_object_class_install_property (gobject_class, ARG_ROTATION, g_param_spec_double ("rotation", P_("Angle"), P_("Rotation Angle"), -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_polar_init (GtkPlotPolar *plot) { GTK_PLOT(plot)->legends_attr.transparent = FALSE; GTK_PLOT(plot)->xmin = 0; GTK_PLOT(plot)->xmax = 360; plot->r = GTK_PLOT(plot)->left; plot->angle = GTK_PLOT(plot)->bottom; GTK_PLOT(plot)->bottom->ticks.min = 0.0; GTK_PLOT(plot)->bottom->ticks.max = 360.0; GTK_PLOT(plot)->bottom->ticks.step = 30.; GTK_PLOT(plot)->top->ticks.min = 0.0; GTK_PLOT(plot)->top->ticks.max = 360.0; GTK_PLOT(plot)->top->ticks.step = 30.; GTK_PLOT(plot)->bottom->labels_offset = 15.; GTK_PLOT(plot)->bottom->label_precision = 0; GTK_PLOT(plot)->ymin = 0.2; GTK_PLOT(plot)->left->ticks.min = 0.2; GTK_PLOT(plot)->left->ticks.step = 0.2; GTK_PLOT(plot)->right->ticks.min = 0.2; GTK_PLOT(plot)->right->ticks.step = 0.2; GTK_PLOT(plot)->left->title.angle = 0.; gtk_plot_axis_set_title(GTK_PLOT(plot)->left, "R"); GTK_PLOT(plot)->top->is_visible = FALSE; GTK_PLOT(plot)->bottom->show_major_grid = TRUE; GTK_PLOT(plot)->bottom->show_minor_grid = TRUE; GTK_PLOT(plot)->left->show_major_grid = TRUE; GTK_PLOT(plot)->left->show_minor_grid = TRUE; plot->rotation = 0.0; } static void gtk_plot_polar_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotPolar *plot; plot = GTK_PLOT_POLAR (object); switch(prop_id){ case ARG_ROTATION: g_value_set_double(value, plot->rotation); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_plot_polar_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotPolar *plot; plot = GTK_PLOT_POLAR (object); switch(prop_id){ case ARG_ROTATION: plot->rotation = g_value_get_double(value); break; } } /* static void gtk_plot_polar_draw (GtkWidget *widget, GdkRectangle *area) { gtk_plot_paint(GTK_PLOT(widget)); gtk_plot_refresh (GTK_PLOT(widget), area); } */ static void gtk_plot_polar_real_paint (GtkWidget *widget) { GtkPlot *plot; GtkPlotText *child_text; GtkStyle *style; GdkPixmap *pixmap; GList *dataset; GList *text; gint width, height; gint xoffset, yoffset ; gdouble min; if(!gtk_widget_get_visible(widget)) return; plot = GTK_PLOT(widget); xoffset = plot->internal_allocation.x; yoffset = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; style = gtk_widget_get_style(widget); pixmap = plot->drawable; gtk_plot_pc_gsave(plot->pc); gtk_plot_pc_set_color(plot->pc, &plot->background); if(!gtk_plot_is_transparent(GTK_PLOT(plot))) gtk_plot_pc_draw_rectangle (plot->pc, TRUE, xoffset, yoffset, width , height); /* draw frame to guide the eyes*/ /* gdk_draw_rectangle (pixmap, gc, FALSE, xoffset, yoffset, width , height); */ /* draw the ticks & grid lines */ min = plot->left->ticks.min; plot->left->ticks.min = 0.0; gtk_plot_axis_ticks_recalc(plot->left); gtk_plot_axis_ticks_recalc(plot->bottom); plot->left->ticks.min = min; if(plot->left->is_visible) { GtkPlotVector tick_direction; tick_direction.x = 1.; tick_direction.y = 0.; plot->left->origin.x = (gfloat)width*plot->left_align; plot->left->origin.y = height; gtk_plot_polar_draw_axis(GTK_PLOT_POLAR(plot), plot->left, tick_direction); gtk_plot_polar_draw_labels(GTK_PLOT_POLAR(plot), plot->left, tick_direction); } if(plot->top->is_visible) { GtkPlotVector tick_direction; tick_direction.x = 0.; tick_direction.y = 1.; plot->left->direction.x = 1; plot->left->direction.y = 0; plot->left->origin.x = 0; plot->left->origin.y = (gfloat)height*plot->left_align; gtk_plot_polar_draw_axis(GTK_PLOT_POLAR(plot), plot->left, tick_direction); gtk_plot_polar_draw_labels(GTK_PLOT_POLAR(plot), plot->left, tick_direction); plot->left->direction.x = 0; plot->left->direction.y = -1; } if(plot->bottom->is_visible) { gtk_plot_polar_draw_circle(GTK_PLOT_POLAR(plot)); } gtk_plot_polar_draw_grids(GTK_PLOT_POLAR(plot)); dataset = plot->data_sets; while(dataset) { GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(dataset->data)))->draw_data(GTK_PLOT_DATA(dataset->data)); dataset = dataset->next; } text = plot->text; while(text) { child_text = (GtkPlotText *) text->data; gtk_plot_draw_text(plot, *child_text); text = text->next; } GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->draw_legends(widget); gtk_plot_pc_grestore(plot->pc); } /** * gtk_plot_polar_new: * @drawable: * * * * Return value: */ GtkWidget* gtk_plot_polar_new (GdkDrawable *drawable) { GtkWidget* plot; plot = gtk_widget_new (gtk_plot_polar_get_type (), NULL); gtk_plot_polar_construct(GTK_PLOT_POLAR(plot), drawable); return plot; } /** * gtk_plot_polar_new_with_size: * @drawable: * @width: * @height: * * * * Return value: */ GtkWidget* gtk_plot_polar_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height) { GtkWidget *plot; plot = gtk_widget_new (gtk_plot_polar_get_type (), NULL); gtk_plot_polar_construct_with_size(GTK_PLOT_POLAR(plot), drawable, width, height); return(plot); } /** * gtk_plot_polar_construct: * @plot: a #GtkPlotPolar widget. * @drawable: * * */ void gtk_plot_polar_construct(GtkPlotPolar *plot, GdkDrawable *drawable) { GTK_PLOT(plot)->drawable = drawable; } /** * gtk_plot_polar_construct_with_size: * @plot: a #GtkPlotPolar widget. * @drawable: * @width: * @height: * * */ void gtk_plot_polar_construct_with_size(GtkPlotPolar *plot, GdkDrawable *drawable, gdouble width, gdouble height) { GTK_PLOT(plot)->drawable = drawable; gtk_plot_resize (GTK_PLOT(plot), width, height); } static void gtk_plot_polar_draw_grids(GtkPlotPolar *polar) { GtkWidget *widget; GtkPlot *plot; gdouble ix, iy; gdouble x1, y1, x2, y2; gdouble width, height, size; gdouble xp, yp; gint ntick; gdouble ox, oy; gdouble rotation; widget = GTK_WIDGET(polar); plot = GTK_PLOT(polar); rotation = polar->rotation; xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; ox = xp + width / 2.; oy = yp + height / 2.; size = MIN(width, height) / 2.; if(plot->bottom->show_minor_grid) { for(ntick = 0; ntick < plot->bottom->ticks.nticks; ntick++){ if(!plot->bottom->ticks.values[ntick].minor) continue; if(plot->bottom->ticks.values[ntick].value >= plot->bottom->ticks.min){ gtk_plot_get_pixel(plot, plot->ymax, plot->bottom->ticks.values[ntick].value, &x1, &y1); gtk_plot_get_pixel(plot, plot->ymin, plot->bottom->ticks.values[ntick].value, &x2, &y2); gtk_plot_draw_line(plot, plot->bottom->minor_grid, x1, y1, x2, y2); } } } if(plot->bottom->show_major_grid) { for(ntick = 0; ntick < plot->bottom->ticks.nticks; ntick++){ if(plot->bottom->ticks.values[ntick].minor) continue; if(plot->bottom->ticks.values[ntick].value >= plot->bottom->ticks.min){ gtk_plot_get_pixel(plot, plot->ymax, plot->bottom->ticks.values[ntick].value, &x1, &y1); gtk_plot_get_pixel(plot, plot->ymin, plot->bottom->ticks.values[ntick].value, &x2, &y2); gtk_plot_draw_line(plot, plot->bottom->major_grid, x1, y1, x2, y2); } } } if(plot->left->show_minor_grid) { gtk_plot_set_line_attributes(plot, plot->left->minor_grid); for(ntick = 0; ntick < plot->left->ticks.nticks; ntick++){ if(!plot->left->ticks.values[ntick].minor) continue; if(plot->left->ticks.values[ntick].value >= plot->left->ticks.min){ gtk_plot_get_pixel(plot, plot->left->ticks.values[ntick].value, 90.0 - rotation, &ix, &iy); iy = fabs(oy - iy); gtk_plot_pc_draw_circle (plot->pc, FALSE, ox, oy, 2 * iy); } } } if(plot->left->show_major_grid) { gtk_plot_set_line_attributes(plot, plot->left->major_grid); for(ntick = 0; ntick < plot->left->ticks.nticks; ntick++){ if(plot->left->ticks.values[ntick].minor) continue; if(plot->left->ticks.values[ntick].value >= plot->left->ticks.min){ gtk_plot_get_pixel(plot, plot->left->ticks.values[ntick].value, 90.0 - rotation, &ix, &iy); iy = fabs(oy - iy); gtk_plot_pc_draw_circle (plot->pc, FALSE, ox, oy, 2 * iy); } } } } static void gtk_plot_polar_draw_axis(GtkPlotPolar *polar, GtkPlotAxis *axis, GtkPlotVector tick_direction) { GtkWidget *widget; GtkPlot *plot; gdouble x, y; gdouble xx, yy; gdouble x_tick; gdouble xp, yp, width, height, size; gint ntick; gdouble m; gdouble x1, y1; gdouble ox, oy; gdouble x0, y0; widget = GTK_WIDGET(polar); plot = GTK_PLOT(polar); m = plot->magnification; xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; size = MIN(width, height); ox = width / 2.; oy = height / 2.; x = xp + ox * axis->direction.x + axis->origin.x; y = yp + oy * axis->direction.y + axis->origin.y; if(axis->direction.x == 0) gtk_plot_get_pixel(plot, 0, -polar->rotation+90, &x0, &y0); else gtk_plot_get_pixel(plot, 0, -polar->rotation, &y0, &x0); gtk_plot_draw_line(plot, axis->line, x - size / 2.0 * axis->direction.x, y - size / 2.0 * axis->direction.y, x + axis->direction.x * size / 2.0, y + axis->direction.y * size / 2.0); gtk_plot_pc_set_lineattr(plot->pc, axis->ticks_width, 0, 1, 0); for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ x_tick = axis->ticks.values[ntick].value; if(axis->direction.x == 0) gtk_plot_get_pixel(plot, x_tick, -polar->rotation+90, &xx, &yy); else gtk_plot_get_pixel(plot, x_tick, -polar->rotation, &yy, &xx); yy = yy - y0; if(!axis->ticks.values[ntick].minor && x_tick >= axis->ticks.min){ if(axis->major_mask & GTK_PLOT_TICKS_IN){ x1 = x + yy * axis->direction.x; y1 = y + yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 + tick_direction.x * m * axis->ticks_length, y1 + tick_direction.y * m * axis->ticks_length); x1 = x - yy * axis->direction.x; y1 = y - yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 + tick_direction.x * m * axis->ticks_length, y1 + tick_direction.y * m * axis->ticks_length); } if(axis->major_mask & GTK_PLOT_TICKS_OUT){ x1 = x + yy * axis->direction.x; y1 = y + yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 - tick_direction.x * m * axis->ticks_length, y1 - tick_direction.y * m * axis->ticks_length); x1 = x - yy * axis->direction.x; y1 = y - yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 - tick_direction.x * m * axis->ticks_length, y1 - tick_direction.y * m * axis->ticks_length); } } if(axis->ticks.values[ntick].minor && x_tick >= axis->ticks.min){ if(axis->minor_mask & GTK_PLOT_TICKS_IN){ x1 = x + yy * axis->direction.x; y1 = y + yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 + tick_direction.x * m * axis->ticks_length/2., y1 + tick_direction.y * m * axis->ticks_length/2.); x1 = x - yy * axis->direction.x; y1 = y - yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 + tick_direction.x * m * axis->ticks_length/2., y1 + tick_direction.y * m * axis->ticks_length/2.); } if(axis->minor_mask & GTK_PLOT_TICKS_OUT){ x1 = x + yy * axis->direction.x; y1 = y + yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 - tick_direction.x * m * axis->ticks_length/2., y1 - tick_direction.y * m * axis->ticks_length/2.); x1 = x - yy * axis->direction.x; y1 = y - yy * axis->direction.y; gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 - tick_direction.x * m * axis->ticks_length/2., y1 - tick_direction.y * m * axis->ticks_length/2.); } } } } static void gtk_plot_polar_draw_labels(GtkPlotPolar *polar, GtkPlotAxis *axis, GtkPlotVector tick_direction) { GtkWidget *widget; GtkPlot *plot; GtkPlotText title, tick; gchar label[100]; gdouble x_tick; gint x, y; gdouble xx, yy; gint ox, oy; gint text_height, text_width, ascent, descent; gint xp, yp, width, height; gint ntick; gdouble m; gboolean veto = FALSE; gdouble x0, y0; GtkAllocation allocation; widget = GTK_WIDGET(polar); plot = GTK_PLOT(polar); m = plot->magnification; xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; ox = width / 2.; oy = height / 2.; x = xp + ox * axis->direction.x + axis->origin.x; y = yp + oy * axis->direction.y + axis->origin.y; gtk_plot_pc_set_color(plot->pc, &axis->labels_attr.fg); gtk_plot_text_get_size("0", 0, axis->labels_attr.font, roundint(axis->labels_attr.height * m), &text_width, &text_height, &ascent, &descent); switch(axis->labels_attr.angle){ case 0: y += text_height / 2.; break; case 90: break; case 180: y -= text_height / 2.; break; case 270: break; } if(axis->direction.x == 0) gtk_plot_get_pixel(plot, 0, -polar->rotation+90, &x0, &y0); else gtk_plot_get_pixel(plot, 0, -polar->rotation, &y0, &x0); tick = axis->labels_attr; for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ if(axis->ticks.values[ntick].minor) continue; x_tick = axis->ticks.values[ntick].value; if(axis->direction.x == 0) gtk_plot_get_pixel(plot, x_tick, -polar->rotation+90, &xx, &yy); else gtk_plot_get_pixel(plot, x_tick, -polar->rotation, &yy, &xx); yy = yy - y0; xx = axis->direction.x * yy; yy = axis->direction.y * yy; if(x_tick >= axis->ticks.min-1.e-9){ if(!axis->custom_labels){ gtk_plot_axis_parse_label(axis, x_tick, axis->label_precision, axis->label_style, label); } else { g_signal_emit_by_name(GTK_OBJECT(axis), "tick_label", &x_tick, label, &veto); if(!veto) gtk_plot_axis_parse_label(axis, x_tick, axis->label_precision, axis->label_style, label); } tick.text = label; gtk_widget_get_allocation (widget, &allocation); if(axis->label_mask & GTK_PLOT_LABEL_IN){ tick.x = x + xx; tick.y = y + yy; tick.x = tick.x + tick_direction.x*roundint(axis->labels_offset * m); tick.y = tick.y + tick_direction.y*roundint(axis->labels_offset * m); tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(plot, tick); tick.x = x - xx; tick.y = y - yy; tick.x = tick.x + tick_direction.x*roundint(axis->labels_offset * m); tick.y = tick.y + tick_direction.y*roundint(axis->labels_offset * m); tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(plot, tick); } if(axis->label_mask & GTK_PLOT_LABEL_OUT){ tick.x = x + xx; tick.y = y + yy; tick.x = tick.x - tick_direction.x*roundint(axis->labels_offset * m); tick.y = tick.y - tick_direction.y*roundint(axis->labels_offset * m); tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(plot, tick); tick.x = x - xx; tick.y = y - yy; tick.x = tick.x - tick_direction.x*roundint(axis->labels_offset * m); tick.y = tick.y - tick_direction.y*roundint(axis->labels_offset * m); tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(plot, tick); } } } if(axis->title_visible && axis->title.text) { title = axis->title; gtk_plot_draw_text(plot, title); } } static void gtk_plot_polar_draw_circle(GtkPlotPolar *polar) { GtkWidget *widget; GtkPlot *plot; GtkPlotAxis *axis, perp; GtkPlotText tick; gchar label[100]; gdouble x, y; gint line_width; gdouble xp, yp, width, height, size; gint ntick; gdouble m; gdouble x_tick = 0.; gdouble x1, y1; gdouble ox, oy; gint text_height, text_width, ascent, descent; gdouble rotation; gboolean veto = FALSE; gint sign = 1; GtkAllocation allocation; widget = GTK_WIDGET(polar); plot = GTK_PLOT(polar); m = plot->magnification; rotation = polar->rotation; if(plot->reflect_y) sign = -1; xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; ox = width / 2.; oy = height / 2.; x = xp + ox; y = yp + oy; axis = plot->bottom; line_width = axis->line.line_width; gtk_plot_pc_set_color(plot->pc, &axis->line.color); gtk_plot_pc_set_lineattr(plot->pc, axis->line.line_width, 0, 3, 0); gtk_plot_get_pixel(plot, plot->ymax, 90.0 - rotation, &x1, &size); size = fabs(size - y); gtk_plot_pc_draw_circle (plot->pc, FALSE, x, y, 2 * size); gtk_plot_pc_set_lineattr(plot->pc, axis->ticks_width, 0, 1, 0); gtk_plot_text_get_size("0", 0, axis->labels_attr.font, roundint(axis->labels_attr.height * m), &text_width, &text_height, &ascent, &descent); for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ x_tick = axis->ticks.values[ntick].value; if(!axis->ticks.values[ntick].minor && x_tick >= axis->ticks.min){ if(!axis->custom_labels){ gtk_plot_axis_parse_label(axis, x_tick, axis->label_precision, axis->label_style, label); } else { g_signal_emit_by_name(GTK_OBJECT(axis), "tick_label", &x_tick, label, &veto); if(!veto) gtk_plot_axis_parse_label(axis, x_tick, axis->label_precision, axis->label_style, label); } gtk_plot_get_pixel(plot, plot->ymax, x_tick, &x1, &y1); x_tick += rotation; if(axis->major_mask & GTK_PLOT_TICKS_IN){ perp.direction.x = cos(x_tick * PI / 180. * sign); perp.direction.y = -sin(x_tick * PI / 180. * sign); gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 + perp.direction.x*m*axis->ticks_length, y1 + perp.direction.y*m*axis->ticks_length); } if(axis->major_mask & GTK_PLOT_TICKS_OUT){ perp.direction.x = -cos(x_tick * PI / 180. * sign); perp.direction.y = sin(x_tick * PI / 180. * sign); gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 - perp.direction.x*m*axis->ticks_length, y1 - perp.direction.y*m*axis->ticks_length); } tick = axis->labels_attr; tick.text = label; if((x_tick >= 0.0 && x_tick < 90.0) || (x_tick > 270.0 && x_tick <= 360.0)) tick.justification = GTK_JUSTIFY_LEFT; if(x_tick > 90.0 && x_tick < 270.0) tick.justification = GTK_JUSTIFY_RIGHT; if(x_tick == 90.0 || x_tick == 270.0) tick.justification = GTK_JUSTIFY_CENTER; y1 += text_height / 2; if((x_tick - rotation) != 360.0 && axis->label_mask != 0){ gtk_widget_get_allocation (widget, &allocation); perp.direction.x = -cos(x_tick * PI / 180. * sign); perp.direction.y = sin(x_tick * PI / 180. * sign); tick.x = x1; tick.y = y1; tick.x -= roundint(perp.direction.x*axis->labels_offset * m); tick.y -= roundint(perp.direction.y*axis->labels_offset * m); tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(plot, tick); } } if(axis->ticks.values[ntick].minor && x_tick >= axis->ticks.min){ gtk_plot_get_pixel(plot, plot->ymax, x_tick, &x1, &y1); x_tick += rotation; if(axis->minor_mask & GTK_PLOT_TICKS_IN){ perp.direction.x = cos(x_tick * PI / 180. * sign); perp.direction.y = -sin(x_tick * PI / 180. * sign); gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 + perp.direction.x*m*axis->ticks_length/2., y1 + perp.direction.y*m*axis->ticks_length/2.); } if(axis->minor_mask & GTK_PLOT_TICKS_OUT){ perp.direction.x = -cos(x_tick * PI / 180. * sign); perp.direction.y = sin(x_tick * PI / 180. * sign); gtk_plot_pc_draw_line(plot->pc, x1, y1, x1 - perp.direction.x*m*axis->ticks_length/2., y1 - perp.direction.y*m*axis->ticks_length/2.); } } } } static void gtk_plot_polar_real_get_pixel(GtkWidget *widget, gdouble x, gdouble y, gdouble *px, gdouble *py) { GtkPlot *plot; GtkPlotPolar *polar; gdouble xp, yp, width, height, size; gdouble ox, oy; gint sign = 1; gdouble min; plot = GTK_PLOT(widget); polar = GTK_PLOT_POLAR(widget); if(plot->reflect_y) sign = -1; xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; size = MIN(width, height) / 2.; ox = xp + width / 2.0; oy = yp + height / 2.0; min = plot->left->ticks.min; plot->left->ticks.min = 0.0; x = gtk_plot_axis_ticks_transform(plot->left, x)*size; plot->left->ticks.min = min; *px = ox + x * cos((y + polar->rotation) / 180. * PI * sign); *py = oy - x * sin((y + polar->rotation)/ 180. * PI * sign); } static void gtk_plot_polar_real_get_point(GtkWidget *widget, gint px, gint py, gdouble *x, gdouble *y) { GtkPlot *plot; gint xp, yp, width, height; gdouble r = 0; gdouble angle = 0; gint ox, oy, size; gdouble rotation; plot = GTK_PLOT(widget); xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; rotation = GTK_PLOT_POLAR(widget)->rotation; ox = xp + width / 2; oy = yp + height / 2; size = MIN(width, height); px = px - ox; py = oy - py; if(px == 0){ if(py >= 0) angle = 90.0 - rotation; if(py < 0) angle = 270.0 - rotation; } else { angle = (gdouble) abs(py) / (gdouble) abs(px); angle = atan(angle); angle = angle * 180.0 / PI; if(px >= 0 && py < 0) angle = 360.0 - angle; if(px < 0 && py >= 0) angle = 180.0 - angle; if(px < 0 && py < 0) angle += 180.0; angle -= rotation; } if(angle >= 360.0) angle -= 360.0; if(angle < 0.0) angle = 360.0 + angle; r = sqrt(px * px + py * py); *x = 2.0 * r * plot->ymax / (gdouble) size; *y = plot->reflect_y ? -angle : angle; } /******************************************* * gtk_plot_polar_rotate *******************************************/ /** * gtk_plot_polar_rotate: * @plot: a #GtkPlotPolar widget. * @angle: * * */ void gtk_plot_polar_rotate(GtkPlotPolar *polar, gdouble angle) { polar->rotation = angle; g_signal_emit_by_name(GTK_OBJECT(polar), "update", TRUE); g_signal_emit_by_name(GTK_OBJECT(polar), "changed"); } /** * gtk_plot_polar_get_angle: * @plot: a #GtkPlotPolar widget. * * * * Return value: */ gdouble gtk_plot_polar_get_angle(GtkPlotPolar *polar) { return polar->rotation; } gtkextra-3.2.0/gtkextra/gtkplotcairo.h0000644000076400001440000000477712603754176015024 00000000000000/* gtkplotpc - gtkplot print context - a renderer for printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CAIRO_H__ #define __GTK_PLOT_CAIRO_H__ #include #include #include "gtkplotpc.h" #include "gtkpsfont.h" #include "cairo.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_PLOT_CAIRO(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_cairo_get_type (), GtkPlotCairo) #define G_TYPE_PLOT_CAIRO (gtk_plot_cairo_get_type ()) #define GTK_PLOT_CAIRO_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_cairo_get_type(), GtkPlotCairoClass) #define GTK_IS_PLOT_CAIRO(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_cairo_get_type ()) typedef struct _GtkPlotCairo GtkPlotCairo; typedef struct _GtkPlotCairoClass GtkPlotCairoClass; /** * GtkPlotCairo: * * The GtkPlotCairo struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCairo { GtkPlotPC pc; cairo_t *cairo; PangoContext *context; PangoLayout *layout; gboolean destroy_cairo; gint ref_count; }; struct _GtkPlotCairoClass { GtkPlotPCClass parent_class; }; GType gtk_plot_cairo_get_type (void); GtkObject *gtk_plot_cairo_new (cairo_t *cairo); GtkObject *gtk_plot_cairo_new_with_drawable (GdkDrawable *drawable); void gtk_plot_cairo_construct(GtkPlotCairo *pc, cairo_t *cairo, PangoContext *context); void gtk_plot_cairo_set_cairo(GtkPlotCairo *pc, cairo_t *cairo); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CAIRO_H__ */ gtkextra-3.2.0/gtkextra/gtkplotsurface.h0000644000076400001440000001605412603754176015346 00000000000000/* gtkplotsurface - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_SURFACE_H__ #define __GTK_PLOT_SURFACE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #include "gtkplotdt.h" #define GTK_PLOT_SURFACE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_surface_get_type (), GtkPlotSurface) #define G_TYPE_PLOT_SURFACE (gtk_plot_surface_get_type ()) #define GTK_PLOT_SURFACE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_surface_get_type(), GtkPlotSurfaceClass) #define GTK_IS_PLOT_SURFACE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_surface_get_type ()) typedef struct _GtkPlotPolygon GtkPlotPolygon; typedef struct _GtkPlotSurface GtkPlotSurface; typedef struct _GtkPlotSurfaceClass GtkPlotSurfaceClass; /** * GtkPlotiPolygon: * * The GtkPlotPolygon struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotPolygon { GtkPlotDTtriangle *t; /* parent triangle */ GtkPlotVector xyz[4]; /* points */ GtkPlotVector p[4]; /* pixels */ gint n; /* number of points */ gdouble level; gboolean cut_level; gboolean sublevel; }; /** * GtkPlotSurface: * * The GtkPlotSurface struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotSurface { GtkPlotData data; GdkColor color; GdkColor shadow; GdkColor grid_foreground; GdkColor grid_background; gboolean use_height_gradient; gboolean use_amplitud; GtkPlotVector light; gdouble ambient; gint nx, ny; GtkPlotDT *dt; gboolean recalc_dt; GList *polygons; gboolean show_grid; gboolean show_mesh; gboolean transparent; gdouble xstep, ystep; GtkPlotLine mesh_line; }; struct _GtkPlotSurfaceClass { GtkPlotDataClass parent_class; void (*build_polygons) (GtkPlotSurface *surface); void (*sort_polygons) (GtkPlotSurface *surface); void (*draw_polygons) (GtkPlotSurface *surface); }; GType gtk_plot_surface_get_type (void); GtkWidget* gtk_plot_surface_new (void); GtkWidget* gtk_plot_surface_new_function (GtkPlotFunc3D function); void gtk_plot_surface_construct_function (GtkPlotSurface *surface, GtkPlotFunc3D function); void gtk_plot_surface_set_color (GtkPlotSurface *data, GdkColor *color); void gtk_plot_surface_set_shadow (GtkPlotSurface *data, GdkColor *color); void gtk_plot_surface_set_grid_foreground (GtkPlotSurface *data, GdkColor *foreground); void gtk_plot_surface_set_grid_background (GtkPlotSurface *data, GdkColor *background); void gtk_plot_surface_set_grid_visible (GtkPlotSurface *data, gboolean visible); gboolean gtk_plot_surface_get_grid_visible (GtkPlotSurface *data); void gtk_plot_surface_set_mesh_visible (GtkPlotSurface *data, gboolean visible); gboolean gtk_plot_surface_get_mesh_visible (GtkPlotSurface *data); void gtk_plot_surface_set_light (GtkPlotSurface *data, gdouble x, gdouble y, gdouble z); void gtk_plot_surface_set_ambient (GtkPlotSurface *data, gdouble ambient); void gtk_plot_surface_use_height_gradient (GtkPlotSurface *data, gboolean use_gradient); void gtk_plot_surface_use_amplitud (GtkPlotSurface *data, gboolean use_amplitud); void gtk_plot_surface_set_transparent(GtkPlotSurface *data, gboolean transparent); void gtk_plot_surface_set_points (GtkPlotSurface *data, gdouble *x, gdouble *y, gdouble *z, gdouble *dx, gdouble *dy, gdouble *dz, gint nx, gint ny); void gtk_plot_surface_get_points (GtkPlotSurface *data, gdouble **x, gdouble **y, gdouble **z, gdouble **dx, gdouble **dy, gdouble **dz, gint *nx, gint *ny); GtkPlotArray * gtk_plot_surface_set_x (GtkPlotSurface *data, gdouble *x); GtkPlotArray * gtk_plot_surface_set_y (GtkPlotSurface *data, gdouble *y); GtkPlotArray * gtk_plot_surface_set_z (GtkPlotSurface *data, gdouble *z); GtkPlotArray * gtk_plot_surface_set_dx (GtkPlotSurface *data, gdouble *dx); GtkPlotArray * gtk_plot_surface_set_dy (GtkPlotSurface *data, gdouble *dy); GtkPlotArray * gtk_plot_surface_set_dz (GtkPlotSurface *data, gdouble *dz); gdouble * gtk_plot_surface_get_x (GtkPlotSurface *dataset, gint *nx); gdouble * gtk_plot_surface_get_y (GtkPlotSurface *dataset, gint *ny); gdouble * gtk_plot_surface_get_z (GtkPlotSurface *dataset, gint *nx, gint *ny); gdouble * gtk_plot_surface_get_dx (GtkPlotSurface *dataset); gdouble * gtk_plot_surface_get_dy (GtkPlotSurface *dataset); gdouble * gtk_plot_surface_get_dz (GtkPlotSurface *dataset); void gtk_plot_surface_set_nx (GtkPlotSurface *dataset, gint nx); void gtk_plot_surface_set_ny (GtkPlotSurface *dataset, gint ny); gint gtk_plot_surface_get_nx (GtkPlotSurface *dataset); gint gtk_plot_surface_get_ny (GtkPlotSurface *dataset); void gtk_plot_surface_set_xstep (GtkPlotSurface *dataset, gdouble xstep); void gtk_plot_surface_set_ystep (GtkPlotSurface *dataset, gdouble ystep); gdouble gtk_plot_surface_get_xstep (GtkPlotSurface *dataset); gdouble gtk_plot_surface_get_ystep (GtkPlotSurface *dataset); void gtk_plot_surface_build_mesh (GtkPlotSurface *surface); void gtk_plot_surface_recalc_nodes (GtkPlotSurface *surface); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_SURFACE_H__ */ gtkextra-3.2.0/gtkextra/gtkextra.h0000644000076400001440000000501312603754176014133 00000000000000/* gtkextra - set of widgets for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef GTK_EXTRA_H #define GTK_EXTRA_H #include #include #include #define __GTKEXTRA_H_INSIDE__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #undef __GTKEXTRA_H_INSIDE__ #endif /* GTK_EXTRA_H */ gtkextra-3.2.0/gtkextra/gtkplotbox.h0000644000076400001440000000374512603754176014511 00000000000000/* gtkplotbox - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_BOX_H__ #define __GTK_PLOT_BOX_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_BOX(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_box_get_type (), GtkPlotBox) #define G_TYPE_PLOT_BOX (gtk_plot_box_get_type ()) #define GTK_PLOT_BOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_box_get_type(), GtkPlotBoxClass) #define GTK_IS_PLOT_BOX(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_box_get_type ()) typedef struct _GtkPlotBox GtkPlotBox; typedef struct _GtkPlotBoxClass GtkPlotBoxClass; /** * GtkPlotBox: * * The GtkPlotBox struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotBox { GtkPlotData data; GtkOrientation orientation; }; struct _GtkPlotBoxClass { GtkPlotDataClass parent_class; }; GType gtk_plot_box_get_type (void); GtkWidget* gtk_plot_box_new (GtkOrientation orientation); void gtk_plot_box_construct (GtkPlotBox *box, GtkOrientation orientation); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_BOX_H__ */ gtkextra-3.2.0/gtkextra/gtkitementry.h0000644000076400001440000000574012603754176015037 00000000000000/* GtkItemEntry - widget for gtk+ * Copyright (C) 1999-2001 Adrian E. Feiguin * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * GtkItemEntry widget by Adrian E. Feiguin * Based on GtkEntry widget * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __GTK_ITEM_ENTRY_H__ #define __GTK_ITEM_ENTRY_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define G_TYPE_ITEM_ENTRY \ (gtk_item_entry_get_type ()) #define GTK_ITEM_ENTRY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_item_entry_get_type (), GtkItemEntry)) #define GTK_ITEM_ENTRY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST (klass, gtk_item_entry_get_type (), GtkItemEntryClass)) #define GTK_IS_ITEM_ENTRY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_item_entry_get_type ())) #define GTK_IS_ITEM_ENTRY_CLASS(klass) \ (GTK_CHECK_CLASS_TYPE ((klass), gtk_entry_get_type())) typedef struct _GtkItemEntry GtkItemEntry; typedef struct _GtkItemEntryClass GtkItemEntryClass; struct _GtkItemEntry { /*< private >*/ GtkEntry parent; gint text_max_size; /* upper limit for geometric size allocation or 0 */ gint16 item_text_size; /* length of allocated entry->text memory buffer block */ gint16 item_n_bytes; /* string length of entry->text, used part of memory buffer */ /* pseudo-properties */ gint max_length_bytes; /* maximum length in bytes */ GtkJustification justification; /* justification of the entry */ }; struct _GtkItemEntryClass { GtkEntryClass parent_class; }; GType gtk_item_entry_get_type(void); GtkWidget *gtk_item_entry_new(void); GtkWidget *gtk_item_entry_new_with_max_length(gint max); void gtk_item_entry_set_text(GtkItemEntry *entry, const gchar *text, GtkJustification justification); gint gtk_item_entry_get_max_length_bytes(GtkItemEntry *item_entry); void gtk_item_entry_set_max_length_bytes(GtkItemEntry *item_entry, gint max_length_bytes); void gtk_item_entry_set_justification(GtkItemEntry *entry, GtkJustification just); void gtk_item_entry_set_cursor_visible(GtkItemEntry *entry, gboolean visible); gboolean gtk_item_entry_get_cursor_visible(GtkItemEntry *entry); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_ITEM_ENTRY_H__ */ gtkextra-3.2.0/gtkextra/gtkplotbar.c0000644000076400001440000003111512603754176014450 00000000000000/* gtkplotbar - bar plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotbar * @short_description: 3d scientific plots widget for GTK. * * FIXME:: Need long description. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotbar.h" #include "gtkplotpc.h" #include "gtkplotps.h" #include "gtkpsfont.h" #define P_(string) string static void gtk_plot_bar_class_init (GtkPlotBarClass *klass); static void gtk_plot_bar_init (GtkPlotBar *data); static void gtk_plot_bar_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_bar_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_bar_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); static void gtk_plot_bar_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_bar_clone (GtkPlotData *data, GtkPlotData *copy); extern gint roundint (gdouble x); enum { ARG_0, ARG_WIDTH, ARG_ORIENTATION, }; static GtkPlotDataClass *parent_class = NULL; GType gtk_plot_bar_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotBar", sizeof (GtkPlotBarClass), (GClassInitFunc) gtk_plot_bar_class_init, sizeof (GtkPlotBar), (GInstanceInitFunc) gtk_plot_bar_init, 0); } return data_type; } static void gtk_plot_bar_class_init (GtkPlotBarClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; gobject_class->set_property = gtk_plot_bar_set_property; gobject_class->get_property = gtk_plot_bar_get_property; g_object_class_install_property(gobject_class, ARG_WIDTH, g_param_spec_double ("width", P_("Width"), P_("Width"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property(gobject_class, ARG_ORIENTATION, g_param_spec_enum ("orientation", P_("Orientation"), P_("Orientation"), gtk_orientation_get_type (), 0, G_PARAM_READABLE|G_PARAM_WRITABLE)); data_class->clone = gtk_plot_bar_clone; data_class->draw_legend = gtk_plot_bar_draw_legend; data_class->draw_symbol = gtk_plot_bar_draw_symbol; } static void gtk_plot_bar_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotBar *data; data = GTK_PLOT_BAR (object); switch (prop_id) { case ARG_WIDTH: data->width = g_value_get_double(value); break; case ARG_ORIENTATION: data->orientation = g_value_get_enum(value); break; } } static void gtk_plot_bar_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotBar *data; data = GTK_PLOT_BAR (object); switch (prop_id) { case ARG_WIDTH: g_value_set_double(value, data->width); break; case ARG_ORIENTATION: g_value_set_enum(value, data->orientation); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_plot_bar_init (GtkPlotBar *dataset) { GtkWidget *widget; GdkColor black, white; GdkColormap *colormap; GtkPlotArray *dim; widget = GTK_WIDGET(dataset); colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); GTK_PLOT_DATA(dataset)->symbol.symbol_style = GTK_PLOT_SYMBOL_FILLED; GTK_PLOT_DATA(dataset)->symbol.color = white; GTK_PLOT_DATA(dataset)->line.line_style = GTK_PLOT_LINE_SOLID; GTK_PLOT_DATA(dataset)->line.line_width = 1; GTK_PLOT_DATA(dataset)->line.color = black; dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "y"); gtk_plot_array_set_label(dim, "Size"); gtk_plot_array_set_description(dim, "Bar size"); dataset->width = .05; } /** * gtk_plot_bar_new: * @orientation: GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. * * Create a new GtkPlotBar widget. * * Return value: a new GtkWidget. */ GtkWidget* gtk_plot_bar_new (GtkOrientation orientation) { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_bar_get_type (), NULL); gtk_plot_bar_construct(GTK_PLOT_BAR(widget), orientation); return (widget); } /** * gtk_plot_bar_construct: * @bar: a #GtkPlotBar widget. * @orientation: GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL. * * Initializes a #GtkPlotBar structure. */ void gtk_plot_bar_construct(GtkPlotBar *bar, GtkOrientation orientation) { bar->orientation = orientation; } static void gtk_plot_bar_clone(GtkPlotData *data, GtkPlotData *copy) { GTK_PLOT_DATA_CLASS(parent_class)->clone(data, copy); GTK_PLOT_BAR(copy)->orientation = GTK_PLOT_BAR(data)->orientation; GTK_PLOT_BAR(copy)->width = GTK_PLOT_BAR(data)->width; } static void gtk_plot_bar_draw_symbol(GtkPlotData *dataset, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot; GtkPlotBar *bar; GdkRectangle area, clip_area; gdouble px, py, px0, py0; gdouble x1 = 0.0, y1 = 0.0, width = 0.0, height = 0.0; gdouble ex, ey; GtkAllocation allocation; bar = GTK_PLOT_BAR(dataset); plot = dataset->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; clip_area.x = area.x + roundint(plot->x * area.width); clip_area.y = area.y + roundint(plot->y * area.height); clip_area.width = roundint(plot->width * area.width); clip_area.height = roundint(plot->height * area.height); gtk_plot_pc_clip(plot->pc, &clip_area); if(GTK_IS_PLOT3D(plot)){ } else { switch(bar->orientation){ case GTK_ORIENTATION_VERTICAL: gtk_plot_get_pixel(plot, x-bar->width, y, &px, &py); gtk_plot_get_pixel(plot, x+bar->width, MAX(0., plot->ymin), &px0, &py0); if(dataset->show_yerrbars) gtk_plot_get_pixel(plot, x, y + dy, &ex, &ey); break; case GTK_ORIENTATION_HORIZONTAL: gtk_plot_get_pixel(plot, y, x+bar->width, &px, &py); gtk_plot_get_pixel(plot, MAX(0., plot->xmin), x-bar->width, &px0, &py0); if(dataset->show_xerrbars) gtk_plot_get_pixel(plot, y + dy, x, &ex, &ey); break; } x1 = MIN(px, px0); y1 = MIN(py, py0); if(GTK_IS_PLOT_PS(plot->pc)){ width = fabs(px - px0); height = fabs(py0 - py); } else { width = abs(roundint(px - px0)); height = abs(roundint(py0 - py)); } if(dataset->symbol.symbol_style == GTK_PLOT_SYMBOL_OPAQUE){ gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_rectangle (plot->pc, TRUE, x1, y1, width, height); } gtk_plot_pc_set_lineattr (plot->pc, dataset->symbol.border.line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); if(dataset->symbol.symbol_style == GTK_PLOT_SYMBOL_FILLED){ gtk_plot_pc_set_color(plot->pc, &dataset->symbol.color); gtk_plot_pc_draw_rectangle (plot->pc, TRUE, x1, y1, width, height); } gtk_plot_pc_set_color(plot->pc, &dataset->symbol.border.color); gtk_plot_pc_draw_rectangle (plot->pc, FALSE, x1, y1, width, height); if(dataset->show_yerrbars){ gtk_plot_pc_draw_line(plot->pc, ex, py, ex, ey); gtk_plot_pc_draw_line(plot->pc, px, ey, px0, ey); } if(dataset->show_xerrbars){ gtk_plot_pc_draw_line(plot->pc, px, ey, ex, ey); gtk_plot_pc_draw_line(plot->pc, ex, py, ex, py0); } } gtk_plot_pc_clip(plot->pc, NULL); } static void gtk_plot_bar_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotBar *bar; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; GtkAllocation allocation; bar = GTK_PLOT_BAR(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(data))); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(data->plot))); plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); legend.x = (gdouble)(area.x + x + roundint((plot->legends_line_width + 4) * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_OPAQUE){ gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); } gtk_plot_pc_set_lineattr (plot->pc, data->symbol.border.line_width, 0, 0, 0); gtk_plot_pc_set_dash(plot->pc, 0, 0, 0); if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_FILLED){ gtk_plot_pc_set_color(plot->pc, &data->symbol.color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); } gtk_plot_pc_set_color(plot->pc, &data->symbol.border.color); gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); } /** * gtk_plot_bar_set_width: * @bar: a #GtkPlotBar widget. * @width: widget width. * * Set the width of a GtkPlotBar widget. */ void gtk_plot_bar_set_width (GtkPlotBar *bar, gdouble width) { if(width < 0.0) return; bar->width = width; } /** * gtk_plot_bar_get_width: * @bar: a #GtkPlotBar widget. * * Set the width of a GtkPlotBar widget. * * Return value: widget width. */ gdouble gtk_plot_bar_get_width (GtkPlotBar *bar) { return(bar->width); } gtkextra-3.2.0/gtkextra/gtkextra.def0000644000076400001440000001075212603754176014450 00000000000000EXPORTS gtk_check_item_new gtk_check_item_new_with_label gtk_color_combo_find_color gtk_color_combo_get_color_at gtk_color_combo_get_type gtk_color_combo_new gtk_combobox_get_type gtk_dir_tree_get_type gtk_dir_tree_open_dir gtk_file_list_get_filename gtk_file_list_get_path gtk_file_list_get_type gtk_file_list_set_filter gtk_font_combo_get_type gtk_font_combo_new gtk_font_combo_select gtk_icon_file_selection_get_type gtk_icon_file_selection_new gtk_icon_list_add_from_data gtk_icon_list_get_link gtk_icon_list_get_type gtk_icon_list_new gtk_icon_list_remove gtk_icon_list_set_active_icon gtk_item_entry_get_type gtk_item_entry_set_justification gtk_plot_add_data gtk_plot_autoscale gtk_plot_axis_get_attributes gtk_plot_axis_get_visible gtk_plot_axis_hide_title gtk_plot_axis_labels_set_attributes gtk_plot_axis_labels_set_numbers gtk_plot_axis_set_attributes gtk_plot_axis_set_tick_labels gtk_plot_axis_set_ticks gtk_plot_axis_set_ticks_length gtk_plot_axis_set_ticks_limits gtk_plot_axis_set_ticks_width gtk_plot_axis_set_title gtk_plot_axis_set_visible gtk_plot_axis_show_labels gtk_plot_axis_show_ticks gtk_plot_axis_show_title gtk_plot_axis_title_set_attributes gtk_plot_axis_unset_ticks_limits gtk_plot_canvas_add_plot gtk_plot_canvas_cancel_action gtk_plot_canvas_export_ps gtk_plot_canvas_get_pixel gtk_plot_canvas_get_position gtk_plot_canvas_get_type gtk_plot_canvas_new gtk_plot_canvas_put_child gtk_plot_canvas_put_ellipse gtk_plot_canvas_put_line gtk_plot_canvas_put_rectangle gtk_plot_canvas_put_text gtk_plot_canvas_refresh gtk_plot_canvas_remove_child gtk_plot_canvas_set_active_plot gtk_plot_canvas_set_magnification gtk_plot_canvas_set_size gtk_plot_data_get_connector gtk_plot_data_get_line_attributes gtk_plot_data_get_symbol gtk_plot_data_hide gtk_plot_data_hide_legend gtk_plot_data_labels_set_attributes gtk_plot_data_new gtk_plot_data_set_connector gtk_plot_data_set_labels gtk_plot_data_set_legend gtk_plot_data_set_line_attributes gtk_plot_data_set_name gtk_plot_data_set_points gtk_plot_data_set_symbol gtk_plot_data_set_x_attributes gtk_plot_data_set_y_attributes gtk_plot_data_show_labels gtk_plot_data_show_xerrbars gtk_plot_data_show_yerrbars gtk_plot_get_axis gtk_plot_get_point gtk_plot_get_type gtk_plot_hide_legends gtk_plot_legends_move gtk_plot_legends_set_attributes gtk_plot_major_hgrid_set_attributes gtk_plot_major_vgrid_set_attributes gtk_plot_minor_hgrid_set_attributes gtk_plot_minor_vgrid_set_attributes gtk_plot_move gtk_plot_move_resize gtk_plot_new_with_size gtk_plot_remove_data gtk_plot_resize gtk_plot_set_legends_border gtk_plot_set_range gtk_plot_set_xrange gtk_plot_set_xscale gtk_plot_set_yrange gtk_plot_set_yscale gtk_plot_show_legends gtk_plot_x0_set_visible gtk_plot_x0line_set_attributes gtk_plot_y0_set_visible gtk_plot_y0line_set_attributes gtk_psfont_get_font gtk_sheet_add_column gtk_sheet_add_row gtk_sheet_cell_clear gtk_sheet_cell_get_text gtk_sheet_column_button_add_label gtk_sheet_column_set_justification gtk_sheet_delete_columns gtk_sheet_delete_rows gtk_sheet_freeze gtk_sheet_get_attributes gtk_sheet_get_link gtk_sheet_get_type gtk_sheet_insert_columns gtk_sheet_insert_rows gtk_sheet_link_cell gtk_sheet_new gtk_sheet_range_clear gtk_sheet_range_set_background gtk_sheet_remove_link gtk_sheet_row_button_add_label gtk_sheet_set_cell_text gtk_sheet_set_column_title gtk_sheet_set_column_width gtk_sheet_set_row_titles_width gtk_sheet_thaw gtk_sheet_get_rows_count gtk_sheet_get_columns_count gtk_icon_list_clear gtk_icon_list_set_selection_mode gtk_plot_canvas_set_background gtk_plot_data_set_numpoints gtk_plot_data_set_x gtk_plot_data_set_y gtk_plot_get_xrange gtk_plot_grids_set_visible gtk_plot_set_background gtk_border_combo_new gtk_sheet_attach gtk_sheet_button_attach gtk_sheet_change_entry gtk_sheet_clip_range gtk_sheet_get_cell_area gtk_sheet_get_entry gtk_sheet_hide_column_titles gtk_sheet_hide_row_titles gtk_sheet_range_set_border gtk_sheet_range_set_border_color gtk_sheet_range_set_editable gtk_sheet_range_set_font gtk_sheet_range_set_foreground gtk_sheet_range_set_justification gtk_sheet_row_button_justify gtk_sheet_row_set_sensitivity gtk_sheet_set_active_cell gtk_sheet_set_cell gtk_sheet_set_selection_mode gtk_sheet_show_column_titles gtk_sheet_show_row_titles gtk_sheet_unclip_range gtk_plot_add_function gtk_plot_canvas_child_new gtk_plot_canvas_get_active_plot gtk_plot_refresh gtk_plot_data_draw_points gtkextra-3.2.0/gtkextra/gtkplotpolar.h0000644000076400001440000000550112603754176015026 00000000000000/* gtkplotpolar - polar plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_POLAR_H__ #define __GTK_PLOT_POLAR_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #include "gtkplotpc.h" #define GTK_PLOT_POLAR(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_polar_get_type (), GtkPlotPolar) #define G_TYPE_PLOT_POLAR (gtk_plot_polar_get_type ()) #define GTK_PLOT_POLAR_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_polar_get_type, GtkPlotPolarClass) #define GTK_IS_PLOT_POLAR(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_polar_get_type ()) #define GTK_PLOT_POLAR_FLAGS(plot) (GTK_PLOT_POLAR(plot)->flags) #define GTK_PLOT_POLAR_SET_FLAGS(plot,flag) (GTK_PLOT_POLAR_FLAGS(plot) |= (flag)) #define GTK_PLOT_POLAR_UNSET_FLAGS(plot,flag) (GTK_PLOT_POLAR_FLAGS(plot) &= ~(flag)) #define GTK_PLOT_POLAR_TRANSPARENT(plot) (GTK_PLOT_POLAR_FLAGS(plot) & GTK_PLOT_POLAR_TRANSPARENT) typedef struct _GtkPlotPolar GtkPlotPolar; typedef struct _GtkPlotPolarClass GtkPlotPolarClass; /** * GtkPlotPolar: * * The GtkPlotPolar struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotPolar { GtkPlot plot; GtkPlotAxis *r; GtkPlotAxis *angle; gdouble rotation; }; struct _GtkPlotPolarClass { GtkPlotClass parent_class; }; /* PlotPolar */ GType gtk_plot_polar_get_type (void); GtkWidget* gtk_plot_polar_new (GdkDrawable *drawable); GtkWidget* gtk_plot_polar_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_polar_construct (GtkPlotPolar *plot, GdkDrawable *drawable); void gtk_plot_polar_construct_with_size (GtkPlotPolar *plot, GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_polar_rotate (GtkPlotPolar *plot, gdouble angle); gdouble gtk_plot_polar_get_angle (GtkPlotPolar *plot); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_POLAR_H__ */ gtkextra-3.2.0/gtkextra/icons.h0000644000076400001440000002464312603754176013427 00000000000000/* XPM */ /* static char * plot_icon[] = { "48 48 4 1", " c #FFFFFFFFFFFF", ". c #000000000000", "X c #00000000FFFF", "o c #FFFF00000000", " ", " .. ", " . ................................. ", " .. . . ", " . . . ", " .. . ", " . . . ", " .. . . ", " .. ... . . ", " . . XX XX . ", " . . . X X . X X o. ", " . . .. X X X oo . ", " . . X X . X o X . ", " . .. . X X X o X. ", " . ..X X . X o X. ", " . . X X oo X. ", " .X X . o . ", " .X X oX . ", " .. .X X . o X . ", " .. X X oo X . ", " . ... . . . .X. . . o . X . . . . . ", " . X o X . ", " . X oo X . ", " .. X o X . ", " . o . X . ", " .. . oo X . ", " . .. o X . X......... . ", " .. . o X X. . . ", " . oo X . X . X ... .. . ", " .. o X X . .. . ", " . o X. X . .. . ", " .. . oo XX . o ... .. . ", " . ..o . . .. . ", " . .o .......... . ", " . . ........ . ", " .. . ", " . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . ", " . . ................................. ", " . ", " . . .. .. .. . . . . ", " . . . .. .. . . .. . .. ", " . . . . . . ... . . ", " ", " . . ", " . ", " . . ", " "}; */ /* XPM */ static char * plot_icon2[] = { "48 48 5 1", " c #FFFFFFFFFFFF", ". c #000000000000", "X c #00000000FFFF", "o c #FFFF00000000", "O c #0000FFFFFFFF", " ", " .. ", " . ................................. ", " .. . .. . ", " . . ... . ", " .. ... . ", " . ... . ", " .. . .... ... . ", " .. ... ..X ..... . ", " . . . X .. XX . ", " . . . X. X ... X X o. ", " . . .. X. X . X oo . ", " . . X. O X .. X o X . ", " . .. . X . OO X . X o X. ", " . ..X . O X .. X o X. ", " . . X . OO X . oo X. ", " .X . OO X . . o . ", " .X . X . oX . ", " .. .X .. .. . o X . ", " .. X .... oo X . ", " . ... . . . .X. . . o . X . . . . . ", " . X o X . ", " . X oo X . ", " .. X o X . ", " . o . X . ", " .. . oo X . ", " . .. o X . X......... . ", " .. . o X X. . . ", " . oo X . X . X ... .. . ", " .. o X X . .. . ", " . o X. X . .. . ", " .. . oo XX . o ... .. . ", " . ..o . . .. . ", " . .o .......... . ", " . . ........ . ", " .. . ", " . . . . . . . . . ", " . . . . . . . . . . . . . . . . . . ", " . . ................................. ", " . ", " . . .. .. .. . . . . ", " . . . .. .. . . .. . .. ", " . . . . . . ... . . ", " ", " . . ", " . ", " . . ", " "}; /* XPM */ /* static char * sheet_icon[] = { "48 48 3 1", " c #FFFFFFFFFFFF", ". c #000000000000", "X c #D6D6D6D6D6D6", " ", " ........................................... ", " .XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX. ", " .XXXXXXXXXXXXX.XXXXX...XXXXX.XXXX....XXXXX. ", " .XXXXXXXXXXXXX.XXXX.XXX.XXXX.XXXX.XXX.XXXX. ", " .XXXXXXXXXXXXX.XXXX.....XXXX.XXXX....XXXXX. ", " .XXXXXXXXXXXXX.XXXX.XXX.XXXX.XXXX.XXX.XXXX. ", " .XXXXXXXXXXXXX.XXXX.XXX.XXXX.XXXX....XXXXX. ", " .XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX. ", " ........................................... ", " .XXXXXXXXXXXXX. . . ", " .XXXXXX.XXXXXX. . . ", " .XXXXXX.XXXXXX. . . ", " .XXXXXX.XXXXXX. . . ", " .XXXXXX.XXXXXX. . . ", " .XXXXXXXXXXXXX. . . ", " ........................................... ", " .XXXXXXXXXXXXX. . . ", " .XXXXX....XXXX. . . ", " .XXXXXXX..XXXX. . . ", " .XXXXX..XXXXXX. . . ", " .XXXXX....XXXX. . . ", " .XXXXXXXXXXXXX. . . ", " ........................................... ", " .XXXXXXXXXXXXX. . . ", " .XXXXX....XXXX. . . ", " .XXXXXX..XXXXX. . . ", " .XXXXXXXX.XXXX. . . ", " .XXXXX....XXXX. . . ", " .XXXXXXXXXXXXX. . . ", " ........................................... ", " .XXXXXXXXXXXXX. . . ", " .XXXXX.XX.XXXX. . . ", " .XXXXX....XXXX. . . ", " .XXXXXXXX.XXXX. . . ", " .XXXXXXXX.XXXX. . . ", " .XXXXXXXXXXXXX. . . ", " ........................................... ", " .XXXXXXXXXXXXX. . . ", " .XXXXX....XXXX. . . ", " .XXXXX...XXXXX. . . ", " .XXXXXXXX.XXXX. . . ", " .XXXXX....XXXX. . . ", " .XXXXXXXXXXXXX. . . ", " ........................................... ", " ", " ", " "}; */ /* XPM */ static char * sheet_icon2[] = { "48 48 9 1", " c #FFFFFFFFFFFF", ". c #000000000000", "X c #D6D6D6D6D6D6", "o c #FFFF00000000", "O c #FFFF5E5EF3F3", "+ c #FFFF0000FFFF", "@ c #0000FFFFFFFF", "# c #FFFF91915555", "$ c #FFFFFFFF0000", " ", " ........................................... ", " .XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX. ", " .XXXXXXXXXXXXX.XXXXX...XXXXX.XXXX....XXXXX. ", " .XXXXXXXXXXXXX.XXXX.XXX.XXXX.XXXX.XXX.XXXX. ", " .XXXXXXXXXXXXX.XXXX.....XXXX.XXXX....XXXXX. ", " .XXXXXXXXXXXXX.XXXX.XXX.XXXX.XXXX.XXX.XXXX. ", " .XXXXXXXXXXXXX.XXXX.XXX.XXXX.XXXX....XXXXX. ", " .XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX. ", " ........................................... ", " .XXXXXXXXXXXXX. . . ", " .XXXXXX.XXXXXX. . ... . ", " .XXXXXX.XXXXXX. oo . .OO+. . ", " .XXXXXX.XXXXXX. oooooo . ...O. . ", " .XXXXXX.XXXXXX. oo . .@@@.. . ", " .XXXXXXXXXXXXX. . ...@@. . ", " ..............................###.@........ ", " .XXXXXXXXXXXXX. ..####. . ", " .XXXXX....XXXX. .####. . ", " .XXXXXXX..XXXX. oooooo .####. . ", " .XXXXX..XXXXXX. .####. . ", " .XXXXX....XXXX. .####. . ", " .XXXXXXXXXXXXX. .####. . ", " ...........................####............ ", " .XXXXXXXXXXXXX. .####. . ", " .XXXXX....XXXX. .####. oo . ", " .XXXXXX..XXXXX. .####. oo . ", " .XXXXXXXX.XXXX. .####. oo . ", " .XXXXX....XXXX. .####. oo . ", " .XXXXXXXXXXXXX. .####. . ", " .......................####................ ", " .XXXXXXXXXXXXX. .####.. . ", " .XXXXX.XX.XXXX. .####. . oo oo . ", " .XXXXX....XXXX. .####. . ooo . ", " .XXXXXXXX.XXXX. .####. . ooo . ", " .XXXXXXXX.XXXX. .####. . oo oo . ", " .XXXXXXXXXXXXX. ...##. . . ", " ....................$$.#................... ", " .XXXXXXXXXXXXX. .$$$. . . ", " .XXXXX....XXXX. ..$.. . ooooooo . ", " .XXXXX...XXXXX. ... . . ", " .XXXXXXXX.XXXX. . . ooooooo . ", " .XXXXX....XXXX. . . ", " .XXXXXXXXXXXXX. . . ", " ........................................... ", " ", " ", " "}; gtkextra-3.2.0/gtkextra/gtkdataentry.h0000644000076400001440000000672512603754176015016 00000000000000/* gtkdataentry - data entry widget, based on GtkEntry * Copyright 2011 Fredy Paquet * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) && !defined (__GTKEXTRA_H_INSIDE__) #error "Only can be included directly." #endif #ifndef __GTK_DATA_ENTRY_H__ #define __GTK_DATA_ENTRY_H__ #include G_BEGIN_DECLS #define GTK_TYPE_DATA_ENTRY (gtk_data_entry_get_type ()) #define GTK_DATA_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DATA_ENTRY, GtkDataEntry)) #define GTK_DATA_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATA_ENTRY, GtkDataEntryClass)) #define GTK_IS_DATA_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATA_ENTRY)) #define GTK_IS_DATA_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA_ENTRY)) #define GTK_DATA_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DATA_ENTRY, GtkDataEntryClass)) typedef struct _GtkDataEntry GtkDataEntry; typedef struct _GtkDataEntryClass GtkDataEntryClass; /** * GtkDataEntry: * * The GtkDataEntry struct contains only private data. It should * only be accessed through the functions described below. */ struct _GtkDataEntry { /*< private >*/ GtkEntry entry; gchar *data_type; /* data type for application use */ gchar *data_format; /* cell content formatting template */ gchar *description; /* column description */ gint max_length_bytes; /* maximum length in bytes */ }; struct _GtkDataEntryClass { GtkEntryClass parent_class; }; GType gtk_data_entry_get_type(void) G_GNUC_CONST; GtkDataEntry *gtk_data_entry_new(void); const gchar * gtk_data_entry_get_description(GtkDataEntry *data_entry); void gtk_data_entry_set_description(GtkDataEntry *data_entry, const gchar *description); const gchar* gtk_data_entry_get_data_type(GtkDataEntry *data_entry); void gtk_data_entry_set_data_type(GtkDataEntry *data_entry, const gchar *data_type); const gchar * gtk_data_entry_get_data_format(GtkDataEntry *data_entry); void gtk_data_entry_set_data_format(GtkDataEntry *data_entry, const gchar *data_format); const gchar* gtk_data_entry_get_text(GtkDataEntry *data_entry); void gtk_data_entry_set_text(GtkDataEntry *data_entry, const gchar *text); gint gtk_data_entry_get_max_length_bytes(GtkDataEntry *data_entry); void gtk_data_entry_set_max_length_bytes(GtkDataEntry *data_entry, gint max_length_bytes); G_END_DECLS #endif /* __GTK_DATA_ENTRY_H__ */ gtkextra-3.2.0/gtkextra/gtksheetcolumn.h0000644000076400001440000001750412603754176015346 00000000000000/* GtkSheetColumn widget for Gtk+. * Copyright 2011 Fredy Paquet * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) && !defined (__GTKEXTRA_H_INSIDE__) # error "Only can be included directly." #endif #ifndef __GTK_SHEET_COLUMN_H__ #define __GTK_SHEET_COLUMN_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ G_BEGIN_DECLS /** * GtkSheetColumn: * * The GtkSheetColumn struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkSheetColumn { /*< private >*/ GtkWidget parent; GtkSheet *sheet; /* the sheet this column belongs to */ gchar *title; gint width; guint16 requisition; gint left_xpixel; /* left edge of the column*/ gint max_extent_width; /* := max(Cell.extent.width) */ GtkSheetButton button; #if GTK_SHEET_OPTIMIZE_COLUMN_DRAW>0 gint left_text_column; /* min left column displaying text on this column */ gint right_text_column; /* max right column displaying text on this column */ #endif GtkJustification justification; /* horizontal text justification */ GtkSheetVerticalJustification vjust; /* vertical text justification */ gboolean is_key; /* marker for key columns */ gboolean is_readonly; /* flag to supersede cell.attributes.is_editable */ gchar *data_type; /* data type for application use */ gchar *data_format; /* cell content formatting template */ gchar *description; /* column description and further information about the column */ GType entry_type; /* Column entry_type or G_TYPE_NONE */ gint max_length; /* maximum character length */ gint max_length_bytes; /* maximum byte length */ GtkWrapMode wrap_mode; /* wrap-mode */ }; struct _GtkSheetColumnClass { GtkWidgetClass parent_class; /*< private >*/ }; #define G_TYPE_SHEET_COLUMN \ (gtk_sheet_column_get_type ()) #define GTK_SHEET_COLUMN(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SHEET_COLUMN, GtkSheetColumn)) #define GTK_IS_SHEET_COLUMN(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SHEET_COLUMN)) #define GTK_SHEET_COLUMN_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_SHEET_COLUMN, GtkSheetColumnClass)) #define GTK_IS_SHEET_COLUMN_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_SHEET_COLUMN)) #define GTK_SHEET_COLUMN_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_SHEET_COLUMN, GtkSheetColumnClass)) #define GTK_SHEET_COLUMN_MIN_WIDTH 10 #define GTK_SHEET_COLUMN_DEFAULT_WIDTH 80 #define GTK_SHEET_COLUMN_DEFAULT_JUSTIFICATION GTK_JUSTIFY_LEFT #define GTK_SHEET_COLUMN_IS_VISIBLE(colptr) \ (gtk_widget_get_visible(GTK_WIDGET(colptr))) #define GTK_SHEET_COLUMN_SET_VISIBLE(colptr, value) \ (gtk_widget_set_visible(GTK_WIDGET(colptr), value)) #define GTK_SHEET_COLUMN_IS_SENSITIVE(colptr) \ (gtk_widget_is_sensitive(GTK_WIDGET(colptr))) #define GTK_SHEET_COLUMN_SET_SENSITIVE(colptr, value) \ (gtk_widget_set_sensitive(GTK_WIDGET(colptr), value)) /* methods */ GType gtk_sheet_column_get_type(void); GtkSheetColumn *gtk_sheet_column_get(GtkSheet *sheet, gint col); gint gtk_sheet_column_get_index(GtkSheetColumn *colobj); /* set column width */ void gtk_sheet_set_column_width(GtkSheet *sheet, gint column, guint width); const gint gtk_sheet_get_column_width(GtkSheet *sheet, gint column); void gtk_sheet_column_set_justification(GtkSheet *sheet, gint col, GtkJustification just); GtkJustification gtk_sheet_column_get_justification(GtkSheet *sheet, gint col); void gtk_sheet_column_set_vjustification(GtkSheet *sheet, gint col, GtkSheetVerticalJustification vjust); GtkSheetVerticalJustification gtk_sheet_column_get_vjustification(GtkSheet *sheet, gint col); /* column properties */ gboolean gtk_sheet_column_get_iskey(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_iskey(GtkSheet *sheet, const gint col, const gboolean is_key); gboolean gtk_sheet_column_get_readonly(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_readonly(GtkSheet *sheet, const gint col, const gboolean is_readonly); gchar *gtk_sheet_column_get_format(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_format(GtkSheet *sheet, const gint col, const gchar *format); gchar *gtk_sheet_column_get_datatype(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_datatype(GtkSheet *sheet, const gint col, const gchar *data_type); gchar *gtk_sheet_column_get_description(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_description(GtkSheet *sheet, const gint col, const gchar *description); GType gtk_sheet_column_get_entry_type(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_entry_type(GtkSheet *sheet, const gint col, const GType entry_type); /* column tooltips */ gchar *gtk_sheet_column_get_tooltip_markup(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_tooltip_markup(GtkSheet *sheet, const gint col, const gchar *markup); gchar *gtk_sheet_column_get_tooltip_text(GtkSheet *sheet, const gint col); void gtk_sheet_column_set_tooltip_text(GtkSheet *sheet, const gint col, const gchar *text); /* column button sensitivity */ gboolean gtk_sheet_column_sensitive(GtkSheet *sheet, gint column); void gtk_sheet_column_set_sensitivity(GtkSheet *sheet, gint column, gboolean sensitive); void gtk_sheet_columns_set_sensitivity(GtkSheet *sheet, gboolean sensitive); /* column resizeability */ gboolean gtk_sheet_columns_resizable(GtkSheet *sheet); void gtk_sheet_columns_set_resizable(GtkSheet *sheet, gboolean resizable); /* column visibility */ gboolean gtk_sheet_column_visible(GtkSheet *sheet, gint column); void gtk_sheet_column_set_visibility(GtkSheet *sheet, gint column, gboolean visible); void gtk_sheet_column_button_justify(GtkSheet *sheet, gint col, GtkJustification justification); const gchar *gtk_sheet_column_button_get_label(GtkSheet *sheet, gint col); void gtk_sheet_column_label_set_visibility(GtkSheet *sheet, gint col, gboolean visible); void gtk_sheet_columns_labels_set_visibility(GtkSheet *sheet, gboolean visible); void gtk_sheet_column_button_add_label(GtkSheet *sheet, gint col, const gchar *label); void gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height); void gtk_sheet_show_column_titles(GtkSheet *sheet); void gtk_sheet_hide_column_titles(GtkSheet *sheet); gboolean gtk_sheet_column_titles_visible(GtkSheet *sheet); const gchar *gtk_sheet_get_column_title(GtkSheet *sheet, gint column); void gtk_sheet_set_column_title(GtkSheet *sheet, gint column, const gchar *title); /*< private >*/ gint _gtk_sheet_column_left_xpixel(GtkSheet *sheet, gint col); gint _gtk_sheet_column_right_xpixel(GtkSheet *sheet, gint col); void _gtk_sheet_column_size_request(GtkSheet *sheet, gint col, guint *requisition); void _gtk_sheet_column_buttons_size_allocate(GtkSheet *sheet); void _gtk_sheet_column_button_set(GtkSheet *sheet, gint col); void _gtk_sheet_column_button_release(GtkSheet *sheet, gint col); G_END_DECLS #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_SHEET_COLUMN_H__ */ gtkextra-3.2.0/gtkextra/gtkplotcanvasrectangle.c0000644000076400001440000002555012603754176017052 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotcanvasrectangle * @short_description: * * FIXME:: need long description */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotgdk.h" #include "gtkplotps.h" #define P_(string) string enum { ARG_0, ARG_LINE, ARG_FILLED, ARG_BORDER, ARG_SHADOW_WIDTH, ARG_BG }; static void gtk_plot_canvas_rectangle_init (GtkPlotCanvasRectangle *rectangle); static void gtk_plot_canvas_rectangle_class_init(GtkPlotCanvasChildClass *klass); static void gtk_plot_canvas_rectangle_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_rectangle_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y); static void gtk_plot_canvas_rectangle_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); static void gtk_plot_canvas_rectangle_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_rectangle_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); extern gint roundint (gdouble x); static GtkPlotCanvasChildClass *parent_class = NULL; GType gtk_plot_canvas_rectangle_get_type (void) { static GType plot_canvas_rectangle_type = 0; if (!plot_canvas_rectangle_type) { plot_canvas_rectangle_type = g_type_register_static_simple ( gtk_plot_canvas_child_get_type(), "GtkPlotCanvasRectangle", sizeof (GtkPlotCanvasRectangleClass), (GClassInitFunc) gtk_plot_canvas_rectangle_class_init, sizeof (GtkPlotCanvasRectangle), (GInstanceInitFunc) gtk_plot_canvas_rectangle_init, 0); } return plot_canvas_rectangle_type; } static void gtk_plot_canvas_rectangle_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCanvasRectangle *rectangle = GTK_PLOT_CANVAS_RECTANGLE (object); switch(prop_id){ case ARG_LINE: g_value_set_pointer(value, &rectangle->line); break; case ARG_FILLED: g_value_set_boolean(value, rectangle->filled); break; case ARG_BORDER: g_value_set_int(value, rectangle->border); break; case ARG_SHADOW_WIDTH: g_value_set_int(value, rectangle->shadow_width); break; case ARG_BG: g_value_set_pointer(value, &rectangle->bg); break; } } static void gtk_plot_canvas_rectangle_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCanvasRectangle *rectangle = GTK_PLOT_CANVAS_RECTANGLE (object); switch(prop_id){ case ARG_LINE: rectangle->line = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_FILLED: rectangle->filled = g_value_get_boolean(value); break; case ARG_BORDER: rectangle->border = g_value_get_int(value); break; case ARG_SHADOW_WIDTH: rectangle->shadow_width = g_value_get_int(value); break; case ARG_BG: rectangle->bg = *((GdkColor *)g_value_get_pointer(value)); break; } } GtkPlotCanvasChild* gtk_plot_canvas_rectangle_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill) { GtkPlotCanvasRectangle *rectangle; rectangle = g_object_new (gtk_plot_canvas_rectangle_get_type (), NULL); rectangle->line.line_width = width; if(fg) rectangle->line.color = *fg; if(bg) rectangle->bg = *bg; rectangle->border = border; rectangle->filled = fill; return GTK_PLOT_CANVAS_CHILD (rectangle); } static void gtk_plot_canvas_rectangle_init (GtkPlotCanvasRectangle *rectangle) { gdk_color_black(gdk_colormap_get_system(), &rectangle->line.color); gdk_color_white(gdk_colormap_get_system(), &rectangle->bg); rectangle->line.line_style = GTK_PLOT_LINE_SOLID; rectangle->line.line_width = 0; rectangle->shadow_width = 3; rectangle->border = GTK_PLOT_BORDER_LINE; rectangle->filled = TRUE; } static void gtk_plot_canvas_rectangle_class_init (GtkPlotCanvasChildClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_canvas_child_get_type ()); klass->draw = gtk_plot_canvas_rectangle_draw; klass->move = gtk_plot_canvas_rectangle_move; klass->move_resize = gtk_plot_canvas_rectangle_resize; gobject_class->get_property = gtk_plot_canvas_rectangle_get_property; gobject_class->set_property = gtk_plot_canvas_rectangle_set_property; /** * GtkPlotCanvasRectangle:line: * * **/ g_object_class_install_property (gobject_class, ARG_LINE, g_param_spec_pointer ("line", P_("Line Attributes"), P_("Line Attributes"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasRectangle:filled: * * **/ g_object_class_install_property (gobject_class, ARG_FILLED, g_param_spec_boolean ("filled", P_("Filled"), P_("Fill Figure"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasRectangle:border: * * **/ g_object_class_install_property (gobject_class, ARG_BORDER, g_param_spec_int ("border", P_("Border"), P_("Border Width"), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasRectangle:shadow_width: * * **/ g_object_class_install_property (gobject_class, ARG_SHADOW_WIDTH, g_param_spec_int ("shadow_width", P_("Shadow Width"), P_("Shadow Width"), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasRectangle:color_bg: * * **/ g_object_class_install_property (gobject_class, ARG_BG, g_param_spec_pointer ("color_bg", P_("Filling Color"), P_("Filling Color"), G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_canvas_rectangle_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasRectangle *rectangle = GTK_PLOT_CANVAS_RECTANGLE(child); gint width = child->allocation.width; gint height = child->allocation.height; gdouble m = canvas->magnification; if(width == 0 && height == 0) return; if(rectangle->filled){ gtk_plot_pc_set_color(canvas->pc, &rectangle->bg); gtk_plot_pc_draw_rectangle(canvas->pc, TRUE, child->allocation.x, child->allocation.y, width, height); } if(rectangle->line.line_style != GTK_PLOT_LINE_NONE && rectangle->border != GTK_PLOT_BORDER_NONE){ gtk_plot_canvas_set_line_attributes(canvas, rectangle->line); gtk_plot_pc_draw_rectangle(canvas->pc, FALSE, child->allocation.x, child->allocation.y, width, height); if(rectangle->border == GTK_PLOT_BORDER_SHADOW){ gtk_plot_pc_draw_rectangle(canvas->pc, TRUE, child->allocation.x + roundint(rectangle->shadow_width * m), child->allocation.y + height, width, roundint(rectangle->shadow_width * m)); gtk_plot_pc_draw_rectangle(canvas->pc, TRUE, child->allocation.x + width, child->allocation.y + roundint(rectangle->shadow_width * m), roundint(rectangle->shadow_width * m), height); } } } static void gtk_plot_canvas_rectangle_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y) { return; } static void gtk_plot_canvas_rectangle_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { return; } /** * gtk_plot_canvas_rectangle_set_attributes: * @rectangle: a #GtkPlotCanvasRectangle * @style: * @width: * @fg: * @bg: * @border: * @fill: * * */ void gtk_plot_canvas_rectangle_set_attributes(GtkPlotCanvasRectangle *rectangle, GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill) { if(fg) rectangle->line.color = *fg; if(bg) rectangle->bg = *bg; rectangle->line.line_width = width; rectangle->line.line_style = style; rectangle->border = border; rectangle->filled = fill; } gtkextra-3.2.0/gtkextra/gtkplotpc.h0000644000076400001440000002236612603754176014323 00000000000000/* gtkplotpc - gtkplot print context - a renderer for printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_PC_H__ #define __GTK_PLOT_PC_H__ #include #include "gtkpsfont.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_PLOT_PC(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_pc_get_type (), GtkPlotPC) #define GTK_TYPE_PLOT_PC (gtk_plot_pc_get_type ()) #define GTK_PLOT_PC_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_pc_get_type(), GtkPlotPCClass) #define GTK_IS_PLOT_PC(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_pc_get_type ()) /* Page size */ typedef enum{ GTK_PLOT_LETTER , GTK_PLOT_LEGAL , GTK_PLOT_A4 , GTK_PLOT_EXECUTIVE , GTK_PLOT_CUSTOM } GtkPlotPageSize; #define GTK_PLOT_LETTER_W 612 /* Width and Height in ps points */ #define GTK_PLOT_LETTER_H 792 #define GTK_PLOT_LEGAL_W 612 #define GTK_PLOT_LEGAL_H 1008 #define GTK_PLOT_A4_W 595 #define GTK_PLOT_A4_H 842 #define GTK_PLOT_EXECUTIVE_W 540 #define GTK_PLOT_EXECUTIVE_H 720 /* Page orientation */ typedef enum{ GTK_PLOT_PORTRAIT , GTK_PLOT_LANDSCAPE } GtkPlotPageOrientation; /* Size units */ typedef enum{ GTK_PLOT_PSPOINTS , GTK_PLOT_MM , GTK_PLOT_CM , GTK_PLOT_INCHES } GtkPlotUnits; typedef struct _GtkPlotPC GtkPlotPC; typedef struct _GtkPlotPCClass GtkPlotPCClass; typedef struct _GtkPlotPoint GtkPlotPoint; /** * GtkPlotPoint: * * The GtkPlotPoint struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotPoint { /*< private >*/ gdouble x, y; }; struct _GtkPlotPC { GtkObject object; gdouble width, height; /* viewport */ GdkColor color; gint init_count; gboolean use_pixmap; }; struct _GtkPlotPCClass { GtkObjectClass parent_class; gboolean (* init) (GtkPlotPC *pc); void (* leave) (GtkPlotPC *pc); void (* set_viewport) (GtkPlotPC *pc, gdouble w, gdouble h); void (* gsave) (GtkPlotPC *pc); void (* grestore) (GtkPlotPC *pc); void (* clip) (GtkPlotPC *pc, const GdkRectangle *area); void (* clip_mask) (GtkPlotPC *pc, gdouble x, gdouble y, const GdkBitmap *mask); void (* set_color) (GtkPlotPC *pc, const GdkColor *color); void (* set_lineattr) (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); void (* set_dash) (GtkPlotPC *pc, gdouble offset_, gdouble *values, gint num_values); void (* draw_point) (GtkPlotPC *pc, gdouble x, gdouble y); void (* draw_line) (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void (* draw_lines) (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints); void (* draw_rectangle) (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); void (* draw_polygon) (GtkPlotPC *pc, gboolean filled, GtkPlotPoint *points, gint numpoints); void (* draw_circle) (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble size); void (* draw_ellipse) (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); void (* set_font) (GtkPlotPC *pc, GtkPSFont *psfont, gint height); void (* draw_string) (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text); void (* draw_pixmap) (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y); }; GType gtk_plot_pc_get_type (void); GtkObject *gtk_plot_pc_new (void); gboolean gtk_plot_pc_init (GtkPlotPC *pc); void gtk_plot_pc_leave (GtkPlotPC *pc); void gtk_plot_pc_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h); void gtk_plot_pc_gsave (GtkPlotPC *pc); void gtk_plot_pc_grestore (GtkPlotPC *pc); void gtk_plot_pc_clip (GtkPlotPC *pc, GdkRectangle *area); void gtk_plot_pc_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, GdkBitmap *mask); void gtk_plot_pc_set_color (GtkPlotPC *pc, GdkColor *color); void gtk_plot_pc_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); void gtk_plot_pc_set_dash (GtkPlotPC *pc, gdouble offset_, gdouble *values, gint num_values); void gtk_plot_pc_draw_point (GtkPlotPC *pc, gdouble x, gdouble y); void gtk_plot_pc_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_pc_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints); void gtk_plot_pc_draw_rectangle (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); void gtk_plot_pc_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints); void gtk_plot_pc_draw_ellipse (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); void gtk_plot_pc_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size); void gtk_plot_pc_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height); void gtk_plot_pc_draw_string (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text); void gtk_plot_pc_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_PC_H__ */ gtkextra-3.2.0/gtkextra/gtkcharsel.h0000644000076400001440000000460212603754176014434 00000000000000/* gtkcharselection - character selection dialog for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_CHAR_SELECTION_H__ #define __GTK_CHAR_SELECTION_H__ #include #include #include "gtkpsfont.h" #include "gtkfontcombo.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define G_TYPE_CHAR_SELECTION (gtk_char_selection_get_type ()) #define GTK_CHAR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_CHAR_SELECTION, GtkCharSelection)) #define GTK_CHAR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_CHAR_SELECTION, GtkCharSelectionClass)) #define GTK_IS_CHAR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_CHAR_SELECTION)) #define GTK_IS_CHAR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), G_TYPE_CHAR_SELECTION)) typedef struct _GtkCharSelection GtkCharSelection; typedef struct _GtkCharSelectionClass GtkCharSelectionClass; struct _GtkCharSelection { GtkWindow window; GtkFontCombo *font_combo; GtkTable *table; GtkToggleButton *button[256]; gint selection; GtkWidget *ok_button; GtkWidget *cancel_button; GtkWidget *action_area; }; struct _GtkCharSelectionClass { GtkWindowClass parent_class; }; GType gtk_char_selection_get_type (void); GtkWidget* gtk_char_selection_new (void); void gtk_char_selection_set_selection (GtkCharSelection *charsel, gint selection); gint gtk_char_selection_get_selection (GtkCharSelection *charsel); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_CHAR_SELECTION_H__ */ gtkextra-3.2.0/gtkextra/gtkplotgdk.c0000644000076400001440000011432712603754176014460 00000000000000/* gtkplotpc - gtkplot print context - a renderer for printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotgdk * @short_description: GDK drawing backend (mapped to Cairo) * * This Subclass of #GtkPlotPC has been rewritten to use Cairo * drawing routines. */ #include #include #include #include #include #include #include #include #include "gtkplotpc.h" #include "gtkplotgdk.h" #include "gtkplot.h" #include "gtkpsfont.h" #include "gtkplotcanvas.h" #include static void gtk_plot_gdk_init (GtkPlotGdk *pc); static void gtk_plot_gdk_class_init (GtkPlotGdkClass *klass); static void gtk_plot_gdk_finalize (GObject *object); static void gtk_plot_gdk_real_set_drawable (GtkPlotGdk *gdk, GdkDrawable *drawable); static gboolean gtk_plot_gdk_real_init (GtkPlotPC *pc); static void gtk_plot_gdk_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h); static void gtk_plot_gdk_leave (GtkPlotPC *pc); static void gtk_plot_gdk_gsave (GtkPlotPC *pc); static void gtk_plot_gdk_grestore (GtkPlotPC *pc); static void gtk_plot_gdk_clip (GtkPlotPC *pc, const GdkRectangle *area); static void gtk_plot_gdk_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, const GdkBitmap *mask); static void gtk_plot_gdk_set_color (GtkPlotPC *pc, const GdkColor *color); static void gtk_plot_gdk_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); static void gtk_plot_gdk_set_dash (GtkPlotPC *pc, gdouble offset_, gdouble *values, gint num_values); static void gtk_plot_gdk_draw_point (GtkPlotPC *pc, gdouble x, gdouble y); static void gtk_plot_gdk_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2); static void gtk_plot_gdk_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints); static void gtk_plot_gdk_draw_rectangle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height); static void gtk_plot_gdk_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints); static void gtk_plot_gdk_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size); static void gtk_plot_gdk_draw_ellipse (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height); static void gtk_plot_gdk_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height); static void gtk_plot_gdk_draw_string (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text); static void gtk_plot_gdk_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y); static GdkPixmap * scale_pixmap (GdkWindow *window, GdkPixmap *pixmap, gdouble scale_x, gdouble scale_y); static GdkBitmap * scale_bitmap (GdkWindow *window, GdkBitmap *bitmap, gdouble scale_x, gdouble scale_y); extern gint roundint (gdouble x); static GtkPlotPCClass *parent_class = NULL; GType gtk_plot_gdk_get_type (void) { static GType pc_type = 0; if (!pc_type) { pc_type = g_type_register_static_simple ( GTK_TYPE_PLOT_PC, "GtkPlotGdk", sizeof (GtkPlotGdkClass), (GClassInitFunc) gtk_plot_gdk_class_init, sizeof (GtkPlotGdk), (GInstanceInitFunc) gtk_plot_gdk_init, 0); } return pc_type; } static void gtk_plot_gdk_init (GtkPlotGdk *pc) { /* GdkWindowAttr attributes; gint attributes_mask; GdkScreen *screen; attributes.window_type = GDK_WINDOW_CHILD; attributes.title = NULL; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gdk_visual_get_system (); attributes.colormap = gdk_colormap_get_system (); attributes.event_mask = 0; attributes_mask = GDK_WA_VISUAL | GDK_WA_COLORMAP; */ pc->gc = NULL; pc->drawable = NULL; pc->ref_count = 0; pc->text_direction = GTK_TEXT_DIR_LTR; /* pc->window = gdk_window_new (NULL, &attributes, attributes_mask); screen = gdk_screen_get_default (); pc->context = gdk_pango_context_get (); */ /* pango_context_set_base_dir (pc->context, pc->text_direction == GTK_TEXT_DIR_LTR ? PANGO_DIRECTION_LTR : PANGO_DIRECTION_RTL); */ /* pango_context_set_language (pc->context, gtk_get_default_language ()); pc->layout = pango_layout_new(pc->context); */ } static void gtk_plot_gdk_class_init (GtkPlotGdkClass *klass) { GtkObjectClass *object_class; GObjectClass *gobject_class; GtkPlotPCClass *pc_class; GtkPlotGdkClass *gdk_class; parent_class = g_type_class_ref (gtk_plot_pc_get_type ()); object_class = (GtkObjectClass *) klass; gobject_class = (GObjectClass *) klass; pc_class = (GtkPlotPCClass *) klass; gdk_class = (GtkPlotGdkClass *) klass; gobject_class->finalize = gtk_plot_gdk_finalize; gdk_class->set_drawable = gtk_plot_gdk_real_set_drawable; pc_class->init = gtk_plot_gdk_real_init; pc_class->leave = gtk_plot_gdk_leave; pc_class->set_viewport = gtk_plot_gdk_set_viewport; pc_class->gsave = gtk_plot_gdk_gsave; pc_class->grestore = gtk_plot_gdk_grestore; pc_class->clip = gtk_plot_gdk_clip; pc_class->clip_mask = gtk_plot_gdk_clip_mask; pc_class->set_color = gtk_plot_gdk_set_color; pc_class->set_dash = gtk_plot_gdk_set_dash; pc_class->set_lineattr = gtk_plot_gdk_set_lineattr; pc_class->draw_point = gtk_plot_gdk_draw_point; pc_class->draw_line = gtk_plot_gdk_draw_line; pc_class->draw_lines = gtk_plot_gdk_draw_lines; pc_class->draw_rectangle = gtk_plot_gdk_draw_rectangle; pc_class->draw_polygon = gtk_plot_gdk_draw_polygon; pc_class->draw_circle = gtk_plot_gdk_draw_circle; pc_class->draw_ellipse = gtk_plot_gdk_draw_ellipse; pc_class->set_font = gtk_plot_gdk_set_font; pc_class->draw_string = gtk_plot_gdk_draw_string; pc_class->draw_pixmap = gtk_plot_gdk_draw_pixmap; } /** * gtk_plot_gdk_new: * @widget: * * * * Return value: */ GtkObject * gtk_plot_gdk_new (GtkWidget *widget) { GtkObject *object; object = g_object_new(gtk_plot_gdk_get_type(), NULL); gtk_plot_gdk_construct(GTK_PLOT_GDK(object), widget); return (object); } /** * gtk_plot_gdk_construct: * @pc: * @widget: * * */ void gtk_plot_gdk_construct(GtkPlotGdk *pc, GtkWidget *widget) { pc->window = gtk_widget_get_window(widget); pc->context = gtk_widget_get_pango_context (widget); g_object_ref(G_OBJECT(pc->context)); pc->layout = pango_layout_new(pc->context); } static void gtk_plot_gdk_finalize (GObject *object) { GtkPlotGdk *pc = GTK_PLOT_GDK(object); GTK_PLOT_GDK(object)->window = NULL; if(GTK_PLOT_GDK(object)->ref_count > 0 && GTK_PLOT_GDK(object)->gc){ gdk_gc_destroy(GTK_PLOT_GDK(object)->gc); GTK_PLOT_GDK(object)->gc = NULL; } if(pc->layout) g_object_unref(G_OBJECT(pc->layout)); pc->layout = NULL; if(pc->context) g_object_unref(G_OBJECT(pc->context)); pc->context = NULL; } static void gtk_plot_gdk_real_set_drawable(GtkPlotGdk *pc, GdkDrawable *drawable) { pc->drawable = drawable; } static gboolean gtk_plot_gdk_real_init (GtkPlotPC *pc) { return TRUE; } static void gtk_plot_gdk_leave (GtkPlotPC *pc) { } /** * gtk_plot_gdk_set_drawable: * @gdk: * @drawable: * * */ void gtk_plot_gdk_set_drawable (GtkPlotGdk *gdk, GdkDrawable *drawable) { GTK_PLOT_GDK_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(gdk)))->set_drawable(gdk, drawable); } static void gtk_plot_gdk_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h) { } static void gtk_plot_gdk_gsave (GtkPlotPC *pc) { if(GTK_PLOT_GDK(pc)->gc) gdk_gc_ref(GTK_PLOT_GDK(pc)->gc); else{ if(GTK_PLOT_GDK(pc)->drawable) GTK_PLOT_GDK(pc)->gc = gdk_gc_new(GTK_PLOT_GDK(pc)->drawable); } GTK_PLOT_GDK(pc)->ref_count++; } static void gtk_plot_gdk_grestore (GtkPlotPC *pc) { if(GTK_PLOT_GDK(pc)->gc) gdk_gc_unref(GTK_PLOT_GDK(pc)->gc); GTK_PLOT_GDK(pc)->ref_count--; if(GTK_PLOT_GDK(pc)->ref_count == 0) GTK_PLOT_GDK(pc)->gc = NULL; } static void gtk_plot_gdk_clip (GtkPlotPC *pc, const GdkRectangle *area) { if(!GTK_PLOT_GDK(pc)->gc) return; /* discard GdkRectangle* const: * gdk_gc_set_clip_rectangle should have a const arg. * I've checked the code and it doesn't change it or keep it. murrayc. */ gdk_gc_set_clip_rectangle(GTK_PLOT_GDK(pc)->gc, (GdkRectangle*)area); } static void gtk_plot_gdk_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, const GdkBitmap *mask) { if(!GTK_PLOT_GDK(pc)->gc) return; if(x >= 0 && y >= 0) gdk_gc_set_clip_origin(GTK_PLOT_GDK(pc)->gc, x, y); gdk_gc_set_clip_mask(GTK_PLOT_GDK(pc)->gc, (GdkBitmap*)mask); } static void gtk_plot_gdk_set_color (GtkPlotPC *pc, const GdkColor *color) { GdkColor new_color; if(!GTK_PLOT_GDK(pc)->gc) return; new_color = *color; gdk_color_alloc(gdk_colormap_get_system(), &new_color); gdk_gc_set_foreground(GTK_PLOT_GDK(pc)->gc, &new_color); } static void gtk_plot_gdk_set_dash (GtkPlotPC *pc, gdouble offset, gdouble *values, gint num_values) { gint list[] = {0, 1, 2, 3, 4, 5, 6, 7}; gint8 dash[1000]; gint i; if(!GTK_PLOT_GDK(pc)->gc) return; if(num_values == 0){ return; } for(i = 0; i < num_values; i++){ gint value; value = values[i]; dash[i] = list[value]; } gdk_gc_set_dashes(GTK_PLOT_GDK(pc)->gc, 0, dash, num_values); } static void gtk_plot_gdk_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style) { if(!GTK_PLOT_GDK(pc)->gc) return; gdk_gc_set_line_attributes(GTK_PLOT_GDK(pc)->gc, roundint(line_width), line_style, cap_style, join_style); } static void gtk_plot_gdk_draw_point (GtkPlotPC *pc, gdouble x, gdouble y) { if(!GTK_PLOT_GDK(pc)->gc) return; if(!GTK_PLOT_GDK(pc)->drawable) return; gdk_draw_point(GTK_PLOT_GDK(pc)->drawable, GTK_PLOT_GDK(pc)->gc, roundint(x), roundint(y)); } static void gtk_plot_gdk_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { if(!GTK_PLOT_GDK(pc)->gc) return; if(!GTK_PLOT_GDK(pc)->drawable) return; gdk_draw_line(GTK_PLOT_GDK(pc)->drawable, GTK_PLOT_GDK(pc)->gc, roundint(x1), roundint(y1), roundint(x2), roundint(y2)); } static void gtk_plot_gdk_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints) { GdkPoint *p = NULL; gint i; if(!GTK_PLOT_GDK(pc)->gc) return; if(!GTK_PLOT_GDK(pc)->drawable) return; p = (GdkPoint *)g_malloc(numpoints * sizeof(GdkPoint)); for(i = 0; i < numpoints; i++){ p[i].x = roundint(points[i].x); p[i].y = roundint(points[i].y); } gdk_draw_lines(GTK_PLOT_GDK(pc)->drawable, GTK_PLOT_GDK(pc)->gc, p, numpoints); g_free(p); } static void gtk_plot_gdk_draw_rectangle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height) { if(!GTK_PLOT_GDK(pc)->gc) return; if(!GTK_PLOT_GDK(pc)->drawable) return; gdk_draw_rectangle (GTK_PLOT_GDK(pc)->drawable, GTK_PLOT_GDK(pc)->gc, filled, roundint(x), roundint(y), roundint(width), roundint(height)); } static void gtk_plot_gdk_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints) { GdkPoint *p = NULL; gint i; if(!GTK_PLOT_GDK(pc)->gc) return; if(!GTK_PLOT_GDK(pc)->drawable) return; p = (GdkPoint *)g_malloc(numpoints * sizeof(GdkPoint)); for(i = 0; i < numpoints; i++){ p[i].x = roundint(points[i].x); p[i].y = roundint(points[i].y); } gdk_draw_polygon(GTK_PLOT_GDK(pc)->drawable, GTK_PLOT_GDK(pc)->gc, filled, p, numpoints); g_free(p); } static void gtk_plot_gdk_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size) { if(!GTK_PLOT_GDK(pc)->gc) return; if(!GTK_PLOT_GDK(pc)->drawable) return; gdk_draw_arc (GTK_PLOT_GDK(pc)->drawable, GTK_PLOT_GDK(pc)->gc, filled, roundint(x-size/2.0), roundint(y-size/2.0), roundint(size), roundint(size), 0, 25000); } static void gtk_plot_gdk_draw_ellipse (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height) { if(!GTK_PLOT_GDK(pc)->gc) return; if(!GTK_PLOT_GDK(pc)->drawable) return; gdk_draw_arc (GTK_PLOT_GDK(pc)->drawable, GTK_PLOT_GDK(pc)->gc, filled, roundint(x), roundint(y), roundint(width), roundint(height), 0, 25000); } static void gtk_plot_gdk_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height) { } /* subfunction of gtk_plot_gdk_draw_string(). */ static gint drawstring(GtkPlotPC *pc, GdkDrawable *drawable, GdkGC *gc, gint angle, gint dx, gint dy, GtkPSFont *psfont, gint height, const gchar *text) { PangoFontDescription *font; PangoRectangle rect; gint ret_value; if(!text || strlen(text) == 0) return 0; font = gtk_psfont_get_font_description(psfont, height); pango_layout_set_font_description(GTK_PLOT_GDK(pc)->layout, font); pango_layout_set_text(GTK_PLOT_GDK(pc)->layout, text, strlen(text)); pango_layout_get_extents(GTK_PLOT_GDK(pc)->layout, NULL, &rect); if (psfont->i18n_latinfamily && psfont->vertical) { /* vertical-writing CJK postscript fonts. */ return rect.height; } else { /* horizontal writing */ if(angle == 90) gdk_draw_layout (drawable, gc, dx, dy-PANGO_PIXELS(rect.width), GTK_PLOT_GDK(pc)->layout); else if(angle == 180) gdk_draw_layout (drawable, gc, dx-PANGO_PIXELS(rect.width), dy, GTK_PLOT_GDK(pc)->layout); else gdk_draw_layout (drawable, gc, dx, dy, GTK_PLOT_GDK(pc)->layout); /* gdk_draw_layout (GTK_PLOT_GDK(pc)->drawable, gc, dx, dy, GTK_PLOT_GDK(pc)->layout); */ } if (font) pango_font_description_free(font); ret_value = (angle == 0 || angle == 180) ? rect.width : rect.height; return PANGO_PIXELS(rect.width); } static void gtk_plot_gdk_draw_string (GtkPlotPC *pc, gint tx, gint ty, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font_name, gint font_height, GtkJustification just, const gchar *text) { GdkGC *gc; GList *family = NULL; gint x0, y0; gint old_width, old_height; gboolean bold, italic; gint fontsize; gint ascent, descent; gint numf; gint width, height; gint x, y; gint i; PangoFontDescription *font = NULL, *latin_font = NULL; GtkPSFont *psfont, *base_psfont, *latin_psfont; gchar subs[2], insert_char; const gchar *aux = text; const gchar *lastchar = text; const gchar *wtext = text; const gchar *xaux = text; gchar *new_text; /* Support Tiny C compiler : Original : gchar new_text[strlen(text)+1];*/ gchar num[4]; PangoRectangle rect; PangoFontMetrics *metrics = NULL; PangoLayout *layout = NULL; gint real_x, real_y, real_width, real_height; GdkColor real_fg = *fg; GdkColor real_bg = *bg; PangoMatrix matrix = PANGO_MATRIX_INIT; PangoContext *context = GTK_PLOT_GDK(pc)->context; GdkDrawable *drawable = GTK_PLOT_GDK(pc)->drawable; gint sign_x = 1, sign_y = 0; gint old_tx = tx, old_ty = ty; if(!GTK_PLOT_GDK(pc)->drawable) return; if(!GTK_PLOT_GDK(pc)->gc) return; if(!text || strlen(text) == 0) return; gc = GTK_PLOT_GDK(pc)->gc; layout = GTK_PLOT_GDK(pc)->layout; if(!gc) return; gtk_plot_text_get_size(text, angle, font_name, font_height, &width, &height, &ascent, &descent); if(height == 0 || width == 0) return; old_width = width; old_height = height; if(angle == 90 || angle == 270) { old_width = height; old_height = width; } switch(angle){ case 90: sign_x = 0; sign_y = -1; break; case 180: sign_x = -1; sign_y = 0; break; case 270: sign_x = 0; sign_y = 1; break; case 0: default: sign_x = 1; sign_y = 0; break; } switch(just){ case GTK_JUSTIFY_LEFT: switch(angle){ case 0: ty -= ascent; break; case 90: ty -= height; tx -= ascent; break; case 180: tx -= width; ty -= descent; break; case 270: tx -= descent; break; } old_tx = tx; old_ty = ty; break; case GTK_JUSTIFY_RIGHT: switch(angle){ case 0: tx -= width; ty -= ascent; old_tx -= width; old_ty -= ascent; break; case 90: tx -= ascent; ty += height; old_tx -= ascent; break; case 180: tx += width; ty -= descent; old_ty -= descent; break; case 270: tx -= descent; old_tx -= descent; old_ty -= height; break; } break; case GTK_JUSTIFY_CENTER: default: switch(angle){ case 0: tx -= width / 2.; ty -= ascent; old_tx -= width / 2.; old_ty -= ascent; break; case 90: tx -= ascent; ty += height / 2.; old_tx -= ascent; old_ty -= height / 2.; break; case 180: tx += width / 2.; ty -= descent; old_tx -= width / 2.; old_ty -= descent; break; case 270: tx -= descent; ty -= height / 2.; old_tx -= descent; old_ty -= height / 2.; break; } } real_x = tx; real_y = ty; real_width = width; real_height = height; pango_matrix_rotate (&matrix, angle); pango_context_set_matrix (context, &matrix); pango_layout_context_changed (layout); if(!transparent){ gdk_gc_set_foreground(gc, &real_bg); gdk_draw_rectangle(drawable, gc, TRUE, old_tx, old_ty, old_width, old_height); } /* TEST */ /* gdk_draw_rectangle(text_pixmap, gc, FALSE, 0, 0, old_width-1, old_height-1); */ gtk_psfont_get_families(&family, &numf); base_psfont = psfont = gtk_psfont_get_by_name(font_name); font = gtk_psfont_get_font_description(psfont, font_height); italic = psfont->italic; bold = psfont->bold; fontsize = font_height; x0 = x = 0; y0 = y = 0; if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } else { latin_psfont = NULL; latin_font = NULL; } gdk_gc_set_foreground(gc, &real_fg); aux = text; while(aux && *aux != '\0' && *aux != '\n'){ if(*aux == '\\'){ aux = g_utf8_next_char(aux); switch(*aux){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '9': psfont = gtk_psfont_get_by_family((gchar *)g_list_nth_data(family, *aux-'0'), italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); aux = g_utf8_next_char(aux); break; case '8': case 'g': psfont = gtk_psfont_get_by_family("Symbol", italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); aux = g_utf8_next_char(aux); break; case 'B': bold = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if(latin_font){ latin_font = NULL; } if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'x': xaux = aux + 1; for (i=0; i<3; i++){ if (xaux[i] >= '0' && xaux[i] <= '9') num[i] = xaux[i]; else break; } if (i < 3){ aux = g_utf8_next_char(aux); break; } num[3] = '\0'; insert_char = (gchar)atoi(num); subs[0] = insert_char; subs[1] = '\0'; pango_layout_set_font_description(layout, font); pango_layout_set_text(layout, subs, 1); pango_layout_get_extents(layout, NULL, &rect); x += sign_x*PANGO_PIXELS(rect.width); y += sign_y*PANGO_PIXELS(rect.width); aux += 4; lastchar = aux - 1; break; case 'i': italic = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'S': case '^': fontsize = (int)((gdouble)fontsize * 0.6 + 0.5); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if(metrics) pango_font_metrics_unref(metrics); metrics = pango_context_get_metrics(pango_layout_get_context(layout), font, pango_context_get_language(pango_layout_get_context(layout))); if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } if(angle == 180) y = y0 + fontsize; else if(angle == 270) x = x0 + sign_y*fontsize; aux = g_utf8_next_char(aux); break; case 's': case '_': fontsize = (int)((gdouble)fontsize * 0.6 + 0.5); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if(metrics) pango_font_metrics_unref(metrics); metrics = pango_context_get_metrics(pango_layout_get_context(layout), font, pango_context_get_language(pango_layout_get_context(layout))); if(angle == 0) y = y0 + fontsize; else if(angle == 90) x = x0 - sign_y*fontsize; if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case '+': fontsize += 3; y -= sign_x*3; x += sign_y*3; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case '-': fontsize -= 3; y += sign_x*3; x -= sign_y*3; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'N': psfont = base_psfont; fontsize = font_height; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if(angle == 0 || angle == 180) y = y0; else x = x0; italic = psfont->italic; bold = psfont->bold; aux = g_utf8_next_char(aux); break; case 'b': if (lastchar) { const gchar *aux2 = lastchar; gint i = g_utf8_prev_char(lastchar) != --aux2 ? 2 : 1; pango_layout_set_text(layout, lastchar, i); pango_layout_get_extents(layout, NULL, &rect); x -= sign_x*PANGO_PIXELS(rect.width); y -= sign_y*PANGO_PIXELS(rect.width); if (lastchar == wtext) lastchar = NULL; else lastchar = g_utf8_prev_char(lastchar); } else { pango_layout_set_text(layout, "X", 1); pango_layout_get_extents(layout, NULL, &rect); x -= sign_x*PANGO_PIXELS(rect.width); y -= sign_y*PANGO_PIXELS(rect.width); } aux = g_utf8_next_char(aux); break; default: if(aux && *aux != '\0' && *aux !='\n'){ gint new_width = 0; new_width = drawstring(pc, drawable, gc, angle, tx+x, ty+y, psfont, fontsize, aux); x += sign_x * new_width; y += sign_y * new_width; lastchar = aux; aux = g_utf8_next_char(aux); } break; } } else { gint new_len = 0; gint new_width = 0; lastchar = aux; while(aux && *aux != '\0' && *aux !='\n' && *aux != '\\'){ xaux = aux; new_len += g_utf8_next_char(aux) != ++xaux ? 2 : 1; aux = g_utf8_next_char(aux); } xaux = lastchar; new_text = (gchar *) g_new0(gchar , strlen(text)+1); /* Tiny C Compiler support */ for(i = 0; i < new_len; i++) new_text[i] = *xaux++; new_text[new_len] = '\0'; new_width = drawstring(pc, drawable, gc, angle, tx+x, ty+y, psfont, fontsize, new_text); x += sign_x * new_width; y += sign_y * new_width; lastchar = aux; g_free (new_text); } } pango_matrix_rotate (&matrix, 0); pango_context_set_matrix (context, &matrix); pango_font_description_free(font); if(latin_font) pango_font_description_free(latin_font); if(metrics) pango_font_metrics_unref(metrics); /* border */ gdk_gc_set_foreground(gc, &real_fg); gtk_plot_pc_set_dash(pc, 0, NULL, 0); gtk_plot_pc_set_lineattr(pc, border_width, 0, 0, 0); switch(border){ case GTK_PLOT_BORDER_SHADOW: gtk_plot_pc_draw_rectangle(pc, TRUE, old_tx - border_space + shadow_width, old_ty + height + border_space, width + 2 * border_space, shadow_width); gtk_plot_pc_draw_rectangle(pc, TRUE, old_tx + width + border_space, old_ty - border_space + shadow_width, shadow_width, height + 2 * border_space); case GTK_PLOT_BORDER_LINE: gtk_plot_pc_draw_rectangle(pc, FALSE, old_tx - border_space, old_ty - border_space, width + 2*border_space, height + 2*border_space); case GTK_PLOT_BORDER_NONE: default: break; } return; } static void gtk_plot_gdk_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y) { GdkGC *gc; GdkPixmap *new_pixmap; GdkBitmap *new_mask = NULL; if(!GTK_PLOT_GDK(pc)->drawable) return; if(!GTK_PLOT_GDK(pc)->gc) return; gc = GTK_PLOT_GDK(pc)->gc; if(!gc) return; new_pixmap = scale_pixmap(GTK_PLOT_GDK(pc)->drawable, pixmap, scale_x, scale_y); if(mask) new_mask = scale_bitmap(GTK_PLOT_GDK(pc)->drawable, mask, scale_x, scale_y); /* TEST new_pixmap = pixmap; gdk_pixmap_ref(pixmap); if(mask) new_mask = mask; gdk_bitmap_ref(mask); */ gtk_plot_pc_clip_mask(pc, xdest, ydest, new_mask); gdk_draw_pixmap(GTK_PLOT_GDK(pc)->drawable, gc, new_pixmap, xsrc, ysrc, xdest, ydest, width*scale_x, height*scale_y); gtk_plot_pc_clip_mask(pc, xdest, ydest, NULL); if(new_mask) gdk_bitmap_unref(new_mask); gdk_pixmap_unref(new_pixmap); } static GdkPixmap * scale_pixmap (GdkWindow *window, GdkPixmap *pixmap, gdouble scale_x, gdouble scale_y) { GdkGC *gc = NULL; GdkPixmap *new_pixmap; gint width, height, new_width, new_height; GdkPixbuf *pixbuf = NULL; GdkPixbuf *aux_pixbuf = NULL; if(!pixmap) return NULL; if(!window) return NULL; gdk_window_get_size(pixmap, &width, &height); gc = gdk_gc_new(window); if(scale_x == 1.0 && scale_y == 1.0){ new_pixmap = gdk_pixmap_new(window, width, height, -1); gdk_draw_pixmap(new_pixmap, gc, pixmap, 0, 0, 0, 0, width, height); return new_pixmap; } new_width = roundint(width * scale_x); new_height = roundint(height * scale_y); pixbuf = gdk_pixbuf_get_from_drawable(NULL, pixmap, gdk_drawable_get_colormap(window), 0, 0, 0, 0, width, height); aux_pixbuf = gdk_pixbuf_scale_simple(pixbuf, new_width, new_height, GDK_INTERP_BILINEAR); new_pixmap = gdk_pixmap_new(pixmap, new_width, new_height, -1); gdk_draw_pixbuf(new_pixmap, gc, aux_pixbuf, 0, 0, 0, 0, new_width, new_height, GDK_RGB_DITHER_MAX, 0, 0); gdk_pixbuf_unref(pixbuf); gdk_pixbuf_unref(aux_pixbuf); gdk_gc_unref(gc); return new_pixmap; } static GdkBitmap * scale_bitmap (GdkWindow *window, GdkBitmap *bitmap, gdouble scale_x, gdouble scale_y) { GdkGC *gc; GdkVisual *visual = NULL; GdkImage *image = NULL, *new_image = NULL; GdkBitmap *new_bitmap = NULL; gint x, y, width, height, new_width, new_height; GdkColor color; if(!bitmap) return NULL; if(!window) return NULL; gc = gdk_gc_new(bitmap); gdk_window_get_size(bitmap, &width, &height); if(scale_x == 1.0 && scale_y == 1.0){ new_bitmap = gdk_pixmap_new(window, width, height, 1); color.pixel = 0; gdk_gc_set_foreground(gc, &color); gdk_draw_rectangle(new_bitmap, gc, TRUE, 0, 0, width, height); color.pixel = 1; gdk_gc_set_foreground(gc, &color); gdk_draw_pixmap(new_bitmap, gc, bitmap, 0, 0, 0, 0, width, height); return new_bitmap; } new_width = roundint(width * scale_x); new_height = roundint(height * scale_y); /* make a client side image of the bitmap, and * scale the data into a another client side image */ visual = gdk_window_get_visual (bitmap); if(!visual) return NULL; new_image = gdk_image_new(GDK_IMAGE_FASTEST,visual,new_width,new_height); if(!new_image) return NULL; new_bitmap = gdk_pixmap_new(window, new_width, new_height, 1); image = gdk_drawable_get_image(bitmap, 0, 0, width, height); color.pixel = 0; gdk_gc_set_foreground(gc, &color); gdk_draw_rectangle(new_bitmap, gc, TRUE, 0, 0, width, height); color.pixel = 1; gdk_gc_set_foreground(gc, &color); for(x = 0; x < new_width; x++){ for(y = 0; y < new_height; y++){ gint px, py; gulong pixel; px = MIN(roundint(x / scale_x), width - 1); py = MIN(roundint(y / scale_y), height - 1); pixel = gdk_image_get_pixel(image, px, py); gdk_image_put_pixel(new_image, x, y, pixel); } } /* draw the image into a new pixmap */ gdk_draw_image(new_bitmap,gc,new_image,0,0,0,0,new_width,new_height); gdk_image_destroy(image); gdk_image_destroy(new_image); return new_bitmap; } gtkextra-3.2.0/gtkextra/testprintexport.c0000644000076400001440000002643312603754176015604 00000000000000#include #include #include #include #include struct dialogData { GtkWidget *window; GtkWidget *canvas; }; void destroy_window_cb(GtkWidget *widget, gpointer data) { gtk_main_quit(); } gboolean delete_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data) { return FALSE; } void draw_page(GtkPrintOperation *operation, GtkPrintContext *context, gint page_nr, struct dialogData *dd) { cairo_t *cr; //the following two lines do all the magic cr = gtk_print_context_get_cairo_context(context); gtk_plot_canvas_export_cairo(GTK_PLOT_CANVAS(dd->canvas),cr); return; } void print_button_clicked_cb(GtkWidget *button, struct dialogData *dd) { GtkPrintOperation *operation; GError *error = NULL; GtkPrintOperationResult res; GtkPrintSettings *print_settings; GtkPageSetup *page_setup; //print settings print_settings = gtk_print_settings_new(); gtk_print_settings_set_orientation(print_settings,GTK_PAGE_ORIENTATION_LANDSCAPE); gtk_print_settings_set_paper_size(print_settings,gtk_paper_size_new(GTK_PAPER_NAME_A4)); page_setup = gtk_page_setup_new(); gtk_page_setup_set_orientation(page_setup,GTK_PAGE_ORIENTATION_LANDSCAPE); gtk_page_setup_set_paper_size_and_default_margins(page_setup,gtk_paper_size_new(GTK_PAPER_NAME_A4)); operation = gtk_print_operation_new(); gtk_print_operation_set_print_settings(operation,print_settings); gtk_print_operation_set_default_page_setup(operation,page_setup); gtk_print_operation_set_show_progress(operation,TRUE); gtk_print_operation_set_track_print_status(operation, TRUE); g_signal_connect(G_OBJECT(operation), "draw-page", G_CALLBACK(draw_page), dd); gtk_print_operation_set_n_pages(operation, 1); res = gtk_print_operation_run(operation, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, GTK_WINDOW(dd->window),&error); if (res == GTK_PRINT_OPERATION_RESULT_APPLY) { g_object_unref(print_settings); print_settings = g_object_ref(gtk_print_operation_get_print_settings(operation)); } g_object_unref(operation); return; } void export_button_clicked_cb(GtkWidget *button, struct dialogData *dd) { GtkWidget *dialog; GtkFileFilter *filter; gchar *filename; cairo_t *cr; cairo_surface_t *surface; dialog = gtk_file_chooser_dialog_new("Export spectra", GTK_WINDOW(dd->window), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter,"*.eps"); gtk_file_filter_set_name(filter,"EPS (Encapsulated PostScript)"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter,"*.pdf"); gtk_file_filter_set_name(filter,"PDF (Adobe Portable Document Format)"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter,"*.png"); gtk_file_filter_set_name(filter,"PNG (Portable Network Graphics)"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); //get selected filter filter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(dialog)); if (strncmp(gtk_file_filter_get_name(filter),"EPS", 3) == 0) { if (strcmp(filename+strlen(filename)-4, ".eps") != 0) { filename = (gchar *) g_realloc(filename,sizeof(gchar)*(strlen(filename)+4)); strcat(filename,".eps"); } surface = cairo_ps_surface_create(filename,842,595); cairo_ps_surface_set_eps(surface,1); cr = cairo_create(surface); gtk_plot_canvas_export_cairo(GTK_PLOT_CANVAS(dd->canvas),cr); //gtk_plot_canvas_paint(GTK_PLOT_CANVAS(dd->canvas)); cairo_show_page(cr); cairo_surface_destroy(surface); cairo_destroy(cr); } else if (strncmp(gtk_file_filter_get_name(filter),"PDF", 3) == 0) { if (strcmp(filename+strlen(filename)-4, ".pdf") != 0) { filename = (gchar *) g_realloc(filename,sizeof(gchar)*(strlen(filename)+4)); strcat(filename,".pdf"); } surface = cairo_pdf_surface_create(filename,842.0,595.0); cr = cairo_create(surface); gtk_plot_canvas_export_cairo(GTK_PLOT_CANVAS(dd->canvas),cr); //gtk_plot_canvas_paint(GTK_PLOT_CANVAS(dd->canvas)); cairo_show_page(cr); cairo_surface_destroy(surface); cairo_destroy(cr); } else if (strncmp(gtk_file_filter_get_name(filter),"PNG", 3) == 0) { if (strcmp(filename+strlen(filename)-4, ".png") != 0) { filename = (gchar *) g_realloc(filename,sizeof(gchar)*(strlen(filename)+4)); strcat(filename,".png"); } surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 842, 595); cr = cairo_create(surface); gtk_plot_canvas_export_cairo(GTK_PLOT_CANVAS(dd->canvas),cr); //gtk_plot_canvas_paint(GTK_PLOT_CANVAS(dd->canvas)); cairo_surface_write_to_png(surface,filename); cairo_surface_destroy(surface); cairo_destroy(cr); } g_free(filename); gtk_widget_destroy(dialog); } else gtk_widget_destroy(dialog); return; } int main(int argc, char *argv[]) { GdkColor white, red; gtk_init(&argc, &argv); //create window GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(window, "destroy", G_CALLBACK(destroy_window_cb), NULL); g_signal_connect(window, "delete-event", G_CALLBACK(delete_event_cb), NULL); gtk_window_set_title(GTK_WINDOW(window), "GtkExtra example"); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); //create box that will contain the buttons and the canvas GtkWidget *mainbox = gtk_vbox_new(FALSE, 2); gtk_container_set_border_width(GTK_CONTAINER(mainbox),5); gtk_container_add(GTK_CONTAINER(window), mainbox); GtkWidget *buttonbox = gtk_hbox_new(TRUE, 2); GtkWidget *printButton, *exportButton, *quitButton; printButton = gtk_button_new_from_stock(GTK_STOCK_PRINT); exportButton = gtk_button_new_from_stock(GTK_STOCK_SAVE_AS); quitButton = gtk_button_new_from_stock(GTK_STOCK_QUIT); gtk_box_pack_start(GTK_BOX(buttonbox), printButton, FALSE, FALSE, 1); gtk_box_pack_start(GTK_BOX(buttonbox), exportButton, FALSE, FALSE, 1); gtk_box_pack_start(GTK_BOX(buttonbox), quitButton, FALSE, FALSE, 1); struct dialogData *dd = g_malloc(sizeof(struct dialogData)); dd->window = window; g_signal_connect(G_OBJECT(exportButton),"clicked",G_CALLBACK(export_button_clicked_cb), dd); g_signal_connect(G_OBJECT(printButton),"clicked",G_CALLBACK(print_button_clicked_cb), dd); g_signal_connect_swapped(G_OBJECT(quitButton), "clicked", G_CALLBACK(gtk_widget_destroy), window); gtk_box_pack_start(GTK_BOX(mainbox), buttonbox, FALSE, FALSE, 1); GtkWidget *canvas = gtk_plot_canvas_new(GTK_PLOT_A4_H, GTK_PLOT_A4_W, 0.8); gtk_box_pack_start(GTK_BOX(mainbox), canvas, FALSE, FALSE, 2); GTK_PLOT_CANVAS_UNSET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_CAN_SELECT | GTK_PLOT_CANVAS_CAN_SELECT_ITEM); gdk_color_parse("white", &white); gdk_colormap_alloc_color(gdk_colormap_get_system(), &white, FALSE, TRUE); gdk_color_parse("red", &red); gdk_colormap_alloc_color(gdk_colormap_get_system(), &red, FALSE, TRUE); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas),&white); dd->canvas = canvas; //lets add a graph to canvas //calculate a sine function double *xvals = g_malloc(sizeof(double)*1000); double *yvals = g_malloc(sizeof(double)*1000); int i; for (i = 0 ; i < 1000 ; i++) { xvals[i] = 4*M_PI*i/999; yvals[i] = sin(xvals[i]); } GtkWidget *plot_window; plot_window = gtk_plot_new_with_size(NULL,10.0, 0.1); gtk_plot_set_background(GTK_PLOT(plot_window),&white); gtk_plot_hide_legends(GTK_PLOT(plot_window)); gtk_plot_set_ticks(GTK_PLOT(plot_window), GTK_PLOT_AXIS_X, M_PI_2, 5); gtk_plot_set_ticks(GTK_PLOT(plot_window), GTK_PLOT_AXIS_Y, 0.2, 5); gtk_plot_grids_set_visible(GTK_PLOT(plot_window),TRUE ,FALSE, TRUE,FALSE); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_RIGHT)); gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_BOTTOM),"x"); gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_LEFT),"y=sin(x)"); gtk_plot_axis_title_set_attributes(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_LEFT),"Helvetica",40,90,NULL,NULL,TRUE,GTK_JUSTIFY_CENTER); gtk_plot_axis_title_set_attributes(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_BOTTOM),"Helvetica",40,0,NULL,NULL,TRUE,GTK_JUSTIFY_CENTER); gtk_plot_axis_set_labels_attributes(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_LEFT),"Helvetica",20,0,NULL,NULL,TRUE,GTK_JUSTIFY_RIGHT); gtk_plot_axis_set_labels_attributes(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_RIGHT),"Helvetica",20,0,NULL,NULL,TRUE,GTK_JUSTIFY_LEFT); gtk_plot_axis_set_labels_attributes(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_BOTTOM),"Helvetica",20,0,NULL,NULL,TRUE,GTK_JUSTIFY_CENTER); gtk_plot_axis_show_labels(gtk_plot_get_axis(GTK_PLOT(plot_window), GTK_PLOT_AXIS_TOP),0); GtkPlotCanvasChild *child = gtk_plot_canvas_plot_new(GTK_PLOT(plot_window)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15,.05,.90,.85); GtkPlotData *dataset; dataset = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_add_data(GTK_PLOT(plot_window),dataset); gtk_plot_data_set_numpoints(dataset, 1000); gtk_plot_data_set_x(dataset, xvals); gtk_plot_data_set_y(dataset, yvals); gtk_plot_set_range(GTK_PLOT(plot_window),0.0, 4*M_PI, -1.0, 1.0); gtk_plot_clip_data(GTK_PLOT(plot_window), TRUE); gtk_widget_show(GTK_WIDGET(dataset)); gtk_plot_data_set_line_attributes(dataset,GTK_PLOT_LINE_SOLID,0,0,1,&red); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(canvas)); gtk_widget_queue_draw(GTK_WIDGET(canvas)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(canvas)); gtk_plot_paint(GTK_PLOT(plot_window)); gtk_plot_refresh(GTK_PLOT(plot_window),NULL); gtk_widget_show_all(window); gtk_main(); } gtkextra-3.2.0/gtkextra/gtkplotflux.c0000644000076400001440000005762012603754176014673 00000000000000/* gtkplotflux - flux plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotflux * @short_description: * * FIXME:: Need long description. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotflux.h" #include "gtkpsfont.h" #define P_(string) string static void gtk_plot_flux_class_init (GtkPlotFluxClass *klass); static void gtk_plot_flux_init (GtkPlotFlux *data); static void gtk_plot_flux_destroy (GtkObject *data); static void gtk_plot_flux_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_flux_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_flux_get_legend_size(GtkPlotData *data, gint *width, gint *height); static void gtk_plot_flux_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_flux_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); static void gtk_plot_flux_draw_arrow (GtkPlotFlux *flux, gdouble x1, gdouble y1, gdouble x2, gdouble y2); extern gint roundint (gdouble x); enum { ARG_0, ARG_CENTERED, ARG_STYLE, ARG_WIDTH, ARG_LENGTH, ARG_SCALE_MAX, ARG_SIZE_MAX, ARG_SHOW_SCALE, ARG_LABEL_PRECISION, ARG_LABEL_STYLE, ARG_LABEL_PREFIX, ARG_LABEL_SUFFIX, }; static GtkPlotDataClass *parent_class = NULL; GType gtk_plot_flux_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotFlux", sizeof (GtkPlotFluxClass), (GClassInitFunc) gtk_plot_flux_class_init, sizeof (GtkPlotFlux), (GInstanceInitFunc) gtk_plot_flux_init, 0); } return data_type; } static void gtk_plot_flux_class_init (GtkPlotFluxClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; gobject_class->set_property = gtk_plot_flux_set_property; gobject_class->get_property = gtk_plot_flux_get_property; object_class->destroy = gtk_plot_flux_destroy; /** * GtkPlotFlux:centered: * * **/ g_object_class_install_property (gobject_class, ARG_CENTERED, g_param_spec_boolean ("centered", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:style: * * **/ g_object_class_install_property (gobject_class, ARG_STYLE, g_param_spec_int ("style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:width: * * **/ g_object_class_install_property (gobject_class, ARG_WIDTH, g_param_spec_int ("width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:length: * * **/ g_object_class_install_property (gobject_class, ARG_LENGTH, g_param_spec_int ("length", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:scale_max: * * **/ g_object_class_install_property (gobject_class, ARG_SCALE_MAX, g_param_spec_double ("scale_max", P_(""), P_(""), 0,G_MAXDOUBLE,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:size_max: * * **/ g_object_class_install_property (gobject_class, ARG_SIZE_MAX, g_param_spec_int ("size_max", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:show_scale: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_SCALE, g_param_spec_boolean ("show_scale", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:labels_precision: * * **/ g_object_class_install_property (gobject_class, ARG_LABEL_PRECISION, g_param_spec_int ("labels_precision", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:labels_style: * * **/ g_object_class_install_property (gobject_class, ARG_LABEL_STYLE, g_param_spec_int ("labels_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:labels_prefix: * * **/ g_object_class_install_property (gobject_class, ARG_LABEL_PREFIX, g_param_spec_string ("labels_prefix", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotFlux:labels_suffix: * * **/ g_object_class_install_property (gobject_class, ARG_LABEL_SUFFIX, g_param_spec_string ("labels_suffix", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); data_class->draw_legend = gtk_plot_flux_draw_legend; data_class->get_legend_size = gtk_plot_flux_get_legend_size; data_class->draw_symbol = gtk_plot_flux_draw_symbol; } static void gtk_plot_flux_init (GtkPlotFlux *dataset) { GtkWidget *widget; GdkColor black, white; GdkColormap *colormap; GtkPlotArray *dim; widget = GTK_WIDGET(dataset); colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); GTK_PLOT_DATA(dataset)->symbol.symbol_style = GTK_PLOT_SYMBOL_EMPTY; GTK_PLOT_DATA(dataset)->symbol.color = black; GTK_PLOT_DATA(dataset)->line.line_style = GTK_PLOT_LINE_SOLID; GTK_PLOT_DATA(dataset)->line.line_width = 1; GTK_PLOT_DATA(dataset)->line.color = black; dataset->centered = TRUE; dataset->arrow_length = 8; dataset->arrow_width = 8; dataset->arrow_style = GTK_PLOT_SYMBOL_FILLED; dataset->size_max = 1; dataset->scale_max = 1.; dataset->show_scale = TRUE; dataset->labels_precision = 3; dataset->labels_style = GTK_PLOT_LABEL_FLOAT; dataset->labels_prefix = NULL; dataset->labels_suffix = NULL; dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "x"); gtk_plot_array_set_description(dim, "Position X"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "y"); gtk_plot_array_set_description(dim, "Position Y"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "z"); gtk_plot_array_set_description(dim, "Position Z"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dx"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "DX"); gtk_plot_array_set_description(dim, "Size X"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dy"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "DY"); gtk_plot_array_set_description(dim, "Size Y"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dz"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "DZ"); gtk_plot_array_set_description(dim, "Size Z"); } static void gtk_plot_flux_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotFlux *data; data = GTK_PLOT_FLUX (object); switch (prop_id) { case ARG_CENTERED: data->centered = g_value_get_boolean(value); break; case ARG_WIDTH: data->arrow_width = g_value_get_int(value); break; case ARG_LENGTH: data->arrow_length = g_value_get_int(value); break; case ARG_STYLE: data->arrow_style = g_value_get_int(value); break; case ARG_SCALE_MAX: data->scale_max = g_value_get_double(value); break; case ARG_SIZE_MAX: data->size_max = g_value_get_int(value); break; case ARG_SHOW_SCALE: data->show_scale = g_value_get_boolean(value); break; case ARG_LABEL_PRECISION: data->labels_precision = g_value_get_int(value); break; case ARG_LABEL_STYLE: data->labels_style = g_value_get_int(value); break; case ARG_LABEL_PREFIX: gtk_plot_flux_set_labels_prefix(data, g_value_get_string(value)); break; case ARG_LABEL_SUFFIX: gtk_plot_flux_set_labels_suffix(data, g_value_get_string(value)); break; } } static void gtk_plot_flux_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotFlux *data; data = GTK_PLOT_FLUX (object); switch (prop_id) { case ARG_CENTERED: g_value_set_boolean(value, data->centered); break; case ARG_WIDTH: g_value_set_int(value, data->arrow_width); break; case ARG_LENGTH: g_value_set_int(value, data->arrow_length); break; case ARG_STYLE: g_value_set_int(value, data->arrow_style); break; case ARG_SCALE_MAX: g_value_set_double(value, data->scale_max); break; case ARG_SIZE_MAX: g_value_set_int(value, data->size_max); break; case ARG_SHOW_SCALE: g_value_set_boolean(value, data->show_scale); break; case ARG_LABEL_PRECISION: g_value_set_int(value, data->labels_precision); break; case ARG_LABEL_STYLE: g_value_set_int(value, data->labels_style); break; case ARG_LABEL_PREFIX: g_value_set_string(value, data->labels_prefix); break; case ARG_LABEL_SUFFIX: g_value_set_string(value, data->labels_suffix); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } GtkWidget* gtk_plot_flux_new () { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_flux_get_type (), NULL); return (widget); } static void gtk_plot_flux_destroy(GtkObject *object) { GtkPlotFlux *flux = GTK_PLOT_FLUX(object); if(flux->labels_prefix) g_free(flux->labels_prefix); flux->labels_prefix = NULL; if(flux->labels_suffix) g_free(flux->labels_suffix); flux->labels_suffix = NULL; if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void gtk_plot_flux_draw_symbol(GtkPlotData *dataset, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot; GtkPlotFlux *flux = NULL; GdkRectangle area, clip_area; gdouble m; gdouble x1 = 0.0, y1 = 0.0, x2 = 0.0, y2=0.0; gdouble factor, size, xm; GtkAllocation allocation; g_return_if_fail(GTK_IS_PLOT_FLUX(dataset)); flux = GTK_PLOT_FLUX(dataset); g_return_if_fail(dataset->plot != NULL); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(dataset->plot))); plot = dataset->plot; m = plot->magnification; gtk_widget_get_allocation( GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; clip_area.x = area.x + roundint(plot->x * area.width); clip_area.y = area.y + roundint(plot->y * area.height); clip_area.width = roundint(plot->width * area.width); clip_area.height = roundint(plot->height * area.height); /* gtk_plot_pc_clip(plot->pc, &clip_area); */ if(GTK_IS_PLOT3D(plot)){ gdouble z1, z2 = 0; xm = sqrt(dx * dx + dy * dy + dz * dz); factor = xm / flux->scale_max; size = factor * flux->size_max; x2 = size * dx / xm; y2 = size * dy / xm; z2 = size * dz / xm; gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &x1, &y1, &z1); }else{ if(plot->clip_data && (x < plot->xmin || x > plot->xmax || y ymin || y > plot->ymax)) return; xm = sqrt(dx * dx + dy * dy); factor = xm / flux->scale_max; size = factor * flux->size_max; x2 = size * dx / xm; y2 = size * dy / xm; gtk_plot_get_pixel(plot, x, y, &x1, &y1); gtk_plot_flux_draw_arrow (flux, x1, y1, x1+x2*m, y1-y2*m); gtk_plot_data_draw_symbol(dataset, x1, y1); } /* gtk_plot_pc_clip(plot->pc, NULL); */ } static void gtk_plot_flux_get_legend_size(GtkPlotData *data, gint *width, gint *height) { GtkPlotFlux *flux; GtkPlot *plot = NULL; GtkPlotText legend; gint lascent, ldescent, lheight, lwidth; gdouble m; gchar new_label[100], text[100]; flux = GTK_PLOT_FLUX(data); plot = data->plot; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; *width = *height = 0; if(data->show_legend) gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), width, height, &lascent, &ldescent); if(flux->show_scale){ gchar aux_text[100]; gtk_plot_axis_parse_label(data->gradient, flux->scale_max, flux->labels_precision, flux->labels_style, text); if(flux->labels_prefix){ g_snprintf(aux_text, 100, "%s%s", flux->labels_prefix, text); memcpy(text, aux_text, 100*sizeof(gchar)); } if(flux->labels_suffix) { g_snprintf(aux_text, 100, "%s%s", text, flux->labels_suffix); memcpy(text, aux_text, 100*sizeof(gchar)); } g_snprintf(new_label, 100, "%s", text); legend.text = new_label; gtk_plot_text_get_size(legend.text, 0, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); *width = MAX(*width, lwidth + roundint(m*(flux->size_max + 8))); *height += MAX(lheight , roundint(m*flux->arrow_width)); } } static void gtk_plot_flux_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotFlux *flux; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; gint line_width; gboolean centered; GtkAllocation allocation; flux = GTK_PLOT_FLUX(data); centered = flux->centered; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(data->plot))); plot = data->plot; gtk_widget_get_allocation( GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); if(data->show_legend){ line_width = plot->legends_line_width; legend.x = (gdouble)(area.x + x) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); } if(flux->show_scale){ gchar new_label[100], text_max[100]; flux->centered = FALSE; gtk_plot_flux_draw_arrow(flux, area.x + x, area.y + y + lheight * 3 / 2, area.x + x + roundint(flux->size_max*m), area.y + y + lheight * 3 / 2); y += MAX(lheight, roundint(m*flux->arrow_width)); gtk_plot_axis_parse_label(data->gradient, flux->scale_max, flux->labels_precision, flux->labels_style, text_max); if(flux->labels_prefix){ gchar aux_text[100]; g_snprintf(aux_text, 100, "%s%s", flux->labels_prefix, text_max); memcpy(text_max, aux_text, 100*sizeof(gchar)); } if(flux->labels_suffix){ gchar aux_text[100]; g_snprintf(aux_text, 100, "%s%s", text_max, flux->labels_suffix); memcpy(text_max, aux_text, 100*sizeof(gchar)); } g_snprintf(new_label, 100, "%s", text_max); legend.x = (gdouble)(area.x + x + m*(flux->size_max + 4)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; legend.text = new_label; gtk_plot_draw_text(plot, legend); flux->centered = centered; y += lheight; } else y += lheight; } static void gtk_plot_flux_draw_arrow(GtkPlotFlux *flux, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkPlot *plot; GtkPlotData *data; GtkPlotPoint arrow[3]; gdouble xm, ym; gdouble width, height; gdouble arrow_width; gdouble line_width; gdouble angle; gdouble length; gdouble m; data = GTK_PLOT_DATA(flux); plot = data->plot; m = plot->magnification; width = fabs(x2 - x1); height = fabs(y2 - y1); if(width == 0 && height == 0) return; if(width != 0) angle = atan2((y2 - y1), (x2 - x1)); else angle = asin((y2 - y1)/height); length = (y2 - y1)*(y2 - y1) + (x2 - x1)*(x2 - x1); if(length > 0.0) length = sqrt(length); arrow_width = flux->arrow_width; line_width = data->symbol.border.line_width; gtk_plot_pc_set_color(plot->pc, &data->symbol.color); gtk_plot_pc_set_lineattr (plot->pc, line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); if(flux->centered && width != 0){ x1 -= cos(angle) * length / 2.0; x2 -= cos(angle) * length / 2.0; } if(flux->centered && height != 0){ y1 -= sin(angle) * length / 2.0; y2 -= sin(angle) * length / 2.0; } if(flux->arrow_style == GTK_PLOT_SYMBOL_EMPTY) gtk_plot_pc_draw_line(plot->pc, x1, y1, x2, y2); else gtk_plot_pc_draw_line(plot->pc, x1, y1, x2 - flux->arrow_length * m * cos(angle) / 2., y2 - flux->arrow_length * m * sin(angle) / 2.); arrow[1].x = x2; arrow[1].y = y2; xm = x2 - cos(angle) * flux->arrow_length * m; ym = y2 - sin(angle) * flux->arrow_length * m; arrow[0].x = xm - sin(angle)* arrow_width * m / 2.0; arrow[0].y = ym + cos(angle)* arrow_width * m / 2.0; arrow[2].x = xm + sin(angle)* arrow_width * m / 2.0; arrow[2].y = ym - cos(angle)* arrow_width * m / 2.0; switch(flux->arrow_style){ case GTK_PLOT_SYMBOL_EMPTY: gtk_plot_pc_draw_lines (plot->pc, arrow, 3); break; case GTK_PLOT_SYMBOL_OPAQUE: gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_polygon (plot->pc, TRUE, arrow, 3); gtk_plot_pc_set_color(plot->pc, &data->symbol.color); gtk_plot_pc_draw_polygon (plot->pc, FALSE, arrow, 3); break; case GTK_PLOT_SYMBOL_FILLED: gtk_plot_pc_draw_polygon (plot->pc, TRUE, arrow, 3); } } /** * gtk_plot_flux_set_arrow: * @flux: * @arrow_length: * @arrow_width: * @arrow_style: * * */ void gtk_plot_flux_set_arrow (GtkPlotFlux *flux, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style) { flux->arrow_length = arrow_length; flux->arrow_width = arrow_width; flux->arrow_style = arrow_style; } /** * gtk_plot_flux_get_arrow: * @flux: * @arrow_length: * @arrow_width: * @arrow_style: * * */ void gtk_plot_flux_get_arrow (GtkPlotFlux *flux, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style) { *arrow_length = flux->arrow_length; *arrow_width = flux->arrow_width; *arrow_style = flux->arrow_style; } /** * gtk_plot_flux_center: * @flux: * @center: * * */ void gtk_plot_flux_center (GtkPlotFlux *flux, gboolean center) { flux->centered = center; } /** * gtk_plot_flux_is_centered: * @flux: * * * * Return value: */ gboolean gtk_plot_flux_is_centered (GtkPlotFlux *flux) { return(flux->centered); } /** * gtk_plot_flux_show_scale: * @flux: * @show: * * */ void gtk_plot_flux_show_scale (GtkPlotFlux *flux, gboolean show) { flux->show_scale = show; } /** * gtk_plot_flux_set_scale_max: * @flux: * @scale_max: * * */ void gtk_plot_flux_set_scale_max (GtkPlotFlux *flux, gdouble scale_max) { flux->scale_max = fabs(scale_max); } /** * gtk_plot_flux_set_size_max: * @flux: * @size_max: * * */ void gtk_plot_flux_set_size_max (GtkPlotFlux *flux, guint size_max) { flux->size_max = size_max; } /** * gtk_plot_flux_set_labels_precision: * @flux: * @precision: * * */ void gtk_plot_flux_set_labels_precision (GtkPlotFlux *flux, gint precision) { flux->labels_precision = precision; } /** * gtk_plot_flux_set_labels_style: * @flux: * @style: * * */ void gtk_plot_flux_set_labels_style (GtkPlotFlux *flux, GtkPlotLabelStyle style) { flux->labels_style = style; } /** * gtk_plot_flux_set_labels_prefix: * @flux: * @prefix: * * */ void gtk_plot_flux_set_labels_prefix (GtkPlotFlux *flux, const gchar *prefix) { if(flux->labels_prefix) g_free(flux->labels_prefix); flux->labels_prefix = NULL; if(prefix) flux->labels_prefix = g_strdup(prefix); } /** * gtk_plot_flux_set_labels_suffix: * @flux: * @suffix: * * */ void gtk_plot_flux_set_labels_suffix (GtkPlotFlux *flux, const gchar *suffix) { if(flux->labels_suffix) g_free(flux->labels_suffix); flux->labels_suffix = NULL; if(suffix) flux->labels_suffix = g_strdup(suffix); } gtkextra-3.2.0/gtkextra/testrealtime.c0000644000076400001440000001352712603754176015010 00000000000000#include #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvastext.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkPlotData *dataset; gint nlayers = 0; gint32 timer; GtkWidget *canvas; gdouble *px; gdouble *py; void quit () { gtk_timeout_remove(timer); gtk_main_quit(); g_free(px); g_free(py); g_free(plots); } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; nlayers++; plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .65, .45); return plots[nlayers-1]; } gint update(gpointer data) { GtkPlot *plot; gdouble x, y; gdouble xmin, xmax; plot = GTK_PLOT(data); px = (gdouble *)g_realloc(px, (dataset->num_points+1)*sizeof(gdouble)); py = (gdouble *)g_realloc(py, (dataset->num_points+1)*sizeof(gdouble)); y = rand()%10/10.; if(dataset->num_points == 0) x = 1; else x = px[dataset->num_points-1] + 1; px[dataset->num_points] = x; py[dataset->num_points] = y; gtk_plot_data_set_numpoints(dataset, dataset->num_points+1); gtk_plot_data_set_x(dataset, px); gtk_plot_data_set_y(dataset, py); gtk_plot_get_xrange(plot, &xmin , &xmax); if(x > xmax){ gtk_plot_set_xrange(plot, xmin + 5. , xmax + 5.); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(canvas)); gtk_widget_queue_draw(GTK_WIDGET(canvas)); } else { gtk_plot_data_draw_points(dataset, 1); gtk_plot_refresh(plot, NULL); } return TRUE; } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *active_plot; GtkPlotCanvasChild *child; GdkColor color; gint page_width, page_height; gfloat scale = 1.; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlot Real Time Demo"); gtk_widget_set_size_request(window1,550,600); gtk_container_border_width(GTK_CONTAINER(window1),0); gtk_widget_show(window1); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_UNSET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); gtk_widget_show(canvas); active_plot = new_layer(canvas); gdk_color_parse("light yellow", &color); gdk_color_alloc(gtk_widget_get_colormap(active_plot), &color); gtk_plot_set_background(GTK_PLOT(active_plot), &color); gdk_color_parse("white", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_legends_set_attributes(GTK_PLOT(active_plot), NULL, 0, NULL, &color); gtk_plot_set_range(GTK_PLOT(active_plot), 0. ,20., 0., 1.); gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_X, 2, 1); gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_Y, .1, 1); gtk_plot_axis_set_labels_style(gtk_plot_get_axis(GTK_PLOT(active_plot), 2), 0, 0); gtk_plot_axis_set_labels_style(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 0, 0); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_grids_set_visible(GTK_PLOT(active_plot), TRUE, TRUE, TRUE, TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .15, .80, .65); gtk_widget_show(active_plot); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT)); gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_LEFT), "Intensity"); gtk_plot_axis_set_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_BOTTOM), "Time (s)"); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 2, 3); gtk_plot_legends_move(GTK_PLOT(active_plot), .60, .10); child = gtk_plot_canvas_text_new("Times-BoldItalic", 20, 0, NULL, NULL, TRUE, GTK_JUSTIFY_CENTER, "Real Time Demo"); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .45, .05, 0., 0.); dataset = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_add_data(GTK_PLOT(active_plot), dataset); gtk_widget_show(GTK_WIDGET(dataset)); gdk_color_parse("red", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_legend(dataset, "Random pulse"); gtk_plot_data_set_symbol(dataset, GTK_PLOT_SYMBOL_DIAMOND, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset, GTK_PLOT_LINE_SOLID, 0, 0, 1, &color); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(canvas)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(canvas)); gtk_plot_clip_data(GTK_PLOT(active_plot), TRUE); timer = gtk_timeout_add(300, update, active_plot); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkcolorcombo.c0000644000076400001440000004210712603754176015146 00000000000000/* gtkcolorcombo - color_combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkcolorcombo * @short_description: A color combo widget for GTK. * * A GtkColorCombo is a GtkCOmbo which contains all kinds of colors. */ /** * GtkColorCombo: * * The GtkColorCombo struct contains only private data. * It should only be accessed through the functions described below. */ #include #include #include #include #include #include #include #include "gtkcombobutton.h" #include "gtkcolorcombo.h" #include "gtkextra-marshal.h" static GtkWidget *dialog; /* SIGNALS */ enum { CHANGED, LAST_SIGNAL }; static gint color_combo_signals[LAST_SIGNAL] = {0}; static char *default_colors[]={ "black", "brown", "olive drab", "dark green", "dark sea green", "dark blue", "dark cyan", "grey80", "dark red", "coral", "yellow green", "sea green", "aquamarine3", "blue", "steel blue", "grey50", "red", "orange", "lime green", "green", "aquamarine1", "light blue", "violet", "grey40", "pale violet red", "gold1", "yellow1", "lawn green", "turquoise1", "SkyBlue1", "purple2", "grey25", "light pink", "light goldenrod", "light yellow", "light green", "pale turquoise", "light steel blue", "lavender", "white" }; static char *xpm_color[]={ "18 18 3 1", " c None", ". c #000000000000", "X c #111111111111", " ", " ................ ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " ................ ", " "}; static void gtk_color_combo_class_init (GtkColorComboClass *klass); static void gtk_color_combo_init (GtkColorCombo *color_combo); static void gtk_color_combo_destroy (GtkObject *color_combo); static void gtk_color_combo_realize (GtkWidget *widget); static void gtk_color_combo_get_color_name (GdkColor *color, gchar *name); static void color_to_hex (gint color, gchar string[5]); static GtkComboButtonClass *parent_class = NULL; static void gtk_color_combo_class_init (GtkColorComboClass * klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; parent_class = g_type_class_ref (gtk_hbox_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; object_class->destroy = gtk_color_combo_destroy; widget_class->realize = gtk_color_combo_realize; color_combo_signals[CHANGED]=g_signal_new("changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(GtkColorComboClass, changed), NULL, NULL, gtkextra_VOID__BOXED_BOXED, G_TYPE_NONE, 2, G_TYPE_INT, GDK_TYPE_COLOR); klass->changed = NULL; } static void gtk_color_combo_destroy (GtkObject * color_combo) { gint i,j; GtkColorCombo *combo; combo=GTK_COLOR_COMBO(color_combo); if(combo && combo->button) /* patched by Mario Motta */ for(i=0; inrows; i++) for(j=0; jncols; j++) if(combo->button[i*combo->ncols+j]){ gtk_widget_destroy(combo->button[i*combo->ncols+j]); combo->button[i*combo->ncols+j] = NULL; } if(combo->button){ g_free(combo->button); combo->button = NULL; } if(combo->colors){ g_free(combo->colors); combo->colors = NULL; } if(GTK_COLOR_COMBO(color_combo)->table){ gtk_widget_destroy (GTK_COLOR_COMBO(color_combo)->table); GTK_COLOR_COMBO(color_combo)->table = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (color_combo); } static void gtk_color_combo_update (GtkWidget * widget, GtkColorCombo * color_combo) { gint i,j; gint focus_row = -1, focus_col = -1; gint new_row = -1, new_col = -1; gint new_selection=FALSE; gint row,column; row=color_combo->row; column=color_combo->column; for(i=0 ; inrows; i++) for(j=0; jncols; j++){ gint index = i*color_combo->ncols+j; if(gtk_widget_has_focus(color_combo->button[index])){ focus_row=i; focus_col=j; } if(gtk_widget_get_state(color_combo->button[index])==GTK_STATE_ACTIVE){ if(i != row || j != column){ new_selection=TRUE; new_row=i; new_col=j; } } } if(!new_selection && focus_row >= 0 && focus_col >= 0){ if(focus_row != row && focus_col != column){ new_selection = TRUE; new_row=focus_row; new_col=focus_col; } } if(new_selection){ if(row >= 0 && column >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(color_combo->button[row*color_combo->ncols+column]), FALSE); gtk_widget_queue_draw(color_combo->button[row*color_combo->ncols+column]); } color_combo->row=new_row; color_combo->column=new_col; color_combo->selection = color_combo->colors[new_row*color_combo->ncols+new_col]; g_signal_emit (GTK_OBJECT(color_combo), color_combo_signals[CHANGED], 0, new_row * color_combo->ncols + new_col, &color_combo->selection); } if(!new_selection && row >= 0 && column >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(color_combo->button[row*color_combo->ncols+column]), TRUE); gtk_widget_queue_draw(color_combo->button[row*color_combo->ncols+column]); g_signal_emit (GTK_OBJECT(color_combo), color_combo_signals[CHANGED], 0, row * color_combo->ncols + column, &color_combo->colors[row*color_combo->ncols+column]); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(GTK_COMBO_BUTTON(color_combo)->arrow), FALSE); gtk_grab_remove(GTK_COMBO_BUTTON(color_combo)->popwin); gdk_pointer_ungrab(GDK_CURRENT_TIME); gtk_widget_hide(GTK_COMBO_BUTTON(color_combo)->popwin); return; } static void gtk_color_combo_init (GtkColorCombo * color_combo) { GtkWidget *widget; widget=GTK_WIDGET(color_combo); color_combo->row = -1; color_combo->column = -1; gdk_color_black(gtk_widget_get_colormap(widget), &color_combo->selection); } static gboolean pick_color(GtkWidget *widget, gpointer data) { GtkColorCombo *combo; GdkColor color; combo = GTK_COLOR_COMBO(data); gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel), &color); gdk_color_alloc(gdk_colormap_get_system(), &color); combo->selection = color; g_signal_emit (GTK_OBJECT(combo), color_combo_signals[CHANGED], 0, -1, &color); return FALSE; } static gboolean gtk_color_combo_customize(GtkButton *button, gpointer data) { GtkColorCombo *combo = GTK_COLOR_COMBO(data); GdkColor color; if(combo->row == -1 || combo->column == -1) return FALSE; dialog = gtk_color_selection_dialog_new("Pick a color"); color = gtk_color_combo_get_color_at(combo, combo->row, combo->column); gtk_color_selection_set_has_palette (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (dialog)->colorsel), TRUE); gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel), &color); gtk_window_set_modal (GTK_WINDOW(dialog),TRUE); gtk_widget_show(dialog); g_signal_connect (GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(dialog)->ok_button), "clicked", (void *)pick_color, combo); g_signal_connect_swapped ( GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(dialog)->ok_button), "clicked", (void *)gtk_widget_destroy, GTK_OBJECT (dialog)); g_signal_connect_swapped ( GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(dialog)->cancel_button), "clicked", (void *)gtk_widget_destroy, GTK_OBJECT (dialog)); return FALSE; } static void gtk_color_combo_realize(GtkWidget *widget) { GtkComboButton *combo; GtkColorCombo *color_combo; GdkPixmap *color_pixmap; GtkWidget *pixmap; GtkWidget *box; gchar color_string[22]; gint i,j,n; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_COLOR_COMBO (widget)); GTK_WIDGET_CLASS (parent_class)->realize (widget); combo = GTK_COMBO_BUTTON(widget); color_combo = GTK_COLOR_COMBO(widget); box = gtk_vbox_new(FALSE,0); color_combo->table = gtk_table_new (color_combo->nrows, color_combo->ncols, TRUE); color_combo->button = g_new0(GtkWidget *, color_combo->nrows*color_combo->ncols); for(i = 0; i < color_combo->nrows; i++){ for(j = 0; j < color_combo->ncols; j++){ gint index = i*color_combo->ncols+j; color_combo->button[index] = gtk_toggle_button_new(); gtk_button_set_relief(GTK_BUTTON(color_combo->button[index]), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE(color_combo->table), color_combo->button[index], j, j+1, i, i+1, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_set_size_request(color_combo->button[index], 24, 24); gtk_widget_show(color_combo->button[index]); g_signal_connect (GTK_OBJECT (color_combo->button[index]), "toggled", (void *) gtk_color_combo_update, color_combo); } } gtk_container_add(GTK_CONTAINER(GTK_COMBO_BUTTON(color_combo)->frame), box); gtk_box_pack_start(GTK_BOX(box), color_combo->table, TRUE, TRUE, 0); gtk_widget_show(box); gtk_widget_show(color_combo->table); color_combo->custom_button = gtk_button_new_with_label ("Pick a new color"); gtk_table_attach (GTK_TABLE(color_combo->table), color_combo->custom_button, 0, color_combo->ncols, color_combo->nrows, color_combo->nrows+1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show(color_combo->custom_button); g_signal_connect (GTK_OBJECT(color_combo->custom_button),"clicked", (void *) gtk_color_combo_customize, color_combo); n=0; for(i=0; inrows; i++) for(j=0; jncols; j++){ gchar *prev_string = xpm_color[3]; gchar name[21]; gtk_color_combo_get_color_name(&color_combo->colors[n], name); sprintf(color_string,"X c %s",name); xpm_color[3]=color_string; color_pixmap=gdk_pixmap_create_from_xpm_d( gtk_widget_get_window(widget), NULL, &(gtk_widget_get_style(widget)->bg[GTK_STATE_NORMAL]), xpm_color); pixmap=gtk_image_new_from_pixmap(color_pixmap, NULL); gtk_container_add(GTK_CONTAINER(color_combo->button[n]), pixmap); gtk_widget_show(pixmap); gdk_pixmap_unref(color_pixmap); xpm_color[3] = prev_string; n++; } g_signal_connect (GTK_OBJECT (combo->button), "clicked", (void *) gtk_color_combo_update, color_combo); gtk_color_combo_update(NULL, color_combo); } static void gtk_color_combo_get_color_name(GdkColor *color, gchar *name) { gchar red[5]; gchar green[5]; gchar blue[5]; color_to_hex(color->red, red); color_to_hex(color->green, green); color_to_hex(color->blue, blue); g_snprintf(name,21,"#%s%s%s",red,green,blue); } static void color_to_hex(gint color, gchar string[5]) { gint i,n; for(i=3; i>=0; i--){ n=color/pow(16,i); color-=n*pow(16,i); if(n < 10) string[3-i]='0'+n; else string[3-i]='A'+n-10; } string[4]='\0'; } GType gtk_color_combo_get_type () { static GType color_combo_type = 0; if (!color_combo_type) { color_combo_type = g_type_register_static_simple ( gtk_combo_button_get_type (), "GtkColorCombo", sizeof (GtkColorComboClass), (GClassInitFunc) gtk_color_combo_class_init, sizeof (GtkColorCombo), (GInstanceInitFunc) gtk_color_combo_init, 0 ); } return color_combo_type; } GtkWidget * gtk_color_combo_new () { GtkWidget * color_combo; color_combo = gtk_widget_new (gtk_color_combo_get_type (), NULL); gtk_color_combo_construct((GtkColorCombo *)color_combo); return(color_combo); } /** * gtk_color_combo_construct: * @color_combo: the #GtkColorCombo widget. * * Initialize a #GtkColorCombo object. */ void gtk_color_combo_construct(GtkColorCombo *color_combo) { GdkColor color; gint i,j,n; color_combo->nrows = 5; color_combo->ncols = 8; n = color_combo->nrows * color_combo->ncols; color_combo->colors = g_new0(GdkColor, n); n=0; for(i=0; inrows; i++) for(j=0; jncols; j++){ gdk_color_parse(default_colors[n], &color); gdk_color_alloc(gtk_widget_get_colormap(GTK_WIDGET(color_combo)), &color); n++; color_combo->colors[n-1]=color; } } /** * gtk_color_combo_new_with_values: * @nrows: number of rows in #GtkColorCombo. * @ncols: number of columns in #GtkColorCombo. * @colors: #GdkColor color. * * Creates a new #GtkColorCombo widget having @nrows rows and @ncols columns with #GdkColor color. * * Returns: the newly-created #GtkColorCombo widget. */ GtkWidget * gtk_color_combo_new_with_values (gint nrows, gint ncols, GdkColor *colors) { GtkWidget * color_combo; color_combo = gtk_widget_new(gtk_color_combo_get_type(), NULL); gtk_color_combo_construct_with_values((GtkColorCombo *)color_combo, nrows, ncols, colors); return(color_combo); } /** * gtk_color_combo_construct_with_values: * @color_combo: the #GtkColorCombo widget. * @nrows: number of rows in #GtkColorCombo. * @ncols: number of columns in #GtkColorCombo. * @colors: #GdkColor color. * * Initialize a #GtkColorCombo object with specified values. */ void gtk_color_combo_construct_with_values(GtkColorCombo *color_combo, gint nrows, gint ncols, GdkColor *colors) { gint i,j,n; color_combo->nrows = nrows; color_combo->ncols = ncols; n = color_combo->nrows * color_combo->ncols; color_combo->colors = g_new0(GdkColor, n); n=0; for(i=0; inrows; i++) for(j=0; jncols; j++) color_combo->colors[n-1] = *colors; // RRR color to colors } /** * gtk_color_combo_get_color_at: * @color_combo: a #GtkColorCombo widget. * @row: row number in #GtkColorCombo. * @col: column number in #GtkColorCombo. * * Get the color in the combo at the specified row,column. * * Returns: a #GdkColor at @row,@col in @color_combo */ GdkColor gtk_color_combo_get_color_at(GtkColorCombo *color_combo, gint row, gint col) { return color_combo->colors[row*color_combo->ncols+col]; } /* Returns best match for a given color */ /** * gtk_color_combo_find_color: * @color_combo: a #GtkColorCombo widget. * @color: a #GdkColor object. * @row: row number in #GtkColorCombo. * @col: column number in #GtkColorCombo. * * Find the best match for a given color. */ void gtk_color_combo_find_color(GtkColorCombo *color_combo, GdkColor *color, gint *row, gint *col) { GdkColor combo_color; gint i, j; gdouble dist = 114000.0; gdouble d, dr, dg, db; *row = -1; *col = -1; for(i = 0; i < color_combo->nrows; i++){ for(j = 0; j < color_combo->ncols; j++){ combo_color = gtk_color_combo_get_color_at(color_combo, i, j); if(gdk_color_equal(color, &combo_color)){ *row = i; *col = j; return; } dr = fabs(color->red - combo_color.red); dg = fabs(color->green - combo_color.green); db = fabs(color->blue - combo_color.blue); d = dr + dg + db; /* printf("%d %d %d // %d %d %d\n",color->red,color->green,color->blue,combo_color.red,combo_color.green,combo_color.blue); printf("%f\n",d); */ if(d < dist){ dist = d; *row = i; *col = j; } } } } /** * gtk_color_combo_get_selection: * @combo: a #GtkColorCombo widget. * * Get the color in the combo at selection . * * Returns: a #GdkColor of the selection. */ GdkColor gtk_color_combo_get_selection(GtkColorCombo *combo) { return combo->selection; } gtkextra-3.2.0/gtkextra/testsegment.c0000644000076400001440000002306312603754176014644 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotsegment.h" #include "gtkplotcanvas.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gdouble gaussian(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = .65*exp(-.5*pow(x-.5,2)/.02); return y; } gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } widget_list = plots; active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); } return TRUE; } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkColor color; static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py1[]={.2, .4, .5, .35, .30, .40}; static gdouble px2[]={.12, .22, .27, .12, .052, .42}; static gdouble py2[]={.0, .05, .12, .22, .16, .1}; dataset[0] = GTK_PLOT_DATA(gtk_plot_segment_new()); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, px2, py2, 6); /* gtk_plot_segment_center(GTK_PLOT_SEGMENT(dataset[0]), FALSE); */ gdk_color_parse("red", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_NONE, 0, 0, 1, &color); gtk_plot_data_set_legend(dataset[0], "Vector"); } void build_example2(GtkWidget *active_plot) { GdkColor color; static gdouble px1[]={-0., -0.2, -0.4, -0.6, -0.8, -1.0}; static gdouble py1[]={-.2, -.4, -.5, -.35, -.30, -.40}; static gdouble px2[]={-.12, -.22, -.27, -.12, -.052, -.42}; static gdouble py2[]={-.0, -.05, -.12, -.22, -.16, -.1}; dataset[1] = GTK_PLOT_DATA(gtk_plot_segment_new()); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[1]); gtk_widget_show(GTK_WIDGET(dataset[1])); gtk_plot_data_set_points(dataset[1], px1, py1, px2, py2, 6); gtk_plot_segment_set_relative(GTK_PLOT_SEGMENT(dataset[1]), TRUE); /* gtk_plot_segment_center(GTK_PLOT_SEGMENT(dataset[0]), FALSE); */ gdk_color_parse("blue", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_symbol(dataset[1], GTK_PLOT_SYMBOL_NONE, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset[1], GTK_PLOT_LINE_NONE, 0, 0, 1, &color); gtk_plot_segment_set_arrow (GTK_PLOT_SEGMENT(dataset[1]), 0, 10, GTK_PLOT_SYMBOL_EMPTY); gtk_plot_segment_set_arrow_mask (GTK_PLOT_SEGMENT(dataset[1]), GTK_PLOT_ARROW_ORIGIN|GTK_PLOT_ARROW_END); gtk_plot_data_set_legend(dataset[1], "Segment"); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; GtkPlotCanvasChild *child; gint page_width, page_height; gfloat scale = 1.; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotSegment Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); gtk_plot_set_range(GTK_PLOT(active_plot), -1. ,1., -1., 1.4); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 0), 1., 1); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 1), 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_x0_set_visible(GTK_PLOT(active_plot), TRUE); gtk_plot_y0_set_visible(GTK_PLOT(active_plot), TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .65, .31); gtk_widget_show(active_plot); build_example1(active_plot); build_example2(active_plot); g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demosegment.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkfilelist.c0000644000076400001440000006061512603754176014627 00000000000000/* gtkfilelist - gtkfilelist widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkfilelist * @short_description: A file list widget fot GTK * * It is a GtkIconList subclass that displays the contents of a given directory using fancy icons for different types of files */ #include "config.h" #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include #ifdef HAVE_DIRENT_H #include #endif #ifdef HAVE_FNMATCH_H #include #else static int fnmatch(const char* pattern, const char* s, int m) { /* very simple replacement, should work here for now */ int slen = strlen(s); int plen = strlen(pattern); if (strstr(pattern, "*.*")) { return 0; } else if (*pattern == '*') { return ((strstr(s, pattern+1) == s + slen - (plen - 1)) ? 0 : 1); } else if ('*' == pattern[plen]) { return ((0 == strncmp(s, pattern, plen - 1)) ? 0 : 1); } else if (NULL == strstr(pattern, "*") && NULL == strstr(pattern, "?")) { return ((0 == strcmp(s, pattern)) ? 0 : 1); } else { g_print("fnmatch(%s,%s,%d) ???\n", pattern, s, m); return 0; } } #endif #include "gtkfilelist.h" #include "gtkfileicons.h" #ifdef G_OS_WIN32 #ifndef S_ISDIR #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #define S_ISLNK(m) (0) #elif defined(_WIN32) #define S_ISLNK(m) (0) #endif #define lstat(f,s) stat(f,s) #endif /* G_OS_WIN32 */ static void gtk_file_list_class_init (GtkFileListClass *klass); static void gtk_file_list_init (GtkFileList *file_list); static void gtk_file_list_destroy (GtkObject *object); static void gtk_file_list_realize (GtkWidget *widget); static gint sort_list (gpointer a, gpointer b); extern gboolean check_dir_extra (gchar *dir_name, struct stat *result, gboolean *stat_subdirs); static GtkIconListClass *parent_class = NULL; static GtkFileListType default_types[] = { {"*.cpp",GTK_FILE_LIST_CPP}, {"*.c",GTK_FILE_LIST_C}, {"*.h",GTK_FILE_LIST_H}, {"*.for",GTK_FILE_LIST_F}, {"*.f",GTK_FILE_LIST_F}, {"*.f77",GTK_FILE_LIST_F}, {"*.f90",GTK_FILE_LIST_F}, {"*.jar",GTK_FILE_LIST_JAVA}, {"*.java",GTK_FILE_LIST_JAVA}, {"*.j",GTK_FILE_LIST_JAVA}, {"*.mp3",GTK_FILE_LIST_SOUND}, {"*.wav",GTK_FILE_LIST_SOUND}, {"*.ps",GTK_FILE_LIST_PS}, {"*.pdf",GTK_FILE_LIST_PDF}, {"*.doc",GTK_FILE_LIST_DOC}, {"*.txt",GTK_FILE_LIST_TEXT}, {"README",GTK_FILE_LIST_TEXT}, {"TODO",GTK_FILE_LIST_TEXT}, {"NEWS",GTK_FILE_LIST_TEXT}, {"AUTHORS",GTK_FILE_LIST_TEXT}, {"COPYING",GTK_FILE_LIST_TEXT}, {"INSTALL",GTK_FILE_LIST_TEXT}, {"BUGS",GTK_FILE_LIST_TEXT}, {"*.xpm",GTK_FILE_LIST_IMG}, {"*.jpg",GTK_FILE_LIST_IMG}, {"*.jpeg",GTK_FILE_LIST_IMG}, {"*.gif",GTK_FILE_LIST_IMG}, {"*.tif",GTK_FILE_LIST_IMG}, {"*.tiff",GTK_FILE_LIST_IMG}, {"*.png",GTK_FILE_LIST_IMG}, {"*.tar",GTK_FILE_LIST_ARCH}, {"*.tar.bz2",GTK_FILE_LIST_ARCH}, {"*.bz2",GTK_FILE_LIST_ARCH}, {"*.zip",GTK_FILE_LIST_ARCH}, {"*.tar.gz",GTK_FILE_LIST_PKG}, {"*.tgz",GTK_FILE_LIST_PKG}, {"*.rpm",GTK_FILE_LIST_RPM}, {"*.deb",GTK_FILE_LIST_DEB}, {"*.htm",GTK_FILE_LIST_HTML}, {"*.html",GTK_FILE_LIST_HTML}, {"*.mpeg",GTK_FILE_LIST_MOVIE}, {"*.mpeg1",GTK_FILE_LIST_MOVIE}, {"*.mpeg2",GTK_FILE_LIST_MOVIE}, {"*.mpg",GTK_FILE_LIST_MOVIE}, {"*.mpg1",GTK_FILE_LIST_MOVIE}, {"*.mpg2",GTK_FILE_LIST_MOVIE}, {"*.avi",GTK_FILE_LIST_MOVIE}, {"*.mov",GTK_FILE_LIST_MOVIE}, {"core",GTK_FILE_LIST_CORE}, {NULL, 0}, }; GType gtk_file_list_get_type (void) { static GType file_list_type = 0; if (!file_list_type) { file_list_type = g_type_register_static_simple( gtk_icon_list_get_type(), "GtkFileList", sizeof (GtkFileListClass), (GClassInitFunc) gtk_file_list_class_init, sizeof (GtkFileList), (GInstanceInitFunc) gtk_file_list_init, 0); } return file_list_type; } /** * gtk_file_list_new: * @icon_width: the width of the icon * @mode:GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE * @path: the path to the files to be be opened in #GtkFileList widget. * * Create a newfile list widget. * Remark for the 2nd open file window you must use: gtk_icon_file_selection_show_tree(GTK_ICON_FILESEL(filesel), TRUE); * * Returns: the newly-created #GtkFileList widget. */ GtkWidget* gtk_file_list_new (guint icon_width, gint mode, const gchar *path) { GtkWidget *widget; GtkFileList *file_list; widget = gtk_widget_new (gtk_file_list_get_type(), NULL); file_list = GTK_FILE_LIST(widget); gtk_file_list_construct(file_list, icon_width, mode, path); return widget; } /** * gtk_file_list_construct: * @file_list: #GtkFileList widget * @icon_width: the width of the icon * @mode:GTK_FILE_LIST_SORT_NAME , GTK_FILE_LIST_SORT_TYPE * @path: the path to the files to be be opened in #GtkFileList widget. * * Initializes newfile list widget with specified values. */ void gtk_file_list_construct(GtkFileList *file_list, guint icon_width, gint mode, const gchar *path) { GtkIconList *icon_list; icon_list = GTK_ICON_LIST(file_list); icon_list->mode = mode; icon_list->icon_width = icon_width; icon_list->selection_mode = GTK_SELECTION_SINGLE; if(path) file_list->path = g_strdup(path); else file_list->path = g_strdup(G_DIR_SEPARATOR_S); } static void gtk_file_list_class_init (GtkFileListClass *klass) { GtkWidgetClass *widget_class; GtkObjectClass *object_class; widget_class = (GtkWidgetClass*) klass; object_class = (GtkObjectClass*) klass; parent_class = g_type_class_ref (gtk_icon_list_get_type ()); widget_class->realize = gtk_file_list_realize; object_class->destroy = gtk_file_list_destroy; } static void gtk_file_list_destroy(GtkObject *object) { GtkIconList *icon_list; GtkFileList *file_list; GtkIconListItem *item; GtkFileListItem *file_item; GList *list; file_list = GTK_FILE_LIST(object); icon_list = GTK_ICON_LIST(object); list = icon_list->icons; while(list){ item = (GtkIconListItem *)list->data; file_item = (GtkFileListItem *)item->link; if(file_item->file_name) g_free(file_item->file_name); file_item->file_name = NULL; g_free(item->link); item->link = NULL; list = list->next; } list = file_list->types; while(list){ GtkFileListType *type; type = (GtkFileListType *)list->data; if(type->extension) g_free(type->extension); type->extension = NULL; file_list->types = g_list_remove_link(file_list->types, list); g_list_free_1(list); list = file_list->types; } file_list->types = NULL; list = file_list->pixmaps; while(list){ file_list->pixmaps = g_list_remove_link(file_list->pixmaps, list); gtk_widget_destroy(GTK_WIDGET(list->data)); g_list_free_1(list); list = file_list->pixmaps; } file_list->pixmaps = NULL; g_free(GTK_FILE_LIST(object)->path); GTK_FILE_LIST(object)->path = NULL; g_free(GTK_FILE_LIST(object)->filter); GTK_FILE_LIST(object)->filter = NULL; if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void gtk_file_list_init (GtkFileList *file_list) { GtkFileListType *types; gchar **pixmap_data[GTK_FILE_LIST_CORE+1]; gint i; file_list->path = NULL; file_list->show_folders = TRUE; file_list->show_hidden = TRUE; file_list->sort_mode = GTK_FILE_LIST_SORT_TYPE; file_list->filter = NULL; GTK_ICON_LIST(file_list)->text_space = 150; GTK_ICON_LIST(file_list)->compare_func = (GCompareFunc)sort_list; pixmap_data[GTK_FILE_LIST_FILE] = file_xpm; pixmap_data[GTK_FILE_LIST_FOLDER] = folder_xpm; pixmap_data[GTK_FILE_LIST_EXEC] = exec_xpm; pixmap_data[GTK_FILE_LIST_CPP] = cpp_xpm; pixmap_data[GTK_FILE_LIST_C] = c_xpm; pixmap_data[GTK_FILE_LIST_H] = h_xpm; pixmap_data[GTK_FILE_LIST_F] = f_xpm; pixmap_data[GTK_FILE_LIST_JAVA] = java_xpm; pixmap_data[GTK_FILE_LIST_DOC] = doc_xpm; pixmap_data[GTK_FILE_LIST_SOUND] = sound_xpm; pixmap_data[GTK_FILE_LIST_PS] = ps_xpm; pixmap_data[GTK_FILE_LIST_PDF] = pdf_xpm; pixmap_data[GTK_FILE_LIST_TEXT] = text_xpm; pixmap_data[GTK_FILE_LIST_IMG] = image_xpm; pixmap_data[GTK_FILE_LIST_ARCH] = arch_xpm; pixmap_data[GTK_FILE_LIST_PKG] = package_xpm; pixmap_data[GTK_FILE_LIST_DEB] = deb_xpm; pixmap_data[GTK_FILE_LIST_RPM] = rpm_xpm; pixmap_data[GTK_FILE_LIST_HTML] = html_xpm; pixmap_data[GTK_FILE_LIST_MOVIE] = movie_xpm; pixmap_data[GTK_FILE_LIST_CAT] = cat_xpm; pixmap_data[GTK_FILE_LIST_CORE] = core_xpm; file_list->ntypes = 0; for(i = 0; i <= GTK_FILE_LIST_CORE; i++) gtk_file_list_add_type(file_list, (const gchar **)pixmap_data[i]); types = default_types; while(types->extension){ gtk_file_list_add_type_filter(file_list, types->type, types->extension); types++; } } static gint sort_list(gpointer a, gpointer b) { GtkFileList *file_list; GtkIconListItem *itema; GtkIconListItem *itemb; GtkFileListItem *filea; GtkFileListItem *fileb; gint compare_value; itema = (GtkIconListItem *)a; itemb = (GtkIconListItem *)b; filea = (GtkFileListItem *)itema->link; fileb = (GtkFileListItem *)itemb->link; file_list = GTK_FILE_LIST(gtk_widget_get_parent(itema->entry)); if(!file_list) return 0; switch(file_list->sort_mode){ case GTK_FILE_LIST_SORT_TYPE: compare_value = filea->type - fileb->type; if(compare_value == 0) compare_value = strcmp(itema->label, itemb->label); break; case GTK_FILE_LIST_SORT_NAME: default: compare_value = strcmp(itema->label, itemb->label); if(filea->type == GTK_FILE_LIST_FOLDER || fileb->type == GTK_FILE_LIST_FOLDER){ compare_value = filea->type - fileb->type; if(compare_value == 0) compare_value = strcmp(itema->label, itemb->label); } break; } return compare_value; } static void gtk_file_list_realize(GtkWidget *widget) { GtkFileList *file_list; GTK_WIDGET_CLASS(parent_class)->realize (widget); file_list = GTK_FILE_LIST(widget); gtk_file_list_open_dir(file_list, file_list->path); } /** * gtk_file_list_open_dir: * @file_list: a #GtkFileList widget * @dir_path: path of directory to be opened in #GtkFileList widget * * Opens the content of specified directory in #GtkFileList widget. * * Returns: TRUE(succes) or FALSE(failure) */ gboolean gtk_file_list_open_dir(GtkFileList *file_list, const gchar *dir_path) { DIR *dir; struct dirent *dirent; struct stat fileinfo, linkinfo; GtkIconList *icon_list; GtkIconListItem *item; GtkFileListItem *file_item; GtkFileListType *file_type; GtkWidget *widget; gchar *full_name, *file; gchar *real_path; GdkPixmap *pixmap; GdkBitmap *mask; GdkPixmap *l_pixmap; GdkBitmap *l_mask; GtkImage *icon; gint width, height; GdkGC *gc; GList *types, *files, *list; gint type; gboolean show_file; gboolean stat_subdirs=TRUE; gchar root[5], root1[5], root2[5], root3[5], root4[5]; gchar *aux_path; widget = GTK_WIDGET(file_list); icon_list = GTK_ICON_LIST(widget); /* GET ABSOLUTE PATH */ sprintf(root,"%s",G_DIR_SEPARATOR_S); sprintf(root1,"%s.",G_DIR_SEPARATOR_S); sprintf(root2,"%s..",G_DIR_SEPARATOR_S); sprintf(root3,"%s..%s",G_DIR_SEPARATOR_S,G_DIR_SEPARATOR_S); sprintf(root4,"%s.%s",G_DIR_SEPARATOR_S,G_DIR_SEPARATOR_S); if(dir_path){ gint length; aux_path = g_strdup(dir_path); length = strlen(aux_path); if(strcmp(aux_path + length - 2, root1) == 0){ if(length == 2) { g_free(aux_path); aux_path = g_strdup(root); } else { aux_path[length - 2] = '\0'; } } else if(strcmp(aux_path + length - 3, root2) == 0){ if(length == 3) { g_free(aux_path); aux_path = g_strdup(root); } else { gint i = length - 4; while(i >= 0){ if(aux_path[i] == root[0]){ aux_path[i] = '\0'; break; } i--; } } } else if(strcmp(aux_path + length - 4, root3) == 0){ if(length == 4) { g_free(aux_path); aux_path = g_strdup(root); } else { gint i = length - 5; while(i >= 0){ if(aux_path[i] == root[0]){ aux_path[i] = '\0'; break; } i--; } } } else if(strcmp(aux_path + length - 3, root4) == 0){ if(length == 3) { g_free(aux_path); aux_path = g_strdup(root); } else { aux_path[length - 3] = '\0'; } } else if(strcmp(aux_path + length - 1, root) == 0){ aux_path[length - 1] = '\0'; } if(strlen(aux_path) == 0) { g_free(aux_path); aux_path = g_strdup(G_DIR_SEPARATOR_S); } } else aux_path = g_strdup(G_DIR_SEPARATOR_S); real_path = g_strdup(aux_path); g_free(aux_path); if((dir = opendir(real_path)) == NULL){ g_warning("Can not open folder: %s",real_path); g_free(real_path); return FALSE; } if(!check_dir_extra(real_path,&fileinfo,&stat_subdirs)){ closedir(dir); g_warning("Can not stat folder: %s",real_path); g_free(real_path); return FALSE; } if(file_list->path) g_free(file_list->path); file_list->path = real_path; /* UPDATE ICON LIST */ gtk_icon_list_freeze(icon_list); files = icon_list->icons; while(files){ item = (GtkIconListItem *)files->data; file_item = (GtkFileListItem *)item->link; g_free(file_item->file_name); g_free(item->link); item->link = NULL; files = files->next; } gtk_icon_list_clear(icon_list); /* gdk_threads_enter(); */ files = NULL; while((dirent=readdir(dir))!=NULL){ full_name = g_strconcat(real_path,G_DIR_SEPARATOR_S,dirent->d_name,NULL); file = dirent->d_name; show_file = TRUE; if(stat_subdirs){ if(0==stat(full_name, &fileinfo)) { if(S_ISDIR(fileinfo.st_mode)) { type = GTK_FILE_LIST_FOLDER; } else { type = GTK_FILE_LIST_FILE; if(fileinfo.st_mode & 0111) type = GTK_FILE_LIST_EXEC; } } else { /* silently skip instead of warn. Chris Kuklewicz chrisk@mit.edu */ /* g_warning("Can not stat path: %s",full_name); */ continue; } } else { type = GTK_FILE_LIST_FOLDER; } if(file_list->show_folders && type == GTK_FILE_LIST_FOLDER) show_file = TRUE; if(file[0] == '.'){ if(file_list->show_hidden == TRUE) show_file = TRUE; else show_file = FALSE; if(file_list->show_folders && (strcmp(file,".") == 0 || strcmp(file,"..") == 0)) show_file = TRUE; } if(strcmp(full_name, root1) == 0 || strcmp(full_name, root2) == 0) show_file = FALSE; if(!file_list->show_folders && type == GTK_FILE_LIST_FOLDER) show_file = FALSE; if(file_list->filter && fnmatch(file_list->filter, file, (1 << 4)) != 0) { if(file_list->show_folders && type == GTK_FILE_LIST_FOLDER && show_file == TRUE) show_file = TRUE; else show_file = FALSE; } if(show_file){ file_item = (GtkFileListItem *)g_new(GtkFileListItem, 1); file_item->file_name = g_strdup(file); file_item->type = type; file_item->is_link = FALSE; if (stat_subdirs){ if(0!=lstat(full_name, &linkinfo)) g_warning("Can not resolve link: %s",full_name); if(S_ISLNK(linkinfo.st_mode)) file_item->is_link = TRUE; } files = g_list_append(files, file_item); } g_free(full_name); } list = files; while(list){ file_item = (GtkFileListItem *)list->data; type = file_item->type; types = file_list->types; while(types){ file_type = (GtkFileListType *)types->data; if(fnmatch((gchar *)file_type->extension, file_item->file_name, (1 << 4)) == 0){ type = file_type->type; break; } types = types->next; } icon = (g_list_nth_data(file_list->pixmaps, type)); file_item->type = type; gtk_image_get_pixmap(icon, &l_pixmap, &l_mask); gdk_pixmap_ref(l_pixmap); gdk_bitmap_ref(l_mask); item = gtk_icon_list_add_from_pixmap(icon_list, l_pixmap, l_mask, file_item->file_name, file_item); if(file_item->is_link){ pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, gdk_colormap_get_system(), &mask, NULL, symlink_xpm); gtk_image_get_pixmap((GtkImage *)(item->pixmap), &l_pixmap, &l_mask); gdk_window_get_size(l_pixmap, &width, &height); gc = gdk_gc_new(pixmap); gdk_draw_pixmap(l_pixmap, gc, pixmap, 0, 0, width - 7, height - 7, 7, 7); gdk_gc_unref(gc); gc = gdk_gc_new(mask); gdk_draw_pixmap(l_mask, gc, mask, 0, 0, width - 7, height - 7, 7, 7); gdk_gc_unref(gc); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); } list = list->next; } closedir(dir); /* gdk_threads_leave(); */ gtk_icon_list_thaw(icon_list); g_list_free(files); return TRUE; } /** * gtk_file_list_set_filter: * @file_list: the #GtkFileList widget. * @filter: filter applied to files * * Sets a filter for files displayed in Open window. */ void gtk_file_list_set_filter(GtkFileList *filelist, const gchar *filter) { filelist->filter = g_strdup(filter); gtk_file_list_open_dir(filelist, filelist->path); } /** * gtk_file_list_get_path: * @file_list: the #GtkFileList widget. * * Get the path of the files shown in filelist * * Returns: the path of files. */ const gchar * gtk_file_list_get_path(GtkFileList *file_list) { return(file_list->path); } /** * gtk_file_list_get_filename: * @file_list: the #GtkFileList widget. * * Get the path of the files shown in filelist * * Returns: the filename */ const gchar * gtk_file_list_get_filename(GtkFileList *file_list) { GList *list; gpointer selection=NULL; gchar *file; file=NULL; list = GTK_ICON_LIST(file_list)->selection; if(list) selection=list->data; if(selection){ selection = ((GtkIconListItem *)selection)->link; file = ((GtkFileListItem *)selection)->file_name; } return file; } /** * gtk_file_list_get_filetype: * @file_list: the #GtkFileList widget. * GTK_FILE_LIST_FILE, * GTK_FILE_LIST_HTML, * GTK_FILE_LIST_TEXT, * GTK_FILE_LIST_DOC, * GTK_FILE_LIST_PDF, * GTK_FILE_LIST_C, * GTK_FILE_LIST_CPP, * GTK_FILE_LIST_H, * GTK_FILE_LIST_F, * GTK_FILE_LIST_JAVA, * GTK_FILE_LIST_EXEC, * GTK_FILE_LIST_IMG, * GTK_FILE_LIST_ARCH, * GTK_FILE_LIST_PKG, * GTK_FILE_LIST_DEB, * GTK_FILE_LIST_RPM, * GTK_FILE_LIST_CAT, * GTK_FILE_LIST_SOUND, * GTK_FILE_LIST_MOVIE, * GTK_FILE_LIST_CORE) * * Get the #GtkFileListType of selected file in File List. * * Returns: The #GtkFileListType ( GTK_FILE_LIST_FOLDER, */ gint gtk_file_list_get_filetype(GtkFileList *file_list) { GList *list; gpointer selection=NULL; gint file = -1; list = GTK_ICON_LIST(file_list)->selection; if(list) selection=list->data; if(selection){ selection = ((GtkIconListItem *)selection)->link; file = ((GtkFileListItem *)selection)->type; } return file; } /** * gtk_file_list_add_type: * @file_list: the #GtkFileList widget. * @pixmap_data: Pointer to a string containing the XPM data.(last argument of gdk_pixmap_create_from_xpm_d() ). * * Add a new file type in a #GtkFileList structure. * * Returns: the identification number given to the added * filetype */ gint gtk_file_list_add_type (GtkFileList *file_list, const gchar **pixmap_data) { GdkPixmap *pixmap; GdkBitmap *mask; gint type; pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, gdk_colormap_get_system(), &mask, NULL, (gchar **)pixmap_data); type = gtk_file_list_add_type_with_pixmap(file_list, pixmap, mask); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); return type; } /** * gtk_file_list_add_type_with_pixmap: * @file_list: the #GtkFileList widget. * @pixmap: a #GdkPixmap object. * @mask: a #GdkBitmap mask. * * Add a new file type in a #GtkFileList structure. * * Returns: the identification number given to the added * filetype */ gint gtk_file_list_add_type_with_pixmap (GtkFileList *file_list, GdkPixmap *pixmap, GdkBitmap *mask) { GtkWidget *wpixmap; wpixmap = gtk_image_new_from_pixmap(pixmap, mask); file_list->pixmaps = g_list_append(file_list->pixmaps, wpixmap); file_list->ntypes++; return (file_list->ntypes - 1); } /** * gtk_file_list_add_type_filter: * @file_list: the #GtkFileList widget. * @type: file type. * @filter: filter for specified type. * * Add a filter for specified file type in a #GtkFileList structure. */ void gtk_file_list_add_type_filter(GtkFileList *file_list, gint type, const gchar *filter) { GtkFileListType *type_item; type_item = g_new0(GtkFileListType,1); type_item->type = type; type_item->extension = g_strdup(filter); file_list->types = g_list_append(file_list->types, type_item); return; } gtkextra-3.2.0/gtkextra/suncloud.xpm0000644000076400001440000000157012603754176014517 00000000000000/* XPM */ static char * suncloud_xpm[] = { "24 24 7 1", " c None", "x c #FFFFFFFFFFFF", ". c #F7F7BABA3C3C", "X c #FFFFFFFF0000", "o c #AAAAAAAAAAAA", "O c #000000000000", "+ c #CCCCCCCCCCCC", "@ c #6E6E6E6E6E6E", " ", " . . ", " . . . . ", " .XX..XX. ", " . X......X . ", " .X..XXXX..X. ", " X.XXXXXXXX.X ", " ..X.XXXXXXXX.X.. ", " X.XXXXoooooX.X ", " X.XXXoxxxxxO.X ", " ....XoooxxxxxxO... ", " X.oxxxxxxxxxxO ", " Xooxxx+xxx+xx@OOO ", " .oxxxxx++xx+@xxxOO ", " @@xxx+xxx+x+xxxxxxOO ", " @@xxxx+xxxxxxx+xxx+xO ", " @xxxxx+xxxxxx++x+xxxO ", " Oxxxxx+x+Oxx++O+x+xOOO ", " Ox+++++++++++@O+++xO+O ", " OO++x++OO++@@O+++@O+@O ", " OO@@@@OO+@@OO@@@OO@OO ", " OO@@OOO@OOOO@@OOOOO ", " OOOO OOO OOOOO ", " "}; gtkextra-3.2.0/gtkextra/gtkcheckitem.h0000644000076400001440000000513712603754176014753 00000000000000/* gtkcheckitem - widget for gtk+ * Copyright (C) 1999-2001 Adrian E. Feiguin * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __GTK_CHECK_ITEM_H__ #define __GTK_CHECK_ITEM_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define G_TYPE_CHECK_ITEM (gtk_check_item_get_type ()) #define GTK_CHECK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_CHECK_ITEM, GtkCheckItem)) #define GTK_CHECK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_CHECK_ITEM, GtkCheckItemClass)) #define GTK_IS_CHECK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_CHECK_ITEM)) #define GTK_IS_CHECK_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), G_TYPE_CHECK_ITEM)) #define GTK_CHECK_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_CHECK_ITEM, GtkCheckItemClass)) typedef struct _GtkCheckItem GtkCheckItem; typedef struct _GtkCheckItemClass GtkCheckItemClass; struct _GtkCheckItem { GtkToggleButton toggle_button; }; struct _GtkCheckItemClass { GtkToggleButtonClass parent_class; guint16 indicator_size; guint16 indicator_spacing; void (* draw_indicator) (GtkCheckItem *check_item, GdkRectangle *area); }; GType gtk_check_item_get_type (void); GtkWidget* gtk_check_item_new (void); GtkWidget* gtk_check_item_new_with_label (const gchar *label); void gtk_check_item_construct_with_label (GtkCheckItem* check_item, const gchar *label); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_CHECK_ITEM_H__ */ gtkextra-3.2.0/gtkextra/gtkcolorcombo.h0000644000076400001440000000556012603754176015155 00000000000000/* gtkcolorcombo - color combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_COLOR_COMBO_H__ #define __GTK_COLOR_COMBO_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkcombobutton.h" #define GTK_COLOR_COMBO(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_color_combo_get_type (), GtkColorCombo) #define GTK_COLOR_COMBO_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_color_combo_get_type (), GtkColorComboClass) #define GTK_IS_COLOR_COMBO(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_color_combo_get_type ()) typedef struct _GtkColorCombo GtkColorCombo; typedef struct _GtkColorComboClass GtkColorComboClass; /* you should access only the entry and list fields directly */ struct _GtkColorCombo { GtkComboButton color_combo; gint nrows; gint ncols; gint row; gint column; GtkWidget **button; GtkWidget *table; GtkWidget *custom_button; GdkColor *colors; GdkColor selection; }; struct _GtkColorComboClass { GtkComboButtonClass parent_class; void (*changed) (GtkColorCombo *color_combo, gint selection, GdkColor *color); }; GType gtk_color_combo_get_type (void); GtkWidget *gtk_color_combo_new (void); GtkWidget *gtk_color_combo_new_with_values (gint nrows, gint ncols, GdkColor *colors); void gtk_color_combo_construct (GtkColorCombo *color_combo); void gtk_color_combo_construct_with_values (GtkColorCombo *color_combo, gint nrows, gint ncols, GdkColor *colors); GdkColor gtk_color_combo_get_color_at (GtkColorCombo *color_combo, gint row, gint col); void gtk_color_combo_find_color (GtkColorCombo *color_combo, GdkColor *color, gint *row, gint *col); GdkColor gtk_color_combo_get_selection (GtkColorCombo *combo); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_COLOR_COMBO_H__ */ gtkextra-3.2.0/gtkextra/gtkcombobutton.c0000644000076400001440000002662712603754176015354 00000000000000/* gtkcombo_button - combo_button widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkcombobutton * @short_description: A combo button widget for GTK * */ /** * GtkComboButton: * * The GtkComboButton struct contains only private data. * It should only be accessed through the functions described below. */ #include #include #include #include #include "gtkextra-compat.h" #include "gtkcombobutton.h" static void gtk_combo_button_class_init (GtkComboButtonClass *klass); static void gtk_combo_button_init (GtkComboButton *combo_button); static void gtk_combo_button_destroy (GtkObject *combo_button); static void gtk_combo_button_get_pos (GtkComboButton *combo_button, gint *x, gint *y, gint *height, gint *width); static void gtk_combo_button_popup_display (GtkComboButton *combo_button); static gint gtk_combo_button_arrow_press (GtkWidget * widget, GtkComboButton * combo_button); static gint gtk_combo_button_button_press (GtkWidget *widget, GdkEvent *event, gpointer data); static void gtk_combo_button_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static void gtk_combo_button_size_request (GtkWidget *widget, GtkRequisition *requisition); static GtkHBoxClass *parent_class = NULL; static void gtk_combo_button_class_init (GtkComboButtonClass * klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; parent_class = g_type_class_ref (gtk_hbox_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; object_class->destroy = gtk_combo_button_destroy; widget_class->size_allocate = gtk_combo_button_size_allocate; widget_class->size_request = gtk_combo_button_size_request; } static void gtk_combo_button_destroy (GtkObject * combo_button) { gtk_widget_destroy (GTK_COMBO_BUTTON (combo_button)->popwin); g_object_unref (GTK_COMBO_BUTTON (combo_button)->popwin); if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (combo_button); } static void gtk_combo_button_get_pos (GtkComboButton * combo_button, gint * x, gint * y, gint * height, gint * width) { GtkBin *popwin; GtkWidget *widget; GtkAllocation allocation; GtkAllocation arrow_allocation; gint real_height, real_width; GtkRequisition child_requisition; gint avail_height, avail_width; gint min_height, min_width; gint work_width; gint work_height; widget = GTK_WIDGET(combo_button); popwin = GTK_BIN (combo_button->popwin); gtk_widget_get_allocation(combo_button->button, &allocation); gtk_widget_get_allocation(combo_button->arrow, &arrow_allocation); gdk_window_get_origin (gtk_widget_get_window(combo_button->button), x, y); *x += allocation.x; *y += allocation.y; real_height = allocation.height; real_width = allocation.width + arrow_allocation.width; *y += real_height; avail_height = gdk_screen_height () - *y; avail_width = gdk_screen_width() - *x; gtk_widget_size_request (combo_button->frame, &child_requisition); min_height = child_requisition.height; min_width = child_requisition.width; work_width = work_height = 0; if(work_height+child_requisition.height > avail_height) if(work_height + min_height > avail_height && *y - real_height > avail_height) *y -= (work_height + child_requisition.height + real_height); if(work_width+child_requisition.width > avail_width) if(work_width + min_width > avail_width && *x - real_width > avail_width) *x = *x + real_width - (work_width + child_requisition.width); *width = work_width + child_requisition.width; *height = work_height + child_requisition.height; } static void gtk_combo_button_popup_display (GtkComboButton * combo_button) { gint height, width, x, y; gtk_combo_button_get_pos (combo_button, &x, &y, &height, &width); gtk_window_move(GTK_WINDOW(combo_button->popwin), x, y); gtk_widget_set_size_request (combo_button->popwin, width, height); gtk_widget_show (combo_button->popwin); gtk_grab_add (combo_button->popwin); gdk_pointer_grab (gtk_widget_get_window(combo_button->popwin), TRUE, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK, NULL, NULL, GDK_CURRENT_TIME); } /** * gtk_combo_button_hide_popdown_window: * @combo_button: the #GtkComboButton widget. * * Hides the popdown window of pressed #GtkComboButton. */ void gtk_combo_button_hide_popdown_window(GtkComboButton *combo_button) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(combo_button->arrow), FALSE); gtk_grab_remove(combo_button->popwin); gdk_pointer_ungrab(GDK_CURRENT_TIME); gtk_widget_hide(combo_button->popwin); } static gint gtk_combo_button_arrow_press (GtkWidget * widget, GtkComboButton * combo_button) { GtkToggleButton *button; button = GTK_TOGGLE_BUTTON(widget); if(!button->active){ gtk_widget_hide (combo_button->popwin); gtk_grab_remove (combo_button->popwin); gdk_pointer_ungrab (GDK_CURRENT_TIME); return TRUE; } gtk_combo_button_popup_display(combo_button); return TRUE; } static void gtk_combo_button_init (GtkComboButton * combo_button) { GtkWidget *event_box; GdkCursor *cursor; GtkWidget *widget; GtkWidget *arrow; widget=GTK_WIDGET(combo_button); GTK_BOX(widget)->homogeneous = FALSE; combo_button->button = gtk_button_new (); combo_button->arrow = gtk_toggle_button_new (); arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN); gtk_widget_show (arrow); gtk_container_add (GTK_CONTAINER (combo_button->arrow), arrow); gtk_box_pack_start (GTK_BOX (combo_button), combo_button->button, TRUE, TRUE, 0); gtk_box_pack_end (GTK_BOX (combo_button), combo_button->arrow, FALSE, FALSE, 0); gtk_widget_show (combo_button->button); gtk_widget_show (combo_button->arrow); g_signal_connect (GTK_OBJECT (combo_button->arrow), "toggled", (void *) gtk_combo_button_arrow_press, combo_button); combo_button->popwin = gtk_window_new (GTK_WINDOW_POPUP); g_object_ref (combo_button->popwin); // DUP ? RRR gtk_window_set_resizable (GTK_WINDOW (combo_button->popwin), FALSE); gtk_window_set_resizable (GTK_WINDOW (combo_button->popwin), TRUE); gtk_widget_set_events (combo_button->popwin, GDK_KEY_PRESS_MASK); event_box = gtk_event_box_new (); gtk_container_add (GTK_CONTAINER (combo_button->popwin), event_box); gtk_widget_show (event_box); gtk_widget_realize (event_box); cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW); gdk_window_set_cursor (gtk_widget_get_window(event_box), cursor); gdk_cursor_destroy (cursor); combo_button->frame = gtk_frame_new (NULL); gtk_container_add (GTK_CONTAINER (event_box), combo_button->frame); gtk_frame_set_shadow_type (GTK_FRAME (combo_button->frame), GTK_SHADOW_OUT); gtk_widget_show (combo_button->frame); g_signal_connect (GTK_OBJECT (combo_button->popwin), "button_press_event", (void *)gtk_combo_button_button_press, combo_button); } GType gtk_combo_button_get_type () { static GType combo_button_type = 0; if (!combo_button_type) { combo_button_type = g_type_register_static_simple ( gtk_hbox_get_type (), "GtkComboButton", sizeof (GtkComboButtonClass), (GClassInitFunc) gtk_combo_button_class_init, sizeof (GtkComboButton), (GInstanceInitFunc) gtk_combo_button_init, 0); } return combo_button_type; } GtkWidget * gtk_combo_button_new () { GtkComboButton *combo_button; combo_button = g_object_new (gtk_combo_button_get_type (), NULL); return(GTK_WIDGET(combo_button)); } static gint gtk_combo_button_button_press (GtkWidget * widget, GdkEvent * event, gpointer data) { GtkWidget *child; child = gtk_get_event_widget (event); if (child != widget) { while (child) { if (child == widget) return FALSE; child = gtk_widget_get_parent(child); } } gtk_widget_hide (widget); gtk_grab_remove (widget); gdk_pointer_ungrab (GDK_CURRENT_TIME); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(GTK_COMBO_BUTTON(data)->arrow), FALSE); return TRUE; } static void gtk_combo_button_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkComboButton *combo_button; GtkRequisition box_requisition; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_COMBO_BUTTON (widget)); g_return_if_fail (requisition != NULL); GTK_WIDGET_CLASS (parent_class)->size_request (widget, &box_requisition); combo_button=GTK_COMBO_BUTTON(widget); /* size = MIN(box_requisition.width, box_requisition.height); size = MIN(combo_button->button->requisition.width, box_requisition.height); size = MIN(combo_button->button->requisition.width, box_requisition.height); widget->requisition.height = size; widget->requisition.width = size + combo_button->arrow->requisition.width; */ gtk_widget_set_size_request(widget, box_requisition.width, box_requisition.height); } static void gtk_combo_button_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GtkComboButton *combo_button; GtkAllocation button_allocation; GtkRequisition arrow_requisition; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_COMBO_BUTTON (widget)); g_return_if_fail (allocation != NULL); GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation); combo_button = GTK_COMBO_BUTTON (widget); gtk_widget_get_allocation(combo_button->button, &button_allocation); /* button_allocation.width = MIN(button_allocation.width, combo_button->button->requisition.width); button_allocation.height = MIN(button_allocation.height, combo_button->button->requisition.height); button_allocation.x += (combo_button->button->allocation.width- button_allocation.width) / 2; button_allocation.y += (combo_button->button->allocation.height- button_allocation.height) / 2; */ gtk_widget_size_allocate (combo_button->button, &button_allocation); gtk_widget_get_requisition(combo_button->arrow, &arrow_requisition); button_allocation.x= button_allocation.x + button_allocation.width; button_allocation.width = arrow_requisition.width; gtk_widget_size_allocate (combo_button->arrow, &button_allocation); } gtkextra-3.2.0/gtkextra/gtkplotcanvasline.c0000644000076400001440000005461712603754176016043 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasline.h" #include "gtkplotgdk.h" #include "gtkplotps.h" /** * SECTION: gtkplotcanvasline * @short_description: * * FIXME:: need long description */ #define DEFAULT_MARKER_SIZE 6 #define P(string) string enum{ ARG_0, ARG_LINE, ARG_X1, ARG_Y1, ARG_X2, ARG_Y2, ARG_POS, ARG_ARROW_MASK, ARG_ARROW_LENGTH, ARG_ARROW_WIDTH, ARG_ARROW_STYLE }; static void gtk_plot_canvas_line_init (GtkPlotCanvasLine *line); static void gtk_plot_canvas_line_class_init (GtkPlotCanvasChildClass *klass); static void gtk_plot_canvas_line_draw_selection (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area); static void gtk_plot_canvas_line_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_line_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y); static void gtk_plot_canvas_line_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); static GtkPlotCanvasPos gtk_plot_canvas_line_button_press (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gint x, gint y); static void gtk_plot_canvas_line_button_release (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_line_size_allocate (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_line_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_line_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static GtkPlotCanvasChildClass *parent_class = NULL; GType gtk_plot_canvas_line_get_type (void) { static GType plot_canvas_line_type = 0; if (!plot_canvas_line_type) { plot_canvas_line_type = g_type_register_static_simple ( gtk_plot_canvas_child_get_type(), "GtkPlotCanvasLine", sizeof (GtkPlotCanvasLineClass), (GClassInitFunc) gtk_plot_canvas_line_class_init, sizeof (GtkPlotCanvasLine), (GInstanceInitFunc) gtk_plot_canvas_line_init, 0); } return plot_canvas_line_type; } GtkPlotCanvasChild* gtk_plot_canvas_line_new (GtkPlotLineStyle style, gfloat width, const GdkColor *color, GtkPlotCanvasArrow arrow_mask) { GtkPlotCanvasLine *line; line = g_object_new (gtk_plot_canvas_line_get_type (), NULL); line->line.line_width = width; if(color) line->line.color = *color; line->arrow_mask = arrow_mask; return GTK_PLOT_CANVAS_CHILD (line); } static void gtk_plot_canvas_line_init (GtkPlotCanvasLine *line) { gdk_color_black(gdk_colormap_get_system(), &line->line.color); line->line.line_style = GTK_PLOT_LINE_SOLID; line->line.line_width = 0; line->arrow_length = 8; line->arrow_width = 8; line->arrow_style = GTK_PLOT_SYMBOL_FILLED; line->pos = GTK_PLOT_CANVAS_OUT; line->x1 = line->y1 = 0; line->x2 = line->y2 = 0; } static void gtk_plot_canvas_line_class_init (GtkPlotCanvasChildClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_canvas_child_get_type ()); klass->draw = gtk_plot_canvas_line_draw; klass->draw_selection = gtk_plot_canvas_line_draw_selection; klass->move = gtk_plot_canvas_line_move; klass->move_resize = gtk_plot_canvas_line_resize; klass->size_allocate = gtk_plot_canvas_line_size_allocate; klass->button_press = gtk_plot_canvas_line_button_press; klass->button_release = gtk_plot_canvas_line_button_release; gobject_class->get_property = gtk_plot_canvas_line_get_property; gobject_class->set_property = gtk_plot_canvas_line_set_property; /** * GtkPlotCanvasLine:line: * * **/ g_object_class_install_property (gobject_class, ARG_LINE, g_param_spec_pointer ("line", P("Line Attributes"), P("Line Attributes"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:x1: * * **/ g_object_class_install_property (gobject_class, ARG_X1, g_param_spec_double ("x1", P("Origin X"), P("Coordinate X of the first point"), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:y1: * * **/ g_object_class_install_property (gobject_class, ARG_Y1, g_param_spec_double ("y1", P("Origin Y"), P("Coordinate Y of the first point"), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:x2: * * **/ g_object_class_install_property (gobject_class, ARG_X2, g_param_spec_double ("x2", P("End X"), P("Coordinate X of the second point"), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:y2: * * **/ g_object_class_install_property (gobject_class, ARG_Y2, g_param_spec_double ("y2", P("End Y"), P("Coordinate Y of the second point"), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:pos: * * **/ g_object_class_install_property (gobject_class, ARG_POS, g_param_spec_int ("pos", P(""), P(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:arrow_mask: * * **/ g_object_class_install_property (gobject_class, ARG_ARROW_MASK, g_param_spec_int ("arrow_mask", P("Arrow Mask"), P("Arrow Mask"), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:arrow_width: * * **/ g_object_class_install_property (gobject_class, ARG_ARROW_WIDTH, g_param_spec_int ("arrow_width", P("Arrow Width"), P("Arrow Width"), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:arrow_length: * * **/ g_object_class_install_property (gobject_class, ARG_ARROW_LENGTH, g_param_spec_int ("arrow_length", P("Arrow Length"), P("Arrow Length"), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasLine:arrow_style: * * **/ g_object_class_install_property (gobject_class, ARG_ARROW_STYLE, g_param_spec_int ("arrow_style", P("Arrow Style"), P("Arrow Style"), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_canvas_line_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE (object); switch(prop_id){ case ARG_LINE: line->line = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_X1: line->x1 = g_value_get_double(value); break; case ARG_Y1: line->y1 = g_value_get_double(value); break; case ARG_X2: line->x2 = g_value_get_double(value); break; case ARG_Y2: line->y2 = g_value_get_double(value); break; case ARG_POS: line->pos = g_value_get_int(value); break; case ARG_ARROW_MASK: line->arrow_mask = g_value_get_int(value); break; case ARG_ARROW_LENGTH: line->arrow_length = g_value_get_int(value); break; case ARG_ARROW_WIDTH: line->arrow_width = g_value_get_int(value); break; case ARG_ARROW_STYLE: line->arrow_style = g_value_get_int(value); break; } } static void gtk_plot_canvas_line_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE (object); switch(prop_id){ case ARG_LINE: g_value_set_pointer(value, &line->line); break; case ARG_X1: g_value_set_double(value, line->x1); break; case ARG_Y1: g_value_set_double(value, line->y1); break; case ARG_X2: g_value_set_double(value, line->x2); break; case ARG_Y2: g_value_set_double(value, line->y2); break; case ARG_POS: g_value_set_int(value, line->pos); break; case ARG_ARROW_MASK: g_value_set_int(value, line->arrow_mask); break; case ARG_ARROW_LENGTH: g_value_set_int(value, line->arrow_length); break; case ARG_ARROW_WIDTH: g_value_set_int(value, line->arrow_width); break; case ARG_ARROW_STYLE: g_value_set_int(value, line->arrow_style); break; } } static void gtk_plot_canvas_line_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE(child); gdouble angle = 0; gint width = child->allocation.width; gint height = child->allocation.height; gint rx1, rx2, ry1, ry2; GtkPlotPoint arrow[3]; gdouble xm, ym; gdouble m = canvas->magnification; gtk_plot_canvas_get_pixel(canvas, line->x1, line->y1, &rx1, &ry1); gtk_plot_canvas_get_pixel(canvas, line->x2, line->y2, &rx2, &ry2); if(width == 0 && height == 0) return; if(width != 0) angle = atan2((gdouble)(ry2 - ry1), (gdouble)(rx2 - rx1)); else angle = asin((ry2 - ry1)/height); gtk_plot_canvas_set_line_attributes(canvas, line->line); gtk_plot_pc_draw_line(canvas->pc, rx1, ry1, rx2, ry2); gtk_plot_pc_set_lineattr(canvas->pc, line->line.line_width, 0, 0, 0); if(line->arrow_mask & GTK_PLOT_CANVAS_ARROW_END){ arrow[1].x = rx2; arrow[1].y = ry2; xm = rx2 - cos(angle) * line->arrow_length * m; ym = ry2 - sin(angle) * line->arrow_length * m; arrow[0].x = xm - sin(angle)* line->arrow_width * m / 2.0; arrow[0].y = ym + cos(angle)* line->arrow_width * m / 2.0; arrow[2].x = xm + sin(angle)* line->arrow_width * m / 2.0; arrow[2].y = ym - cos(angle)* line->arrow_width * m / 2.0; switch(line->arrow_style){ case GTK_PLOT_SYMBOL_EMPTY: gtk_plot_pc_draw_lines (canvas->pc, arrow, 3); break; case GTK_PLOT_SYMBOL_OPAQUE: gtk_plot_pc_set_color(canvas->pc, &canvas->background); gtk_plot_pc_draw_polygon (canvas->pc, TRUE, arrow, 3); gtk_plot_pc_set_color(canvas->pc, &line->line.color); gtk_plot_pc_draw_polygon (canvas->pc, FALSE, arrow, 3); break; case GTK_PLOT_SYMBOL_FILLED: gtk_plot_pc_draw_polygon (canvas->pc, TRUE, arrow, 3); } } if(line->arrow_mask & GTK_PLOT_CANVAS_ARROW_ORIGIN){ arrow[1].x = rx1; arrow[1].y = ry1; xm = rx1 + cos(angle) * line->arrow_length * m; ym = ry1 + sin(angle) * line->arrow_length * m; arrow[0].x = xm + sin(angle)* line->arrow_width * m / 2.0; arrow[0].y = ym - cos(angle)* line->arrow_width * m / 2.0; arrow[2].x = xm - sin(angle)* line->arrow_width * m / 2.0; arrow[2].y = ym + cos(angle)* line->arrow_width * m / 2.0; switch(line->arrow_style){ case GTK_PLOT_SYMBOL_EMPTY: gtk_plot_pc_draw_lines (canvas->pc, arrow, 3); break; case GTK_PLOT_SYMBOL_OPAQUE: gtk_plot_pc_set_color(canvas->pc, &canvas->background); gtk_plot_pc_draw_polygon (canvas->pc, TRUE, arrow, 3); gtk_plot_pc_set_color(canvas->pc, &line->line.color); gtk_plot_pc_draw_polygon (canvas->pc, FALSE, arrow, 3); break; case GTK_PLOT_SYMBOL_FILLED: gtk_plot_pc_draw_polygon (canvas->pc, TRUE, arrow, 3); } } } static void gtk_plot_canvas_line_draw_selection (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE(child); GdkGC *xor_gc = NULL; GdkGCValues values; gint x1, y1; gint x2, y2; gint dx, dy; dx = canvas->pointer_x - canvas->drag_x; dy = canvas->pointer_y - canvas->drag_y; gdk_gc_get_values(gtk_widget_get_style(GTK_WIDGET(canvas))->fg_gc[0], &values); values.function = GDK_INVERT; values.foreground = gtk_widget_get_style(GTK_WIDGET(canvas))->white; values.subwindow_mode = GDK_INCLUDE_INFERIORS; xor_gc = gdk_gc_new_with_values(gtk_widget_get_window(GTK_WIDGET(canvas)), &values, GDK_GC_FOREGROUND | GDK_GC_FUNCTION | GDK_GC_SUBWINDOW); gtk_plot_canvas_get_pixel(canvas, line->x1, line->y1, &x1, &y1); gtk_plot_canvas_get_pixel(canvas, line->x2, line->y2, &x2, &y2); if(line->pos == GTK_PLOT_CANVAS_TOP_LEFT){ gdk_draw_rectangle(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, TRUE, x2 - DEFAULT_MARKER_SIZE / 2, y2 - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); gdk_draw_rectangle(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, TRUE, x1 + dx - DEFAULT_MARKER_SIZE / 2, y1 + dy - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); gdk_gc_set_line_attributes(xor_gc, 1, 1, 0, 0); gdk_draw_line(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, x2, y2, x1 + dx, y1 + dy); } else if(line->pos == GTK_PLOT_CANVAS_BOTTOM_RIGHT){ gdk_draw_rectangle(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, TRUE, x1 - DEFAULT_MARKER_SIZE / 2, y1 - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); gdk_draw_rectangle(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, TRUE, x2 + dx - DEFAULT_MARKER_SIZE / 2, y2 + dy - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); gdk_gc_set_line_attributes(xor_gc, 1, 1, 0, 0); gdk_draw_line(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, x1, y1, x2 + dx, y2 + dy); } else { gdk_draw_rectangle(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, TRUE, x1 + dx - DEFAULT_MARKER_SIZE / 2, y1 + dy - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); gdk_draw_rectangle(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, TRUE, x2 + dx - DEFAULT_MARKER_SIZE / 2, y2 + dy - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); gdk_gc_set_line_attributes(xor_gc, 1, 1, 0, 0); gdk_draw_line(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, x1 + dx, y1 + dy, x2 + dx, y2 + dy); } if(xor_gc) gdk_gc_unref(xor_gc); } static GtkPlotCanvasPos gtk_plot_canvas_line_button_press (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gint x, gint y) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE(child); gint x1, y1, x2, y2; gtk_plot_canvas_get_pixel(canvas, line->x1, line->y1, &x1, &y1); gtk_plot_canvas_get_pixel(canvas, line->x2, line->y2, &x2, &y2); if(abs(x - x1) <= DEFAULT_MARKER_SIZE / 2 && abs(y - y1) <= DEFAULT_MARKER_SIZE / 2) { line->pos = GTK_PLOT_CANVAS_TOP_LEFT; child->state = GTK_STATE_SELECTED; return line->pos; } if(abs(x - x2) <= DEFAULT_MARKER_SIZE / 2 && abs(y - y2) <= DEFAULT_MARKER_SIZE / 2) { line->pos = GTK_PLOT_CANVAS_BOTTOM_RIGHT; child->state = GTK_STATE_SELECTED; return line->pos; } if(x < MAX(x1, x2) && x > MIN(x1, x2) && y < MAX(y1, y2) && y > MIN(y1, y2)){ gdouble dist; gdouble vx, vy; vx = x2 - x1; vy = y2 - y1; dist = (x - x1) * vy - (y - y1) * vx; dist /= sqrt(vx * vx + vy * vy); if(fabs(dist) <= DEFAULT_MARKER_SIZE) { line->pos = GTK_PLOT_CANVAS_IN; child->state = GTK_STATE_SELECTED; return line->pos; } } line->pos = GTK_PLOT_CANVAS_OUT; child->state = GTK_STATE_NORMAL; return GTK_PLOT_CANVAS_OUT; } static void gtk_plot_canvas_line_size_allocate (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE(child); gint x1, x2, y1, y2; line->x1 = child->rx1; line->y1 = child->ry1; line->x2 = child->rx2; line->y2 = child->ry2; gtk_plot_canvas_get_pixel(canvas, child->rx1, child->ry1, &x1, &y1); gtk_plot_canvas_get_pixel(canvas, child->rx2, child->ry2, &x2, &y2); child->allocation.x = MIN(x1, x2); child->allocation.y = MIN(y1, y2); child->allocation.width = abs(x1 - x2); child->allocation.height = abs(y1 - y2); } static void gtk_plot_canvas_line_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y) { return; } static void gtk_plot_canvas_line_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE(child); line->x1 = x1; line->y1 = y1; line->x2 = x2; line->y2 = y2; GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); gtk_plot_canvas_paint(canvas); gtk_plot_canvas_refresh(canvas); } static void gtk_plot_canvas_line_button_release (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasLine *line = GTK_PLOT_CANVAS_LINE(child); gdouble px, py, dx, dy; gtk_plot_canvas_get_position(canvas, canvas->pointer_x, canvas->pointer_y, &px, &py); gtk_plot_canvas_get_position(canvas, canvas->drag_x, canvas->drag_y, &dx, &dy); if(line->pos == GTK_PLOT_CANVAS_TOP_LEFT){ line->x1 += (px - dx); line->y1 += (py - dy); } else if(line->pos == GTK_PLOT_CANVAS_BOTTOM_RIGHT) { line->x2 += (px - dx); line->y2 += (py - dy); } else if(line->pos == GTK_PLOT_CANVAS_IN) { line->x1 += (px - dx); line->y1 += (py - dy); line->x2 += (px - dx); line->y2 += (py - dy); } child->rx1 = line->x1; child->ry1 = line->y1; child->rx2 = line->x2; child->ry2 = line->y2; GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); gtk_plot_canvas_paint(canvas); gtk_plot_canvas_refresh(canvas); } /** * gtk_plot_canvas_line_set_attributes: * @line: a #GtkPlotCanvasLine widget. * @style: * @width: * @color: * * */ void gtk_plot_canvas_line_set_attributes(GtkPlotCanvasLine *line, GtkPlotLineStyle style, gfloat width, const GdkColor *color) { if(color) line->line.color = *color; line->line.line_width = width; line->line.line_style = style; } /** * gtk_plot_canvas_line_set_arrow: * @line: a #GtkPlotCanvasLine widget. * @style: * @width: * @length: * @mask: * * */ void gtk_plot_canvas_line_set_arrow(GtkPlotCanvasLine *line, GtkPlotSymbolStyle style, gfloat width, gfloat length, GtkPlotCanvasArrow mask) { line->arrow_width = width; line->arrow_length = length; line->arrow_style = style; line->arrow_mask = mask; } gtkextra-3.2.0/gtkextra/gtkfilelist.h0000644000076400001440000001135312603754176014627 00000000000000/* gtkfilelist - gtkfilelist widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_FILE_LIST_H__ #define __GTK_FILE_LIST_H__ #include #include #include "gtkiconlist.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define G_TYPE_FILE_LIST (gtk_file_list_get_type ()) #define GTK_FILE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE_LIST, GtkFileList)) #define GTK_FILE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_FILE_LIST, GtkFileListClass)) #define GTK_IS_FILE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE_LIST)) #define GTK_IS_FILE_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), G_TYPE_FILE_LIST)) enum { GTK_FILE_LIST_FOLDER, GTK_FILE_LIST_FILE, GTK_FILE_LIST_HTML, GTK_FILE_LIST_TEXT, GTK_FILE_LIST_DOC, GTK_FILE_LIST_PS, GTK_FILE_LIST_PDF, GTK_FILE_LIST_C, GTK_FILE_LIST_CPP, GTK_FILE_LIST_H, GTK_FILE_LIST_F, GTK_FILE_LIST_JAVA, GTK_FILE_LIST_EXEC, GTK_FILE_LIST_IMG, GTK_FILE_LIST_ARCH, GTK_FILE_LIST_PKG, GTK_FILE_LIST_DEB, GTK_FILE_LIST_RPM, GTK_FILE_LIST_CAT, GTK_FILE_LIST_SOUND, GTK_FILE_LIST_MOVIE, GTK_FILE_LIST_CORE, }; enum { GTK_FILE_LIST_SORT_NAME, GTK_FILE_LIST_SORT_TYPE, }; typedef struct _GtkFileList GtkFileList; typedef struct _GtkFileListItem GtkFileListItem; typedef struct _GtkFileListType GtkFileListType; typedef struct _GtkFileListClass GtkFileListClass; /** * GtkFileListType: * * The GtkFileListType structure contains only private data. * It should only be accessed through the functions described below. */ struct _GtkFileListType { /*< private >*/ gchar *extension; gint type; }; /** * GtkFileListItem: * * The GtkFileListItem structure contains only private data. * It should only be accessed through the functions described below. */ struct _GtkFileListItem { /*< private >*/ gchar *file_name; gint type; gint is_dir; gint is_link; }; /** * GtkFileList: * * The GtkFileList structure contains only private data. * It should only be accessed through the functions described below. */ struct _GtkFileList { GtkIconList iconlist; gint sort_mode; gchar *filter; gboolean show_folders; gboolean show_hidden; gchar *path; GList *pixmaps; GList *types; gint ntypes; }; struct _GtkFileListClass { GtkIconListClass parent_class; }; GType gtk_file_list_get_type (void); GtkWidget* gtk_file_list_new (guint icon_width, gint mode, const gchar *path); void gtk_file_list_construct (GtkFileList *file_list, guint icon_width, gint mode, const gchar *path); void gtk_file_list_set_filter (GtkFileList *file_list, const gchar *filter); gboolean gtk_file_list_open_dir (GtkFileList *file_list, const gchar *dir_path); const gchar* gtk_file_list_get_path (GtkFileList *file_list); const gchar* gtk_file_list_get_filename (GtkFileList *file_list); gint gtk_file_list_get_filetype (GtkFileList *file_list); gint gtk_file_list_add_type (GtkFileList *file_list, const gchar **pixmap_data); gint gtk_file_list_add_type_with_pixmap (GtkFileList *file_list, GdkPixmap *pixmap, GdkBitmap *mask); void gtk_file_list_add_type_filter(GtkFileList *file_list, gint type, const gchar *filter); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_FILE_LIST_H__ */ gtkextra-3.2.0/gtkextra/gtkplotcanvasrectangle.h0000644000076400001440000000610212603754176017047 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANVAS_RECTANGLE_H__ #define __GTK_PLOT_CANVAS_RECTANGLE_H__ #define GTK_PLOT_CANVAS_RECTANGLE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_rectangle_get_type (), GtkPlotCanvasRectangle) #define GTK_PLOT_CANVAS_RECTANGLE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_rectangle_get_type(), GtkPlotCanvasRectangleClass) #define GTK_IS_PLOT_CANVAS_RECTANGLE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_rectangle_get_type ()) #define G_TYPE_PLOT_CANVAS_RECTANGLE (gtk_plot_canvas_rectangle_get_type ()) #include #include "gtkplotpc.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GtkPlotCanvasRectangle GtkPlotCanvasRectangle; typedef struct _GtkPlotCanvasRectangleClass GtkPlotCanvasRectangleClass; /** * GtkPlotCanvasRectangle: * * The GtkPlotCanvasRectangle struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvasRectangle { GtkPlotCanvasChild parent; GtkPlotLine line; gboolean filled; GtkPlotBorderStyle border; gint shadow_width; GdkColor bg; }; struct _GtkPlotCanvasRectangleClass { GtkPlotCanvasChildClass parent_class; }; GType gtk_plot_canvas_rectangle_get_type (void); GtkPlotCanvasChild * gtk_plot_canvas_rectangle_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill); void gtk_plot_canvas_rectangle_set_attributes( GtkPlotCanvasRectangle *rectangle, GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, GtkPlotBorderStyle border, gboolean fill); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANVAS_RECTANGLE_H__ */ gtkextra-3.2.0/gtkextra/gtkextra.c0000644000076400001440000001005412603754176014127 00000000000000/* gtkextra * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "gtkextrafeatures.h" #include const guint gtkextra_major_version = GTKEXTRA_MAJOR_VERSION; const guint gtkextra_minor_version = GTKEXTRA_MINOR_VERSION; const guint gtkextra_micro_version = GTKEXTRA_MICRO_VERSION; gchar * gtkextra_check_version (guint required_major, guint required_minor, guint required_micro) { if (required_major > GTKEXTRA_MAJOR_VERSION) return "GtkExtra version too old (major mismatch)"; if (required_major < GTKEXTRA_MAJOR_VERSION) return "GtkExtra version too new (major mismatch)"; if (required_minor > GTKEXTRA_MINOR_VERSION) return "GtkExtra version too old (minor mismatch)"; if (required_minor < GTKEXTRA_MINOR_VERSION) return "GtkExtra version too new (minor mismatch)"; if (required_micro > GTKEXTRA_MICRO_VERSION) return "GtkExtra version too old (micro mismatch)"; return NULL; } /* void _gtkextra_signal_test(GtkObject *object, guint signal_id, gint arg1, gint arg2, gboolean *default_ret) { gboolean result; GValue ret = { 0, }; GValue instance_and_param[3] = { { 0, }, {0, }, {0, } }; g_value_init(instance_and_param + 0, GTK_OBJECT_TYPE(object)); g_value_set_instance(instance_and_param + 0, G_OBJECT(object)); g_value_init(instance_and_param + 1, G_TYPE_INT); g_value_set_int(instance_and_param + 1, arg1); g_value_init(instance_and_param + 2, G_TYPE_INT); g_value_set_int(instance_and_param + 2, arg2); g_value_init(&ret, G_TYPE_BOOLEANEAN); g_value_set_boolean(&ret, *default_ret); g_signal_emitv(instance_and_param, signal_id, 0, &ret); *default_ret = g_value_get_boolean(&ret); g_value_unset(instance_and_param + 0); g_value_unset(instance_and_param + 1); g_value_unset(instance_and_param + 2); } */ void _gtkextra_signal_emit(GtkObject *object, guint signal_id, ...) { gboolean *result; GValue ret = { 0, }; GValue instance_and_params [10] = { {0, }, }; va_list var_args; GSignalQuery query; gchar *error; int i; va_start (var_args, signal_id); g_value_init(instance_and_params + 0, G_OBJECT_TYPE(object)); g_value_set_instance (instance_and_params + 0, G_OBJECT(object)); g_signal_query(signal_id, &query); for (i = 0; i < query.n_params; i++) { gboolean static_scope = query.param_types[i]&~G_SIGNAL_TYPE_STATIC_SCOPE; g_value_init(instance_and_params + i + 1, query.param_types[i]); G_VALUE_COLLECT (instance_and_params + i + 1, var_args, static_scope ? G_VALUE_NOCOPY_CONTENTS : 0, &error); if (error) { g_warning ("%s: %s", G_STRLOC, error); g_free (error); while (i-- > 0) g_value_unset (instance_and_params + i); va_end (var_args); return; } } g_value_init(&ret, query.return_type); result = va_arg(var_args,gboolean *); g_value_set_boolean(&ret, *result); g_signal_emitv(instance_and_params, signal_id, 0, &ret); *result = g_value_get_boolean(&ret); g_value_unset (&ret); for (i = 0; i < query.n_params; i++) g_value_unset (instance_and_params + 1 + i); g_value_unset (instance_and_params + 0); va_end (var_args); } gtkextra-3.2.0/gtkextra/gtkplotcanvasplot.c0000644000076400001440000006654612604171206016062 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotcanvasplot * @short_description: * * A #GtkPlotCanvas object is an interactive container for * GtkPlots and some graphic primitives that can be used to * illustrate the plots (see #GtkCanvasChild). */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotgdk.h" #include "gtkplotps.h" #define DEFAULT_MARKER_SIZE 6 static void gtk_plot_canvas_plot_init (GtkPlotCanvasPlot *plot); static void gtk_plot_canvas_plot_class_init(GtkPlotCanvasChildClass *klass); static void gtk_plot_canvas_plot_destroy (GtkObject *object); static void gtk_plot_canvas_plot_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_plot_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y); static void gtk_plot_canvas_plot_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); static void gtk_plot_canvas_plot_size_allocate (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_plot_set_magnification(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble m); static void gtk_plot_canvas_plot_unselect (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static GtkPlotCanvasPos gtk_plot_canvas_plot_button_press (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gint x, gint y); static void gtk_plot_canvas_plot_button_release (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void reset_plot_allocation (GtkPlotCanvas *canvas, GtkPlotCanvasPlot *child); extern gint roundint (gdouble x); static GtkPlotCanvasChildClass *parent_class = NULL; extern GtkPlotCanvasPos possible_selection (GtkAllocation area, gint x, gint y); GType gtk_plot_canvas_plot_get_type (void) { static GType plot_canvas_plot_type = 0; if (!plot_canvas_plot_type) { plot_canvas_plot_type = g_type_register_static_simple ( gtk_plot_canvas_child_get_type(), "GtkPlotCanvasPlot", sizeof (GtkPlotCanvasPlotClass), (GClassInitFunc) gtk_plot_canvas_plot_class_init, sizeof (GtkPlotCanvasPlot), (GInstanceInitFunc) gtk_plot_canvas_plot_init, 0); } return plot_canvas_plot_type; } /** * gtk_plot_canvas_plot_new: * @plot: a #GtkPlot. * * * * Return value: */ GtkPlotCanvasChild* gtk_plot_canvas_plot_new (GtkPlot *plot) { GtkPlotCanvasPlot *child; child = g_object_new (gtk_plot_canvas_plot_get_type (), NULL); child->plot = plot; return GTK_PLOT_CANVAS_CHILD (child); } static void gtk_plot_canvas_plot_init (GtkPlotCanvasPlot *plot) { plot->plot = NULL; plot->pos = GTK_PLOT_CANVAS_PLOT_IN_PLOT; plot->axis = NULL; plot->data = NULL; plot->marker = NULL; GTK_PLOT_CANVAS_PLOT(plot)->datapoint = -1; GTK_PLOT_CANVAS_PLOT(plot)->flags = 0; /* GTK_PLOT_CANVAS_PLOT_SELECT_POINT; */ } static void gtk_plot_canvas_plot_class_init (GtkPlotCanvasChildClass *klass) { GtkObjectClass *object_class = (GtkObjectClass *)klass; parent_class = g_type_class_ref (gtk_plot_canvas_child_get_type ()); klass->draw = gtk_plot_canvas_plot_draw; klass->move = gtk_plot_canvas_plot_move; klass->move_resize = gtk_plot_canvas_plot_resize; klass->size_allocate = gtk_plot_canvas_plot_size_allocate; klass->button_press = gtk_plot_canvas_plot_button_press; klass->button_release = gtk_plot_canvas_plot_button_release; klass->unselect = gtk_plot_canvas_plot_unselect; klass->set_magnification = gtk_plot_canvas_plot_set_magnification; object_class->destroy = gtk_plot_canvas_plot_destroy; } static void gtk_plot_canvas_plot_destroy(GtkObject *object) { GtkWidget *widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(object)->plot); g_object_unref(widget); /* 28.06.13/fp - dropped the following line - do not access widget data after g_object_unref() - calling gtk_widget_unparent() before g_object_unref() -> invalid GObject warnings widget->parent = NULL; */ } GtkPlotCanvasPlotFlags gtk_plot_canvas_plot_flags(GtkPlotCanvasPlot *plot) { g_return_val_if_fail(plot != NULL, 0); return(plot->flags); } void gtk_plot_canvas_plot_set_flags(GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags) { g_return_if_fail(plot != NULL); plot->flags |= flags; } void gtk_plot_canvas_plot_unset_flags(GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags) { g_return_if_fail(plot != NULL); plot->flags &= ~flags; } static void gtk_plot_canvas_plot_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasPlot *plot_child = GTK_PLOT_CANVAS_PLOT(child); GtkPlot *plot = plot_child->plot; gint width = child->allocation.width; gint height = child->allocation.height; gdouble m = canvas->magnification; GtkPlotPC *pc; GtkAllocation allocation; if(width == 0 && height == 0) return; gtk_plot_set_drawable(plot, canvas->pixmap); allocation.x = 0; allocation.y = 0; allocation.width = canvas->pixmap_width; allocation.height = canvas->pixmap_height; gtk_widget_set_allocation(GTK_WIDGET(plot), &allocation); gtk_plot_set_magnification(plot, m); reset_plot_allocation(canvas, plot_child); pc = plot->pc; plot->pc = canvas->pc; gtk_plot_paint(GTK_PLOT_CANVAS_PLOT(child)->plot); plot->pc = pc; } static void reset_plot_allocation(GtkPlotCanvas *canvas, GtkPlotCanvasPlot *child) { GtkPlot *plot = child->plot; gdouble x1 = plot->internal_allocation.x; gdouble y1 = plot->internal_allocation.y; gdouble x2 = x1 + plot->internal_allocation.width; gdouble y2 = y1 + plot->internal_allocation.height; GTK_PLOT_CANVAS_CHILD(child)->allocation = plot->internal_allocation; GTK_PLOT_CANVAS_CHILD(child)->rx1 = x1 / (gdouble) canvas->pixmap_width; GTK_PLOT_CANVAS_CHILD(child)->rx2 = x2 / (gdouble) canvas->pixmap_width; GTK_PLOT_CANVAS_CHILD(child)->ry1 = y1 / (gdouble) canvas->pixmap_height; GTK_PLOT_CANVAS_CHILD(child)->ry2 = y2 / (gdouble) canvas->pixmap_height; /* GTK_PLOT_CANVAS_CHILD(child)->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; GTK_PLOT_CANVAS_CHILD(child)->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; GTK_PLOT_CANVAS_CHILD(child)->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE | GTK_PLOT_CANVAS_CHILD_CAN_RESIZE; */ } static void gtk_plot_canvas_plot_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y) { GtkPlotCanvasPlot *cplot = GTK_PLOT_CANVAS_PLOT(child); GtkPlot *plot = cplot->plot; if(!plot) return; } static void gtk_plot_canvas_plot_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkPlotCanvasPlot *cplot = GTK_PLOT_CANVAS_PLOT(child); GtkPlot *plot = cplot->plot; if(!plot) return; gtk_plot_move_resize(plot, x1, y1, fabs(x2-x1), fabs(y2-y1)); GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); gtk_plot_canvas_paint(canvas); gtk_plot_canvas_refresh(canvas); } static void gtk_plot_canvas_plot_button_release (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasPlot *cplot = GTK_PLOT_CANVAS_PLOT(child); GtkPlot *plot = cplot->plot; gdouble fx, fy, fz, fa; gdouble fdx, fdy, fdz, fda; gdouble mx, my; gchar *label = NULL; gboolean error; gint i; gdouble new_x, new_y, new_width, new_height; gdouble old_x, old_y; gdouble dx, dy; gdouble x1, x2, y1, y2; gboolean moved = FALSE; gtk_plot_canvas_get_position(canvas, child->drag_area.x, child->drag_area.y, &old_x, &old_y); gtk_plot_canvas_get_position(canvas, canvas->drag_area.width, canvas->drag_area.height, &new_width, &new_height); gtk_plot_canvas_get_position(canvas, canvas->drag_area.x, canvas->drag_area.y, &new_x, &new_y); dx = new_x - old_x; dy = new_y - old_y; x1 = MIN(child->rx1, child->rx2); y1 = MIN(child->ry1, child->ry2); x2 = MAX(child->rx1, child->rx2); y2 = MAX(child->ry1, child->ry2); x1 += dx; y1 += dy; x2 = x1 + new_width; y2 = y1 + new_height; if(!plot) return; switch(cplot->pos){ case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: gtk_plot_legends_move(plot, (new_x - plot->x)*canvas->pixmap_width/plot->internal_allocation.width, (new_y - plot->y)*canvas->pixmap_height/plot->internal_allocation.height); child->drag_area = canvas->drag_area; break; case GTK_PLOT_CANVAS_PLOT_IN_TITLE: if(!GTK_IS_PLOT3D(plot) && cplot->axis){ GtkPlotText *text = &cplot->axis->title; text->x += (new_x - old_x); text->y += (new_y - old_y); child->drag_area = canvas->drag_area; } break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: if(GTK_PLOT_CANVAS_PLOT_DND_POINT(cplot)){ gdouble *array_x = NULL; gdouble *array_y = NULL; gdouble px, py; gint n; gdouble x, y; array_x = gtk_plot_data_get_x(cplot->data, &n); array_y = gtk_plot_data_get_y(cplot->data, &n); gtk_plot_get_pixel(plot, array_x[cplot->datapoint], array_y[cplot->datapoint], &px, &py); new_x = px + (canvas->pointer_x - canvas->drag_x); new_y = py + (canvas->pointer_y - canvas->drag_y); gtk_plot_get_point(plot, new_x, new_y, &x, &y); array_x[cplot->datapoint] = x; array_y[cplot->datapoint] = y; gtk_plot_canvas_get_position(canvas, new_x, new_y, &child->rx1, &child->ry1); child->drag_area.x = new_x - DEFAULT_MARKER_SIZE; child->drag_area.y = new_y - DEFAULT_MARKER_SIZE; } break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: gtk_plot_data_get_point(cplot->marker->data, cplot->marker->point, &fx, &fy, &fz, &fa, &fdx, &fdy, &fdz, &fda, &label, &error); gtk_plot_get_pixel(plot, fx, fy, &mx, &my); new_x = mx + (canvas->pointer_x - canvas->drag_x); new_y = my + (canvas->pointer_y - canvas->drag_y); for(i = 0; i < cplot->marker->data->num_points; i++){ gdouble px, py; gtk_plot_data_get_point(cplot->marker->data, i, &fx, &fy, &fz, &fa, &fdx, &fdy, &fdz, &fda, &label, &error); gtk_plot_get_pixel(plot, fx, fy, &px, &py); if(abs(new_x - px) <= DEFAULT_MARKER_SIZE && abs(new_y - py) <= DEFAULT_MARKER_SIZE){ cplot->marker->point = i; cplot->datapoint = i; gtk_plot_canvas_get_position(canvas, px, py, &child->rx1, &child->ry1); child->drag_area.x = px - 10; child->drag_area.y = py - 10; canvas->drag_area = child->drag_area; moved = TRUE; break; } } if(!moved){ child->drag_area.x = mx - 10; child->drag_area.y = my - 10; canvas->drag_area = child->drag_area; } break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: gtk_plot_data_move_gradient(cplot->data, (new_x - plot->x)*canvas->pixmap_width/plot->internal_allocation.width, (new_y - plot->y)*canvas->pixmap_height/plot->internal_allocation.height); child->drag_area = canvas->drag_area; break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: default: child->rx1 = x1; child->ry1 = y1; child->rx2 = x2; child->ry2 = y2; child->drag_area = canvas->drag_area; gtk_plot_move_resize(plot, x1, y1, fabs(x2-x1), fabs(y2-y1)); GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); break; } gtk_plot_canvas_paint(canvas); gtk_plot_canvas_refresh(canvas); } static void gtk_plot_canvas_plot_set_magnification (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble m) { GtkPlot *plot = GTK_PLOT_CANVAS_PLOT(child)->plot; gtk_plot_set_magnification(plot, m); } static void gtk_plot_canvas_plot_size_allocate (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkAllocation allocation; GtkPlot *plot = GTK_PLOT_CANVAS_PLOT(child)->plot; if(!plot) return; switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_PLOT: case GTK_PLOT_CANVAS_PLOT_OUT: allocation.x = 0; allocation.y = 0; allocation.width = canvas->pixmap_width; allocation.height = canvas->pixmap_height; gtk_widget_set_allocation(GTK_WIDGET(plot), &allocation); if(!gtk_widget_get_parent(GTK_WIDGET(plot))) gtk_widget_set_parent(GTK_WIDGET(plot), GTK_WIDGET(canvas)); gtk_plot_move_resize(plot, child->rx1, child->ry1, fabs(child->rx2-child->rx1), fabs(child->ry2-child->ry1)); reset_plot_allocation(canvas, GTK_PLOT_CANVAS_PLOT(child)); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: child->drag_area.x = roundint(child->rx1 * canvas->pixmap_width); child->drag_area.y = roundint(child->ry1 * canvas->pixmap_height); break; case GTK_PLOT_CANVAS_PLOT_IN_TITLE: { GtkPlotText text = GTK_PLOT_CANVAS_PLOT(child)->axis->title; gint tx, ty, twidth, theight; gint rx, ry; gtk_plot_text_get_area(text.text, text.angle, text.justification, text.font, roundint(canvas->magnification * text.height), &tx, &ty, &twidth, &theight); gtk_plot_canvas_get_pixel(canvas, text.x, text.y, &rx, &ry); if(text.border != GTK_PLOT_BORDER_NONE){ tx -= text.border_space; ty -= text.border_space; twidth += 2 * text.border_space; theight += 2 * text.border_space; } child->drag_area.x = tx + rx; child->drag_area.y = ty + ry; child->drag_area.width = twidth; child->drag_area.height = theight; } break; default: break; } } static void gtk_plot_canvas_plot_unselect(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { reset_plot_allocation(canvas, GTK_PLOT_CANVAS_PLOT(child)); } static void canvas_unselect(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { gtk_plot_canvas_unselect(canvas); reset_plot_allocation(canvas, GTK_PLOT_CANVAS_PLOT(child)); GTK_PLOT_CANVAS_CHILD(child)->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; GTK_PLOT_CANVAS_CHILD(child)->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; GTK_PLOT_CANVAS_CHILD(child)->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE | GTK_PLOT_CANVAS_CHILD_CAN_RESIZE; } static GtkPlotCanvasPos gtk_plot_canvas_plot_button_press(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gint x, gint y) { GtkAllocation area; GtkPlot *plot = GTK_PLOT_CANVAS_PLOT(child)->plot; GtkPlotCanvasPos pos; GList *dataset = NULL; if(!plot) return GTK_PLOT_CANVAS_OUT; /* Legends */ area = gtk_plot_legends_get_allocation(plot); if((pos = possible_selection(area, x, y)) != GTK_PLOT_CANVAS_OUT) { if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_LEGENDS) return pos; canvas_unselect(canvas, child); child->drag_area = area; GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_LEGENDS; child->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; child->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE; child->state = GTK_STATE_SELECTED; return pos; } /* Gradient */ dataset = plot->data_sets; while(dataset) { GtkPlotData *data; data = GTK_PLOT_DATA(dataset->data); area = gtk_plot_data_get_gradient_allocation(data); if((pos = possible_selection(area, x, y)) != GTK_PLOT_CANVAS_OUT) { if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_GRADIENT && GTK_PLOT_CANVAS_PLOT(child)->data == data) return pos; canvas_unselect(canvas, child); child->drag_area = area; GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_GRADIENT; GTK_PLOT_CANVAS_PLOT(child)->data = data; child->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; child->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE; child->state = GTK_STATE_SELECTED; return pos; } dataset = dataset->next; } /* Titles */ if(!GTK_IS_PLOT3D(plot)){ GtkPlotAxis *axis[4]; gint i; axis[0]=plot->left; axis[1]=plot->right; axis[2]=plot->top; axis[3]=plot->bottom; for(i = 0; i <= 3; i++){ if(axis[i]->title_visible){ GtkPlotText *child_text = &axis[i]->title; gint tx, ty, twidth, theight; gint rx, ry; gtk_plot_canvas_get_pixel(canvas, child_text->x, child_text->y, &rx, &ry); gtk_plot_text_get_area(child_text->text, child_text->angle, child_text->justification, child_text->font, roundint(child_text->height * canvas->magnification), &tx, &ty, &twidth, &theight); area.x = rx + tx; area.y = ry + ty; area.width = twidth; area.height = theight; if(child_text->border != GTK_PLOT_BORDER_NONE){ area.x -= child_text->border_space; area.y -= child_text->border_space; area.width += 2 * child_text->border_space; area.height += 2 * child_text->border_space; } if((pos = possible_selection(area, x, y)) != GTK_PLOT_CANVAS_OUT){ if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_TITLE && GTK_PLOT_CANVAS_PLOT(child)->axis == axis[i]) return pos; canvas_unselect(canvas, child); child->drag_area = area; GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_TITLE; GTK_PLOT_CANVAS_PLOT(child)->axis = axis[i]; child->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; child->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE; child->state = GTK_STATE_SELECTED; return pos; } } } } /* Plot markers */ area = plot->internal_allocation; if((pos = possible_selection(area, x, y)) != GTK_PLOT_CANVAS_OUT && pos != GTK_PLOT_CANVAS_IN) { if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_PLOT) return pos; canvas_unselect(canvas, child); child->drag_area = area; GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_PLOT; child->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; child->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE; child->state = GTK_STATE_SELECTED; return pos; } /* Axes */ if(!GTK_IS_PLOT3D(plot)){ gint px, py, pwidth, pheight; GtkAllocation _area[4]; GtkPlotAxis *axis[4]; gint i; axis[0]=plot->left; axis[1]=plot->right; axis[2]=plot->top; axis[3]=plot->bottom; px = plot->internal_allocation.x; py = plot->internal_allocation.y; pwidth = plot->internal_allocation.width; pheight = plot->internal_allocation.height; _area[0].x = px - 6; _area[0].y = _area[1].y = py; _area[0].width = _area[1].width = 6; _area[0].height = _area[1].height = pheight; _area[1].x = px + pwidth; _area[2].x = _area[3].x = px; _area[2].y = py - 6; _area[2].width = _area[3].width = pwidth; _area[2].height = _area[3].height = 6; _area[3].y = py + pheight; for(i = 0; i < 4; i++){ area = _area[i]; if((pos = possible_selection(area, x, y)) != GTK_PLOT_CANVAS_OUT){ if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_AXIS && GTK_PLOT_CANVAS_PLOT(child)->axis == axis[i]) return pos; canvas_unselect(canvas, child); child->drag_area = area; GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_AXIS; GTK_PLOT_CANVAS_PLOT(child)->axis = axis[i]; child->state = GTK_STATE_SELECTED; child->flags = GTK_PLOT_CANVAS_CHILD_FROZEN; child->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; return pos; } } } /* Markers */ if(!GTK_IS_PLOT3D(plot)){ dataset = plot->data_sets; while(dataset) { GtkPlotData *data = GTK_PLOT_DATA(dataset->data); GList *markers = data->markers; while(markers){ GtkPlotMarker *marker; gdouble fx, fy, fz, fa, fdx, fdy, fdz, fda; gboolean error; gchar *label; gdouble xi, yi; marker = (GtkPlotMarker *) markers->data; gtk_plot_data_get_point(data, marker->point, &fx, &fy, &fz, &fa, &fdx, &fdy, &fdz, &fda, &label, &error); gtk_plot_get_pixel(GTK_PLOT(plot), fx, fy, &xi, &yi); if(abs(xi-x) <= 20 && abs(yi-y) <= 20){ if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_MARKER && GTK_PLOT_CANVAS_PLOT(child)->marker == marker) return GTK_PLOT_CANVAS_IN; canvas_unselect(canvas, child); GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_MARKER; GTK_PLOT_CANVAS_PLOT(child)->data = data; GTK_PLOT_CANVAS_PLOT(child)->marker = marker; GTK_PLOT_CANVAS_PLOT(child)->datapoint = marker->point; child->drag_area.x = xi - 10; child->drag_area.y = yi - 10; child->drag_area.width = 20; child->drag_area.height = 20; canvas->drag_area = child->drag_area; child->state = GTK_STATE_SELECTED; child->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE; child->selection = GTK_PLOT_CANVAS_SELECT_TARGET; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_1; return GTK_PLOT_CANVAS_IN; } markers = markers->next; } dataset = dataset->next; } } /* Dataset */ if(!GTK_IS_PLOT3D(plot) && GTK_PLOT_CANVAS_PLOT_SELECT_POINT(GTK_PLOT_CANVAS_PLOT(child))){ dataset = plot->data_sets; while(dataset) { GtkPlotData *data = GTK_PLOT_DATA(dataset->data); if(!data->is_function){ gdouble fx, fy, fz, fa, fdx, fdy, fdz, fda; gboolean error; gchar *label; gint i; for(i = 0; i < data->num_points; i++){ gdouble xi, yi; gtk_plot_data_get_point(data, i, &fx, &fy, &fz, &fa, &fdx, &fdy, &fdz, &fda, &label, &error); gtk_plot_get_pixel(GTK_PLOT(plot), fx, fy, &xi, &yi); if(abs(xi-x) <= DEFAULT_MARKER_SIZE && abs(yi-y) <= DEFAULT_MARKER_SIZE){ if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_DATA && GTK_PLOT_CANVAS_PLOT(child)->data == data && GTK_PLOT_CANVAS_PLOT(child)->datapoint == i) return GTK_PLOT_CANVAS_IN; canvas_unselect(canvas, child); GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_DATA; GTK_PLOT_CANVAS_PLOT(child)->data = data; GTK_PLOT_CANVAS_PLOT(child)->datapoint = i; child->drag_area.x = xi - DEFAULT_MARKER_SIZE; child->drag_area.y = yi - DEFAULT_MARKER_SIZE; child->drag_area.width = 2*DEFAULT_MARKER_SIZE; child->drag_area.height = 2*DEFAULT_MARKER_SIZE; canvas->drag_area = child->drag_area; child->state = GTK_STATE_SELECTED; child->flags = GTK_PLOT_CANVAS_CHILD_FROZEN; if(GTK_PLOT_CANVAS_PLOT_DND_POINT(GTK_PLOT_CANVAS_PLOT(child))) child->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE; child->selection = GTK_PLOT_CANVAS_SELECT_TARGET; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_1; return GTK_PLOT_CANVAS_IN; } } } dataset = dataset->next; } } /* Actual plot */ area = plot->internal_allocation; if((pos = possible_selection(area, x, y)) != GTK_PLOT_CANVAS_OUT) { if(canvas->active_item == child && GTK_PLOT_CANVAS_PLOT(child)->pos == GTK_PLOT_CANVAS_PLOT_IN_PLOT) return pos; canvas_unselect(canvas, child); child->drag_area = area; GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_IN_PLOT; child->state = GTK_STATE_SELECTED; return pos; } GTK_PLOT_CANVAS_PLOT(child)->pos = GTK_PLOT_CANVAS_PLOT_OUT; return GTK_PLOT_CANVAS_OUT; } gtkextra-3.2.0/gtkextra/gtkplotprint.c0000644000076400001440000002261612603754176015046 00000000000000/* gtkplotprint - gtkplot printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotprint * @short_description: * * FIXME:: Need long description. */ #include #include #include #include #include #include #include #include "gtkplotpc.h" #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkpsfont.h" #include "gtkplotpc.h" #include "gtkplotps.h" #include "gtkplotdt.h" #include "gtkplotsurface.h" #include "gtkplotcairo.h" #include "gtkplotcanvas.h" static void recalc_pixels(GtkPlot *plot); /** * gtk_plot_export_ps: * @plot: a #GtkPlot * @file_name: * @orient: * @epsflag: * @page_size: * * * * Return value: */ gboolean gtk_plot_export_ps (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size) { GtkPlotPC *pc; GtkPlotPS *ps; gdouble scalex, scaley; gdouble m; GtkAllocation allocation; m = plot->magnification; ps = GTK_PLOT_PS(gtk_plot_ps_new(file_name, orient, epsflag, page_size, 1.0, 1.0)); gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); if(orient == GTK_PLOT_PORTRAIT){ scalex = (gfloat)ps->page_width / (gfloat)allocation.width; scaley = (gfloat)ps->page_height / (gfloat)allocation.height; }else{ scalex = (gfloat)ps->page_width / (gfloat)allocation.height; scaley = (gfloat)ps->page_height / (gfloat)allocation.width; } gtk_plot_ps_set_scale(ps, scalex, scaley); pc = plot->pc; plot->pc = GTK_PLOT_PC(ps); plot->magnification = 1.0; recalc_pixels(plot); gtk_plot_paint(plot); plot->pc = pc; plot->magnification = m; gtk_object_destroy(GTK_OBJECT(ps)); recalc_pixels(plot); return TRUE; } /** * gtk_plot_export_ps_with_size: * @plot: a #GtkPlot * @file_name: * @orient: * @epsflag: * @units: * @width: * @height: * * * * Return value: */ gboolean gtk_plot_export_ps_with_size (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height) { GtkPlotPC *pc; GtkPlotPS *ps; gdouble scalex, scaley; gdouble m; GtkAllocation allocation; m = plot->magnification; ps = GTK_PLOT_PS(gtk_plot_ps_new_with_size(file_name, orient, epsflag, units, width, height, 1.0 , 1.0)); gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); if(orient == GTK_PLOT_PORTRAIT){ scalex = (gfloat)ps->page_width / (gfloat)allocation.width; scaley = (gfloat)ps->page_height / (gfloat)allocation.height; }else{ scalex = (gfloat)ps->page_width / (gfloat)allocation.height; scaley = (gfloat)ps->page_height / (gfloat)allocation.width; } gtk_plot_ps_set_scale(ps, scalex, scaley); pc = plot->pc; plot->pc = GTK_PLOT_PC(ps); plot->magnification = 1.0; recalc_pixels(plot); gtk_plot_paint(plot); plot->pc = pc; plot->magnification = m; recalc_pixels(plot); gtk_object_destroy(GTK_OBJECT(ps)); return TRUE; } /** * gtk_plot_canvas_export_ps: * @canvas: a #GtkPlotCanvas . * @file_name: * @orient: * @epsflag: * @page_size: * * * * Return value: */ gboolean gtk_plot_canvas_export_ps (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size) { GtkPlotPC *pc; GtkPlotPS *ps; gdouble scalex, scaley; gdouble m; GdkPixmap *pixmap; m = canvas->magnification; ps = GTK_PLOT_PS(gtk_plot_ps_new(file_name, orient, epsflag, page_size, 1.0, 1.0)); if(orient == GTK_PLOT_PORTRAIT){ scalex = (gfloat)ps->page_width / (gfloat)canvas->width; scaley = (gfloat)ps->page_height / (gfloat)canvas->height; }else{ scalex = (gfloat)ps->page_width / (gfloat)canvas->height; scaley = (gfloat)ps->page_height / (gfloat)canvas->width; } gtk_plot_ps_set_scale(ps, scalex, scaley); pc = canvas->pc; pixmap = canvas->pixmap; canvas->pixmap = NULL; canvas->pc = NULL; gtk_plot_canvas_set_magnification(canvas, 1.0); canvas->pc = GTK_PLOT_PC(ps); canvas->pixmap = pixmap; gtk_plot_canvas_paint(canvas); canvas->pixmap = NULL; canvas->pc = NULL; gtk_plot_canvas_set_magnification(canvas, m); canvas->pixmap = pixmap; canvas->pc = pc; gtk_object_destroy(GTK_OBJECT(ps)); return TRUE; } /** * gtk_plot_canvas_export_ps_with_size: * @canvas: a #GtkPlotCanvas . * @file_name: * @orient: * @epsflag: * @units: * @width: * @height: * * * * Return value: */ gboolean gtk_plot_canvas_export_ps_with_size (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height) { GtkPlotPC *pc; GtkPlotPS *ps; gdouble scalex, scaley; gdouble m; GdkPixmap *pixmap; m = canvas->magnification; ps = GTK_PLOT_PS(gtk_plot_ps_new_with_size(file_name, orient, epsflag, units, width, height, 1.0 , 1.0)); if(orient == GTK_PLOT_PORTRAIT){ scalex = (gfloat)ps->page_width / (gfloat)canvas->width; scaley = (gfloat)ps->page_height / (gfloat)canvas->height; }else{ scalex = (gfloat)ps->page_width / (gfloat)canvas->height; scaley = (gfloat)ps->page_height / (gfloat)canvas->width; } gtk_plot_ps_set_scale(ps, scalex, scaley); pc = canvas->pc; pixmap = canvas->pixmap; canvas->pixmap = NULL; canvas->pc = NULL; gtk_plot_canvas_set_magnification(canvas, 1.0); canvas->pc = GTK_PLOT_PC(ps); canvas->pixmap = pixmap; gtk_plot_canvas_paint(canvas); canvas->pixmap = NULL; canvas->pc = NULL; gtk_plot_canvas_set_magnification(canvas, m); canvas->pixmap = pixmap; canvas->pc = pc; gtk_object_destroy(GTK_OBJECT(ps)); return TRUE; } static void recalc_pixels(GtkPlot *plot) { GList *list; list = plot->data_sets; while(list){ GtkPlotData *data; data = GTK_PLOT_DATA(list->data); if(GTK_IS_PLOT_SURFACE(data)){ GtkPlotSurface *surface = GTK_PLOT_SURFACE(data); gint i; for(i = surface->dt->node_0; i < surface->dt->node_cnt; i++){ GtkPlotDTnode *node; node = gtk_plot_dt_get_node(surface->dt,i); if(GTK_IS_PLOT3D(plot)){ gtk_plot3d_get_pixel(GTK_PLOT3D(plot), node->x, node->y, node->z, &node->px, &node->py, &node->pz); } else { gtk_plot_get_pixel(plot, node->x, node->y, &node->px, &node->py); node->pz = 0.0; } } } list = list->next; } } /** * gtk_plot_canvas_export_cairo: * @canvas: a #GtkPlotCanvas . * @cairo: * * * * Return value: */ gboolean gtk_plot_canvas_export_cairo (GtkPlotCanvas *canvas, cairo_t *cairo) { GdkPixmap *pixmap; GtkPlotPC *pc, *new_pc; gdouble m; m = canvas->magnification; pc = canvas->pc; new_pc = GTK_PLOT_PC(gtk_plot_cairo_new(cairo)); pixmap = canvas->pixmap; canvas->pixmap = NULL; canvas->pc = NULL; gtk_plot_canvas_set_magnification(canvas, 1.); canvas->pc = new_pc; canvas->pixmap = pixmap; gtk_plot_canvas_paint(canvas); canvas->pc = pc; gtk_plot_canvas_set_magnification(canvas, m); g_object_unref(new_pc); return TRUE; } gtkextra-3.2.0/gtkextra/gtkplotdt.h0000644000076400001440000001044412603754176014322 00000000000000/* gtkplotdt - delaunay triangulization algorithm for gtk+ * Copyright 2001 Andy Thaller * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_DELAUNAY_H__ #define __GTK_PLOT_DELAUNAY_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_PLOT_DT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_dt_get_type (), GtkPlotDT) #define G_TYPE_PLOT_DT (gtk_plot_dt_get_type ()) #define GTK_PLOT_DT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_dt_get_type(), GtkPlotDTClass) #define GTK_IS_PLOT_DT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_dt_get_type ()) typedef struct _GtkPlotDTnode GtkPlotDTnode; typedef struct _GtkPlotDTsegment GtkPlotDTsegment; typedef struct _GtkPlotDTtriangle GtkPlotDTtriangle; typedef struct _GtkPlotDT GtkPlotDT; typedef struct _GtkPlotDTClass GtkPlotDTClass; /* A 2D-node for the delaunay triangulation */ /** * GtkPlotDTnode: * * The GtkPlotDTnode struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotDTnode { /*< private >*/ gdouble x, y, z; /* actual coordinates */ gdouble px, py, pz; /* pixel coordinates */ gint id; /* some kind of 'meta-data' for external use */ gint a,b,c,d; /* neighbour node indices in quadrilateral mode */ gint boundary_marker; }; /** * GtkPlotDTtriangle: * * The GtkPlotDTtriangle struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotDTtriangle { /*< private >*/ gint a, b, c; GtkPlotDTnode *na, *nb, *nc; double radius; /* radius-square */ GtkPlotDTnode ccenter; /* center of circle */ double area; /* twice the triangle's area */ GtkPlotDTnode min,max; /* the bounding box */ GtkPlotDTtriangle *nn[3]; /* neighbours */ gboolean visited; /* auxiliary variable for sweeping though list */ }; /* a progress indicator function with optional 'cancel' functionality * * returns '0' for normal operation * or any arbitrary code to request immediate abortion */ typedef gint (*GtkPlotDTprogressbarFunc) (double progress); /* data needed for a delaunay triangulation * * the nodes are held in an expanding array (use gtk_plot_dt_expand()!) * */ struct _GtkPlotDT { GtkObject object; gboolean quadrilateral; gboolean subsampling; gint node_0; /* lowest node-index (may be negative!) */ gint node_cnt; /* number of nodes */ gint node_max; /* maximum number of nodes */ GtkPlotDTnode *nodes; /* the nodes themselves */ GtkPlotDTnode *tmp_nodes; /* index<0: tmpnodes[-1-index] */ GList *triangles; GCompareFunc compare_func; GtkPlotDTprogressbarFunc pbar; }; struct _GtkPlotDTClass { GtkObjectClass parent_class; gboolean (* add_node) (GtkPlotDT *data, GtkPlotDTnode node); GtkPlotDTnode*(* get_node) (GtkPlotDT *data, gint idx); gboolean (* triangulate) (GtkPlotDT *data); void (* clear) (GtkPlotDT *data); }; GType gtk_plot_dt_get_type (void); GtkObject* gtk_plot_dt_new (gint num); void gtk_plot_dt_set_quadrilateral (GtkPlotDT *dt, gboolean set); void gtk_plot_dt_set_subsampling (GtkPlotDT *dt, gboolean set); gboolean gtk_plot_dt_add_node (GtkPlotDT *data, GtkPlotDTnode node); GtkPlotDTnode * gtk_plot_dt_get_node (GtkPlotDT *data, gint idx); gboolean gtk_plot_dt_triangulate (GtkPlotDT *data); void gtk_plot_dt_clear (GtkPlotDT *data); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_DELAUNAY_H__ */ gtkextra-3.2.0/gtkextra/Makefile.in0000644000076400001440000014427212604172273014202 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Makefile.am for gtk+extra #AUTOMAKE_OPTIONS = 1.7 VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_TESTS_TRUE@noinst_PROGRAMS = testgtksheet$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testgtkiconlist$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testgtkfilesel$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testgtkplot$(EXEEXT) testgtkfont$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testgtkplotcanvas$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testrealtime$(EXEEXT) testiterator$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testpolar$(EXEEXT) testgtkplot3d$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testcontour$(EXEEXT) testbubbles$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testflux$(EXEEXT) testboxes$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testcandles$(EXEEXT) testimage$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testpixmap$(EXEEXT) testcharsel$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testdt$(EXEEXT) testgtkplotdt$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testsegment$(EXEEXT) \ @ENABLE_TESTS_TRUE@ testprintexport$(EXEEXT) @ENABLE_INTROSPECTION_TRUE@am__append_1 = $(gir_DATA) # $(typelib_DATA) subdir = gtkextra DIST_COMMON = $(gtkextrainclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gtkextrafeatures.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = gtkextrafeatures.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(gtkextraincludedir)" \ "$(DESTDIR)$(gtkextraincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libgtkextra_linux_fb_3_0_la_LIBADD = am__objects_1 = gtkbordercombo.lo gtkcharsel.lo gtkcheckitem.lo \ gtkcolorcombo.lo gtkcombobutton.lo gtkdataentry.lo \ gtkdataformat.lo gtkdatatextview.lo gtkdirtree.lo gtkextra.lo \ gtkfilelist.lo gtkfontcombo.lo gtkiconfilesel.lo \ gtkiconlist.lo gtkitementry.lo gtkplot.lo gtkplot3d.lo \ gtkplotarray.lo gtkplotbar.lo gtkplotbox.lo gtkplotbubble.lo \ gtkplotcairo.lo gtkplotcandle.lo gtkplotcanvas.lo \ gtkplotcanvasellipse.lo gtkplotcanvasline.lo \ gtkplotcanvaspixmap.lo gtkplotcanvasplot.lo \ gtkplotcanvasrectangle.lo gtkplotcanvastext.lo \ gtkplotcsurface.lo gtkplotdata.lo gtkplotdt.lo gtkplotflux.lo \ gtkplotgdk.lo gtkplotpc.lo gtkplotpixmap.lo gtkplotpolar.lo \ gtkplotprint.lo gtkplotps.lo gtkplotsegment.lo \ gtkplotsurface.lo gtkpsfont.lo gtksheet.lo gtksheetcolumn.lo \ gtktogglecombo.lo am_libgtkextra_linux_fb_3_0_la_OBJECTS = $(am__objects_1) am__objects_2 = am__objects_3 = gtkextra-marshal.lo gtkextratypebuiltins.lo \ $(am__objects_2) nodist_libgtkextra_linux_fb_3_0_la_OBJECTS = $(am__objects_3) libgtkextra_linux_fb_3_0_la_OBJECTS = \ $(am_libgtkextra_linux_fb_3_0_la_OBJECTS) \ $(nodist_libgtkextra_linux_fb_3_0_la_OBJECTS) libgtkextra_quartz_3_0_la_LIBADD = am_libgtkextra_quartz_3_0_la_OBJECTS = $(am__objects_1) nodist_libgtkextra_quartz_3_0_la_OBJECTS = $(am__objects_3) libgtkextra_quartz_3_0_la_OBJECTS = \ $(am_libgtkextra_quartz_3_0_la_OBJECTS) \ $(nodist_libgtkextra_quartz_3_0_la_OBJECTS) am__DEPENDENCIES_1 = am_libgtkextra_win32_3_0_la_OBJECTS = $(am__objects_1) nodist_libgtkextra_win32_3_0_la_OBJECTS = $(am__objects_3) libgtkextra_win32_3_0_la_OBJECTS = \ $(am_libgtkextra_win32_3_0_la_OBJECTS) \ $(nodist_libgtkextra_win32_3_0_la_OBJECTS) libgtkextra_x11_3_0_la_LIBADD = am_libgtkextra_x11_3_0_la_OBJECTS = $(am__objects_1) nodist_libgtkextra_x11_3_0_la_OBJECTS = $(am__objects_3) libgtkextra_x11_3_0_la_OBJECTS = $(am_libgtkextra_x11_3_0_la_OBJECTS) \ $(nodist_libgtkextra_x11_3_0_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) testboxes_SOURCES = testboxes.c testboxes_OBJECTS = testboxes.$(OBJEXT) am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) testbubbles_SOURCES = testbubbles.c testbubbles_OBJECTS = testbubbles.$(OBJEXT) testcandles_SOURCES = testcandles.c testcandles_OBJECTS = testcandles.$(OBJEXT) testcharsel_SOURCES = testcharsel.c testcharsel_OBJECTS = testcharsel.$(OBJEXT) testcontour_SOURCES = testcontour.c testcontour_OBJECTS = testcontour.$(OBJEXT) testdt_SOURCES = testdt.c testdt_OBJECTS = testdt.$(OBJEXT) testflux_SOURCES = testflux.c testflux_OBJECTS = testflux.$(OBJEXT) testgtkfilesel_SOURCES = testgtkfilesel.c testgtkfilesel_OBJECTS = testgtkfilesel.$(OBJEXT) testgtkfont_SOURCES = testgtkfont.c testgtkfont_OBJECTS = testgtkfont.$(OBJEXT) testgtkiconlist_SOURCES = testgtkiconlist.c testgtkiconlist_OBJECTS = testgtkiconlist.$(OBJEXT) testgtkplot_SOURCES = testgtkplot.c testgtkplot_OBJECTS = testgtkplot.$(OBJEXT) testgtkplot3d_SOURCES = testgtkplot3d.c testgtkplot3d_OBJECTS = testgtkplot3d.$(OBJEXT) testgtkplotcanvas_SOURCES = testgtkplotcanvas.c testgtkplotcanvas_OBJECTS = testgtkplotcanvas.$(OBJEXT) testgtkplotdt_SOURCES = testgtkplotdt.c testgtkplotdt_OBJECTS = testgtkplotdt.$(OBJEXT) testgtksheet_SOURCES = testgtksheet.c testgtksheet_OBJECTS = testgtksheet.$(OBJEXT) testimage_SOURCES = testimage.c testimage_OBJECTS = testimage.$(OBJEXT) testiterator_SOURCES = testiterator.c testiterator_OBJECTS = testiterator.$(OBJEXT) testpixmap_SOURCES = testpixmap.c testpixmap_OBJECTS = testpixmap.$(OBJEXT) testpolar_SOURCES = testpolar.c testpolar_OBJECTS = testpolar.$(OBJEXT) testprintexport_SOURCES = testprintexport.c testprintexport_OBJECTS = testprintexport.$(OBJEXT) testrealtime_SOURCES = testrealtime.c testrealtime_OBJECTS = testrealtime.$(OBJEXT) testsegment_SOURCES = testsegment.c testsegment_OBJECTS = testsegment.$(OBJEXT) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libgtkextra_linux_fb_3_0_la_SOURCES) \ $(nodist_libgtkextra_linux_fb_3_0_la_SOURCES) \ $(libgtkextra_quartz_3_0_la_SOURCES) \ $(nodist_libgtkextra_quartz_3_0_la_SOURCES) \ $(libgtkextra_win32_3_0_la_SOURCES) \ $(nodist_libgtkextra_win32_3_0_la_SOURCES) \ $(libgtkextra_x11_3_0_la_SOURCES) \ $(nodist_libgtkextra_x11_3_0_la_SOURCES) testboxes.c \ testbubbles.c testcandles.c testcharsel.c testcontour.c \ testdt.c testflux.c testgtkfilesel.c testgtkfont.c \ testgtkiconlist.c testgtkplot.c testgtkplot3d.c \ testgtkplotcanvas.c testgtkplotdt.c testgtksheet.c testimage.c \ testiterator.c testpixmap.c testpolar.c testprintexport.c \ testrealtime.c testsegment.c DIST_SOURCES = $(libgtkextra_linux_fb_3_0_la_SOURCES) \ $(libgtkextra_quartz_3_0_la_SOURCES) \ $(libgtkextra_win32_3_0_la_SOURCES) \ $(libgtkextra_x11_3_0_la_SOURCES) testboxes.c testbubbles.c \ testcandles.c testcharsel.c testcontour.c testdt.c testflux.c \ testgtkfilesel.c testgtkfont.c testgtkiconlist.c testgtkplot.c \ testgtkplot3d.c testgtkplotcanvas.c testgtkplotdt.c \ testgtksheet.c testimage.c testiterator.c testpixmap.c \ testpolar.c testprintexport.c testrealtime.c testsegment.c DATA = $(gir_DATA) $(noinst_DATA) $(typelib_DATA) HEADERS = $(gtkextrainclude_HEADERS) $(nodist_gtkextrainclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLADE_CATALOG_DIR = @GLADE_CATALOG_DIR@ GLADE_CFLAGS = @GLADE_CFLAGS@ GLADE_LIBS = @GLADE_LIBS@ GLADE_MODULE_DIR = @GLADE_MODULE_DIR@ GLADE_PIXMAP_DIR = @GLADE_PIXMAP_DIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_EXTRA_MAJOR_VERSION = @GTK_EXTRA_MAJOR_VERSION@ GTK_EXTRA_MICRO_VERSION = @GTK_EXTRA_MICRO_VERSION@ GTK_EXTRA_MINOR_VERSION = @GTK_EXTRA_MINOR_VERSION@ GTK_EXTRA_VERSION = @GTK_EXTRA_VERSION@ GTK_EXTRA_VERSION_SHORT = @GTK_EXTRA_VERSION_SHORT@ GTK_LIBS = @GTK_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGTKEXTRA_SO_VERSION = @LIBGTKEXTRA_SO_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gdktarget = @gdktarget@ gtkextratargetlib = @gtkextratargetlib@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgladegtkextra_soname = @libgladegtkextra_soname@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ ms_librarian = @ms_librarian@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ gtarget = @gdktarget@ @PLATFORM_WIN32_TRUE@no_undefined = -no-undefined @OS_WIN32_TRUE@gtkextra_def = gtkextra.def @OS_WIN32_TRUE@gtkextra_win32_symbols = -export-symbols $(gtkextra_def) #Not yet supported #gtkextra_win32res_lo = gtkextra-win32res.lo @OS_WIN32_TRUE@gtkextra_win32res_lo = @MS_LIB_AVAILABLE_TRUE@noinst_DATA = gtkextra-win32-3.0.lib # libtool stuff: set version and export symbols for resolving # since automake doesn't support conditionalized libsomething_la_LDFLAGS # we use the general approach here libgtkextraincludedir = $(includedir)/gtkextra-3.0/gtkextra AM_LDFLAGS = \ -version-info $(LIBGTKEXTRA_SO_VERSION) \ -export-dynamic \ -rpath $(libdir) \ $(no_undefined) \ $(GTK_LIBS) # # setup source file variables # gtkextra_public_h_sources = \ gtkbordercombo.h \ gtkcharsel.h \ gtkcheckitem.h \ gtkcolorcombo.h \ gtkcombobutton.h \ gtkdataentry.h \ gtkdataformat.h \ gtkdatatextview.h \ gtkdirtree.h \ gtkextra.h \ gtkextraicons.h \ gtkfileicons.h \ gtkfilelist.h \ gtkfontcombo.h \ gtkiconfilesel.h \ gtkiconlist.h \ gtkitementry.h \ gtkplot.h \ gtkplot3d.h \ gtkplotarray.h \ gtkplotbar.h \ gtkplotbox.h \ gtkplotbubble.h \ gtkplotcairo.h \ gtkplotcandle.h \ gtkplotcanvas.h \ gtkplotcanvasellipse.h \ gtkplotcanvasline.h \ gtkplotcanvaspixmap.h \ gtkplotcanvasplot.h \ gtkplotcanvasrectangle.h \ gtkplotcanvastext.h \ gtkplotcsurface.h \ gtkplotdata.h \ gtkplotdt.h \ gtkplotflux.h \ gtkplotgdk.h \ gtkplotpc.h \ gtkplotpixmap.h \ gtkplotpolar.h \ gtkplotprint.h \ gtkplotps.h \ gtkplotsegment.h \ gtkplotsurface.h \ gtkpsfont.h \ gtksheet.h \ gtksheetcolumn.h \ gtktogglecombo.h gtkextra_c_sources = \ gtkbordercombo.c \ gtkcharsel.c \ gtkcheckitem.c \ gtkcolorcombo.c \ gtkcombobutton.c \ gtkdataentry.c \ gtkdataformat.c \ gtkdatatextview.c \ gtkdirtree.c \ gtkextra.c \ gtkfilelist.c \ gtkfontcombo.c \ gtkiconfilesel.c \ gtkiconlist.c \ gtkitementry.c \ gtkplot.c \ gtkplot3d.c \ gtkplotarray.c \ gtkplotbar.c \ gtkplotbox.c \ gtkplotbubble.c \ gtkplotcairo.c \ gtkplotcandle.c \ gtkplotcanvas.c \ gtkplotcanvasellipse.c \ gtkplotcanvasline.c \ gtkplotcanvaspixmap.c \ gtkplotcanvasplot.c \ gtkplotcanvasrectangle.c \ gtkplotcanvastext.c \ gtkplotcsurface.c \ gtkplotdata.c \ gtkplotdt.c \ gtkplotflux.c \ gtkplotgdk.c \ gtkplotpc.c \ gtkplotpixmap.c \ gtkplotpolar.c \ gtkplotprint.c \ gtkplotps.c \ gtkplotsegment.c \ gtkplotsurface.c \ gtkpsfont.c \ gtksheet.c \ gtksheetcolumn.c \ gtktogglecombo.c gtkextra_private_h_sources = \ gtkextra-compat.h \ icons.h \ pixmaps.h gtkextra_built_public_sources = \ gtkextra-marshal.h \ gtkextratypebuiltins.h gtkextra_built_sources = \ gtkextra-marshal.c \ gtkextratypebuiltins.c \ ${gtkextra_built_public_sources} gtkextra_extra_sources = \ gtkextrafeatures.h.in \ gtkextra-marshal.list AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(GTK_CFLAGS) # target platform: lib_LTLIBRARIES = $(gtkextratargetlib) gtkextraincludedir = $(includedir)/gtkextra-3.0/gtkextra gtkextrainclude_HEADERS = $(gtkextra_public_h_sources) nodist_gtkextrainclude_HEADERS = $(gtkextra_built_public_sources) gtkextrafeatures.h libgtkextra_x11_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_x11_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_linux_fb_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_linux_fb_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_win32_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_win32_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_quartz_3_0_la_SOURCES = $(gtkextra_c_sources) nodist_libgtkextra_quartz_3_0_la_SOURCES = $(gtkextra_built_sources) libgtkextra_win32_3_0_la_LIBADD = $(gtkextra_win32res_lo) libgtkextra_win32_3_0_la_DEPENDENCIES = $(gtkextra_def) $(gtkextra_win32res_lo) @USE_WIN32_TRUE@libgtkextra_target_ldflags = $(gtkextra_win32_symbols) -lwsock32 EXTRA_LTLIBRARIES = libgtkextra-x11-3.0.la libgtkextra-linux-fb-3.0.la libgtkextra-win32-3.0.la libgtkextra-quartz-3.0.la MAINTAINERCLEANFILES = $(gtkextra_built_sources) CLEANFILES = $(gtkextra_built_sources) $(am__append_1) #EXTRA_DIST += $(gtkextra_built_sources) EXTRA_DIST = $(gtkextra_private_h_sources) $(gtkextra_extra_sources) \ gtkextra.def sat.xpm sg_small.xpm cloud.xpm suncloud.xpm \ testgtkplotdt.in DEPS = $(gtkextratargetlib) LDADDS = $(gtkextratargetlib) $(GTK_LIBS) testprintexport_DEPENDENCIES = $(DEPS) testgtksheet_DEPENDENCIES = $(DEPS) testgtkplot_DEPENDENCIES = $(DEPS) testdt_DEPENDENCIES = $(DEPS) testgtkplotdt_DEPENDENCIES = $(DEPS) testpolar_DEPENDENCIES = $(DEPS) testgtkplot3d_DEPENDENCIES = $(DEPS) testcontour_DEPENDENCIES = $(DEPS) testrealtime_DEPENDENCIES = $(DEPS) testgtkfilesel_DEPENDENCIES = $(DEPS) testgtkiconlist_DEPENDENCIES = $(DEPS) testgtkfont_DEPENDENCIES = $(DEPS) testbubbles_DEPENDENCIES = $(DEPS) testflux_DEPENDENCIES = $(DEPS) testboxes_DEPENDENCIES = $(DEPS) testcandles_DEPENDENCIES = $(DEPS) testpixmap_DEPENDENCIES = $(DEPS) testimage_DEPENDENCIES = $(DEPS) testcharsel_DEPENDENCIES = $(DEPS) testiterator_DEPENDENCIES = $(DEPS) testsegment_DEPENDENCIES = $(DEPS) testgtkplotcanvas_DEPENDENCIES = $(DEPS) testgtksheet_LDADD = $(LDADDS) testgtkplot_LDADD = $(LDADDS) testdt_LDADD = $(LDADDS) testgtkplotdt_LDADD = $(LDADDS) testimage_LDADD = $(LDADDS) testcharsel_LDADD = $(LDADDS) testpixmap_LDADD = $(LDADDS) testpolar_LDADD = $(LDADDS) testgtkplot3d_LDADD = $(LDADDS) testcontour_LDADD = $(LDADDS) testrealtime_LDADD = $(LDADDS) testgtkfilesel_LDADD = $(LDADDS) testgtkiconlist_LDADD = $(LDADDS) testgtkfont_LDADD = $(LDADDS) testbubbles_LDADD = $(LDADDS) testflux_LDADD = $(LDADDS) testboxes_LDADD = $(LDADDS) testcandles_LDADD = $(LDADDS) testiterator_LDADD = $(LDADDS) testsegment_LDADD = $(LDADDS) testgtkplotcanvas_LDADD = $(LDADDS) testprintexport_LDADD = $(LDADDS) @ENABLE_INTROSPECTION_TRUE@INTROSPECTION_GIRS = GtkExtra-3.0.gir @ENABLE_INTROSPECTION_TRUE@INTROSPECTION_SCANNER_ARGS = --accept-unprefixed --identifier-prefix="Gtk" --symbol-prefix="gtk" --warn-all --add-include-path=$(srcdir) @ENABLE_INTROSPECTION_TRUE@INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) @ENABLE_INTROSPECTION_TRUE@introspection_sources = $(gtkextra_c_sources) $(gtkextra_public_h_sources) @ENABLE_INTROSPECTION_TRUE@GtkExtra_3_0_gir_NAMESPACE = GtkExtra @ENABLE_INTROSPECTION_TRUE@GtkExtra_3_0_gir_VERSION = $(GTK_EXTRA_VERSION) @ENABLE_INTROSPECTION_TRUE@GtkExtra_3_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gtk-2.0 @ENABLE_INTROSPECTION_TRUE@GtkExtra_3_0_gir_CFLAGS = $(AM_CPPFLAGS) @ENABLE_INTROSPECTION_TRUE@GtkExtra_3_0_gir_LIBS = $(gtkextratargetlib) @ENABLE_INTROSPECTION_TRUE@GtkExtra_3_0_gir_FILES = $(introspection_sources) @ENABLE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0 @ENABLE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS) @ENABLE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0 @ENABLE_INTROSPECTION_TRUE@typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gtkextra/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign gtkextra/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gtkextrafeatures.h: $(top_builddir)/config.status $(srcdir)/gtkextrafeatures.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgtkextra-linux-fb-3.0.la: $(libgtkextra_linux_fb_3_0_la_OBJECTS) $(libgtkextra_linux_fb_3_0_la_DEPENDENCIES) $(LINK) $(libgtkextra_linux_fb_3_0_la_OBJECTS) $(libgtkextra_linux_fb_3_0_la_LIBADD) $(LIBS) libgtkextra-quartz-3.0.la: $(libgtkextra_quartz_3_0_la_OBJECTS) $(libgtkextra_quartz_3_0_la_DEPENDENCIES) $(LINK) $(libgtkextra_quartz_3_0_la_OBJECTS) $(libgtkextra_quartz_3_0_la_LIBADD) $(LIBS) libgtkextra-win32-3.0.la: $(libgtkextra_win32_3_0_la_OBJECTS) $(libgtkextra_win32_3_0_la_DEPENDENCIES) $(LINK) $(libgtkextra_win32_3_0_la_OBJECTS) $(libgtkextra_win32_3_0_la_LIBADD) $(LIBS) libgtkextra-x11-3.0.la: $(libgtkextra_x11_3_0_la_OBJECTS) $(libgtkextra_x11_3_0_la_DEPENDENCIES) $(LINK) $(libgtkextra_x11_3_0_la_OBJECTS) $(libgtkextra_x11_3_0_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list testboxes$(EXEEXT): $(testboxes_OBJECTS) $(testboxes_DEPENDENCIES) @rm -f testboxes$(EXEEXT) $(LINK) $(testboxes_OBJECTS) $(testboxes_LDADD) $(LIBS) testbubbles$(EXEEXT): $(testbubbles_OBJECTS) $(testbubbles_DEPENDENCIES) @rm -f testbubbles$(EXEEXT) $(LINK) $(testbubbles_OBJECTS) $(testbubbles_LDADD) $(LIBS) testcandles$(EXEEXT): $(testcandles_OBJECTS) $(testcandles_DEPENDENCIES) @rm -f testcandles$(EXEEXT) $(LINK) $(testcandles_OBJECTS) $(testcandles_LDADD) $(LIBS) testcharsel$(EXEEXT): $(testcharsel_OBJECTS) $(testcharsel_DEPENDENCIES) @rm -f testcharsel$(EXEEXT) $(LINK) $(testcharsel_OBJECTS) $(testcharsel_LDADD) $(LIBS) testcontour$(EXEEXT): $(testcontour_OBJECTS) $(testcontour_DEPENDENCIES) @rm -f testcontour$(EXEEXT) $(LINK) $(testcontour_OBJECTS) $(testcontour_LDADD) $(LIBS) testdt$(EXEEXT): $(testdt_OBJECTS) $(testdt_DEPENDENCIES) @rm -f testdt$(EXEEXT) $(LINK) $(testdt_OBJECTS) $(testdt_LDADD) $(LIBS) testflux$(EXEEXT): $(testflux_OBJECTS) $(testflux_DEPENDENCIES) @rm -f testflux$(EXEEXT) $(LINK) $(testflux_OBJECTS) $(testflux_LDADD) $(LIBS) testgtkfilesel$(EXEEXT): $(testgtkfilesel_OBJECTS) $(testgtkfilesel_DEPENDENCIES) @rm -f testgtkfilesel$(EXEEXT) $(LINK) $(testgtkfilesel_OBJECTS) $(testgtkfilesel_LDADD) $(LIBS) testgtkfont$(EXEEXT): $(testgtkfont_OBJECTS) $(testgtkfont_DEPENDENCIES) @rm -f testgtkfont$(EXEEXT) $(LINK) $(testgtkfont_OBJECTS) $(testgtkfont_LDADD) $(LIBS) testgtkiconlist$(EXEEXT): $(testgtkiconlist_OBJECTS) $(testgtkiconlist_DEPENDENCIES) @rm -f testgtkiconlist$(EXEEXT) $(LINK) $(testgtkiconlist_OBJECTS) $(testgtkiconlist_LDADD) $(LIBS) testgtkplot$(EXEEXT): $(testgtkplot_OBJECTS) $(testgtkplot_DEPENDENCIES) @rm -f testgtkplot$(EXEEXT) $(LINK) $(testgtkplot_OBJECTS) $(testgtkplot_LDADD) $(LIBS) testgtkplot3d$(EXEEXT): $(testgtkplot3d_OBJECTS) $(testgtkplot3d_DEPENDENCIES) @rm -f testgtkplot3d$(EXEEXT) $(LINK) $(testgtkplot3d_OBJECTS) $(testgtkplot3d_LDADD) $(LIBS) testgtkplotcanvas$(EXEEXT): $(testgtkplotcanvas_OBJECTS) $(testgtkplotcanvas_DEPENDENCIES) @rm -f testgtkplotcanvas$(EXEEXT) $(LINK) $(testgtkplotcanvas_OBJECTS) $(testgtkplotcanvas_LDADD) $(LIBS) testgtkplotdt$(EXEEXT): $(testgtkplotdt_OBJECTS) $(testgtkplotdt_DEPENDENCIES) @rm -f testgtkplotdt$(EXEEXT) $(LINK) $(testgtkplotdt_OBJECTS) $(testgtkplotdt_LDADD) $(LIBS) testgtksheet$(EXEEXT): $(testgtksheet_OBJECTS) $(testgtksheet_DEPENDENCIES) @rm -f testgtksheet$(EXEEXT) $(LINK) $(testgtksheet_OBJECTS) $(testgtksheet_LDADD) $(LIBS) testimage$(EXEEXT): $(testimage_OBJECTS) $(testimage_DEPENDENCIES) @rm -f testimage$(EXEEXT) $(LINK) $(testimage_OBJECTS) $(testimage_LDADD) $(LIBS) testiterator$(EXEEXT): $(testiterator_OBJECTS) $(testiterator_DEPENDENCIES) @rm -f testiterator$(EXEEXT) $(LINK) $(testiterator_OBJECTS) $(testiterator_LDADD) $(LIBS) testpixmap$(EXEEXT): $(testpixmap_OBJECTS) $(testpixmap_DEPENDENCIES) @rm -f testpixmap$(EXEEXT) $(LINK) $(testpixmap_OBJECTS) $(testpixmap_LDADD) $(LIBS) testpolar$(EXEEXT): $(testpolar_OBJECTS) $(testpolar_DEPENDENCIES) @rm -f testpolar$(EXEEXT) $(LINK) $(testpolar_OBJECTS) $(testpolar_LDADD) $(LIBS) testprintexport$(EXEEXT): $(testprintexport_OBJECTS) $(testprintexport_DEPENDENCIES) @rm -f testprintexport$(EXEEXT) $(LINK) $(testprintexport_OBJECTS) $(testprintexport_LDADD) $(LIBS) testrealtime$(EXEEXT): $(testrealtime_OBJECTS) $(testrealtime_DEPENDENCIES) @rm -f testrealtime$(EXEEXT) $(LINK) $(testrealtime_OBJECTS) $(testrealtime_LDADD) $(LIBS) testsegment$(EXEEXT): $(testsegment_OBJECTS) $(testsegment_DEPENDENCIES) @rm -f testsegment$(EXEEXT) $(LINK) $(testsegment_OBJECTS) $(testsegment_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkbordercombo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcharsel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcheckitem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcolorcombo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkcombobutton.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkdataentry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkdataformat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkdatatextview.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkdirtree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkextra-marshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkextra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkextratypebuiltins.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkfilelist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkfontcombo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkiconfilesel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkiconlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkitementry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplot3d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotarray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotbar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotbubble.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcairo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcanvas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcanvasellipse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcanvasline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcanvaspixmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcanvasplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcanvasrectangle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcanvastext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotcsurface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotdata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotdt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotflux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotgdk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotpc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotpixmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotpolar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotps.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotsegment.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkplotsurface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkpsfont.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtksheet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtksheetcolumn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtktogglecombo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testboxes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testbubbles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcandles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcharsel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcontour.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testflux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtkfilesel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtkfont.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtkiconlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtkplot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtkplot3d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtkplotcanvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtkplotdt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testgtksheet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testimage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testiterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpixmap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpolar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testprintexport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrealtime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsegment.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-girDATA: $(gir_DATA) @$(NORMAL_INSTALL) test -z "$(girdir)" || $(MKDIR_P) "$(DESTDIR)$(girdir)" @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(girdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \ done uninstall-girDATA: @$(NORMAL_UNINSTALL) @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(girdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(girdir)" && rm -f $$files install-typelibDATA: $(typelib_DATA) @$(NORMAL_INSTALL) test -z "$(typelibdir)" || $(MKDIR_P) "$(DESTDIR)$(typelibdir)" @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typelibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibdir)" || exit $$?; \ done uninstall-typelibDATA: @$(NORMAL_UNINSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(typelibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(typelibdir)" && rm -f $$files install-gtkextraincludeHEADERS: $(gtkextrainclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(gtkextraincludedir)" || $(MKDIR_P) "$(DESTDIR)$(gtkextraincludedir)" @list='$(gtkextrainclude_HEADERS)'; test -n "$(gtkextraincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gtkextraincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(gtkextraincludedir)" || exit $$?; \ done uninstall-gtkextraincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(gtkextrainclude_HEADERS)'; test -n "$(gtkextraincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gtkextraincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gtkextraincludedir)" && rm -f $$files install-nodist_gtkextraincludeHEADERS: $(nodist_gtkextrainclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(gtkextraincludedir)" || $(MKDIR_P) "$(DESTDIR)$(gtkextraincludedir)" @list='$(nodist_gtkextrainclude_HEADERS)'; test -n "$(gtkextraincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(gtkextraincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(gtkextraincludedir)" || exit $$?; \ done uninstall-nodist_gtkextraincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_gtkextrainclude_HEADERS)'; test -n "$(gtkextraincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(gtkextraincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(gtkextraincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(gtkextraincludedir)" "$(DESTDIR)$(gtkextraincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) @OS_WIN32_FALSE@install-exec-local: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-girDATA install-gtkextraincludeHEADERS \ install-nodist_gtkextraincludeHEADERS install-typelibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-exec-local install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-girDATA uninstall-gtkextraincludeHEADERS \ uninstall-libLTLIBRARIES \ uninstall-nodist_gtkextraincludeHEADERS uninstall-typelibDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-exec-local \ install-girDATA install-gtkextraincludeHEADERS install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man \ install-nodist_gtkextraincludeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-typelibDATA installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-girDATA uninstall-gtkextraincludeHEADERS \ uninstall-libLTLIBRARIES \ uninstall-nodist_gtkextraincludeHEADERS uninstall-typelibDATA @OS_WIN32_TRUE@gtkextra-win32res.lo : gtkextra-win32.rc @OS_WIN32_TRUE@ $(LT_COMPILE_RESOURCE) gtkextra-win32.rc gtkextra-win32res.lo @OS_WIN32_TRUE@install-libtool-import-lib: @OS_WIN32_TRUE@ $(INSTALL) .libs/libgtkextra-win32-3.0.dll.a $(DESTDIR)$(libdir) @OS_WIN32_TRUE@uninstall-libtool-import-lib: @OS_WIN32_TRUE@ -rm $(DESTDIR)$(libdir)/libgtkextra-win32-3.0.dll.a @OS_WIN32_TRUE@install-exec-local: install-libtool-import-lib @OS_WIN32_FALSE@install-libtool-import-lib: @OS_WIN32_FALSE@uninstall-libtool-import-lib: @MS_LIB_AVAILABLE_TRUE@gtkextra-win32-3.0.lib: libgtkextra-win32-3.0.la gtkextra.def @MS_LIB_AVAILABLE_TRUE@ lib -name:libgtkextra-win32-3.0-@LT_CURRENT_MINUS_AGE@.dll -def:gtkextra.def -out:$@ @MS_LIB_AVAILABLE_TRUE@install-ms-lib: @MS_LIB_AVAILABLE_TRUE@ $(INSTALL) gtkextra-win32-3.0.lib $(DESTDIR)$(libdir) @MS_LIB_AVAILABLE_TRUE@uninstall-ms-lib: @MS_LIB_AVAILABLE_TRUE@ -rm $(DESTDIR)$(libdir)/gtkextra-win32-3.0.lib @MS_LIB_AVAILABLE_FALSE@install-ms-lib: @MS_LIB_AVAILABLE_FALSE@uninstall-ms-lib: $(libgtkextra_x11_3_0_la_OBJECTS) $(libgtkextra_linux_fb_3_0_la_OBJECTS) $(libgtkextra_win32_3_0_la_OBJECTS) $(libgtkextra_quartz_3_0_la_OBJECTS): ${gtkextra_built_public_sources} ${gtkextra_built_private_headers} gtkextra-marshal.h: $(builddir)/gtkextra-marshal.list ( @GLIB_GENMARSHAL@ --prefix=gtkextra $(srcdir)/gtkextra-marshal.list --header > gtkextra-marshal.tmp \ && mv gtkextra-marshal.tmp gtkextra-marshal.h ) \ || ( rm -f gtkextra-marshal.tmp && exit 1 ) gtkextra-marshal.c: $(builddir)/gtkextra-marshal.h ( @GLIB_GENMARSHAL@ --prefix=gtkextra $(srcdir)/gtkextra-marshal.list --body > gtkextra-marshal.tmp \ && mv gtkextra-marshal.tmp gtkextra-marshal.c ) \ || ( rm -f gtkextra-marshal.tmp && exit 1 ) gtkextratypebuiltins.h: $(gtkextra_public_h_sources) ( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef __GTKEXTRA_TYPE_BUILTINS_H__\n#define __GTKEXTRA_TYPE_BUILTINS_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __GTKEXTRA_TYPE_BUILTINS_H__ */" \ $(gtkextra_public_h_sources) ) > $(builddir)/gtkextratypebuiltins.h gtkextratypebuiltins.c: $(gtkextra_public_h_sources) ( cd $(srcdir) && glib-mkenums \ --fhead "#define GTKEXTRA_ENABLE_BROKEN\n#include \"gtkextra.h\"" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ $(gtkextra_public_h_sources) ) > $(builddir)/gtkextratypebuiltins.c # gobject-introspection (begin) @ENABLE_INTROSPECTION_TRUE@-include $(INTROSPECTION_MAKEFILE) @ENABLE_INTROSPECTION_TRUE@GtkExtra-3.0.gir: $(gtkextratargetlib) # gobject-introspection (end) files: @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ echo $$p; \ done #test: testgtksheet testgtkiconlist testgtkfilesel testgtkplot testgtkfont testrealtime testpolar testgtkplot3d testcontour testbubbles testflux testboxes testcandles testimage testpixmap testcharsel testdt testgtkplotdt testiterator # builddir=`pwd`; cd $(top_builddir); top_builddir=`pwd`; export HAVE_PROGRESSBAR=1; \ # cd $$builddir; cd $(srcdir); \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtksheet; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkplot; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkpolar; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkplot3d; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkbubble; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkflux; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testcontour; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkiconlist; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkfilesel; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testgtkfont; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testrealtime; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testiterator; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testimage; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testcandles; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testpixmap; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testcharsel; \ # $(SHELL) $$top_builddir/libtool --mode=execute gdb $$builddir/testdt \ # $$builddir/testgtkplotdt.in > $$builddir/testgtkplotdt.out; echo clean-local: rm -rf gtkextrafeatures.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gtkextra-3.2.0/gtkextra/gtkplotcsurface.c0000644000076400001440000016110312603754176015500 00000000000000/* gtkplotcsurface - csurface plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotsurface.h" #include "gtkplotcsurface.h" #include "gtkpsfont.h" /** * SECTION: gtkplotcsurface * @short_description: * * FIXME:: need long description */ #define P_(string) string typedef struct { GList *polygons; /* list with polygons enclosed by a contour */ gdouble level; /* value of the contour level */ gboolean sublevel; /* is this a level of sublevel? */ } GtkPlotContourLevel; typedef struct { GtkPlotPoint *contour; /* array with the contour points */ gint n1; /* number of points of the outer border */ gdouble level; /* value of the contour level */ gboolean sublevel; /* is this a level of sublevel? */ } GtkPlotContourLine; typedef struct { GtkAllocation *bb; /* bounding box of the label intersected by the line */ GtkPlotPoint x1, x2; /* intersection points */ gdouble t1, t2; /* parameters in the line eq r=r0+t*(r-r0) */ gint type; /* one or two intersection points */ } GtkPlotContourX; static void gtk_plot_csurface_class_init (GtkPlotCSurfaceClass *klass); static void gtk_plot_csurface_init (GtkPlotCSurface *data); static void gtk_plot_csurface_destroy (GtkObject *object); static void gtk_plot_csurface_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_csurface_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_csurface_clone (GtkPlotData *data, GtkPlotData *copy); static void update_data (GtkPlotData *data); static void gtk_plot_csurface_build_polygons (GtkPlotSurface *surface); static void gtk_plot_csurface_build_contours (GtkPlotSurface *surface); static void gtk_plot_csurface_get_legend_size (GtkPlotData *data, gint *width, gint *height); static void gtk_plot_csurface_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_csurface_draw_private (GtkPlotData *data); static void gtk_plot_csurface_draw_lines (GtkPlotData *data); static void gtk_plot_csurface_draw_polygons (GtkPlotSurface *surface); static void gtk_plot_csurface_real_draw_polygons (GtkPlotSurface *surface, GtkPlotProjection p); static void gtk_plot_csurface_lighting (GdkColor *a, GdkColor *b, gdouble normal, gdouble ambient); static void clear_polygons (GtkPlotCSurface *surface); extern gint roundint (gdouble x); static void hsv_to_rgb (gdouble h, gdouble s, gdouble v, gdouble *r, gdouble *g, gdouble *b); static void rgb_to_hsv (gdouble r, gdouble g, gdouble b, gdouble *h, gdouble *s, gdouble *v); enum { ARG_0, ARG_LINES_VISIBLE, ARG_PROJECTION, ARG_LEVELS_STYLE, ARG_LEVELS_WIDTH, ARG_LEVELS_COLOR, ARG_SUBLEVELS_STYLE, ARG_SUBLEVELS_WIDTH, ARG_SUBLEVELS_COLOR, }; static GtkPlotSurfaceClass *parent_class = NULL; GType gtk_plot_csurface_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_surface_get_type(), "GtkPlotCSurface", sizeof (GtkPlotCSurfaceClass), (GClassInitFunc) gtk_plot_csurface_class_init, sizeof (GtkPlotCSurface), (GInstanceInitFunc) gtk_plot_csurface_init, 0); } return data_type; } static void gtk_plot_csurface_class_init (GtkPlotCSurfaceClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GtkPlotSurfaceClass *surface_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_surface_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; surface_class = (GtkPlotSurfaceClass *) klass; object_class->destroy = gtk_plot_csurface_destroy; gobject_class->set_property = gtk_plot_csurface_set_property; gobject_class->get_property = gtk_plot_csurface_get_property; /** * GtkPlotCSurface:lines_visible: * * **/ g_object_class_install_property (gobject_class, ARG_LINES_VISIBLE, g_param_spec_int ("lines_visible", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCSurface:projection: * * **/ g_object_class_install_property (gobject_class, ARG_PROJECTION, g_param_spec_int ("projection", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCSurface:levels_style: * * **/ g_object_class_install_property (gobject_class, ARG_LEVELS_STYLE, g_param_spec_int ("levels_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCSurface:levels_width: * * **/ g_object_class_install_property (gobject_class, ARG_LEVELS_WIDTH, g_param_spec_double ("levels_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCSurface:levels_color: * * **/ g_object_class_install_property (gobject_class, ARG_LEVELS_COLOR, g_param_spec_pointer ("levels_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCSurface:sublevels_style: * * **/ g_object_class_install_property (gobject_class, ARG_SUBLEVELS_STYLE, g_param_spec_int ("sublevels_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCSurface:sublevels_width: * * **/ g_object_class_install_property (gobject_class, ARG_SUBLEVELS_WIDTH, g_param_spec_double ("sublevels_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCSurface:sublevels_color: * * **/ g_object_class_install_property (gobject_class, ARG_SUBLEVELS_COLOR, g_param_spec_pointer ("sublevels_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); data_class->clone = gtk_plot_csurface_clone; data_class->gradient_changed = update_data; data_class->draw_legend = gtk_plot_csurface_draw_legend; data_class->get_legend_size = gtk_plot_csurface_get_legend_size; /* data_class->draw_gradient = NULL; */ data_class->draw_data = gtk_plot_csurface_draw_private; surface_class->draw_polygons = gtk_plot_csurface_draw_polygons; surface_class->build_polygons = gtk_plot_csurface_build_polygons; } static void gtk_plot_csurface_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCSurface *data; data = GTK_PLOT_CSURFACE (object); switch (prop_id) { case ARG_LINES_VISIBLE: data->lines_visible = g_value_get_boolean(value); break; case ARG_PROJECTION: data->projection = g_value_get_int(value); break; case ARG_LEVELS_STYLE: data->levels_line.line_style = g_value_get_int(value); break; case ARG_LEVELS_WIDTH: data->levels_line.line_width = g_value_get_double(value); break; case ARG_LEVELS_COLOR: data->levels_line.color = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_SUBLEVELS_STYLE: data->sublevels_line.line_style = g_value_get_int(value); break; case ARG_SUBLEVELS_WIDTH: data->sublevels_line.line_width = g_value_get_double(value); break; case ARG_SUBLEVELS_COLOR: data->sublevels_line.color = *((GdkColor *)g_value_get_pointer(value)); break; } } static void gtk_plot_csurface_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCSurface *data; data = GTK_PLOT_CSURFACE (object); switch (prop_id) { case ARG_LINES_VISIBLE: g_value_set_boolean(value, data->lines_visible); break; case ARG_PROJECTION: g_value_set_int(value, data->projection); break; case ARG_LEVELS_STYLE: g_value_set_int(value, data->levels_line.line_style); break; case ARG_LEVELS_WIDTH: g_value_set_double(value, data->levels_line.line_width); break; case ARG_LEVELS_COLOR: g_value_set_pointer(value, &data->levels_line.color); break; case ARG_SUBLEVELS_STYLE: g_value_set_int(value, data->sublevels_line.line_style); break; case ARG_SUBLEVELS_WIDTH: g_value_set_double(value, data->sublevels_line.line_width); break; case ARG_SUBLEVELS_COLOR: g_value_set_pointer(value, &data->sublevels_line.color); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void update_data (GtkPlotData *data) { GTK_PLOT_SURFACE_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->build_polygons(GTK_PLOT_SURFACE(data)); data->redraw_pending = TRUE; } static void gtk_plot_csurface_init (GtkPlotCSurface *dataset) { GtkWidget *widget; GdkColormap *colormap; GtkPlotArray *dim; gtk_widget_set_has_window(GTK_WIDGET(dataset), FALSE); widget = GTK_WIDGET(dataset); colormap = gtk_widget_get_colormap(widget); GTK_PLOT_DATA(dataset)->show_gradient = TRUE; GTK_PLOT_DATA(dataset)->show_labels = TRUE; GTK_PLOT_DATA(dataset)->gradient_custom = TRUE; GTK_PLOT_SURFACE(dataset)->show_mesh = TRUE; dataset->lines_visible = TRUE; dataset->projection = GTK_PLOT_PROJECT_EMPTY; dataset->levels = NULL; dataset->bg_triangles = NULL; GTK_PLOT_DATA(dataset)->labels_attr.height = 10; dataset->levels_line = GTK_PLOT_SURFACE(dataset)->mesh_line; dataset->sublevels_line = GTK_PLOT_SURFACE(dataset)->mesh_line; dataset->sublevels_line.line_style = GTK_PLOT_LINE_DASHED; dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "y"); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "z"); gtk_plot_array_set_required(dim, TRUE); } static void gtk_plot_csurface_destroy (GtkObject *object) { GtkPlotCSurface *surface; surface = GTK_PLOT_CSURFACE(object); clear_polygons(surface); GTK_OBJECT_CLASS(parent_class)->destroy(object); } GtkWidget* gtk_plot_csurface_new (void) { GtkPlotData *data; data = g_object_new (gtk_plot_csurface_get_type (), NULL); return GTK_WIDGET (data); } /** * gtk_plot_csurface_new_function: * @function: (scope async): a #GtkPlotFunc3D * * */ GtkWidget* gtk_plot_csurface_new_function (GtkPlotFunc3D function) { GtkWidget *data; data = gtk_widget_new (gtk_plot_csurface_get_type (), NULL); gtk_plot_csurface_construct_function(GTK_PLOT_CSURFACE(data), function); return data; } /** * gtk_plot_csurface_construct_function: * @function: (scope async): a #GtkPlotFunc3D */ void gtk_plot_csurface_construct_function (GtkPlotCSurface *data, GtkPlotFunc3D function) { GTK_PLOT_DATA(data)->is_function = TRUE; GTK_PLOT_DATA(data)->function3d = function; } static void gtk_plot_csurface_clone(GtkPlotData *real_data, GtkPlotData *copy_data) { GTK_PLOT_DATA_CLASS(parent_class)->clone(real_data, copy_data); GTK_PLOT_CSURFACE(copy_data)->lines_visible = GTK_PLOT_CSURFACE(real_data)->lines_visible; GTK_PLOT_CSURFACE(copy_data)->projection = GTK_PLOT_CSURFACE(real_data)->projection; GTK_PLOT_CSURFACE(copy_data)->levels_line = GTK_PLOT_CSURFACE(real_data)->levels_line; GTK_PLOT_CSURFACE(copy_data)->sublevels_line = GTK_PLOT_CSURFACE(real_data)->sublevels_line; } static void gtk_plot_csurface_draw_private (GtkPlotData *data) { GtkPlot *plot; GtkPlotSurface *surface; GtkPlotCSurface *csurface; if(!gtk_widget_get_visible(GTK_WIDGET(data))) return; surface = GTK_PLOT_SURFACE(data); csurface = GTK_PLOT_CSURFACE(data); plot = data->plot; GTK_PLOT_DATA(data)->gradient_custom = TRUE; GTK_PLOT_DATA_CLASS(parent_class)->draw_data(data); if(!GTK_IS_PLOT3D(data->plot)){ gtk_plot_set_line_attributes(plot, csurface->levels_line); gtk_plot_csurface_draw_lines(data); } } static void sort_lines(GtkPlotPoint *contour, gint nin, gint *nout) { gint n, last = 0; for(n = 0; n < nin; n++){ gdouble x1, y1, x2, y2; gint i = n*2; x1 = contour[i].x; y1 = contour[i].y; x2 = contour[i+1].x; y2 = contour[i+1].y; if(n == 0) { last += 2; } else if(n == 1) { if(x1==contour[1].x && y1==contour[1].y) { contour[last].x = x2; contour[last].y = y2; last++; } else if(x2==contour[1].x && y2==contour[1].y) { contour[last].x = x1; contour[last].y = y1; last++; } else if(x1==contour[0].x && y1==contour[0].y) { contour[last].x = x2; contour[last].y = y2; last++; x2 = contour[0].x; y2 = contour[0].y; contour[0].x = contour[1].x; contour[0].y = contour[1].y; contour[1].x = x2; contour[1].y = y2; } else if(x2==contour[0].x && y2==contour[0].y) { contour[last].x = x1; contour[last].y = y1; last++; x2 = contour[0].x; y2 = contour[0].y; contour[0].x = contour[1].x; contour[0].y = contour[1].y; contour[1].x = x2; contour[1].y = y2; } } else { if(x1==contour[last-1].x && y1==contour[last-1].y) { contour[last].x = x2; contour[last].y = y2; last++; } else if(x2==contour[last-1].x && y2==contour[last-1].y) { contour[last].x = x1; contour[last].y = y1; last++; } } } *nout = last; } static gboolean bb_intersect(GtkAllocation *a, GtkAllocation *b) { gint xmin, xmax, ymin, ymax; xmax = MIN(a->x+a->width,b->x+b->width); xmin = MAX(a->x,b->x); if(xmin > xmax) return FALSE; ymax = MIN(a->y+a->height,b->y+b->height); ymin = MAX(a->y,b->y); if(ymin > ymax) return FALSE; return TRUE; } static gint line_intersect(GtkAllocation *b, GtkPlotPoint *p1, GtkPlotPoint *p2, GtkPlotPoint *x1, GtkPlotPoint *x2, gdouble *t1, gdouble *t2) { gdouble nx = p2->x - p1->x; gdouble ny = p2->y - p1->y; gdouble t[2], xt; gint n = 0; gdouble xmin, xmax, ymin, ymax; gdouble x = 0, y = 0; xmin = MIN(p1->x,p2->x); xmax = MAX(p1->x,p2->x); ymin = MIN(p1->y,p2->y); ymax = MAX(p1->y,p2->y); if(xmin >= b->x && xmax <= b->x+b->width && ymin >= b->y && ymax <= b->y+b->height) return 3; if(nx != 0.){ xt = (b->x - p1->x) / nx; y = p1->y + xt * ny; if(xt <= 1. && xt >= 0. && y >= b->y && y <= b->y+b->height) t[n++] = xt; xt = (b->x + b->width - p1->x) / nx; y = p1->y + xt * ny; if(xt <= 1. && xt >= 0. && y >= b->y && y <= b->y+b->height) t[n++] = xt; } if(ny != 0.){ xt = (b->y - p1->y) / ny; x = p1->x + xt * nx; if(xt <= 1. && xt >= 0. && x >= b->x && x <= b->x+b->width) t[n++] = xt; xt = (b->y + b->height - p1->y) / ny; x = p1->x + xt * nx; if(xt <= 1. && xt >= 0. && x >= b->x && x <= b->x+b->width) t[n++] = xt; } if(n == 1){ x1->x = p1->x + t[0]*nx; x1->y = p1->y + t[0]*ny; *t1 = t[0]; return 1; } if(n == 2){ if(t[0] < t[1]){ x1->x = p1->x + t[0]*nx; x1->y = p1->y + t[0]*ny; x2->x = p1->x + t[1]*nx; x2->y = p1->y + t[1]*ny; *t1 = t[0]; *t2 = t[1]; return 2; } else { x1->x = p1->x + t[1]*nx; x1->y = p1->y + t[1]*ny; x2->x = p1->x + t[0]*nx; x2->y = p1->y + t[0]*ny; *t1 = t[1]; *t2 = t[0]; return 2; } } return 0; } static void sort_points(GtkPlotContourX *x, gint nxp) { gboolean end = FALSE; while(!end){ gint i; end = TRUE; for(i = 0; i < nxp-1; i++){ GtkPlotContourX aux; GtkPlotContourX *aux_i = &x[i]; GtkPlotContourX *aux_j = &x[i + 1]; if(aux_i->type == 1){ if(aux_j->type == 1){ if(aux_i->t1 > aux_j->t1) { aux = *aux_j; *aux_j = *aux_i; *aux_i = aux; end = FALSE; } } else { if(aux_i->t1 > aux_j->t1 && aux_i->t1 > aux_j->t2) { aux = *aux_j; *aux_j = *aux_i; *aux_i = aux; end = FALSE; } } } else { if(aux_j->type == 1){ if(aux_i->t1 >= aux_j->t1 && aux_i->t2 >= aux_j->t1) { aux = *aux_j; *aux_j = *aux_i; *aux_i = aux; end = FALSE; } } else { if(aux_i->t1 > aux_j->t1 && aux_i->t1 > aux_j->t2 && aux_i->t2 > aux_j->t1 && aux_i->t1 > aux_j->t2) { aux = *aux_j; *aux_j = *aux_i; *aux_i = aux; end = FALSE; } } } } } } static void gtk_plot_csurface_draw_lines(GtkPlotData *data) { GtkPlotCSurface *csurface = GTK_PLOT_CSURFACE(data); GtkPlot *plot = GTK_PLOT(data->plot); GtkPlotPoint *contour = NULL, *inner_contour = NULL; GdkColor color; gboolean closed; gint n1; GList *list, *lines = NULL; GtkPlotContourLine *branch = NULL; gchar text[100]; GList *labels = FALSE; GdkRectangle clip_area; clip_area.x = plot->internal_allocation.x; clip_area.y = plot->internal_allocation.y; clip_area.width = plot->internal_allocation.width; clip_area.height = plot->internal_allocation.height; gtk_plot_pc_clip(plot->pc, &clip_area); if(csurface->projection == GTK_PLOT_PROJECT_FULL){ gtk_plot_data_get_gradient_level(data, data->gradient->ticks.min - 1., &color); gtk_plot_pc_set_color(data->plot->pc, &color); gtk_plot_pc_draw_rectangle (plot->pc, TRUE, clip_area.x, clip_area.y, clip_area.width, clip_area.height); list = csurface->bg_triangles; while(list){ GtkPlotPoint p[3]; GtkPlotPolygon *poly = (GtkPlotPolygon *)list->data; gtk_plot_get_pixel(plot, poly->xyz[0].x, poly->xyz[0].y, &p[0].x, &p[0].y); gtk_plot_get_pixel(plot, poly->xyz[1].x, poly->xyz[1].y, &p[1].x, &p[1].y); gtk_plot_get_pixel(plot, poly->xyz[2].x, poly->xyz[2].y, &p[2].x, &p[2].y); gtk_plot_data_get_gradient_level(data, poly->level, &color); gtk_plot_pc_set_color(data->plot->pc, &color); gtk_plot_pc_draw_polygon(plot->pc, TRUE, p, 3); list = list->next; } } list = csurface->levels; while(list){ GtkPlotContourLevel *level = (GtkPlotContourLevel *)list->data; GList *polygons = level->polygons; while(polygons){ GList *last = polygons; GList *aux = polygons; gint nlines = 0, ntotal = 0, n, i; while(aux){ GtkPlotPolygon *p = (GtkPlotPolygon *)aux->data; if(p->n == 0) break; nlines++; ntotal += 2; aux = aux->next; } last = aux->next; if(nlines == 0){ polygons = last; continue; } contour = g_new0(GtkPlotPoint, ntotal); inner_contour = g_new0(GtkPlotPoint, ntotal); /* Actual contour line */ for(aux = polygons, n = 0, i = 0; n < nlines; aux = aux->next, n++, i+=2){ GtkPlotPolygon *p = (GtkPlotPolygon *)aux->data; gdouble x1, y1, x2, y2; gtk_plot_get_pixel(plot, p->xyz[0].x, p->xyz[0].y, &x1, &y1); gtk_plot_get_pixel(plot, p->xyz[1].x, p->xyz[1].y, &x2, &y2); contour[i].x = x1; contour[i].y = y1; contour[i+1].x = x2; contour[i+1].y = y2; } sort_lines(contour, nlines, &n1); closed = FALSE; if(contour[n1-1].x == contour[0].x && contour[n1-1].y == contour[0].y) closed = TRUE; branch = g_new0(GtkPlotContourLine, 1); branch->contour = contour; branch->n1 = n1; branch->level = level->level; branch->sublevel = level->sublevel; lines = g_list_append(lines, branch); if(csurface->projection == GTK_PLOT_PROJECT_FULL) { GtkPlotPoint pp[4]; gtk_plot_data_get_gradient_level(data, level->level == data->gradient->ticks.min ? level->level - 0.1 : level->level, &color); gtk_plot_pc_set_color(data->plot->pc, &color); aux = polygons; while(aux){ GtkPlotPolygon *p = (GtkPlotPolygon *)aux->data; if(p->n == 0) break; for(i = 0; i < p->n; i++) gtk_plot_get_pixel(data->plot, p->xyz[i].x, p->xyz[i].y, &pp[i].x, &pp[i].y); gtk_plot_pc_draw_polygon(plot->pc, TRUE, pp, p->n); aux = aux->next; } } polygons = last; } list = list->next; } if(data->show_labels){ gtk_plot_pc_clip(plot->pc, NULL); list = lines; while(list){ GtkPlotContourLine *s = (GtkPlotContourLine *)list->data; GtkPlotText label; gdouble length = 0., pos = 0.; gdouble dx = 0., dy = 0.; gint x, y, width, height, a, d; gint i; gdouble prev = 0.; GtkAllocation *new_bb; if(s->sublevel) { list = list->next; continue; } label = data->labels_attr; label.justification = GTK_JUSTIFY_CENTER; label.angle = 0; gtk_plot_axis_parse_label(data->gradient, s->level, data->legends_precision, data->legends_style, text); label.text = text; gtk_plot_text_get_size(text, 0, data->labels_attr.font, data->labels_attr.height, &width, &height, &a, &d); for(i = 0; i < s->n1-1; i++){ dx = s->contour[i+1].x - s->contour[i].x; dy = s->contour[i+1].y - s->contour[i].y; length += sqrt(dx*dx + dy*dy); } for(i = 0; i < (length < 150 ? 1 : s->n1-1); i++){ dx = s->contour[i+1].x - s->contour[i].x; dy = s->contour[i+1].y - s->contour[i].y; pos += sqrt(dx*dx + dy*dy); if(i == 0 || (pos - prev >= length/2)){ GtkAllocation bb; x = s->contour[i].x + dx/2; y = s->contour[i].y + dy/2 + height / 2; bb.x = x - width / 2 - label.border_space; bb.y = y - height; bb.width = width + 2*label.border_space; bb.height = height + label.border_space; label.angle = 0; /* if(abs(dy) > 2*abs(dx)){ bb.x = x - height; bb.y = y - width / 2; bb.width = height; bb.height = width; label.angle = 90; } */ if(bb.x >= plot->internal_allocation.x && bb.x + bb.width <= plot->internal_allocation.x + plot->internal_allocation.width && bb.y + bb.height < plot->internal_allocation.y + plot->internal_allocation.height && bb.y > plot->internal_allocation.y){ GList *aux = labels; gboolean overlap = FALSE; while(aux){ GtkAllocation *aux_bb = (GtkAllocation *)aux->data; if(bb_intersect(aux_bb, &bb)){ overlap = TRUE; break; } aux = aux->next; } if(!overlap){ GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); prev = pos; new_bb = g_new0(GtkAllocation, 1); *new_bb = bb; labels = g_list_append(labels, new_bb); label.x = allocation.x + x; label.y = allocation.y + y; label.x /= allocation.width; label.y /= allocation.height; gtk_plot_draw_text(plot, label); if(i != 0) break; } } } } list = list->next; } gtk_plot_pc_clip(plot->pc, &clip_area); } if(csurface->projection == GTK_PLOT_PROJECT_FULL || csurface->projection == GTK_PLOT_PROJECT_EMPTY){ list = lines; while(list){ GtkPlotContourLine *s = (GtkPlotContourLine *)list->data; GtkPlotPoint x1, x2; GtkPlotPoint *p1 = NULL, *p2 = NULL; gint i, n = 0, x = 0; GtkAllocation *aux_bb = NULL; GtkPlotPoint *line = NULL; gboolean prev_x = 0; if(!line) line = (GtkPlotPoint *) g_new0(GtkPlotPoint,s->n1 +1); /* Tiny C Compiler support */ if(s->sublevel){ if(csurface->sublevels_line.line_style == GTK_PLOT_LINE_NONE) { list = list->next; continue; } gtk_plot_set_line_attributes(plot, csurface->sublevels_line); }else{ if(csurface->levels_line.line_style == GTK_PLOT_LINE_NONE) { list = list->next; continue; } gtk_plot_set_line_attributes(plot, csurface->levels_line); } if(csurface->projection == GTK_PLOT_PROJECT_EMPTY){ if(s->level > data->gradient->ticks.min){ gtk_plot_data_get_gradient_level(data, s->level, &color); gtk_plot_pc_set_color(data->plot->pc, &color); } } for(i = 0; i < s->n1-1; i++){ GList *aux; GtkPlotContourX xp[20]; gint nxp = 0; p1 = &s->contour[i]; p2 = &s->contour[i+1]; aux = labels; while(aux){ gdouble t1 = 0., t2 = 0.; aux_bb = (GtkAllocation *)aux->data; prev_x = x; x = line_intersect(aux_bb,p1,p2,&x1,&x2,&t1,&t2); if(x == 3) break; if(x != 0 && x != 3){ xp[nxp].x1 = x1; xp[nxp].x2 = x2; xp[nxp].t1 = t1; xp[nxp].t2 = t2; xp[nxp].type = x; xp[nxp].bb = aux_bb; nxp++; } aux = aux->next; } if(x == 3) continue; if(nxp > 1) sort_points(xp,nxp); if(nxp > 0){ gint j; for(j = 0; j < nxp; j++){ GtkPlotContourX aux = xp[j]; x = aux.type; if(x == 1){ if(p1->x >= aux.bb->x && p1->x <= aux.bb->x+aux.bb->width && p1->y >= aux.bb->y && p1->y <= aux.bb->y+aux.bb->height){ line[0] = aux.x1; n = 1; } else { if(n == 0) line[n++] = *p1; line[n++] = aux.x1; gtk_plot_pc_draw_lines(plot->pc, line, n); n = 0; } } else { /* x == 2 */ if(n == 0) line[n++] = *p1; line[n++] = aux.x1; gtk_plot_pc_draw_lines(plot->pc, line, n); line[0] = aux.x2; n = 1; } } if(n == 1) line[n++] = *p2; } else { if(n == 0) line[n++] = *p1; line[n++] = *p2; } if(n > 1) gtk_plot_pc_draw_lines(plot->pc, line, n); } list = list->next; if(!list) g_free (line); } } if(labels){ for (list = labels; list; list = list->next) g_free(list->data); g_list_free(labels); } if(lines){ for (list = lines; list; list = list->next){ GtkPlotContourLine *s = (GtkPlotContourLine *)list->data; g_free(s->contour); g_free(list->data); } g_list_free(lines); } gtk_plot_pc_clip(plot->pc, NULL); } static void gtk_plot_csurface_draw_polygons (GtkPlotSurface *surface) { GtkPlotCSurface *csurface = GTK_PLOT_CSURFACE(surface); GtkPlot *plot; plot = GTK_PLOT(GTK_PLOT_DATA(surface)->plot); if(!GTK_IS_PLOT3D(plot)) return; /* draw full projection */ if(csurface->projection == GTK_PLOT_PROJECT_FULL) gtk_plot_csurface_real_draw_polygons(surface, csurface->projection); /* draw empty projection */ if(csurface->projection == GTK_PLOT_PROJECT_EMPTY) gtk_plot_csurface_real_draw_polygons(surface, csurface->projection); /* draw surface */ gtk_plot_csurface_real_draw_polygons(surface, GTK_PLOT_PROJECT_NONE); } static void gtk_plot_csurface_real_draw_polygons (GtkPlotSurface *surface, GtkPlotProjection p) { GtkPlot *plot; GtkPlot3D *plot3d; GtkPlotData *data; GtkPlotCSurface *csurface; GdkDrawable *drawable; GtkPlotPoint t[4]; GtkPlotDTtriangle *triangle; GtkPlotVector points[3], side[3], light, normal; GdkColor color; GdkColor real_color; gdouble factor, norm; GList *list; csurface = GTK_PLOT_CSURFACE(surface); data = GTK_PLOT_DATA(surface); plot = GTK_PLOT(data->plot); plot3d = GTK_PLOT3D(data->plot); drawable = plot->drawable; list = surface->polygons; while(list){ GtkPlotPolygon *polygon = (GtkPlotPolygon *)list->data; if(plot->clip_data){ gboolean discard = FALSE; gint i; for(i = 0; i < polygon->n; i++){ if(polygon->xyz[i].x < plot3d->ax->ticks.min || polygon->xyz[i].x > plot3d->ax->ticks.max || polygon->xyz[i].y < plot3d->ay->ticks.min || polygon->xyz[i].y > plot3d->ay->ticks.max || polygon->xyz[i].z < plot3d->az->ticks.min || polygon->xyz[i].z > plot3d->az->ticks.max) { discard = TRUE; break; } } if(discard) { list = list->next; continue; } } triangle = polygon->t; light = surface->light; norm = sqrt(light.x*light.x + light.y*light.y + light.z*light.z); light.x /= norm; light.y /= norm; light.z /= norm; t[0].x = polygon->p[0].x; t[0].y = polygon->p[0].y; t[1].x = polygon->p[1].x; t[1].y = polygon->p[1].y; t[2].x = polygon->p[2].x; t[2].y = polygon->p[2].y; t[3].x = polygon->p[3].x; t[3].y = polygon->p[3].y; points[0].x = triangle->na->x; points[0].y = triangle->na->y; points[0].z = triangle->na->z; points[1].x = triangle->nb->x; points[1].y = triangle->nb->y; points[1].z = triangle->nb->z; points[2].x = triangle->nc->x; points[2].y = triangle->nc->y; points[2].z = triangle->nc->z; side[0].x = -(points[1].x - points[0].x); side[0].y = -(points[1].y - points[0].y); side[0].z = -(points[1].z - points[0].z); side[1].x = -(points[2].x - points[0].x); side[1].y = -(points[2].y - points[0].y); side[1].z = -(points[2].z - points[0].z); if(p == GTK_PLOT_PROJECT_NONE){ normal.x = side[0].y * side[1].z - side[0].z * side[1].y; normal.y = side[0].z * side[1].x - side[0].x * side[1].z; normal.z = side[0].x * side[1].y - side[0].y * side[1].x; norm = sqrt(normal.x*normal.x + normal.y*normal.y + normal.z*normal.z); factor = (normal.x*light.x + normal.y*light.y + normal.z*light.z) / norm; gtk_plot_data_get_gradient_level(data, polygon->level, &color); gtk_plot_csurface_lighting(&color, &real_color, factor, 1.); } else { if(polygon->level <= data->gradient->ticks.min) color = csurface->levels_line.color; else gtk_plot_data_get_gradient_level(data, polygon->level, &color); } if(p == GTK_PLOT_PROJECT_FULL){ GtkPlotPoint xyz[4]; gdouble z; gtk_plot3d_get_pixel(GTK_PLOT3D(plot), polygon->xyz[0].x, polygon->xyz[0].y, GTK_PLOT3D(plot)->origin.z, &xyz[0].x, &xyz[0].y, &z); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), polygon->xyz[1].x, polygon->xyz[1].y, GTK_PLOT3D(plot)->origin.z, &xyz[1].x, &xyz[1].y, &z); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), polygon->xyz[2].x, polygon->xyz[2].y, GTK_PLOT3D(plot)->origin.z, &xyz[2].x, &xyz[2].y, &z); if(polygon->n == 4) gtk_plot3d_get_pixel(GTK_PLOT3D(plot), polygon->xyz[3].x, polygon->xyz[3].y, GTK_PLOT3D(plot)->origin.z, &xyz[3].x, &xyz[3].y, &z); gtk_plot_pc_set_color(data->plot->pc, &color); gtk_plot_pc_draw_polygon(data->plot->pc, TRUE, xyz, polygon->n); } if(p == GTK_PLOT_PROJECT_EMPTY && polygon->cut_level){ GtkPlotPoint xyz[2]; gdouble z; if(p== GTK_PLOT_PROJECT_EMPTY){ if(polygon->sublevel){ gtk_plot_set_line_attributes(plot, csurface->sublevels_line); if(csurface->sublevels_line.line_style == GTK_PLOT_LINE_NONE) gtk_plot_pc_set_color(plot->pc, &color); }else{ gtk_plot_set_line_attributes(plot, csurface->levels_line); if(csurface->levels_line.line_style == GTK_PLOT_LINE_NONE) gtk_plot_pc_set_color(plot->pc, &color); } } gtk_plot3d_get_pixel(GTK_PLOT3D(plot), polygon->xyz[0].x, polygon->xyz[0].y, GTK_PLOT3D(plot)->origin.z, &xyz[0].x, &xyz[0].y, &z); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), polygon->xyz[1].x, polygon->xyz[1].y, GTK_PLOT3D(plot)->origin.z, &xyz[1].x, &xyz[1].y, &z); gtk_plot_pc_draw_line(plot->pc, xyz[0].x, xyz[0].y, xyz[1].x, xyz[1].y); } if(p == GTK_PLOT_PROJECT_NONE){ gtk_plot_pc_set_color(data->plot->pc, &real_color); gtk_plot_pc_draw_polygon(data->plot->pc, !surface->transparent, t, polygon->n); if(csurface->lines_visible || surface->show_mesh || surface->show_grid) gtk_plot_pc_set_color(data->plot->pc, &surface->grid_foreground); if(csurface->lines_visible && polygon->cut_level){ if(polygon->sublevel){ gtk_plot_set_line_attributes(plot, csurface->sublevels_line); }else{ gtk_plot_set_line_attributes(plot, csurface->levels_line); } gtk_plot_pc_draw_line(data->plot->pc, polygon->p[0].x, polygon->p[0].y, polygon->p[1].x, polygon->p[1].y); } if(surface->show_mesh){ gtk_plot_set_line_attributes(plot, surface->mesh_line); gtk_plot_pc_draw_line(data->plot->pc, polygon->p[1].x, polygon->p[1].y, polygon->p[2].x, polygon->p[2].y); if(polygon->n == 3) gtk_plot_pc_draw_line(data->plot->pc, polygon->p[0].x, polygon->p[0].y, polygon->p[2].x, polygon->p[2].y); else{ gtk_plot_pc_draw_line(data->plot->pc, polygon->p[0].x, polygon->p[0].y, polygon->p[3].x, polygon->p[3].y); gtk_plot_pc_draw_line(data->plot->pc, polygon->p[2].x, polygon->p[2].y, polygon->p[3].x, polygon->p[3].y); } } if(!surface->show_mesh && surface->show_grid && surface->dt->quadrilateral){ gtk_plot_pc_draw_line(data->plot->pc, polygon->t->nb->px, polygon->t->nb->py, polygon->t->nc->px, polygon->t->nc->py); } } list = list->next; } } static GtkPlotPolygon * sides_cut_level(GtkPlotDTtriangle *triangle, GtkPlotVector *points, GtkPlotVector *side, gdouble level) { GtkPlotPolygon *polygon; GtkPlotVector c[3]; gint vertex[3]; if(points[0].z > level || points[1].z > level || points[2].z > level){ gint n = 0; gint mask = 0; gint i; for(i = 0; i < 3; i++){ gdouble a; a = -1.0; if(side[i].z != 0.0) a = (level - points[i].z) / side[i].z; if(a >= 0. && a <= 1.0){ mask |= 1 << i; c[n].x = points[i].x + side[i].x * a; c[n].y = points[i].y + side[i].y * a; c[n].z = level; n++; } if(n == 3){ /* intersection in a vertex => repeated point */ if((c[2].x == c[0].x && c[2].y == c[0].y) || (c[2].x == c[1].x && c[2].y == c[1].y)){ n--; mask = 3; } else if(c[1].x == c[0].x && c[1].y == c[0].y){ c[1].x = c[2].x; c[1].y = c[2].y; n--; mask = 5; } } } if(n >= 2){ switch(mask){ case 5: vertex[0] = 0; vertex[1] = 2; vertex[2] = 1; break; case 3: vertex[0] = 1; vertex[1] = 2; vertex[2] = 0; break; case 6: vertex[0] = 2; vertex[1] = 0; vertex[2] = 1; break; default: if(c[0].z == c[1].z) c[1] = c[2]; vertex[0] = 0; vertex[1] = 2; vertex[2] = 1; break; } if(points[vertex[0]].z <= level){ polygon = g_new0(GtkPlotPolygon, 1); polygon->level = level; polygon->n = 3; polygon->t = triangle; polygon->cut_level = TRUE; polygon->xyz[0] = c[0]; polygon->xyz[1] = c[1]; polygon->xyz[2] = points[vertex[0]]; }else{ polygon = g_new0(GtkPlotPolygon, 1); polygon->level = level; polygon->n = 4; polygon->t = triangle; polygon->cut_level = TRUE; polygon->xyz[0] = c[0]; polygon->xyz[1] = c[1]; polygon->xyz[2] = points[vertex[1]]; polygon->xyz[3] = points[vertex[2]]; } return polygon; } } return NULL; } static GtkPlotPolygon * triangle_cuts_level(GtkPlotDTtriangle *triangle, gdouble level) { GtkPlotVector points[3], side[3]; if(!triangle || !triangle->na || !triangle->nb || !triangle->nc) return NULL; points[0].x = triangle->na->x; points[0].y = triangle->na->y; points[0].z = triangle->na->z; points[1].x = triangle->nb->x; points[1].y = triangle->nb->y; points[1].z = triangle->nb->z; points[2].x = triangle->nc->x; points[2].y = triangle->nc->y; points[2].z = triangle->nc->z; side[0].x = (points[1].x - points[0].x); side[0].y = (points[1].y - points[0].y); side[0].z = (points[1].z - points[0].z); side[1].x = (points[2].x - points[1].x); side[1].y = (points[2].y - points[1].y); side[1].z = (points[2].z - points[1].z); side[2].x = (points[0].x - points[2].x); side[2].y = (points[0].y - points[2].y); side[2].z = (points[0].z - points[2].z); return(sides_cut_level(triangle, points, side, level)); } static void gtk_plot_csurface_build_polygons(GtkPlotSurface *surface) { GList *list; GtkPlotData *data = GTK_PLOT_DATA(surface); gdouble min, max, step; gint nlevels; gdouble h; gint level; GtkPlotTick *ticks; GtkPlotVector points[3], side[3]; clear_polygons(GTK_PLOT_CSURFACE(surface)); if(!GTK_IS_PLOT3D(data->plot)){ gtk_plot_csurface_build_contours(surface); return; } min = data->gradient->ticks.min; max = data->gradient->ticks.max; ticks = data->gradient->ticks.values; nlevels = data->gradient->ticks.nticks; step = (data->gradient->ticks.max - data->gradient->ticks.min); list = surface->dt->triangles; while(list){ GtkPlotPolygon *polygon; GtkPlotDTtriangle *triangle = (GtkPlotDTtriangle *)list->data; if(!triangle || !triangle->na || !triangle->nb || !triangle->nc) { list = list->next; continue; } points[0].x = triangle->na->x; points[0].y = triangle->na->y; points[0].z = triangle->na->z; points[1].x = triangle->nb->x; points[1].y = triangle->nb->y; points[1].z = triangle->nb->z; points[2].x = triangle->nc->x; points[2].y = triangle->nc->y; points[2].z = triangle->nc->z; side[0].x = (points[1].x - points[0].x); side[0].y = (points[1].y - points[0].y); side[0].z = (points[1].z - points[0].z); side[1].x = (points[2].x - points[1].x); side[1].y = (points[2].y - points[1].y); side[1].z = (points[2].z - points[1].z); side[2].x = (points[0].x - points[2].x); side[2].y = (points[0].y - points[2].y); side[2].z = (points[0].z - points[2].z); for(level = nlevels-1; level >= 0; level--){ gint n_cuts = 0; h = ticks[level].value; if(triangle->na->z <= h) n_cuts++; if(triangle->nb->z <= h) n_cuts++; if(triangle->nc->z <= h) n_cuts++; if(n_cuts != 3){ polygon = g_new0(GtkPlotPolygon, 1); if(level != nlevels-1) polygon->level = ticks[level+1].value; else polygon->level = max+step; polygon->n = 3; polygon->t = triangle; polygon->cut_level = FALSE; polygon->xyz[0].x = triangle->na->x; polygon->xyz[0].y = triangle->na->y; polygon->xyz[0].z = triangle->na->z; polygon->xyz[1].x = triangle->nb->x; polygon->xyz[1].y = triangle->nb->y; polygon->xyz[1].z = triangle->nb->z; polygon->xyz[2].x = triangle->nc->x; polygon->xyz[2].y = triangle->nc->y; polygon->xyz[2].z = triangle->nc->z; surface->polygons = g_list_append(surface->polygons, polygon); break; } } for(level = nlevels-1; level >= 0; level--){ h = ticks[level].value; if((polygon = sides_cut_level(triangle, points, side, h))){ polygon->sublevel = ticks[level].minor; if(level == 0) polygon->level -= step; surface->polygons = g_list_append(surface->polygons, polygon); } } list = list->next; } } static void gtk_plot_csurface_build_contours(GtkPlotSurface *surface) { GList *list; GtkPlotData *data = GTK_PLOT_DATA(surface); GtkPlotCSurface *csurface = GTK_PLOT_CSURFACE(surface); GtkPlotPolygon *polygon = NULL, *prev = NULL; gdouble min, max, step; gint nlevels, nsublevels; gdouble h = 0; gint level; gint nlines; GtkPlotTick *values; min = data->gradient->ticks.min; max = data->gradient->ticks.max; nlevels = data->gradient->ticks.nticks; nsublevels = data->gradient->ticks.nminor; step = (data->gradient->ticks.max - data->gradient->ticks.min) ; values = data->gradient->ticks.values; nlevels = data->gradient->ticks.nticks; for(level = nlevels-1; level >= 0; level--){ GtkPlotContourLevel *_level; _level = g_new0(GtkPlotContourLevel,1); _level->sublevel = values[level].minor; _level->level = values[level].value; csurface->levels = g_list_append(csurface->levels, _level); nlines = 0; list = surface->dt->triangles; while(list){ GtkPlotDTtriangle *triangle = (GtkPlotDTtriangle *)list->data; triangle->visited = FALSE; list = list->next; } list = surface->dt->triangles; while(list){ GtkPlotDTtriangle *triangle = (GtkPlotDTtriangle *)list->data; GtkPlotDTtriangle *next = triangle; GList *first = NULL; GList *last = NULL; GList *new_list = NULL; GList *branch = NULL; gboolean end = FALSE; nlines = 0; if(!triangle->visited){ if((polygon = triangle_cuts_level(triangle, values[level].value))){ /* New branch */ triangle->visited = TRUE; polygon->level = values[level].value; prev = polygon; branch = g_list_append(branch, polygon); last = first = branch; nlines = 2; end = FALSE; while(!end){ gint i; end = TRUE; for(i = 0; i < 3; i++){ GtkPlotDTtriangle *nn = next->nn[i]; if(nn && !nn->visited){ if((polygon = triangle_cuts_level(nn, values[level].value))){ nn->visited = TRUE; if(!((prev->xyz[0].x == polygon->xyz[0].x && prev->xyz[0].y == polygon->xyz[0].y) || (prev->xyz[1].x == polygon->xyz[0].x && prev->xyz[1].y == polygon->xyz[0].y) || (prev->xyz[1].x == polygon->xyz[1].x && prev->xyz[1].y == polygon->xyz[1].y) || (prev->xyz[0].x == polygon->xyz[1].x && prev->xyz[0].y == polygon->xyz[1].y))) { nn->visited = FALSE; continue; } new_list = g_list_alloc(); new_list->data = polygon; new_list->prev = last; last->next = new_list; last = new_list; next = nn; end = FALSE; polygon->level = values[level].value; prev = polygon; nlines++; break; } } } } /* We add an extra polygon to mark the end of branch */ polygon = g_new0(GtkPlotPolygon, 1); polygon->n = 0; polygon->level = 0.0; branch = g_list_append(branch, polygon); _level->polygons = g_list_concat(_level->polygons, branch); } } list = list->next; } } /* Now we determine the background triangles */ list = surface->dt->triangles; while(list){ GtkPlotDTtriangle *triangle = (GtkPlotDTtriangle *)list->data; triangle->visited = FALSE; list = list->next; } for(level = nlevels-1; level >= 0; level--){ h = values[level].value; list = surface->dt->triangles; while(list){ GtkPlotDTtriangle *triangle = (GtkPlotDTtriangle *)list->data; gint n_cuts = 0; if(!triangle->visited){ if(triangle->na->z <= h) n_cuts++; if(triangle->nb->z <= h) n_cuts++; if(triangle->nc->z <= h) n_cuts++; if(n_cuts == 1 || n_cuts == 2){ GtkPlotPolygon *p = g_new0(GtkPlotPolygon, 1); p->level = h + step; if(level != nlevels-1) p->level = values[level+1].value; p->xyz[0].x = triangle->na->x; p->xyz[0].y = triangle->na->y; p->xyz[0].z = triangle->na->z; p->xyz[1].x = triangle->nb->x; p->xyz[1].y = triangle->nb->y; p->xyz[1].z = triangle->nb->z; p->xyz[2].x = triangle->nc->x; p->xyz[2].y = triangle->nc->y; p->xyz[2].z = triangle->nc->z; p->n = 3; triangle->visited = TRUE; csurface->bg_triangles = g_list_append(csurface->bg_triangles, p); } } list = list->next; } } list = surface->dt->triangles; while(list){ GtkPlotDTtriangle *triangle = (GtkPlotDTtriangle *)list->data; if(!triangle->visited){ GtkPlotPolygon *p = g_new0(GtkPlotPolygon, 1); p->level = triangle->na->z; p->xyz[0].x = triangle->na->x; p->xyz[0].y = triangle->na->y; p->xyz[0].z = triangle->na->z; p->xyz[1].x = triangle->nb->x; p->xyz[1].y = triangle->nb->y; p->xyz[1].z = triangle->nb->z; p->xyz[2].x = triangle->nc->x; p->xyz[2].y = triangle->nc->y; p->xyz[2].z = triangle->nc->z; p->n = 3; triangle->visited = TRUE; csurface->bg_triangles = g_list_append(csurface->bg_triangles, p); } list = list->next; } } static void clear_polygons(GtkPlotCSurface *csurface) { GtkPlotSurface *surface = GTK_PLOT_SURFACE(csurface); if(surface->polygons){ GList *list; for (list = surface->polygons; list; list = list->next) if (list->data) g_free(list->data); g_list_free(surface->polygons); surface->polygons= NULL; } if(csurface->levels){ GList *list; for (list = csurface->levels; list; list = list->next) if (list->data){ GtkPlotContourLevel *level = (GtkPlotContourLevel *)list->data; if(level->polygons){ GList *aux; for (aux = level->polygons; aux; aux = aux->next) if (aux->data) g_free(aux->data); g_list_free(level->polygons); } g_free(list->data); } g_list_free(csurface->levels); csurface->levels = NULL; } if(csurface->bg_triangles){ GList *list; for (list = csurface->bg_triangles; list; list = list->next) if (list->data) g_free(list->data); g_list_free(csurface->bg_triangles); csurface->bg_triangles = NULL; } } static void gtk_plot_csurface_get_legend_size(GtkPlotData *data, gint *width, gint *height) { GtkPlotSurface *surface; GtkPlotCSurface *csurface; GtkPlot *plot = NULL; GtkPlotText legend; gint lascent = 0, ldescent = 0, lheight = 0, lwidth = 0; gdouble m; surface = GTK_PLOT_SURFACE(data); csurface = GTK_PLOT_CSURFACE(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); plot = data->plot; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = "X"; *height = 0; *width = roundint(12 * m); if(data->show_legend){ gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); *height = MAX(lheight, roundint(data->symbol.size * m)); *width = lwidth + roundint(12 * m); } } static void gtk_plot_csurface_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotSurface *surface; GtkPlotCSurface *csurface; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent = 0, ldescent = 0, lheight = 0, lwidth = 0; gdouble m; GtkAllocation allocation; surface = GTK_PLOT_SURFACE(data); csurface = GTK_PLOT_CSURFACE(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = "X"; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); if(GTK_PLOT_DATA(data)->show_legend && data->legend && strlen(data->legend) > 0){ legend.x = (gdouble)(area.x + x + roundint(4 * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); y += 2 * lheight; } else y += lheight; GTK_PLOT_DATA(data)->gradient_custom = TRUE; } static void gtk_plot_csurface_lighting (GdkColor *a, GdkColor *b, gdouble normal, gdouble ambient) { gdouble red, green, blue; gdouble h, s, v; *b = *a; return; normal = MIN(fabs(normal), 1.0); red = a->red; green = a->green; blue = a->blue; rgb_to_hsv(red, green, blue, &h, &s, &v); s *= normal; v *= normal; s += ambient; v += ambient; hsv_to_rgb(h, MIN(s, 1.0), MIN(v, 1.0), &red, &green, &blue); b->red = red; b->green = green; b->blue = blue; } static void hsv_to_rgb (gdouble h, gdouble s, gdouble v, gdouble *r, gdouble *g, gdouble *b) { gint i; gdouble f, w, q, t; if (s == 0.0) s = 0.000001; if (h == -1.0) { *r = v; *g = v; *b = v; } else { if (h == 360.0) h = 0.0; h = h / 60.0; i = (gint) h; f = h - i; w = v * (1.0 - s); q = v * (1.0 - (s * f)); t = v * (1.0 - (s * (1.0 - f))); switch (i) { case 0: *r = v; *g = t; *b = w; break; case 1: *r = q; *g = v; *b = w; break; case 2: *r = w; *g = v; *b = t; break; case 3: *r = w; *g = q; *b = v; break; case 4: *r = t; *g = w; *b = v; break; case 5: *r = v; *g = w; *b = q; break; } } *r *= 65535.; *g *= 65535.; *b *= 65535.; } static void rgb_to_hsv (gdouble r, gdouble g, gdouble b, gdouble *h, gdouble *s, gdouble *v) { double max, min, delta; r /= 65535.; g /= 65535.; b /= 65535.; max = r; if (g > max) max = g; if (b > max) max = b; min = r; if (g < min) min = g; if (b < min) min = b; *v = max; if (max != 0.0) *s = (max - min) / max; else *s = 0.0; if (*s == 0.0) *h = -1.0; else { delta = max - min; if (r == max) *h = (g - b) / delta; else if (g == max) *h = 2.0 + (b - r) / delta; else if (b == max) *h = 4.0 + (r - g) / delta; *h = *h * 60.0; if (*h < 0.0) *h = *h + 360; } } /*********************************** ***********************************/ /** * gtk_plot_csurface_set_lines_visible: * @csurface: a #GtkPlotCSurface/ * @visible: * * */ void gtk_plot_csurface_set_lines_visible (GtkPlotCSurface *csurface, gboolean visible) { csurface->lines_visible = visible; } /** * gtk_plot_csurface_get_lines_visible: * @csurface: a #GtkPlotCSurface. * * * * Return value: */ gboolean gtk_plot_csurface_get_lines_visible (GtkPlotCSurface *csurface) { return (csurface->lines_visible); } /** * gtk_plot_csurface_set_projection: * @csurface: a #GtkPlotCSurface. * @proj: * * */ void gtk_plot_csurface_set_projection (GtkPlotCSurface *csurface, GtkPlotProjection proj) { csurface->projection = proj; } /** * gtk_plot_csurface_projection: * @csurface: a #GtkPlotCSurface. * * * * Return value: */ GtkPlotProjection gtk_plot_csurface_projection (GtkPlotCSurface *csurface) { return (csurface->projection); } /** * gtk_plot_csurface_set_levels_attributes: * @dataset: a #GtkPlotCSurface. * @style: * @width: * @color: * * */ void gtk_plot_csurface_set_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color) { dataset->levels_line.line_style = style; dataset->levels_line.line_width = width; dataset->levels_line.color = *color; } /** * gtk_plot_csurface_set_sublevels_attributes: * @dataset: a #GtkPlotCSurface. * @style: * @width: * @color: * * */ void gtk_plot_csurface_set_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color) { dataset->sublevels_line.line_style = style; dataset->sublevels_line.line_width = width; dataset->sublevels_line.color = *color; } /** * gtk_plot_csurface_get_levels_attributes: * @dataset: a #GtkPlotCSurface. * @style: * @width: * @color: * * */ void gtk_plot_csurface_get_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color) { *style = dataset->levels_line.line_style; *width = dataset->levels_line.line_width; *color = dataset->levels_line.color; } /** * gtk_plot_csurface_get_sublevels_attributes: * @dataset: a #GtkPlotCSurface. * @style: * @width: * @color: * * */ void gtk_plot_csurface_get_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color) { *style = dataset->sublevels_line.line_style; *width = dataset->sublevels_line.line_width; *color = dataset->sublevels_line.color; } gtkextra-3.2.0/gtkextra/gtkplotdata.h0000644000076400001440000003165312603754176014631 00000000000000/* gtkplotdata - 2d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_DATA_H__ #define __GTK_PLOT_DATA_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_DATA(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_data_get_type (), GtkPlotData) #define G_TYPE_PLOT_DATA (gtk_plot_data_get_type ()) #define GTK_PLOT_DATA_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_data_get_type(), GtkPlotDataClass) #define GTK_IS_PLOT_DATA(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_data_get_type ()) GType gtk_plot_data_get_type (void); GType gtk_plot_marker_get_type (void); GtkWidget* gtk_plot_data_new (void); GtkWidget* gtk_plot_data_new_function (GtkPlotFunc function); void gtk_plot_data_construct_function (GtkPlotData *data, GtkPlotFunc function); GtkWidget* gtk_plot_data_new_iterator (GtkPlotIterator iterator, gint npoints, guint16 mask); void gtk_plot_data_construct_iterator (GtkPlotData *data, GtkPlotIterator iterator, gint npoints, guint16 mask); void gtk_plot_data_clone (GtkPlotData *data, GtkPlotData *copy); /* required dimensions, private use */ void gtk_plot_data_add_dimension (GtkPlotData *data, const gchar *name, const gchar *label, const gchar *desc, GType value_type, gboolean required, gboolean independent); void gtk_plot_data_remove_dimension (GtkPlotData *data, const gchar *name); GtkPlotArray * gtk_plot_data_find_dimension (GtkPlotData *data, const gchar *name); guint gtk_plot_data_required_dimensions (GtkPlotData *data); guint gtk_plot_data_independent_dimensions (GtkPlotData *data); /* draw last n points */ void gtk_plot_data_paint (GtkPlotData *data); void gtk_plot_data_update (GtkPlotData *data); void gtk_plot_data_draw_points (GtkPlotData *data, gint npoints); void gtk_plot_data_draw_symbol (GtkPlotData *data, gdouble px, gdouble py); GtkPlotArray * gtk_plot_data_dimension_set_points(GtkPlotData *data, const gchar *name, gdouble *points); void gtk_plot_data_dimension_set_array(GtkPlotData *data, const gchar *name, GtkPlotArray *array); GtkPlotArray * gtk_plot_data_dimension_get_array(GtkPlotData *data, const gchar *name); void gtk_plot_data_dimension_set_scale (GtkPlotData *data, const gchar *name, gdouble scale); gdouble gtk_plot_data_dimension_get_scale (GtkPlotData *data, const gchar *name); /*------------------------------------------------------------------------* * Old implementation, we keep it for compatibility * *------------------------------------------------------------------------*/ void gtk_plot_data_set_points (GtkPlotData *data, gdouble *x, gdouble *y, gdouble *dx, gdouble *dy, gint num_points); void gtk_plot_data_get_points (GtkPlotData *dataset, gdouble **x, gdouble **y, gdouble **dx, gdouble **dy, gint *num_points); void gtk_plot_data_get_point (GtkPlotData *dataset, gint n, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error); GtkPlotArray * gtk_plot_data_set_x (GtkPlotData *data, gdouble *x); GtkPlotArray * gtk_plot_data_set_y (GtkPlotData *data, gdouble *y); GtkPlotArray * gtk_plot_data_set_z (GtkPlotData *data, gdouble *z); GtkPlotArray * gtk_plot_data_set_a (GtkPlotData *data, gdouble *a); GtkPlotArray * gtk_plot_data_set_dx (GtkPlotData *data, gdouble *dx); GtkPlotArray * gtk_plot_data_set_dy (GtkPlotData *data, gdouble *dy); GtkPlotArray * gtk_plot_data_set_dz (GtkPlotData *data, gdouble *dz); GtkPlotArray * gtk_plot_data_set_da (GtkPlotData *data, gdouble *da); void gtk_plot_data_set_a_scale (GtkPlotData *data, gdouble a_scale); GtkPlotArray * gtk_plot_data_set_labels (GtkPlotData *data, gchar **labels); gdouble * gtk_plot_data_get_x (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_y (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_z (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_a (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_dx (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_dy (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_dz (GtkPlotData *dataset, gint *num_points); gdouble * gtk_plot_data_get_da (GtkPlotData *dataset, gint *num_points); gdouble gtk_plot_data_get_a_scale (GtkPlotData *dataset); /*------------------------------------------------------------------------*/ gchar ** gtk_plot_data_get_labels (GtkPlotData *dataset, gboolean *show_labels); void gtk_plot_data_show_labels (GtkPlotData *dataset, gboolean show_labels); void gtk_plot_data_labels_set_attributes (GtkPlotData *data, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg); void gtk_plot_data_set_numpoints (GtkPlotData *dataset, gint num_points); gint gtk_plot_data_get_numpoints (GtkPlotData *data); void gtk_plot_data_set_symbol (GtkPlotData *dataset, GtkPlotSymbolType type, GtkPlotSymbolStyle style, gint size, gfloat line_width, const GdkColor *color, const GdkColor *border_color); void gtk_plot_data_get_symbol (GtkPlotData *dataset, GtkPlotSymbolType *type, GtkPlotSymbolStyle *style, gint *size, gfloat *line_width, GdkColor *color, GdkColor *border_color); void gtk_plot_data_set_connector (GtkPlotData *dataset, GtkPlotConnector connector); gint gtk_plot_data_get_connector (GtkPlotData *dataset); void gtk_plot_data_set_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_get_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle *style, GdkCapStyle *cap_style, GdkJoinStyle *join_style, gfloat *width, GdkColor *color); void gtk_plot_data_set_x_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_set_y_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_set_z_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color); void gtk_plot_data_show_xerrbars (GtkPlotData *dataset); void gtk_plot_data_show_yerrbars (GtkPlotData *dataset); void gtk_plot_data_show_zerrbars (GtkPlotData *dataset); void gtk_plot_data_hide_xerrbars (GtkPlotData *dataset); void gtk_plot_data_hide_yerrbars (GtkPlotData *dataset); void gtk_plot_data_hide_zerrbars (GtkPlotData *dataset); void gtk_plot_data_fill_area (GtkPlotData *dataset, gboolean fill); gboolean gtk_plot_data_area_is_filled (GtkPlotData *dataset); void gtk_plot_data_show_legend (GtkPlotData *data); void gtk_plot_data_hide_legend (GtkPlotData *dataset); void gtk_plot_data_set_legend (GtkPlotData *dataset, const gchar *legend); void gtk_plot_data_set_legend_precision (GtkPlotData *dataset, gint precision); gint gtk_plot_data_get_legend_precision (GtkPlotData *data); void gtk_plot_data_set_name (GtkPlotData *dataset, const gchar *name); GtkPlotAxis * gtk_plot_data_gradient (GtkPlotData *data); GtkAllocation gtk_plot_data_get_gradient_allocation (GtkPlotData *data); void gtk_plot_data_move_gradient (GtkPlotData *data, gdouble x, gdouble y); void gtk_plot_data_set_gradient_size (GtkPlotData *data, gint size); void gtk_plot_data_reset_gradient (GtkPlotData *data); void gtk_plot_data_reset_gradient_colors (GtkPlotData *data); void gtk_plot_data_gradient_use_custom_colors(GtkPlotData *data, gboolean custom); gboolean gtk_plot_data_gradient_custom_colors (GtkPlotData *data); void gtk_plot_data_set_gradient_mask (GtkPlotData *data, gint mask); gint gtk_plot_data_get_gradient_mask (GtkPlotData *data); void gtk_plot_data_gradient_set_visible (GtkPlotData *data, gboolean visible); gboolean gtk_plot_data_gradient_visible (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_a (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_da (GtkPlotData *data); void gtk_plot_data_gradient_autoscale_z (GtkPlotData *data); void gtk_plot_data_set_gradient_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max); void gtk_plot_data_get_gradient_colors (GtkPlotData *data, GdkColor *min, GdkColor *max); void gtk_plot_data_set_gradient_nth_color (GtkPlotData *data, guint level, GdkColor *color); const GdkColor *gtk_plot_data_get_gradient_nth_color (GtkPlotData *data, guint level); void gtk_plot_data_set_gradient_outer_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max); void gtk_plot_data_get_gradient_outer_colors (GtkPlotData *data, GdkColor *min, GdkColor *max); void gtk_plot_data_set_gradient (GtkPlotData *data, gdouble min, gdouble max, gint nlevels, gint nsublevels); void gtk_plot_data_get_gradient (GtkPlotData *data, gdouble *min, gdouble *max, gint *nlevels, gint *nsublevels); void gtk_plot_data_get_gradient_level (GtkPlotData *data, gdouble level, GdkColor *color); void gtk_plot_data_gradient_set_style (GtkPlotData *data, GtkPlotLabelStyle style, gint precision); void gtk_plot_data_gradient_set_scale (GtkPlotData *data, GtkPlotScale scale); void gtk_plot_data_gradient_set_title (GtkPlotData *data, gchar *title); void gtk_plot_data_set_gradient_show_lt_gt (GtkPlotData *data, gboolean show); gboolean gtk_plot_data_gradient_show_lt_gt (GtkPlotData *data); void gtk_plot_data_set_link (GtkPlotData *dataset, gpointer link); gpointer gtk_plot_data_get_link (GtkPlotData *dataset); void gtk_plot_data_remove_link (GtkPlotData *dataset); /* Markers */ GtkPlotMarker * gtk_plot_data_add_marker (GtkPlotData *data, guint point); gboolean gtk_plot_data_remove_marker (GtkPlotData *data, GtkPlotMarker *marker); void gtk_plot_data_remove_markers (GtkPlotData *data); void gtk_plot_data_show_markers (GtkPlotData *data, gboolean show); gboolean gtk_plot_data_markers_visible (GtkPlotData *data); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_DATA_H__ */ gtkextra-3.2.0/gtkextra/gtkplotps.c0000644000076400001440000012563712603754176014343 00000000000000/* gtkplotps - postscript driver * Copyright 1999-2001 Adrian E. Feiguin * * Some few lines of code borrowed from * DiaCanvas -- a technical canvas widget * Copyright (C) 1999 Arjan Molenaar * Dia -- an diagram creation/manipulation program * Copyright (C) 1998 Alexander Larsson * ISO Latin encoding by * Przemek Klosowski * przemek@rrdbartok.nist.gov * (borrowed from XMGR) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotps * @short_description: postscript driver * * Subclass of #GtkPlotPC used to generate PostScript output. */ #include #include #include #include #include #include #include #include #include "gtkplot.h" #include "gtkpsfont.h" #include "gtkplotpc.h" #include "gtkplotps.h" static void gtk_plot_ps_class_init (GtkPlotPSClass *klass); static void gtk_plot_ps_init (GtkPlotPS *ps); static void gtk_plot_ps_destroy (GtkObject *object); /*********************************************************************/ /* Postscript specific functions */ static gboolean psinit (GtkPlotPC *pc); static void pssetviewport (GtkPlotPC *pc, gdouble w, gdouble h); static void psleave (GtkPlotPC *pc); static void psgsave (GtkPlotPC *pc); static void psgrestore (GtkPlotPC *pc); static void psclip (GtkPlotPC *pc, const GdkRectangle *area); static void psclipmask (GtkPlotPC *pc, gdouble x, gdouble y, const GdkBitmap *mask); static void psdrawlines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints); static void psdrawpoint (GtkPlotPC *pc, gdouble x, gdouble y); static void psdrawline (GtkPlotPC *pc, gdouble x0, gdouble y0, gdouble xf, gdouble yf); static void psdrawpolygon (GtkPlotPC *pc, gboolean filled, GtkPlotPoint *points, gint numpoints); static void psdrawrectangle (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); static void psdrawcircle (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble size); static void psdrawellipse (GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height); static void pssetcolor (GtkPlotPC *pc, const GdkColor *color); static void pssetlineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); static void psdrawstring (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text); static void pssetfont (GtkPlotPC *pc, GtkPSFont *psfont, gint height); static void pssetdash (GtkPlotPC *pc, gdouble offset, gdouble *values, gint num_values); static void psdrawpixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble sx, gdouble sy); static void ps_reencode_font (FILE *file, char *fontname); static void color_to_hex (GdkColor color, gchar string[7]); /*********************************************************************/ static GtkPlotPCClass *parent_class = NULL; static gchar *locale = NULL; GType gtk_plot_ps_get_type (void) { static GType pc_type = 0; if (!pc_type) { pc_type = g_type_register_static_simple ( GTK_TYPE_PLOT_PC, "GtkPlotPS", sizeof (GtkPlotPSClass), (GClassInitFunc) gtk_plot_ps_class_init, sizeof (GtkPlotPS), (GInstanceInitFunc) gtk_plot_ps_init, 0); } return pc_type; } static void gtk_plot_ps_init (GtkPlotPS *ps) { ps->psname = NULL; ps->gsaved = FALSE; GTK_PLOT_PC(ps)->use_pixmap = FALSE; } static void gtk_plot_ps_class_init (GtkPlotPSClass *klass) { GtkObjectClass *object_class; GObjectClass *gobject_class; GtkPlotPCClass *pc_class; parent_class = g_type_class_ref (gtk_plot_pc_get_type ()); object_class = (GtkObjectClass *) klass; gobject_class = (GObjectClass *) klass; pc_class = (GtkPlotPCClass *) klass; pc_class->init = psinit; pc_class->leave = psleave; pc_class->set_viewport = pssetviewport; pc_class->gsave = psgsave; pc_class->grestore = psgrestore; pc_class->clip = psclip; pc_class->clip_mask = psclipmask; pc_class->set_color = pssetcolor; pc_class->set_dash = pssetdash; pc_class->set_lineattr = pssetlineattr; pc_class->draw_point = psdrawpoint; pc_class->draw_line = psdrawline; pc_class->draw_lines = psdrawlines; pc_class->draw_rectangle = psdrawrectangle; pc_class->draw_polygon = psdrawpolygon; pc_class->draw_circle = psdrawcircle; pc_class->draw_ellipse = psdrawellipse; pc_class->set_font = pssetfont; pc_class->draw_string = psdrawstring; pc_class->draw_pixmap = psdrawpixmap; object_class->destroy = gtk_plot_ps_destroy; } static void gtk_plot_ps_destroy(GtkObject *object) { GtkPlotPS *ps; ps = GTK_PLOT_PS(object); if(ps->psname){ g_free(ps->psname); ps->psname = NULL; } } /** * gtk_plot_ps_new: * @psname: * @orientation: * @epsflag: * @page_size: * @scalex: * @scaley: * * * * Return value: a new GtkObject. */ GtkObject * gtk_plot_ps_new (const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley) { GtkObject *object; GtkPlotPS *ps; object = g_object_new(gtk_plot_ps_get_type(), NULL); ps = GTK_PLOT_PS(object); gtk_plot_ps_construct(ps, psname, orientation, epsflag, page_size, scalex, scaley); return (object); } /** * gtk_plot_ps_construct: * @ps: a #GtkPlotPS * @orientation: * @epsflag: * @page_size: * @scalex: * @scaley: * * */ void gtk_plot_ps_construct (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint page_size, gdouble scalex, gdouble scaley) { gint width, height; ps->psname = g_strdup(psname); ps->orientation = orientation; ps->epsflag = epsflag; ps->page_size = page_size; ps->scalex = scalex; ps->scaley = scaley; switch (page_size){ case GTK_PLOT_LEGAL: width = GTK_PLOT_LEGAL_W; height = GTK_PLOT_LEGAL_H; break; case GTK_PLOT_A4: width = GTK_PLOT_A4_W; height = GTK_PLOT_A4_H; break; case GTK_PLOT_EXECUTIVE: width = GTK_PLOT_EXECUTIVE_W; height = GTK_PLOT_EXECUTIVE_H; break; case GTK_PLOT_LETTER: default: width = GTK_PLOT_LETTER_W; height = GTK_PLOT_LETTER_H; } gtk_plot_ps_set_size(ps, GTK_PLOT_PSPOINTS, width, height); } /** * gtk_plot_ps_new_with_size: * @psname: * @orientation: * @epsflag: * @units: * @width: * @height: * @scalex: * @scaley: * * * * Return value: a new GtkObject. */ GtkObject * gtk_plot_ps_new_with_size (const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley) { GtkObject *object; GtkPlotPS *ps; object = g_object_new(gtk_plot_ps_get_type(), NULL); ps = GTK_PLOT_PS(object); gtk_plot_ps_construct_with_size (ps, psname, orientation, epsflag, units, width, height, scalex, scaley); return object; } /** * gtk_plot_ps_construct_with_size: * @ps: a #GtkPlotPS * @psname: * @orientation: * @epsflag: * @units: * @width: * @height: * @scalex: * @scaley: * * */ void gtk_plot_ps_construct_with_size (GtkPlotPS *ps, const gchar *psname, gint orientation, gint epsflag, gint units, gdouble width, gdouble height, gdouble scalex, gdouble scaley) { gtk_plot_ps_construct(ps, psname, orientation, epsflag, GTK_PLOT_CUSTOM, scalex, scaley); gtk_plot_ps_set_size(ps, units, width, height); } /** * gtk_plot_ps_set_size: * @ps: a #GtkPlotPS * @units: * @width: * @height: * * */ void gtk_plot_ps_set_size (GtkPlotPS *ps, gint units, gdouble width, gdouble height) { ps->units = units; ps->width = width; ps->height = height; switch(units){ case GTK_PLOT_MM: ps->page_width = (gdouble)width * 2.835; ps->page_height = (gdouble)height * 2.835; break; case GTK_PLOT_CM: ps->page_width = width * 28.35; ps->page_height = height * 28.35; break; case GTK_PLOT_INCHES: ps->page_width = width * 72; ps->page_height = height * 72; break; case GTK_PLOT_PSPOINTS: default: ps->page_width = width; ps->page_height = height; } if(ps->orientation == GTK_PLOT_PORTRAIT) gtk_plot_pc_set_viewport(GTK_PLOT_PC(ps), ps->page_width, ps->page_height); else gtk_plot_pc_set_viewport(GTK_PLOT_PC(ps), ps->page_height, ps->page_width); } /** * gtk_plot_ps_set_scale: * @ps: a #GtkPlotPS * @scalex: * @scaley: * * */ void gtk_plot_ps_set_scale (GtkPlotPS *ps, gdouble scalex, gdouble scaley) { ps->scalex = scalex; ps->scaley = scaley; } static void pssetviewport (GtkPlotPC *pc, gdouble w, gdouble h) { } static void pssetlineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style) { FILE *psout = GTK_PLOT_PS(pc)->psfile; fprintf(psout, "%g slw\n", line_width); fprintf(psout, "%d slc\n", abs(cap_style - 1)); fprintf(psout, "%d slj\n", join_style); if(line_style == 0) fprintf(psout,"[] 0 sd\n"); /* solid line */ } static void pssetdash(GtkPlotPC *pc, gdouble offset, gdouble *values, gint num_values) { FILE *psout = GTK_PLOT_PS(pc)->psfile; switch(num_values){ case 0: fprintf(psout,"[] 0 sd\n"); break; case 2: fprintf(psout, "[%g %g] %g sd\n", values[0], values[1], offset); break; case 4: fprintf(psout, "[%g %g %g %g] %g sd\n", values[0], values[1], values[2], values[3], offset); break; case 6: fprintf(psout, "[%g %g %g %g %g %g] %g sd\n", values[0], values[1], values[2], values[3], values[4], values[5], offset); break; default: break; } } static void psleave(GtkPlotPC *pc) { fprintf(GTK_PLOT_PS(pc)->psfile, "showpage\n"); fprintf(GTK_PLOT_PS(pc)->psfile, "%%%%Trailer\n"); fprintf(GTK_PLOT_PS(pc)->psfile, "%%%%EOF\n"); fclose(GTK_PLOT_PS(pc)->psfile); setlocale(LC_NUMERIC, locale); g_free(locale); } static gboolean psinit (GtkPlotPC *pc) { time_t now; FILE *psout; GtkPlotPS *ps; now = time(NULL); locale = g_strdup(setlocale(LC_NUMERIC, NULL)); setlocale(LC_NUMERIC, "C"); ps = GTK_PLOT_PS(pc); psout = ps->psfile; if ((psout = fopen(ps->psname, "w")) == NULL){ g_warning("ERROR: Cannot open file: %s", ps->psname); return FALSE; } ps->psfile = psout; if(ps->epsflag) fprintf (psout, "%%!PS-Adobe-2.0 PCF-2.0\n"); else fprintf (psout, "%%!PS-Adobe-2.0\n"); fprintf (psout, "%%%%Title: %s\n" "%%%%Creator: %s v%s Copyright (c) 1999 Adrian E. Feiguin\n" "%%%%CreationDate: %s" "%%%%Magnification: 1.0000\n", ps->psname, "GtkPlot", "3.x", ctime (&now)); if(ps->orientation == GTK_PLOT_PORTRAIT) fprintf(psout,"%%%%Orientation: Portrait\n"); else fprintf(psout,"%%%%Orientation: Landscape\n"); /* if(ps->epsflag) */ fprintf (psout, "%%%%BoundingBox: 0 0 %d %d\n" "%%%%Pages: 1\n" "%%%%EndComments\n", ps->page_width, ps->page_height); fprintf (psout, "/cp {closepath} bind def\n" "/c {curveto} bind def\n" "/f {fill} bind def\n" "/a {arc} bind def\n" "/ef {eofill} bind def\n" "/ex {exch} bind def\n" "/gr {grestore} bind def\n" "/gs {gsave} bind def\n" "/sa {save} bind def\n" "/rs {restore} bind def\n" "/l {lineto} bind def\n" "/m {moveto} bind def\n" "/rm {rmoveto} bind def\n" "/n {newpath} bind def\n" "/s {stroke} bind def\n" "/sh {show} bind def\n" "/slc {setlinecap} bind def\n" "/slj {setlinejoin} bind def\n" "/slw {setlinewidth} bind def\n" "/srgb {setrgbcolor} bind def\n" "/rot {rotate} bind def\n" "/sc {scale} bind def\n" "/sd {setdash} bind def\n" "/ff {findfont} bind def\n" "/sf {setfont} bind def\n" "/scf {scalefont} bind def\n" "/sw {stringwidth pop} bind def\n" "/tr {translate} bind def\n" "/JR {\n" " neg 0\n" " rmoveto\n" "} bind def\n" "/JC {\n" " 2 div neg 0\n" " rmoveto\n" "} bind def\n" "\n/ellipsedict 8 dict def\n" "ellipsedict /mtrx matrix put\n" "/ellipse\n" "{ ellipsedict begin\n" " /endangle exch def\n" " /startangle exch def\n" " /yrad exch def\n" " /xrad exch def\n" " /y exch def\n" " /x exch def" " /savematrix mtrx currentmatrix def\n" " x y tr xrad yrad sc\n" " 0 0 1 startangle endangle arc\n" " savematrix setmatrix\n" " end\n" "} def\n\n" ); fprintf(psout, "[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" "/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright\n" "/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one\n" "/two /three /four /five /six /seven /eight /nine /colon /semicolon\n" "/less /equal /greater /question /at /A /B /C /D /E\n" "/F /G /H /I /J /K /L /M /N /O\n" "/P /Q /R /S /T /U /V /W /X /Y\n" "/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c\n" "/d /e /f /g /h /i /j /k /l /m\n" "/n /o /p /q /r /s /t /u /v /w\n" "/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef\n" "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" "/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n" "/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright\n" "/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior\n" "/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf\n" "/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla\n" "/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde\n" "/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex\n" "/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring\n" "/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis\n" "/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave\n" "/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def\n"); ps_reencode_font(psout, "Times-Roman"); ps_reencode_font(psout, "Times-Italic"); ps_reencode_font(psout, "Times-Bold"); ps_reencode_font(psout, "Times-BoldItalic"); ps_reencode_font(psout, "AvantGarde-Book"); ps_reencode_font(psout, "AvantGarde-BookOblique"); ps_reencode_font(psout, "AvantGarde-Demi"); ps_reencode_font(psout, "AvantGarde-DemiOblique"); ps_reencode_font(psout, "Bookman-Light"); ps_reencode_font(psout, "Bookman-LightItalic"); ps_reencode_font(psout, "Bookman-Demi"); ps_reencode_font(psout, "Bookman-DemiItalic"); ps_reencode_font(psout, "Courier"); ps_reencode_font(psout, "Courier-Oblique"); ps_reencode_font(psout, "Courier-Bold"); ps_reencode_font(psout, "Courier-BoldOblique"); ps_reencode_font(psout, "Helvetica"); ps_reencode_font(psout, "Helvetica-Oblique"); ps_reencode_font(psout, "Helvetica-Bold"); ps_reencode_font(psout, "Helvetica-BoldOblique"); ps_reencode_font(psout, "Helvetica-Narrow"); ps_reencode_font(psout, "Helvetica-Narrow-Oblique"); ps_reencode_font(psout, "Helvetica-Narrow-Bold"); ps_reencode_font(psout, "Helvetica-Narrow-BoldOblique"); ps_reencode_font(psout, "NewCenturySchoolbook-Roman"); ps_reencode_font(psout, "NewCenturySchoolbook-Italic"); ps_reencode_font(psout, "NewCenturySchoolbook-Bold"); ps_reencode_font(psout, "NewCenturySchoolbook-BoldItalic"); ps_reencode_font(psout, "Palatino-Roman"); ps_reencode_font(psout, "Palatino-Italic"); ps_reencode_font(psout, "Palatino-Bold"); ps_reencode_font(psout, "Palatino-BoldItalic"); ps_reencode_font(psout, "Symbol"); ps_reencode_font(psout, "ZapfChancery-MediumItalic"); ps_reencode_font(psout, "ZapfDingbats"); fprintf(psout,"%%%%EndProlog\n%%%%BeginSetup\n" "%%%%PageBoundingBox: 0 0 %d %d\n" "%%%%PageOrientation: %s\n" "%%%%PaperSize: %d %d\n", ps->page_width, ps->page_height, (ps->orientation == GTK_PLOT_PORTRAIT) ? "Portrait":"Landscape", ps->page_width, ps->page_height); if(ps->orientation == GTK_PLOT_PORTRAIT) fprintf(psout, "%g %g scale\n", ps->scalex, ps->scaley); if(ps->orientation == GTK_PLOT_LANDSCAPE) fprintf(psout, "%g %g scale\n" "90 rotate \n" "0 %d translate\n", ps->scalex, ps->scaley, -ps->page_height); fprintf(psout,"%%%%EndSetup\n\n\n"); return TRUE; } static void ps_reencode_font(FILE *file, char *fontname) { /* Don't reencode the Symbol font, as it doesn't work in latin1 encoding. * Instead, just define Symbol-latin1 to be the same as Symbol. */ if (!strcmp(fontname, "Symbol")) fprintf(file, "/%s-latin1\n" " /%s findfont\n" "definefont pop\n", fontname, fontname); else fprintf(file, "/%s-latin1\n" " /%s findfont\n" " dup length dict begin\n" " {1 index /FID ne {def} {pop pop} ifelse} forall\n" " /Encoding isolatin1encoding def\n" " currentdict end\n" "definefont pop\n", fontname, fontname); } static void pssetcolor(GtkPlotPC *pc, const GdkColor *color) { FILE *psout = GTK_PLOT_PS(pc)->psfile; fprintf(psout, "%g %g %g setrgbcolor\n", (gdouble) color->red / 65535.0, (gdouble) color->green / 65535.0, (gdouble) color->blue / 65535.0); } static void psdrawpoint(GtkPlotPC *pc, gdouble x, gdouble y) { FILE *psout = GTK_PLOT_PS(pc)->psfile; y = GTK_PLOT_PS(pc)->page_height - y; fprintf(psout, "n\n"); fprintf(psout, "%g %g m\n", x, y); fprintf(psout, "%g %g l\n", x, y); fprintf(psout, "s\n"); } static void psdrawlines(GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints) { gint i, page_height = GTK_PLOT_PS(pc)->page_height; FILE *psout = GTK_PLOT_PS(pc)->psfile; fprintf(psout,"n\n"); fprintf(psout,"%g %g m\n", points[0].x, page_height - points[0].y); for(i = 1; i < numpoints; i++) fprintf(psout,"%g %g l\n", points[i].x, page_height - points[i].y); fprintf(psout,"s\n"); } static void psdrawpolygon(GtkPlotPC *pc, gboolean filled, GtkPlotPoint *points, gint numpoints) { gint i, page_height = GTK_PLOT_PS(pc)->page_height; FILE *psout = GTK_PLOT_PS(pc)->psfile; fprintf(psout,"n\n"); fprintf(psout,"%g %g m\n", points[0].x, page_height - points[0].y); for(i = 1; i < numpoints; i++) fprintf(psout,"%g %g l\n", points[i].x, page_height - points[i].y); if(filled) fprintf(psout,"f\n"); else fprintf(psout,"cp\n"); fprintf(psout,"s\n"); } static void psdrawline(GtkPlotPC *pc, gdouble x0, gdouble y0, gdouble xf, gdouble yf) { FILE *psout = GTK_PLOT_PS(pc)->psfile; fprintf(psout, "%g %g m\n", x0, GTK_PLOT_PS(pc)->page_height - y0); fprintf(psout, "%g %g l\n", xf, GTK_PLOT_PS(pc)->page_height - yf); fprintf(psout, "s\n"); } static void psdrawrectangle(GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height) { GtkPlotPoint point[4]; point[0].x = x; point[0].y = y; point[1].x = x + width; point[1].y = y; point[2].x = x + width; point[2].y = y + height; point[3].x = x; point[3].y = y + height; psdrawpolygon(pc, filled, point, 4); } static void psdrawcircle(GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble size) { FILE *psout = GTK_PLOT_PS(pc)->psfile; y = GTK_PLOT_PS(pc)->page_height - y; fprintf(psout,"n %g %g %g %g 0 360 ellipse\n", x, y, size / 2., size / 2.); if(filled) fprintf(psout,"f\n"); fprintf(psout,"s\n"); } static void psdrawellipse(GtkPlotPC *pc, gboolean filled, gdouble x, gdouble y, gdouble width, gdouble height) { FILE *psout = GTK_PLOT_PS(pc)->psfile; y = GTK_PLOT_PS(pc)->page_height - y; fprintf(psout,"n %g %g %g %g 0 360 ellipse\n", x+width/2., y-height/2., width/2., height/2.); if(filled) fprintf(psout,"f\n"); fprintf(psout,"s\n"); } static void psoutputstring (GtkPlotPC *pc, GtkPSFont *psfont, GtkPSFont *latin_psfont, gint height, const gchar *wstring, const gchar *addstring) { const gchar *p; gint curcode = 0; gchar begin[] = { 0, '(', '<' }; gchar end[] = { 0, ')', '>' }; GtkPSFont *fonts[3]; FILE *out = GTK_PLOT_PS(pc)->psfile; const gchar *c = NULL; fonts[0] = NULL; fonts[1] = latin_psfont; fonts[2] = psfont; p = wstring; if (psfont->i18n_latinfamily) { gint code; /* 0..neither 1..latin 2..i18n */ gchar wcs[2]; while (*p) { code = (*p >= 0 && *p <= 0x7f) ? 1 : 2; if (curcode && curcode != code) fprintf(out, "%c %s\n", end[curcode], addstring); if (curcode != code) { pssetfont(pc, fonts[code], height); fputc(begin[code], out); } curcode = code; wcs[0] = *p++; wcs[1] = 0; c = wcs; if (code == 2) { while (*c) fprintf(out, "%02x", (unsigned char)(*c++)); } else { if (*c == '(' || *c == ')') fputc('\\', out); fputc(*c, out); } } } else { c = wstring; pssetfont(pc, psfont, height); fputc(begin[1], out); curcode = 1; while (*c) { const gchar *aux2 = c; if (*c == '(' || *c == ')') fputc('\\', out); if(++aux2 != g_utf8_next_char(c)){ fprintf(out, ") show <%02x> show (", (unsigned char)(*++c)); c++; } else { fputc(*c, out); c = g_utf8_next_char(c); } } } if (curcode) fprintf(out, "%c %s\n", end[curcode], addstring); } static void psdrawstring (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint font_height, GtkJustification justification, const gchar *text) { gchar *currfont; const gchar *c; GtkPSFont *psfont, *base_psfont, *latin_psfont = NULL; gint curcnt = 0, offset = 0; gint numf; gdouble scale; gboolean italic, bold; gboolean special = FALSE; GList *family; FILE *psout; gint twidth, theight, tdescent, tascent; gint tx, ty, width, height; gint i; const gchar *aux, *xaux, *wtext, *lastchar = NULL; gchar *curstr, bkspchar[3]; gchar num[4]; if (text == NULL || strlen(text) == 0) return; psout = GTK_PLOT_PS(pc)->psfile; gtk_psfont_get_families(&family, &numf); base_psfont = psfont = gtk_psfont_get_by_name(font); italic = psfont->italic; bold = psfont->bold; currfont = psfont->psname; if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); } gtk_plot_text_get_area(text, angle, justification, font, font_height, &tx, &ty, &width, &height); tx += x; ty += y; if(!transparent){ pssetcolor(pc, bg); gtk_plot_pc_draw_rectangle(pc, TRUE, tx - border_space, ty - border_space, width + 2*border_space, height + 2*border_space); } /* border */ pssetcolor(pc, fg); pssetdash(pc, 0, NULL, 0); pssetlineattr(pc, border_width, 0, 0, 0); switch(border){ case GTK_PLOT_BORDER_SHADOW: psdrawrectangle(pc, TRUE, tx - border_space + shadow_width, ty + height + border_space, width + 2 * border_space, shadow_width); psdrawrectangle(pc, TRUE, tx + width + border_space, ty - border_space + shadow_width, shadow_width, height + 2 * border_space); case GTK_PLOT_BORDER_LINE: psdrawrectangle(pc, FALSE, tx - border_space, ty - border_space, width + 2*border_space, height + 2*border_space); case GTK_PLOT_BORDER_NONE: default: break; } gtk_plot_text_get_size(text, angle, psfont->psname, font_height, &twidth, &theight, &tascent, &tdescent); psgsave(pc); fprintf(psout, "%d %d translate\n", x, GTK_PLOT_PS(pc)->page_height - y); fprintf(psout, "%d rotate\n", angle); fprintf(psout, "0 0 m\n"); if (psfont->i18n_latinfamily) special = TRUE; c = text; while(c && *c != '\0' && *c != '\n') { if(*c == '\\'){ c = g_utf8_next_char(c); switch(*c){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '9': case '8': case'g': case 'B': case 'b': case 'x': case 'N': case 's': case 'S': case 'i': case '-': case '+': case '^': special = TRUE; break; default: break; } } else { c = g_utf8_next_char(c); } } if(special){ switch (justification) { case GTK_JUSTIFY_LEFT: break; case GTK_JUSTIFY_RIGHT: if(angle == 0 || angle == 180) fprintf(psout, "%d JR\n", twidth); else fprintf(psout, "%d JR\n", theight); break; case GTK_JUSTIFY_CENTER: default: if(angle == 0 || angle == 180) fprintf(psout, "%d JC\n", twidth); else fprintf(psout, "%d JC\n", theight); break; } } else { pssetfont(pc, psfont, font_height); switch (justification) { case GTK_JUSTIFY_LEFT: break; case GTK_JUSTIFY_RIGHT: fprintf(psout, "(%s) sw JR\n", text); break; case GTK_JUSTIFY_CENTER: default: fprintf(psout, "(%s) sw JC\n", text); break; } fprintf(psout, "(%s) show\n", text); psgrestore(pc); fprintf(psout, "n\n"); return; } i = g_utf8_strlen(text, -1) + 2; curstr = g_malloc0(sizeof(gchar) * i); aux = wtext = text; scale = font_height; curcnt = 0; while(aux && *aux != '\0' && *aux != '\n') { if(*aux == '\\'){ aux = g_utf8_next_char(aux); switch(*aux){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '9': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; psfont = gtk_psfont_get_by_family((gchar *)g_list_nth_data(family, *aux-'0'), italic, bold); aux = g_utf8_next_char(aux); break; case '8':case 'g': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; psfont = gtk_psfont_get_by_family("Symbol", italic, bold); aux = g_utf8_next_char(aux); break; case 'B': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; bold = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); if (psfont->i18n_latinfamily) latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); aux = g_utf8_next_char(aux); break; case 'x': xaux = aux + 1; for (i=0; i<3; i++){ if (xaux[i] >= '0' && xaux[i] <= '9') num[i] = xaux[i]; else break; } if (i < 3){ aux = g_utf8_next_char(aux); break; } num[3] = '\0'; i = atoi(num); g_snprintf(num, 4, "%o", i % (64 * 8)); curstr[curcnt++] = '\\'; i = 0; while (num[i]) { curstr[curcnt++] = num[i++]; } aux += 4; break; case 'i': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; italic = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); if (psfont->i18n_latinfamily) latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); aux = g_utf8_next_char(aux); break; case 's':case '_': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; scale = 0.6 * font_height; offset -= (gint)scale / 2; fprintf(psout, "0 %d rmoveto\n", -((gint)scale / 2)); aux = g_utf8_next_char(aux); break; case 'S':case '^': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; scale = 0.6 * font_height; offset += 0.5*font_height; fprintf(psout, "0 %d rmoveto\n", (gint)(0.5*font_height)); aux = g_utf8_next_char(aux); break; case 'N': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; psfont = base_psfont; italic = psfont->italic; bold = psfont->bold; if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); } scale = font_height; fprintf(psout, "0 %d rmoveto\n", -offset); offset = 0; aux = g_utf8_next_char(aux); break; case 'b': curstr[curcnt] = '\0'; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; if (lastchar) { const gchar *aux2 = lastchar; bkspchar[0] = *lastchar; lastchar = g_utf8_prev_char(lastchar); bkspchar[1] = 0; if(--aux2 != lastchar){ bkspchar[1] = *lastchar; lastchar = g_utf8_prev_char(lastchar); bkspchar[2] = 0; } } else { bkspchar[0] = 'X'; lastchar = NULL; } psoutputstring(pc, psfont, latin_psfont, (gint)scale, bkspchar, "stringwidth pop 0 exch neg exch rmoveto"); aux = g_utf8_next_char(aux); break; case '-': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; scale -= 3; if (scale < 6) { scale = 6; } aux = g_utf8_next_char(aux); break; case '+': curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); curcnt = 0; scale += 3; aux = g_utf8_next_char(aux); break; default: if(aux && *aux != '\0' && *aux != '\n'){ curstr[curcnt++] = *aux; aux = g_utf8_next_char(aux); } break; } } else { if(aux && *aux != '\0' && *aux != '\n'){ const gchar *aux2 = aux; if(g_utf8_next_char(aux) != ++aux2){ curstr[curcnt++] = *aux++; // aux = g_utf8_next_char(aux); curstr[curcnt++] = *aux++; } else { curstr[curcnt++] = *aux; lastchar = aux; aux = g_utf8_next_char(aux); } } } } curstr[curcnt] = 0; psoutputstring(pc, psfont, latin_psfont, (gint)scale, curstr, "show"); psgrestore(pc); fprintf(psout, "n\n"); g_free(curstr); } static void pssetfont(GtkPlotPC *pc, GtkPSFont *psfont, gint height) { FILE *psout = GTK_PLOT_PS(pc)->psfile; if (psfont->i18n_latinfamily && psfont->vertical) fprintf(psout, "/%s ff [0 1 -1 0 0 0.3] makefont [%d 0 0 %d 0 0] makefont sf\n", psfont->psname, height, height); else fprintf(psout, "/%s-latin1 ff %g scf sf\n", psfont->psname, (double)height); } static void psgsave(GtkPlotPC *pc) { GtkPlotPS *ps; FILE *psout; ps = GTK_PLOT_PS(pc); psout = ps->psfile; fprintf(psout,"gsave\n"); ps->gsaved = TRUE; } static void psgrestore(GtkPlotPC *pc) { GtkPlotPS *ps; FILE *psout; ps = GTK_PLOT_PS(pc); psout = ps->psfile; /* if(!ps->gsaved) return; */ fprintf(psout,"grestore\n"); ps->gsaved = FALSE; } static void psclipmask(GtkPlotPC *pc, gdouble x, gdouble y, const GdkBitmap *mask) { FILE *psout = GTK_PLOT_PS(pc)->psfile; gint width, height; gint px, py; gint npoints = 0; gint i, page_height = GTK_PLOT_PS(pc)->page_height; GtkPlotVector *points; GdkImage *image; if(!mask){ fprintf(psout,"grestore\n"); return; } gdk_window_get_size((GdkWindow *)mask, &width, &height); image = gdk_image_get((GdkWindow *)mask, 0, 0, width, height); points = (GtkPlotVector *)g_malloc(width*height*sizeof(GtkPlotVector)); for(px = 0; px < width; px++){ for(py = 0; py < height; py++){ if(gdk_image_get_pixel(image, px, py)){ points[npoints].x = px; points[npoints].y = py; npoints++; break; } } } for(py = points[npoints-1].y; py < height; py++){ for(px = width - 1; px >= 0; px--){ if(gdk_image_get_pixel(image, px, py)){ points[npoints].x = px; points[npoints].y = py; npoints++; break; } } } for(px = points[npoints-1].x; px >= 0; px--){ for(py = height - 1; py >= 0; py--){ if(gdk_image_get_pixel(image, px, py)){ points[npoints].x = px; points[npoints].y = py; npoints++; break; } } } for(py = points[npoints-1].y; py >= 0; py--){ for(px = 0; px < width; px++){ if(gdk_image_get_pixel(image, px, py)){ points[npoints].x = px; points[npoints].y = py; npoints++; break; } } } fprintf(psout,"gsave\n"); fprintf(psout,"n\n"); fprintf(psout,"%g %g m\n", x + points[0].x, page_height - y - points[0].y); for(i = 1; i < npoints; i++) fprintf(psout,"%g %g l\n", x + points[i].x, page_height - y - points[i].y); fprintf(psout,"cp\n"); fprintf(psout,"clip\n"); g_free(points); gdk_image_destroy(image); } static void psclip(GtkPlotPC *pc, const GdkRectangle *clip) { FILE *psout = GTK_PLOT_PS(pc)->psfile; if(!clip){ fprintf(psout,"grestore\n"); return; } fprintf(psout,"gsave\n"); fprintf(psout,"%d %d %d %d rectclip\n", clip->x, GTK_PLOT_PS(pc)->page_height - clip->y - clip->height, clip->width, clip->height); } /* TODO: FIXME */ static void psdrawpixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y) { FILE *psout = GTK_PLOT_PS(pc)->psfile; GdkColormap *colormap; colormap = gdk_colormap_get_system (); fprintf(psout, "gsave\n"); if(pixmap){ GdkImage *image; gint x, y; image = gdk_image_get(pixmap, xsrc, ysrc, width, height); if(mask) gtk_plot_pc_clip_mask(pc, xdest, ydest, mask); ydest = GTK_PLOT_PS(pc)->page_height - ydest - height * scale_y; fprintf(psout, "%d %g translate\n", xdest, ydest + height * scale_y); fprintf(psout, "%g %g scale\n",width * scale_x, height * scale_y); fprintf(psout, "%d %d 8 [%d 0 0 %d 0 %d]\n",width, height, width, height, height); fprintf(psout, "/scanline %d 3 mul string def\n", width); fprintf(psout, "{ currentfile scanline readhexstring pop } false 3\n"); fprintf(psout, "colorimage\n"); for(y = height - 1; y >= 0; y--){ for(x = 0; x < width; x++){ GdkColor color; gchar string[7]; color.pixel = gdk_image_get_pixel(image, x, y); gdk_colormap_query_color(colormap, color.pixel, &color); color_to_hex(color, string); fprintf(psout,"%s",string); if(fmod(x + 1, 13) == 0) fprintf(psout, "\n"); } fprintf(psout,"\n"); } gdk_image_destroy(image); if(mask) gtk_plot_pc_clip_mask(pc, xdest, ydest, NULL); } fprintf(psout, "grestore\n"); } static void color_to_hex(GdkColor color, gchar string[7]) { gint n; gint aux; aux = color.red / 256; n=aux/16; aux-=n*16; if(n < 10) string[0]='0'+n; else string[0]='A'+n-10; n = aux; if(n < 10) string[1]='0'+n; else string[1]='A'+n-10; aux = color.green / 256; n=aux/16; aux-=n*16; if(n < 10) string[2]='0'+n; else string[2]='A'+n-10; n = aux; if(n < 10) string[3]='0'+n; else string[3]='A'+n-10; aux = color.blue / 256; n=aux/16; aux-=n*16; if(n < 10) string[4]='0'+n; else string[4]='A'+n-10; n = aux; if(n < 10) string[5]='0'+n; else string[5]='A'+n-10; string[6]='\0'; } gtkextra-3.2.0/gtkextra/pixmaps.h0000644000076400001440000001420612603754176013767 00000000000000/* XPM */ static char * bullet_xpm[] = { "16 16 26 1", " c #None", ". c #000000000000", "X c #0000E38D0000", "o c #0000EBAD0000", "O c #0000F7DE0000", "+ c #0000FFFF0000", "@ c #0000CF3C0000", "# c #0000D75C0000", "$ c #0000B6DA0000", "% c #0000C30B0000", "& c #0000A2890000", "* c #00009A690000", "= c #0000AEBA0000", "- c #00008E380000", "; c #000086170000", ": c #000079E70000", "> c #000071C60000", ", c #000065950000", "< c #000059650000", "1 c #000051440000", "2 c #000045140000", "3 c #00003CF30000", "4 c #000030C20000", "5 c #000028A20000", "6 c #00001C710000", "7 c #000014510000", " ...... ", " .XooO++. ", " ..@@@#XoO+.. ", " .$$$$$%@#XO++. ", " .&&*&&=$%@XO+. ", ".*-;;;-*&=%@XO+.", ".;:>>>:;-&=%#o+.", ".>,<<<,>:-&$@XO.", ".<12321<>;*=%#o.", ".1345431,:-&$@o.", ".2467642<>;&$@X.", " .57.753<>;*$@. ", " .467642<>;&$@. ", " ..5431,:-&.. ", " .21<>;*. ", " ...... "}; /* XPM */ static char *center_just [] = { "28 26 2 1", ". c #None", "X c #000000000000", " ", " ", " ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXX ", " XXXXXXXXXXXX ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXX ", " XXXXXXXXXXXX ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXX ", " XXXXXXXXXXXX ", " ", " ", " ", " ", " ", }; /* XPM */ static char * font[] = { "26 26 3 1", " c #None", ". c #000000000000", "X c #000000000000", " ", " ", " ", " . ", " ... ", " ... ", " ..... ", " ..... ", " .. .... ", " .. .... ", " .. .... ", " ......... ", " ........... ", " .. .... ", " .. .... ", " .. .... ", " ..... ....... ", " ", " ", " ", " XXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXX ", " ", " ", " "}; /* XPM */ static char *left_just [] = { "28 26 2 1", ". c #None", "X c #000000000000", " ", " ", " ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXX ", " XXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXX ", " XXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXX ", " XXXXXXXXXXXXX ", " ", " ", " ", " ", " ", }; /* XPM */ static char *paint [] = { "26 26 6 1", ". c #None", "a c #000000000000", "e c #929292929292", "g c #DBDBDBDBDBDB", "h c #FFFFFFFFFFFF", "X c #FFFFFFFFFFFF", "..........................", "...........ee.............", "..........eeee............", ".........eeggee...........", ".........eegaee...........", ".........eeahee...........", ".........aahheeaa.........", ".........ahhgeegaaa.......", "........ahhghaeggaaa......", ".......ahhghagaggeaaa.....", "......ahhghggaggeeaaae....", ".....ahhghgggggeeaaaae....", ".....ahghgggggeeaeaaae....", "......ahgggggeeaeeaaae....", ".......ahgggeeaee.aaae....", "........aggeeaee..aaee....", ".........aeeaee...aee.....", "..........aaee.....e......", "...........ee.............", "..........................", "....XXXXXXXXXXXXXXXXXX....", "....XXXXXXXXXXXXXXXXXX....", "....XXXXXXXXXXXXXXXXXX....", "....XXXXXXXXXXXXXXXXXX....", "..........................", "..........................", }; /* XPM */ static char *right_just [] = { "28 26 2 1", ". c #None", "X c #000000000000", " ", " ", " ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXX ", " XXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXX ", " XXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXXXX ", " ", " XXXXXXXXXXXXX ", " XXXXXXXXXXXXX ", " ", " ", " ", " ", " ", }; /* XPM */ static char * smile_xpm[] = { "16 16 3 1", " c #None", ". c #000000000000", "X c #FFFFFFFF0000", " ...... ", " .XXXXXX. ", " ..XXXXXXXX.. ", " .XXXXXXXXXXXX. ", " .XXX..XX..XXX. ", ".XXXX..XX..XXXX.", ".XXXX..XX..XXXX.", ".XXXXXXXXXXXXXX.", ".XX..XXXXXX..XX.", ".XX..XXXXXX..XX.", ".XXX.XXXXXX.XXX.", " .XXX.XXXX.XXX. ", " .XXXX....XXXX. ", " ..XXXXXXXX.. ", " .XXXXXX. ", " ...... "}; gtkextra-3.2.0/gtkextra/gtkdatatextview.c0000644000076400001440000003532412603754176015524 00000000000000/* gtkdatatextview - data textview widget, based on GtkTextView * Copyright 2011 Fredy Paquet * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #define __GTKEXTRA_H_INSIDE__ #include "gtkextra-compat.h" #include "gtkdatatextview.h" #include "gtkdataformat.h" /** * SECTION: gtkdatatextview * @short_description: a data textview widget, based on * GtkTextView * * GtkDataTextView provides additional properties: * * - #GtkDataTextView:description - no functionality, a place for * private information that cannot be put anywhere else * * - #GtkDataTextView:max-length - set the maximum character * length for the contents of the widget. * * - #GtkDataTextView:max-length-bytes - set the maximum byte * length for the contents of the widget. * * The main reason for this widget is to provide a length limit * for text contents, required by SQL database systems. There * is always a limit, no matter what you do. * * Some database systems may handle character length of UTF-8 * strings correctly, others may not. Choose the appropriate * limit for your system, characters or bytes. * * Note that setting a byte length limit > 0 on a datatextview * may slow down text insertions. The byte length limit is * imposed upon gtk_text_buffer_get_text() including invisible * content. See gtk_text_buffer_get_text() for details. * * Since: 3.0.6 */ #undef GTK_DATA_TEXT_VIEW_DEBUG #ifdef DEBUG #define GTK_DATA_TEXT_VIEW_DEBUG 0 /* define to activate debug output */ #endif #if GTK_DATA_TEXT_VIEW_DEBUG #define GTK_DATA_TEXT_VIEW_DEBUG_SIGNAL 0 /* debug signal handlers */ #endif #define GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE (G_MAXINT / 2) #define GTK_DATA_TEXT_VIEW_COUNT_HIDDEN_BYTES TRUE #define GTK_DATA_TEXT_VIEW_CUT_INSERTED_TEXT 1 /* 1=cut pasted text to max len, 0=refuse */ enum { PROP_0, PROP_DATA_TEXT_VIEW_DESCRIPTION, PROP_DATA_TEXT_VIEW_MAX_LENGTH, PROP_DATA_TEXT_VIEW_MAX_LENGTH_BYTES, } GTK_DATA_TEXT_VIEW_PROPERTIES; enum { LAST_SIGNAL } GTK_DATA_TEXT_VIEW_SIGNALS; static void gtk_data_text_view_class_init(GtkDataTextViewClass *klass); static void gtk_data_text_view_init(GtkDataTextView *data); static GtkTextViewClass *parent_class = NULL; /** * gtk_data_text_view_get_description: * @data_text_view: a #GtkDataTextView * * Retrieves the #GtkDataTextView description. * * Returns: a pointer to the contents of the widget as a * string. This string points to internally allocated * storage in the widget and must not be freed, modified or * stored. * * Since: 3.0.6 **/ const gchar * gtk_data_text_view_get_description(GtkDataTextView *data_text_view) { g_return_val_if_fail(GTK_IS_DATA_TEXT_VIEW(data_text_view), NULL); return data_text_view->description; } /** * gtk_data_text_view_set_description: * @data_text_view: a #GtkDataTextView * @description: the description or NULL * * Sets the GtkDataTextView description. * * Since: 3.0.6 */ void gtk_data_text_view_set_description(GtkDataTextView *data_text_view, const gchar *description) { g_return_if_fail(data_text_view != NULL); g_return_if_fail(GTK_IS_DATA_TEXT_VIEW(data_text_view)); if (data_text_view->description) g_free(data_text_view->description); data_text_view->description = g_strdup(description); } /** * gtk_data_text_view_get_max_length: * @data_text_view: a #GtkDataTextView * * Retrieves the maximum character length for the contents of * #GtkDataTextView. * * Returns: maximum byte length or 0. * * Since: 3.0.6 **/ gint gtk_data_text_view_get_max_length(GtkDataTextView *data_text_view) { g_return_val_if_fail(GTK_IS_DATA_TEXT_VIEW(data_text_view), 0); return data_text_view->max_length; } /** * gtk_data_text_view_set_max_length: * @data_text_view: a #GtkDataTextView * @max_length: maximum character length or 0 * * Sets the maximum character length for the contents of the * #GtkDataTextView. Existing content will not be truncted. * * Since: 3.0.6 */ void gtk_data_text_view_set_max_length(GtkDataTextView *data_text_view, gint max_length) { g_return_if_fail(data_text_view != NULL); g_return_if_fail(GTK_IS_DATA_TEXT_VIEW(data_text_view)); if (max_length < 0) max_length = 0; if (max_length > GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE) max_length = GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE; data_text_view->max_length = max_length; } /** * gtk_data_text_view_get_max_length_bytes: * @data_text_view: a #GtkDataTextView * * Retrieves the maximum byte length for the contents of * #GtkDataTextView data_format. * * Returns: maximum byte length or 0. * * Since: 3.0.6 **/ gint gtk_data_text_view_get_max_length_bytes(GtkDataTextView *data_text_view) { g_return_val_if_fail(GTK_IS_DATA_TEXT_VIEW(data_text_view), 0); return data_text_view->max_length_bytes; } /** * gtk_data_text_view_set_max_length_bytes: * @data_text_view: a #GtkDataTextView * @max_length_bytes: maximum byte length or 0 * * Sets the maximum byte length for the contents of the * GtkDataTextView. Existing content will not be truncted. * * Since: 3.0.6 */ void gtk_data_text_view_set_max_length_bytes(GtkDataTextView *data_text_view, gint max_length_bytes) { g_return_if_fail(data_text_view != NULL); g_return_if_fail(GTK_IS_DATA_TEXT_VIEW(data_text_view)); if (max_length_bytes < 0) max_length_bytes = 0; if (max_length_bytes > GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE) max_length_bytes = GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE; data_text_view->max_length_bytes = max_length_bytes; } GType gtk_data_text_view_get_type(void) { static GType data_text_view_type = 0; if (!data_text_view_type) { static const GInterfaceInfo interface_info = { (GInterfaceInitFunc)NULL, (GInterfaceFinalizeFunc)NULL, (gpointer)NULL }; data_text_view_type = g_type_register_static_simple( gtk_text_view_get_type(), "GtkDataTextView", sizeof(GtkDataTextViewClass), (GClassInitFunc)gtk_data_text_view_class_init, sizeof(GtkDataTextView), (GInstanceInitFunc)gtk_data_text_view_init, 0); g_type_add_interface_static(data_text_view_type, GTK_TYPE_BUILDABLE, &interface_info); } return (data_text_view_type); } static void gtk_data_text_view_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkDataTextView *data_text_view = GTK_DATA_TEXT_VIEW(object); switch(prop_id) { case PROP_DATA_TEXT_VIEW_DESCRIPTION: { const gchar *description = g_value_get_string(value); if (!gtk_widget_get_realized(GTK_WIDGET(data_text_view))) { if (data_text_view->description) g_free(data_text_view->description); data_text_view->description = g_strdup(description); } else { gtk_data_text_view_set_description(data_text_view, description); } } break; case PROP_DATA_TEXT_VIEW_MAX_LENGTH: gtk_data_text_view_set_max_length(data_text_view, g_value_get_int(value)); break; case PROP_DATA_TEXT_VIEW_MAX_LENGTH_BYTES: gtk_data_text_view_set_max_length_bytes(data_text_view, g_value_get_int(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } static void gtk_data_text_view_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkDataTextView *data_text_view = GTK_DATA_TEXT_VIEW(object); switch(prop_id) { case PROP_DATA_TEXT_VIEW_DESCRIPTION: g_value_set_string(value, data_text_view->description); break; case PROP_DATA_TEXT_VIEW_MAX_LENGTH: g_value_set_int(value, gtk_data_text_view_get_max_length(data_text_view)); break; case PROP_DATA_TEXT_VIEW_MAX_LENGTH_BYTES: g_value_set_int(value, gtk_data_text_view_get_max_length_bytes(data_text_view)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } static void gtk_data_text_view_class_init(GtkDataTextViewClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); #if 0 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass); GtkTextViewClass *text_view_class = GTK_TEXT_VIEW_CLASS (klass); #endif parent_class = g_type_class_ref(gtk_text_view_get_type()); gobject_class->set_property = gtk_data_text_view_set_property; gobject_class->get_property = gtk_data_text_view_get_property; /** * GtkDataTextView:description: * * Description of the GtkDataTextView, no functionality, a place * for private information that cannot be put anywhere else. * * Since: 3.0.6 */ g_object_class_install_property(gobject_class, PROP_DATA_TEXT_VIEW_DESCRIPTION, g_param_spec_string("description", "Description", "Description of textview contents", "" /* default value */, G_PARAM_READWRITE)); /** * GtkDataTextView:max-length: * * Set the maximum length in characters for the GtkDataTextView. * For details see #gtk_data_text_view_set_max_length. * * Sometimes, systems cannot handle UTF-8 string length * correctly, to overcome this problem, you can use the maximum * string length in bytes. When setting both limits, max-length * and max-length-bytes, both must be fulfilled. * * Since: 3.0.6 */ g_object_class_install_property(gobject_class, PROP_DATA_TEXT_VIEW_MAX_LENGTH, g_param_spec_int("max-length", "Maximum character length", "The maximum number of characters for this textview. Zero if no maximum", 0, GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE, 0 /* default value */, G_PARAM_READWRITE)); /** * GtkDataTextView:max-length-bytes: * * Set the maximum length in bytes for the GtkDataTextView. For * details see #gtk_data_text_view_set_max_length_bytes. * * Sometimes, systems cannot handle UTF-8 string length * correctly, to overcome this problem, you can use the maximum * string length in bytes. When setting both limits, max-length * and max-length-bytes, both must be fulfilled. * * Since: 3.0.6 */ g_object_class_install_property(gobject_class, PROP_DATA_TEXT_VIEW_MAX_LENGTH_BYTES, g_param_spec_int("max-length-bytes", "Maximum bytes length", "The maximum number of bytes for this textview. Zero if no maximum", 0, GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE, 0 /* default value */, G_PARAM_READWRITE)); } /* Signal interception */ static void _gtk_data_text_view_insert_text_handler(GtkTextBuffer *textbuffer, GtkTextIter *location, gchar *new_text, gint new_text_len_bytes, gpointer user_data) { GtkDataTextView *data_text_view = GTK_DATA_TEXT_VIEW(user_data); GtkTextView *text_view = GTK_TEXT_VIEW(user_data); GtkTextBuffer *buffer = gtk_text_view_get_buffer(text_view); if (new_text_len_bytes < 0) new_text_len_bytes = strlen(new_text); gint max_len_chars = data_text_view->max_length; if (max_len_chars) { gint old_length_chars = gtk_text_buffer_get_char_count(buffer); gint new_text_length_chars = g_utf8_strlen(new_text, new_text_len_bytes); #if GTK_DATA_TEXT_VIEW_DEBUG_SIGNAL > 0 g_debug("_gtk_data_text_view_insert_text_handler(chars): cl %d max %d new %d", old_length_chars, max_len_chars, new_text_length_chars); #endif if (old_length_chars + new_text_length_chars > max_len_chars) { #if GTK_DATA_TEXT_VIEW_CUT_INSERTED_TEXT > 0 gint remaining_chars = max_len_chars - old_length_chars; if (remaining_chars > 0) { gchar *cp = g_malloc0(new_text_len_bytes); g_utf8_strncpy(cp, new_text, remaining_chars); gtk_text_buffer_insert(textbuffer, location, cp, -1); g_free(cp); } #endif gdk_beep(); g_signal_stop_emission_by_name(textbuffer, "insert-text"); } } gint max_len_bytes = data_text_view->max_length_bytes; if (max_len_bytes) { GtkTextIter start, end; gtk_text_buffer_get_start_iter(buffer, &start); gtk_text_buffer_get_end_iter(buffer, &end); gchar *old_text = gtk_text_buffer_get_text(buffer, &start, &end, GTK_DATA_TEXT_VIEW_COUNT_HIDDEN_BYTES); gint old_length_bytes = old_text ? strlen(old_text) : 0; g_free(old_text); #if GTK_DATA_TEXT_VIEW_DEBUG_SIGNAL > 0 g_debug("_gtk_data_text_view_insert_text_handler(bytes): cl %d max %d new %d", old_length_bytes, max_len_bytes, new_text_len_bytes); #endif if (old_length_bytes + new_text_len_bytes > max_len_bytes) { #if GTK_DATA_TEXT_VIEW_CUT_INSERTED_TEXT > 0 gint remaining_bytes = max_len_bytes - old_length_bytes; if (remaining_bytes > 0) { gchar *bpxx = &new_text[remaining_bytes]; /* byte position, may be invalid */ gchar *cpe = g_utf8_find_prev_char(new_text, bpxx); if (cpe) { gchar *cpn = g_utf8_find_next_char(cpe, NULL); if (cpn && cpn <= bpxx) cpe = bpxx; gchar *cp = g_malloc0(new_text_len_bytes); strncpy(cp, new_text, cpe-new_text); gtk_text_buffer_insert(textbuffer, location, cp, -1); g_free(cp); } } #endif gdk_beep(); g_signal_stop_emission_by_name(textbuffer, "insert-text"); } } } static void gtk_data_text_view_init(GtkDataTextView *data_text_view) { #if 0 GtkWidget *widget = GTK_WIDGET(data_text_view); #endif data_text_view->description = NULL; data_text_view->max_length = 0; data_text_view->max_length_bytes = 0; #if GTK_DATA_TEXT_VIEW_DEBUG > 0 g_debug("gtk_data_text_view_init"); #endif GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(data_text_view)); g_signal_connect(buffer, "insert-text", G_CALLBACK(_gtk_data_text_view_insert_text_handler), data_text_view); } /** * gtk_data_text_view_new: * * Creates a new GtkDataTextView Widget. * * Returns: the new GtkDataTextView Widget * * Since: 3.0.6 */ GtkDataTextView * gtk_data_text_view_new(void) { GtkDataTextView *data_text_view = GTK_DATA_TEXT_VIEW( gtk_widget_new(gtk_data_text_view_get_type(), NULL)); return (data_text_view); } gtkextra-3.2.0/gtkextra/gtkplot3d.c0000644000076400001440000026746012603754176014230 00000000000000/* gtkplot3d - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplot3d * @short_description: 3d scientific plots widget * * FIXME:: Need long description. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotsurface.h" #include "gtkplot3d.h" #include "gtkpsfont.h" #define DEFAULT_WIDTH 420 #define DEFAULT_HEIGHT 340 #define DEFAULT_FONT_HEIGHT 10 #ifndef PI #define PI 3.141592653589793238462643383279502884197 #endif #ifndef SQRT2 #define SQRT2 1.41421356237309504880168872420969807856967 #endif #define P_(string) string enum { PROP_0, PROP_CENTER, PROP_ORIGIN, PROP_A1, PROP_A2, PROP_A3, PROP_XY_VISIBLE, PROP_YZ_VISIBLE, PROP_ZX_VISIBLE, PROP_COLOR_XY, PROP_COLOR_YZ, PROP_COLOR_ZX, PROP_FRAME, PROP_CORNER, PROP_CORNER_VISIBLE, PROP_ZMIN, PROP_ZMAX, PROP_ZSCALE, PROP_TITLES_OFFSET, PROP_XFACTOR, PROP_YFACTOR, PROP_ZFACTOR, PROP_E1, PROP_E2, PROP_E3, PROP_XY_LABEL_MASK, PROP_XY_MAJOR_MASK, PROP_XY_MINOR_MASK, PROP_XY_TITLE_VISIBLE, PROP_XZ_LABEL_MASK, PROP_XZ_MAJOR_MASK, PROP_XZ_MINOR_MASK, PROP_XZ_TITLE_VISIBLE, PROP_YX_LABEL_MASK, PROP_YX_MAJOR_MASK, PROP_YX_MINOR_MASK, PROP_YX_TITLE_VISIBLE, PROP_YZ_LABEL_MASK, PROP_YZ_MAJOR_MASK, PROP_YZ_MINOR_MASK, PROP_YZ_TITLE_VISIBLE, PROP_ZX_LABEL_MASK, PROP_ZX_MAJOR_MASK, PROP_ZX_MINOR_MASK, PROP_ZX_TITLE_VISIBLE, PROP_ZY_LABEL_MASK, PROP_ZY_MAJOR_MASK, PROP_ZY_MINOR_MASK, PROP_ZY_TITLE_VISIBLE, }; static void gtk_plot3d_class_init (GtkPlot3DClass *klass); static void gtk_plot3d_init (GtkPlot3D *plot); static void gtk_plot3d_destroy (GtkObject *object); static void gtk_plot3d_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot3d_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot3d_real_paint (GtkWidget *widget); static void gtk_plot3d_draw_plane (GtkPlot3D *plot, GtkPlotVector v1, GtkPlotVector v2, GtkPlotVector v3, GtkPlotVector v4, GdkColor background); static void gtk_plot3d_draw_grids (GtkPlot3D *plot, GtkPlotAxis *axis, GtkPlotVector origin); static void gtk_plot3d_draw_axis (GtkPlot3D *plot, GtkPlotAxis *axis, GtkPlotVector tick, GtkPlotVector delta); static void gtk_plot3d_draw_labels (GtkPlot3D *plot, GtkPlotAxis *axis, GtkPlotVector delta); static void gtk_plot3d_real_get_pixel (GtkWidget *widget, gdouble x, gdouble y, gdouble z, gdouble *px, gdouble *py, gdouble *pz); extern gint roundint (gdouble x); static GtkPlotClass *parent_class = NULL; GType gtk_plot3d_get_type (void) { static GType plot_type = 0; if (!plot_type) { plot_type = g_type_register_static_simple ( gtk_plot_get_type(), "GtkPlot3D", sizeof (GtkPlot3DClass), (GClassInitFunc) gtk_plot3d_class_init, sizeof (GtkPlot3D), (GInstanceInitFunc) gtk_plot3d_init, 0); } return plot_type; } static void gtk_plot3d_class_init (GtkPlot3DClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotClass *plot_class; GtkPlot3DClass *plot3d_class; GObjectClass *gobject_class = G_OBJECT_CLASS (klass); parent_class = g_type_class_ref (gtk_plot_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; plot_class = (GtkPlotClass *) klass; plot3d_class = (GtkPlot3DClass *) klass; object_class->destroy = gtk_plot3d_destroy; gobject_class->set_property = gtk_plot3d_set_property; gobject_class->get_property = gtk_plot3d_get_property; plot_class->plot_paint = gtk_plot3d_real_paint; plot3d_class->get_pixel = gtk_plot3d_real_get_pixel; /** * GtkPlot3D:center_vector: * * **/ g_object_class_install_property(gobject_class, PROP_CENTER, g_param_spec_pointer ("center_vector", P_("Center"), P_("Position of the center point"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:origin_vector: * * **/ g_object_class_install_property(gobject_class, PROP_ORIGIN, g_param_spec_pointer ("origin_vector", P_("Origin"), P_("Position of the origin"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:a1: * * **/ g_object_class_install_property(gobject_class, PROP_A1, g_param_spec_double ("a1", P_("Angle 1"), P_("Angle 1"), -G_MAXDOUBLE, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:a2: * * **/ g_object_class_install_property(gobject_class, PROP_A2, g_param_spec_double ("a2", P_("Angle 2"), P_("Angle 2"), -G_MAXDOUBLE, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:a3: * * **/ g_object_class_install_property(gobject_class, PROP_A3, g_param_spec_double ("a3", P_("Angle 3"), P_("Angle 3"), -G_MAXDOUBLE, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xy_visible: * * **/ g_object_class_install_property(gobject_class, PROP_XY_VISIBLE, g_param_spec_boolean ("xy_visible", P_("XY Visible"), P_("XY Plane visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yz_visible: * * **/ g_object_class_install_property(gobject_class, PROP_YZ_VISIBLE, g_param_spec_boolean ("yz_visible", P_("YZ Visible"), P_("YZ Plane visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zx_visible: * * **/ g_object_class_install_property(gobject_class, PROP_ZX_VISIBLE, g_param_spec_boolean ("zx_visible", P_("ZX Visible"), P_("ZX Plane visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:color_xy: * * **/ g_object_class_install_property(gobject_class, PROP_COLOR_XY, g_param_spec_pointer ("color_xy", P_("XY Color"), P_("Color of XY Plane"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:color_yz: * * **/ g_object_class_install_property(gobject_class, PROP_COLOR_YZ, g_param_spec_pointer ("color_yz", P_("YZ Color"), P_("Color of YZ Plane"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:color_zx: * * **/ g_object_class_install_property(gobject_class, PROP_COLOR_ZX, g_param_spec_pointer ("color_zx", P_("ZX Color"), P_("Color of ZX Plane"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:frame_line: * * **/ g_object_class_install_property(gobject_class, PROP_FRAME, g_param_spec_pointer ("frame_line", P_("Frame Line"), P_("Frame Line"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:corner_line: * * **/ g_object_class_install_property(gobject_class, PROP_CORNER, g_param_spec_pointer ("corner_line", P_("Corner Line"), P_("Corner Line"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:corner_visible: * * **/ g_object_class_install_property(gobject_class, PROP_CORNER_VISIBLE, g_param_spec_boolean ("corner_visible", P_("Corner Visible"), P_("Draw the entire cube"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zmin: * * **/ g_object_class_install_property(gobject_class, PROP_ZMIN, g_param_spec_double ("zmin", P_("Z Min"), P_("Min value of the Z axis"), -G_MAXDOUBLE, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zmax: * * **/ g_object_class_install_property(gobject_class, PROP_ZMAX, g_param_spec_double ("zmax", P_("Z Max"), P_("Max value of the Z axis"), -G_MAXDOUBLE, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zscale: * * **/ g_object_class_install_property(gobject_class, PROP_ZSCALE, g_param_spec_int ("zscale", P_("Z Scale"), P_("Scale used for the Z axis"), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:titles_offset: * * **/ g_object_class_install_property(gobject_class, PROP_TITLES_OFFSET, g_param_spec_int ("titles_offset", P_("Titles Offset"), P_("Titles distance from the axes"), -G_MAXINT,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xfactor: * * **/ g_object_class_install_property(gobject_class, PROP_XFACTOR, g_param_spec_double ("xfactor", P_("X Factor"), P_("Relative size of the x axis"), 0.0, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yfactor: * * **/ g_object_class_install_property(gobject_class, PROP_YFACTOR, g_param_spec_double ("yfactor", P_("Y Factor"), P_("Relative size of the y axis"), 0.0, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zfactor: * * **/ g_object_class_install_property(gobject_class, PROP_ZFACTOR, g_param_spec_double ("zfactor", P_("Z Factor"), P_("Relative size of the z axis"), 0.0, G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:e1_vector: * * **/ g_object_class_install_property(gobject_class, PROP_E1, g_param_spec_pointer ("e1_vector", P_("E1"), P_("Vector e1"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:e2_vector: * * **/ g_object_class_install_property(gobject_class, PROP_E2, g_param_spec_pointer ("e2_vector", P_("E2"), P_("Vector e2"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:e3_vector: * * **/ g_object_class_install_property(gobject_class, PROP_E3, g_param_spec_pointer ("e3_vector", P_("E3"), P_("Vector e3"), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xy_label_mask: * * **/ g_object_class_install_property(gobject_class, PROP_XY_LABEL_MASK, g_param_spec_int ("xy_label_mask", P_("XY label mask"), P_("XY label mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xy_major_mask: * * **/ g_object_class_install_property(gobject_class, PROP_XY_MAJOR_MASK, g_param_spec_int ("xy_major_mask", P_("XY major mask"), P_("XY major mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xy_minor_mask: * * **/ g_object_class_install_property(gobject_class, PROP_XY_MINOR_MASK, g_param_spec_int ("xy_minor_mask", P_("XY minor mask"), P_("XY minor mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xy_title_visible: * * **/ g_object_class_install_property(gobject_class, PROP_XY_TITLE_VISIBLE, g_param_spec_boolean ("xy_title_visible", P_("XY Title Visible"), P_("XY title Visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xz_label_mask: * * **/ g_object_class_install_property(gobject_class, PROP_XZ_LABEL_MASK, g_param_spec_int ("xz_label_mask", P_("XZ label mask"), P_("XZ label mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xz_major_mask: * * **/ g_object_class_install_property(gobject_class, PROP_XZ_MAJOR_MASK, g_param_spec_int ("xz_major_mask", P_("XZ major mask"), P_("XZ major mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xz_minor_mask: * * **/ g_object_class_install_property(gobject_class, PROP_XZ_MINOR_MASK, g_param_spec_int ("xz_minor_mask", P_("XZ minor mask"), P_("XZ minor mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:xz_title_visible: * * **/ g_object_class_install_property(gobject_class, PROP_XZ_TITLE_VISIBLE, g_param_spec_boolean ("xz_title_visible", P_("XZ Title Visible"), P_("XZ title Visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yz_label_mask: * * **/ g_object_class_install_property(gobject_class, PROP_YZ_LABEL_MASK, g_param_spec_int ("yz_label_mask", P_("YZ label mask"), P_("YZ label mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yz_major_mask: * * **/ g_object_class_install_property(gobject_class, PROP_YZ_MAJOR_MASK, g_param_spec_int ("yz_major_mask", P_("YZ major mask"), P_("YZ major mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yz_minor_mask: * * **/ g_object_class_install_property(gobject_class, PROP_YZ_MINOR_MASK, g_param_spec_int ("yz_minor_mask", P_("YZ minor mask"), P_("YZ minor mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yz_title_visible: * * **/ g_object_class_install_property(gobject_class, PROP_YZ_TITLE_VISIBLE, g_param_spec_boolean ("yz_title_visible", P_("YZ Title Visible"), P_("YZ title Visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yx_label_mask: * * **/ g_object_class_install_property(gobject_class, PROP_YX_LABEL_MASK, g_param_spec_int ("yx_label_mask", P_("YX label mask"), P_("YX label mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yx_major_mask: * * **/ g_object_class_install_property(gobject_class, PROP_YX_MAJOR_MASK, g_param_spec_int ("yx_major_mask", P_("YX major mask"), P_("YX major mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yx_minor_mask: * * **/ g_object_class_install_property(gobject_class, PROP_YX_MINOR_MASK, g_param_spec_int ("yx_minor_mask", P_("YX minor mask"), P_("YX minor mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:yx_title_visible: * * **/ g_object_class_install_property(gobject_class, PROP_YX_TITLE_VISIBLE, g_param_spec_boolean ("yx_title_visible", P_("YX Title Visible"), P_("YX title Visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zx_label_mask: * * **/ g_object_class_install_property(gobject_class, PROP_ZX_LABEL_MASK, g_param_spec_int ("zx_label_mask", P_("ZX label mask"), P_("ZX label mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zx_major_mask: * * **/ g_object_class_install_property(gobject_class, PROP_ZX_MAJOR_MASK, g_param_spec_int ("zx_major_mask", P_("ZX major mask"), P_("ZX major mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zx_minor_mask: * * **/ g_object_class_install_property(gobject_class, PROP_ZX_MINOR_MASK, g_param_spec_int ("zx_minor_mask", P_("ZX minor mask"), P_("ZX minor mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zx_title_visible: * * **/ g_object_class_install_property(gobject_class, PROP_ZX_TITLE_VISIBLE, g_param_spec_boolean ("zx_title_visible", P_("ZX Title Visible"), P_("ZX title Visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zy_label_mask: * * **/ g_object_class_install_property(gobject_class, PROP_ZY_LABEL_MASK, g_param_spec_int ("zy_label_mask", P_("ZY label mask"), P_("ZY label mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zy_major_mask: * * **/ g_object_class_install_property(gobject_class, PROP_ZY_MAJOR_MASK, g_param_spec_int ("zy_major_mask", P_("ZY major mask"), P_("ZY major mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zy_minor_mask: * * **/ g_object_class_install_property(gobject_class, PROP_ZY_MINOR_MASK, g_param_spec_int ("zy_minor_mask", P_("ZY minor mask"), P_("ZY minor mask"), 0,3,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot3D:zy_title_visible: * * **/ g_object_class_install_property(gobject_class, PROP_ZY_TITLE_VISIBLE, g_param_spec_boolean ("zy_title_visible", P_("ZY Title Visible"), P_("ZY title Visible"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot3d_init (GtkPlot3D *plot) { GtkWidget *widget; GdkColor color; gint i; gtk_widget_set_has_window(GTK_WIDGET(plot), FALSE); for(i = 0; i < 360; i++){ plot->ncos[i] = cos(i*PI/180.); plot->nsin[i] = sin(i*PI/180.); } widget = GTK_WIDGET(plot); gdk_color_black(gtk_widget_get_colormap(widget), >k_widget_get_style(widget)->black); gdk_color_white(gtk_widget_get_colormap(widget), >k_widget_get_style(widget)->white); GTK_PLOT(plot)->legends_x = .8; plot->ax = GTK_PLOT(plot)->bottom; plot->ay = GTK_PLOT(plot)->left; plot->az = GTK_PLOT(plot)->top; plot->center.x = 0.5; plot->center.y = 0.5; plot->center.z = 0.5; plot->xfactor = 1.0; plot->yfactor = 1.0; plot->zfactor = 1.0; gtk_plot3d_reset_angles(plot); gtk_plot3d_rotate_x(plot, 60.); gtk_plot3d_rotate_z(plot, 30.); GTK_PLOT(plot)->xmin = 0.; GTK_PLOT(plot)->xmax = 1.000000; GTK_PLOT(plot)->ymin = 0.; GTK_PLOT(plot)->ymax = 1.000000; plot->zmin = 0.; plot->zmax = 1.000000; plot->xy_visible = TRUE; plot->yz_visible = TRUE; plot->zx_visible = TRUE; plot->ax->show_major_grid = FALSE; plot->ax->show_minor_grid = FALSE; plot->ay->show_major_grid = FALSE; plot->ay->show_minor_grid = FALSE; plot->az->show_major_grid = FALSE; plot->az->show_minor_grid = FALSE; plot->ax->show_major_grid = TRUE; plot->ax->show_minor_grid = TRUE; plot->ay->show_major_grid = TRUE; plot->ay->show_minor_grid = TRUE; plot->az->show_major_grid = TRUE; plot->az->show_minor_grid = TRUE; plot->ax->ticks.nmajorticks = 0; plot->ax->ticks.nminorticks = 0; plot->ax->ticks.values = NULL; plot->ax->ticks.set_limits = FALSE; plot->ax->ticks.begin = 0; plot->ax->ticks.end = 0; plot->ax->ticks.step = .100000000; plot->ax->ticks.nminor = 1; plot->ay->ticks.nmajorticks = 0; plot->ay->ticks.nminorticks = 0; plot->ay->ticks.values = NULL; plot->ay->ticks.set_limits = FALSE; plot->ay->ticks.begin = 0; plot->ay->ticks.end = 0; plot->ay->ticks.step = .100000000; plot->ay->ticks.nminor = 1; plot->az->ticks.nmajorticks = 0; plot->az->ticks.nminorticks = 0; plot->az->ticks.values = NULL; plot->az->ticks.set_limits = FALSE; plot->az->ticks.begin = 0; plot->az->ticks.end = 0; plot->az->ticks.step = .100000000; plot->az->ticks.nminor = 1; plot->ax->ticks.min = 0.0; plot->ax->ticks.max = 1.0; plot->ax->labels_offset = 25; plot->ax->major_mask = GTK_PLOT_TICKS_OUT; plot->ax->minor_mask = GTK_PLOT_TICKS_OUT; plot->ax->ticks_length = 8; plot->ax->ticks_width = 1; plot->ax->orientation = GTK_PLOT_AXIS_X; plot->ax->ticks.scale = GTK_PLOT_SCALE_LINEAR; plot->ax->is_visible = TRUE; plot->ax->custom_labels = FALSE; plot->ay->ticks.min = 0.0; plot->ay->ticks.max = 1.0; plot->ay->major_mask = GTK_PLOT_TICKS_OUT; plot->ay->minor_mask = GTK_PLOT_TICKS_OUT; plot->ay->ticks_length = 8; plot->ay->ticks_width = 1; plot->ay->labels_offset = 25; plot->ay->orientation = GTK_PLOT_AXIS_Y; plot->ay->ticks.scale = GTK_PLOT_SCALE_LINEAR; plot->ay->is_visible = TRUE; plot->ay->custom_labels = FALSE; plot->az->ticks.min = 0.0; plot->az->ticks.max = 1.0; plot->az->major_mask = GTK_PLOT_TICKS_OUT; plot->az->minor_mask = GTK_PLOT_TICKS_OUT; plot->az->ticks_length = 8; plot->az->ticks_width = 1; plot->az->labels_offset = 25; plot->az->orientation = GTK_PLOT_AXIS_Z; plot->az->ticks.scale = GTK_PLOT_SCALE_LINEAR; plot->az->is_visible = TRUE; plot->az->custom_labels = FALSE; plot->az->line.line_style = GTK_PLOT_LINE_SOLID; plot->az->line.line_width = 2; plot->az->line.color = gtk_widget_get_style(widget)->black; plot->az->labels_attr.text = NULL; plot->az->labels_attr.height = DEFAULT_FONT_HEIGHT; plot->az->labels_attr.fg = gtk_widget_get_style(widget)->black; plot->az->labels_attr.bg = gtk_widget_get_style(widget)->white; plot->az->labels_attr.transparent = TRUE; plot->az->labels_attr.justification = GTK_JUSTIFY_CENTER; plot->az->labels_attr.angle = 0; plot->az->label_mask = GTK_PLOT_LABEL_OUT; plot->az->label_style = GTK_PLOT_LABEL_FLOAT; plot->az->label_precision = 1; plot->az->title.angle = 90; plot->az->title.justification = GTK_JUSTIFY_CENTER; plot->az->title.height = DEFAULT_FONT_HEIGHT; plot->az->title.fg = gtk_widget_get_style(widget)->black; plot->az->title.bg = gtk_widget_get_style(widget)->white; plot->az->title.transparent = TRUE; plot->az->title_visible = TRUE; plot->ax->line.line_style = GTK_PLOT_LINE_SOLID; plot->ax->line.line_width = 2; plot->ax->line.color = gtk_widget_get_style(widget)->black; plot->ax->labels_attr.text = NULL; plot->ax->labels_attr.height = DEFAULT_FONT_HEIGHT; plot->ax->labels_attr.fg = gtk_widget_get_style(widget)->black; plot->ax->labels_attr.bg = gtk_widget_get_style(widget)->white; plot->ax->labels_attr.transparent = TRUE; plot->ax->labels_attr.justification = GTK_JUSTIFY_CENTER; plot->ax->labels_attr.angle = 0; plot->ax->label_mask = GTK_PLOT_LABEL_OUT; plot->ax->label_style = GTK_PLOT_LABEL_FLOAT; plot->ax->label_precision = 1; plot->ax->title.angle = 0; plot->ax->title.justification = GTK_JUSTIFY_CENTER; plot->ax->title.height = DEFAULT_FONT_HEIGHT; plot->ax->title.fg = gtk_widget_get_style(widget)->black; plot->ax->title.bg = gtk_widget_get_style(widget)->white; plot->ax->title.transparent = TRUE; plot->ax->title_visible = TRUE; plot->ay->line.line_style = GTK_PLOT_LINE_SOLID; plot->ay->line.line_width = 2; plot->ay->line.color = gtk_widget_get_style(widget)->black; plot->ay->labels_attr.text = NULL; plot->ay->labels_attr.height = DEFAULT_FONT_HEIGHT; plot->ay->labels_attr.fg = gtk_widget_get_style(widget)->black; plot->ay->labels_attr.bg = gtk_widget_get_style(widget)->white; plot->ay->labels_attr.transparent = TRUE; plot->ay->labels_attr.angle = 0; plot->ay->label_mask = GTK_PLOT_LABEL_OUT; plot->ay->label_style = GTK_PLOT_LABEL_FLOAT; plot->ay->label_precision = 1; plot->ay->labels_attr.justification = GTK_JUSTIFY_CENTER; plot->ay->title.angle = 0; plot->ay->title.justification = GTK_JUSTIFY_CENTER; plot->ay->title.height = DEFAULT_FONT_HEIGHT; plot->ay->title.fg = gtk_widget_get_style(widget)->black; plot->ay->title.bg = gtk_widget_get_style(widget)->white; plot->ay->title.transparent = TRUE; plot->ay->title_visible = TRUE; gtk_plot_axis_set_title(GTK_PLOT(plot)->bottom, "X Title"); gtk_plot_axis_set_title(GTK_PLOT(plot)->left, "Y Title"); gtk_plot_axis_set_title(GTK_PLOT(plot)->top, "Z Title"); GTK_PLOT(plot)->xscale = GTK_PLOT_SCALE_LINEAR; GTK_PLOT(plot)->yscale = GTK_PLOT_SCALE_LINEAR; plot->zscale = GTK_PLOT_SCALE_LINEAR; plot->xy.major_mask = plot->ax->major_mask; plot->xy.minor_mask = plot->ax->minor_mask; plot->xy.label_mask = plot->ax->label_mask; plot->xz.major_mask = plot->ax->major_mask; plot->xz.minor_mask = plot->ax->minor_mask; plot->xz.label_mask = plot->ax->label_mask; plot->yx.major_mask = plot->ay->major_mask; plot->yx.minor_mask = plot->ay->minor_mask; plot->yx.label_mask = plot->ay->label_mask; plot->yz.major_mask = plot->ay->major_mask; plot->yz.minor_mask = plot->ay->minor_mask; plot->yz.label_mask = plot->ay->label_mask; plot->zx.major_mask = plot->az->major_mask; plot->zx.minor_mask = plot->az->minor_mask; plot->zx.label_mask = plot->az->label_mask; plot->zy.major_mask = plot->az->major_mask; plot->zy.minor_mask = plot->az->minor_mask; plot->zy.label_mask = plot->az->label_mask; plot->xy.title_visible = plot->ax->title_visible; plot->xz.title_visible = plot->ax->title_visible; plot->yx.title_visible = plot->ay->title_visible; plot->yz.title_visible = plot->ay->title_visible; plot->zx.title_visible = plot->az->title_visible; plot->zy.title_visible = plot->az->title_visible; plot->frame.color = gtk_widget_get_style(widget)->black; plot->frame.line_width = 1; plot->frame.line_style = GTK_PLOT_LINE_SOLID; plot->corner_visible = FALSE; plot->corner.line_style = GTK_PLOT_LINE_SOLID; plot->corner.line_width = 0; plot->corner.color = gtk_widget_get_style(widget)->black; plot->ax->direction = plot->e1; plot->ay->direction = plot->e2; plot->az->direction = plot->e3; gdk_color_parse("gray95", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); plot->color_xy = color; gdk_color_parse("gray80", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); plot->color_yz = color; gdk_color_parse("gray65", &color); gdk_color_alloc(gtk_widget_get_colormap(widget), &color); plot->color_zx = color; plot->titles_offset = 60; GTK_PLOT(plot)->legends_attr.transparent = FALSE; gtk_plot_axis_ticks_recalc(plot->ax); gtk_plot_axis_ticks_recalc(plot->ay); gtk_plot_axis_ticks_recalc(plot->az); GTK_PLOT(plot)->clip_data = TRUE; gtk_psfont_init(); } static void gtk_plot3d_destroy (GtkObject *object) { gtk_psfont_unref(); if ( GTK_OBJECT_CLASS (parent_class)->destroy ) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void gtk_plot3d_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlot3D *plot; plot = GTK_PLOT3D (object); switch(prop_id){ case PROP_CENTER: plot->center = *((GtkPlotVector *)g_value_get_pointer(value)); break; case PROP_ORIGIN: plot->origin = *((GtkPlotVector *)g_value_get_pointer(value)); break; /* case PROP_A1: gtk_plot3d_rotate_x(plot, -plot->a1+g_value_get_double(value)); break; case PROP_A2: gtk_plot3d_rotate_y(plot, -plot->a2+g_value_get_double(value)); break; case PROP_A3: gtk_plot3d_rotate_z(plot, -plot->a3+g_value_get_double(value)); break; */ case PROP_XY_VISIBLE: plot->xy_visible = g_value_get_boolean(value); break; case PROP_YZ_VISIBLE: plot->yz_visible = g_value_get_boolean(value); break; case PROP_ZX_VISIBLE: plot->zx_visible = g_value_get_boolean(value); break; case PROP_COLOR_XY: plot->color_xy = *((GdkColor *)g_value_get_pointer(value)); break; case PROP_COLOR_YZ: plot->color_yz = *((GdkColor *)g_value_get_pointer(value)); break; case PROP_COLOR_ZX: plot->color_zx = *((GdkColor *)g_value_get_pointer(value)); break; case PROP_FRAME: plot->frame = *((GtkPlotLine *)g_value_get_pointer(value)); break; case PROP_CORNER: plot->corner = *((GtkPlotLine *)g_value_get_pointer(value)); break; case PROP_CORNER_VISIBLE: plot->corner_visible = g_value_get_boolean(value); break; case PROP_ZMIN: plot->zmin = g_value_get_double(value); break; case PROP_ZMAX: plot->zmax = g_value_get_double(value); break; case PROP_ZSCALE: plot->zscale = g_value_get_int(value); break; case PROP_TITLES_OFFSET: plot->titles_offset = g_value_get_int(value); break; case PROP_XFACTOR: gtk_plot3d_set_xfactor(plot, g_value_get_double(value)); break; case PROP_YFACTOR: gtk_plot3d_set_yfactor(plot, g_value_get_double(value)); break; case PROP_ZFACTOR: gtk_plot3d_set_zfactor(plot, g_value_get_double(value)); break; case PROP_E1: plot->e1 = *((GtkPlotVector *)g_value_get_pointer(value)); break; case PROP_E2: plot->e2 = *((GtkPlotVector *)g_value_get_pointer(value)); break; case PROP_E3: plot->e3 = *((GtkPlotVector *)g_value_get_pointer(value)); break; case PROP_XY_MAJOR_MASK: plot->xy.major_mask = g_value_get_int(value); break; case PROP_XY_MINOR_MASK: plot->xy.minor_mask = g_value_get_int(value); break; case PROP_XY_LABEL_MASK: plot->xy.label_mask = g_value_get_int(value); break; case PROP_XY_TITLE_VISIBLE: plot->xy.title_visible = g_value_get_boolean(value); break; case PROP_XZ_MAJOR_MASK: plot->xz.major_mask = g_value_get_int(value); break; case PROP_XZ_MINOR_MASK: plot->xz.minor_mask = g_value_get_int(value); break; case PROP_XZ_LABEL_MASK: plot->xz.label_mask = g_value_get_int(value); break; case PROP_XZ_TITLE_VISIBLE: plot->xz.title_visible = g_value_get_boolean(value); break; case PROP_YX_MAJOR_MASK: plot->yx.major_mask = g_value_get_int(value); break; case PROP_YX_MINOR_MASK: plot->yx.minor_mask = g_value_get_int(value); break; case PROP_YX_LABEL_MASK: plot->yx.label_mask = g_value_get_int(value); break; case PROP_YX_TITLE_VISIBLE: plot->yx.title_visible = g_value_get_boolean(value); break; case PROP_YZ_MAJOR_MASK: plot->yz.major_mask = g_value_get_int(value); break; case PROP_YZ_MINOR_MASK: plot->yz.minor_mask = g_value_get_int(value); break; case PROP_YZ_LABEL_MASK: plot->yz.label_mask = g_value_get_int(value); break; case PROP_YZ_TITLE_VISIBLE: plot->yz.title_visible = g_value_get_boolean(value); break; case PROP_ZX_MAJOR_MASK: plot->zx.major_mask = g_value_get_int(value); break; case PROP_ZX_MINOR_MASK: plot->zx.minor_mask = g_value_get_int(value); break; case PROP_ZX_LABEL_MASK: plot->zx.label_mask = g_value_get_int(value); break; case PROP_ZX_TITLE_VISIBLE: plot->zx.title_visible = g_value_get_boolean(value); break; case PROP_ZY_MAJOR_MASK: plot->zy.major_mask = g_value_get_int(value); break; case PROP_ZY_MINOR_MASK: plot->zy.minor_mask = g_value_get_int(value); break; case PROP_ZY_LABEL_MASK: plot->zy.label_mask = g_value_get_int(value); break; case PROP_ZY_TITLE_VISIBLE: plot->zy.title_visible = g_value_get_boolean(value); break; default: break; } } static void gtk_plot3d_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlot3D *plot; plot = GTK_PLOT3D (object); switch(prop_id){ case PROP_CENTER: g_value_set_pointer(value, &plot->center); break; case PROP_ORIGIN: g_value_set_pointer(value, &plot->origin); break; case PROP_A1: g_value_set_double(value, plot->a1); break; case PROP_A2: g_value_set_double(value, plot->a2); break; case PROP_A3: g_value_set_double(value, plot->a3); break; case PROP_XY_VISIBLE: g_value_set_boolean(value, plot->xy_visible); break; case PROP_YZ_VISIBLE: g_value_set_boolean(value, plot->yz_visible); break; case PROP_ZX_VISIBLE: g_value_set_boolean(value, plot->zx_visible); break; case PROP_COLOR_XY: g_value_set_pointer(value, &plot->color_xy); break; case PROP_COLOR_YZ: g_value_set_pointer(value, &plot->color_yz); break; case PROP_COLOR_ZX: g_value_set_pointer(value, &plot->color_zx); break; case PROP_FRAME: g_value_set_pointer(value, &plot->frame); break; case PROP_CORNER: g_value_set_pointer(value, &plot->corner); break; case PROP_CORNER_VISIBLE: g_value_set_boolean(value, plot->corner_visible); break; case PROP_ZMIN: g_value_set_double(value, plot->zmin); break; case PROP_ZMAX: g_value_set_double(value, plot->zmax); break; case PROP_ZSCALE: g_value_set_int(value, plot->zscale); break; case PROP_TITLES_OFFSET: g_value_set_int(value, plot->titles_offset); break; case PROP_XFACTOR: g_value_set_double(value, plot->xfactor); break; case PROP_YFACTOR: g_value_set_double(value, plot->yfactor); break; case PROP_ZFACTOR: g_value_set_double(value, plot->zfactor); break; case PROP_E1: g_value_set_pointer(value, &plot->e1); break; case PROP_E2: g_value_set_pointer(value, &plot->e2); break; case PROP_E3: g_value_set_pointer(value, &plot->e3); break; case PROP_XY_LABEL_MASK: g_value_set_int(value, plot->xy.label_mask); break; case PROP_XY_MAJOR_MASK: g_value_set_int(value, plot->xy.major_mask); break; case PROP_XY_MINOR_MASK: g_value_set_int(value, plot->xy.minor_mask); break; case PROP_XY_TITLE_VISIBLE: g_value_set_boolean(value, plot->xy.title_visible); break; case PROP_XZ_LABEL_MASK: g_value_set_int(value, plot->xz.label_mask); break; case PROP_XZ_MAJOR_MASK: g_value_set_int(value, plot->xz.major_mask); break; case PROP_XZ_MINOR_MASK: g_value_set_int(value, plot->xz.minor_mask); break; case PROP_XZ_TITLE_VISIBLE: g_value_set_boolean(value, plot->xz.title_visible); break; case PROP_YZ_LABEL_MASK: g_value_set_int(value, plot->yz.label_mask); break; case PROP_YZ_MAJOR_MASK: g_value_set_int(value, plot->yz.major_mask); break; case PROP_YZ_MINOR_MASK: g_value_set_int(value, plot->yz.minor_mask); break; case PROP_YZ_TITLE_VISIBLE: g_value_set_boolean(value, plot->yz.title_visible); break; case PROP_YX_LABEL_MASK: g_value_set_int(value, plot->yx.label_mask); break; case PROP_YX_MAJOR_MASK: g_value_set_int(value, plot->yx.major_mask); break; case PROP_YX_MINOR_MASK: g_value_set_int(value, plot->yx.minor_mask); break; case PROP_YX_TITLE_VISIBLE: g_value_set_boolean(value, plot->yx.title_visible); break; case PROP_ZX_LABEL_MASK: g_value_set_int(value, plot->zx.label_mask); break; case PROP_ZX_MAJOR_MASK: g_value_set_int(value, plot->zx.major_mask); break; case PROP_ZX_MINOR_MASK: g_value_set_int(value, plot->zx.minor_mask); break; case PROP_ZX_TITLE_VISIBLE: g_value_set_boolean(value, plot->zx.title_visible); break; case PROP_ZY_LABEL_MASK: g_value_set_int(value, plot->zy.label_mask); break; case PROP_ZY_MAJOR_MASK: g_value_set_int(value, plot->zy.major_mask); break; case PROP_ZY_MINOR_MASK: g_value_set_int(value, plot->zy.minor_mask); break; case PROP_ZY_TITLE_VISIBLE: g_value_set_boolean(value, plot->zy.title_visible); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } } static void gtk_plot3d_real_paint (GtkWidget *widget) { GtkPlot3D *plot; GtkPlotText *child_text; GdkPixmap *pixmap; GtkPlotPC *pc; GList *datasets; GList *text; gint width, height, size; gint xoffset, yoffset, xp, yp; gint origin; gdouble pz; GtkPlotVector e[8], o, v[8]; GtkPlotVector vx, vy, vz; gint i; if(!gtk_widget_get_visible(widget)) return; plot = GTK_PLOT3D(widget); xoffset = GTK_PLOT(plot)->internal_allocation.x; yoffset = GTK_PLOT(plot)->internal_allocation.y; width = GTK_PLOT(plot)->internal_allocation.width; height = GTK_PLOT(plot)->internal_allocation.height; pixmap = GTK_PLOT(plot)->drawable; pc = GTK_PLOT(plot)->pc; gtk_plot_pc_gsave(pc); gtk_plot_pc_set_color(pc, >K_PLOT(plot)->background); if(!gtk_plot_is_transparent(GTK_PLOT(plot))) gtk_plot_pc_draw_rectangle (pc, TRUE, xoffset, yoffset, width , height); /* draw frame to guide the eyes*/ /* gdk_draw_rectangle (pixmap, gtk_widget_get_style(widget)->black_gc, FALSE, xoffset, yoffset, width , height); */ /* find origin */ xp = GTK_PLOT(plot)->internal_allocation.x; yp = GTK_PLOT(plot)->internal_allocation.y; size = MIN(width, height) / SQRT2; /* 8 vertices of the cube */ e[0].x = 0; e[0].y = 0; e[0].z = 0; e[1].x = 1; e[1].y = 0; e[1].z = 0; e[2].x = 1; e[2].y = 1; e[2].z = 0; e[3].x = 0; e[3].y = 1; e[3].z = 0; e[4].x = 0; e[4].y = 0; e[4].z = 1; e[5].x = 1; e[5].y = 0; e[5].z = 1; e[6].x = 1; e[6].y = 1; e[6].z = 1; e[7].x = 0; e[7].y = 1; e[7].z = 1; for(i = 0; i < 8; i++){ v[i].x = (1.0 - e[i].x) * plot->ax->ticks.min + e[i].x * plot->ax->ticks.max; v[i].y = (1.0 - e[i].y) * plot->ay->ticks.min + e[i].y * plot->ay->ticks.max; v[i].z = (1.0 - e[i].z) * plot->az->ticks.min + e[i].z * plot->az->ticks.max; } /* Origin for drawing the planes */ origin = 0; o.x = 0.0; o.y = 0.0; o.z = 0.0; for(i = 1; i < 8; i++){ pz = e[i].x * plot->e1.z + e[i].y * plot->e2.z + e[i].z * plot->e3.z ; if(pz > o.z){ o.z = pz; origin = i; } } plot->origin = v[origin]; plot->ax->direction.x = 1.0; plot->ax->direction.y = 0.0; plot->ax->direction.z = 0.0; plot->ay->direction.x = 0.0; plot->ay->direction.y = 1.0; plot->ay->direction.z = 0.0; plot->az->direction.x = 0.0; plot->az->direction.y = 0.0; plot->az->direction.z = 1.0; plot->ax->origin.x = 0.0; plot->ax->origin.y = v[origin].y; plot->ax->origin.z = v[origin].z; plot->ay->origin.y = 0.0; plot->ay->origin.x = v[origin].x; plot->ay->origin.z = v[origin].z; plot->az->origin.z = 0.0; plot->az->origin.x = v[origin].x; plot->az->origin.y = v[origin].y; /* Tick directions */ vx.x = plot->e1.x * (1. - 2. * e[origin].x); vx.y = plot->e1.y * (1. - 2. * e[origin].x); vx.z = plot->e1.z * (1. - 2. * e[origin].x); vy.x = plot->e2.x * (1. - 2. * e[origin].y); vy.y = plot->e2.y * (1. - 2. * e[origin].y); vy.z = plot->e2.z * (1. - 2. * e[origin].y); vz.x = plot->e3.x * (1. - 2. * e[origin].z); vz.y = plot->e3.y * (1. - 2. * e[origin].z); vz.z = plot->e3.z * (1. - 2. * e[origin].z); /* draw planes, ticks & grid lines */ gtk_plot_axis_ticks_recalc(plot->ax); gtk_plot_axis_ticks_recalc(plot->ay); gtk_plot_axis_ticks_recalc(plot->az); if(plot->xy_visible) { /* PLANES */ if(origin == 0 || origin == 1 || origin == 2 || origin == 3) gtk_plot3d_draw_plane(plot, v[0], v[1], v[2], v[3], plot->color_xy); if(origin == 4 || origin == 5 || origin == 6 || origin == 7) gtk_plot3d_draw_plane(plot, v[4], v[5], v[6], v[7], plot->color_xy); /* X AXIS */ plot->ax->major_mask = plot->xy.major_mask; plot->ax->minor_mask = plot->xy.minor_mask; plot->ax->label_mask = plot->xy.label_mask; plot->ax->title_visible = plot->xy.title_visible; o.x = 0.0; o.y = (1.0 - e[origin].y) * plot->ay->ticks.max + e[origin].y * plot->ay->ticks.min - plot->ax->origin.y; o.z = 0.0; gtk_plot3d_draw_grids(plot, plot->ax, o); gtk_plot3d_draw_axis(plot, plot->ax, vy, o); gtk_plot3d_draw_labels(plot, plot->ax, o); /* Y AXIS */ plot->ay->major_mask = plot->yx.major_mask; plot->ay->minor_mask = plot->yx.minor_mask; plot->ay->label_mask = plot->yx.label_mask; plot->ay->title_visible = plot->yx.title_visible; o.x = (1.0 - e[origin].x) * plot->ax->ticks.max + e[origin].x * plot->ax->ticks.min - plot->ay->origin.x; o.y = 0.0; o.z = 0.0; gtk_plot3d_draw_grids(plot, plot->ay, o); gtk_plot3d_draw_axis(plot, plot->ay, vx, o); gtk_plot3d_draw_labels(plot, plot->ay, o); } if(plot->yz_visible) { /* PLANES */ if(origin == 0 || origin == 3 || origin == 7 || origin == 4) gtk_plot3d_draw_plane(plot, v[0], v[3], v[7], v[4], plot->color_yz); if(origin == 1 || origin == 2 || origin == 6 || origin == 5) gtk_plot3d_draw_plane(plot, v[1], v[2], v[6], v[5], plot->color_yz); /* Y AXIS */ plot->ay->major_mask = plot->yz.major_mask; plot->ay->minor_mask = plot->yz.minor_mask; plot->ay->label_mask = plot->yz.label_mask; plot->ay->title_visible = plot->yz.title_visible; o.x = 0.0; o.y = 0.0; o.z = (1.0 - e[origin].z) * plot->az->ticks.max + e[origin].z * plot->az->ticks.min - plot->ay->origin.z; gtk_plot3d_draw_grids(plot, plot->ay, o); gtk_plot3d_draw_axis(plot, plot->ay, vz, o); gtk_plot3d_draw_labels(plot, plot->ay, o); /* Z AXIS */ plot->az->major_mask = plot->zy.major_mask; plot->az->minor_mask = plot->zy.minor_mask; plot->az->label_mask = plot->zy.label_mask; plot->az->title_visible = plot->zy.title_visible; o.x = 0.0; o.y = (1.0 - e[origin].y) * plot->ay->ticks.max + e[origin].y * plot->ay->ticks.min - plot->az->origin.y; o.z = 0.0; gtk_plot3d_draw_grids(plot, plot->az, o); gtk_plot3d_draw_axis(plot, plot->az, vy, o); gtk_plot3d_draw_labels(plot, plot->az, o); } if(plot->zx_visible) { /* PLANES */ if(origin == 0 || origin == 4 || origin == 5 || origin == 1) gtk_plot3d_draw_plane(plot, v[0], v[4], v[5], v[1], plot->color_zx); if(origin == 3 || origin == 7 || origin == 6 || origin == 2) gtk_plot3d_draw_plane(plot, v[3], v[7], v[6], v[2], plot->color_zx); /* Z AXIS */ plot->az->major_mask = plot->zx.major_mask; plot->az->minor_mask = plot->zx.minor_mask; plot->az->label_mask = plot->zx.label_mask; plot->az->title_visible = plot->zx.title_visible; o.x = (1.0 - e[origin].x) * plot->ax->ticks.max + e[origin].x * plot->ax->ticks.min - plot->az->origin.x; o.y = 0.0; o.z = 0.0; gtk_plot3d_draw_grids(plot, plot->az, o); gtk_plot3d_draw_axis(plot, plot->az, vx, o); gtk_plot3d_draw_labels(plot, plot->az, o); /* X AXIS */ plot->ax->major_mask = plot->xz.major_mask; plot->ax->minor_mask = plot->xz.minor_mask; plot->ax->label_mask = plot->xz.label_mask; plot->ax->title_visible = plot->xz.title_visible; o.x = 0.0; o.y = 0.0; o.z = (1.0 - e[origin].z) * plot->az->ticks.max + e[origin].z * plot->az->ticks.min - plot->ax->origin.z; gtk_plot3d_draw_grids(plot, plot->ax, o); gtk_plot3d_draw_axis(plot, plot->ax, vz, o); gtk_plot3d_draw_labels(plot, plot->ax, o); } datasets = GTK_PLOT(plot)->data_sets; while(datasets) { GtkPlotData *dataset; dataset = GTK_PLOT_DATA(datasets->data); gtk_plot_data_paint(dataset); datasets = datasets->next; } if(plot->corner_visible){ gdouble px0, py0, pz0; gdouble px, py, pz; gint corner; gint end[3]; corner = origin + 2; if(corner > 3) corner -= 4; end[0] = corner; corner += 4; if(corner > 7) corner -= 8; end[1] = corner + 1; if(end[1] == 8 || end[1] == 4) end[1] -= 4; end[2] = corner - 1; if(end[2] == -1 || end[2] == 3) end[2] += 4; gtk_plot3d_get_pixel(plot, v[corner].x, v[corner].y, v[corner].z, &px0, &py0, &pz0); for (i = 0; i < 3; i++){ gtk_plot3d_get_pixel(plot, v[end[i]].x, v[end[i]].y, v[end[i]].z, &px, &py, &pz); gtk_plot_draw_line(GTK_PLOT(plot), plot->corner, px0, py0, px, py); } } text = GTK_PLOT(plot)->text; while(text) { child_text = (GtkPlotText *) text->data; gtk_plot_draw_text(GTK_PLOT(plot), *child_text); text = text->next; } GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->draw_legends(GTK_WIDGET(plot)); gtk_plot_pc_grestore(pc); } /** * gtk_plot3d_new: * @drawable: a Gdk drawable. * * * * Return value: */ GtkWidget* gtk_plot3d_new (GdkDrawable *drawable) { GtkWidget *plot; plot = gtk_widget_new (gtk_plot3d_get_type (), NULL); gtk_plot3d_construct(GTK_PLOT3D(plot), drawable); return plot; } /** * gtk_plot3d_construct: * @plot: a #GtkPlot3D widget. * @drawable: a Gdk drawable. * * */ void gtk_plot3d_construct(GtkPlot3D *plot, GdkDrawable *drawable) { GTK_PLOT(plot)->drawable = drawable; } /** * gtk_plot3d_new_with_size: * @drawable: a Gdk drawable. * @width: * @height: * * * * Return value: */ GtkWidget* gtk_plot3d_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height) { GtkWidget *plot; plot = gtk_widget_new (gtk_plot3d_get_type (), NULL); gtk_plot3d_construct_with_size(GTK_PLOT3D(plot), drawable, width, height); return(plot); } /** * gtk_plot3d_construct_with_size: * @plot: a #GtkPlot3D widget. * @drawable: a Gdk drawable. * @width: * @height: * * */ void gtk_plot3d_construct_with_size(GtkPlot3D *plot, GdkDrawable *drawable, gdouble width, gdouble height) { gtk_plot3d_construct(plot, drawable); gtk_plot_resize (GTK_PLOT(plot), width, height); } /** * gtk_plot3d_draw_plane: * @plot: a #GtkPlot3D widget. * @v1: * @v2: * @v3: * @v4: * * */ static void gtk_plot3d_draw_plane(GtkPlot3D *plot, GtkPlotVector v1, GtkPlotVector v2, GtkPlotVector v3, GtkPlotVector v4, GdkColor background) { GtkWidget *widget; GdkPixmap *pixmap; GtkPlotPC *pc; GtkPlotVector v[4]; GtkPlotPoint p[4]; gdouble px, py, pz; gint i; widget = GTK_WIDGET(plot); if(!gtk_widget_get_visible(widget)) return; pixmap = GTK_PLOT(plot)->drawable; pc = GTK_PLOT(plot)->pc; gtk_plot_pc_set_color(pc, &background); v[0] = v1; v[1] = v2; v[2] = v3; v[3] = v4; for(i = 0; i < 4; i++){ gtk_plot3d_get_pixel(plot, v[i].x, v[i].y, v[i].z, &px, &py, &pz); p[i].x = px; p[i].y = py; } gtk_plot_pc_draw_polygon(pc, TRUE, p, 4); gtk_plot_pc_set_color(pc, &plot->frame.color); gtk_plot_pc_set_lineattr(pc, plot->frame.line_width, plot->frame.line_style == GTK_PLOT_LINE_SOLID ? GDK_LINE_SOLID : GDK_LINE_ON_OFF_DASH, 0, 0); if(plot->frame.line_style != GTK_PLOT_LINE_NONE) gtk_plot_pc_draw_polygon(pc, FALSE, p, 4); } static void gtk_plot3d_draw_grids(GtkPlot3D *plot, GtkPlotAxis *axis, GtkPlotVector delta) { GtkWidget *widget; gdouble xx; GtkPlotLine major_grid, minor_grid; gdouble x1, x2, y1, y2; gint size, width, height; gdouble xp, yp, oz; gint ntick; widget = GTK_WIDGET(plot); xp = GTK_PLOT(plot)->internal_allocation.x; yp = GTK_PLOT(plot)->internal_allocation.y; width = GTK_PLOT(plot)->internal_allocation.width; height = GTK_PLOT(plot)->internal_allocation.height; size = MIN(width, height) / SQRT2; major_grid = GTK_PLOT(plot)->left->major_grid; minor_grid = GTK_PLOT(plot)->left->minor_grid; switch(axis->orientation){ case GTK_PLOT_AXIS_X: major_grid = GTK_PLOT(plot)->left->major_grid; minor_grid = GTK_PLOT(plot)->left->minor_grid; break; case GTK_PLOT_AXIS_Y: major_grid = GTK_PLOT(plot)->bottom->major_grid; minor_grid = GTK_PLOT(plot)->bottom->minor_grid; break; case GTK_PLOT_AXIS_Z: major_grid = GTK_PLOT(plot)->top->major_grid; minor_grid = GTK_PLOT(plot)->top->minor_grid; break; } if(axis->show_minor_grid) { for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ if(!axis->ticks.values[ntick].minor) continue; if(axis->ticks.values[ntick].value >= axis->ticks.min){ xx = axis->ticks.values[ntick].value; gtk_plot3d_get_pixel(plot, axis->origin.x + axis->direction.x * xx, axis->origin.y + axis->direction.y * xx, axis->origin.z + axis->direction.z * xx, &x1, &y1, &oz); gtk_plot3d_get_pixel(plot, axis->origin.x + axis->direction.x * xx + delta.x, axis->origin.y + axis->direction.y * xx + delta.y, axis->origin.z + axis->direction.z * xx + delta.z, &x2, &y2, &oz); gtk_plot_draw_line(GTK_PLOT(plot), minor_grid, x1, y1, x2, y2); } } } if(axis->show_major_grid) { for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ if(axis->ticks.values[ntick].minor) continue; if(axis->ticks.values[ntick].value > axis->ticks.min && axis->ticks.values[ntick].value < axis->ticks.max){ xx = axis->ticks.values[ntick].value; gtk_plot3d_get_pixel(plot, axis->origin.x + axis->direction.x * xx, axis->origin.y + axis->direction.y * xx, axis->origin.z + axis->direction.z * xx, &x1, &y1, &oz); gtk_plot3d_get_pixel(plot, axis->origin.x + axis->direction.x * xx + delta.x, axis->origin.y + axis->direction.y * xx + delta.y, axis->origin.z + axis->direction.z * xx + delta.z, &x2, &y2, &oz); gtk_plot_draw_line(GTK_PLOT(plot), major_grid, x1, y1, x2, y2); } } } } static void gtk_plot3d_draw_axis(GtkPlot3D *plot, GtkPlotAxis *axis, GtkPlotVector tick, GtkPlotVector delta) { GtkWidget *widget; GtkPlotPC *pc; gdouble xx; gint line_width; gint xp, yp, width, height; gint ntick; gdouble m; gdouble oz; gdouble x1, x2, y1, y2; gint size; gint ticks_length; widget = GTK_WIDGET(plot); pc = GTK_PLOT(plot)->pc; xp = GTK_PLOT(plot)->internal_allocation.x; yp = GTK_PLOT(plot)->internal_allocation.y; width = GTK_PLOT(plot)->internal_allocation.width; height = GTK_PLOT(plot)->internal_allocation.height; m = GTK_PLOT(plot)->magnification; size = MIN(width, height) / SQRT2; line_width = plot->frame.line_width; gtk_plot_pc_set_color(pc, &plot->frame.color); gtk_plot_pc_set_lineattr(pc, line_width, 0, 3, 0); /* gtk_plot_pc_draw_line(pc, x1, y1, x2, y2); */ gtk_plot_pc_set_lineattr(pc, axis->ticks_width, 0, 1, 0); for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ xx = axis->ticks.values[ntick].value; if(!axis->ticks.values[ntick].minor){ ticks_length = axis->ticks_length; gtk_plot3d_get_pixel(plot, axis->origin.x + axis->direction.x * xx + delta.x, axis->origin.y + axis->direction.y * xx + delta.y, axis->origin.z + axis->direction.z * xx + delta.z, &x1, &y1, &oz); if(xx >= axis->ticks.min){ x2 = x1 + m * ticks_length * tick.x; y2 = y1 + m * ticks_length * tick.y; if(axis->major_mask == GTK_PLOT_TICKS_OUT) gtk_plot_pc_draw_line(pc, x1, y1, x2, y2); x2 = x1 - m * axis->ticks_length * tick.x; y2 = y1 - m * axis->ticks_length * tick.y; if(axis->major_mask == GTK_PLOT_TICKS_IN) gtk_plot_pc_draw_line(pc, x1, y1, x2, y2); } } else { ticks_length = axis->ticks_length / 2.; gtk_plot3d_get_pixel(plot, axis->origin.x + axis->direction.x * xx + delta.x, axis->origin.y + axis->direction.y * xx + delta.y, axis->origin.z + axis->direction.z * xx + delta.z, &x1, &y1, &oz); if(xx >= axis->ticks.min){ x2 = x1 + m * ticks_length * tick.x; y2 = y1 + m * ticks_length * tick.y; if(axis->minor_mask == GTK_PLOT_TICKS_OUT) gtk_plot_pc_draw_line(pc, x1, y1, x2, y2); x2 = x1 - m * axis->ticks_length * tick.x; y2 = y1 - m * axis->ticks_length * tick.y; if(axis->minor_mask == GTK_PLOT_TICKS_IN) gtk_plot_pc_draw_line(pc, x1, y1, x2, y2); } } } } static void gtk_plot3d_draw_labels(GtkPlot3D *plot, GtkPlotAxis *axis, GtkPlotVector delta) { GtkWidget *widget; GtkPlotPC *pc; GtkPlotText title, tick; gchar label[100]; gdouble tick_value; gdouble xx; gint text_height, text_width, ascent, descent; gint xp, yp, width, height; gint ntick; gdouble m; gdouble size, ox, oy, oz; gdouble y = 0; GtkPlotVector ticks_direction, center, aux; gdouble proj; gboolean veto = FALSE; GtkAllocation allocation; widget = GTK_WIDGET(plot); pc = GTK_PLOT(plot)->pc; xp = GTK_PLOT(plot)->internal_allocation.x; yp = GTK_PLOT(plot)->internal_allocation.y; width = GTK_PLOT(plot)->internal_allocation.width; height = GTK_PLOT(plot)->internal_allocation.height; size = MIN(width, height) / SQRT2; m = GTK_PLOT(plot)->magnification; gtk_plot_pc_set_color (pc, &axis->labels_attr.fg); gtk_plot_text_get_size("0", 0, axis->labels_attr.font, roundint(axis->labels_attr.height * m), &text_width, &text_height, &ascent, &descent); switch(axis->labels_attr.angle){ case 0: y += text_height / 2.; break; case 90: break; case 180: y -= text_height / 2.; break; case 270: break; } tick = axis->labels_attr; center.x = (plot->ax->ticks.max + plot->ax->ticks.min) / 2.0; center.y = (plot->ay->ticks.max + plot->ay->ticks.min) / 2.0; center.z = (plot->az->ticks.max + plot->az->ticks.min) / 2.0; ticks_direction.x = axis->origin.x + delta.x - center.x; ticks_direction.y = axis->origin.y + delta.y - center.y; ticks_direction.z = axis->origin.z + delta.z - center.z; proj = ticks_direction.x * axis->direction.x + ticks_direction.y * axis->direction.y + ticks_direction.z * axis->direction.z; ticks_direction.x -= proj * axis->direction.x; ticks_direction.y -= proj * axis->direction.y; ticks_direction.z -= proj * axis->direction.z; proj = sqrt(ticks_direction.x * ticks_direction.x + ticks_direction.y * ticks_direction.y + ticks_direction.z * ticks_direction.z); ticks_direction.x /= proj; ticks_direction.y /= proj; ticks_direction.z /= proj; aux = ticks_direction; ticks_direction.x = aux.x*plot->e1.x + aux.y*plot->e2.x + aux.z*plot->e3.x; ticks_direction.y = aux.x*plot->e1.y + aux.y*plot->e2.y + aux.z*plot->e3.y; ticks_direction.z = aux.x*plot->e1.z + aux.y*plot->e2.z + aux.z*plot->e3.z; for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ if(axis->ticks.values[ntick].minor) continue; xx = axis->ticks.values[ntick].value; gtk_plot3d_get_pixel(plot, axis->origin.x + axis->direction.x * xx + delta.x, axis->origin.y + axis->direction.y * xx + delta.y, axis->origin.z + axis->direction.z * xx + delta.z, &ox, &oy, &oz); tick.x = ox + axis->labels_offset * ticks_direction.x; tick.y = oy + axis->labels_offset * ticks_direction.y; tick_value = axis->ticks.values[ntick].value; if(tick_value >= axis->ticks.min-1.e-9){ if(!axis->custom_labels){ gtk_plot_axis_parse_label(axis, tick_value, axis->label_precision, axis->label_style, label); } else { g_signal_emit_by_name(GTK_OBJECT(axis), "tick_label", &tick_value, label, &veto); if(!veto) gtk_plot_axis_parse_label(axis, tick_value, axis->label_precision, axis->label_style, label); } tick.text = label; gtk_widget_get_allocation(widget, &allocation); if(axis->label_mask == GTK_PLOT_LABEL_OUT){ tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(GTK_PLOT(plot), tick); } } } if(axis->title_visible && axis->title.text) { title = axis->title; gtk_plot3d_get_pixel(plot, axis->origin.x + center.x * axis->direction.x + delta.x, axis->origin.y + center.y * axis->direction.y + delta.y, axis->origin.z + center.z * axis->direction.z + delta.z, &ox, &oy, &oz); title.x = ox + plot->titles_offset * ticks_direction.x; title.y = oy + plot->titles_offset * ticks_direction.y; title.x = title.x / (gdouble)allocation.width; title.y = title.y / (gdouble)allocation.height; gtk_plot_draw_text(GTK_PLOT(plot), title); } } gdouble get_clean_tick_size(gdouble delta) { gint magnitude; delta/= 5.0; if (delta<0.0) delta*= -1.0; magnitude= (gint)(floor(log10(delta))); return ceil(delta/pow(10,magnitude))*pow(10,magnitude); } /****************************************** ******************************************/ /** * gtk_plot3d_autoscale: * @plot: a #GtkPlot3D widget. * * */ void gtk_plot3d_autoscale(GtkPlot3D *plot) { GList *datasets; gdouble xmin, xmax, ymin, ymax, zmin, zmax; gint px, py, pz; gint first=1; if(!GTK_PLOT(plot)->data_sets) return; xmin = GTK_PLOT(plot)->bottom->ticks.max; xmax = GTK_PLOT(plot)->bottom->ticks.min; ymin = GTK_PLOT(plot)->left->ticks.max; ymax = GTK_PLOT(plot)->left->ticks.min; zmin = GTK_PLOT(plot)->top->ticks.max; zmax = GTK_PLOT(plot)->top->ticks.min; datasets = GTK_PLOT(plot)->data_sets; while(datasets){ GtkPlotData *data; gint i; data = GTK_PLOT_DATA(datasets->data); if(!data->is_function){ if(GTK_IS_PLOT_SURFACE(data)) if(GTK_PLOT_SURFACE(data)->use_amplitud) gtk_plot_data_gradient_autoscale_a(data); else gtk_plot_data_gradient_autoscale_z(data); else gtk_plot_data_gradient_autoscale_a(data); for (i = 0; i < data->num_points; i++){ gdouble x, y, z, a, dx, dy, dz, da; gchar *label; gboolean error; gtk_plot_data_get_point(data, i, &x, &y, &z, &a, &dx, &dy, &dz, &da, &label, &error); if (first) { first = 0; xmin = xmax = x; ymin = ymax = y; zmin = zmax = z; } else { xmin = MIN(xmin, x); xmax = MAX(xmax, x); ymin = MIN(ymin, y); ymax = MAX(ymax, y); zmin = MIN(zmin, z); zmax = MAX(zmax, z); } } } datasets = datasets->next; } gtk_plot_axis_ticks_autoscale(plot->ax, xmin, xmax, &px); gtk_plot_axis_ticks_autoscale(plot->ay, ymin, ymax, &py); gtk_plot_axis_ticks_autoscale(plot->az, zmin, zmax, &pz); plot->ax->label_precision = px; plot->ay->label_precision = py; plot->az->label_precision = pz; GTK_PLOT(plot)->xmin = plot->ax->ticks.min; GTK_PLOT(plot)->xmax = plot->ax->ticks.max; GTK_PLOT(plot)->ymin = plot->ay->ticks.min; GTK_PLOT(plot)->ymax = plot->ay->ticks.max; plot->zmin = plot->az->ticks.min; plot->zmax = plot->az->ticks.max; g_signal_emit_by_name(GTK_OBJECT(plot), "update", TRUE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_rotate: * @plot: a #GtkPlot3D widget. * @angle_x: * @angle_y: * @angle_z: * * */ void gtk_plot3d_rotate(GtkPlot3D *plot, gdouble angle_x, gdouble angle_y, gdouble angle_z) { gtk_plot3d_rotate_vector(plot, &plot->e1, angle_x, angle_y, angle_z); gtk_plot3d_rotate_vector(plot, &plot->e2, angle_x, angle_y, angle_z); gtk_plot3d_rotate_vector(plot, &plot->e3, angle_x, angle_y, angle_z); g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_rotate_vector: * @plot: a #GtkPlot3D widget. * @a1: * @a2: * @a3: * * */ void gtk_plot3d_rotate_vector(GtkPlot3D *plot, GtkPlotVector *vector, gdouble a1, gdouble a2, gdouble a3) { GtkPlotVector v; gdouble cos1, sin1; gdouble cos2, sin2; gdouble cos3, sin3; if(a1 < 0) a1 = 360 + a1; if(a2 < 0) a2 = 360 + a2; if(a3 < 0) a3 = 360 + a3; cos1 = plot->ncos[(int)a1%360]; sin1 = plot->nsin[(int)a1%360]; cos2 = plot->ncos[(int)a2%360]; sin2 = plot->nsin[(int)a2%360]; cos3 = plot->ncos[(int)a3%360]; sin3 = plot->nsin[(int)a3%360]; v.y = vector->y*cos1 - vector->z*sin1; v.z = vector->z*cos1 + vector->y*sin1; vector->y = v.y; vector->z = v.z; v.z = vector->z*cos2 - vector->x*sin2; v.x = vector->x*cos2 + vector->z*sin2; vector->x = v.x; vector->z = v.z; v.x = vector->x*cos3 - vector->y*sin3; v.y = vector->y*cos3 + vector->x*sin3; vector->x = v.x; vector->y = v.y; } /** * gtk_plot3d_get_pixel: * @plot: a #GtkPlot3D widget. * @x: * @y: * @z: * @px: * @py: * @pz: * * */ void gtk_plot3d_get_pixel(GtkPlot3D *plot, gdouble x, gdouble y, gdouble z, gdouble *px, gdouble *py, gdouble *pz) { GTK_PLOT3D_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->get_pixel(GTK_WIDGET(plot), x, y, z, px, py, pz); } static void gtk_plot3d_real_get_pixel(GtkWidget *widget, gdouble x, gdouble y, gdouble z, gdouble *px, gdouble *py, gdouble *pz) { GtkPlot3D *plot; GtkPlotVector e1, e2, e3, center; gint xp, yp, width, height, size; gdouble rx, ry, rz; gdouble cx, cy, cz; plot = GTK_PLOT3D(widget); xp = GTK_PLOT(plot)->internal_allocation.x; yp = GTK_PLOT(plot)->internal_allocation.y; width = GTK_PLOT(plot)->internal_allocation.width; height =GTK_PLOT(plot)->internal_allocation.height; size = MIN(width, height) / SQRT2; e1 = plot->e1; e2 = plot->e2; e3 = plot->e3; ry = gtk_plot_axis_ticks_transform(plot->ay, y); rx = gtk_plot_axis_ticks_transform(plot->ax, x); rz = gtk_plot_axis_ticks_transform(plot->az, z); center = plot->center; cx = -(center.x * e1.x + center.y * e2.x + center.z * e3.x); cy = -(center.x * e1.y + center.y * e2.y + center.z * e3.y); cz = -(center.x * e1.z + center.y * e2.z + center.z * e3.z); *px = xp + width / 2.; *py = yp + height / 2.; *pz = 0.0; *px += (cx + rx * e1.x + ry * e2.x + rz * e3.x) * size; *py += (cy + rx * e1.y + ry * e2.y + rz * e3.y) * size; *pz += (cz + rx * e1.z + ry * e2.z + rz * e3.z) * size; } /***********************************************************/ /*********************************************************** * gtk_plot3d_set_xrange * gtk_plot3d_set_yrange * gtk_plot3d_set_zrange * gtk_plot3d_set_xfactor * gtk_plot3d_set_yfactor * gtk_plot3d_set_zfactor * gtk_plot3d_get_xfactor * gtk_plot3d_get_yfactor * gtk_plot3d_get_zfactor ***********************************************************/ /** * gtk_plot3d_set_xrange: * @plot: a #GtkPlot3D widget. * @min: * @max: * * */ void gtk_plot3d_set_xrange(GtkPlot3D *plot, gdouble min, gdouble max) { if(min > max) return; GTK_PLOT(plot)->xmin = min; GTK_PLOT(plot)->xmax = max; plot->ax->ticks.min = min; plot->ax->ticks.max = max; gtk_plot_axis_ticks_recalc(plot->ax); g_signal_emit_by_name(GTK_OBJECT(plot), "update", TRUE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_set_yrange: * @plot: a #GtkPlot3D widget. * @min: * @max: * * */ void gtk_plot3d_set_yrange(GtkPlot3D *plot, gdouble min, gdouble max) { if(min > max) return; GTK_PLOT(plot)->ymin = min; GTK_PLOT(plot)->ymax = max; plot->ay->ticks.min = min; plot->ay->ticks.max = max; gtk_plot_axis_ticks_recalc(plot->ay); g_signal_emit_by_name(GTK_OBJECT(plot), "update", TRUE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_set_zrange: * @plot: a #GtkPlot3D widget. * @min: * @max: * * */ void gtk_plot3d_set_zrange(GtkPlot3D *plot, gdouble min, gdouble max) { if(min > max) return; plot->zmin = min; plot->zmax = max; plot->az->ticks.min = min; plot->az->ticks.max = max; gtk_plot_axis_ticks_recalc(plot->az); g_signal_emit_by_name(GTK_OBJECT(plot), "update", TRUE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_set_xfactor: * @plot: a #GtkPlot3D widget. * @xfactor: * * */ void gtk_plot3d_set_xfactor(GtkPlot3D *plot, gdouble xfactor) { if(xfactor <= 0.0) return; plot->e1.x /= plot->xfactor; plot->e1.y /= plot->xfactor; plot->e1.z /= plot->xfactor; plot->xfactor = xfactor; plot->e1.x *= plot->xfactor; plot->e1.y *= plot->xfactor; plot->e1.z *= plot->xfactor; plot->ax->direction = plot->e1; g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_set_yfactor: * @plot: a #GtkPlot3D widget. * @yfactor: * * */ void gtk_plot3d_set_yfactor(GtkPlot3D *plot, gdouble yfactor) { if(yfactor <= 0.0) return; plot->e2.x /= plot->yfactor; plot->e2.y /= plot->yfactor; plot->e2.z /= plot->yfactor; plot->yfactor = yfactor; plot->e2.x *= plot->yfactor; plot->e2.y *= plot->yfactor; plot->e2.z *= plot->yfactor; plot->ay->direction = plot->e1; g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_set_zfactor: * @plot: a #GtkPlot3D widget. * @zfactor: * * */ void gtk_plot3d_set_zfactor(GtkPlot3D *plot, gdouble zfactor) { if(zfactor <= 0.0) return; plot->e3.x /= plot->zfactor; plot->e3.y /= plot->zfactor; plot->e3.z /= plot->zfactor; plot->zfactor = zfactor; plot->e3.x *= plot->zfactor; plot->e3.y *= plot->zfactor; plot->e3.z *= plot->zfactor; plot->az->direction = plot->e1; g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_get_xfactor: * @plot: a #GtkPlot3D widget. * * * * Return value: */ gdouble gtk_plot3d_get_xfactor(GtkPlot3D *plot) { return (plot->xfactor); } /** * gtk_plot3d_get_yfactor: * @plot: a #GtkPlot3D widget. * * * * Return value: */ gdouble gtk_plot3d_get_yfactor(GtkPlot3D *plot) { return (plot->yfactor); } /** * gtk_plot3d_get_zfactor: * @plot: a #GtkPlot3D widget. * * * * Return value: */ gdouble gtk_plot3d_get_zfactor(GtkPlot3D *plot) { return (plot->zfactor); } /*********************************************************** * gtk_plot3d_plane_set_color * gtk_plot3d_plane_set_visible * gtk_plot3d_plane_visible ***********************************************************/ /** * gtk_plot3d_plane_set_color: * @plane: * @color: * * */ void gtk_plot3d_plane_set_color (GtkPlot3D *plot, GtkPlotPlane plane, const GdkColor *color) { switch(plane){ case GTK_PLOT_PLANE_XY: plot->color_xy = *color; break; case GTK_PLOT_PLANE_YZ: plot->color_yz = *color; break; case GTK_PLOT_PLANE_ZX: plot->color_zx = *color; break; default: break; } } /** * gtk_plot3d_plane_set_visible: * @plane: * @visible: * * */ void gtk_plot3d_plane_set_visible (GtkPlot3D *plot, GtkPlotPlane plane, gboolean visible) { switch(plane){ case GTK_PLOT_PLANE_XY: plot->xy_visible = visible; break; case GTK_PLOT_PLANE_YZ: plot->yz_visible = visible; break; case GTK_PLOT_PLANE_ZX: plot->zx_visible = visible; break; default: break; } } /** * gtk_plot3d_plane_visible: * @plot: a #GtkPlot3D widget. * @plane: * * * * Return value: */ gboolean gtk_plot3d_plane_visible (GtkPlot3D *plot, GtkPlotPlane plane) { gboolean visible = FALSE; switch(plane){ case GTK_PLOT_PLANE_XY: visible = plot->xy_visible; break; case GTK_PLOT_PLANE_YZ: visible = plot->yz_visible; break; case GTK_PLOT_PLANE_ZX: visible = plot->zx_visible; break; default: break; } return visible; } /*********************************************************** * gtk_plot3d_corner_set_visible * gtk_plot3d_corner_visible * gtk_plot3d_corner_set_attributes * gtk_plot3d_corner_get_attributes * gtk_plot3d_frame_set_attributes * gtk_plot3d_frame_get_attributes * gtk_plot3d_show_labels * gtk_plot3d_show_title * gtk_plot3d_hide_title * gtk_plot3d_show_major_ticks * gtk_plot3d_show_minor_ticks * gtk_plot3d_set_ticks * gtk_plot3d_set_major_ticks * gtk_plot3d_set_minor_ticks * gtk_plot3d_set_ticks_length * gtk_plot3d_set_ticks_width * gtk_plot3d_show_ticks * gtk_plot3d_set_titles_offset * gtk_plot3d_get_titles_offset ***********************************************************/ /** * gtk_plot3d_corner_set_visible: * @plot: a #GtkPlot3D widget. * @visible: * * */ void gtk_plot3d_corner_set_visible(GtkPlot3D *plot, gboolean visible) { plot->corner_visible = visible; } /** * gtk_plot3d_corner_visible: * @plot: a #GtkPlot3D widget. * * * * Return value: */ gboolean gtk_plot3d_corner_visible(GtkPlot3D *plot) { return (plot->corner_visible); } /** * gtk_plot3d_corner_set_attributes: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_corner_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color) { plot->corner.line_style = style; plot->corner.line_width = width; if(color) plot->corner.color = *color; } /** * gtk_plot3d_corner_get_attribute: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_corner_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color) { *style = plot->corner.line_style; *width = plot->corner.line_width; *color = plot->corner.color; } /** * gtk_plot3d_frame_set_attributes: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_frame_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color) { plot->frame.line_style = style; plot->frame.line_width = width; if(color) plot->frame.color = *color; } /** * gtk_plot3d_frame_get_attributes: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_frame_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color) { *style = plot->frame.line_style; *width = plot->frame.line_width; *color = plot->frame.color; } /** * gtk_plot3d_get_axis: * @plot: a #GtkPlot3D widget. * @orientation: of axis to be returned * * Return value: (transfer none) the #GtkPlotAxis with given * orientation */ GtkPlotAxis * gtk_plot3d_get_axis(GtkPlot3D *plot, GtkPlotOrientation orientation) { GtkPlotAxis *axis = NULL; switch(orientation){ case GTK_PLOT_AXIS_X: axis = plot->ax; break; case GTK_PLOT_AXIS_Y: axis = plot->ay; break; case GTK_PLOT_AXIS_Z: axis = plot->az; break; default: axis = NULL; break; } return axis; } /** * gtk_plot3d_get_side: * @plot: a #GtkPlot3D widget. * @side: #GtkPlotSide of the wanted axis * * Return value: (transfer none): the #GtkPlotAxis on the given * side */ GtkPlotAxis * gtk_plot3d_get_side(GtkPlot3D *plot, GtkPlotSide side) { GtkPlotAxis *axis = NULL; switch(side){ case GTK_PLOT_SIDE_XY: axis = &plot->xy; break; case GTK_PLOT_SIDE_XZ: axis = &plot->xz; break; case GTK_PLOT_SIDE_YX: axis = &plot->yx; break; case GTK_PLOT_SIDE_YZ: axis = &plot->yz; break; case GTK_PLOT_SIDE_ZX: axis = &plot->zx; break; case GTK_PLOT_SIDE_ZY: axis = &plot->zy; break; default: axis = NULL; } return axis; } /** * gtk_plot3d_show_labels: * @plot: a #GtkPlot3D widget. * @side: * @label_mask: * * */ void gtk_plot3d_show_labels (GtkPlot3D *plot, GtkPlotSide side, gint label_mask) { GtkPlotAxis *axis; axis = gtk_plot3d_get_side(plot, side); axis->label_mask = label_mask; } /** * gtk_plot3d_show_title: * @plot: a #GtkPlot3D widget. * @side: * * */ void gtk_plot3d_show_title (GtkPlot3D *plot, GtkPlotSide side) { GtkPlotAxis *axis; axis = gtk_plot3d_get_side(plot, side); axis->title_visible = TRUE; } /** * gtk_plot3d_hide_title: * @plot: a #GtkPlot3D widget. * @side: * * */ void gtk_plot3d_hide_title (GtkPlot3D *plot, GtkPlotSide side) { GtkPlotAxis *axis; axis = gtk_plot3d_get_side(plot, side); axis->title_visible = FALSE; } /** * gtk_plot3d_show_major_ticks: * @plot: a #GtkPlot3D widget. * @side: * @ticks_mask: * * */ void gtk_plot3d_show_major_ticks (GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask) { GtkPlotAxis *axis; axis = gtk_plot3d_get_side(plot, side); axis->major_mask = ticks_mask; } /** * gtk_plot3d_show_minor_ticks: * @plot: a #GtkPlot3D widget. * @side: * @ticks_mask: * * */ void gtk_plot3d_show_minor_ticks(GtkPlot3D *plot, GtkPlotSide side, gint ticks_mask) { GtkPlotAxis *axis; axis = gtk_plot3d_get_side(plot, side); axis->minor_mask = ticks_mask; } /** * gtk_plot3d_set_ticks: * @plot: a #GtkPlot3D widget. * @direction: * @major_step: * @nminor: * * */ void gtk_plot3d_set_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step, gint nminor) { GtkPlotAxis *axis; axis = gtk_plot3d_get_axis(plot, direction); axis->ticks.step = major_step; axis->ticks.nminor = nminor; } /** * gtk_plot3d_set_major_ticks: * @plot: a #GtkPlot3D widget. * @direction: * @major_step: * * */ void gtk_plot3d_set_major_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gdouble major_step) { GtkPlotAxis *axis; axis = gtk_plot3d_get_axis(plot, direction); axis->ticks.step = major_step; } /** * gtk_plot3d_set_minor_ticks: * @plot: a #GtkPlot3D widget. * @direction: * @nminor: * * */ void gtk_plot3d_set_minor_ticks (GtkPlot3D *plot, GtkPlotOrientation direction, gint nminor) { GtkPlotAxis *axis; axis = gtk_plot3d_get_axis(plot, direction); axis->ticks.nminor = nminor; } /** * gtk_plot3d_set_ticks_length: * @plot: a #GtkPlot3D widget. * @direction: * @length: * * */ void gtk_plot3d_set_ticks_length (GtkPlot3D *plot, GtkPlotOrientation direction, gint length) { GtkPlotAxis *axis; axis = gtk_plot3d_get_axis(plot, direction); axis->ticks_length = length; } /** * gtk_plot3d_set_ticks_width: * @plot: a #GtkPlot3D widget. * @direction: * @width: * * */ void gtk_plot3d_set_ticks_width (GtkPlot3D *plot, GtkPlotOrientation direction, gfloat width) { GtkPlotAxis *axis; axis = gtk_plot3d_get_axis(plot, direction); axis->ticks_width = width; } /** * gtk_plot3d_show_ticks: * @plot: a #GtkPlot3D widget. * @side: * @major_mask: * @minor_mask: * * */ void gtk_plot3d_show_ticks (GtkPlot3D *plot, GtkPlotSide side, gint major_mask, gint minor_mask) { GtkPlotAxis *axis; axis = gtk_plot3d_get_side(plot, side); axis->major_mask = major_mask; axis->minor_mask = minor_mask; } /** * gtk_plot3d_set_titles_offset: * @plot: a #GtkPlot3D widget. * @offset * * */ void gtk_plot3d_set_titles_offset (GtkPlot3D *plot, gint offset) { plot->titles_offset = offset; } /** * gtk_plot3d_get_titles_offset: * @plot: a #GtkPlot3D widget. * * * * Return value: */ gint gtk_plot3d_get_titles_offset (GtkPlot3D *plot) { return (plot->titles_offset); } /*********************************************************** * gtk_plot3d_major_grids_set_visible * gtk_plot3d_major_grids_visible * gtk_plot3d_minor_grids_set_visible * gtk_plot3d_minor_grids_visible * gtk_plot3d_major_grids_set_attributes * gtk_plot3d_minor_grids_set_attributes * gtk_plot3d_major_grids_get_attributes * gtk_plot3d_minor_grids_get_attributes ***********************************************************/ /** * gtk_plot3d_major_grids_set_visible: * @plot: a #GtkPlot3D widget. * @x: * @y: * @z: * * */ void gtk_plot3d_major_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z) { plot->ax->show_major_grid = x; plot->ay->show_major_grid = y; plot->az->show_major_grid = z; } /** * gtk_plot3d_minor_grids_set_visible: * @plot: a #GtkPlot3D widget. * @x: * @y: * @z: * * */ void gtk_plot3d_minor_grids_set_visible (GtkPlot3D *plot, gboolean x, gboolean y, gboolean z) { plot->ax->show_minor_grid = x; plot->ay->show_minor_grid = y; plot->az->show_minor_grid = z; } /** * gtk_plot3d_major_grids_visible: * @plot: a #GtkPlot3D widget. * @x: * @y: * @z: * * */ void gtk_plot3d_major_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z) { *x = plot->ax->show_major_grid; *y = plot->ay->show_major_grid; *z = plot->az->show_major_grid; } /** * gtk_plot3d_minor_grids_visible: * @plot: a #GtkPlot3D widget. * @x: * @y: * @z: * * */ void gtk_plot3d_minor_grids_visible (GtkPlot3D *plot, gboolean *x, gboolean *y, gboolean *z) { *x = plot->ax->show_minor_grid; *y = plot->ay->show_minor_grid; *z = plot->az->show_minor_grid; } /** * gtk_plot3d_major_zgrid_set_attributes: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_major_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color) { plot->az->major_grid.line_style = style; plot->az->major_grid.line_width = width; if(color) plot->az->major_grid.color = *color; } /** * gtk_plot3d_minor_zgrid_set_attributes: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_minor_zgrid_set_attributes (GtkPlot3D *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color) { plot->az->minor_grid.line_style = style; plot->az->minor_grid.line_width = width; if(color) plot->az->minor_grid.color = *color; } /** * gtk_plot3d_major_zgrid_get_attributes: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_major_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color) { *style = plot->az->major_grid.line_style; *width = plot->az->major_grid.line_width; *color = plot->az->major_grid.color; } /** * gtk_plot3d_minor_zgrid_get_attributes: * @plot: a #GtkPlot3D widget. * @style: * @width: * @color: * * */ void gtk_plot3d_minor_zgrid_get_attributes (GtkPlot3D *plot, GtkPlotLineStyle *style, gfloat *width, GdkColor *color) { *style = plot->az->minor_grid.line_style; *width = plot->az->minor_grid.line_width; *color = plot->az->minor_grid.color; } /******************************************* * gtk_plot3d_reset_angles * gtk_plot3d_rotate_x * gtk_plot3d_rotate_y * gtk_plot3d_rotate_z *******************************************/ /** * gtk_plot3d_reset_angles: * @plot: a #GtkPlot3D widget. * * */ void gtk_plot3d_reset_angles(GtkPlot3D *plot) { plot->a1 = 0; plot->a2 = 0; plot->a3 = 0; plot->e1.x = plot->xfactor; plot->e1.y = 0.; plot->e1.z = 0.; plot->e2.x = 0.; plot->e2.y = -plot->yfactor; plot->e2.z = 0.; plot->e3.x = 0.; plot->e3.y = 0.; plot->e3.z = -plot->zfactor; g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_rotate_x: * @plot: a #GtkPlot3D widget. * @angle: * * */ void gtk_plot3d_rotate_x(GtkPlot3D *plot, gdouble angle) { GtkPlotVector vector, aux, e1, e2, e3; gdouble c, s; int iangle = (int)angle; iangle = iangle%360; plot->a1 += iangle; iangle = 360 - iangle; iangle = iangle%360; c = plot->ncos[iangle]; s = plot->nsin[iangle]; e1 = plot->e1; e2 = plot->e2; e3 = plot->e3; vector.x = 0.0; vector.y = 1.0; vector.z = 0.0; aux = vector; aux.y = vector.y*c - vector.z*s; aux.z = vector.z*c + vector.y*s; plot->e2.x = aux.x * e1.x / plot->xfactor + aux.y * e2.x / plot->yfactor + aux.z * e3.x / plot->zfactor ; plot->e2.y = aux.x * e1.y / plot->xfactor + aux.y * e2.y / plot->yfactor + aux.z * e3.y / plot->zfactor ; plot->e2.z = aux.x * e1.z / plot->xfactor + aux.y * e2.z / plot->yfactor + aux.z * e3.z / plot->zfactor ; vector.x = 0.0; vector.y = 0.0; vector.z = 1.0; aux = vector; aux.y = vector.y*c - vector.z*s; aux.z = vector.z*c + vector.y*s; plot->e3.x = aux.x * e1.x / plot->xfactor + aux.y * e2.x / plot->yfactor + aux.z * e3.x / plot->zfactor ; plot->e3.y = aux.x * e1.y / plot->xfactor + aux.y * e2.y / plot->yfactor + aux.z * e3.y / plot->zfactor ; plot->e3.z = aux.x * e1.z / plot->xfactor + aux.y * e2.z / plot->yfactor + aux.z * e3.z / plot->zfactor ; plot->e1.x *= plot->xfactor; plot->e1.y *= plot->xfactor; plot->e1.z *= plot->xfactor; plot->e2.x *= plot->yfactor; plot->e2.y *= plot->yfactor; plot->e2.z *= plot->yfactor; plot->e3.x *= plot->zfactor; plot->e3.y *= plot->zfactor; plot->e3.z *= plot->zfactor; g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_rotate_y: * @plot: a #GtkPlot3D widget. * @angle: * * */ void gtk_plot3d_rotate_y(GtkPlot3D *plot, gdouble angle) { GtkPlotVector vector, aux, e1, e2, e3; gdouble c, s; int iangle = (int)angle; iangle = iangle%360; plot->a2 += iangle; iangle = 360 - iangle; iangle = iangle%360; c = plot->ncos[iangle]; s = plot->nsin[iangle]; e1 = plot->e1; e2 = plot->e2; e3 = plot->e3; vector.x = 1.0; vector.y = 0.0; vector.z = 0.0; aux = vector; aux.z = vector.z*c - vector.x*s; aux.x = vector.x*c + vector.z*s; plot->e1.x = aux.x * e1.x / plot->xfactor + aux.y * e2.x / plot->yfactor + aux.z * e3.x / plot->zfactor ; plot->e1.y = aux.x * e1.y / plot->xfactor + aux.y * e2.y / plot->yfactor + aux.z * e3.y / plot->zfactor ; plot->e1.z = aux.x * e1.z / plot->xfactor + aux.y * e2.z / plot->yfactor + aux.z * e3.z / plot->zfactor ; vector.x = 0.0; vector.y = 0.0; vector.z = 1.0; aux = vector; aux.z = vector.z*c - vector.x*s; aux.x = vector.x*c + vector.z*s; plot->e3.x = aux.x * e1.x / plot->xfactor + aux.y * e2.x / plot->yfactor + aux.z * e3.x / plot->zfactor ; plot->e3.y = aux.x * e1.y / plot->xfactor + aux.y * e2.y / plot->yfactor + aux.z * e3.y / plot->zfactor ; plot->e3.z = aux.x * e1.z / plot->xfactor + aux.y * e2.z / plot->yfactor + aux.z * e3.z / plot->zfactor ; plot->e1.x *= plot->xfactor; plot->e1.y *= plot->xfactor; plot->e1.z *= plot->xfactor; plot->e2.x *= plot->yfactor; plot->e2.y *= plot->yfactor; plot->e2.z *= plot->yfactor; plot->e3.x *= plot->zfactor; plot->e3.y *= plot->zfactor; plot->e3.z *= plot->zfactor; g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_rotate_z: * @plot: a #GtkPlot3D widget. * @angle: * * */ void gtk_plot3d_rotate_z(GtkPlot3D *plot, gdouble angle) { GtkPlotVector vector, aux, e1, e2, e3; gdouble c, s; int iangle = (int)angle; iangle = iangle%360; plot->a3 += iangle; iangle = 360 - iangle; iangle = iangle%360; c = plot->ncos[iangle]; s = plot->nsin[iangle]; e1 = plot->e1; e2 = plot->e2; e3 = plot->e3; vector.x = 1.0; vector.y = 0.0; vector.z = 0.0; aux = vector; aux.x = vector.x*c - vector.y*s; aux.y = vector.y*c + vector.x*s; plot->e1.x = aux.x * e1.x / plot->xfactor + aux.y * e2.x / plot->yfactor + aux.z * e3.x / plot->zfactor ; plot->e1.y = aux.x * e1.y / plot->xfactor + aux.y * e2.y / plot->yfactor + aux.z * e3.y / plot->zfactor ; plot->e1.z = aux.x * e1.z / plot->xfactor + aux.y * e2.z / plot->yfactor + aux.z * e3.z / plot->zfactor ; vector.x = 0.0; vector.y = 1.0; vector.z = 0.0; aux = vector; aux.x = vector.x*c - vector.y*s; aux.y = vector.y*c + vector.x*s; plot->e2.x = aux.x * e1.x / plot->xfactor + aux.y * e2.x / plot->yfactor + aux.z * e3.x / plot->zfactor ; plot->e2.y = aux.x * e1.y / plot->xfactor + aux.y * e2.y / plot->yfactor + aux.z * e3.y / plot->zfactor ; plot->e2.z = aux.x * e1.z / plot->xfactor + aux.y * e2.z / plot->yfactor + aux.z * e3.z / plot->zfactor ; plot->e1.x *= plot->xfactor; plot->e1.y *= plot->xfactor; plot->e1.z *= plot->xfactor; plot->e2.x *= plot->yfactor; plot->e2.y *= plot->yfactor; plot->e2.z *= plot->yfactor; plot->e3.x *= plot->zfactor; plot->e3.y *= plot->zfactor; plot->e3.z *= plot->zfactor; g_signal_emit_by_name(GTK_OBJECT(plot), "update", FALSE); g_signal_emit_by_name(GTK_OBJECT(plot), "changed"); } /** * gtk_plot3d_set_scale: * @plot: a #GtkPlot3D widget. * @axis: * @scale: * * */ void gtk_plot3d_set_scale (GtkPlot3D *plot, GtkPlotOrientation axis, GtkPlotScale scale) { GtkPlotAxis *ax; ax = gtk_plot3d_get_axis(plot, axis); ax->ticks.scale = scale; } /** * gtk_plot3d_get_scale: * @plot: a #GtkPlot3D widget. * @axis: * * * * Return value: */ GtkPlotScale gtk_plot3d_get_scale (GtkPlot3D *plot, GtkPlotOrientation axis) { GtkPlotAxis *ax; ax = gtk_plot3d_get_axis(plot, axis); return(ax->ticks.scale); } gtkextra-3.2.0/gtkextra/gtkdataformat.c0000644000076400001440000002161712603754176015135 00000000000000/* gtkdataformat - data formatter * Copyright 2011 Fredy Paquet * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #define __GTKEXTRA_H_INSIDE__ #include "gtkextra-compat.h" #include "gtkdataformat.h" #ifdef DEBUG # define GTK_DATA_FORMAT_DEBUG 0 /* define to activate debug output */ #endif /** * SECTION: gtkdataformat * @short_description: a data formatting library * * the widget property 'dataformat' may contain formatting * instructions for the field contents. Any unrecognized * formatting instruction is silently skipped. * * The formatting process should always be reversible. Thus * formatting can be applied when input focus leaves a field and * removed again when the focus enters a field, without the need * of an additional content buffer. * * the library can be easily extended by adding more * instructions to the list above. * */ #define DEFAULT_DECIMAL_POINT "." /* default radix char */ #define DEFAULT_THOUSANDS_SEP "'" /* default thousands grouping char */ #define MAX_NUM_STRLEN 64 #define NULL_TEXT_REP "" #define INVALID_DATA "?" #define SIGNIFICANT_DIGITS 16 static gchar *insert_thousands_seps(const gchar *cp) { static gchar buf[MAX_NUM_STRLEN]; gchar *radix_cp, c; gint pos; struct lconv *lc = localeconv(); gchar *radix_c = (lc && lc->decimal_point) ? lc->decimal_point : DEFAULT_DECIMAL_POINT; gchar *thousands_c = (lc && lc->thousands_sep) ? lc->thousands_sep : DEFAULT_THOUSANDS_SEP; gint thousands_len = strlen(thousands_c); radix_cp = strstr(cp, radix_c); if (radix_cp) pos = radix_cp - cp; else pos = strlen(cp); for(radix_cp=buf;;) /* copy inserting thousands_c on the fly */ { if (!*cp) break; c = *radix_cp++ = *cp++; --pos; if ((pos > 0) && !(pos % 3) && (c != '-') && (c != '+')) { strcpy(radix_cp, thousands_c); radix_cp += thousands_len; } } *radix_cp++ = '\0'; return(buf); } static gchar *remove_thousands_seps(const gchar *src) { static gchar buf[MAX_NUM_STRLEN]; gchar *dst = buf; gboolean found=FALSE; gint i=0, l = strlen(src); struct lconv *lc = localeconv(); gchar *thousands_c = (lc && lc->thousands_sep) ? lc->thousands_sep : DEFAULT_THOUSANDS_SEP; gint thousands_len = strlen(thousands_c); if (!src) return((gchar *) src); if ((l > 1) && (src[l-1] == '-')) /* handle trailing minus sign */ { if (src[0] == '-') { ++i; --l; } else { *dst++ = '-'; --l; } found=TRUE; } while (i= 0) sprintf(str_buf, "%.*f", comma_digits, d); else sprintf(str_buf, "%.*g", SIGNIFICANT_DIGITS, d); cp = str_buf; if (do_numseps) cp = insert_thousands_seps(str_buf); return(cp); } static gchar *format_int(gint i, gint num_bytes) { static gchar str_buf[MAX_NUM_STRLEN]; sprintf(str_buf, "%d", i); return(str_buf); } /** * gtk_data_format: * @str: the string to be formatted * @dataformat: formatting instructions * * format @str according to @dataformat. * * formatting instructions: * * '' (the empty string) does no formatting at all. * * 'int8' is formatted as a singed 8-bit integer value with * optional '-' sign. * * 'int16' is formatted as a signed 16-bit integer with optional * '-' sign. * * 'int32' is formatted as a signed 32-bit integer with optional * '-' sign. * * 'money' is formatted as a double float value with 2 decimal * digits and 1000s-separators * * 'float,N' is formatted as a double float value with N decimal * digits and 1000s-separators * * 'bit' is formatted as a boolean value [0,1]. * * * Returns: a pointer to an internal static buffer, with the * formatted data */ gchar *gtk_data_format(const gchar *str, const gchar *dataformat) { if (!str || !str[0] || !dataformat || !dataformat[0]) return((gchar *) str); switch (dataformat[0]) { case 'i': if (strcmp(dataformat, "int8") == 0) { gint i; str = remove_thousands_seps(str); if (sscanf(str, "%d", &i) == 1) return(format_int(i, 1)); return(INVALID_DATA); } else if (strcmp(dataformat, "int16") == 0) { gint i; str = remove_thousands_seps(str); if (sscanf(str, "%d", &i) == 1) return(format_int(i, 2)); return(INVALID_DATA); } else if (strcmp(dataformat, "int32") == 0) { gint i; str = remove_thousands_seps(str); if (sscanf(str, "%d", &i) == 1) return(format_int(i, 4)); return(INVALID_DATA); } break; case 'm': if (strcmp(dataformat, "money") == 0) { gdouble d; str = remove_thousands_seps(str); if (sscanf(str, "%lg", &d) == 1) return(format_double(d, 2, TRUE)); return(INVALID_DATA); } break; case 'f': if (strncmp(dataformat, "float,", 6) == 0) { gint precision; if (sscanf(&dataformat[6], "%d", &precision) == 1) { gdouble d; str = remove_thousands_seps(str); if (sscanf(str, "%lg", &d) == 1) return(format_double(d, precision, TRUE)); return(INVALID_DATA); } } break; case 'b': if (strcmp(dataformat, "bit") == 0) { if (strcmp(str, "1") == 0) return(format_int(1, 1)); else if (strcmp(str, "0") == 0) return(format_int(0, 1)); else if (strcmp(str, "true") == 0) return(format_int(1, 1)); else if (strcmp(str, "false") == 0) return(format_int(0, 1)); return(INVALID_DATA); } break; default: break; } return((gchar *) str); } /** * gtk_data_format_remove: * @str: the string to be unformatted * @dataformat: formatting instructions * * reverse the effect of #gtk_data_format, i.e. remove all * formatting characters, apply trailing dash * * Returns: a pointer to an internal static buffer, with the * unformatted data */ gchar *gtk_data_format_remove(const gchar *str, const gchar *dataformat) { if (!str || !dataformat || !dataformat[0]) return((gchar *) str); switch (dataformat[0]) { case 'i': if (strcmp(dataformat, "int8") == 0) { str = remove_thousands_seps(str); } else if (strcmp(dataformat, "int16") == 0) { str = remove_thousands_seps(str); } else if (strcmp(dataformat, "int32") == 0) { str = remove_thousands_seps(str); } break; case 'm': if (strcmp(dataformat, "money") == 0) { str = remove_thousands_seps(str); } break; case 'f': if (strncmp(dataformat, "float,", 6) == 0) { gint precision; if (sscanf(&dataformat[6], "%d", &precision) == 1) { str = remove_thousands_seps(str); } } break; default: break; } return((gchar *) str); } gtkextra-3.2.0/gtkextra/gtkdirtree.h0000644000076400001440000000440512603754176014452 00000000000000/* gtkdirtree - gtkdirtree widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_DIR_TREE_H__ #define __GTK_DIR_TREE_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define G_TYPE_DIR_TREE (gtk_dir_tree_get_type ()) #define GTK_DIR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DIR_TREE, GtkDirTree)) #define GTK_DIR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_DIR_TREE, GtkDirTreeClass)) #define GTK_IS_DIR_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DIR_TREE)) #define GTK_IS_DIR_TREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), G_TYPE_DIR_TREE)) typedef struct _GtkDirTree GtkDirTree; typedef struct _GtkDirTreeNode GtkDirTreeNode; typedef struct _GtkDirTreeClass GtkDirTreeClass; struct _GtkDirTreeNode { gboolean scanned; gchar *path; }; struct _GtkDirTree { GtkCTree ctree; gchar *local_hostname; gboolean show_hidden; GdkPixmap *my_pc; GdkPixmap *folder; GdkPixmap *ofolder; GdkPixmap *dennied; GdkBitmap *my_pc_mask; GdkBitmap *folder_mask; GdkBitmap *ofolder_mask; GdkBitmap *dennied_mask; }; struct _GtkDirTreeClass { GtkCTreeClass parent_class; }; GType gtk_dir_tree_get_type (void); GtkWidget* gtk_dir_tree_new (void); gint gtk_dir_tree_open_dir(GtkDirTree *dir_tree, const gchar *path); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_DIR_TREE_H__ */ gtkextra-3.2.0/gtkextra/gtkplotdata.c0000644000076400001440000060657512604171206014623 00000000000000/* gtkplotdata - 2d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotdata * @short_description: * * A #GtkPlotData object contains multiple dimensions of data * for GtkPlots. Each dimension has a name, a label, a * description and an array of typed values. * * Each #GtkPlot can display multiple #GtkPlotData sets. * * Predefined dimension names are: "x" for X values, "y" for Y * values, "z" for Z values, "a" for Symbol size, "dx" for X * error, "dy" for Y error, "dz" for Z error, "da" for amplitude * values, "labels" for value labels */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotpolar.h" #include "gtkplot3d.h" #include "gtkplotpc.h" #include "gtkpsfont.h" #include "gtkextra-marshal.h" #define DEFAULT_FONT_HEIGHT 18 #define P_(string) string static gchar DEFAULT_FONT[] = "Helvetica"; static void gtk_plot_data_class_init (GtkPlotDataClass *klass); static void gtk_plot_data_init (GtkPlotData *data); static void gtk_plot_data_destroy (GtkObject *object); static void gtk_plot_data_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_data_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_data_real_clone (GtkPlotData *real_data, GtkPlotData *copy_data); static void gtk_plot_data_real_update (GtkPlotData *data, gboolean new_range); static void update_gradient (GtkPlotData *data); static void gtk_plot_data_draw_private (GtkPlotData *data); static void gtk_plot_data_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_data_draw_gradient (GtkPlotData *data); static void draw_gradient_vertical (GtkPlotData *data, gdouble px, gdouble py); static void draw_gradient_horizontal (GtkPlotData *data, gdouble px, gdouble py); static void gtk_plot_data_get_legend_size (GtkPlotData *data, gint *width, gint *height); static void gtk_plot_data_get_gradient_size (GtkPlotData *data, gint *width, gint *height); static void gtk_plot_data_real_draw (GtkPlotData *data, gint npoints); static void gtk_plot_data_real_real_draw (GtkPlotData *data, gint npoints); static void gtk_plot_data_real_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); static void gtk_plot_data_draw_symbol_private (GtkPlotData *data, gdouble x, gdouble y, GtkPlotSymbol symbol); static void gtk_plot_data_draw_xyz (GtkPlotData *data, gint npoints); static void gtk_plot_data_draw_errbars (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble dx, gdouble dy, gdouble dz); static void gtk_plot_data_draw_down_triangle (GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled); static void gtk_plot_data_draw_up_triangle (GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled); static void gtk_plot_data_draw_right_triangle (GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled); static void gtk_plot_data_draw_left_triangle (GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled); static void gtk_plot_data_draw_diamond (GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled); static void gtk_plot_data_draw_plus (GtkPlotData *data, gdouble x, gdouble y, gdouble size); static void gtk_plot_data_draw_cross (GtkPlotData *data, gdouble x, gdouble y, gdouble size); static void gtk_plot_data_draw_star (GtkPlotData *data, gdouble x, gdouble y, gdouble size); static void gtk_plot_data_connect_points (GtkPlotData *data, gint npoints); extern gint roundint (gdouble x); static void spline_solve (int n, gdouble x[], gdouble y[], gdouble y2[]); static gdouble spline_eval (int n, gdouble x[], gdouble y[], gdouble y2[], gdouble val); static void hsv_to_rgb (gdouble h, gdouble s, gdouble v, gdouble *r, gdouble *g, gdouble *b); static void rgb_to_hsv (gdouble r, gdouble g, gdouble b, gdouble *h, gdouble *s, gdouble *v); static void real_autoscale_gradient (GtkPlotData *data, gdouble xmin, gdouble xmax); static void draw_marker (GtkPlotData *data, GtkPlotMarker *marker); enum { ADD_TO_PLOT, UPDATE, DRAW_DATA, GRADIENT_CHANGED, GRADIENT_COLORS_CHANGED, LAST_SIGNAL }; enum { ARG_0, ARG_NAME, ARG_LEGEND, ARG_ITERATOR, ARG_FUNCTION, ARG_ITERATOR_MASK, ARG_NUM_POINTS, ARG_FILL_AREA, ARG_XSTEP, ARG_YSTEP, ARG_ZSTEP, ARG_SYMBOL_TYPE, ARG_SYMBOL_STYLE, ARG_SYMBOL_SIZE, ARG_SYMBOL_COLOR, ARG_SYMBOL_BORDER_WIDTH, ARG_SYMBOL_BORDER_COLOR, ARG_LINE_STYLE, ARG_LINE_CAP, ARG_LINE_JOIN, ARG_LINE_WIDTH, ARG_LINE_COLOR, ARG_LINE_CONNECTOR, ARG_XLINE_STYLE, ARG_XLINE_CAP, ARG_XLINE_JOIN, ARG_XLINE_WIDTH, ARG_XLINE_COLOR, ARG_YLINE_STYLE, ARG_YLINE_CAP, ARG_YLINE_JOIN, ARG_YLINE_WIDTH, ARG_YLINE_COLOR, ARG_ZLINE_STYLE, ARG_ZLINE_CAP, ARG_ZLINE_JOIN, ARG_ZLINE_WIDTH, ARG_ZLINE_COLOR, ARG_SHOW_XERRBARS, ARG_XERRBARS_WIDTH, ARG_XERRBARS_CAPS, ARG_SHOW_YERRBARS, ARG_YERRBARS_WIDTH, ARG_YERRBARS_CAPS, ARG_SHOW_ZERRBARS, ARG_ZERRBARS_WIDTH, ARG_ZERRBARS_CAPS, ARG_SHOW_LEGENDS, ARG_LEGENDS_PRECISION, ARG_LEGENDS_STYLE, ARG_SHOW_LABELS, ARG_LABELS_TRANSPARENT, ARG_LABELS_ANGLE, ARG_LABELS_BORDER, ARG_LABELS_BORDER_SPACE, ARG_LABELS_BORDER_WIDTH, ARG_LABELS_BORDER_SHADOW, ARG_LABELS_FG, ARG_LABELS_BG, ARG_LABELS_OFFSET, ARG_LABELS_SIZE, ARG_LABELS_FONT, ARG_LABELS_TEXT, ARG_SHOW_GRADIENT, ARG_GRADIENT_CUSTOM, ARG_GRADIENT_MASK, ARG_COLOR_MIN, ARG_COLOR_MAX, ARG_COLOR_LT_MIN, ARG_COLOR_GT_MAX, ARG_GRADIENT_MAX, ARG_GRADIENT_MIN, ARG_GRADIENT_STEP, ARG_GRADIENT_NMINOR, ARG_GRADIENT_NMAJOR, ARG_GRADIENT_SCALE, ARG_GRADIENT_BREAK, ARG_GRADIENT_BREAK_MAX, ARG_GRADIENT_BREAK_MIN, ARG_GRADIENT_BREAK_STEP, ARG_GRADIENT_BREAK_NMINOR, ARG_GRADIENT_BREAK_SCALE, ARG_GRADIENT_BREAK_POSITION, ARG_GRADIENT, ARG_GRADIENT_SHOW_LT_GT, }; static GtkWidgetClass *parent_class = NULL; static guint data_signals[LAST_SIGNAL] = { 0 }; GType gtk_plot_marker_get_type (void) { static GType marker_type = 0; if (!marker_type) { marker_type = g_type_register_static_simple ( G_TYPE_BOXED, "GtkPlotMarker", 0, (GClassInitFunc) NULL, 0, (GInstanceInitFunc) NULL, 0); } return marker_type; } GType gtk_plot_data_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_widget_get_type (), "GtkPlotData", sizeof (GtkPlotDataClass), (GClassInitFunc) gtk_plot_data_class_init, sizeof (GtkPlotData), (GInstanceInitFunc) gtk_plot_data_init, 0); } return data_type; } static void gtk_plot_data_class_init (GtkPlotDataClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_widget_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; object_class->destroy = gtk_plot_data_destroy; gobject_class->set_property = gtk_plot_data_set_property; gobject_class->get_property = gtk_plot_data_get_property; /** * GtkPlotData:name: * * **/ g_object_class_install_property (gobject_class, ARG_NAME, g_param_spec_string ("name", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:legend: * * **/ g_object_class_install_property (gobject_class, ARG_LEGEND, g_param_spec_string ("legend", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:is_iterator: * * **/ g_object_class_install_property (gobject_class, ARG_ITERATOR, g_param_spec_boolean ("is_iterator", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:is_function: * * **/ g_object_class_install_property (gobject_class, ARG_FUNCTION, g_param_spec_boolean ("is_function", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:iterator_mask: * * **/ g_object_class_install_property (gobject_class, ARG_ITERATOR_MASK, g_param_spec_int ("iterator_mask", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:num_points: * * **/ g_object_class_install_property (gobject_class, ARG_NUM_POINTS, g_param_spec_int ("num_points", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:fill_area: * * **/ g_object_class_install_property (gobject_class, ARG_FILL_AREA, g_param_spec_boolean ("fill_area", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xstep: * * **/ g_object_class_install_property (gobject_class, ARG_XSTEP, g_param_spec_double ("xstep", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:ystep: * * **/ g_object_class_install_property (gobject_class, ARG_YSTEP, g_param_spec_double ("ystep", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zstep: * * **/ g_object_class_install_property (gobject_class, ARG_ZSTEP, g_param_spec_double ("zstep", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:symbol_type: * * **/ g_object_class_install_property (gobject_class, ARG_SYMBOL_TYPE, g_param_spec_int ("symbol_type", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:symbol_style: * * **/ g_object_class_install_property (gobject_class, ARG_SYMBOL_STYLE, g_param_spec_int ("symbol_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:symbol_size: * * **/ g_object_class_install_property (gobject_class, ARG_SYMBOL_SIZE, g_param_spec_int ("symbol_size", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:symbol_color: * * **/ g_object_class_install_property (gobject_class, ARG_SYMBOL_COLOR, g_param_spec_pointer ("symbol_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:symbol_border_width: * * **/ g_object_class_install_property (gobject_class, ARG_SYMBOL_BORDER_WIDTH, g_param_spec_double ("symbol_border_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:symbol_border_color: * * **/ g_object_class_install_property (gobject_class, ARG_SYMBOL_BORDER_COLOR, g_param_spec_pointer ("symbol_border_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:line_style: * * **/ g_object_class_install_property (gobject_class, ARG_LINE_STYLE, g_param_spec_int ("line_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:line_cap: * * **/ g_object_class_install_property (gobject_class, ARG_LINE_CAP, g_param_spec_int ("line_cap", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:line_join: * * **/ g_object_class_install_property (gobject_class, ARG_LINE_JOIN, g_param_spec_int ("line_join", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:line_width: * * **/ g_object_class_install_property (gobject_class, ARG_LINE_WIDTH, g_param_spec_double ("line_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:line_color: * * **/ g_object_class_install_property (gobject_class, ARG_LINE_COLOR, g_param_spec_pointer ("line_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:line_connector: * * **/ g_object_class_install_property (gobject_class, ARG_LINE_CONNECTOR, g_param_spec_int ("line_connector", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xline_style: * * **/ g_object_class_install_property (gobject_class, ARG_XLINE_STYLE, g_param_spec_int ("xline_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xline_cap: * * **/ g_object_class_install_property (gobject_class, ARG_XLINE_CAP, g_param_spec_int ("xline_cap", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xline_join: * * **/ g_object_class_install_property (gobject_class, ARG_XLINE_JOIN, g_param_spec_int ("xline_join", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xline_width: * * **/ g_object_class_install_property (gobject_class, ARG_XLINE_WIDTH, g_param_spec_double ("xline_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xline_color: * * **/ g_object_class_install_property (gobject_class, ARG_XLINE_COLOR, g_param_spec_pointer ("xline_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:yline_style: * * **/ g_object_class_install_property (gobject_class, ARG_YLINE_STYLE, g_param_spec_int ("yline_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:yline_cap: * * **/ g_object_class_install_property (gobject_class, ARG_YLINE_CAP, g_param_spec_int ("yline_cap", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:yline_join: * * **/ g_object_class_install_property (gobject_class, ARG_YLINE_JOIN, g_param_spec_int ("yline_join", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:yline_width: * * **/ g_object_class_install_property (gobject_class, ARG_YLINE_WIDTH, g_param_spec_double ("yline_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:yline_color: * * **/ g_object_class_install_property (gobject_class, ARG_YLINE_COLOR, g_param_spec_pointer ("yline_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zline_style: * * **/ g_object_class_install_property (gobject_class, ARG_ZLINE_STYLE, g_param_spec_int ("zline_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zline_cap: * * **/ g_object_class_install_property (gobject_class, ARG_ZLINE_CAP, g_param_spec_int ("zline_cap", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zline_join: * * **/ g_object_class_install_property (gobject_class, ARG_ZLINE_JOIN, g_param_spec_int ("zline_join", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zline_width: * * **/ g_object_class_install_property (gobject_class, ARG_ZLINE_WIDTH, g_param_spec_double ("zline_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zline_color: * * **/ g_object_class_install_property (gobject_class, ARG_ZLINE_COLOR, g_param_spec_pointer ("zline_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:show_xerrbars: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_XERRBARS, g_param_spec_boolean ("show_xerrbars", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xerrbar_width: * * **/ g_object_class_install_property (gobject_class, ARG_XERRBARS_WIDTH, g_param_spec_int ("xerrbar_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:xerrbar_caps: * * **/ g_object_class_install_property (gobject_class, ARG_XERRBARS_CAPS, g_param_spec_int ("xerrbar_caps", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:show_yerrbars: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_YERRBARS, g_param_spec_boolean ("show_yerrbars", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:yerrbar_width: * * **/ g_object_class_install_property (gobject_class, ARG_YERRBARS_WIDTH, g_param_spec_int ("yerrbar_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:yerrbar_caps: * * **/ g_object_class_install_property (gobject_class, ARG_YERRBARS_CAPS, g_param_spec_int ("yerrbar_caps", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:show_zerrbars: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_ZERRBARS, g_param_spec_boolean ("show_zerrbars", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zerrbar_width: * * **/ g_object_class_install_property (gobject_class, ARG_ZERRBARS_WIDTH, g_param_spec_int ("zerrbar_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:zerrbar_caps: * * **/ g_object_class_install_property (gobject_class, ARG_ZERRBARS_CAPS, g_param_spec_int ("zerrbar_caps", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:show_legends: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_LEGENDS, g_param_spec_boolean ("show_legends", P_(""), P_(""), TRUE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:legends_precision: * * **/ g_object_class_install_property (gobject_class, ARG_LEGENDS_PRECISION, g_param_spec_int ("legends_precision", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:legends_style: * * **/ g_object_class_install_property (gobject_class, ARG_LEGENDS_STYLE, g_param_spec_int ("legends_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:show_labels: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_LABELS, g_param_spec_boolean ("show_labels", P_(""), P_(""), TRUE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_border: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_BORDER, g_param_spec_int ("labels_border", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_border_space: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_BORDER_SPACE, g_param_spec_int ("labels_border_space", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_border_width: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_BORDER_WIDTH, g_param_spec_int ("labels_border_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_border_shadow: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_BORDER_SHADOW, g_param_spec_int ("labels_border_shadow", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_transparent: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_TRANSPARENT, g_param_spec_boolean ("labels_transparent", P_(""), P_(""), TRUE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_fg_color: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_FG, g_param_spec_pointer ("labels_fg_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_bg_color: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_BG, g_param_spec_pointer ("labels_bg_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_angle: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_ANGLE, g_param_spec_int ("labels_angle", P_(""), P_(""), 0,270,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_offset: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_OFFSET, g_param_spec_int ("labels_offset", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_size: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_SIZE, g_param_spec_int ("labels_size", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_font: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_FONT, g_param_spec_string ("labels_font", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:labels_text: * * **/ g_object_class_install_property (gobject_class, ARG_LABELS_TEXT, g_param_spec_string ("labels_text", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:show_gradient: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_GRADIENT, g_param_spec_boolean ("show_gradient", P_(""), P_(""), TRUE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_custom: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_CUSTOM, g_param_spec_boolean ("gradient_custom", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_mask: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_MASK, g_param_spec_int ("gradient_mask", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_show_lt_gt: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_SHOW_LT_GT, g_param_spec_boolean ("gradient_show_lt_gt", P_(""), P_(""), TRUE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:color_min: * * **/ g_object_class_install_property (gobject_class, ARG_COLOR_MIN, g_param_spec_pointer ("color_min", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:color_max: * * **/ g_object_class_install_property (gobject_class, ARG_COLOR_MAX, g_param_spec_pointer ("color_max", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:color_lt_min: * * **/ g_object_class_install_property (gobject_class, ARG_COLOR_LT_MIN, g_param_spec_pointer ("color_lt_min", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:color_gt_max: * * **/ g_object_class_install_property (gobject_class, ARG_COLOR_GT_MAX, g_param_spec_pointer ("color_gt_max", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_max: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_MAX, g_param_spec_double ("gradient_max", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_min: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_MIN, g_param_spec_double ("gradient_min", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_step: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_STEP, g_param_spec_double ("gradient_step", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_nminor: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_NMINOR, g_param_spec_int ("gradient_nminor", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_nmajor: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_NMAJOR, g_param_spec_int ("gradient_nmajor", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_scale: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_SCALE, g_param_spec_int ("gradient_scale", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_break: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_BREAK, g_param_spec_boolean ("gradient_break", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_break_max: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_BREAK_MAX, g_param_spec_double ("gradient_break_max", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_break_min: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_BREAK_MIN, g_param_spec_double ("gradient_break_min", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_break_step: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_BREAK_STEP, g_param_spec_double ("gradient_break_step", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_break_nminor: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_BREAK_NMINOR, g_param_spec_int ("gradient_break_nminor", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_break_scale: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_BREAK_SCALE, g_param_spec_int ("gradient_break_scale", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:gradient_break_position: * * **/ g_object_class_install_property (gobject_class, ARG_GRADIENT_BREAK_POSITION, g_param_spec_double ("gradient_break_position", P_(""), P_(""), 0.,1.,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotData:bottom_axis: * * **/ g_object_class_install_property(gobject_class, ARG_GRADIENT, g_param_spec_object ("bottom_axis", P_(""), P_(""), G_TYPE_PLOT_AXIS, G_PARAM_READABLE)); data_class->clone = gtk_plot_data_real_clone; data_class->add_to_plot = NULL; data_class->update = gtk_plot_data_real_update; data_class->gradient_changed = update_gradient; data_class->gradient_colors_changed = update_gradient; data_class->draw_symbol = gtk_plot_data_real_draw_symbol; data_class->draw_data = gtk_plot_data_draw_private; data_class->draw_legend = gtk_plot_data_draw_legend; data_class->draw_gradient = gtk_plot_data_draw_gradient; data_class->get_legend_size = gtk_plot_data_get_legend_size; data_class->get_gradient_size = gtk_plot_data_get_gradient_size; /** * GtkPlotData::add_to_plot: * @data: a #GtkPlotData widget. * @plot: a #GtkPlot widget. * * * * Return value: */ data_signals[ADD_TO_PLOT] = g_signal_new ("add_to_plot", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotDataClass, add_to_plot), NULL, NULL, gtkextra_BOOL__POINTER, G_TYPE_BOOLEAN, 1, G_TYPE_PLOT); /** * GtkPlotData::update: * @data: a #GtkPlotData widget. * @new_range: * * */ data_signals[UPDATE] = g_signal_new ("update", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotDataClass, update), NULL, NULL, gtkextra_VOID__BOOL, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); /** * GtkPlotData::draw_data: * @data: a #GtkPlotData widget. * * */ data_signals[DRAW_DATA] = g_signal_new ("draw_data", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkPlotDataClass, draw_data), NULL, NULL, gtkextra_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE); /** * GtkPlotData::gradient_changed: * @data: a #GtkPlotData widget. * * */ data_signals[GRADIENT_CHANGED] = g_signal_new ("gradient_changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotDataClass, gradient_changed), NULL, NULL, gtkextra_VOID__VOID, G_TYPE_NONE, 0); /** * GtkPlotData::gradient_colors_changed: * @data: a #GtkPlotData widget. * * */ data_signals[GRADIENT_COLORS_CHANGED] = g_signal_new ("gradient_colors_changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotDataClass, gradient_colors_changed), NULL, NULL, gtkextra_VOID__VOID, G_TYPE_NONE, 0); } static void gtk_plot_data_init (GtkPlotData *dataset) { GtkWidget *widget; GdkColormap *colormap; GdkColor black, white, color; gtk_widget_set_has_window(GTK_WIDGET(dataset), FALSE); widget = GTK_WIDGET(dataset); colormap = gtk_widget_get_colormap(widget); gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); dataset->gradient = GTK_PLOT_AXIS(gtk_plot_axis_new(GTK_PLOT_AXIS_Y)); g_object_ref(GTK_OBJECT(dataset->gradient)); gtk_object_sink(GTK_OBJECT(dataset->gradient)); dataset->color_lt_min = white; dataset->color_gt_max = white; gdk_color_parse("red", &color); gdk_color_alloc(colormap, &color); dataset->color_max = color; gdk_color_parse("blue", &color); gdk_color_alloc(colormap, &color); dataset->color_min = color; dataset->gradient_colors = NULL; g_free(dataset->gradient->title.text); dataset->gradient->title.text = g_strdup("Amplitude"); dataset->gradient->ticks.min = 0.0; dataset->gradient->ticks.max = 1.0; dataset->gradient->ticks.nmajorticks = 10; dataset->gradient->ticks.nminorticks = 0; dataset->gradient->ticks.nminor = 0; dataset->gradient->ticks.values = NULL; dataset->gradient->ticks.scale = GTK_PLOT_SCALE_LINEAR; dataset->gradient->ticks.apply_break = FALSE; dataset->gradient->ticks_length = 4; dataset->gradient->label_precision = 3; dataset->gradient->label_style = GTK_PLOT_LABEL_FLOAT; dataset->gradient->labels_offset = 4; dataset->gradient_mask = GTK_PLOT_GRADIENT_H; dataset->gradient_show_lt_gt = FALSE; dataset->gradient_title_pos = GTK_PLOT_AXIS_RIGHT; dataset->gradient_x = .6; dataset->gradient_y = .05; dataset->gradient->orientation = GTK_ORIENTATION_VERTICAL; dataset->gradient->label_mask = GTK_PLOT_LABEL_OUT; dataset->gradient->labels_attr.fg = gtk_widget_get_style(widget)->black; dataset->gradient->labels_attr.bg = gtk_widget_get_style(widget)->white; dataset->gradient->labels_attr.transparent = FALSE; dataset->gradient->labels_attr.border = 0; dataset->gradient->labels_attr.border_width = 0; dataset->gradient->labels_attr.shadow_width = 0; dataset->gradient_border_width = 1; dataset->gradient_border_offset = 4; dataset->gradient_shadow_width = 3; dataset->gradient_border = GTK_PLOT_BORDER_LINE; /* g_free(dataset->gradient->title.text); dataset->gradient->title.text = g_strdup("AHGLGHKSHGKSHKSHLKSJHLKSHJSKLHJSKAJ"); */ dataset->gradient_custom = FALSE; dataset->gradient_line_width = 30; dataset->gradient_line_height = 10; dataset->show_gradient = FALSE; dataset->legends_precision = 3; dataset->legends_style = GTK_PLOT_LABEL_FLOAT; gtk_plot_data_reset_gradient(dataset); dataset->plot = NULL; dataset->is_function = FALSE; dataset->is_iterator = FALSE; dataset->iterator_mask = GTK_PLOT_DATA_X|GTK_PLOT_DATA_Y; dataset->show_legend = TRUE; dataset->show_labels = FALSE; dataset->fill_area = FALSE; dataset->function = NULL; dataset->iterator = NULL; dataset->num_points = 0; dataset->x_step = .5; dataset->y_step = .5; dataset->line_connector = GTK_PLOT_CONNECT_STRAIGHT; dataset->line.line_style = GTK_PLOT_LINE_SOLID; dataset->line.cap_style = 0; dataset->line.join_style = 0; dataset->line.line_width = 1; dataset->line.color = black; dataset->x_line.line_style = GTK_PLOT_LINE_NONE; dataset->x_line.cap_style = 0; dataset->x_line.join_style = 0; dataset->x_line.line_width = 1; dataset->x_line.color = black; dataset->y_line.line_style = GTK_PLOT_LINE_NONE; dataset->y_line.cap_style = 0; dataset->y_line.join_style = 0; dataset->y_line.line_width = 1; dataset->y_line.color = black; dataset->z_line.line_style = GTK_PLOT_LINE_NONE; dataset->z_line.cap_style = 0; dataset->z_line.join_style = 0; dataset->z_line.line_width = 1; dataset->z_line.color = black; dataset->symbol.symbol_type = GTK_PLOT_SYMBOL_NONE; dataset->symbol.symbol_style = GTK_PLOT_SYMBOL_EMPTY; dataset->symbol.size = 6; dataset->symbol.border.line_width = 1; dataset->symbol.border.color = black; dataset->symbol.color = black; dataset->show_xerrbars = FALSE; dataset->show_yerrbars = FALSE; dataset->show_zerrbars = FALSE; dataset->xerrbar_width = 1; dataset->yerrbar_width = 1; dataset->zerrbar_width = 1; dataset->xerrbar_caps = 8; dataset->yerrbar_caps = 8; dataset->zerrbar_caps = 8; dataset->legend = NULL; dataset->name = NULL; dataset->labels_attr.justification = GTK_JUSTIFY_LEFT; dataset->labels_attr.transparent = TRUE; dataset->labels_attr.font = g_strdup(DEFAULT_FONT); dataset->labels_attr.text = NULL; dataset->labels_attr.border_space = 3; dataset->labels_offset = 6; dataset->link = NULL; dataset->markers = NULL; dataset->show_markers = TRUE; gtk_plot_data_labels_set_attributes(dataset, DEFAULT_FONT, DEFAULT_FONT_HEIGHT, 90, &black, &white); gtk_psfont_init(); dataset->redraw_pending = TRUE; dataset->data = GTK_PLOT_ARRAY_LIST(gtk_plot_array_list_new()); g_object_ref(G_OBJECT(dataset->data)); gtk_plot_data_add_dimension(dataset, "x", "X" , "X points", G_TYPE_DOUBLE, TRUE, TRUE); gtk_plot_data_add_dimension(dataset, "y", "Y" , "Y points", G_TYPE_DOUBLE, TRUE, FALSE); gtk_plot_data_add_dimension(dataset, "z", "Z" , "Z points", G_TYPE_DOUBLE, TRUE, FALSE); gtk_plot_data_add_dimension(dataset, "a", "Size" , "Symbol size", G_TYPE_DOUBLE, FALSE, FALSE); gtk_plot_data_add_dimension(dataset, "da", "Amp" , "Amplitude", G_TYPE_DOUBLE, FALSE, FALSE); gtk_plot_data_add_dimension(dataset, "dx", "ErrX" , "Error in X", G_TYPE_DOUBLE, FALSE, FALSE); gtk_plot_data_add_dimension(dataset, "dy", "ErrY" , "Error in Y", G_TYPE_DOUBLE, FALSE, FALSE); gtk_plot_data_add_dimension(dataset, "dz", "ErrZ" , "Error in Z", G_TYPE_DOUBLE, FALSE, FALSE); gtk_plot_data_add_dimension(dataset, "labels", "Labels" , "Data labels", G_TYPE_STRING, FALSE, FALSE); } static void gtk_plot_data_destroy (GtkObject *object) { GtkPlotData *data; g_return_if_fail (object != NULL); g_return_if_fail (GTK_IS_PLOT_DATA (object)); data = GTK_PLOT_DATA (object); if(data->labels_attr.font) g_free(data->labels_attr.font); data->labels_attr.font = NULL; if(data->labels_attr.text) g_free(data->labels_attr.text); data->labels_attr.font = NULL; if(data->legend) g_free(data->legend); data->legend = NULL; if(data->name) g_free(data->name); data->name = NULL; if(data->gradient) g_object_unref(GTK_OBJECT(data->gradient)); data->gradient = NULL; if(data->gradient_colors){ g_free(data->gradient_colors); data->gradient_colors = NULL; } gtk_plot_data_remove_markers(data); if(data->data){ g_object_unref(G_OBJECT(data->data)); data->data = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (GTK_OBJECT(data)); gtk_psfont_unref(); if ( GTK_OBJECT_CLASS (parent_class)->destroy ) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void gtk_plot_data_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotData *data; data = GTK_PLOT_DATA (object); switch (prop_id) { case ARG_NAME: gtk_plot_data_set_name(data, g_value_get_string(value)); break; case ARG_LEGEND: gtk_plot_data_set_legend(data, g_value_get_string(value)); break; case ARG_ITERATOR: data->is_iterator = g_value_get_boolean(value); break; case ARG_FUNCTION: data->is_function = g_value_get_boolean(value); break; case ARG_ITERATOR_MASK: data->iterator_mask = g_value_get_int(value); break; case ARG_NUM_POINTS: data->num_points = g_value_get_int(value); break; case ARG_FILL_AREA: data->fill_area = g_value_get_boolean(value); break; case ARG_XSTEP: data->x_step = g_value_get_double(value); break; case ARG_YSTEP: data->y_step = g_value_get_double(value); break; case ARG_ZSTEP: data->z_step = g_value_get_double(value); break; case ARG_SYMBOL_TYPE: data->symbol.symbol_type = g_value_get_int(value); break; case ARG_SYMBOL_STYLE: data->symbol.symbol_style = g_value_get_int(value); break; case ARG_SYMBOL_SIZE: data->symbol.size = g_value_get_int(value); break; case ARG_SYMBOL_COLOR: data->symbol.color = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_SYMBOL_BORDER_WIDTH: data->symbol.border.line_width = g_value_get_double(value); break; case ARG_SYMBOL_BORDER_COLOR: data->symbol.border.color = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_LINE_STYLE: data->line.line_style = g_value_get_int(value); break; case ARG_LINE_CAP: data->line.cap_style = g_value_get_int(value); break; case ARG_LINE_JOIN: data->line.join_style = g_value_get_int(value); break; case ARG_LINE_WIDTH: data->line.line_width = g_value_get_double(value); break; case ARG_LINE_COLOR: data->line.color = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_LINE_CONNECTOR: data->line_connector = g_value_get_int(value); break; case ARG_XLINE_STYLE: data->x_line.line_style = g_value_get_int(value); break; case ARG_XLINE_CAP: data->x_line.cap_style = g_value_get_int(value); break; case ARG_XLINE_JOIN: data->x_line.join_style = g_value_get_int(value); break; case ARG_XLINE_WIDTH: data->x_line.line_width = g_value_get_double(value); break; case ARG_XLINE_COLOR: data->x_line.color = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_YLINE_STYLE: data->y_line.line_style = g_value_get_int(value); break; case ARG_YLINE_CAP: data->y_line.cap_style = g_value_get_int(value); break; case ARG_YLINE_JOIN: data->y_line.join_style = g_value_get_int(value); break; case ARG_YLINE_WIDTH: data->y_line.line_width = g_value_get_double(value); break; case ARG_YLINE_COLOR: data->y_line.color = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_ZLINE_STYLE: data->z_line.line_style = g_value_get_int(value); break; case ARG_ZLINE_CAP: data->z_line.cap_style = g_value_get_int(value); break; case ARG_ZLINE_JOIN: data->z_line.join_style = g_value_get_int(value); break; case ARG_ZLINE_WIDTH: data->z_line.line_width = g_value_get_double(value); break; case ARG_ZLINE_COLOR: data->z_line.color = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_SHOW_XERRBARS: data->show_xerrbars = g_value_get_boolean(value); break; case ARG_XERRBARS_WIDTH: data->xerrbar_width = g_value_get_int(value); break; case ARG_XERRBARS_CAPS: data->xerrbar_caps = g_value_get_int(value); break; case ARG_SHOW_YERRBARS: data->show_yerrbars = g_value_get_boolean(value); break; case ARG_YERRBARS_WIDTH: data->yerrbar_width = g_value_get_int(value); break; case ARG_YERRBARS_CAPS: data->yerrbar_caps = g_value_get_int(value); break; case ARG_SHOW_ZERRBARS: data->show_zerrbars = g_value_get_boolean(value); break; case ARG_ZERRBARS_WIDTH: data->zerrbar_width = g_value_get_int(value); break; case ARG_ZERRBARS_CAPS: data->zerrbar_caps = g_value_get_int(value); break; case ARG_SHOW_LEGENDS: data->show_legend = g_value_get_boolean(value); break; case ARG_LEGENDS_PRECISION: data->legends_precision = g_value_get_int(value); break; case ARG_LEGENDS_STYLE: data->legends_style = g_value_get_int(value); break; case ARG_SHOW_LABELS: data->show_labels = g_value_get_boolean(value); break; case ARG_LABELS_TRANSPARENT: data->labels_attr.transparent = g_value_get_boolean(value); break; case ARG_LABELS_ANGLE: data->labels_attr.angle = g_value_get_int(value); break; case ARG_LABELS_BORDER: data->labels_attr.border = g_value_get_int(value); break; case ARG_LABELS_BORDER_SPACE: data->labels_attr.border_space = g_value_get_int(value); break; case ARG_LABELS_BORDER_WIDTH: data->labels_attr.border_width = g_value_get_int(value); break; case ARG_LABELS_BORDER_SHADOW: data->labels_attr.shadow_width = g_value_get_int(value); break; case ARG_LABELS_FG: data->labels_attr.fg = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_LABELS_BG: data->labels_attr.bg = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_LABELS_OFFSET: data->labels_offset = g_value_get_int(value); break; case ARG_LABELS_SIZE: data->labels_attr.height = g_value_get_int(value); break; case ARG_LABELS_FONT: if(data->labels_attr.font) g_free(data->labels_attr.font); data->labels_attr.font = g_strdup(g_value_get_string(value)); break; case ARG_LABELS_TEXT: if(data->labels_attr.text) g_free(data->labels_attr.text); data->labels_attr.text = g_strdup(g_value_get_string(value)); break; case ARG_SHOW_GRADIENT: data->show_gradient = g_value_get_boolean(value); break; case ARG_GRADIENT_CUSTOM: data->gradient_custom = g_value_get_boolean(value); break; case ARG_GRADIENT_MASK: data->gradient_mask = g_value_get_int(value); break; case ARG_GRADIENT_SHOW_LT_GT: data->gradient_show_lt_gt = g_value_get_boolean(value); break; case ARG_COLOR_MIN: data->color_min = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_COLOR_MAX: data->color_max = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_COLOR_LT_MIN: data->color_lt_min = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_COLOR_GT_MAX: data->color_gt_max = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_GRADIENT_MAX: if(!data->gradient) return; data->gradient->ticks.max = g_value_get_double(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_MIN: if(!data->gradient) return; data->gradient->ticks.min = g_value_get_double(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_STEP: if(!data->gradient) return; data->gradient->ticks.step = g_value_get_double(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_NMINOR: if(!data->gradient) return; data->gradient->ticks.nminor = g_value_get_int(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_NMAJOR: if(!data->gradient) return; data->gradient->ticks.nmajorticks = g_value_get_int(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_SCALE: if(!data->gradient) return; data->gradient->ticks.scale = g_value_get_int(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_BREAK: if(!data->gradient) return; data->gradient->ticks.apply_break = g_value_get_boolean(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_BREAK_MAX: if(!data->gradient) return; data->gradient->ticks.break_max = g_value_get_double(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_BREAK_MIN: if(!data->gradient) return; data->gradient->ticks.break_min = g_value_get_double(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_BREAK_STEP: if(!data->gradient) return; data->gradient->ticks.break_step = g_value_get_double(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_BREAK_NMINOR: if(!data->gradient) return; data->gradient->ticks.break_nminor = g_value_get_int(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_BREAK_SCALE: if(!data->gradient) return; data->gradient->ticks.break_scale = g_value_get_int(value); gtk_plot_data_reset_gradient(data); break; case ARG_GRADIENT_BREAK_POSITION: if(!data->gradient) return; data->gradient->ticks.break_position = g_value_get_double(value); break; } } static void gtk_plot_data_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotData *data; data = GTK_PLOT_DATA (object); switch (prop_id) { case ARG_NAME: g_value_set_string(value, data->name); break; case ARG_LEGEND: g_value_set_string(value, data->legend); break; case ARG_ITERATOR: g_value_set_boolean(value, data->is_iterator); break; case ARG_FUNCTION: g_value_set_boolean(value, data->is_function); break; case ARG_ITERATOR_MASK: g_value_set_int(value, data->iterator_mask); break; case ARG_NUM_POINTS: g_value_set_int(value, data->num_points); break; case ARG_FILL_AREA: g_value_set_boolean(value, data->fill_area); break; case ARG_XSTEP: g_value_set_double(value, data->x_step); break; case ARG_YSTEP: g_value_set_double(value, data->y_step); break; case ARG_ZSTEP: g_value_set_double(value, data->z_step); break; case ARG_SYMBOL_TYPE: g_value_set_int(value, data->symbol.symbol_type); break; case ARG_SYMBOL_STYLE: g_value_set_int(value, data->symbol.symbol_style); break; case ARG_SYMBOL_SIZE: g_value_set_int(value, data->symbol.size); break; case ARG_SYMBOL_COLOR: g_value_set_pointer(value, &data->symbol.color); break; case ARG_SYMBOL_BORDER_WIDTH: g_value_set_double(value, data->symbol.border.line_width); break; case ARG_SYMBOL_BORDER_COLOR: g_value_set_pointer(value, &data->symbol.border.color); break; case ARG_LINE_STYLE: g_value_set_int(value, data->line.line_style); break; case ARG_LINE_CAP: g_value_set_int(value, data->line.cap_style); break; case ARG_LINE_JOIN: g_value_set_int(value, data->line.join_style); break; case ARG_LINE_WIDTH: g_value_set_double(value, data->line.line_width); break; case ARG_LINE_COLOR: g_value_set_pointer(value, &data->line.color); break; case ARG_LINE_CONNECTOR: g_value_set_int(value, data->line_connector); break; case ARG_XLINE_STYLE: g_value_set_int(value, data->x_line.line_style); break; case ARG_XLINE_CAP: g_value_set_int(value, data->x_line.cap_style); break; case ARG_XLINE_JOIN: g_value_set_int(value, data->x_line.join_style); break; case ARG_XLINE_WIDTH: g_value_set_double(value, data->x_line.line_width); break; case ARG_XLINE_COLOR: g_value_set_pointer(value, &data->x_line.color); break; case ARG_YLINE_STYLE: g_value_set_int(value, data->y_line.line_style); break; case ARG_YLINE_CAP: g_value_set_int(value, data->y_line.cap_style); break; case ARG_YLINE_JOIN: g_value_set_int(value, data->y_line.join_style); break; case ARG_YLINE_WIDTH: g_value_set_double(value, data->y_line.line_width); break; case ARG_YLINE_COLOR: g_value_set_pointer(value, &data->y_line.color); break; case ARG_ZLINE_STYLE: g_value_set_int(value, data->z_line.line_style); break; case ARG_ZLINE_CAP: g_value_set_int(value, data->z_line.cap_style); break; case ARG_ZLINE_JOIN: g_value_set_int(value, data->z_line.join_style); break; case ARG_ZLINE_WIDTH: g_value_set_double(value, data->z_line.line_width); break; case ARG_ZLINE_COLOR: g_value_set_pointer(value, &data->z_line.color); break; case ARG_SHOW_XERRBARS: g_value_set_boolean(value, data->show_xerrbars); break; case ARG_XERRBARS_WIDTH: g_value_set_int(value, data->xerrbar_width); break; case ARG_XERRBARS_CAPS: g_value_set_int(value, data->xerrbar_caps); break; case ARG_SHOW_YERRBARS: g_value_set_boolean(value, data->show_yerrbars); break; case ARG_YERRBARS_WIDTH: g_value_set_int(value, data->yerrbar_width); break; case ARG_YERRBARS_CAPS: g_value_set_int(value, data->yerrbar_caps); break; case ARG_SHOW_ZERRBARS: g_value_set_boolean(value, data->show_zerrbars); break; case ARG_ZERRBARS_WIDTH: g_value_set_int(value, data->zerrbar_width); break; case ARG_ZERRBARS_CAPS: g_value_set_int(value, data->zerrbar_caps); break; case ARG_SHOW_LEGENDS: g_value_set_boolean(value, data->show_legend); break; case ARG_LEGENDS_PRECISION: g_value_set_int(value, data->legends_precision); break; case ARG_LEGENDS_STYLE: g_value_set_int(value, data->legends_style); break; case ARG_SHOW_LABELS: g_value_set_boolean(value, data->show_labels); break; case ARG_LABELS_TRANSPARENT: g_value_set_boolean(value, data->labels_attr.transparent); break; case ARG_LABELS_ANGLE: g_value_set_int(value, data->labels_attr.angle); break; case ARG_LABELS_BORDER: g_value_set_int(value, data->labels_attr.border); break; case ARG_LABELS_BORDER_SPACE: g_value_set_int(value, data->labels_attr.border_space); break; case ARG_LABELS_BORDER_WIDTH: g_value_set_int(value, data->labels_attr.border_width); break; case ARG_LABELS_BORDER_SHADOW: g_value_set_int(value, data->labels_attr.shadow_width); break; case ARG_LABELS_FG: g_value_set_pointer(value, &data->labels_attr.fg); break; case ARG_LABELS_BG: g_value_set_pointer(value, &data->labels_attr.bg); break; case ARG_LABELS_OFFSET: g_value_set_int(value, data->labels_offset); break; case ARG_LABELS_SIZE: g_value_set_int(value, data->labels_attr.height); break; case ARG_LABELS_FONT: g_value_set_string(value, data->labels_attr.font); break; case ARG_LABELS_TEXT: g_value_set_string(value, data->labels_attr.text); break; case ARG_SHOW_GRADIENT: g_value_set_boolean(value, data->show_gradient); break; case ARG_GRADIENT_CUSTOM: g_value_set_boolean(value, data->gradient_custom); break; case ARG_GRADIENT_MASK: g_value_set_int(value, data->gradient_mask); break; case ARG_GRADIENT_SHOW_LT_GT: g_value_set_boolean(value, data->gradient_show_lt_gt); break; case ARG_COLOR_MIN: g_value_set_pointer(value, &data->color_min); break; case ARG_COLOR_MAX: g_value_set_pointer(value, &data->color_max); break; case ARG_COLOR_LT_MIN: g_value_set_pointer(value, &data->color_lt_min); break; case ARG_COLOR_GT_MAX: g_value_set_pointer(value, &data->color_gt_max); break; case ARG_GRADIENT_MAX: if(!data->gradient) return; g_value_set_double(value, data->gradient->ticks.max); break; case ARG_GRADIENT_MIN: if(!data->gradient) return; g_value_set_double(value, data->gradient->ticks.min); break; case ARG_GRADIENT_STEP: if(!data->gradient) return; g_value_set_double(value, data->gradient->ticks.step); break; case ARG_GRADIENT_NMINOR: if(!data->gradient) return; g_value_set_int(value, data->gradient->ticks.nminor); break; case ARG_GRADIENT_NMAJOR: if(!data->gradient) return; g_value_set_int(value, data->gradient->ticks.nmajorticks); break; case ARG_GRADIENT_SCALE: if(!data->gradient) return; g_value_set_int(value, data->gradient->ticks.scale); break; case ARG_GRADIENT_BREAK: if(!data->gradient) return; g_value_set_boolean(value, data->gradient->ticks.apply_break); break; case ARG_GRADIENT_BREAK_MAX: if(!data->gradient) return; g_value_set_double(value, data->gradient->ticks.break_max); break; case ARG_GRADIENT_BREAK_MIN: if(!data->gradient) return; g_value_set_double(value, data->gradient->ticks.break_min); break; case ARG_GRADIENT_BREAK_STEP: if(!data->gradient) return; g_value_set_double(value, data->gradient->ticks.break_step); break; case ARG_GRADIENT_BREAK_NMINOR: if(!data->gradient) return; g_value_set_int(value, data->gradient->ticks.break_nminor); break; case ARG_GRADIENT_BREAK_SCALE: if(!data->gradient) return; g_value_set_int(value, data->gradient->ticks.break_scale); break; case ARG_GRADIENT_BREAK_POSITION: if(!data->gradient) return; g_value_set_double(value, data->gradient->ticks.break_position); break; case ARG_GRADIENT: g_value_set_object(value, GTK_OBJECT(data->gradient)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } GtkWidget* gtk_plot_data_new (void) { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_data_get_type (), NULL); return (widget); } /** * gtk_plot_data_new_function: * @function: (scope async): a #GtkPlotFunc. * * Return value: (transfer none): the #GtkPlotData Widget */ GtkWidget* gtk_plot_data_new_function (GtkPlotFunc function) { GtkWidget *dataset; dataset = gtk_widget_new (gtk_plot_data_get_type (), NULL); gtk_plot_data_construct_function (GTK_PLOT_DATA(dataset), function); return (dataset); } /** * gtk_plot_data_construct_function: * @data: a #GtkPlotData widget. * @function: (scope notified): a #GtkPlotFunc. */ void gtk_plot_data_construct_function (GtkPlotData *data, GtkPlotFunc function) { data->is_function = TRUE; data->function = function; } /** * gtk_plot_data_new_iterator: * @iterator: (scope async): a #GtkPlotIterator. * @npoints: * @mask: * * Return value: (transfer full) a new #GtkPlotData. */ GtkWidget* gtk_plot_data_new_iterator (GtkPlotIterator iterator, gint npoints, guint16 mask) { GtkWidget *dataset; dataset = gtk_widget_new (gtk_plot_data_get_type (), NULL); gtk_plot_data_construct_iterator (GTK_PLOT_DATA(dataset), iterator, npoints, mask); return (dataset); } /** * gtk_plot_data_construct_iterator: * @data: a #GtkPlotData widget. * @iterator: (scope async): a #GtkPlotIterator. * @npoints: * @mask: */ void gtk_plot_data_construct_iterator (GtkPlotData *data, GtkPlotIterator iterator, gint npoints, guint16 mask) { data->is_iterator = TRUE; data->iterator_mask = mask; data->iterator = iterator; data->num_points = npoints; } /** * gtk_plot_data_clone: * @data: a #GtkPlotData widget. * @copy: * * */ void gtk_plot_data_clone (GtkPlotData *data, GtkPlotData *copy) { GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->clone(data, copy); } /** * gtk_plot_data_update: * @data: a #GtkPlotData widget. * * */ void gtk_plot_data_update(GtkPlotData *data) { GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->update(data, TRUE); } static void gtk_plot_data_real_update(GtkPlotData *data, gboolean new_range) { data->redraw_pending = TRUE; } static void update_gradient(GtkPlotData *data) { data->redraw_pending = TRUE; } /* static void gtk_plot_data_draw (GtkWidget *widget, GdkRectangle *area) { if(!gtk_widget_get_visible(widget)) return; g_signal_emit(GTK_OBJECT(widget), data_signals[DRAW_DATA], 0, NULL); GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(widget)))->draw_data(GTK_PLOT_DATA(widget)); GTK_PLOT_DATA(widget)->redraw_pending = FALSE; } */ static void draw_marker(GtkPlotData *data, GtkPlotMarker *marker) { GtkPlot *plot; GdkColor black; GdkColormap *colormap = NULL; GtkPlotPoint p[6]; gdouble x, y, z, a, dx, dy, dz, da; gchar *label; gboolean error; gdouble px, py; if(!data->plot) return; plot = data->plot; gtk_plot_data_get_point(data, marker->point, &x, &y, &z, &a, &dx, &dy, &dz, &da, &label, &error); if(x < plot->xmin || y < plot->ymin || x >= plot->xmax || y >= plot->ymax) return; gtk_plot_get_pixel(plot, x, y, &px, &py); colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &black); gtk_plot_pc_set_color(plot->pc, &black); gtk_plot_pc_set_lineattr(plot->pc, 1, 0, 0, 0); p[0].x = px; p[0].y = py; p[1].x = px - 6; p[1].y = py - 12; p[2].x = px + 6; p[2].y = py - 12; gtk_plot_pc_draw_polygon(plot->pc, TRUE, p, 3); p[1].x = px - 6; p[1].y = py + 12; p[2].x = px + 6; p[2].y = py + 12; gtk_plot_pc_draw_polygon(plot->pc, TRUE, p, 3); p[0].x = px - 6; p[0].y = py; p[1].x = px + 7; p[1].y = py; gtk_plot_pc_set_lineattr(plot->pc, 3, 0, 0, 0); gtk_plot_pc_draw_polygon(plot->pc, FALSE, p, 2); } void gtk_plot_data_paint (GtkPlotData *data) { g_signal_emit(GTK_OBJECT(data), data_signals[DRAW_DATA], 0, NULL); data->redraw_pending = FALSE; } static void gtk_plot_data_draw_private (GtkPlotData *data) { GList *list = NULL; gtk_plot_data_real_draw(data, data->num_points); if(data->show_markers){ list = data->markers; while(list){ GtkPlotMarker *marker; marker = (GtkPlotMarker *)list->data; draw_marker(data, marker); list = list->next; } } } static void gtk_plot_data_real_draw (GtkPlotData *dataset, gint npoints) { GtkWidget *widget; GtkPlot *plot = NULL; GtkPlotData *function; GdkColormap *colormap; GdkRectangle area, clip_area; gdouble x, y, z = 0., a = 0.; gdouble dx = 0., dy = 0., dz = 0., da = 0.; gdouble *fx = NULL; gdouble *fy = NULL; gdouble *fz = NULL; gdouble *fa = NULL; gdouble *fdx = NULL; gdouble *fdy = NULL; gdouble *fdz = NULL; gdouble *fda = NULL; gchar **fl = NULL; gboolean error; gdouble m; GtkAllocation allocation; g_return_if_fail(GTK_IS_PLOT_DATA(dataset)); g_return_if_fail(dataset->plot != NULL); g_return_if_fail(GTK_IS_PLOT(dataset->plot)); if(!gtk_widget_get_visible(GTK_WIDGET(dataset))) return; plot = dataset->plot; widget = GTK_WIDGET(plot); colormap = gdk_colormap_get_system(); gtk_plot_pc_gsave(plot->pc); m = plot->magnification; gtk_widget_get_allocation(widget, &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; clip_area.x = area.x + roundint(plot->x * area.width); clip_area.y = area.y + roundint(plot->y * area.height); clip_area.width = roundint(plot->width * area.width); clip_area.height = roundint(plot->height * area.height); if(dataset->is_function) { gdouble xmin, xmax, px, py; function = dataset; function->num_points = 0; gtk_plot_get_pixel(plot, plot->xmin, 0, &xmin, &py); gtk_plot_get_pixel(plot, plot->xmax, 0, &xmax, &py); for(px = xmin; px <= xmax; px += function->x_step) { function->num_points++; fx = (gdouble *)g_realloc(fx, function->num_points*sizeof(gdouble)); fy = (gdouble *)g_realloc(fy, function->num_points*sizeof(gdouble)); gtk_plot_get_point(plot, px, 0, &x, &y); y = function->function (plot, dataset, x, &error); if(error) { gtk_plot_data_set_x(function, fx); gtk_plot_data_set_y(function, fy); function->num_points--; if(function->num_points > 1) gtk_plot_data_connect_points (function, function->num_points); function->num_points = 0; } else { fx[function->num_points-1] = x; fy[function->num_points-1] = y; } } if(function->num_points > 1 ) { gtk_plot_data_set_x(function, fx); gtk_plot_data_set_y(function, fy); gtk_plot_data_connect_points (function, function->num_points); } gtk_plot_data_set_x(function, NULL); gtk_plot_data_set_y(function, NULL); g_free(fx); g_free(fy); } else if(dataset->is_iterator) { gint iter; gchar *label; function = dataset; if(function->iterator_mask & GTK_PLOT_DATA_X) fx = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_Y) fy = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_Z) fz = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_A) fa = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_DX) fdx = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_DY) fdy = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_DZ) fdz = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_DA) fda = g_new0(gdouble, npoints); if(function->iterator_mask & GTK_PLOT_DATA_LABELS) fl = (gchar **)g_malloc0(npoints * sizeof(gchar *)); for(iter = 0; iter < npoints; iter++){ function->iterator (plot, dataset, function->num_points - npoints + iter, &x, &y, &z, &a, &dx, &dy, &dz, &da, &label, &error); if(error) { break; } else { if(function->iterator_mask & GTK_PLOT_DATA_X) fx[iter] = x; if(function->iterator_mask & GTK_PLOT_DATA_Y) fy[iter] = y; if(function->iterator_mask & GTK_PLOT_DATA_Z) fz[iter] = z; if(function->iterator_mask & GTK_PLOT_DATA_A) fa[iter] = a; if(function->iterator_mask & GTK_PLOT_DATA_DX) fdx[iter] = dx; if(function->iterator_mask & GTK_PLOT_DATA_DY) fdy[iter] = dy; if(function->iterator_mask & GTK_PLOT_DATA_DZ) fdz[iter] = dz; if(function->iterator_mask & GTK_PLOT_DATA_DA) fda[iter] = da; if(function->iterator_mask & GTK_PLOT_DATA_LABELS) fl[iter] = g_strdup(label); } } gtk_plot_data_set_x(function, fx); gtk_plot_data_set_y(function, fy); gtk_plot_data_set_z(function, fz); gtk_plot_data_set_a(function, fa); gtk_plot_data_set_dx(function, fdx); gtk_plot_data_set_dy(function, fdy); gtk_plot_data_set_dz(function, fdz); gtk_plot_data_set_da(function, fda); gtk_plot_data_set_labels(function, fl); gtk_plot_data_real_real_draw(function, MIN(iter, npoints)); if(fx) g_free(fx); if(fy) g_free(fy); if(fz) g_free(fz); if(fa) g_free(fa); if(fdx) g_free(fdx); if(fdy) g_free(fdy); if(fdz) g_free(fdz); if(fda) g_free(fda); gtk_plot_data_dimension_set_points(function, "x", NULL); gtk_plot_data_dimension_set_points(function, "y", NULL); gtk_plot_data_dimension_set_points(function, "z", NULL); gtk_plot_data_dimension_set_points(function, "dx", NULL); gtk_plot_data_dimension_set_points(function, "dy", NULL); gtk_plot_data_dimension_set_points(function, "dz", NULL); gtk_plot_data_dimension_set_points(function, "a", NULL); gtk_plot_data_dimension_set_points(function, "da", NULL); if(fl) { for(iter = 0; iter < npoints; iter++) g_free(fl[iter]); g_free(fl); } gtk_plot_data_set_labels(function, NULL); } else gtk_plot_data_real_real_draw(dataset, npoints); gtk_plot_pc_grestore(plot->pc); } static void gtk_plot_data_real_real_draw (GtkPlotData *dataset, gint npoints) { GtkWidget *widget; GtkPlot *plot = NULL; GdkRectangle area; GdkColormap *colormap; gdouble *array_x = NULL, *array_y = NULL, *array_z = NULL, *array_a = NULL; gdouble *array_dx = NULL, *array_dy = NULL, *array_dz = NULL, *array_da = NULL; GtkPlotArray *y_array; GtkPlotArray *z_array; gchar **array_labels; gdouble x = 0., y = 0., z = 0., a = 0.; gdouble dx = 0., dy = 0., dz = 0., da = 0.; gdouble a_scale = 1., y_scale = 1., z_scale = 1.; gint n; gdouble m; GtkAllocation allocation; g_return_if_fail(GTK_IS_PLOT_DATA(dataset)); g_return_if_fail(dataset->plot != NULL); g_return_if_fail(GTK_IS_PLOT(dataset->plot)); plot = dataset->plot; widget = GTK_WIDGET(plot); colormap = gdk_colormap_get_system(); gtk_widget_get_allocation(widget, &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; gtk_plot_pc_gsave(plot->pc); m = plot->magnification; npoints = MIN(npoints, dataset->num_points); gtk_plot_data_connect_points (dataset, npoints+1); gtk_plot_data_draw_xyz(dataset, npoints); array_x = gtk_plot_data_get_x(dataset, &n); array_y = gtk_plot_data_get_y(dataset, &n); array_z = gtk_plot_data_get_z(dataset, &n); array_a = gtk_plot_data_get_a(dataset, &n); array_dx = gtk_plot_data_get_dx(dataset, &n); array_dy = gtk_plot_data_get_dy(dataset, &n); array_dz = gtk_plot_data_get_dz(dataset, &n); array_da = gtk_plot_data_get_da(dataset, &n); array_labels = gtk_plot_data_get_labels(dataset, &n); a_scale = gtk_plot_data_get_a_scale(dataset); y_array = gtk_plot_data_dimension_get_array(dataset, "y"); y_scale = y_array->scale; z_array = gtk_plot_data_dimension_get_array(dataset, "z"); if(z_array) z_scale = z_array->scale; for(n=dataset->num_points-npoints; n<=dataset->num_points-1; n++) { if(array_x) x = array_x[n]; if(array_y) y = array_y[n]; if(array_z) z = array_z[n]; if(array_a) a = array_a[n]; if(array_dx) dx = array_dx[n]; if(array_dy) dy = array_dy[n]; if(array_dz) dz = array_dz[n]; if(array_da) da = array_da[n]; if(!plot->clip_data || (plot->clip_data && GTK_IS_PLOT_POLAR(plot) && x >= GTK_PLOT_POLAR(plot)->r->ticks.min && x <= GTK_PLOT_POLAR(plot)->r->ticks.max) || (plot->clip_data && x >= plot->xmin && x <= plot->xmax)){ GdkColor symbol_color, border_color; gint symbol_size; symbol_color = dataset->symbol.color; border_color = dataset->symbol.border.color; symbol_size = dataset->symbol.size; if(array_da){ GdkColor level_color; gtk_plot_data_get_gradient_level(dataset, da, &level_color); dataset->symbol.color = level_color; dataset->symbol.border.color = level_color; } if(array_a && !GTK_IS_PLOT3D(plot)){ gdouble px, py, px0, py0; gtk_plot_get_pixel(plot, x, y*y_scale, &px, &py); gtk_plot_get_pixel(plot, x + a, y*y_scale, &px0, &py0); dataset->symbol.size = fabs((px - px0)/plot->magnification); dataset->symbol.size *= fabs(a_scale); } GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(dataset)))->draw_symbol(dataset, x, y*y_scale, z*z_scale, a, dx, dy, dz, da); dataset->symbol.color = symbol_color; dataset->symbol.border.color = border_color; dataset->symbol.size = symbol_size; if(dataset->show_labels){ if(array_labels && array_labels[n]){ GtkPlotText label; gdouble px, py, pz; if(GTK_IS_PLOT3D(plot)) gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y*y_scale, z*z_scale, &px, &py, &pz); else gtk_plot_get_pixel(plot, x, y*y_scale, &px, &py); label = dataset->labels_attr; label.text = array_labels[n]; label.x = (gdouble)px / (gdouble)area.width; label.y = (gdouble)(py - roundint((dataset->labels_offset + dataset->symbol.size) * m)) / (gdouble)area.height; gtk_plot_draw_text(plot, label); } } } } gtk_plot_pc_grestore(plot->pc); } static void gtk_plot_data_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent = 0, ldescent = 0, lheight = 0, lwidth = 0; gdouble m; GtkAllocation allocation; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); if(!gtk_widget_get_visible(GTK_WIDGET(data->plot))) return; if(!gtk_widget_get_visible(GTK_WIDGET(data))) return; plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gtk_plot_pc_gsave(plot->pc); gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); if(data->show_legend){ lheight = MAX(lascent+ldescent, roundint(m * (data->symbol.size + 2 * data->symbol.border.line_width))); legend.x = (gdouble)(area.x + x + roundint((plot->legends_line_width + 4) * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lheight - ldescent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); if(data->line_connector != GTK_PLOT_CONNECT_NONE || data->symbol.symbol_type == GTK_PLOT_SYMBOL_IMPULSE) gtk_plot_draw_line(plot, data->line, x + area.x, y + area.y + lheight / 2, x + area.x + roundint(plot->legends_line_width * m), y + area.y + lheight / 2); if(data->symbol.symbol_type != GTK_PLOT_SYMBOL_IMPULSE){ GtkPlotSymbol aux_symbol; gint x1, y1; x1 = x + area.x + roundint(plot->legends_line_width * m / 2.); y1 = y + area.y + lheight / 2; aux_symbol = data->symbol; aux_symbol.color = plot->background; aux_symbol.symbol_style = GTK_PLOT_SYMBOL_FILLED; aux_symbol.border.line_width = 0; if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_OPAQUE) gtk_plot_data_draw_symbol_private (data, x1, y1, aux_symbol); if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_FILLED){ aux_symbol.color = data->symbol.color; gtk_plot_data_draw_symbol_private (data, x1, y1, aux_symbol); } aux_symbol = data->symbol; aux_symbol.color = data->symbol.border.color; aux_symbol.symbol_style = GTK_PLOT_SYMBOL_EMPTY; gtk_plot_data_draw_symbol_private(data, x1, y1, aux_symbol); } y += 2 * lheight; } else y += lheight; gtk_plot_pc_grestore(plot->pc); } static void gtk_plot_data_draw_gradient(GtkPlotData *data) { if(!data->show_gradient) return; gtk_plot_pc_gsave(data->plot->pc); if(data->gradient->orientation == GTK_ORIENTATION_VERTICAL) draw_gradient_vertical(data, data->gradient_x, data->gradient_y); else draw_gradient_horizontal(data, data->gradient_x, data->gradient_y); gtk_plot_pc_grestore(data->plot->pc); } static void draw_gradient_vertical(GtkPlotData *data, gdouble px, gdouble py) { GtkPlot *plot = NULL; GtkPlotText legend; gchar text[100], new_label[100]; GdkRectangle area; GdkColor color; gint lascent, ldescent, lheight, lwidth; gint minascent, mindescent, minheight, minwidth; gint maxascent, maxdescent, maxheight, maxwidth; gint tascent, tdescent, twidth, theight; gdouble m; gint level; gint x = 0, y = 0; gint y_orig; gint x_orig; gdouble ry = 0; gint line_height; gint nlevels = data->gradient->ticks.nticks; gint gradient_width = 0; gint gradient_height = 0; gint width = 0, height = 0; gint nmajor = 0; gint y_max = 0; GtkAllocation allocation; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); if(!gtk_widget_get_visible(GTK_WIDGET(data->plot))) return; if(!gtk_widget_get_visible(GTK_WIDGET(data))) return; if(!data->show_gradient) return; plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; x = x_orig = roundint(plot->internal_allocation.x + plot->internal_allocation.width * px); y = y_orig = roundint(plot->internal_allocation.y + plot->internal_allocation.height * py); m = plot->magnification; legend = data->gradient->labels_attr; GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->get_gradient_size(data, &width, &height); if(!data->gradient->labels_attr.transparent){ gtk_plot_pc_set_color(plot->pc, &data->gradient->labels_attr.bg); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, y, width, height); } gtk_plot_pc_set_lineattr(plot->pc, data->gradient_border_width, 0, 0, 0); gtk_plot_pc_set_color(plot->pc, &data->gradient->labels_attr.fg); gtk_plot_pc_set_dash(plot->pc, 0, 0, 0); if(data->gradient_border != GTK_PLOT_BORDER_NONE) { gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, width, height); } gtk_plot_pc_set_lineattr(plot->pc, 0, 0, 0, 0); if(data->gradient_border == GTK_PLOT_BORDER_SHADOW) { gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x + roundint(data->gradient_shadow_width * m), y + height, width, roundint(data->gradient_shadow_width * m)); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x + width, y + roundint(data->gradient_shadow_width * m), roundint(data->gradient_shadow_width * m), height); } gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.min, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &minwidth, &minheight, &minascent, &mindescent); gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.max, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &maxwidth, &maxheight, &maxascent, &maxdescent); lwidth = MAX(minwidth, maxwidth); lheight = MAX(minheight, maxheight); lascent = MAX(minascent, maxascent); ldescent = MAX(mindescent, maxdescent); if(data->gradient_title_pos == GTK_PLOT_AXIS_LEFT || data->gradient_title_pos == GTK_PLOT_AXIS_RIGHT) data->gradient->title.angle = 90; else data->gradient->title.angle = 0; gtk_plot_text_get_size(data->gradient->title.text, data->gradient->title.angle, data->gradient->title.font, roundint(data->gradient->title.height * m), &twidth, &theight, &tascent, &tdescent); line_height = MAX(lheight, roundint(data->gradient_line_height * m)); gradient_height = (nlevels - 1) * line_height; gradient_height += 2*roundint(data->gradient_border_offset * m); gradient_width = 2*roundint(data->gradient_border_offset * m); x += roundint(data->gradient_border_offset * m); y += roundint(data->gradient_border_offset * m) + lheight / 2; if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ x += lwidth + roundint(data->gradient->labels_offset * m); gradient_width += lwidth + roundint(data->gradient->labels_offset * m); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ gradient_width += lwidth + roundint(data->gradient->labels_offset * m); } if(data->gradient->title_visible){ if(data->gradient_title_pos == GTK_PLOT_AXIS_LEFT) { x += twidth + roundint(data->gradient->labels_offset * m); if(theight > gradient_height) y = y + theight / 2 - gradient_height / 2; } if(data->gradient_title_pos == GTK_PLOT_AXIS_RIGHT) { if(theight > gradient_height) y = y + theight / 2 - gradient_height / 2; } if(data->gradient_title_pos == GTK_PLOT_AXIS_TOP){ y += theight + roundint(data->gradient->labels_offset * m); if(twidth > gradient_width) x = x + twidth / 2 - gradient_width / 2; } if(data->gradient_title_pos == GTK_PLOT_AXIS_BOTTOM){ if(twidth > gradient_width) x = x + twidth / 2 - gradient_width / 2; } } for(level = nlevels-1; level >= 0; level--){ if(!data->gradient->ticks.values[level].minor) nmajor++; } if(!data->gradient_custom){ gint ncolors = (nmajor-1)*line_height; gint cy; gdouble h; gint l; cy = y; gtk_plot_pc_set_lineattr(plot->pc, 0, 0, 0, 0); for(l = ncolors; l >= 0; l -= 1){ h = gtk_plot_axis_ticks_inverse(data->gradient, (gdouble)l/(gdouble)ncolors); gtk_plot_data_get_gradient_level(data, h, &color); gtk_plot_pc_set_color(plot->pc, &color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, cy, roundint(data->gradient_line_width * m), 1); /* gtk_plot_pc_draw_line(plot->pc, x, cy, x + roundint(data->gradient_line_width * m), cy); */ cy++; } gtk_plot_pc_set_color(plot->pc, &plot->legends_attr.fg); gtk_plot_pc_set_lineattr(plot->pc, plot->legends_border_width, 0, 0, 0); gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, roundint(data->gradient_line_width * m), ncolors); y_max = y + ncolors; } else { legend.x = (gdouble)(area.x + x) / (gdouble)area.width; ry = y; gint ncolors = 0; for(level = nlevels-1; level >= 0; level--){ gdouble val, h; gboolean sublevel = FALSE; val = data->gradient->ticks.values[level].value; sublevel = data->gradient->ticks.values[level].minor; /* if(val <= data->gradient->ticks.min || val > data->gradient->ticks.max) continue; */ if(level != 0){ h = val; color = data->gradient_colors[level-1]; gtk_plot_pc_set_color(plot->pc, &color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, ry, roundint(data->gradient_line_width * m), line_height/(gdouble)(data->gradient->ticks.nminor+1)); ncolors++; ry += line_height/(gdouble)(data->gradient->ticks.nminor+1); } } gtk_plot_pc_set_color(plot->pc, &plot->legends_attr.fg); gtk_plot_pc_set_lineattr(plot->pc, plot->legends_border_width, 0, 0, 0); gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, roundint(data->gradient_line_width * m), ry-y); y_max = ry; } ry = y; for(level = nlevels-1; level >= 0; level--){ gdouble val; gboolean sublevel = FALSE; val = data->gradient->ticks.values[level].value; if(data->gradient->ticks.values[level].minor) sublevel = TRUE; if(val < data->gradient->ticks.min || val > data->gradient->ticks.max) continue; if(!sublevel){ ry = y_max-gtk_plot_axis_ticks_transform(data->gradient, val)*(y_max-y); legend.y = (gdouble)(area.y + ry + lascent - (lascent + ldescent)/2.) / (gdouble)area.height; gtk_plot_axis_parse_label(data->gradient, val, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } legend.text = text; if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ legend.x = (gdouble)(area.x + x - roundint(data->gradient->labels_offset * m)) / (gdouble)area.width; legend.justification = GTK_JUSTIFY_RIGHT; gtk_plot_draw_text(plot, legend); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ legend.x = (gdouble)(area.x + x + roundint(data->gradient_line_width * m) + roundint(data->gradient->labels_offset * m)) / (gdouble)area.width; legend.justification = GTK_JUSTIFY_LEFT; gtk_plot_draw_text(plot, legend); } gtk_plot_pc_draw_line(plot->pc, x, ry, x + roundint(data->gradient->ticks_length * m), ry); gtk_plot_pc_draw_line(plot->pc, x + roundint(data->gradient_line_width * m) - roundint(data->gradient->ticks_length * m), ry, x + roundint(data->gradient_line_width * m), ry); } ry += line_height/(gdouble)(data->gradient->ticks.nminor+1); } if(data->gradient->title_visible){ switch(data->gradient_title_pos){ case GTK_PLOT_AXIS_LEFT: legend = data->gradient->title; legend.angle = 90; legend.x = (gdouble)(area.x + x_orig + tascent + tdescent + roundint(data->gradient_border_offset * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + height / 2.)/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; case GTK_PLOT_AXIS_RIGHT: legend = data->gradient->title; legend.angle = 270; legend.x = (gdouble)(area.x + x + lwidth + roundint(data->gradient_line_width) * m + roundint(2*data->gradient_border_offset * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + height / 2.)/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; case GTK_PLOT_AXIS_TOP: legend = data->gradient->title; legend.angle = 0; legend.x = (gdouble)(area.x + x_orig + width / 2) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + theight + roundint((data->gradient_border_offset) * m))/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; case GTK_PLOT_AXIS_BOTTOM: legend = data->gradient->title; legend.angle = 0; legend.x = (gdouble)(area.x + x_orig + width / 2) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + height - roundint(data->gradient_border_offset * m))/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; } } } static void draw_gradient_horizontal(GtkPlotData *data, gdouble px, gdouble py) { GtkPlot *plot = NULL; GtkPlotText legend; gchar text[100], new_label[100]; GdkRectangle area; GdkColor color; gint lascent, ldescent, lheight, lwidth; gint minascent, mindescent, minheight, minwidth; gint maxascent, maxdescent, maxheight, maxwidth; gint tascent, tdescent, twidth, theight; gdouble m; gint level; gint x = 0, y = 0; gint width = 0, height = 0; gint y_orig; gint x_orig; gdouble rx = 0; gint line_width; gint nlevels = data->gradient->ticks.nticks; gint gradient_width = 0; gint gradient_height = 0; gint nmajor = 0; gint ncolors = 0; gint x_max = 0; GtkAllocation allocation; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); if(!gtk_widget_get_visible(GTK_WIDGET(data->plot))) return; if(!gtk_widget_get_visible(GTK_WIDGET(data))) return; if(!data->show_gradient) return; plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; x = x_orig = roundint(plot->internal_allocation.x + plot->internal_allocation.width * px); y = y_orig = roundint(plot->internal_allocation.y + plot->internal_allocation.height * py); m = plot->magnification; legend = data->gradient->labels_attr; GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->get_gradient_size(data, &width, &height); if(!data->gradient->labels_attr.transparent){ gtk_plot_pc_set_color(plot->pc, &data->gradient->labels_attr.bg); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, y, width, height); } gtk_plot_pc_set_lineattr(plot->pc, data->gradient_border_width, 0, 0, 0); gtk_plot_pc_set_color(plot->pc, &data->gradient->labels_attr.fg); gtk_plot_pc_set_dash(plot->pc, 0, 0, 0); if(data->gradient_border != GTK_PLOT_BORDER_NONE) { gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, width, height); } gtk_plot_pc_set_lineattr(plot->pc, 0, 0, 0, 0); if(data->gradient_border == GTK_PLOT_BORDER_SHADOW) { gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x + roundint(data->gradient_shadow_width * m), y + height, width, roundint(data->gradient_shadow_width * m)); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x + width, y + roundint(data->gradient_shadow_width * m), roundint(data->gradient_shadow_width * m), height); } gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.min, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &minwidth, &minheight, &minascent, &mindescent); gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.max, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &maxwidth, &maxheight, &maxascent, &maxdescent); lwidth = MAX(minwidth, maxwidth); lheight = MAX(minheight, maxheight); lascent = MAX(minascent, maxascent); ldescent = MAX(mindescent, maxdescent); if(data->gradient_title_pos == GTK_PLOT_AXIS_LEFT || data->gradient_title_pos == GTK_PLOT_AXIS_RIGHT) data->gradient->title.angle = 90; else data->gradient->title.angle = 0; gtk_plot_text_get_size(data->gradient->title.text, data->gradient->title.angle, data->gradient->title.font, roundint(data->gradient->title.height * m), &twidth, &theight, &tascent, &tdescent); line_width = MAX(lwidth + roundint(data->gradient->labels_offset * m), roundint(data->gradient_line_width * m)); gradient_height = (nlevels - 1) * line_width; gradient_height += 2*roundint(data->gradient_border_offset * m); y += roundint(data->gradient_border_offset * m); x += roundint(data->gradient_border_offset * m); x += lwidth / 2.; gradient_width = 2*roundint(data->gradient_border_offset * m); if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ y += lascent + ldescent + roundint(data->gradient->labels_offset * m); gradient_width += lascent + ldescent + roundint(data->gradient->labels_offset * m); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ gradient_width += lascent + ldescent + roundint(data->gradient->labels_offset * m); } if(data->gradient->title_visible){ gradient_width += roundint(data->gradient_line_width * m); if(data->gradient_title_pos == GTK_PLOT_AXIS_LEFT) { x += twidth + roundint(data->gradient->labels_offset * m); if(theight > gradient_width) y = y + theight / 2 - gradient_width / 2; } if(data->gradient_title_pos == GTK_PLOT_AXIS_RIGHT) { if(theight > gradient_width) y = y + theight / 2 - gradient_width / 2; } if(data->gradient_title_pos == GTK_PLOT_AXIS_TOP){ y += (tascent + tdescent) + roundint(data->gradient->labels_offset * m); if(twidth > gradient_height) x = x + twidth / 2 - gradient_height / 2; } if(data->gradient_title_pos == GTK_PLOT_AXIS_BOTTOM){ if(twidth > gradient_height) x = x + twidth / 2 - gradient_height / 2; } } for(level = nlevels-1; level >= 0; level--){ if(!data->gradient->ticks.values[level].minor) nmajor++; } if(!data->gradient_custom){ gint ncolors = (nmajor-1)*line_width; gint cx; gdouble h; gint l; cx = x; gtk_plot_pc_set_lineattr(plot->pc, 0, 0, 0, 0); for(l = ncolors; l >= 0; l--){ h = gtk_plot_axis_ticks_inverse(data->gradient, (gdouble)(ncolors-l)/(gdouble)ncolors); gtk_plot_data_get_gradient_level(data, h, &color); gtk_plot_pc_set_color(plot->pc, &color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, cx, y, 1, roundint(data->gradient_line_height * m)); /* gtk_plot_pc_draw_line(plot->pc, cx, y, cx, y + roundint(data->gradient_line_height * m)); */ cx++; } gtk_plot_pc_set_color(plot->pc, &plot->legends_attr.fg); gtk_plot_pc_set_lineattr(plot->pc, plot->legends_border_width, 0, 0, 0); gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, ncolors, roundint(data->gradient_line_height * m)); x_max = x + ncolors; } else { legend.x = (gdouble)(area.x + x) / (gdouble)area.width; rx = x; ncolors = 0; for(level = 0; level < nlevels; level++){ gdouble val, h; gboolean sublevel = FALSE; val = data->gradient->ticks.values[level].value; sublevel = data->gradient->ticks.values[level].minor; /* if(val <= data->gradient->ticks.min || val > data->gradient->ticks.max) continue; */ if(level != 0){ h = val; color = data->gradient_colors[level-1]; gtk_plot_pc_set_color(plot->pc, &color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, rx, y, line_width/(gdouble)(data->gradient->ticks.nminor+1), roundint(data->gradient_line_height * m)); ncolors++; rx += line_width/(gdouble)(data->gradient->ticks.nminor+1); } } gtk_plot_pc_set_color(plot->pc, &plot->legends_attr.fg); gtk_plot_pc_set_lineattr(plot->pc, plot->legends_border_width, 0, 0, 0); gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, rx - x, roundint(data->gradient_line_height * m)); x_max = rx; } rx = x; for(level = 0; level < nlevels; level++){ gdouble val; gboolean sublevel = FALSE; val = data->gradient->ticks.values[level].value; if(data->gradient->ticks.values[level].minor) sublevel = TRUE; if(val < data->gradient->ticks.min || val > data->gradient->ticks.max) continue; if(!sublevel){ rx = x+gtk_plot_axis_ticks_transform(data->gradient, val)*(x_max-x); legend.x = (gdouble)(area.x + rx) / (gdouble)area.width; gtk_plot_axis_parse_label(data->gradient, val, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } legend.text = text; if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ legend.y = (gdouble)(area.y + y - roundint(data->gradient->labels_offset * m)) / (gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ legend.y = (gdouble)(area.y + y + lheight + roundint(data->gradient_line_height * m ) + roundint(data->gradient->labels_offset * m)) / (gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); } gtk_plot_pc_draw_line(plot->pc, rx, y, rx, y + roundint(data->gradient->ticks_length * m)); gtk_plot_pc_draw_line(plot->pc, rx, y + roundint(data->gradient_line_height * m) - roundint(data->gradient->ticks_length * m), rx, y + roundint(data->gradient_line_height * m)); } rx += line_width/(gdouble)(data->gradient->ticks.nminor+1); } if(data->gradient->title_visible){ switch(data->gradient_title_pos){ case GTK_PLOT_AXIS_LEFT: legend = data->gradient->title; legend.angle = 90; legend.x = (gdouble)(area.x + x_orig + tascent + tdescent + roundint(data->gradient_border_offset * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + height / 2.)/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; case GTK_PLOT_AXIS_RIGHT: legend = data->gradient->title; legend.angle = 270; legend.x = (gdouble)(area.x + x_orig + width - twidth - roundint(data->gradient_border_offset * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + height / 2.)/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; case GTK_PLOT_AXIS_TOP: legend = data->gradient->title; legend.angle = 0; legend.x = (gdouble)(area.x + x_orig + width / 2.) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + roundint(data->gradient_border_offset * m) + theight)/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; case GTK_PLOT_AXIS_BOTTOM: legend = data->gradient->title; legend.angle = 0; legend.x = (gdouble)(area.x + x_orig + width / 2.) / (gdouble)area.width; legend.y = (gdouble)(area.y + y_orig + height - roundint(data->gradient_border_offset * m))/(gdouble)area.height; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); break; } } } static void gtk_plot_data_get_legend_size(GtkPlotData *data, gint *width, gint *height) { GtkPlot *plot = NULL; GtkPlotText legend; gint lascent = 0, ldescent = 0, lheight = 0, lwidth = 0; gdouble m; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); plot = data->plot; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; *height = 0; *width = roundint(12 * m); if(data->show_legend){ gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); *width = lwidth + roundint((plot->legends_line_width + 12) * m); *height = MAX(lascent + ldescent, roundint(data->symbol.size * m + 2 * data->symbol.border.line_width)); } } /** * gtk_plot_data_gradient: * @data: a #GtkPlotData widget. * * Return value: (transfer none) the gradient #GtkPlotAxis */ GtkPlotAxis * gtk_plot_data_gradient (GtkPlotData *data) { return data->gradient; } /** * gtk_plot_data_move_gradient: * @data: a #GtkPlotData widget. * @x: * @y: * * */ void gtk_plot_data_move_gradient(GtkPlotData *data, gdouble x, gdouble y) { data->gradient_x = x; data->gradient_y = y; g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_CHANGED], 0); } /** * gtk_plot_data_get_gradient_allocation: * @data: a #GtkPlotData widget * * Return value: (transfer full) the gradient #GtkAllocation */ GtkAllocation gtk_plot_data_get_gradient_allocation(GtkPlotData *data) { GdkRectangle area; GtkAllocation allocation; GtkPlot *plot = NULL; gint width, height; GtkAllocation plot_allocation; plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &plot_allocation); area.x = plot_allocation.x; area.y = plot_allocation.y; allocation.x = roundint(area.x + plot->internal_allocation.x + plot->internal_allocation.width * data->gradient_x); allocation.y = roundint(area.y + plot->internal_allocation.y + plot->internal_allocation.height * data->gradient_y); GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->get_gradient_size(data, &width, &height); allocation.width = width; allocation.height = height; return allocation; } /** * gtk_plot_data_set_gradient_size: * @data: a #GtkPlotData widget. * @size: * * */ void gtk_plot_data_set_gradient_size(GtkPlotData *data, gint size) { GtkPlot *plot = NULL; GtkPlotText legend; gint lascent = 0, ldescent = 0, lheight = 0, lwidth = 0; gint tascent = 0, tdescent = 0, theight = 0, twidth = 0; gint maxascent = 0, maxdescent = 0, maxheight = 0, maxwidth = 0; gint minascent = 0, mindescent = 0, minheight = 0, minwidth = 0; gdouble m; gchar text[100], new_label[100]; gint gradient_width = 0; gint gradient_height = 0; gint nlevels = data->gradient->ticks.nticks; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); plot = data->plot; m = plot->magnification; legend = data->gradient->labels_attr; if(!data->show_gradient) return; gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.min, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &minwidth, &minheight, &minascent, &mindescent); gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.max, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &maxwidth, &maxheight, &maxascent, &maxdescent); lwidth = MAX(minwidth, maxwidth); lheight = MAX(minheight, maxheight); lascent = MAX(minascent, maxascent); ldescent = MAX(mindescent, maxdescent); if(data->gradient_title_pos == GTK_PLOT_AXIS_LEFT || data->gradient_title_pos == GTK_PLOT_AXIS_RIGHT) data->gradient->title.angle = 90; else data->gradient->title.angle = 0; gtk_plot_text_get_size(data->gradient->title.text, data->gradient->title.angle, data->gradient->title.font, roundint(data->gradient->title.height * m), &twidth, &theight, &tascent, &tdescent); if(data->gradient->orientation == GTK_ORIENTATION_VERTICAL){ gradient_height = 2*roundint(data->gradient_border_offset * m); gradient_height += lheight; gradient_width = 2*roundint(data->gradient_border_offset * m); gradient_width += roundint(data->gradient_line_width * m); if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ gradient_width += lwidth + roundint(data->gradient->labels_offset * m); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ gradient_width += lwidth + roundint(data->gradient->labels_offset * m); } } else { gradient_width = 2*roundint(data->gradient_border_offset * m); gradient_width += lwidth + roundint(data->gradient_border_offset * m); gradient_height = 2*roundint(data->gradient_border_offset * m); gradient_height += roundint(data->gradient_line_height * m); if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ gradient_height += lheight + roundint(data->gradient->labels_offset * m); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ gradient_height += lheight + roundint(data->gradient->labels_offset * m); } } if(data->gradient->title_visible){ switch(data->gradient_title_pos){ case GTK_PLOT_AXIS_LEFT: case GTK_PLOT_AXIS_RIGHT: gradient_width += twidth + roundint(data->gradient->labels_offset * m); break; case GTK_PLOT_AXIS_TOP: case GTK_PLOT_AXIS_BOTTOM: gradient_height += theight + roundint(data->gradient->labels_offset * m); break; } } if(data->gradient->orientation == GTK_ORIENTATION_VERTICAL){ data->gradient_line_height = roundint((gdouble) (size - gradient_height) / (gdouble) (nlevels - 1) / m); } else { data->gradient_line_width = roundint((gdouble) (size - gradient_width) / (gdouble) (nlevels - 1) / m); } } static void gtk_plot_data_get_gradient_size(GtkPlotData *data, gint *width, gint *height) { GtkPlot *plot = NULL; GtkPlotText legend; gint lascent = 0, ldescent = 0, lheight = 0, lwidth = 0; gint tascent = 0, tdescent = 0, theight = 0, twidth = 0; gint maxascent = 0, maxdescent = 0, maxheight = 0, maxwidth = 0; gint minascent = 0, mindescent = 0, minheight = 0, minwidth = 0; gdouble m; gchar text[100], new_label[100]; gint gradient_width = 0; gint gradient_height = 0; gint line_height = 0; gint nlevels = data->gradient->ticks.nticks; gint nmajor; gint n; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); plot = data->plot; m = plot->magnification; *width = 0; *height = 0; legend = data->gradient->labels_attr; if(!data->show_gradient) return; gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.min, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &minwidth, &minheight, &minascent, &mindescent); gtk_plot_axis_parse_label(data->gradient, data->gradient->ticks.max, data->gradient->label_precision, data->gradient->label_style, text); if(data->gradient->labels_prefix){ g_snprintf(new_label, 100, "%s%s", data->gradient->labels_prefix, text); g_snprintf(text, 100, "%s", new_label); } if(data->gradient->labels_suffix){ g_snprintf(new_label, 100, "%s%s", text, data->gradient->labels_suffix); g_snprintf(text, 100, "%s", new_label); } gtk_plot_text_get_size(text, legend.angle, legend.font, roundint(legend.height * m), &maxwidth, &maxheight, &maxascent, &maxdescent); lwidth = MAX(minwidth, maxwidth); lheight = MAX(minheight, maxheight); lascent = MAX(minascent, maxascent); ldescent = MAX(mindescent, maxdescent); if(data->gradient_title_pos == GTK_PLOT_AXIS_LEFT || data->gradient_title_pos == GTK_PLOT_AXIS_RIGHT) data->gradient->title.angle = 90; else data->gradient->title.angle = 0; gtk_plot_text_get_size(data->gradient->title.text, data->gradient->title.angle, data->gradient->title.font, roundint(data->gradient->title.height * m), &twidth, &theight, &tascent, &tdescent); nmajor = 0; for(n = nlevels-1; n >= 0; n--){ if(!data->gradient->ticks.values[n].minor) nmajor++; } if(data->gradient->orientation == GTK_ORIENTATION_VERTICAL){ line_height = MAX(lheight, roundint(data->gradient_line_height * m)); gradient_height = (nmajor - 1) * line_height; gradient_height += 2*roundint(data->gradient_border_offset * m); gradient_height += lheight; gradient_width = 2*roundint(data->gradient_border_offset * m); gradient_width += roundint(data->gradient_line_width * m); if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ gradient_width += lwidth + roundint(data->gradient->labels_offset * 2* m); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ gradient_width += lwidth + roundint(data->gradient->labels_offset * 2 * m); } } else { line_height = MAX(lwidth + roundint(data->gradient->labels_offset * m), roundint(data->gradient_line_width * m)); gradient_width = (nmajor - 1) * line_height; gradient_width += 2*roundint(data->gradient_border_offset * m); gradient_width += lwidth + roundint(data->gradient_border_offset * m); gradient_height = 2*roundint(data->gradient_border_offset * m); gradient_height += roundint(data->gradient_line_height * m); if(data->gradient->label_mask & GTK_PLOT_LABEL_IN){ gradient_height += lheight + roundint(data->gradient->labels_offset * 2 * m); } if(data->gradient->label_mask & GTK_PLOT_LABEL_OUT){ gradient_height += lheight + roundint(data->gradient->labels_offset * 2 * m); } } if(data->gradient->title_visible){ switch(data->gradient_title_pos){ case GTK_PLOT_AXIS_LEFT: case GTK_PLOT_AXIS_RIGHT: gradient_height = MAX(gradient_height, theight + roundint(data->gradient->labels_offset * 3 * m) + lheight); gradient_width += twidth + roundint(data->gradient->labels_offset * m); break; case GTK_PLOT_AXIS_TOP: case GTK_PLOT_AXIS_BOTTOM: gradient_width = MAX(gradient_width, twidth + roundint(data->gradient->labels_offset * 3 * m)); gradient_height += theight + roundint(data->gradient->labels_offset * m); break; } } *width = gradient_width; *height = gradient_height; } static gboolean gtk_plot_data_point_clipped(GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gboolean connector) { GtkPlot *plot; plot = data->plot; if(GTK_IS_PLOT_POLAR(plot)){ GtkPlotPolar *polar = GTK_PLOT_POLAR(plot); if(plot->clip_data && (x < polar->r->ticks.min || x > polar->r->ticks.max || y < polar->angle->ticks.min || y > polar->angle->ticks.max)) return TRUE; } else if(GTK_IS_PLOT3D(plot)){ if(plot->clip_data && (x < plot->xmin || x > plot->xmax)) return TRUE; if(plot->clip_data && data->symbol.symbol_type != GTK_PLOT_SYMBOL_IMPULSE && (y < plot->ymin || y > plot->ymax)) return TRUE; } else { if(plot->clip_data && !connector && (x < plot->xmin || x > plot->xmax || y < plot->ymin || y > plot->ymax)) return TRUE; } return FALSE; } static void gtk_plot_data_real_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot; gdouble px = 0, py = 0, pz = 0; plot = data->plot; if(gtk_plot_data_point_clipped(data, x, y, z, a, FALSE)) return; if(GTK_IS_PLOT3D(plot)) gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &px, &py, &pz); else gtk_plot_get_pixel(plot, x, y, &px, &py); gtk_plot_data_draw_errbars(data, x, y, z, dx, dy, dz); gtk_plot_data_draw_symbol (data, px, py); } /** * gtk_plot_data_draw_symbol: * @data: a #GtkPlotData widget. * @px: * @py: * * */ void gtk_plot_data_draw_symbol (GtkPlotData *data, gdouble px, gdouble py) { GtkPlot *plot; GtkPlotSymbol aux_symbol; plot = data->plot; aux_symbol = data->symbol; aux_symbol.color = plot->background; aux_symbol.symbol_style = GTK_PLOT_SYMBOL_FILLED; aux_symbol.border.line_width = 0; if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_OPAQUE) gtk_plot_data_draw_symbol_private (data, px, py, aux_symbol); if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_FILLED){ aux_symbol.color = data->symbol.color; gtk_plot_data_draw_symbol_private (data, px, py, aux_symbol); } aux_symbol = data->symbol; aux_symbol.color = data->symbol.border.color; aux_symbol.symbol_style = GTK_PLOT_SYMBOL_EMPTY; gtk_plot_data_draw_symbol_private (data, px, py, aux_symbol); } static void gtk_plot_data_draw_symbol_private (GtkPlotData *data, gdouble x, gdouble y, GtkPlotSymbol symbol) { GtkWidget *widget; GtkPlot *plot; gdouble x0, y0; gdouble px0, py0; GdkRectangle clip_area; gboolean filled; gint size; gdouble m; if(symbol.symbol_type == GTK_PLOT_SYMBOL_NONE) return; plot = data->plot; widget = GTK_WIDGET(plot); m = plot->magnification; clip_area.x = plot->internal_allocation.x; clip_area.y = plot->internal_allocation.y; clip_area.width = plot->internal_allocation.width; clip_area.height = plot->internal_allocation.height; /* gdk_gc_set_clip_rectangle(gc, &clip_area); */ gtk_plot_pc_set_color(plot->pc, &symbol.color); gtk_plot_pc_set_lineattr (plot->pc, symbol.border.line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); filled = (symbol.symbol_style == GTK_PLOT_SYMBOL_FILLED) ? TRUE : FALSE; size = symbol.size; switch(symbol.symbol_type) { case GTK_PLOT_SYMBOL_NONE: break; case GTK_PLOT_SYMBOL_DOT: gtk_plot_pc_draw_point(plot->pc, x, y); break; case GTK_PLOT_SYMBOL_SQUARE: gtk_plot_pc_draw_rectangle (plot->pc, filled, x-m*size/2.0, y-m*size/2.0, m*size, m*size); break; case GTK_PLOT_SYMBOL_CIRCLE: gtk_plot_pc_draw_circle (plot->pc, filled, x, y, m*size); break; case GTK_PLOT_SYMBOL_UP_TRIANGLE: gtk_plot_data_draw_up_triangle (data, x, y, size, filled); break; case GTK_PLOT_SYMBOL_DOWN_TRIANGLE: gtk_plot_data_draw_down_triangle (data, x, y, size, filled); break; case GTK_PLOT_SYMBOL_RIGHT_TRIANGLE: gtk_plot_data_draw_right_triangle (data, x, y, size, filled); break; case GTK_PLOT_SYMBOL_LEFT_TRIANGLE: gtk_plot_data_draw_left_triangle (data, x, y, size, filled); break; case GTK_PLOT_SYMBOL_DIAMOND: gtk_plot_data_draw_diamond (data, x, y, size, filled); break; case GTK_PLOT_SYMBOL_PLUS: gtk_plot_data_draw_plus (data, x, y, size); break; case GTK_PLOT_SYMBOL_CROSS: gtk_plot_data_draw_cross (data, x, y, size); break; case GTK_PLOT_SYMBOL_STAR: gtk_plot_data_draw_star (data, x, y, size); break; case GTK_PLOT_SYMBOL_IMPULSE: x0 = x; y0 = 0.; gtk_plot_get_pixel(plot, x0, y0, &px0, &py0); gtk_plot_pc_draw_line(plot->pc, x, MIN(py0,y), x, MAX(py0,y)); break; } /* gdk_gc_set_clip_rectangle(gc, NULL); */ } static void gtk_plot_data_draw_xyz (GtkPlotData *dataset, gint npoints) { GtkWidget *widget; GtkPlot *plot; GdkRectangle clip_area, area; gint n; gdouble x = 0., y = 0., z = 0.; gdouble px, py; gdouble x0, y0; gdouble *array_x = NULL, *array_y = NULL, *array_z = NULL; GtkAllocation allocation; plot = dataset->plot; widget = GTK_WIDGET(plot); array_x = gtk_plot_data_get_x(dataset, &n); array_y = gtk_plot_data_get_y(dataset, &n); array_z = gtk_plot_data_get_z(dataset, &n); if(!array_x || !array_y) return; if(dataset->x_line.line_style == GTK_PLOT_LINE_NONE && dataset->y_line.line_style == GTK_PLOT_LINE_NONE && dataset->z_line.line_style == GTK_PLOT_LINE_NONE) return; widget = GTK_WIDGET(plot); gtk_widget_get_allocation(widget, &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; clip_area.x = area.x + roundint(plot->x * allocation.width); clip_area.y = area.y + roundint(plot->y * allocation.height); clip_area.width = roundint(plot->width * allocation.width); clip_area.height = roundint(plot->height * allocation.height); if(plot->clip_data && !GTK_IS_PLOT3D(plot)) gtk_plot_pc_clip(plot->pc, &clip_area); for(n=dataset->num_points-npoints; n<=dataset->num_points-1; n++) { x = array_x[n]; y = array_y[n]; if(x >= plot->xmin && x <= plot->xmax) { if(GTK_IS_PLOT3D(plot)){ gdouble pz, z0; if(array_z != NULL) z = array_z[n]; if(z >= GTK_PLOT3D(plot)->zmin && z <= GTK_PLOT3D(plot)->zmax){ gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &px, &py, &pz); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), GTK_PLOT3D(plot)->origin.x, y, z, &x0, &y0, &z0); gtk_plot_draw_line(plot, dataset->x_line, px, py, x0, y0); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, GTK_PLOT3D(plot)->origin.y, z, &x0, &y0, &z0); gtk_plot_draw_line(plot, dataset->y_line, px, py, x0, y0); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, GTK_PLOT3D(plot)->origin.z, &x0, &y0, &z0); gtk_plot_draw_line(plot, dataset->z_line, px, py, x0, y0); } } else { gtk_plot_get_pixel(plot, x, y, &px, &py); gtk_plot_get_pixel(plot, x, MAX(0., plot->ymin), &x0, &y0); gtk_plot_draw_line(plot, dataset->x_line, px, py, px, y0); gtk_plot_get_pixel(plot, MAX(0., plot->xmin) , y, &x0, &y0); gtk_plot_draw_line(plot, dataset->y_line, px, py, x0, py); } } } if(plot->clip_data && !GTK_IS_PLOT3D(plot)) gtk_plot_pc_clip(plot->pc, NULL); } static void gtk_plot_data_draw_errbars(GtkPlotData *dataset, gdouble x, gdouble y, gdouble z, gdouble dx, gdouble dy, gdouble dz) { GtkWidget *widget; GtkPlot *plot; GtkPlotPoint errbar[6]; gdouble px, py; gdouble el_x, el_y, er_x, er_y, ed_x, ed_y, eu_x, eu_y; gdouble m; plot = dataset->plot; widget = GTK_WIDGET(plot); m = plot->magnification; if(!dataset->show_xerrbars && !dataset->show_yerrbars && !dataset->show_zerrbars) return; gtk_plot_pc_set_color (plot->pc, &dataset->symbol.color); gtk_plot_pc_set_lineattr (plot->pc, dataset->symbol.border.line_width/2, 0, 0, 0); if(GTK_IS_PLOT3D(plot)){ gdouble pz; gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &px, &py, &pz); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z + dz, &eu_x, &eu_y, &pz); gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z - dz, &ed_x, &ed_y, &pz); if(dataset->show_zerrbars) { errbar[0].x = px - m * dataset->zerrbar_caps/2.; errbar[0].y = eu_y; errbar[1].x = px + m * dataset->zerrbar_caps/2.; errbar[1].y = eu_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = px; errbar[0].y = eu_y; errbar[1].x = px; errbar[1].y = ed_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = px - m * dataset->zerrbar_caps/2.; errbar[0].y = ed_y; errbar[1].x = px + m * dataset->zerrbar_caps/2.; errbar[1].y = ed_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); } } else { gtk_plot_get_pixel(plot, x, y, &px, &py); gtk_plot_get_pixel(plot, x + dx, y, &er_x, &er_y); gtk_plot_get_pixel(plot, x - dx, y, &el_x, &el_y); gtk_plot_get_pixel(plot, x, y + dy, &eu_x, &eu_y); gtk_plot_get_pixel(plot, x, y - dy, &ed_x, &ed_y); if(dataset->show_xerrbars) { errbar[0].x = el_x; errbar[0].y = py - m * dataset->xerrbar_caps/2.; errbar[1].x = el_x; errbar[1].y = py + m * dataset->xerrbar_caps/2.; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = el_x; errbar[0].y = py; errbar[1].x = er_x; errbar[1].y = py; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = er_x; errbar[0].y = py - m * dataset->xerrbar_caps/2.; errbar[1].x = er_x; errbar[1].y = py + m * dataset->xerrbar_caps/2.; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); } if(dataset->show_yerrbars) { errbar[0].x = px - m * dataset->yerrbar_caps/2.; errbar[0].y = eu_y; errbar[1].x = px + m * dataset->yerrbar_caps/2.; errbar[1].y = eu_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = px; errbar[0].y = eu_y; errbar[1].x = px; errbar[1].y = ed_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); errbar[0].x = px - m * dataset->yerrbar_caps/2.; errbar[0].y = ed_y; errbar[1].x = px + m * dataset->yerrbar_caps/2.; errbar[1].y = ed_y; gtk_plot_pc_draw_lines(plot->pc, errbar, 2); } } } static void gtk_plot_data_draw_down_triangle(GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled) { GtkPlot *plot; GtkPlotPoint point[3]; gdouble m; gdouble s3 = sqrt(3.)/3.; plot = data->plot; m = plot->magnification; point[0].x = x - m*size/2.; point[0].y = y - m*size/2.*s3; point[1].x = x + m*size/2.; point[1].y = y - m*size/2.*s3; point[2].x = x; point[2].y = y + m*size/s3/3.; gtk_plot_pc_draw_polygon (plot->pc, filled, point, 3); } static void gtk_plot_data_draw_up_triangle(GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled) { GtkPlot *plot; GtkPlotPoint point[3]; gdouble m; gdouble s3; plot = data->plot; m = plot->magnification; s3 = sqrt(3.)/3.; point[0].x = x - m*size/2.; point[0].y = y + m*size/2.*s3; point[1].x = x + m*size/2.; point[1].y = y + m*size/2.*s3; point[2].x = x; point[2].y = y - m*size/s3/3.; gtk_plot_pc_draw_polygon (plot->pc, filled, point, 3); } static void gtk_plot_data_draw_diamond(GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled) { GtkPlot *plot; GtkPlotPoint point[4]; gdouble s2 = 2.; gdouble m; plot = data->plot; m = plot->magnification; point[0].x = x - size/s2*m; point[0].y = y; point[1].x = x; point[1].y = y - size/s2*m; point[2].x = x + size/s2*m; point[2].y = y; point[3].x = x; point[3].y = y + size/s2*m; gtk_plot_pc_draw_polygon (plot->pc, filled, point, 4); } static void gtk_plot_data_draw_left_triangle(GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled) { GtkPlot *plot; GtkPlotPoint point[3]; gdouble m; gdouble s3 = sqrt(3.)/3.; plot = data->plot; m = plot->magnification; point[0].x = x + m*size/2.*s3; point[0].y = y - m*size/2.; point[1].x = x + m*size/2.*s3; point[1].y = y + m*size/2.; point[2].x = x - m*size/s3/3.; point[2].y = y; gtk_plot_pc_draw_polygon (plot->pc, filled, point, 3); } static void gtk_plot_data_draw_right_triangle(GtkPlotData *data, gdouble x, gdouble y, gdouble size, gint filled) { GtkPlot *plot; GtkPlotPoint point[3]; gdouble m; gdouble s3 = sqrt(3.)/3.; plot = data->plot; m = plot->magnification; point[0].x = x - m*size/2.*s3; point[0].y = y - m*size/2.; point[1].x = x - m*size/2.*s3; point[1].y = y + m*size/2.; point[2].x = x + m*size/s3/3.; point[2].y = y; gtk_plot_pc_draw_polygon (plot->pc, filled, point, 3); } static void gtk_plot_data_draw_plus(GtkPlotData *data, gdouble x, gdouble y, gdouble size) { GtkPlot *plot; plot = data->plot; size = plot->magnification * size; gtk_plot_pc_draw_line (plot->pc, x-size/2., y, x+size/2., y); gtk_plot_pc_draw_line (plot->pc, x, y-size/2., x, y+size/2.); } static void gtk_plot_data_draw_cross(GtkPlotData *data, gdouble x, gdouble y, gdouble size) { GtkPlot *plot; plot = data->plot; size = plot->magnification * size; gtk_plot_pc_draw_line (plot->pc, x-size/2., y-size/2., x+size/2., y+size/2.); gtk_plot_pc_draw_line (plot->pc, x-size/2., y+size/2., x+size/2., y-size/2.); } static void gtk_plot_data_draw_star(GtkPlotData *data, gdouble x, gdouble y, gdouble size) { GtkPlot *plot; gdouble s2; plot = data->plot; size = plot->magnification * size; s2 = size*sqrt(2.)/4.; gtk_plot_pc_draw_line (plot->pc, x-size/2., y, x+size/2., y); gtk_plot_pc_draw_line (plot->pc, x, y-size/2., x, y+size/2.); gtk_plot_pc_draw_line (plot->pc, x-s2, y-s2, x+s2, y+s2); gtk_plot_pc_draw_line (plot->pc, x-s2, y+s2, x+s2, y-s2); } static void gtk_plot_data_connect_points(GtkPlotData *dataset, gint npoints) { GtkPlot *plot; GtkWidget *widget; GdkRectangle clip_area, area; GtkPlotPoint *points; GtkPlotData spline; GtkPlotPoint *spline_points = NULL; gdouble *array_x = NULL, *array_y = NULL, *array_z = NULL; gdouble *spline_coef = NULL; gdouble x, y; gint n, n0; gdouble px, py; gdouble x1, y1; gdouble xmin, xmax; gint num_points = dataset->num_points; gint first = 0, last = num_points; GtkAllocation allocation; plot = dataset->plot; widget = GTK_WIDGET(plot); gtk_widget_get_allocation(widget, &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; clip_area.x = area.x + roundint(plot->x * allocation.width); clip_area.y = area.y + roundint(plot->y * allocation.height); clip_area.width = roundint(plot->width * allocation.width); clip_area.height = roundint(plot->height * allocation.height); if(dataset->line.line_style == GTK_PLOT_LINE_NONE) return; npoints = MIN(npoints, dataset->num_points); n0 = dataset->num_points - npoints; points = (GtkPlotPoint *)g_malloc(2*(dataset->num_points+1)*sizeof(GtkPlotPoint)); if(plot->clip_data && !GTK_IS_PLOT3D(plot)) gtk_plot_pc_clip(plot->pc, &clip_area); gtk_plot_set_line_attributes(plot, dataset->line); array_x = gtk_plot_data_get_x(dataset, &n); array_y = gtk_plot_data_get_y(dataset, &n); array_z = gtk_plot_data_get_z(dataset, &n); switch(dataset->line_connector){ case GTK_PLOT_CONNECT_STRAIGHT: if(npoints == 1) break; num_points = 0; for(n=n0; nnum_points; n++) { gdouble z = 0.; x = array_x[n]; y = array_y[n]; if(array_z != NULL) z = array_z[n]; if(gtk_plot_data_point_clipped(dataset, x, y, z, 0.0, TRUE)) continue; if(num_points == 0) first = n; if(GTK_IS_PLOT3D(plot)){ gdouble pz; gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &px, &py, &pz); } else { gtk_plot_get_pixel(plot, x, y, &px, &py); } points[num_points].x = px; points[num_points].y = py; last = n; num_points++; } break; case GTK_PLOT_CONNECT_HV_STEP: if(GTK_IS_PLOT3D(plot)) break; if(dataset->num_points == 1) break; num_points=0; for(n=0; n < dataset->num_points; n++) { x = array_x[n]; y = array_y[n]; gtk_plot_get_pixel(plot, x, y, &px, &py); points[num_points].x = px; points[num_points].y = py; num_points++; if(n < dataset->num_points-1) { gtk_plot_get_pixel(plot, array_x[n+1], array_y[n+1], &px, &py); points[num_points].x = px; points[num_points].y = points[num_points-1].y; num_points++; } } break; case GTK_PLOT_CONNECT_VH_STEP: if(GTK_IS_PLOT3D(plot)) break; if(dataset->num_points == 1) break; num_points=0; for(n=0; n < dataset->num_points; n++) { x = array_x[n]; y = array_y[n]; gtk_plot_get_pixel(plot, x, y, &px, &py); points[num_points].x = px; points[num_points].y = py; num_points++; if(n < dataset->num_points-1) { gtk_plot_get_pixel(plot, array_x[n+1], array_y[n+1], &px, &py); points[num_points].x = points[num_points-1].x; points[num_points].y = py; num_points++; } } break; case GTK_PLOT_CONNECT_MIDDLE_STEP: if(GTK_IS_PLOT3D(plot)) break; if(dataset->num_points == 1) break; num_points=1; for(n=1; n < dataset->num_points; n++) { x = array_x[n]; y = array_y[n]; gtk_plot_get_pixel(plot, x, y, &px, &py); x = array_x[n-1]; y = array_y[n-1]; gtk_plot_get_pixel(plot, x, y, &x1, &y1); points[num_points].x = (px+x1)/2; points[num_points].y = y1; num_points++; points[num_points].x = points[num_points-1].x; points[num_points].y = py; num_points++; } x = array_x[0]; y = array_y[0]; gtk_plot_get_pixel(plot, x, y, &px, &py); points[0].x = px; points[0].y = py; x = array_x[dataset->num_points-1]; y = array_y[dataset->num_points-1]; gtk_plot_get_pixel(plot, x, y, &px, &py); points[num_points].x = px; points[num_points].y = py; num_points++; break; case GTK_PLOT_CONNECT_SPLINE: if(GTK_IS_PLOT3D(plot)){ g_free(points); return; } spline = *dataset; if(dataset->num_points <= 1) break; spline_coef = (gdouble *)g_malloc(dataset->num_points*sizeof(gdouble)); spline_points = (GtkPlotPoint *)g_malloc(sizeof(GtkPlotPoint)); spline_solve(dataset->num_points, array_x, array_y, spline_coef); gtk_plot_get_pixel(plot, array_x[0], 0, &xmin, &py); gtk_plot_get_pixel(plot, array_x[dataset->num_points-1], 0, &xmax, &py); spline.num_points = (gint) (fabs(xmax - xmin) / spline.x_step) + 1; spline_points = (GtkPlotPoint *)g_malloc(sizeof(GtkPlotPoint) * (spline.num_points + 2)); for(n=0, x1 = xmin; x1 <= xmax; x1 += spline.x_step, n++) { gtk_plot_get_point(plot, x1, 0, &x, &y); y = spline_eval(dataset->num_points, array_x, array_y, spline_coef, x); gtk_plot_get_pixel(plot, x, y, &px, &py); spline_points[n].x = px; spline_points[n].y = py; } if(dataset->fill_area){ x = array_x[dataset->num_points - 1]; y = 0.0; gtk_plot_get_pixel(plot, x, y, &px, &py); spline_points[spline.num_points].x = px; spline_points[spline.num_points].y = py; x = array_x[0]; gtk_plot_get_pixel(plot, x, y, &px, &py); spline_points[spline.num_points + 1].x = px; spline_points[spline.num_points + 1].y = py; spline.num_points += 2; gtk_plot_pc_draw_polygon(plot->pc, TRUE, spline_points, spline.num_points); } else { gtk_plot_pc_draw_lines(plot->pc, spline_points, spline.num_points); } g_free(spline_points); g_free(spline_coef); g_free(points); if(plot->clip_data && !GTK_IS_PLOT3D(plot)) gtk_plot_pc_clip(plot->pc, NULL); return; case GTK_PLOT_CONNECT_NONE: default: if(plot->clip_data && !GTK_IS_PLOT3D(plot)) gtk_plot_pc_clip(plot->pc, NULL); g_free(points); return; } if(dataset->fill_area){ if(num_points > 1){ if(GTK_IS_PLOT3D(plot)){ gdouble pz; x = array_x[last]; y = array_y[last]; gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, 0.0, &px, &py, &pz); points[num_points].x = px; points[num_points].y = py; x = array_x[first]; y = array_y[first]; gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, 0.0, &px, &py, &pz); points[num_points + 1].x = px; points[num_points + 1].y = py; num_points += 2; } else { x = array_x[last]; y = 0.0; gtk_plot_get_pixel(plot, x, y, &px, &py); points[num_points].x = px; points[num_points].y = py; x = array_x[first]; gtk_plot_get_pixel(plot, x, y, &px, &py); points[num_points + 1].x = px; points[num_points + 1].y = py; num_points += 2; } gtk_plot_pc_draw_polygon(plot->pc, TRUE, points, num_points); } } else { gtk_plot_pc_draw_lines(plot->pc, points, num_points); } if(plot->clip_data && !GTK_IS_PLOT3D(plot)) gtk_plot_pc_clip(plot->pc, NULL); g_free(points); } /* New implementation */ /** * gtk_plot_data_find_dimension: * @data: a #GtkPlotData widget. * @name: dimension name to be searched for * * Return value: (transfer none) the #GtkPlotArray with the * given name */ GtkPlotArray * gtk_plot_data_find_dimension(GtkPlotData *data, const gchar *name) { GList *list = NULL; if(!data->data) return NULL; list = data->data->arrays; while(list){ GtkPlotArray *dim = GTK_PLOT_ARRAY(list->data); if(dim && dim->name && strcmp(dim->name, name) == 0) return dim; list = list->next; } return NULL; } /** * gtk_plot_data_add_dimension: * @data: a #GtkPlotData widget. * @label: * @name: * @desc: * @value_type: * @required: * @independent: * * */ void gtk_plot_data_add_dimension(GtkPlotData *data, const gchar *name, const gchar *label, const gchar *desc, GType value_type, gboolean required, gboolean independent) { GtkPlotArray *dim = NULL; if(!name) return; dim = gtk_plot_data_find_dimension(data, name); if(!dim){ dim = GTK_PLOT_ARRAY(gtk_plot_array_new(name, NULL, 0, value_type, FALSE)); gtk_plot_array_set_label(dim, label); gtk_plot_array_set_description(dim, desc); gtk_plot_array_set_required(dim, required); gtk_plot_array_set_independent(dim, independent); gtk_plot_array_list_add(data->data, dim); } } /** * gtk_plot_data_remove_dimension: * @data: a #GtkPlotData widget. * @name: * * */ void gtk_plot_data_remove_dimension(GtkPlotData *data, const gchar *name) { GList *list; list = data->data->arrays; while(list){ GtkPlotArray *dim = GTK_PLOT_ARRAY(list->data); if(dim && dim->name && strcmp(dim->name, name) == 0) { gtk_plot_array_list_remove(data->data, dim); list = data->data->arrays; } else { list = list->next; } } } /** * gtk_plot_data_dimension_set_array: * @data: a #GtkPlotData widget. * @name: * @array: * * */ void gtk_plot_data_dimension_set_array(GtkPlotData *data, const gchar *name, GtkPlotArray *array) { GtkPlotArray *dim; dim = gtk_plot_data_find_dimension(data, name); if(dim){ gtk_plot_array_set_label(dim, array->label); gtk_plot_array_set_description(dim, array->description); dim->data = array->data; dim->own_data = FALSE; } } /** * gtk_plot_data_dimension_set_points: * @data: a #GtkPlotData widget. * @name: the dimension name affected * @points: * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_dimension_set_points(GtkPlotData *data, const gchar *name, gdouble *points) { GtkPlotArray *dim; dim = gtk_plot_data_find_dimension(data, name); if(dim && dim->type == G_TYPE_DOUBLE){ dim->data.data_double = points; dim->own_data = FALSE; } return dim; } /** * gtk_plot_data_dimension_get_array: * @data: a #GtkPlotData widget. * @name: the dimension name to be searched * * Return value: (transfer none) the #GtkPlotArray with the * given name */ GtkPlotArray * gtk_plot_data_dimension_get_array(GtkPlotData *data, const gchar *name) { GtkPlotArray *dim; dim = gtk_plot_data_find_dimension(data, name); return dim; } /** * gtk_plot_data_required_dimensions: * @data: a #GtkPlotData widget. * * * * Return value: */ guint gtk_plot_data_required_dimensions(GtkPlotData *data) { guint n = 0; GtkPlotArrayList *dims = data->data; GList *list = dims->arrays; while(list){ GtkPlotArray *dim = GTK_PLOT_ARRAY(list->data); if(dim->required) n++; list = list->next; } return n; } /** * gtk_plot_data_independent_dimensions: * @data: a #GtkPlotData widget. * * * * Return value: */ guint gtk_plot_data_independent_dimensions(GtkPlotData *data) { guint n = 0; GtkPlotArrayList *dims = data->data; GList *list = dims->arrays; while(list){ GtkPlotArray *dim = GTK_PLOT_ARRAY(list->data); if(dim->independent) n++; list = list->next; } return n; } /****************************************** * gtk_plot_data_set_points * gtk_plot_data_get_points * gtk_plot_data_set_x * gtk_plot_data_set_y * gtk_plot_data_set_z * gtk_plot_data_set_a * gtk_plot_data_set_dx * gtk_plot_data_set_dy * gtk_plot_data_set_dz * gtk_plot_data_set_da * gtk_plot_data_get_x * gtk_plot_data_get_y * gtk_plot_data_get_z * gtk_plot_data_get_a * gtk_plot_data_get_dx * gtk_plot_data_get_dy * gtk_plot_data_get_dz * gtk_plot_data_get_da * gtk_plot_data_set_numpoints * gtk_plot_data_get_numpoints * gtk_plot_data_set_symbol * gtk_plot_data_get_symbol * gtk_plot_data_set_connector * gtk_plot_data_get_connector * gtk_plot_data_set_xyz_attributes * gtk_plot_data_show_xerrbars * gtk_plot_data_show_yerrbars * gtk_plot_data_show_zerrbars * gtk_plot_data_hide_xerrbars * gtk_plot_data_hide_yerrbars * gtk_plot_data_hide_zerrbars * gtk_plot_data_set_legend * gtk_plot_data_show_legend * gtk_plot_data_hide_legend * gtk_plot_data_set_name * gtk_plot_data_show * gtk_plot_data_hide ******************************************/ /** * gtk_plot_data_draw_points: * @data: a #GtkPlotData widget. * @npoints: * * */ void gtk_plot_data_draw_points(GtkPlotData *data, gint npoints) { gtk_plot_data_real_draw(data, npoints); } /** * gtk_plot_data_set_points: * @data: a #GtkPlotData widget. * @x: (transfer none) array of gdouble x-values * @y: (transfer none) array of gdouble y-values * @dx: (transfer none) array of gdouble delta-x-values (null) * @dy:(transfer none) array of gdouble delta-x-values (null) * @num_points: number of points = length of arrays * * */ void gtk_plot_data_set_points(GtkPlotData *data, gdouble *x, gdouble *y, gdouble *dx, gdouble *dy, gint num_points) { gtk_plot_data_set_x(data, x); gtk_plot_data_set_y(data, y); gtk_plot_data_set_dx(data, dx); gtk_plot_data_set_dy(data, dy); gtk_plot_data_set_numpoints(data, num_points); } /** * gtk_plot_data_get_points: * @dataset: a #GtkPlotData widget. * @x: (transfer none) where to store result pointer * @y: (transfer none) where to store result pointer * @dx: (transfer none) where to store result pointer * @dy: (transfer none) where to store result pointer * @num_points: (transfer none) where to store number of points * * * Retrieves pointers to internal plot data. Beware: The plot * data belongs to the caller of #gtk_plot_data_set_points() */ void gtk_plot_data_get_points(GtkPlotData *dataset, gdouble **x, gdouble **y, gdouble **dx, gdouble **dy, gint *num_points) { gint n; *x = gtk_plot_data_get_x(dataset, &n); *y = gtk_plot_data_get_y(dataset, &n); *dx = gtk_plot_data_get_dx(dataset, &n); *dy = gtk_plot_data_get_dy(dataset, &n); *num_points = dataset->num_points; } /** * gtk_plot_data_get_point: * @dataset: a #GtkPlotData widget. * @n: * @x: * @y: * @z: * @a: * @dx: * @dy: * @dz: * @da: * @label: * @error: * * */ void gtk_plot_data_get_point(GtkPlotData *dataset, gint n, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error) { gdouble *array = NULL; gchar **labels = NULL; gint np; gboolean show = TRUE; *error = FALSE; if(dataset->is_function){ g_warning("This functions does not work for functions"); *error = TRUE; return; } else if(dataset->is_iterator) { if(n >= dataset->num_points){ g_warning("n >= dataset->num_points"); *error = TRUE; return; } dataset->iterator (GTK_PLOT(dataset->plot), dataset, n, x, y, z, a, dx, dy, dz, da, label, error); } else { if(n >= dataset->num_points){ g_warning("n >= dataset->num_points"); *error = TRUE; return; } array = gtk_plot_data_get_x(dataset, &np); if(array) *x = array[n]; array = gtk_plot_data_get_y(dataset, &np); if(array) *y = array[n]; array = gtk_plot_data_get_z(dataset, &np); if(array) *z = array[n]; array = gtk_plot_data_get_a(dataset, &np); if(array) *a = array[n]; array = gtk_plot_data_get_dx(dataset, &np); if(array) *dx = array[n]; array = gtk_plot_data_get_dy(dataset, &np); if(array) *dy = array[n]; array = gtk_plot_data_get_dz(dataset, &np); if(array) *dz = array[n]; array = gtk_plot_data_get_da(dataset, &np); if(array) *da = array[n]; labels = gtk_plot_data_get_labels(dataset, &show); if(labels) *label = labels[n]; } } /** * gtk_plot_data_set_x: * @data: a #GtkPlotData widget. * @x: (transfer none) pointer to plot data * * Set pointer to plot data (x-values). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_x(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_x(GtkPlotData *data, gdouble *x) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "x", x); return array; } /** * gtk_plot_data_set_y: * @data: a #GtkPlotData widget. * @y: (transfer none) pointer to plot data * * Set pointer to plot data (y-values). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_y(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_y(GtkPlotData *data, gdouble *y) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "y", y); return array; } /** * gtk_plot_data_set_z: * @data: a #GtkPlotData widget. * @z: (transfer none) pointer to plot data * * Set pointer to plot data (z-values). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_z(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_z(GtkPlotData *data, gdouble *z) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "z", z); return array; } /** * gtk_plot_data_set_a: * @data: a #GtkPlotData widget. * @a: (transfer none) pointer to plot data * * Set pointer to plot data (Symbol size). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_a(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_a(GtkPlotData *data, gdouble *a) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "a", a); return array; } /** * gtk_plot_data_set_dx: * @data: a #GtkPlotData widget. * @dx: (transfer none) pointer to plot data * * Set pointer to plot data (x-error). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_dx(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_dx(GtkPlotData *data, gdouble *dx) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "dx", dx); return array; } /** * gtk_plot_data_set_dy: * @data: a #GtkPlotData widget. * @dy: (transfer none) pointer to plot data * * Set pointer to plot data (y-error). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_dy(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_dy(GtkPlotData *data, gdouble *dy) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "dy", dy); return array; } /** * gtk_plot_data_set_dz: * @data: a #GtkPlotData widget. * @dz: (transfer none) pointer to plot data * * Set pointer to plot data (z-error). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_dz(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_dz(GtkPlotData *data, gdouble *dz) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "dz", dz); return array; } /** * gtk_plot_data_set_da: * @data: a #GtkPlotData widget. * @da: (transfer none) pointer to plot data * * Set pointer to plot data (Amplitude). The plot data is not * duplicated. It belongs to the caller of * #gtk_plot_data_set_da(). * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_da(GtkPlotData *data, gdouble *da) { GtkPlotArray *array; array = gtk_plot_data_dimension_set_points(data, "da", da); return array; } /** * gtk_plot_data_set_a_scale: * @data: a #GtkPlotData widget. * @a_scale: * * */ void gtk_plot_data_set_a_scale(GtkPlotData *data, gdouble a_scale) { GtkPlotArray *dim = gtk_plot_data_find_dimension(data, "a"); if(dim) gtk_plot_array_set_scale(dim, a_scale); } /** * gtk_plot_data_set_labels: * @data: a #GtkPlotData widget. * @labels: labels to be set * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_data_set_labels(GtkPlotData *data, gchar **labels) { GtkPlotArray *dim = NULL; if(labels){ dim = gtk_plot_data_find_dimension(data, "labels"); if(dim){ gtk_plot_array_free(dim); dim->data.data_string = labels; } } return dim; } /** * gtk_plot_data_get_x: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_x(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "x"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_y: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_y(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "y"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_z: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_z(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "z"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_a: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_a(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "a"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_dx: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_dx(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "dx"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_dy: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_dy(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "dy"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_dz: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_dz(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "dz"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_da: * @dataset: a #GtkPlotData widget. * @num_points: place to store number of points * * Retrieves a pointer to internal plot data. The plot data * belongs to the caller of of #gtk_plot_data_set_x(). * * Return value: (transfer none) pointer to internal plot data */ gdouble * gtk_plot_data_get_da(GtkPlotData *dataset, gint *num_points) { GtkPlotArray *array; array = gtk_plot_data_dimension_get_array(dataset, "da"); if(array){ *num_points = gtk_plot_array_get_size(array); return gtk_plot_array_get_double(array); } return NULL; } /** * gtk_plot_data_get_a_scale: * @dataset: a #GtkPlotData widget. * * * * Return value: */ gdouble gtk_plot_data_get_a_scale(GtkPlotData *dataset) { GtkPlotArray *dim = gtk_plot_data_find_dimension(dataset, "a"); if(dim) return gtk_plot_array_get_scale(dim); return 0.; } /** * gtk_plot_data_get_labels: * @dataset: a #GtkPlotData widget. * @show_labels: (out): current setting * * Return value: (transfer none) the label string array */ gchar ** gtk_plot_data_get_labels(GtkPlotData *dataset, gboolean *show_labels) { GtkPlotArray *array; *show_labels = dataset->show_labels; array = gtk_plot_data_find_dimension(dataset, "labels"); if(array) return gtk_plot_array_get_string(array); return NULL; } /** * gtk_plot_data_show_labels: * @dataset: a #GtkPlotData widget. * @show_labels: * * */ void gtk_plot_data_show_labels(GtkPlotData *dataset, gboolean show_labels) { dataset->show_labels = show_labels; } /** * gtk_plot_data_labels_set_attributes: * @data: a #GtkPlotData widget. * @font: * @height: * @angle: * @fg: * @bg: * * */ void gtk_plot_data_labels_set_attributes (GtkPlotData *data, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg) { if(!font){ /* Use previous font */ /* if(data->labels_attr.font) g_free(data->labels_attr.font); data->labels_attr.font = g_strdup(DEFAULT_FONT); data->labels_attr.height = DEFAULT_FONT_HEIGHT; */ } else { if(data->labels_attr.font) g_free(data->labels_attr.font); data->labels_attr.font = g_strdup(font); data->labels_attr.height = height; } data->labels_attr.angle = angle; if(fg) data->labels_attr.fg = *fg; if(bg) data->labels_attr.bg = *bg; } /** * gtk_plot_data_set_numpoints: * @dataset: a #GtkPlotData widget. * @num_points: * * */ void gtk_plot_data_set_numpoints(GtkPlotData *dataset, gint num_points) { GList *list; dataset->num_points = num_points; list = dataset->data->arrays; while(list){ GtkPlotArray *array = GTK_PLOT_ARRAY(list->data); array->size = num_points; list = list->next; } } /** * gtk_plot_data_data_get_numpoints: * @dataset: a #GtkPlotData widget. * * * * Return value: */ gint gtk_plot_data_get_numpoints(GtkPlotData *dataset) { return(dataset->num_points); } /** * gtk_plot_data_set_symbol: * @dataset: a #GtkPlotData widget. * @type: symbol type, see #GtkPlotSymbolType * @style: symbol style, see #GtkPlotSymbolStyle * @size: symbol size * @line_width: symbol line width * @color: fill color * @border_color: border color * * */ void gtk_plot_data_set_symbol (GtkPlotData *dataset, GtkPlotSymbolType type, GtkPlotSymbolStyle style, gint size, gfloat line_width, const GdkColor *color, const GdkColor *border_color) { dataset->symbol.symbol_type = type; dataset->symbol.symbol_style = style; dataset->symbol.size = size; dataset->symbol.border.line_width = line_width; dataset->symbol.border.color = *border_color; dataset->symbol.color = *color; } /** * gtk_plot_data_get_symbol: * @dataset: a #GtkPlotData widget. * @type: * @style: * @size: * @line_width: * @color: * @border_color: * * */ void gtk_plot_data_get_symbol (GtkPlotData *dataset, GtkPlotSymbolType *type, GtkPlotSymbolStyle *style, gint *size, gfloat *line_width, GdkColor *color, GdkColor *border_color) { *type = dataset->symbol.symbol_type; *style = dataset->symbol.symbol_style; *size = dataset->symbol.size; *line_width = dataset->symbol.border.line_width; *color = dataset->symbol.color; *border_color = dataset->symbol.border.color; } /** * gtk_plot_data_set_line_attributes: * @dataset: a #GtkPlotData widget. * @style: a #GtkPlotLineStyle * @cap_style: a #GdkCapStyle * @join_style: a #GdkJoinStyle * @width: line width * @color: line color * * */ void gtk_plot_data_set_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color) { dataset->line.line_style = style; dataset->line.cap_style = cap_style; dataset->line.join_style = join_style; dataset->line.line_width = width; dataset->line.color = *color; } /** * gtk_plot_data_get_line_attributes: * @dataset: a #GtkPlotData widget. * @style: * @cap_style: * @join_style: * @width: * @color: * * */ void gtk_plot_data_get_line_attributes (GtkPlotData *dataset, GtkPlotLineStyle *style, GdkCapStyle *cap_style, GdkJoinStyle *join_style, gfloat *width, GdkColor *color) { *style = dataset->line.line_style; *cap_style = dataset->line.cap_style; *join_style = dataset->line.join_style; *width = dataset->line.line_width; *color = dataset->line.color; } /** * gtk_plot_data_set_connector: * @dataset: a #GtkPlotData widget. * @connector: * * */ void gtk_plot_data_set_connector (GtkPlotData *dataset, GtkPlotConnector connector) { dataset->line_connector = connector; } /** * gtk_plot_data_get_connector: * @dataset: a #GtkPlotData widget. * * * * Return value: */ gint gtk_plot_data_get_connector (GtkPlotData *dataset) { return (dataset->line_connector); } /** * gtk_plot_data_set_x_attributes: * @dataset: a #GtkPlotData widget. * @style: * @cap_style: * @join_style: * @width: * @color: * * */ void gtk_plot_data_set_x_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color) { dataset->x_line.line_style = style; dataset->x_line.cap_style = cap_style; dataset->x_line.join_style = join_style; dataset->x_line.line_width = width; dataset->x_line.color = *color; } /** * gtk_plot_data_set_y_attributes: * @dataset: a #GtkPlotData widget. * @style: * @cap_style: * @join_style: * @width: * @color: * * */ void gtk_plot_data_set_y_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color) { dataset->y_line.line_style = style; dataset->y_line.cap_style = cap_style; dataset->y_line.join_style = join_style; dataset->y_line.line_width = width; dataset->y_line.color = *color; } /** * gtk_plot_data_set_z_attributes: * @dataset: a #GtkPlotData widget. * @style: * @cap_style: * @join_style: * @width: * @color: * * */ void gtk_plot_data_set_z_attributes (GtkPlotData *dataset, GtkPlotLineStyle style, GdkCapStyle cap_style, GdkJoinStyle join_style, gfloat width, const GdkColor *color) { dataset->z_line.line_style = style; dataset->z_line.cap_style = cap_style; dataset->z_line.join_style = join_style; dataset->z_line.line_width = width; dataset->z_line.color = *color; } /** * gtk_plot_data_show_xerrbars: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_show_xerrbars(GtkPlotData *dataset) { dataset->show_xerrbars = TRUE; } /** * gtk_plot_data_show_yerrbars: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_show_yerrbars(GtkPlotData *dataset) { dataset->show_yerrbars = TRUE; } /** * gtk_plot_data_show_zerrbars: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_show_zerrbars(GtkPlotData *dataset) { dataset->show_zerrbars = TRUE; } /** * gtk_plot_data_hide_xerrbars: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_hide_xerrbars(GtkPlotData *dataset) { dataset->show_xerrbars = FALSE; } /** * gtk_plot_data_hide_yerrbars: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_hide_yerrbars(GtkPlotData *dataset) { dataset->show_yerrbars = FALSE; } /** * gtk_plot_data_hide_zerrbars: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_hide_zerrbars(GtkPlotData *dataset) { dataset->show_zerrbars = FALSE; } /** * gtk_plot_data_fill_area: * @dataset: a #GtkPlotData widget. * @fill: * * */ void gtk_plot_data_fill_area(GtkPlotData *dataset, gboolean fill) { dataset->fill_area = fill; } /** * gtk_plot_data_area_is_filled: * @dataset: a #GtkPlotData widget. * * * * Return value: */ gboolean gtk_plot_data_area_is_filled(GtkPlotData *dataset) { return (dataset->fill_area); } /** * gtk_plot_data_whow_legend: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_show_legend(GtkPlotData *dataset) { dataset->show_legend = TRUE; } /** * gtk_plot_data_hide_legend: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_hide_legend(GtkPlotData *dataset) { dataset->show_legend = FALSE; } /** * gtk_plot_data_set_legend: * @dataset: a #GtkPlotData widget. * @legend: * * */ void gtk_plot_data_set_legend(GtkPlotData *dataset, const gchar *legend) { if(legend){ g_free(dataset->legend); dataset->legend = g_strdup(legend); } } /** * gtk_plot_data_set_legend_precision: * @dataset: a #GtkPlotData widget. * @precision: * * */ void gtk_plot_data_set_legend_precision (GtkPlotData *dataset, gint precision) { dataset->legends_precision = precision; } /** * gtk_plot_data_get_legend_precision: * @data: a #GtkPlotData widget. * * */ gint gtk_plot_data_get_legend_precision (GtkPlotData *data) { return (data->legends_precision); } /** * gtk_plot_data_set_name: * @dataset: a #GtkPlotData widget. * @name: * * */ void gtk_plot_data_set_name(GtkPlotData *dataset, const gchar *name) { if(dataset->name) g_free(dataset->name); dataset->name = g_strdup(name); } /** * gtk_plot_data_set_link: * @dataset: a #GtkPlotData widget. * @link: * * */ void gtk_plot_data_set_link(GtkPlotData *dataset, gpointer link) { dataset->link = link; } /** * gtk_plot_data_get_link: * @dataset: a #GtkPlotData widget. * * Returns: (transfer none) link pointer */ gpointer gtk_plot_data_get_link(GtkPlotData *dataset) { return(dataset->link); } /** * gtk_plot_data_remove_link: * @dataset: a #GtkPlotData widget. * * */ void gtk_plot_data_remove_link(GtkPlotData *dataset) { dataset->link = NULL; } /** * gtk_plot_data_set_gradient_show_lt_gt: * @data: a #GtkPlotData widget. * @show: * * */ void gtk_plot_data_set_gradient_show_lt_gt (GtkPlotData *data, gboolean show) { data->gradient_show_lt_gt = show; g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_COLORS_CHANGED], 0); } /** * gtk_plot_data_gradient_show_lt_gt: * @data: a #GtkPlotData widget. * * * * Return value: */ gboolean gtk_plot_data_gradient_show_lt_gt (GtkPlotData *data) { return (data->gradient_show_lt_gt); } /** * gtk_plot_data_set_gradient_mask: * @data: a #GtkPlotData widget. * @mask: * * */ void gtk_plot_data_set_gradient_mask (GtkPlotData *data, gint mask) { data->gradient_mask = mask; g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_COLORS_CHANGED], 0); } /** * gtk_plot_data_get_gradient_mask: * @data: a #GtkPlotData widget. * * * * Return value: */ gint gtk_plot_data_get_gradient_mask (GtkPlotData *data) { return (data->gradient_mask); } /** * gtk_plot_data_set_visible: * @data: a #GtkPlotData widget. * @visible: * * */ void gtk_plot_data_gradient_set_visible (GtkPlotData *data, gboolean visible) { data->show_gradient = visible; } /** * gtk_plot_data_gradient_visible: * @data: a #GtkPlotData widget. * * * * Return value: */ gboolean gtk_plot_data_gradient_visible (GtkPlotData *data) { return(data->show_gradient); } /** * gtk_plot_data_gradient_auoscale_a: * @data: a #GtkPlotData widget. * * */ void gtk_plot_data_gradient_autoscale_a (GtkPlotData *data) { gdouble amin, amax; gint n; gboolean change = FALSE; gdouble *array_a = NULL; if(data->is_function) return; array_a = gtk_plot_data_get_a(data, &n); if(!array_a && !(data->iterator_mask & GTK_PLOT_DATA_A)) return; amin = 1.e16; amax = -1.e16; for(n = 0; n < data->num_points; n++){ gdouble fa; fa = array_a[n]; if(fa < amin) amin = fa; if(fa > amax) amax = fa; change = TRUE; } if(!change) return; real_autoscale_gradient(data, amin, amax); } /** * gtk_plot_data_gradient_autoscale_da: * @data: a #GtkPlotData widget. * * */ void gtk_plot_data_gradient_autoscale_da (GtkPlotData *data) { gdouble amin, amax; gint n; gboolean change = FALSE; gdouble *array_da = NULL; if(data->is_function) return; array_da = gtk_plot_data_get_da(data, &n); if(!array_da && !(data->iterator_mask & GTK_PLOT_DATA_DA)) return; amin = 1.e16; amax = -1.e16; for(n = 0; n < data->num_points; n++){ gdouble fda = array_da[n]; if(fda < amin) amin = fda; if(fda > amax) amax = fda; change = TRUE; } if(!change) return; real_autoscale_gradient(data, amin, amax); } /** * gtk_plot_data_gradient_autoscale_z: * @data: a #GtkPlotData widget. * * */ void gtk_plot_data_gradient_autoscale_z (GtkPlotData *data) { gdouble zmin, zmax; gint n; gboolean change = FALSE; gdouble *array_z = NULL; if(data->is_function) return; array_z = gtk_plot_data_get_z(data, &n); if(!array_z && !(data->iterator_mask & GTK_PLOT_DATA_Z)) return; zmin = 1.e16; zmax = -1.e16; for(n = 0; n < data->num_points; n++){ gdouble fz = array_z[n]; if(fz < zmin) zmin = fz; if(fz > zmax) zmax = fz; change = TRUE; } if(!change) return; real_autoscale_gradient(data, zmin, zmax); } static void real_autoscale_gradient(GtkPlotData *data, gdouble xmin, gdouble xmax) { gint p; gtk_plot_axis_ticks_autoscale(data->gradient, xmin, xmax, &p); gtk_plot_data_reset_gradient(data); data->legends_precision = p; data->legends_style = data->gradient->ticks.scale == GTK_PLOT_SCALE_LINEAR ? GTK_PLOT_LABEL_FLOAT : GTK_PLOT_LABEL_EXP; } /** * gtk_plot_data_set_gradient_colors: * @data: a #GtkPlotData widget. * @min: * @max: * * */ void gtk_plot_data_set_gradient_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max) { data->color_min= *min; data->color_max = *max; g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_COLORS_CHANGED], 0); } /** * gtk_plot_data_get_gradient_colors: * @data: a #GtkPlotData widget. * @min: * @max: * * */ void gtk_plot_data_get_gradient_colors (GtkPlotData *data, GdkColor *min, GdkColor *max) { min = &data->color_min; max = &data->color_max; } /** * gtk_plot_data_set_gradient_nth_color: * @data: a #GtkPlotData widget. * @level: * @color: * * */ void gtk_plot_data_set_gradient_nth_color (GtkPlotData *data, guint level, GdkColor *color) { if(!data->gradient_custom) return; if(level > data->gradient->ticks.nticks) return; data->gradient_colors[level] = *color; g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_COLORS_CHANGED], 0); } /** * gtk_plot_data_get_gradient_nth_color: * @data: a #GtkPlotData widget. * @level: * * * * Return value: */ const GdkColor * gtk_plot_data_get_gradient_nth_color (GtkPlotData *data, guint level) { if(level > data->gradient->ticks.nticks) return NULL; return &data->gradient_colors[level]; } /** * gtk_plot_data_set_gradient_outer_colors: * @data: a #GtkPlotData widget. * @min: * @max: * * */ void gtk_plot_data_set_gradient_outer_colors (GtkPlotData *data, const GdkColor *min, const GdkColor *max) { data->color_lt_min = *min; data->color_gt_max = *max; g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_COLORS_CHANGED], 0); } /** * gtk_plot_data_get_gradient_outer_colors: * @data: a #GtkPlotData widget. * @min: * @max: * * */ void gtk_plot_data_get_gradient_outer_colors (GtkPlotData *data, GdkColor *min, GdkColor *max) { min = &data->color_lt_min; max = &data->color_gt_max; } /** * gtk_plot_data_set_gradient: * @data: a #GtkPlotData widget. * @min: * @max: * @nlevels: * @nsublevels: * * */ void gtk_plot_data_set_gradient (GtkPlotData *data, gdouble min, gdouble max, gint nlevels, gint nsublevels) { if(min >= max) return; data->gradient->ticks.min = min; data->gradient->ticks.max = max; data->gradient->ticks.nmajorticks = nlevels; data->gradient->ticks.nminor = nsublevels; gtk_plot_data_reset_gradient(data); } /** * gtk_plot_data_get_gradient: * @data: a #GtkPlotData widget. * @min: * @max: * @nlevels: * @nsublevels: * * */ void gtk_plot_data_get_gradient (GtkPlotData *data, gdouble *min, gdouble *max, gint *nlevels, gint *nsublevels) { *min = data->gradient->ticks.min; *max = data->gradient->ticks.max; *nlevels = data->gradient->ticks.nmajorticks; *nsublevels = data->gradient->ticks.nminor; } /** * gtk_plot_data_get_gradient_level: * @data: a #GtkPlotData widget. * @level: * @color: * * */ void gtk_plot_data_get_gradient_level (GtkPlotData *data, gdouble level, GdkColor *color) { GdkColor min, max; gdouble red, green, blue; gdouble h, s, v; gdouble h1, s1, v1; gdouble h2, s2, v2; gdouble value; GtkPlotTicks *ticks = &data->gradient->ticks; gint i; gint start; gint end = ticks->nticks; min = data->color_min; max = data->color_max; if(level > ticks->max) { *color = data->color_gt_max; return; } if(level < ticks->min) { *color = data->color_lt_min; return; } start = ticks->scale == GTK_PLOT_SCALE_LINEAR ? (level - ticks->min) / (ticks->max - ticks->min) * ticks->nticks : 0; if(data->gradient_custom){ for(i = MAX(start-2,0); i < end; i++){ if(level > ticks->values[i].value && level <= ticks->values[i+1].value) { *color = data->gradient_colors[i]; return; } } *color = data->color_gt_max; return; } /* value = -1; for(i = MAX(start-2,0); i < end; i++){ if(level > ticks->values[i].value && level <= ticks->values[i+1].value) { value = (gdouble)i/(gdouble)end; break; } } if(value == -1) value = 1.; */ value = gtk_plot_axis_ticks_transform(data->gradient, level); red = min.red; green = min.green; blue = min.blue; rgb_to_hsv(red, green, blue, &h1, &s1, &v1); red = max.red; green = max.green; blue = max.blue; rgb_to_hsv(red, green, blue, &h2, &s2, &v2); s = MAX(s2,s1); v = MAX(v2,v1); h = MAX(h2,h1); if(data->gradient_mask & GTK_PLOT_GRADIENT_S) s = s1 + (s2 - s1) * value; if(data->gradient_mask & GTK_PLOT_GRADIENT_V) v = v1 + (v2 - v1) * value; if(data->gradient_mask & GTK_PLOT_GRADIENT_H) h = h1 + (h2 - h1) * value; hsv_to_rgb(h, MIN(s, 1.0), MIN(v, 1.0), &red, &green, &blue); color->red = red; color->green = green; color->blue = blue; gdk_color_alloc(gtk_widget_get_colormap(GTK_WIDGET(data)), color); } /** * gtk_plot_data_gradient_set_style: * @data: a #GtkPlotData widget. * @style: * @precision: * * */ void gtk_plot_data_gradient_set_style (GtkPlotData *data, GtkPlotLabelStyle style, gint precision) { data->legends_style = style, data->legends_precision = precision; data->gradient->label_style = style; data->gradient->label_precision = precision; } /** * gtk_plot_data_gradient_set_scale: * @data: a #GtkPlotData widget. * @scale: * * */ void gtk_plot_data_gradient_set_scale (GtkPlotData *data, GtkPlotScale scale) { data->gradient->ticks.scale = scale; gtk_plot_data_reset_gradient(data); } /** * gtk_plot_data_gradient_set_title: * @data: a #GtkPlotData widget. * @title: title that will be displayed in the gradient box * * */ void gtk_plot_data_gradient_set_title (GtkPlotData *data, gchar *title) { if (!title) return; if (data->gradient->title.text) g_free(data->gradient->title.text); data->gradient->title.text = g_strdup(title); } static void hsv_to_rgb (gdouble h, gdouble s, gdouble v, gdouble *r, gdouble *g, gdouble *b) { gint i; gdouble f, w, q, t; if (s == 0.0) s = 0.000001; if (h == -1.0) { *r = v; *g = v; *b = v; } else { if (h == 360.0) h = 0.0; h = h / 60.0; i = (gint) h; f = h - i; w = v * (1.0 - s); q = v * (1.0 - (s * f)); t = v * (1.0 - (s * (1.0 - f))); switch (i) { case 0: *r = v; *g = t; *b = w; break; case 1: *r = q; *g = v; *b = w; break; case 2: *r = w; *g = v; *b = t; break; case 3: *r = w; *g = q; *b = v; break; case 4: *r = t; *g = w; *b = v; break; case 5: *r = v; *g = w; *b = q; break; } } *r *= 65535.; *g *= 65535.; *b *= 65535.; } static void rgb_to_hsv (gdouble r, gdouble g, gdouble b, gdouble *h, gdouble *s, gdouble *v) { double max, min, delta; r /= 65535.; g /= 65535.; b /= 65535.; max = r; if (g > max) max = g; if (b > max) max = b; min = r; if (g < min) min = g; if (b < min) min = b; *v = max; if (max != 0.0) *s = (max - min) / max; else *s = 0.0; if (*s == 0.0) *h = -1.0; else { delta = max - min; if (r == max) *h = (g - b) / delta; else if (g == max) *h = 2.0 + (b - r) / delta; else if (b == max) *h = 4.0 + (r - g) / delta; *h = *h * 60.0; if (*h < 0.0) *h = *h + 360; } } /* Solve the tridiagonal equation system that determines the second derivatives for the interpolation points. (Based on Numerical Recipes 2nd Edition.) */ static void spline_solve (int n, gdouble x[], gdouble y[], gdouble y2[]) { gdouble p, sig, *u; gint i, k; if(n == 1) return; u = g_malloc ((n - 1) * sizeof (u[0])); y2[0] = u[0] = 0.0; /* set lower boundary condition to "natural" */ for (i = 1; i < n - 1; ++i) { sig = (x[i] - x[i - 1]) / (x[i + 1] - x[i - 1]); p = sig * y2[i - 1] + 2.0; y2[i] = (sig - 1.0) / p; u[i] = ((y[i + 1] - y[i]) / (x[i + 1] - x[i]) - (y[i] - y[i - 1]) / (x[i] - x[i - 1])); u[i] = (6.0 * u[i] / (x[i + 1] - x[i - 1]) - sig * u[i - 1]) / p; } y2[n - 1] = 0.0; for (k = n - 2; k >= 0; --k) y2[k] = y2[k] * y2[k + 1] + u[k]; g_free (u); } static gdouble spline_eval (int n, gdouble x[], gdouble y[], gdouble y2[], gdouble val) { gint k_lo, k_hi, k; gdouble h, b, a; if(n == 1) return y[0]; /* do a binary search for the right interval: */ k_lo = 0; k_hi = n - 1; while (k_hi - k_lo > 1) { k = (k_hi + k_lo) / 2; if (x[k] > val) k_hi = k; else k_lo = k; } h = x[k_hi] - x[k_lo]; g_assert (h > 0.0); a = (x[k_hi] - val) / h; b = (val - x[k_lo]) / h; return a*y[k_lo] + b*y[k_hi] + ((a*a*a - a)*y2[k_lo] + (b*b*b - b)*y2[k_hi]) * (h*h)/6.0; } void gtk_plot_data_reset_gradient(GtkPlotData *data) { data->gradient->ticks.step = (data->gradient->ticks.max - data->gradient->ticks.min)/data->gradient->ticks.nmajorticks; gtk_plot_axis_ticks_recalc(data->gradient); /* max = data->gradient->ticks.max; min = data->gradient->ticks.min; if(data->gradient->ticks.set_limits){ max = MIN(max, data->gradient->ticks.end); min = MAX(min, data->gradient->ticks.begin); } data->gradient->ticks.nmajorticks = nmajorticks; */ /* data->gradient->ticks.values[0].value = min; data->gradient->ticks.values[data->gradient->ticks.nticks-1].value = max; */ g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_CHANGED], 0); gtk_plot_data_reset_gradient_colors(data); } /** * gtk_plot_data_reset_gradient_colors: * @data: a #GtkPlotData widget. * * */ void gtk_plot_data_reset_gradient_colors(GtkPlotData *data) { GtkPlotTicks *ticks; gdouble max = 0., min = 0.; gint nminor = 0; gint i; gboolean custom; GdkColor color; gdouble value; ticks = &data->gradient->ticks; if(ticks->nticks == 0) return; custom = data->gradient_custom; nminor = data->gradient->ticks.nminor; max = data->gradient->ticks.max; min = data->gradient->ticks.min; if(data->gradient_colors){ g_free(data->gradient_colors); data->gradient_colors = NULL; } data->gradient_custom = FALSE; data->gradient_colors = g_new0(GdkColor, ticks->nticks + 1); data->gradient->ticks.max = ticks->values[ticks->nticks-1].value; data->gradient->ticks.min = ticks->values[1].value; data->gradient->ticks.nminor = 0; for(i = 1; i < data->gradient->ticks.nticks-2; i++){ value = ticks->values[i+1].value; gtk_plot_data_get_gradient_level(data, value, &color); data->gradient_colors[i] = color; } data->gradient_colors[0] = data->color_min; data->gradient_colors[data->gradient->ticks.nticks-2] = data->color_max; data->gradient->ticks.max = max; data->gradient->ticks.min = min; data->gradient_custom = custom; data->gradient->ticks.nminor = nminor; g_signal_emit(GTK_OBJECT(data), data_signals[GRADIENT_COLORS_CHANGED], 0); } /** * gtk_plot_data_gradient_use_custom_colors: * @data: a #GtkPlotData widget. * @custom: * * */ void gtk_plot_data_gradient_use_custom_colors(GtkPlotData *data, gboolean custom) { data->gradient_custom = custom; } /** * gtk_plot_data_gradient_custom_colors: * @data: a #GtkPlotData widget. * * * * Return value: */ gboolean gtk_plot_data_gradient_custom_colors(GtkPlotData *data) { return(data->gradient_custom); } /** * gtk_plot_data_add_marker: * @data: a #GtkPlotData widget. * @point: * * * * Return value: */ GtkPlotMarker * gtk_plot_data_add_marker(GtkPlotData *data, guint point) { GtkPlotMarker *marker = NULL; /* GList *list = NULL; */ if(point >= data->num_points) return FALSE; /* list = data->markers; while(list){ marker = (GtkPlotMarker *)list->data; if(marker->point == point) return FALSE; list = list->next; } */ marker = g_new0(GtkPlotMarker, 1); marker->data = data; marker->point = point; data->markers = g_list_append(data->markers, marker); return (marker); } /** * gtk_plot_data_remove_marker: * @data: a #GtkPlotData widget. * @marker: * * * * Return value: */ gboolean gtk_plot_data_remove_marker(GtkPlotData *data, GtkPlotMarker *marker) { GList *list; list = data->markers; while(list){ GtkPlotMarker *point; point = (GtkPlotMarker *)list->data; if(point == marker){ g_free(marker); data->markers = g_list_remove_link(data->markers, list); g_list_free_1(list); return TRUE; } list = list->next; } return FALSE; } /** * gtk_plot_data_remove_markers: * @data: a #GtkPlotData widget. * * */ void gtk_plot_data_remove_markers(GtkPlotData *data) { GList *list; list = data->markers; while(list){ g_free(list->data); data->markers = g_list_remove_link(data->markers, list); g_list_free_1(list); list = data->markers; } data->markers = NULL; } /** * gtk_plot_data_show_markers: * @data: a #GtkPlotData widget. * @show: * * */ void gtk_plot_data_show_markers(GtkPlotData *data, gboolean show) { data->show_markers = show; } /** * gtk_plot_data_markers_visible: * @data: a #GtkPlotData widget. * * * * Return value: */ gboolean gtk_plot_data_markers_visible(GtkPlotData *data) { return (data->show_markers); } static void gtk_plot_data_real_clone(GtkPlotData *real_data, GtkPlotData *copy_data) { gdouble min, max; gint i, nlevels, nsublevels; copy_data->link = real_data->link; copy_data->is_iterator = real_data->is_iterator; copy_data->is_function = real_data->is_function; copy_data->iterator = real_data->iterator; copy_data->function = real_data->function; copy_data->function3d = real_data->function3d; copy_data->num_points = real_data->num_points; copy_data->iterator_mask = real_data->iterator_mask; copy_data->symbol = real_data->symbol; copy_data->line = real_data->line; copy_data->line_connector = real_data->line_connector; copy_data->show_legend = real_data->show_legend; copy_data->show_labels = real_data->show_labels; copy_data->fill_area = real_data->fill_area; copy_data->labels_offset = real_data->labels_offset; copy_data->legends_precision = real_data->legends_precision; copy_data->legends_style = real_data->legends_style; copy_data->gradient_custom = real_data->gradient_custom; copy_data->show_gradient = real_data->show_gradient; gtk_plot_data_set_legend(copy_data, real_data->legend); gtk_plot_data_set_name(copy_data, real_data->name); copy_data->x_step = real_data->x_step; copy_data->y_step = real_data->y_step; copy_data->z_step = real_data->z_step; copy_data->x_line = real_data->x_line; copy_data->y_line = real_data->y_line; copy_data->z_line = real_data->z_line; copy_data->show_xerrbars = real_data->show_xerrbars; copy_data->show_yerrbars = real_data->show_yerrbars; copy_data->show_zerrbars = real_data->show_zerrbars; copy_data->gradient_mask = real_data->gradient_mask; copy_data->color_min = real_data->color_min; copy_data->color_max = real_data->color_max; copy_data->color_lt_min = real_data->color_lt_min; copy_data->color_gt_max = real_data->color_gt_max; gtk_plot_data_get_gradient(real_data, &min, &max, &nlevels, &nsublevels); gtk_plot_data_set_gradient(copy_data, min, max, nlevels, nsublevels); for(i = 0; i < copy_data->gradient->ticks.nticks; i++){ gtk_plot_data_set_gradient_nth_color(copy_data, i, &real_data->gradient_colors[i]); } } gtkextra-3.2.0/gtkextra/gtkplotpixmap.h0000644000076400001440000000433612603754176015214 00000000000000/* gtkplotdatapixmap - pixmap dataset * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_PIXMAP_H__ #define __GTK_PLOT_PIXMAP_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_PIXMAP(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_pixmap_get_type (), GtkPlotPixmap) #define G_TYPE_PLOT_PIXMAP (gtk_plot_pixmap_get_type ()) #define GTK_PLOT_PIXMAP_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_pixmap_get_type(), GtkPlotPixmapClass) #define GTK_IS_PLOT_PIXMAP(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_pixmap_get_type ()) typedef struct _GtkPlotPixmap GtkPlotPixmap; typedef struct _GtkPlotPixmapClass GtkPlotPixmapClass; /** * GtkPlotPixmap: * * The GtkPlotPixmap struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotPixmap { GtkPlotData data; GdkPixmap *pixmap; GdkBitmap *mask; }; struct _GtkPlotPixmapClass { GtkPlotDataClass parent_class; }; GType gtk_plot_pixmap_get_type (void); GtkWidget* gtk_plot_pixmap_new (GdkPixmap *pixmap, GdkBitmap *mask); void gtk_plot_pixmap_construct (GtkPlotPixmap *data, GdkPixmap *pixmap, GdkBitmap *mask); GdkPixmap* gtk_plot_pixmap_get_pixmap (GtkPlotPixmap *pixmap); GdkBitmap* gtk_plot_pixmap_get_mask (GtkPlotPixmap *pixmap); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_PIXMAP_H__ */ gtkextra-3.2.0/gtkextra/sat.xpm0000644000076400001440000024111312603754176013451 00000000000000/* XPM */ static char * sat_xpm[] = { "270 300 17 1", " c None", ". c #040308", "+ c #647557", "@ c #D7D7E5", "# c #ABB2C0", "$ c #121116", "% c #B0573F", "& c #C4872C", "* c #4D5B3F", "= c #8F9CB0", "- c #543C79", "; c #6476A4", "> c #485C93", ", c #A79099", "' c #7D8771", ") c #786283", "! c #8384A7", "->--->>>>;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;;;;;>;>>;>>;;>;;;;;;..;*=''''=#'######@###=,##=,##,'=#,##,#.'+)+,'*+*''+*++''''+**+***********+**+*********+*+$***+**+*'*+****++****+*+**+'+*+++++*+*+++*++*****+*+***'=''#===='#==='*+'+'+'##====++*'+*+'''=='*+'+++++'#@@=++'+'**+*", "->>>>>>->>;>>;;>;>;;;;>;>;>;>;>;;>;;;;;;>;>;>;>;>>>>>>;>;;;!;!=.+'*=''#,'=,#,######==#,=,##=,,=,##=$.@')+)**-**'+*+'++''++*+****+*+*****+*+*****+*+*-+*.***+**+++**+***++****+***+++++++++***+++*******+******+=#==''=''##='===#''=+'#####'=+='*'**'+*'=++++++'''###==@*++**+*", "->>>>->>>>>;;;;;;;;;;;;;;;;>;;;;;;;;>;>;;;>;>;>);;;;>;>;;>>;;;!=.'++''',',,=,'&#######=######,==#&#.,,'+)+**'*'***'+**'++**********+**+****+*+******+**$+***+*++**++**-****++***+***++++*+**++***+***+****+**++='+'='*+'='=''=#='++'=#'=#=###='++*+++*'+#+++*+'*+''=#@#@++*+**", "->>--->>>>>>;;>;;;;>;>;;;;;;;>;;;>;;>;;>;);;;;;>;>;>;;;;;;;;;;!!=.$''+++'=='#'=&#&#&###&#####=&#,#'$##,++)***+++**++**++*+>******+****+*+*+***+**+**+$$.+**++*+*+*+********+***++**+'+*+*****++******+**+*++*+*++''+**++++='===+'**+#'''#''+@#@*+++***=#'''*''+'*'++''@#++*++*", ">>>>--->>>>>>;;;>;>;;;>;>);>;>;>;;;;;>;>;>>;>>;>>>)>;>>>>>>>;!;!!$++'')+'&''#*'=###=###'#####=''...'$,+'***)'***'**++*+**++*****>*+*******+*+**+>*****$*+***++*++**********'+****+**++****+****+***+++*******++'#''+**+**++*='+,****'++++''+++'=''+**++#'+#+*+++*+'+=#=@'+*+++", "-->->-->>>->>>;;>;)>;;);;;;;;;;;;;;>;;>;;>;>;>;>;>;>;>;;>>>>;;;;;=.$++++'='','+'#=&+##&##&@###==.=)*.#)+'&***''*+'*****+**********+*+**+**+*+****++**+*$****+++**********+++****+*'*++*++*++*+++*+**+*****++***'+++*+*++++**++**+********++**+'''+**++*+'*''*+'+*++++##@=++>**", ">->>>>>>->->>>->>>;>);;;>;);););;);;;>;>;;;>;>>>;>;>;>>;>>>>>;;;;=;!.$+**''''&+'==++&##=##=#&#,..#'.)'#',='***+***''+************+*+**++*+*+***+*++**+*$***+++***********+*********++**++**+*'*+****+*****+++*++=++**++'++**+++******-***+++**++*++++***=++'++',++'+'++####'+*", ">>-->>>->>>->->>>>>>>>>>;;;>;;;;;;>;;;;;;)>>;>)>>>;>;>>>>>>>>>>;;)!==#$,,+''+'*+#'+'#,####=@=##..$!..*''#,,))*++**'=+******************+*++*+**+*++*+**$****+*******+*******+*****+*+**+++*+++************+++**+'*+*++**+++**++-***+*****++++*+**++'+++*'++',+*+++'+++*#=#=''+", "->>----->-->>>>>>>;;;;;);;;;)>;>;;;;;;;>>>>)>;;;;);>;>;>;>>>>>;>;;;=;==..'+++++''+*,='&##&@#'##,#......###='+-*+*+*+++******+******++***++***+*++++*****$*+*+***********+***+****+++++**++**++****+****+*+#=++*+++++++**+)+**++**********+++++**+'+++*+'''++'+''''+**++###++++", "->>>>>>-->--->->->>>;>;;;);;;;;;;;;;;;;;;;;;;>;>;>;>;;>>;>>>>>>>>;;;!!===$.''+++)*++''==#=@######@.......=#''++**+**+*******++**+***++**++++***++++*****$*+*******+****+*********+++++**++**++*+*****+*+*'#=+++++++**)*+**************+*****++**++++***'+'+*++#==++*++++''+**+", ">->->>>>->>>->>>>>->>>>>;;;;;;;;;;;;;;;;>;>;;;>>;;>>)>>>>>>>>>>>;>;;>==!==....)'+)+*''&'##&=###,#'##.$..$#&#,'+*'++'**+****++*+*++**++***+++****++++****$$$$$$$$$$$********+*****+*+++***+**+++++****+***#+'+*+**+++***+*)***)+*******++****++*+++++++*+++++*+###'''+++*'@@=+*", ">>---->>-->>>--->>>->>>;>;>;;;;;>;;;;>;;>>>>>;;>>;>;>;>>>>;>;>>>>;>>;;;!===#,$.++'+'''''=#''&#####,=,..#=###,'%*)')'*******++++++++*+*+***+++*+*+++++*************$***+******+***++++**+*++*+++++***+++*+=+++*+++++**++++++*****+******+*+***+*+''+++++*+****'#@@#''*+'++##'**", ">>>>---->--$>->>--->->>>>;;;;);;;;>;>;>;;>;>;);>>>;>>>;>>>>;;;>>>>>;>>!;!!=!#==#.+)'+'''&''=#####,##...##'#'+''')'+','+*****+*++++++*+**+***+++*+++++***+*+******$*****+*******+*++***++**+++++**+**++++*+'*++*+*++**+**+***+***+*)****++++*+**++='+**++*++**'+'@@'+++=''=='++", "->>>--->-->----$------>>>;>;;;;;;;;;;;;;;;;>;>;;>;>;;>;;;>>>>>;;>>>>;;;;;!!!===#=##'++++'',,#&@###=..#&###&#''&#'+''='+'***+*+*+++++++**+++***++++++*************$****************++++*+**+++*'*+**+++++++*+++++++++++***++**************+++**+*+''''+*+''+**++=##==''#=#*'##=", ">--->>>-->----->-------->>;;;>;;;;;;;;;;;>;>;>);>;>;>;>>;;>>>>>>>>>>>;;;!;=!!=!=#,...+++++''###&#&=.#'####=#&'=#'&''=''+*+**++*++++'++++**++**+++++***+*+********$$**+*********+*+++**++++*++*++***++++++***++**+****+'+**+*)**)+******+*+*+*+++*+++==+*+'+*++*'#=#'#'==@''#**", ">>>>->>->->---------->>->;;;;;;;;;;;;;;;;;;;;>>>;>;>;;>>>;>>>->>>>>>>;;;;;;!!!=!===#,$+++'++'#####.$'##=&#===#'#,'+'#'''++***++++++++++++**++***++***+**+*********$*******+*******+*+*++++++*++**+*++++++******++*++++****+*+**++*******++**+++**+++'='+++++#,'''#'+#@##@#''*#", "->>>>->>>-->>------->>>->>>>>;;;;;;;;;;;;;;>;;;;;);>;>;>>;>>>>>>>>>>>>>;;;;;;!!==!==#=$,+++++'',#..#@&=####&=#&##,'&='+='=++***+++++++++**+*+*+*+*+*++**+*+******+$****************+*+++++++++++*++*+****+********++++**+++***********+*++++++*+*++''=@#'*++####,@##'##@@@@=++", ">>>>->--->->------->>>>$>--->>>>;;;;;;;;;;;;>;>;;;>;;;>>>>>>>>>>>>>>>>;>;>;;;!;;;!=!=##.$*+'+++='@.'##'=&###=#####=''++''='++***+*+++++++**++***+****+*+***+*******$$*********+*+**+*+++++++*+*++'**++**++******+***+++++++*+*+***+******+++++***+*+**+***+'###@@#'#@'@@@@@#=*", "-->>>>>>>>>>-------->->>>->--->>>;;;;;;;;);;;;>;>;;>;>;>>>>>>>>>>>>>>;>;;>>;;;;;!=!!!==.,+)*+'''...#,@&#=###'#&###&#'++,''+++++*+***+******+*++*+***+**+*++*+++******$*******+***+**++*+*+++*++++++**++*++********+++*++*+**++++******+*+++*++**+*****+*++++'##@@='#@'#@@@@@#'", ">>>>>>>>>>>>->->>>>---->>>>>---->>;;;;;;;;;;;;>;;;;;;>;;;;>;;;>>>;>>>>;>;;>>;;;;>;!;=!!#$$+,'+++.##$'##==#&#===&##'#&++,''+*+++++**********+*+*+*+*+++*++**++++*****+*$***+****+*+**+*+++++**+++++****++*++*******+++*+*****++*+*****+*++++*++**'*+****-***++&'''###=##@@'#@@#", ">-->>>>>>>>>--->>->>>>->-->>>>-->;;;;;;;;;>;;;;;;>;;;;>;>>>>>>;>>;>;>;>;;;;;>;;;!;;!=;=!#==='+''..,$#.#&=#=##&=####&',++)+**+*+*++*********+*+*+*+**+*+++****++********+****+*****+**+++*++*++*++++***++*++++**+**++++++****+*++*+*+***+**+*+**++*+*******++++'@,@#@##=@'''@@@", ">>->>>>>>>>>>>>->>>>>>>>>-$>$>>;;;;>;;;;;;;>;>;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;>;;;;=!=='#$,+''.''#$#=,##&###,#&=##','+)+,'*****+*'$*******+*+***+*++++++****++*****+*$******++*******++*+**+++++****++**+*++*****++*+*+**+*'*********+*++**$*+*****+**-+**++'=''@@##@@!,'@@.", ">>>->->>>>>>>>>>>->>->-->->>->>>;;;;!;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;>;;>;>;>;>;;;;;;;!!;#==.....'#,.$=###=###=#==##',,++*)+)*++***+*$*****+*++*+**+*+++++*****+**+**+$+*****+****+**+++*+++*+++++*+***+**+*++++*+*'+*+******++***+***+**+**..*++**+*+*******+,##'@@#@''&),,@.", "$->->->->>>>>>>->>>>>>>>>>>>>>;;;;;;;;;;;;;);;>;;;;;;;;;;;;;;;;>;;;;;>;;;;;;;;;;;;;!;;!!'!=###.+)'+@#.#&=#&####=&+##=',&'+*+)*+**************++*+******+++******+++*+*$***************++*+++*++++++**+*+*+*+*++****++*++++'****-*++**+******$$$*+*****++***)*+''@#@@@@,!))!!@$", ">->--->>>>>>>>>->>>>>>>>>->>>>;>;>;;;>;;>;;;;;;)>;;>;;;;;>;;;;;;;>;;;>;;;;;;;;;;;;;;;=;=====#$.++'',,$##=#####&='+##&===''&+*)*-**+**$*****+*++***+*+*+**+***+********$********+*+***+*+**++*+'++++******+*++*+****++**++++*+****+*++**+****.$$.+**+**+**+++*+'+'##@@##@,),)@.", ">->>>->--->>-->>>-->->->>->>;;;!>;;;>>>;;;;;;;;;>;;;;;>;;;>;>;;;;;;;;;;>;;>;>;>;;;;;;;;;;=;#=..++)'####&#=#&####&+##=#,#,'')*&*+*****$**++**++++**+*+***+*++*********.***********+****++**+++++++++***+*+**++*+***+*++*++++**+*+*+*****+****$$.$**++*+****'++++*&#'#@,!,),,!.,", ">>->->->>>->->>>>>>>>>>->->>;;;;;;;;>>;;;;;;;>;;;;;;>;;>;;>;>;>;;>;;;>;;;;;;;;;;;;;;;;;;=;===.,++++#&#$=====#####',###&#='+++,*+'---********+++**+*+*+*****+*******+*..****+*********++++**+++++*+++***+****+****++*+*+*+'++*+******+***+***.$.$+*+**++*-*++*++*'#'=#'@@!)!!!.", "--->>>>->>>>->>->>->->>>>>>;;;;;;;;;->>>;;>>;;;>;>>>;>;;>;>;>>>;;;;;;;;;;>;>;;;;;;;;;;;;;!===#$)+&''#=..#=,'######&=##=,=&)+'&+*+**-********+**+*+***+*+***+*+****+**.*******+*********++**+++*++**++++++*******++++++++*+++++*****+*+******+**)+*+*-**+**+++**+'=*','@,),),#.", ">>>->>>--->>>>>>>>>>>>>>>>>;;;;;;;;;->>>;>>>;;;;>>>->>;>>>>>>>>>;>;;;;>;;;>;;>;;;;;;;;!;!!;===.''+''=##.=&='####&####=,#'#'+'+,)***********++*+*+****+*+$$$$$$$*****$.*+*******+**+**++++***++*+++****++++*****+++'+*+*+++'++++**+***++********+**)+*******++**++=@+*+@#,!,!,$", ">>------>---->>>>>>>>>>>>>;;;;;;;;;>>>>>;>>>>>;>>>>-->>>>>>>>>>;>;;>;;;>;;;;;>;;>;;;;;;;!!!!===.''+'&###$###&#@=#=#####=,=,+&+''+*-********++****++*$$$$+**++**$.-**$**********+****+***++**++*++++**+++++*****++*+'***++*'+++++********+***-*+*******+*+*++***+'+@@*)!,,@@@)$", ">--->-->--->>>>->>>>->->>>;;;>;;>>>>>;;>;>>>->>>>>>->->>>>>>-->->;;>;;;;;;;;;;;;;;;;;;;!;!====..+''+'#=..='@=#,#######&='#'''+*&************+**$$$$$**+***+**++**$..*****+***********+*++++*++**++***++++*+***+++*+++++'++*++++++*+'+**+*+*****+++**+*********+++*###''!##%$$#", ">>>->->>>----->>>->>--->>>>>>>>;>>-->>>;>>>>->-->->->->->->>>->>>;>;>;;;>;>;;>;>;;>;;!;;;;=!!#..++'''=@..&####=,#####===&,',&'*)+***********++$**+******+**********$$****'+*********+++**++**+**++++**++++****++*****++++'*+++++++**+)**-****+*)****++*+*+++**'+'*++='##,#).@#", "->->->>>>-->->->->>>>->>->->>>>>>>>>->>>>;>->->>>--->->>>>->>->>>;>;>;>;>;;;;;;;;;;;;;;;=;!!===.+''''&####='##=######&=##',#','*+*********+***$++*********+********$$$****++**+*+*++++**++++*++***++***+'***************+'*+*****+)+)+*****+*''+*)**+**+***+**+++**'#=#,@,.#,@", "->>>->>>>>->----->>>>>>>->>-->>>>>>>>->>>>>>->-->--->>->>>->>>>;;>;>>;>>;>>;;>;;>;>;>>;;;;!!===$&++''#$.##&#####&@###='=#+,#''&*+-*-*******+*$**++******************.***+*++**+*+*+++**++++*******++***++*****+++++*+*+**+**+*+*+++*'&+***+*++++*''**+*+*****++'+++''##';=.@@@", ">>-->-->>->->->>->>>>>>>->>--->-->>>>>>>>>>->->-->>>>->>->>>>>>>;>>>>>>>>;;>;;;>;;;>>>>;;!;=!#.''+',+'..#############&=,''#'&'**%**-*+*****+*$*********************.*****+++****+*+**+++++*+******+++**+++****++++**++****+*++++++-$.++)*+)*'**++++*+*+***+*+'+++*+++##+',.@@@", "->>-->->------>->->->>>>>->---->-->>>>->>>>>>->>-->>>->>>>->>>>>;>>;>>>>>>>;;>;;>;;;>>>>;!;!;#.#+'++''.$##=&@#&########'''#'''**-*+***$*****$+**++*+*+**************$***++++***++++***++++*****+***++*********+*+++*+*++**++*+'++'#...')+=.+'++'*+)++++*****'+**+****',=='@@@@", ">>>->>>>>>>->---->->->>>--->>--->----->>>>>-->>->>-$>>>->>-->>>>>>>>>>>>>>;>;>;;;>;;>>>;;;!=!=$+'++++'#..#===#=###@###='&+',+&**************$************+**********$$**++'=**++'+++*+*+++*****+*****++******+*++++*+*++++'+*'++'++'.$..,$..+&*+*++')*++*+**'+******+**#..@'@=", ">>>>>->->>-->>------->>>>>->>>>->>->->>->>>>->>-->>--->>>>>>>>>>>>>>>;>>;>>>>;;;;;;>;>>>;=;=!=.,+'''+'##.##&#####@&#@&@''''''')*-***********$****+******************$$**+++++*++*+*++*+++++*****++***+*+**+++**++++++**+*'++*+'++''@++#...$..#')*++*-*****++'****'*-**+*.#@@@@", "->>>>>>>>>>->-->->->>>>>>>>>>>>>>->->>>>>>>>->>>-------->>->>>>>->>>>>;>>>>>>>>;>>>>>>>;;;;=;=$.+'+'++,#.@=##&#####@=#'#'&''''*-+*-*++*$****$+****+*+***************.$**++*++++'+++++**+**++*****++*******+*+*+*+*++*+*++++'+*++'+++''+@.....#.+''****'*+*+*+++**+++--.$==@@@;", ";>>>>>>>>>>$>----->-->>>>>-->>>>>>>>->->>>>>>>>>>->---->->->>->>>>>>;>;;;>>>>;;;;;>>>>>;=;==!=!.''+&'',#=#,######=####,==',+''***-***+**+***$*****+******************$**++*++++++*++++**+**+*+***++***+***+++*+****+++*++++++*+++'++++*#..=@.$*)**+++++*++**+*****+**+.'###@@!", ">>>>>>>;>>>>>>>>>-->->>>>>->>>>>>>>->-->->>>>>>>->>>----->->>->>-->>>;>;;>;>;;>;;;>>>>>>>=;;;==.'++''+=##$.#@#@&####@==&''#+&+)&********'**.+*******+****************$*+++*+++++++++*+**'+**+**+**+++*+**+*+++++++***+++++++**++**'+*'++.$.''+)+$$.*++,*****+********.*#=##!#@", ">>>>>>;>>>>>>--->>-->>>>>>>>>>->->>>>->>->>>>>>>>>>>>---->->>->>>->>>;;;;;>;>;;>;;;>>>>>;;;!=!#,'+++''&###.#####,@####'#'',+,'+,+**********.**+*++**+*+*************$$*+++*'++***+++**+**+++***++++++++*+++**++++++****++++++*++++*+'''''...+'+)*.*)*+*+***++***+*$+*$$##=#@@@", ";>>->>>>;;>>>>>>>->->>>>>->>>>>>>>>>>>->>->->>>>>>>>>>>>->--->->->>>>>;>;;;;;;;;;;;>>>>>;;;!=#=.''+'''#='#$@##=######&#''&='#'**+*-*-******.***+********************$$*++**++**+*+++******+*+*+*+**+++**+*+*++*++++++*+*+++'++*+'++*''+''..$.++**$.**+************+**.+==;#@@#", ";>>>>>>>>;;;>>>>>->>>>>>>-->->->->->>>>->>>>->>>>>>>>>>>->>->-->-->>>;;;;;;;;;;;>;;;>>>>;;;!;=#.''++''##=#$&#@&###@##$'==,',,+-)****$****-$****+*****+*+************$$**++*++**+*++******+***++*++**+*+**+++*+*++**+++*++++''+**+*+++++*+****++++-*+++**+*********+$*$;==!#@#@", ";;;>>;>>>>;;;>>>>>>>>>->>>>>->$>>->>>>>>>>->->>>>>>>>>>>>>-->->->>>>;>;;;;;>;;;;;;>;>>;;;;;===#.'')+'&#&'#.@#@=####&#..#=#'##**'********.$**+***********************$**+**+***++*++********+*+++*+*****++++++*++*+*++**+**+++'++**++'++**+-*')**++**+*-***++**+**+**$$;;==!#@#", ";;;;;>>>>>;;>;>>>>>>>>>>-->->->->>>>>>>>>>>>>>>>>>>>>>->>>>>----->>>>;;>;;;;;>;;;;;;;;;;;;;==#.'+''+''=#='##@#&##@#...,$$....**-*-.*...$.$$***+*****+*+**************$$**++*$$*++*****+***++++++*++**+*+*+++'+**+++*+*+*++*+''++****'+*)'**+*++*+++$********++**+*-*$$.;!;!###", "!;>;;!;>>>>;;;;;;>;>>->>>->-->->>>>->>>>>>>>;;>>>>>>>->>>--->>->->>>>;;;;;;;;;;;;;;;;;;;!=;===#,+&+++&=,,###@#@###.#=##'#,##,$..*..******$**+***+**+******************$$$$$$$$$$$*+********++**+****+*++++++++++++++++**+*++'+++*+++++*++*)+++++''-+*******++**+*.$.;;!;>;>;#@", "!==;;>;;>>>;;;>;>;;>>>>->-->---->>>>-->>>>>>>;>>>>>>>>->>>>--->->->>>>>>;;;;;;;;;;;;;;;;!;;==#.'+''+''==##=$@###@#@#,####,#,'-..*.-*******.$**+*+******+****************+++***+'$$*******+**+***+*+*++**++++''++++++*++*++*++++**++'*+*'+***)++*****+****++*****-*=;=;;;;>>>!@", "!!!;;=;;;;;;;;;;>>;;>;>>>>>>>>->-->->->>>>>>>>>>>>>>>>>->>>>>->>->->>>;>;;>;;;;;;>;>;;!;=;====#)''&'''#&#,=..@##$.##,#',#&=,*+*...+********$$+*+**+**+*****************+******+++$$+*******++***+***++***+++++'+''++*+++++***++*''+++,++*+*)++-*****-***+*+******';';;;>>;>;=@", "=;=;;=;>;!;>;;=!>>>;>;;;>>>>--->->-->$--->->>>>>>>>>>>>>>>>>>>>---->>>)>>;;>;;>;;;>;;;;;=!==#=.'+''+''==##==.@#@$#'@#&=###,#)*-.$*+*********$*+***+****+****************++**+*+*+.$+*****+******+*+*++**+*+*+++++++++'+++'+***''++++'++')'********-**$**..$***-*$;!;;;>;>>;>=@", "!==;!;=;;;;;>;;;;>>>>;>;>>>>>>->->->----->-->>->->>>>>->>>>>>>>---->->>>>;;;;;;;;;;;;;=;!==!##.+'''''&=&##'$....#@#&#==&#=&=&***-+*-***********++***+*+****************>*+**+*+'*+.+*******++**++++*+++++++***+++++++''+'+'+***'=+++'+++'+*--****+.-$$*-..*$$$...';;>;>>;>>;>!", "==;=====;;;;;;>;;;>>>;>;>>>>>>>>>>->->->-->->>->->>>>>>>>>>>>->>>>>>>>>>>>>;;;;;;;;;;;;!;!==..''+&''''###'=,@###..###@'###''#*************+**$$**+*+****+******************>+++*+'$**+***+**+*++++++++*++++++*+++++++++'+++*+**++''''++++-***+**......$..;.!'!=.$;;;>>>>>>>>!;", "==;====;;=;>>!;;;>;;->>;;>>>>>;>>>>-->->->--->->>-->>>>>>>>>>>------>>>>->>;>>>;;;;;;;!;==!=$;'+''+''&##&='=,#@###########''+*-**-************+$*+**+********************+*++*+*++$'+***+*+++*+*+***+++*+++++*''*+'++*+***++++*++++'++*****+**+*$....='=!!!=;!>;;>;>>>>>>>>->>", "===;=====;===;;;;;;;>;>>;;>>>;;;>>>>>--->->->-->>--->>>>>>->>>>>->--->;>>>>;;>>;>;;!;;;;;;==.''+'&'+'#==='#=,@@#.#@#&#####&'+*-***********+**+*+$*+**+**+*****************+*****'+$+*+**+**+*+++*++**+++'++++++'+++'**+*++*+++++++'++++***++*+...>===!!!!!;;;;;;;>>>>>->>>>>->", "=============;=;!;;;;;;>>;;;>>;;>;>--->>->---->->>>>>->>->->>>>->->->>;>>>>>;;>;;;;;;;;;!=!!..,''+++&=&#'&=,###.,@,#@'####+++**-********+***+***$$************************++*++++*$+++**++++**++++*+*+++'''++++'+++'+*++++++++++'++++**+++*+*.+.===;!=;;;;;;;>;>>;>>>>>->-->--", ">;================;;;;;;>>;;>>;;>>>>>>>--->->-->>->->->->>--->>>>->>>>>;>>>>>;>;;;;;!;;;!;=#=.+'''+''==##''###@.#@###&####)+**$*********+*+******+$$**********************++**+++*$$++*+*++*++++'+++**+++++++++++++'+*'+'++'+''+++'++***.*.)..='=!;;;;;;;;;;;>>>>>>-->-->--->-", ">>;=========;=;==;=;=;;;;;;;;;;>;;;>>>>->->->->->>->->->>>>>>->>>>>>;;;;>>>>;>;;;;;!;;!;=;!=..'',&'''&=#,#=##&@.'####=#&##*)****************+***+**$$$*********************+**+**+*$+*$$$$**+++++++++***+'+'+++'*'++'+'+'++'+'''+'****$...$...!!;;!!;;;;>>>>>>>>>>>->------>->", ";>>;===============;==;;>;;;;;;;;;;;;>>>>->->->-->>-->>->->->-->>>>>>>;>>>>>>>>;;;;=;!;!;#!!$.'+'''''###=&#@##.$###@##=#&#**-**+*********+********+*+$$$$****+$*************+*++**+$$$++*$$**'++++'+++++++++*+++++++'++''++'+++++++++*..='==..;;;;;;;>;>;>>>>>>>->--->-->---->", "=;;;;========;======;;;;;;>>;;>;;>;;;;>>->------>->->->>>>>>>->>>>>>;;;;;>>>>;>>;;;;;;=;=;##..'=++&''###@==#$.###@####'&=,*****'*************+***********$$************>***+++**++*++''++.*'++++++'++++++++'+'+++++++++'+'++'****+*+..#==!!=;;=;;;>>>>;>>;>>>>>>->-------->---", "=;==>;==;=============;;;;;;;;;;;;;>>>>>>>>>>>--->->->-->->>>>-->>>>;;;;;;>>>;;>;;;;!;;!!!=#.=+,+''=&#####$.#@##&#@###''',+***++*********+*****************.***************+*++**+*****++$*++*++++'+++++'++++++++''++++*+'+*+***+**$'#=!!=!;!!>;>;;>>>>>;>>>>>->-->->->--->---", "=;=;=>;;============;=;=;;;;;;;;;>>;;>>>>>>->->->->->-->-->>>>->->>>;>>;>>;>>>;>;;;;=;=;==!=$'==,'===###@.##@##@####@##'''')+*+++*$*****+**+****************.$**************++++***+++'+*$*+*'+++++'+++++'*'+++++++'++*++++*'*****+$==!!;=>;;;;>;>>>>>>>>>>>>------------>>>>-", ";;;>==;>=;;===#;======!;;=;=;;;;>>;>>>;>>>>>->->---->-->--->->>->->>>;;;;>;>>>>;>;;;;;!;!=#=$''='='&##&#.@#&#@########,,'&++++++*******+++**+****************$..************+*++++*+;+++*$*++'+++*=+++++'+*+'++'+++++*+**+*+****$$;=!==;;;;;;;;>!>>>>->>>>>-->>>->----->$>$>--", ";>;>>>;===>=============;;;;;;;;;;;;;;>>;>>>>>-->>->->->->->>->>>->>>>;>;;;>;>;>;;;;;;!!===#.='''''##@'$##@##&####@###&='+,,,'++'''++++*+**********************$$$**********+++++**+*+'*..*+++=++*++'''+'+++++''''''++++++'*+*..==#=!;!;;;>>>>>;>;>>>->->->>>>$----->---->->->", ">>>->>>;;==;;==#===========;=;;;=;;;;;>>;>>>>>>->->->->->->>->>>>>->>>>;>>;;>>>;>;;;;;;;!===#.+'''&#####@,#@###@#@&@'@'#,,=#='=='=='++++++++**********************$$$*****+***++**+**>+*.**+'+++'++++'++++++++'++'=''+'''+**'..=#===;!!;;)>;>>>>>>>>>>>>>>;>>>->>--------->>>>", ">>>--->>;#;;;;=========;=;=;=;=;=;;=;;;>;;>>>>>>>>->->->-->->->>>>>->>;;;>;>;>;>;;;;!=;=====#.'+''=,##@#$$##@&####@##@#@@=###'=#=''+++'++++**+**********************$$****+**+++++*****'.-**+'+'+++++'''''++*+''++'''+''++*+*.$=='=!!!;>;>>>>>>>-;;>>>==;>>>>>->---------$>>>>", ";>>-->>>>>===;>;;;;=========;;=;=;=;;;;>;;;;>;;>>>>>>->->-->->>>->>>>>>;;>;;>;>;;;;;;!;=!==!#.'''+=#&##..#######@#@#@,=,@&###=='#=+'+++*++++*************************$$*+*+***++++*******+++++'++++++'++'+''**++''''''''+*....====;=;;;;>;>->>>>>>;>>==##;>>>>>>>------>>>->>>", "->>>>->>;>>>;;=;>;;;;===;=;===;=;=;;;=;;;;>;;;>>>>>>>>->>->->->->-->>>>>;;>;>;;;;;;;;=;=;#=##$'+'''####.@###@###@##@@#@@@#&=&=#=#++++***+++***************************$$*++***++++++>**$.*$+++'+'+'''+++'+''+++''+'''''''...=##=!!;;;;>;>>>>>>>->;;==#@###==;>>>->->->>>--;>>=", ">>>>>>>;>>;>;;;;;;;;;;==;==;;=;;====;;;;;>>;;;>>>>>>>>-->-->-->-->->->>>>>>;>;>>;;;;;;!!===#.''')'''&@#..@###&###@#@&#''@##=''===+****++****+*************************$*+*++**+++>++*+*.$+$$$*+++++'+'+''+'+++++++'''''+'*.$====!=!;;;>;>>>>>>>>;!==#@@###@#;>>->>->--->->->;>", ">>=>;;;;;==>>>>;;;;=;==;=========;=;=;=;!;;;;;;;>>>>->>>-->>->>->-->->>>>;>>;>;;;;;;!=;====.='','+'####$.##&@###@#@#',,'@@#==''+'++*++****++****+**+*+***************.*****+***+*+**+>+*$*''$+++'++'+'++'+'+++++++'''''+'*.!#===;;;;;>>;;>>>>->=;;=@@=@@#@@##=;>>>->->>->->>>-", ">>>;=;;;>=;-=;>>>>>;;==;=;====;=;=;==!;;=;;;;;;;;>>>>>>>>->->->->->->->>>>;>;>;>;;;;;;!=!=#=$'='''+&@##..@@'#@&&@&@@!',%'@##==++'*+***++*+***+****+*+****************.***+*+***+++*++**$$++'$'+''+++'''+'+'+'+++'+==''++'..====!=;;;>>>>>>>->>>#@@@!!!!;---!@##!>->->-->-->->>", "->>->>>>>>>>=;>->>>>;====;======;;=;=;=;;!;;;;;;;;;>>>>>>>>>->>->>-->>->>>>>;>;;;;;;==;====#.''&'+',#@@.$####&=#&@@%---,'&#&#''++++++*+****++****++++'+++*+***>**>*$$$***++++***+*+++**$*+'+$++++++'++'+'+++'++++'='+''+'..#===!=;;;;>>>>->>>>!#@!!)!--------!@##;>>------>->-", ">>>>->>->->;=>>>->>>;;=#=;!;=====;=;====;!!!;;;;;;;;;;>>>>>>>>->->>-->->>>>>;>>;;;;;;!!===###+''''=&##.#$@#=#@=,#@!--%)),#++@#=#'='+*++++++++++++'=''=+++++>************++**+*+**+*+*++$*''''$++++++++++''++)++'''=''+'+'..#===;!!;;>>>>>>->>>=#@,)--%---&%&*!@#@=>>>>->>->>->", "->>>>->>>->;;>>->-->;====;;!========;=;=!;;;!;;>>>;;;;;;;>>>>>>>->->->>->>>>>;;>;;;;;==!==#..=+,=+'#@&$..@@###&@#&)--%!,)@##@@@###=''='++'+++'='=#==++++++*********$*+***+****+*+*+++*+$*+++'$+++++++++'+''++*+'+'+'+++'+.$##==;!;;;>>>>->>;==##@@!-&--%%&&,--@@@;>>>>---->-->", ">>>>>>>>>>>>>>-->>>>>>>;===========;;;=====!;;;;;;;;;;;;;;>>>>>>>>->>->>>>>>>>;>>;;;;;====##='''&'#=#@...######&##----%%,)&'@##===#===+++''+'#####='++*+++*********$***+**+***+**>+'*+$$++''$$'+'+*++++'+)+)'++*++++'++++$.#===;!!;;>>>>>-;######@%----%&&&&%);@#>>>->>>>->>>>", "->->>>>>>>>-->>;;=;=>>>;;=;==========;=====;!;==;;;;;;;;;;>>>>>>>>>-->->->>>>>;>;;;;=;===###''''''####.#$@##&'@@@@%------%),#@'#####=###===###@@##===++++**+**>***-$+****+*+*****++>+.$*'++'$*++''+*+'+'+++*+)+)+++++'++'$$##=!===;;;;>->>=@##=#,@)--%%%&-&--)@@#>>>>>->>>>>>>", "->>>>->->>>>>;;;=;>>>;>>>;;;==========;=!!==;;;!=!;;;;;;;;;>>>>>>>>>>>->>>>>>>;;>;;;!;===#=$'''''+'##@$@..@##,-&,@&%-%-----&+#@'####=#@@@@@@@@####===='++*********$$***+***+***++'*+.$++++'*+$'*++++++'''++)*++'+*+**++*+>$#==!;====!=;>>>;@@#=)),#%------%--!!#;->>>->->>>->>", ">>>->>>>->-;;;===;>>-;=>>>>>;;========;!======!;!==;;>;;;;;;;>;>>>>>>>>>->->>>>;;;;;;=!===$$'+'''&'#@.#@..##&*-,%-&,&&&&%)%!,,,###@@@@@'@@@@@@#####='++++***+**>*$**+*****++***+*++$$+++''++$++*++++'++''+++''''')+++)+'*+>#====;==#!=;>;;>@@##>;)#%%%%--%$-%,)#;->-->>>->>>--", ">>>>$>>;>>>>>>=>>->->>>>>>>>;;;============!===;;=;=;;;;>;;;;;>;>>>;>>>>>>->>>;;;;;;;;!==#.''''+''&##....###'%,-,,%&&&,&,-%@&@''@=+'@@@@@@#######='+++++*>+**++*$$************+*++.$++''+'*$$+'**++++'+'&'++&'++'+++'+++++.===;==;==!;>;=#=@@@=;!;##@@%-%-,)!@@@>>>>>>$>>>->>>", ">-->>>>->>=>>>>>>->>>->>>>>>>>;;;=========;======;=!;;;;;;>;;;;;>>;>;;>>>>>>>>>;;;;;======.=''+'''###.@##@##&'&&-%%,&&--&%--,!,''##=#@@#@####@#=''++++++++******+$$$.$$***$+***$$$$*++=*+*$$'+*++++*++++'''''++''+++')+'*+..==!;;;==;;>#@@@##=#;>>;;#@#@@@,@##@=#!!>>->-->->->", "->>>>-->>;;>>>-->--->>>>>->>>>>;===;=============!;=!=;;;;;;;>;;;>>>>;;;;;>>>>>>;;;;;;!==#.=''''''=##$.@#@##@,,,%)&,%%,%,!---)''+@##=@#@####==='+++++++*++++***********$$$*$*$$*$$*+++$+$$$''++*++'*+++++''''++&''++''++*;.=;=;=;;;==>>##=>=;=#!>>!;;))))!##!=#@#@=>>>->->>>>>", ">->>>>>-;;>>->>>-->>>>>>>>>>>>>>;;;;============;=;=;=;;;!;;;;;;;;>>;;;;;;;>>>>>;>;;;====.=='=','###@.@@##&&@&,#&)--%),@#@&),,!'=####=##=####=''+++++*+++++++**>*************$**+++'++$$+++*++=++++*''+++'+'''''++&++'+++*$!=;;;;;;;=;!@!>>>;;;;=;;>>>!!=!==##=##@#=>>>->>->--", "->=;>->>=;>>>>$>>>>>;;>>>>>>->>>>>;;================;===;!;;;;;;;;;>;>;;;;;;;;>>;;;;;;;=#.$''''''&##.$@#####@&-,,%-)-%%@,@)!,)='@#==#=+=======''++++++++++>*++*****>***>*****+*+*++++.$++++*='+'+++*''++'''+'++'+'+'+')*+'.;==;;;;>;;;;@>>;>>===;->>>>>>>!!;>###@@#;->>>>>-->>", ">->>>>>>>>>->>>>$>>>>>>>>>>>>->->>>>;;;==#=========;=!=!;=;!;!;;;;;>;>;;;;;;;;;>;;;;=;===$''=='=,=##.##@&,,,,,!@#@--%!),%,!,),@@@=#=='+''====='=='+++**+**+*+**+*>********>**>+*+>*$$$++'+''*''=++''+'++'''+'++'+'+')++**'$==;=;;;>;=;;;;;>;;;;;;>-->->>>>>##=;@#@#;>>>>>->>--", ">>>>->>>>>;>>>>>>>>>>>->>>>>>->>>>>>>>>============;=;==;=!;;;;;;;;;;>>;>;>;;>;>;;;;!=;==.'=+'+#'##.@@##'='!,@#@,,,-,,!!,),!@@#####===''+'=='''=='+++*******+*****************+*++$$**++++'+'+'+'++=+'+++'+''++'''+'+)**;+.#;;!;;;;=#===>>>>;>;;>>>>>>->>>;##>=##=#=>>>>>->>>-", ";>->->>>>=>;>>>;>>>->-->>>>>>>---->>>>>;==============;====;;;;=;;;;;>>>;>;>>;>>;>;=;;==$=''+'',##$##&##'''#,#&&)@!-!),)!,)@@@####=#=''=+'+'''+++++**+***++**+***************>*+*$$+*'++*++'++'''++=+'+'''''''++''''++***'.==;;;;>;##!##=>>>>;==>>>>;;>>>>;;>;>###=#>>>>>-->->", ">>>>>>>;;==>=>>>>>>->>>>=>>>>>>->->->>>>;!=============;;====;;;;;;;;>>>>>;>;>;>;;;==;=!=$'''''##$.####,,'',,!,!,@,--),!@@##==='+'='=='='+++++'+++++*+****+>*+**>***************$$*++*+'++*++'+''+'+++''++'''&'++&)++***>.=!!;;;;;>@@##;>>>>>>;;;>>;;=;>;>>>>>;;=;;==>->>->->>", ">;>>>>-;;===>>->-->>--->>->;>>>>>->>>->>>;==!#===========;=;=;=;;;;;;;>>>>>;>;;;;>;;;=!=$'''+''&#.###&#'+)&#@%!@,%--,-%,@@@#,''+++++''''++++++++++**+**+****+******************$$**++++++++++++'++''*''++'+'++'+,++++**+.$!;=;;;>;!@@@@;>>>->>>;>>>>>;;>>>>>>>>>>>;;>>>->->>>-", ">;->=>>>>;=>>->>>>>>>>>-->;;->>>>>-->->>>>=;;==#=============!==;;;;;;;>>>>>>>>;;;;=;;!.=''''='##$##==#,'+-##,@@@#%--!!,!'##@#+++++++++''++++++*+++*+*+*+*******>*******>$***+*$****++++++'++++++++'+'+++'++++''+,'**-'*$!=;!;;>;;;==@#>>->>>>>>>>>;>>>>>>>>>>>>>>>>>->>>>->>>", ">;>>>>>>>>;#>=>->->>->>>>>;;>>>>;>>>>->>->>;;;====#=====!===;==;=;;;>;;>;>>>>>>;>;;!=;=$;+'+'&+#@.@#&##'+)'&#,--,,),,@@@#@#@@='+*++'+'+''++++***++++*+*+***+****+******>**>*>*.*+*++++++'+''++++**'+'++++++''''''+*+***'!=!!;>;>>!=;;@=;>>->>>>>>>;;>>>>>-->>->->>>>>->->>->>>", ">>>>;>;>>#>;>>;>>>>>>>>>;>>;->>==>>>>>>>>>=>;;;===================;;>>;>;>;>;>>>;;!;!=!+'''='###.$@#=&#*'+,!,#),@@@@@,#,##@#@#++*++++++++++++++****+****+*********>*>********$$***++++++'+++++*+*++'+'*+*'''#'''+*'**.=##!;!;);>;>@#>#;>>>->->>>>>>>>->->>>->->>>>-->>->->>>>>", ";>>>=;>>>>>;;>>>;;>>>>>>;>>;>>>=;>>>>>;>>;;;>;>=================;;;;;;;>;>>;;>;>;;!;;=!$;+''+,##..,@=',+*-)'+#@,,,),,#,,,''++++***++++*+++++++*+*+*************+**+*********$***++**+++++++'++++*+++++*+++''='''+*+*.'===;=;;>>>==#;>;>>>>>-->->>->>>->>->->>->->>>->->->>>>>>", ";>->>>>>>;>>>!>>;>-->>>>>>>>>>>>>>>>>>;>>>>>>>>=;==#============!=;;;;;;;;;>;>;;;;;=!!#.#+=''##.$@&#'#,*-+&))&),,+))##''''='+++***+++***+++*+*+*****+*****+*******+*+****>**.*****++++++++++++++++'+++*++'#'''+'++**>=#==!!;;;;!=#=;>>>>-->->>->>>>>>>>>->-->>>--->--->->->>!;", ">>>>->=>>>>>>;>>>;;>>>>>>>;>>>>>>>>>>;=>>>>>>>>>;=!==============!;;;;;;;;>;;;;>>;=;=;!#.'+',=#$.#@@#'&'***'++,#+,,*''=='''++=++*++++*****+++*++*****+***+>***+**+***>****$$****+*+++++++++++'+*+++++++*'=#'''+'++*$=====;;;;>>>;==>>>>->>>>->>->->>>;;>>>->->->>->>>>->>>>>!;", ">>>>>>>>->>>>>>>;>->>-->>>;;;>>>>>>>>>>>>>>>>>>>>>;====#==========;=!!;;;;;;;;;;;;;=====.''''&#,.###''=+*+*)''+**+*++''==++++'++++++*******+++*++*+**+***+******+*+*+*****$*+>**+**+*+*+*++++++*+++*++++=##''+*'*+*>#==;!;;;>;>>>>>>>>>->>->>->->->>>>>>>>>->>->-->-->>>>>;;=!", "->>>>>>>>>-->>>>>>>-->>->>;>>>>->->>>>>>>>>->>>>>>;=====#===========!;!;;;;;;;;;;;!=====$'+''==#$@&#'+&+***+'+)*+++*+++='+''++++=='++***+*+*+++**+**+*>*******>**+*+**+*$.*+***+**+*+**+*+++*++**++**+++#'+'+''*'+*#=;=;;;;>;>>>>>>>>>>>>>>>>>>>>>>>>>>>->->>>-->>-->>>>>>>;;=", ">->>>>>>>->>>>>>>->>->>>>>>>;>>>>>>>>>>>>>>>>>>>>>>;;;==#==#=#=#=====!!;!;;;;;;;;;>=!=#.$''#''@#$@#&+*')**+)+++)'++*+*+'+*++'=''=#++*********+++>+****+**+*+**+**+***>**$*++***+***++**++*+++++*++++++''#++*+=++*$>===;=;;;>;>>>>>>>>>>>>;>>>-->->->>>>->>>>;>>>>->>>>>>>>;>!#", ">>>-->>>->>>>>>>>->>;;>>;>>>>>>>>->>>>>>>>>>>>;>>>>>>!=#=##==========;=;=;;;;;;;;;!;!==#.'='',@.@@@')+'*-*++)+)*'*+++*++*+++'===#=++++**********+*+************+*+*+***$$$*$++'++**++**+++++++++*+++'=##=+$$'*'*+>====;;>;>>>>>>>>;>>>>>>>;>;>>->->--->>-->>>;>>>>--->>>>!;=@)", ">->>>->->>;>>->->>>>>;>>=>;>>>;>>-->->>>>>->>;=>>>->>;=#=###==#=#=====;;!;;!;;;;;>!!==..''+'#@#@$#@'&++**-++***+++''++++*+=====#='**+***>*****+**>*+*+***+*****+**+++*$$..$$$*+++**+++**+++='++++++=####=+$$$$$.'.=;!;;;;>;>>>>>>;;;>>>>>>>#>>>>>->>>>->->>>>>>->>>>>>>>=!),!!", ">>->-->>>>>>>>>>->;>>>>;>>>;>>>>>>>>>->->>>>>!=;>>>>>>;==###=#==#=======;=;;!;!!!!;=;==++'=+##@.$@#',',-*-*&+**+**++++++++=####=='+++****$+>*>+***+*>***+*>***+*>+*+*$*$++**+$*+++*++*++++=+''++'==#@####++$.....=!=;;=>>>>>>>>>>>;>>;>>>>;#;;>;>>>-->->>>>>>>>>->>>>>;;@!#,),", ">>->>>->>>>>>>>>=;>>>>;>;>>;>>>>>->>>>>>>>>>>;;>;>>>>>;====##=#=#=#=#====;=;;=;!;;=!=!.'#''+&@.@@,,,'',***+'&+**+++'''''===='#=''+++*****+$$+******+*+***+****+******$*****+++$*++*++*+++'=''='='==###@@=+*$##$>.===;;>;;>>>>>>>>;;;>;>>>>;@@=;;>>->->->->->->->>>>>>>=@@;,))-", ";>>>->>>>->>;>;>>;=>>;=>>>>>>->>>>>>>>>>>>>>>;;>>>>>>>>>=;;##==#======#===;=;;=!!!;!=#.=+'='@#.@@@@+,#+**++++'+-*++++++##='''='++****+>$.$**$*>***+*+*******+***+**+*$**+**+*'**++*+**+++#='=====##@#@#==+$=##=.!=;;;;>>>>>>>>>>>;;;;>;>>;>#@@=#;>>->->>->>>>>>>>>>>;!##@!!,--", ">>>>;>>>>>>>>;>>>>>>;==;>>->>>>>->->->>->>;>>>>>>>>>>>>>;>;===##=#=#=========;=!;!=!=#.#,=='#.$#@@,+#&+**++*+&**)''=###++++++''+*******=.**.***+****>*+****>*+**+>***.*>+*++*++$$+$*+'=='=='''##@@@#=##=''.$...>=!=;;;;>>>>>>>>>>;;;>>>>>;>=#@@;>>>->-->>-->>-->>;=#;=@@@))---", ">>>>>>>>>>>>>>>>>->>->>>;>>>>>;>>->>>>>>>>>>>>>>>>>>>>>>>>>;==#=#====#==#=====;===;==!$+#=##@$.@@@#+''+-*+,+'*)*,,-+=@#=++++++++********=.************+*****+*+*+**+*$***+++*++$$$*$+===='=#=##@=@==##'''.'#=;.!!;;;>>>>>>>>>>>>>>>;>>>;>;>;#@@#;>>>>->>>>>>->>>>!@==;@@@!,%--", ">>>>>>>>>->>>;>>>->>>;=>=>>>>>>>>>>>>>>;>>>>>>>>>>>>>>>>>>>>;;==#====#=#========;=!==#$'+#&@#@@@@@#+#'***+++++,='!'=##=+*++++'******++=***>**>********+*>*****+*+*>*+.***++*+++$$*+$==#'''=@#''@#@='#+'='..$..!=;;;;>>>>>>>>>->>>>>>;>>>>>>;;=@@>>>>>>->>>->>>>>==#;#;,)!)!))!", ">>>>>>>>>->->>;>->>>>;;=;>;>>=;>>>->>>;===;>>=>>>>>>>>>>>>>>>>;=###=======#==========#.'''=#.@@@@@#)&,'*)+'++#'#',#=@###'++*+++********+*****+*+**********+*+***+**+$$*++**++++*+++'$$##@###@@@##'=='='$.#=.'.=!;;;>>>>>>>->->>->>;>;>>>;>;>;;#@#;>>=>>>=>>>>>=#@@#@!;!@@!%!))", ">>>>>>>>>>>>>>;;>>->;=>>=;>>>==>>;>>>>#;=#=;;=>>>>>>>;>>>>>>>>>;=======#=#=###=====!#=#=''##@@@@@&#=#,+***''+#+''=###=='=+++++**********>******+******>***+**+***++***>*++*+++++*+='@$$$$###@@@##=+'++.=#=$.;=!;;;;>>>>->->>->>>>>>>>;>;>;>;>;=#@@;;=#>;=;>>>>#@@@#@!,),)@,@#@", ">>>>>>>>>>>>>;;;>>;>;>>;>>>>>=;>;;>;=;;;;>>;>=>>;>>>>;>>>>>>>>>======#==#=#==###=#=###$.'+'&.@@','@##@*)+++++'&=,'='+''=++''+++'=+**>+*********+*+******++>***+++**>$**+*++**++*++##@@@#$#@##=##=+''++.##$..#=;;;>>>>>>->>->>->>>>>>>;>;>;>;;>>;#@@#>#=>#=>;>##@@=@!)!,!!!@@#@", ">>;>>>>>;;>;>>>>>>>>;;>>=;>>>;;>>>;;#;>;;>;;;;>;;>>>;;>>>>>>>>>>;=======#=#====#=#===##.'#''$@@''@@'&@+*++'''*'+==#==+++'''+++##'@@@+@#>+**+++++*+*******+++***++*+**+*+*+++*++**+##@#@#$$#===##=+'*+..#$.;=!!!;>;>>>>>>->>->>>>>>>>>>>>;;;;;;;;;@##@;#;#=;;;#@@#@@!!;%!@@@###", ">>>>>>>;;>>>>;;;>===#=>;=;;>>=;>>>>>;;;>;;>>>;>>;;>>>;>>>>>>>>>>>==#===#=#=####=######.#''''=..@,+&@#,&*+*+''+++'''===+++'##'==##+'#@'@=+++*++'+++++>**+**+**++*++*$$*+++*+'='=''=##@@=###$$===+++++*$...==!!;=;>>>>>->->>>>>>>>>>>>;>;;>;;;=;;=>=@;;#;==!##@##@@@@!)),@@@@###", ">>>>>>>>>>>>>>>=>=#;==>>#;>>>#;;>>>>;;>;==>>>>>>;;>>>;=;>>>>>>>>>>;=!;==#===#=#########.='=',.$@,@'@##+++++++'++''+'==+'++=##&#@#,*=#+@#@=''++'++'''**>*+*+*+****++$***+*+''=#######@####='#$'='++**+..$==!!!;;;>>>->>>->>>>>>>>>>>>>>>>;>;;;=;=;';=@#;;##!##@@@@@@#@!%,@@@#@#", ">>>>>>>;>>>>;>>>==#=;>>;#;;>>;>;>;;>>;;>;;;==;>;;;>>;>>;;>>>>>>>>;;=;;;==#####=#=@##@#@='==='.#@@!)@#@,*++'+'++++'+'#='''=#####,'@#@'''=@=++*+++*+++++*++***+**++>*$*+*+++====#@#@#@###=+'='$$'+++*$*$$===;!;!;>>>>>>->>>-->>>>>>>>>>>>>;>;;;;;;=;=#@##>#;;!;@@@@)%@--%!@@@#@@", ">>>>>>>>>>>;>>>;>>=#;;>>=;;>>>>>>;>>>;>>>;>>>>>;;;>>>>;>;;>;>>>>>>>>;>>>;=#==##=######@$'=,###$#,,@@@#',+'+'+'++''##@@#@#@##'#@#@@@#@@@@@#='+++=+++>++'++++*+++==+'$'+#=='==##@@@#@##'+'+''''+++**$**$=!==!!;;;>>>>>>>-->->-->>>>>>>>>>>>>>>;;;;;>;#@@@#!#;=!!,)!!,%--,,@#@@##", "=>>>>>>;>>>>>>>;>;>;>>>;>>>>>;>>>>>>>>>>>;>>>>;;;=>>>;>;>;;=>>>>>;>>>>>>;==#=##=###@@##$='''#@.@@,)@&#,+++''++++'+++=##@@#'#'''#@####@#@@=++***+++=+''''+++++++===#$'#='++''#@@@####='++'''**+$*+.+.$;==;!;;;>>>>>>>>->-->->->->>->>>>;>>>>;>>;>;;>;@@@@##@;;;@@,!))--%)@#@@@@", "=>>>>>>>>>>>>>;>;>>>;>>;>>>>>;>>>>>>>>>;;;;>>>>;;>;;;;>;>;>>>>>>>;;>>;>>>;=##########@@##==+#@$.!,!!@#)'''+''+++'++*''''='='#'''####@@##@'+**+**++++++=''=''''+''='$#++=++'++'==#===='''+++*++*$.+'$.!=!;;;;;>;>>>>->->->->->->->>>>>>>>>>>>>>>>;>;>;#@#;!@)!,@@@!%--,),!===@@", ";>>;=>>>>>>>>>>>>>>>>>;;;>>>>>>>>>>>>>>;;;;>;>>>;;>>==;;;;>>>>;;>>;>>>>>>;;=#######@@#.@'''=#&$.%!),!@&''+''+'+++'''+''+*+''&''''####'@@#=+++*>++'++;'=###======#'=$#''+++++++=='''+'''===++***$$$+.$!=!!;;>>>>;>>>>-->-->->->>>>>>>>>>>>>>>>>>>>>;;;;@@!>@!!@@#,@!%--%@@@###@", ";>;=#;;>>>>;=>>>>>>>>>>>>>;>>>>>>>>>>>>>>>;>;>>>>>;>;==;;=>;>>>;;>>;>>>>>>;=####@####@$$=#''###.,,!@)'@+''+'''+++''+++''++='=''##''#@#=+@#=++*+*===##@@####==####@@$$='#=='+++'++=''='=''='++*$.....;=;!;;;;;>>>>>>->->-->->>>>>->>>>>>>>>>>>>>>;>;;;>#@@,!@!,@!@),%---,@##@=@", ";;;;=;>>>;>>>>>>;;>>>>>;>>>>>>>>>>>>>>>>>>>>>>>>>>=;!;!=>=>;;>>>=>>>>;>>>>;;######@@@..##=''=,#$!),),@@,''''++''+'''+'+*++''==+'+=###@@'=#@@#=+++'=##@####=##@###@$$###===='++'''''=='''=++**$$.+*>.!=!!;;;>;>>>>>->>--->->->>->>>>>-->>>>>>>>>>>>;>>;@@@#!#@),@@@%----%#@##@#", ";;;>=;==;=>>>>>>>;>>>>>;>>>>>>;>>;>>>>>>>>>;>;>;>>>;;=;>>>>>;;>>>>;;;;>>>>>;==#@##@###@###=''#@.$!,!!##,''''+++'+='++'++++''+++'+'=###@@@@@#==++#=###=####===###@#$@#@#####++=#=##===='''+>**$.+>+..!;=;;;;;>>>>->>->-->-->>->>>>>>>>-->->>>>>>>>>>>>;=@@@,#@)!%@)%%--%-#@#@#@", ";!>;=#=>>>;;;>>>>>>>>>;>>>>;>>=>>>>>>>>>>>>>>>>;;;;>=#;>>>;>=;>>;>;;>>>;>;>;;#=##@#@@$##@='#'@@.$.,!,,@,#+'+=+=++='+''''''''+''''''==###@@#@#'+'+''='###====='=#@$$==###=#='==###=====++*+**+-$+*-;!=!;;;>>>>>>>>->>-->-->>->->-->->->->->>>>>>>>>>>>>;=@@@=@,),))----%-@#@###", ">;>;>>;;>>>;>>>;>;>;>;;>>>>>>>;>;>>>>>>>>>>>>>;>>;=>;;!;>>>>>>;>;>;>;>>;>>>;;=###@#@@@$=@###@@!,..%!,),!@=='=+=++='+'','''''''+++'#######@#@#='+'+'=======''++++=$$'''=#====='''==''=++++****$.+*$==!;;>;;;;>>>>>-->-->>-->->->>->>->-->----->->>>>>>>;!=@!@#!!),%%%--%--%@#@#", ";;;;;;;;;;>>;>=;>>;;>;>>>>>>>>>>=>.>>>>>>>>>.->>>;>>>=>=>>>>;;;>;>>>;>;;>;>>;==##@#@#@@=#@=#@@@,.!!!),),!,''='''''''''=''''''''==''##@@##@#@#@##=##'#=='=''+++'+'$$''=+='''=''++++++++++*****+..='=;=;;;>>>>>>>>>--->-->----->-->>>>>->->>>>->->->>>>>>;;=@@@@,!)!%%&----))@@@", "===;>;>;>>;>;;=>;;;;;;;;>>>>;>>>>>.>>>>>>;!>>>;;>>>>>>>;;>>>>>;;;>>>;;;;>;;;;=##=##@@$$#@#@#@@#!$,,%!!!!,!='@''''''+='''+'+''+'#@@@#==@@#@@@@@@#@#@@=####=''''===.@=='+#==='+++++++++***+**+**$'=#=;;>;>>>>>>>>>>>-->-->->>--->--->>>>->--->->>>->>>>>;>;;@@!@)!@,%%--%---)@@@", ";;>>>;;=;>>;>=>;;;;>>>;;>>>>>;>>;>>;>;>>>;;>>>>>>>>>;;>!;>>>>;;;;>;;=;;;>;;;;==##@@##$@#####&@@,$)!,),%!)!!'@@#=='''===''''''+'##@@@@@@+='@@@@#@@#@@##=@=#==='==#$.#'=####=='++*+++++++*++**+>$==!=;!;;;>>>>>>>->---->--->-->->->->->->->->->->>->>>>>>;>!;@,!!%,)-%-----%@@@@", ";;===>>;=>=>>>;;;=;>;;#;>>>>>;;>;>;>>>;>>>;=>>>>;>>;;;=!>>>>=!;>;>;;;;;;>>;;;;;==##@.#@#@@##@,)!$,),),!,!,!'=@@==''='=='''''+++'+=####@@@'#@@@@@#@@=@###=#######=#$$===+'''=='+*+++++++***>*+.$==;=;;>>>>>>>>>>->---->->->->-->>->->->>->->->->->-->>>>>;>;##!))!%---%--)%@@@@", ">>;;;=>>;;==>>;=;;=>>;=>;>;>>;;>>>;;>>=>>;=>;;>;>>>=>;;;;;;>!;=;;;;;!;;>;>;=;;;!###@.#@@#@#=@',.$,),),@%!),!+'@@=''#'='''''++'++'+===#'#@#@#####@##@=@#@#######==$.$$'+=++++'+++*++++++*+*+*>.==;=;;;;>;>>>->>>>--->-->->>->->>>>->->->>->-->-->->>->>>>>>;!@@!!!)-------%)!,!", "==;>;;>;>>;;>;;;=>>;>=>;;>=>;=!;;>;>;>;>>>>;;>>>>>>>>>>>>>;!=!;>>;;;;;;;;;;;!;;===#@$=###@@@!@,$$!,%,!!,@#!@'=+@@#'='''='='''''+'++++==##@#@###########@@@@##@##=#@@@$=+''='++++*++*'++*+***$;!=;=;;;>>>>>>->>>->>>>->>-->>>>;;>>>->>->->>>->->->->-->->>->),@@),%%%-%----%),@", ">=;>>;;==;>;;=;=;>=>>=;>;;;;>>;;;;>;>;>>>>;;;;>>>>>;>>>;>>;;;=;;;>;>;;;;;;##;;==!###$##@#@##@@).!%,)!@@@##@@)@@'=##==''''''=''+'++++''=#===========#==##@@@@@@#@##@@@$$$$$#+'*+*+**+++++*$*.'=!;;;;;;>>>>>>>>>>>>->>>>->>-->;;;>;>>>->->>->->-->->->->>>->>>=@@@@@)%---%--,)@,", ";;;=;;;;>;;>>>=;>==;>;;;;!>;#>!;>>>;;;;;>>>;;;>>;>>>>>>;;>>>;=;;>>;>;;;;;;=#;;====#.##=@#@@@@@$,)!,,,#&,#,,#@@@@#@@#=='=''''''++++++''='==#=='''='====#@#@###@####$@@@@@@@$$++*++*++*+***$$'=;=;;;;;;>>>>>>>>->>>>>>>>>>>->>=#;>;>>->>->>->->->-->->->->>>>->@@#@@@%%%-----))!", ">=!;;==;>>=;;>;;;=>;;=;;;;;>@>#>>>>=>>;;>>>>>;>;>>>>>>>>>>;;;;>>;;>>;;;;;;=;;=;=!##.#=##@#@@@)$!!!))!##,,@#,##@@@@@#=#'''=''=''+++'+''+'==##===='''====#####=#@@###$@$@@@@#@$$++$.$$++*>$.=;;=;;;;>;>;>>>>>>>>>>>>>->>->$>>-==>;!=>>>>>>>>>>->-->-->->>->->>>=@@#@@%!%%%,%-,,)", ";=;;>;=;;=>;;>>>;;#=>=;;;!>;;!=;;;;=;;;;;>>>;>;>>>>>>>>;>>;;;;;;>;;>;;;;;;;;!==##=#$#==#@@&!,,$),@,,,@,,,#,##=##@#@###=''=''''''+'''''+''''===#=='=====#######@####='=$@@#@@#$=.=#=#$*$$!=;!;;;;;>>;>>>>>>>>>>>>>->>>>>>>>>>#>>>;;>->->-->->>->->->->->>>$>>-=@)@,@@),)%!%,))!", "#>>;;>;;;==;;#;>>=#>==>>>>;>>;!;;>>>>>;>;;;;;>;;;;;;>>>>>>;;;;;>>;>;;;>;;;;;==;#=##$'####'@@#.,@@,#,))#',+'='####=#@###==''''''''+'+'''''==='==##=###########=##==#=''#$=###=##===='=='';;=;;;;>>>>>>>>>>->->>>->>>>>>>->>->=;>>->;>>>>>>>>->->-->->->>>>>>>>>@@!@,#@),!!--!%,", ";;;>==>;;>>>;>==;>=;>>#;;;;>;;>>!;;;>;>>;>;;;>;;;;>>;;>>>>>>>;>>>;>;;;;;;;;;====@#.#'=##@#@@$.)!,),#@#,##=''=####'##=@#=='='''''''='''''+==='==##=####=##=######=='+'+++$=@=#======;=!;==;!;>;;>;>>>>>->->--->>>-->->>>>->>>;#>>>>;>>>>>>>>>>>>>->->>>>>>>>>>>##,@@@@,!%!%,!,!", ";;=!=;;;>>;;>;=;;=;;=;=;;;;>;;;;!;!>>>>;;>;;;;;;;;>>>>;>>;;>;;;;>;;;;;;;!;;;!===##='=''##@@@.$!!!@,###@&#+='+'=##=###@@='='======='=='''=''+'===###@###=##'##=#===''+'++++=#====!;=!=;=;;;;;;>>>>>>>>>>>>->->->>->>>>>>>>>>>;;=;=;>!;;>>>>>->->>>>>->->>>>>>>>;@#!!@@)!!)))!%!", ";;;==;;;;===;>>>>>;>;;;>;;=;;;=;>=;;>>;>>;>;;;;;;>;>;=;;>;;;;;>>;>>;;;;;;=;;===#$.='''=##',!)$%@),#&@#@=#''+''=''==#==@#'='='='+''====''''+''==#==#@#@########@#'=@#='';;$#=#====;=;;;;!!;;;>;;>>>>>>>$>->$>>;>>----->>>>>>>==;=;;=;;>>->>>>>>->->->>>>>>>>>>>>>@@)!@!)),),-!-", ";;;;>;>;>;>;>>;>;>;>;;;;;>;;>;>;;#;=;=>>>;>;>;;;;;>>>;;;>;;>;;;;;>;>;;;;;;;;=###.#=''+###@#@#.,!!@@,!@@&#'+''''==='='=#'====''''+====''='='+''===###@@#@######==#'=='=='.###==;====;=;!;;;;;;>>>!>>;;>>;>->--;=>->->--->->>>;;=;;>;;;>>>>>>->>>>>>>-->->>>>>>>;>;=@!@@,!),)))!", ";;;;>;>;>>>;>;;;;==>;=;;;#;;;====;!;;>>;>;>;;=;;;>=>;;;>;;;>;>;>;;>;>=;=#!==;##@.@='''+=@#@#@!.,,@#@'@@#,'+'''''=='='''+###====''''===''''''++''===###@@####=''=='======$###=#====;==;;>;;;>;>;>;>>;;>>;>->->>=>>--->->->;>>;;;>;>>;;>>>>>>>>>>>->>>->>>>>>>>>>>>=,@,#@%!@@,!)", ";;>=;=;>;;==;;;;;;;;=;;>==;;>=;;;;;;;;;;;;;;;=;;>>=>=>;>>;;>;;==;;;;;=;;;#;=!##..=#''+'#@#@@#.,)@###&@@#'++''=''''''='===##='=''=======''''+''+=+=''==####@##'+''''#=='=$@###==#=;;;=;;;;>;;;>;>>>>>>>;>>->>>->>>>->->>>>;>>>>;;;>;;;;;>>>>>>>>>>>>>>->>>>>->>>>>);#@!@@@,,%!)", ";;;!=;!;;;=======>;;;;;>;=;>;=!;;=;;;=;;;;>;>=>;>>;>>;>;;;>;>>;;;=;;;;!;##!;=##.#'====#=&##@..@@@@@#''@&''+''''+'''''''#'=##='==========='++'''+'='++'=='=###='''''=##'=$###====!==;;;;>;;>;;;;>>>>>>>>>>-->>>>>>>->->>>>;;;>;;=;;;>;>;>>>>>>>>>>>>>>>>>->>>>->>>>)!@!,@@@,,!@", ";>;;=====;=;=;=;;;;;>;>;;>;;>=#;;==>;;=;;=;;;;>;>;>;>>;;;>;;;;!=;;;;=;=;=;=====$#'=='''#@##.@$#@@#@@@@''++++''''='''=='==###@###========''+'=='''+''''''=='++==#'====='=$$###=#;;!;;;>;>;;>;>;;>;>>>>>>>>>>->>>>;>>>>->>>>;>;>;==>;;;;;;>>>>>>>>>>>>>->>>>>>>>>>>>>)!,#),))@,#", ";;;>#==#====;==;!;;!;>>;=;>;;=;=>;;;;;>#>=;>;;;;>>;;=>;;;;;;>;>;;;=;=;====!####.'#==#@###,.#,@@##,#&#,,'&'+'''=='+=='=='#==####=====#=====''====''++''''''''++'''=#==='''$$$===!;;;;;>;;;;>;;;;;>;>>->>>->>->>>>;>>>>>>>>>>>;>;==;;;;>;;;>>>>>>>>>>>>>>>>>>>>>>>>>>>)@@,!,))!,", ";;!==;;;#=#===;=;=;;;!>>;=>;>=;;>>;;=;>=;#>;=;;>;>>;;>>;>>=;>;;;;;#;=!;#===###$#=+#'##=##$..#@@##&@'#''@=''''''=@@@#='=='=======#===#===#===='=##='''''='''=++'='''''''=++>..=;=;;;;;;>;!;;;;;;;>>;>>>>-->>>>->>>;>#>>>>>>>;;>;;;;!;!;;>;>;>>>>>>>>>>>>>->>>>>>>>>>>;=@@,),!!)", "=;;==;;;=;===#=;!;=;;!;;;;=;=;>;;>==;;=;>;;;;;>;>>;>;;;;;;;;;>;=;;====##=@#@#$..'''=##@##.###@##='',''@'#,'+'=#==@@@''='='='''====#=@===#==='==+=###=====''''+++'++'+++++*+>$!==;=;;;;;;=!;;=;;;;;>>>>>>>->>>>>>>>>>>->>>>>>;>;;;=#==;=;>;>>>>>>>>>>>>>>>->>>>>>>>>>>>;#,#@!!;", "!;;;;;==;;;#=======;=;=>;>;;;>>;!;==;>=#;;;>;>;=;!;;;;=;;;;;;;;;;;====##=#@##$.===+=##@#@.,#&#@#&'=','#,@@@@@##=+=@#@#'=='='''==#===###===========######===+='+''+'*+++++*;+$#=####====;=;;;=;#;;;>>;;>>>>->->>>>>>>>>>>>>>;>>;>>;=#;!==;;;;>>>>>>>>>>>>>>>>>>>>>>>;>>;!@@@@!,", "=;==;=;;=;;#=======!=;!;;;>>;;=;=;===;;=>;=;>;>>>=>;;>=;=!;;;;>;;;;======#@#@@$##=''=###.$#=&#'##'''',,@','#@'@==#@###=''====###=='====#===========##@###==#''='+''+'++'+'=#$#=#####===!=!!;=;==;;>>;>;>>>>>>>>>>>>>>>>>>>>>;>>>>>;#==;#;;;>>>->>>>>>>>>>>>>>>>>>>;>>;!!,@@@@)", ">>=;;;;=;;=====;=====;!;==;;;;;;>>;;;>>;;>;=;;>;>;>;>;=>=;;;;;;;;;;====#==#@#$@=#===####$.#==#''=&'=#@'',)',,'''@#@'@@@'====####==+''==##=###======###@#@@###==+'=''''#=#@#.######===========;=;=;;;=>=>>>>>;;>>>>>>>>>>>>;>;>;>;>>=@=;=;;>>>>>>>>>>>>>>>>>>>>>>>>>>>;;!=#@#@,", "=;;>;;;;;;;;;===;====;!;==>;>;;>;;;;;;==>;;=;#;;;;>;>;;;;;;;;;;;;!;;===####$$$##====###@#$#='=&=#''',=,@!,)!!+''+@@=#@======###==''====@#######====######@##@@@###=''=##='$@=#=####==;=##=#==;=;;;;;>>>=>;>;>;;>>>>>>>>>>>;>;>>;>;>;;###=;>>>>>>>>>->>>>>>>>>>>>>>>>>>>)##@@@@", ";;;=>;;==;;;;====!===;!;;;;;>>;;;;;=>>;=;>>;;;;>=>;>>;>;=;>;;;;;;;;!====##$='###''==###@#$#&#''#'''#''#@,!,)!,!,'@@#@@#=##=##@===''=#########=#=#===###@@#@###@@@=@==###==.==@##=##=;;=#===#=;;;;;;>;;>>>>>>>=;>>>>>>>>;>;>>>;>;>>;>;;=#==>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;###,@!", ";>;;;;;;=;;;;;;;===!=;!!!;=;;;>;=;;;;;;;>;;;;;;>=;>;>;;;=;;;!!;;;;===##==@#$###=='='###@@$#='#=+=&+#',',#@,,),)!!+'@'#'#@@##=@##===############=#=#=####@@@=@###@'@=@#===.###!==#==;==#===;;=;;;;;>>;>;>>>>>>;;>>>>>>>>>>>;>;>>;;;;;=;;##!>>>>>>;>>>>>>>>>>>>>>>>>>>>>>;;@@@,=", ";;;;=;#;;;;;!;;;==#==#;=;;=;!;;;;>;;;;;;;;!;;;;==;>;>>;;;;;;!;;;!;=;;##=##$#####''=#=###@.@#'#'''=#+',''@#!!!!%,),!''@''+=#==@##'=#######@@@######======#@@#@=@'='''##==.#####=====;;;#=#=;;;;;;>;>;=!;;>;>>>;;>>>>>>;>>;>;;>;;>;;;=;=;===>>>>>>;>;>>>>>>>>>>>>>>>)>;>>>>;#@@@", ";;=;;;;;;;;;;;==;!;=#==#==;!=;=;;;;>;;>;!=;;!;;;#;;;;;>;=;;=;>!;=;;;;;#==#.@=###''=##&###.@#&#,''','+,'+,,@!!!,!),)!+'=+'='@#=##@#@############=###=#=#==####@@#@@''@@@.=##@@@#===#;;;;=====#>;=>;;;=;;;=;>;>>>;>;>>>>;>>>>;>;;;==###=;=;;;>>>>;>;>;;;;;>;>;>;>;>>>>>;>;>>;=@@", ";;=;>;;;;;;!;;;;=;;=========!==;!>>;;=!>>;!;;!=;=;;;;;;>>;==>;=;;;;!;=#=##@.#=##'#######@.###==''''''==,''#,,!!),),%,),;'+'=####@@@####=####@@#@@#===#==#==##@#@@#@@@@#$@@@@###@!=;;;;;===#==;;=;;;#====###>>>;>>>>>;;>>;>>>>;;;==###=;;;>>>>>>;;>;>;>;>;>;>;>>>;>>>>>>;>;>>=@", ";;==;=;;;;;=;=;;=!;=;!===#====;;=;;>;=#;;>;!>=;;>!>;;>;>>;;;;;!!!;;=;=#==##@$=##=#######@..@'##'='=='''=#=,,,@@@!),---),'=@+@#=##@###@##='='###@#@##==#=##=#@@##@@@+&@@.@@@@@#==#===;;;;;===;;=;;;;=====#;>>;>>>>>>>>;>>>>>>;>;;;;===;;;;;>>>;>>;;>;;;>;>>>;>;;>>;>;>;>>>;;;!#", ";!;;>;;=;;;;;=;===;=;!!=!#=#==;;=!;;;;===;;;;;;;>=;;>;>;;>;;!;;;=;==;==!=#@@#=#=####@###@#.#&'&'='==''''===',,#!,,----,)!;#@@@##@@#@@#@=#''''#@#####@##=##@@##@#@'',)!.!@@@#####=##=;;;>;;;!=>=>;>;;;##=;=;;>>>>>>>>>>>>>>>>>>;>;=====;;>>>>;>;>;>;>>;>>;>;>;>>;>>>;>;>;;>>;;>", ";=;=;=!==;==;;=;======!=;=#==##====;;=;;;==;;=;;=;;=;=;;>;;;;!;=;;;!!;=====@$=#@##@#@#@###.#=#='''=='''=''#'!,@@!%,,--,!!=@'@==#@@=+##@#@##==###@##=#######@#@#@@,!,.$!@@@@#@@#=====;;;;#;;;;;>>>>;;;;#;=;=>>>->>>>>>>>>;>>;>>;>>;;;;;;=;;>;>>;>;;>;;>;>>>>>>;>;>;>>>;>;>;>;;;", ";;;===;;=;=;=;=;;=======;===##=#=======;>;=>=;=;#>;;=;;!;;;;;;;==;!!;!=;=##$##==##@@#@#@##$='''#='#='=='='==='##!,))%-%!%!!'+@@#@+'@@@##@#@#=#@=##@###=@#@@#@@##@''@@@,=@@@##@###===;==;;==;!;;>>>;>;;;;>;;;>;>>>>>->>>>>;>;>;>;>;;;=====!;>;>;>>;>>;>>>;;>;;>>;>>;>;>>;>;>;>;", "!;;;;!===;;;====;=;===!!==!=====#;==;;==;;>!==;;!;;>;>;=;;>;;;;!;===;==!=##$='=###@#@#@##,.$#'=&=,=='=''='''=,,,##@,!,!@!!!''='#''=+'@=###@@==@'@##@@#####@@@@@...$@@@!'=@@@@#@@@###!;!=>===!;;>>>>>;;=>;;;;>>>>>>>>>>>>>>;;;>;;>;>;;==#==;;>;;>;;>>;>;>>;>>;>;>;>;>>;>;>>;;>>", "!!;;!;==;=#==;==;;======;==;====#=====;=;!;=;==;;=;=;;#;>;;>;==;;=!;;=#===#=$'='###@#@###$.,##'=='======''=+==',,#,@),#,#,--*-+@=+''''#@'@#@@######@@'@#@@#@$..@@@@@@@@@@@@@@@####@#=!=====;>;>;;;;>;;;>;;;;;>>>>>>>>>;>;;;;=;;;;;;;;=###=!;;;;;>;>>>;>>>;>;>;>>;>>;>>;>;>;>;>", ";=;;!;;===;==;==#;;;==;===;!==;=====###!!=;=;;=;;!>==;;=;;;;;;;;>=!=;==!=#=#$'+=#=#@##@..$###''='==#='=#='''=#==,,,@,@##,#'--*,#@!!!''=#''@$$$@=@'@@@@$$$$$.@#@#@@@@@@@@@@@@@@@#@@@###=====;>=>;;;;;>=;;=;>>>;;>>>;=;;>;=##==;;;;;;;;==#=#!;=;;;;;;;>;>;>;>;>;>;>;>>;>>;>;>;>>", "!=;!=;=;;=;=####==#===;#=====;;=!==#=###=====;==;;;;#=;=;;=;>;;;;;====!!=!##$=='+=###@#$#,##&#',=='==''''==='=''===,!#@,,,,,!)!@#%!-),'**@@$$$$$$$$$$$$@@@@@@@#@#@@@@####@@@@@@@#@@@=;=#=#@===;;>;;;>;;#=;;;;;;;>;>>==>;;>=###==;;;;;=======!;!;;!;;;;>;>;>;>>;>;>>;>>;>>;>>;>", "!==;==;=;;=#=###==#=##!=#=====;======####====;===;;;=;;=!>==;;>;;;;;=!!==#=@#$#=#'=#@#@.@#==,===','==='''===''==''=',#@##!!!,!,@,!,!,)+-'@@.@.'@@@@@@@@@@@@@#@@#####@###=####@@@#@@@==;;!==@==;;>;;;;;>!=;;;!;;>>;=;;;>;=;##=#==;;;;;!=====#;;;>!;>;>;;;;>;;;;>;>>>>>>>>>>;>>;", "!;;===;====;===#@@#@@@#####====#====;;==###=#==#==;;;;=;=;;=;;;;;;;;;!=====#@$##==#'#@#.,#&#=,'''===#=='#=#=''===='=','',#',,,@,%)!%!!,!+''...@@@@@@=@@#@#@@@@@@#######===##@#@#####@##;;;===;=;;;;;;;;;=;;;;;;;;;;>;>>;;=@==##==!=====#=#!=#=;=!;;;;>>;>;;>;>;>;;>;>>>>>>;>;>", "==;;==;;=;;;;=#==#@@#@#=###==============####=======;;=;;=;!;;;;;;;;====#=@#$##########$=#',#=#',''='====='='''='='='''=+,''!,@)!,@!%!!!,!=!$$@#@@@@=,@@@@@####@#####@##===####=@#@####==;;;=;=#;;;;;;====;=;;;;==>>;;>>>=#######=######=#;==#!;=;;>;;>;;>;;>;>>;>>>>>>;>>>;>;", "=;=;=;;=;==;;#===##===#@@@@@@##=#=======;###=@##==#;;==;;=;>=;;;;;;;#!=#!#=@@$'===#=##$$=','#'#'==='===##,''=,''##=='''''+'=',@@,#@@),),)!!!,.@,@@@@@@=@########@##@@@@@###==###=====###=#!==!>;;;;;====;====;;;##==>;=;=###########@##@@==!!##!!!;;;;>;>;>;;>;>>;>;>>>>>>>;>;", "=;=;;=;=;====;=;===###==###@###=========;==#=##===#;;=;;;;;;=;;;!;;;=;!#===@$#''=##@##.$#===&'#',=='==###=,'==='+''===''=+'='!,##,!),!#!,,##$@,@#@@@@@@@#@#@##=###=@#==####==####=;;;!=!##====;;;;;;=;!;===;=;;===;=;;#;####@@@#@#@#@####=;>;=#===;;>;;;;>;>;>>;>>>>>>>>>;>>;;", "!;;;;;==;=;;===;=;===#@####@#@#####=##=====;==#=#=###==;;#==;=!;;=;;;==#=#@#.#''#=####$##&='==#'===####=#=='='='=''='=''''+''',,,),!!@#,!!,$#$@@@=@@@@,@#####=###@@@#@#!@#==@@@#@==;;;!===#@=#==;>>;======#@#=;==#=;=;=#=;=##@@@@#@@@@@##=!;;>;;##=;;;;>;>;>;>;>>>>;>>;>;>;>;>", "====;=;=;===;;==;=;=;===##@#@@#@@@@#============#=#===#=;=;==;==;=;;;!#=@=..$''=##=@##$###==,##=&#==='#=#==',=='=''''='''''+'';!,,!))%,!#'#.@@@@@@@@@@@#@####=#=##@##@#!#===##@##==;;>;>;###@#@@##=;#==#=#####;=#=#=#=###;#@@@@=@#@@@#@@#==>;;!;!@;;;>;;;;;;;;;;;;;;>;>;>>>>;;", "!;!;==;==;;=;=;=;=;=;=;=####@@@@#@###=#=#=#===!==###===#=;=!=;=!==;!=!===##$#'==#@###.$##'==#=='=#=#&=#'==='='''='='=''=''''''''!=##))!,!,+$@!#=@@@@@@@#####=##@=#!@@@,####=@@==#=;==;;>;==#=#@#@@=#@@@@@@#@@#====#####@@=#=#=@=@@@=##@###=;;;;;;!;;;;;;;;;>;>;>;;;!;;>;;;;>>>", "==;;=;;>;=;=;;=;;==;==;=====##@@@@@@@#====#=#====#=###==#==!=;!;=;;!;===#=$==##==#'##$.##&'=,##,'=#=#'#,#======'='='=''='+=''+='!,!,!!!;@!'.#,)#@@@@@@@@##==#=###)-!!=@#@##=;;#=#=;==;;=;;;==#@#@#@@##@@@#@#@@=#=#@#@#@##@@@@@@';'@####@@==;;;;;>;;>;;>;;;;;;;;;;;;!;;);;;!;>;", "=;===;!=;;;;;==;=;;;==;;===;==#@@@@@@@#=====##=====#=####=======;!=;!=!==#.#=+#+#####$.##====#===#=#==#'==#',''='===''==''''=''''!;!!!,)''.#+,,!@@@@@@######)----,))@@@@#@=;;;#=##===;;=##=;!#@;@@@=#@=;=@@@@=#@####@###@#@!@@@@@@=@##====!!;;;;;>;;;>;;;;;;;;;;;;;;!;!!!;!!>;", "=;===;====;=;=;==!=;;=!;;!=#=====##@@@@@##@#####=#===#==####;!==!!=!;=!=#####='##'###..##=,=,##=,#,#===#,========'='=''=#'+'+''='''!!+!'''!$@@@@@@@@#@@@##@@@,---)%#@@=*-!@#==;====##@#=@=#==#@@@#@#=@@'@@@;=;=;@@@@@###@@@!=@=@##@@=##=;;===;;;;;>;;;;;;;;;;;;;;!;!;!======!;", "==!==;=;=;=;;;;;;==;=;!=;=!==#=#=###@@@@@@@##@@@####===#=##=!;;!=!;!==!##$#=#===####@.##=====#=,=#'=&=#='===,'='#='=='='#+'=+++*'++''''''++..@,,@@@@@##@@##@##%%-%!,###!--!#=;===!=@@@#@##@##=@@@##==#@@@;@@@@'!@@@@#@@@@=!!,)!@@@#@#=#;;;==#=;;>;>;;;;;;;!;;;;;;;!;!;====##==", "=;==;=;=;==;=;=;;===;;====;=====####@#@@@@@@#@##@#@###=#=###=#!#==;;!==#=$#=====####..##===&###'#=====##=&============'''#'+$$$'++''++';'*!$@@,!,!=@#=#@!>@#),%---!,@#'',&->@##=#=##@@@@'@@=##@@#=##=#@!!=!=@@;===@@#@@@@@!,)!,!@@@#@=#;=;;=#==;;;;;;=!;!;=;=;;;;;=;=;!!!!===!", "====;==;;==;=;==;;;;;!=;=;==;===;===####@@@@@@#=@#@@###=######;!=====!==#.#=='#=####..###&#==##=#='=#,#='==#=====#==''='=+'$#.$$'++'++'++'=#$,)-,!!@#=!!@@@@%@)---%@@@),&&,)@#=======#==@#=#@#@@@#=;==#!!)!!!!!;!;@@!=!,@@!),)!)!@@@=#==;=;=##=;=;;;#@#=;=!====;!============;", "===!=;;=;==!=;;=;!;=;=!;=;;====;=====###@@@@@#####@@###=#=####====#=;====$===='#=####$#======#=,##='==##====&=#=#=====''=''.#@@@$..+>+++>$.@,,)!@#!!==!#@,)!@%,%%!@@#@-,&&--!@=======@';@@=#@#@@==#!;=,!),)@,)!!!#@@)!;,@!!),!%!!)=@@#@==;=##=#;!>=>=#@!;=;=!=====###===!=!=!=", "=====;=;!=;;=;!;=!=;=;;=;===;===;=====##=##@@@@#@#@@@@@@@#####==#!==#==#=$#'==+''##'#$#==#=#'#=#,=&=#=#=#&##==#==#='===''''.#@@###$$.;.$+=#@!),,)@!!##!;)-!#%-!!,@@#@%-&&&-&@@=#@#===@@@=@@@##@#=#;;!#@!),)!#@@@@@!!,)!!@,),))!%!!)@@@##=####@====>=##@#=====!===##@@=#==;=!!!", ";=!==!=;;!;;==!;===;;===;====;====#;=;====##@@@@@#@@@@@@@@@#@####======##$'='#''+##=@.####&#'#'#=#==#&#==#=#===#=##''''''+=$##@#@####$#===##,####==;;#!,,!%,--%--%!&--&&&&-)!@=##==;##@@#@#@===;;==#@%#!)!%,@)%@@@,)!),)!!)%,--!%!;!!@@@@#@#@##!====##==!!======#@=@#====;;=!=", "!=!=;=;;==;=;;;;=;;=!;=;;=========###======@@@@@@@@#@@@@@@@@@@###=#===###$==='=###$#..###===&========#===##&#=&#=#'''=='=''+$@#@####===='=!#=,##,!;!>!=##,)-----%!!--&&&&--&;@####==#=@@@@#@#;;=##@#@,!%!#!@%,!!@%;!,!@@@!!)!--%,),);!@@@@@#@@=@@@#==#@##===######@@@##==!;!!=", "=#;=;=;=========;====;;=;;;=;==;=;####==#===###@@@@@@@@@@@@@@@@@##=#=####.$$=+$$#=.#=.###=='#=,==&===##&==#==#=='#==''''''''.#@###==@=====!#=@####!;;==##),%-----%%-&&&&%-!,!@@@#==#==####@=#=##@#=##@)!%@#@@,-@@!,)!)@@@)!)%,-!%)!,!@@@@@@@=;;@@;#@@@@@@###@##@@!=!@##===!;!!", "=====;;;;=;;====;===;;=;=;======;==@@#@###@==##@@@@@@@@@@@@@@@@@@########@..=$=@$$.#$,#&#'#'='=='#====#==#====#====''='='=+'.####=##====;!!!!!!;;=>;!==!@,#---%-%-)--%&&%%,)!@#@##=====@#@#;;=;>;;;!#,%!@@@@))@@!,)!!,@#,@!!%)-----!)@@@@@@!!,;,@@@#@@;@@#@#@@@@@;!!@@=##====!", "==================;==;==;;;;;====#=##@@@@@@@@@#=##@@@@@@@@@@@@@@@@@@##@@..$$.=.@..@@=.#=,#=#&###==##,#===&#'&=========#@##='$####=#===;==;!;!;;;;;=!=@,@!#@%%---%-------%@%->@@@=#=#==;===#=!;;;;>;,!--%@!),,,@)@@,@#@##,#)!%,%----,,,@@@!-,))!)!!!!;!!!!!#=@#@@@!;!@@##======", "!==!==#========;===;=======;!;===##@#@@@@@@@@@###@@@@@@@@@@@@@@@@@@@#@@@@...#@#.@.@#@,.#=#'='#==&#===##'##='=#,=',##''=#@##=$@@###=#===!;!!;;;;;;;=@!!#,!!@@%-%%%-----%--@@-)@@@=#=##========;=;==;@),-!@@)!!)!@@@@@##,##@@@,@%,%,%!)@,@@,!!,),)!!!))!!;;!@#@@@@,!)!@@##=###==", "=====##========##==;;========;;=#=##@#@@@@@@@@@@@@@@@@@@@@@@@@=!=@!!@@#@.#@#.@@@..@##.='###='###'###==,#==#='==='='=#'=='@#'.@@####$==;=!!;!;;;;;;#!@#@)@,,%@,%%%-%---%--%),@!@##=####!===####=##=!@@%-%,),)!!,!!@@@#,#,@@@@@@,)))!),),,!),)!),))%,!!),!!;@@#,@@@!;!@##=######", "=============;========;=======;====##@@@@@@@@@@@@@@@@@@@@@@@@@@@,!@@!)@@.##..@@@$$@.$.#&=##=,#====&=#===,=====,'#==##='''='@...#$.$;.#=;!;!;;;;;;=#;@#@!#@=,,@,,%%%--%-%-,)@#!@####=##=!!#@@@@##=#=#),),@,%),)!@###,,=#@@#@@@@!!@@,%!%!%),%)!!),!)-%,)@@@@##@@@!)),@@#@==#@###", "#==###=#=====;==========#======;;==####@@@@@@@@@@@'==#@@@@!#@@@@@!!,!,,.,#@.$@@...@#.##',#=#=',===''###'=#=#==='''==##=='=#@'@@..$!=.;;!!;!;;;;;!>@@@,@,@=#,,--,%&%-%-----,#@@@##@@###@#@#@@@@@##=##,@)%)),),!@@@######@#@##@@#@,@@@!!)%,)),),)!%!,),@@@@@@@##!,!)!@=###=##@##", "=========#====;====#============#===##@@#@@@@@@@@@=,,;@@@@@@@@@@@@!@@!)!.,..@@@@$.@$.#=##=,====#==#=&===,=#=#=='='=###'===''@@.$..=;.!==;;;;;;;;;=#@!!,)!!@#)-%&&&&&-----%@#@#@@,!!!@@#@#@#@@@=@@=##@@,!,!)@!@@@@@@###@@@@@#@@@,###@,)!!%----),%!%-%!,!!,@#@#@@)@,)!@#@#==####", "=###====#=========#===##=##=####=====###@#@@@@@@@@@;)#,!=@@@!,@@@@@,@@!..#.$$,!$.,@.###,=#'#==&#=#=#=====,==,=='=''##'##='='=$..=+;;$=;;!;!;;;;;;=@)@#)!,)@,%--%&&&%-%--%@##,@#@#=@@=;@@@@@@@@@@@#=@@@!!!),,@@@!,##=##@@@!@@#@@@#@@@!@@!)%-)%!),),-!%,)!,#@###@@))!@===#===###", "===========##===#########=###=#=#=##==##@#@@@@@##@@@@@@,!'#@@@,,@@,@@@@!$)..,!!.,;,.#,=#=='##'#'#=,==#&#'=='='=''='=#'##'#===@#@$';;.!=!;!;;;;;;!;!#@,-,)!,#,---&&&&&-%--@@%--@@@##@@@@@@@@@@,-,!!!!@##@,,@@@,@@@@#=!=#@!,@##@#@@,#@@@@)---%!,)---%,@)!,)@@####@,!)@==@##==##=", "#===#===##=#==#=====#=####=#=###############@###@#==@@#@,@@@@@@=,!,,@@@.),,.),).;,'$#@#=&#'##=#&=#='==='====='==''='====@'==$$##=$.;$;!;;!;!;;;;;!!#@!-!!-),#---&&&&%%%--)@!!,,!@###@@@@!=@,!-)-%!!)@#@@)!@@@@@#@@=#=!;=@,!@@,@#@@###@#---))),@%-,)%,),)!,#@@@#@)!!@#=#;#==##=", "#=!======#==##===;=====#=###=###=########@@#@#@##@,=#@#@,@@@@@@,!;!,@@@$,!!.!,!,.),.@##==#=#='##=##=,==,#=='''='''#'=#=='###''$.=$=!==;=;;;;;;;;;!;#=,#@@,!-,@%)&,&&&&%%%,@@@#@@@@#@#@@@@!!---&&,%-&!@@@@@@@@@###@#=;!;!@@),##,#,##,@@@,-%)-,)@,%),),)!!!)#@###,!!!###=!===##=", "=#===!===##==#=#;=====###=#=#=#############@#@#@##@@#@#@@@@@@@@@@@@@,,,!!)$.!,).!,!..@####'&#####=,===#''=,==='='=='=='='###=''.===!=;;;!!;=;!;;;;;!;,#,#),-##@--%-&&,%--%@!%),@@@@#@@@@)--%-&&&&%,&)@#@@@@#@@####==;!;!#@@;####,##@@!!-),%,%!!-,%-!-%@@!,@#@##@)!,@==@#====##", "#=====!==;=====#;=======#=#=#=#############@#@#@###@@@@#@@@@@@@@@@@@@!!.,!$$),!$!)!)$.####=#===,#=#'',##=#='#'======#====#++$.$@===!=!=;!;;;;;;;!;;!)!@,@,)-@#,@%-%%%&#%!!%--)-!@=@#@=',@&--%&&&&%&&-,@@@@@#@#####!;#;;====@@=##@@@@@%!,%!!)))%!%--%,)!@@@@!!!#@)))@#@=@==!===", "##==#==;=;===========#=#====#==##############@#@#####@@@@@@@@#@@@@@!,@!$$$$!!%$),,!,.#####==#=#==&##===#'====#=='======''=='+##=#=!=;=;;=;!;!;;;;;;!!=@@@@,!@#),)%-,&&,%%,%----,@!@@@),%-%&&&&&%&%%&&)@##@####===##;;!=###=@@==#@@@@!!)!!%@,@!,),-,)),!,@@@)!,@@!)@@##@#===!#=", "##==##======#====;;===#====#=#=##=########@#@#@#@###@#@@@@@@@@@@@@@#;),),),,)!$,)),)$.####&==&##==#=&'====='#======'=='==''$=#####==;!;!;;;;;;;;;;;;;!##,#),@,),@@%%-&-,)),%%---!!@#!,,%%&&&&%%%%%%&&-@@#####=!!=!!!;==#=##=@##@,@@@,)),)@@@@,--%-%)!!),@,@@@@!@,-@@@@@#=====#", "##==#====;=====;========#==#====##############@@@@@#@#@@@@@@@@@@@@@@$@@,!)),%,$$,)!,!..&##=#==####=#='#=##===#======'====#=.###=======!;;!;!;;;;;;!!!=#@,#),@@)@,#)-%---%-,&&&%-%!)))%--&&&&&%%%%%%%&%@@@##==;!;;==##;#=@#=@#@#@@,@@@@,!,@)@@@-,--,@,)!)!!,@@@)!),@@@@@@===#==", "##========;==================#=#=#=######=###@####@##@#@@@@@@@@@@@@@@$@@@-!),)$$%,)!,.$==####==#===#=&===#==#====#=='===#'$####====!==;;!;!;!;!;!;!;;;!;,@#!=#)!@#@-------&&&&%)-@,-)--%&&&&%%%%%%%&&-,@###=======#@#@!@!@##@@@@#@@@@@@@@@@@#),)),%)),,!,)!@@@,!,%!)@,;#=#=###", "#==!==!====;=;====;====;====#==#=##=####=#####@@@#@#@#@@@@@@@@@@@@@@@@@@.$$,!-$$-,,),.$=&#==#&##=&=#=,='=#===='====='=#===.###===!=;===!;;!;!;!;!;;!!!!!;!!=#@@@#@#-%-%---%-&&&-%,%-%--%&&&&%%%%%%%&&-)@@#==####@@;@##=@@@,@@!!@##@@@@@@,@#@@@,)!)%,))@@@,@@@@),!)!,),!##=####", "#==;====;=;====;==;=;==#==##==###=#=#=##########@@#@#@@@@@@@@@@@@@@@@=@@$!!)%)$--%!,),.=####==###==#'===#==#=#==='=='==='==.#=#==!=!===;;;;!;;;!;;!;!;!!!=!!=@=@@@%%---%----%&&&,%----&&&&%%%%%%%%%%%-&@#@=#@@@#=@@@=@@@@@,@),!@@@@@@#@@@@#,@@,!),!)@@#@@@!@@@,)!%,)!!!##===#=", "#===!=!=;===;==;==;=====#==#===##===####@######@#@#@###@@@@@@@@@@@@@@@@@@$!,)$,--,%!!.@&##=,=#=###=#='==##'#='==#=#'=##='=..##!==!=;;=;=!!;;;!;;;;!;!;!!!;==#@@@@@!%--%-%--%-&&,&----%&&&&&%%%%%%%&%--@#@#=#=!@@@@;!@!@@@@,@!!!@@@@,@####@@#@@@!@)!)#,,@#@!!##@)!)!)!!)##=#=##", "==#====#==========#===#=====#===###=###########@#@@@@@@@@@@@@@@@@@@@@@-@$.,!,$%,)!!,)$!#############,=#=#==#========#===#'$#==#===!=;=;=;;;!;!;!!;!!!!!;;!!!=@@#@@!%,%%-%----%&&&%----%&&&&%%%%%%&&&%-%@@##@)-@@,,----%@@@@@!),)@@,!!@###@#,#@@)@@,@######@,#@@@),!,)),######=", "==========;====#=;=======;==#=#=#=#=###########@@#@@@@@@@@@@@@@@@@@@@@@.$$)!,!$,$%!,!$'@##&#######@===#'#='===='##==#'='''!.=#====;=;=;;;!;!;!;;!!;!;!!!;=;;==@#@@!),!@&%-%----&,&%---%&&&&%%%%&&&%--,!@#=,,)-%)%%-%---&!,!,@,))!)),!@@=!@@#@#@@@@!@#,,,===!,,##),))!,)@@@#==#", "===;===;=========;#;;==;;=;====##==########@##@#@#@#@@@@@@@@@@@@@@@@@@$...,!!)$$$$)!!...$####&##@##=###==========#'#====='.=#===!==;=;=;;;!;;;=;=;=;=;=;==!==!##,@,!)%@%-%-%--%%&&%-%--&&&&&&&&&&&%--%!!@###%&&,&,&&&&&&-),%@%),))-!@@@,####@@@@@@#@##===#=#=,#@@,,),@!@##@###", "===========#;==;==#========;====##==############@#@@@@@@@@@@@@@@@@@@$$..$.$$$,$)$,%,,),#$##=#####@&#=#####=#='#====#=='''.=##==!==;=;=;=;!;!!;;;!;!;!!!;=;;=##@#@@#,@@@--%--%%&%&%%%--%%&&&&&&&&&&---!!=@@#@)&&&%%&%%&&&&--,-%%---,@@@@#=####@#@@@@@@#==!!#=,,,@@)!!)@#@@@####", "===;==;============;===;====;;===#=###########@#@#@#@@@@@@@@@@@@@@@@$$.......$)$),!$)$..$##'####@###=#=@##=#==#==#==='''$#=#====!!!=;;!;;;=;;!=;=;=;=;=;=;=;=@@@@,@#,!@--%&%-%%&,&%-%%%&&&&&&&&&&%-%,@!@@@#@&&%%%%%%%%%&&&-----%-@@,,#,#=;=##@@#@@@@##====;!=##@@#,,)@@##@@@##", "======;#==;==;====;=====;====;======########@#@##@#@@@@@@@@@@@@@@@$$@@...$@!$$$$,%!$$....&####@##@#=#=#@##=###=====''++'.##===#;=;=;=;!;!;;=;;!;!;=;=!!!;===!=@@,@!#@,@&------,&%&&&&&&&&&&&&&&&%%-%%@@@@!&,&&&%%%%%%%%%%&%%--%%%%@##=#==;==#,@@@@#@#=##==!!=!,#@@)!),%,@!;>!@", "==!!==;#;==;==;;==;#=;=;;==;=;;=====######=##@##@@@@@@@@@@@@@@@@@@$@@@@$.$.@$$$!),),),.@##=##&@#@@#'@#####=##=='==''+$$.'.=#==!==;=;!;;;=;;;!;=;=;;;=;=;=;!!!===#@,#@@@%%-%---%-%-%&&&&&&&&#&&&&&--%),@@#@)-&&%%%%%%%%%%&&%%%%---)@##@#==;!=#@@!!#@@=##==!#!=@=@@#-,,%!%!---),", "====#======;=;==;=;=;====;=========#=#########@#@##@@@@@@@@@@@@@@@@@@@...,$@.$,),!),!!..##=##=@##@#=@#@#@###=#'=''+.$.#$$=#===!=!=;=;=;;;!;;;=;;;=;=;;;!!!!!!=##@@!,,@@!,%%%------%%&&&&&&&%&%&&&%---),##!,%&%%%%%%%%%%%%&&%%&&,)%@@#@#=;!!!###,!@@@@#=#=====##@@@)!--&-&-,%!!", "===========;==;=;=;===;=;==;==========#####@#@@#@#@##@@@@@@@@@@@@@@@@@'$...@$.,,),,),,!.$&###=#@#@#=#=#######''==$$$=###'#=!==;=;!;!;;!;!;=;=;!=;=;=;=!=;=!=;==#;@@#,#,)%)-%%%-%-%--&&&&#&&&--&&&%---,@#@)@%,&%%%%%%%%%%%%%&%&&&,!!@@##==;!=#,@!),@#=##@##===#=##,@%-&,&&-%)-&", "=;=====;====;=;====;==;=====;=;=======#####@###@@@@@#@@@@@@@@@@@@@@@@@...$$@.$),)),)@##.###########=#'###'#=====$'@#@#####!==!!!==;=;=;!;;;;;;;;;=;=;=;=;;=!!!!#@@#@,!),,@-%#---%%--)&&&&&-%-&,&,%%---!##!@%&%%%%%%%%%%%&&%&%&&&&-,@@#@=!;!==@@!;#@@@@####=####@#@#)%%&&&%&&&&", "==#=======;=;===;==;#===================####@#@@#@@#@#@@@@@@@@@@@@@@@@#..@$$$.$$,,),@#@.#=####@#####==='##=#=#='$##@###=====!==;=;!!;=;!=;=!====!;=;=====;=;!!=!=@@=#@!!!@,,%@---%-%-&#&#&&-&&&&&---%@@@@@,%&%%%%%%%%%%%%%%%%&&,-,@@@@#@=#,##@@!,@#@#@@@@@=@####@@#%&&&%%%&&&&", "=======;======;==;=;==;===================##@#@@@@#@@@@@@@@@@@@@@@@@@.......$!),),),@...#########==#===''#===#'$#@##=#=#===!;!=!;=;=;=;;!;;!;;===;=;=;=;==!===!!==,#=#@@@@%----%-%--&&&&&&&%-&&&&%-%--%,,#,-%%%%%%%%%%%%%%%%%%&&&-@@@@@@!!)@,@!@@#@!@!;@@@@@@##,@@%,&%%%%%%%%%", "==!=====;============;=======;========!==####@#@@@@@@@@@@@@@@@@@@@@#$.....!..$,),!,,#.@#############'==#=#'##'$=@#@###======;=;!=;!;!;=;;=;=;======;==;=;;=!!!==!=!!#=#@##@-----%%--&%&&&&%%-&&&&&-%---%!@,-&&%%%%%%%%%%%%%%&&&&&%-@@#=@@!,@!!,@@@@;,!)!,@@@@@@#@@-&&%%%%%%%%&", "==============#====#==============#=#=!=====###@@@@@#@@@@@@@@@@@@@.$.......$)!),),)@@.#@@=@@####=###'#=#####'=.$@####====;==!=;;=;=;=;!;;=;=;============;=!=!!!=!!=!###@,@--%----%%!%&&&&&&&&&&%&%-%@,)-)%%&&%%%%%%%%%%%%%%%&&&&&,&),@!),))!!!@@@@),),))@@@@@@@,@,%%%%%%%%%%%", "====;===========;===========;;;======#=======#@@#@@@@@@@@@@@@@@@@@$..$.....!!,),!!@@#,.#########=#=#=#=##=#'=$#@@@####=====;;=;=;=;!;!;!;;;!;=;======#=====;===!!!=!!=,,,##%--------%-&&&&&&&#&&%&&%%%--%,)-%%&%%%%%%%%%%%%%%%&&&&&&!-%),-%,!)@@@#@@),)!)@@#@@@@@@-&%%%%%%%%&&", "===#=======================#===========#==#==##@@#@@@@@@@@@@@@@@,,...!.,.$)$$,#,@),@=$.#=#=###==##==#===#====$@@@@@@@#==;====;=;;=;=;=;!;=;=;;=;=;====#====!!=!==!!!===,#,#%%@#%---%-%&&&#&&&&&&&&%&%-%-%%---&&%%%%%%%%%%%%%%&%&%%%&&-,%,%--),@@@@@@,!@!,@@@#@#@@@,%%%%%%&&&&&", "============================#=#=#==========#=#@#@@@@@@@@@@@@@@@@,!$.$,!.$$,$),@!,,,@..##=##==#@@'#@==####==##.@@@@@@@@=#==;!;=;=;!=;;=;=;;!;=;=;=======#==;=!=!!==####==,#@!)!@%%-%---%&&&&&&&&%%&&&%------%%&&&&%%%%%%%%%%%%%%%%%%&%-%----%!,,@@@@@@!!!@@##@@##@@#@%%%%%%&&&&", "===#===;=======#==;=========#=#==========#=###@#@@@@@@@@@=#@@@#@,).,)!$$)$$!!!%@@@!@..$@#@#@@##'@@##==##=''#@.@@@@@@@@#=====;!;=;=;=;;=;=;=;=;=;;;;=;=;=====!=!=!==#@@#!###@@@@@%-%-%-%&&&#&&&--%,&,%%&%%-----&&%%%%%%%%%%%%%&%%%&&%%%-----%),)!,@@@!!!)@#@#@@@@@@@,-%%%--%&&&", "====#=#==============;==============#======##@@#@@@@#@@@@,!!=@!!!$,.,!),,$$),,!@$#@...$.@#@@''&@+'@###===##=##$@@@@@@@=#==;=;=!;;=;;=;=;=;!;=;=!===;===;=;==;===!==#@@#==#,#@#@)@%%-----&&&&&%-%-&&&%-,%%-%%-&&&&%%%%%%%%%%%%%%%%%%%%%%-%---%-,)),,--%;@@#@@##@@@@@%!-%-%-&&%&", "====#===========;=====;====#===#=====#=#===###@=@@@@@@@@@@'!,!@...,$!!!,)$,!,)@.$#.@$.$#$#@@'@@=@@@=###==#===#$@@@@@@@##====;=;=;==;;=;=;=!=;=!;=;==;========!!==!!=@@#===!##@)@@%%----%--%-----%%,--%%-&,-%&&&&%%%%%%%%%%%%%%%%%%%%%%%-%--,--,%)%---,)@@###@#@@@)-,%)%%%&-&&%", "#==#=================;=========#==#=#====###@@##@@@@=,,,@,!,)!@$..$.,!,),.,)!,)@...#,@.$@###'@@@@@@##==####=#=#$$@@@#@@#=====;=;;=;=;;=;=;;=;=;==;=;==;!!=====!====!=##===,=,,,!@,,--%-------%---&&-%-%%,-%%-&&&&%%%%%%%%%%%%%%%%%%%%%%%--------,%--%!@@@@=@#@@@@---,----&,&'&", "===========;=================#============@##@@@@@,)!!!,@!!!=@@...!)!$$$$!!,,@@#.@##$.$'##&@##@@#@#=###=='=##'##$$=@@@@##====;==;=;=;=;=!=;=;=;=!=======;==;=!=!===!==!=#!!=#@!%@%-----%-%-----%%&%%--%%---%-%&&%%%%%%%%%%%%%%%%%%%%%%%%%--%-%---%--,%!@#@###@,@@@-%-&&&%-&&&&", "======#==========;====;=;===#====#=#======@@#@@@@@!,)!)!!@@@@@@$.@,!!$$$.,!!!@@$.###.=##==#=########@=#####'@=''!.@@@##@#====!=;=;==;=;=;=;=;!;=;=;=;====!=========!====#==!#@@!@@%--%%-%%%-%%%%%%,&-%-%%---%-%%&&%%%%%%%%%%%%%%%%%%%%%%%%---%%-----%,%@,%!-@@),@-&,&&&&)&&&&&", "===========#;=====;===;================#==@@#@@@@!)!!!)!,@@@@#@#@@,)!!$.$$!@,@@$#@##.,'#''#####@########==,##!!!=@$$$.@###==;==;;=;=;=;=;=;=;=;=;=;===;=;=!=;=!=!==!====#@!=@@@%@@%%-,%-,%--%&&&%%&&%,%%%-----%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%---------)%,@)&--)%@%,&,&&&&&%&&&&", "#=====##==#==#==##==========#=#=#=======##@@@@@@!!@),)@@),@@#,##@@!@,)$..,@@#@@#@&@@@.=#####&#########====##@,',+=@#@..####===;==;=;=;=;!!!=;=;=!=;========!====!===!=!=#=!=#@=)@@#@@,),%,-%-&&&&%&&&&,-@-%%--%&%%%%%%%%%%%%%%%%%%%%%%%&,%%--%%%-%-%-%))%-,&&&,@@%&&%&&&&&%&%%", "======#@####=#===#=======#======#=#===##=#@@@@@@),@)!,@@),@@###@@@,@!,!$.,@@@##@#@#@..@,###############==#@@@,)!@@@##=!=$=====;==;==;=;==;=;=;=;=;=;=;======;==!==!==!===@=#=@@@!@#@)!!))%%-&&%&%%%&&&%-@--%-%&&%%%%%%%%%%%%%%%%%%%%%%%%%--%--%%%%%--,,&-&,&&%&&&%&&&&%&&%%%%%", "==!==#@@@@@###======================######@@#@@!!!),)@,!,),@###@@@@@,..!$)!@@@@@#@$.$@#@############@###==#',+,,@##@=#==.#====!!;=;;=;=;=;=!=;==;=;===========!=!==!==!==#!##@@@,@@#,@@@,%-%%,&&&&&&&&%%@%%%--%&%%%%%%%%&&&%%%%%%%%%%%%%&&---%,%%%%--&,,--&&&%%%%%%&&&&&&&%%%%", "====#@@@@@@@@#===============#==#=====##@#@@@@@,),),)))!!)!@@@##@@@@,)$!!,.@%@@@@@.@####@@#@#@#@#######=##@##'!'@@@####=$==#====!=;==!=;==;=;=!=;==;=;======;===!===!!=!!##@=@@@@#@,@@@#!)%-&&&&&&&&&&,,)!),-%%&&&%%&&&&&&&%%%%%%%%%%%%&&&%%&%,,!%%%--%--,&%&%%%%%%&%&&&%%%%%%", "#=#=#@@@@@@@@=#=#==#=============##===#=#@@#@,!)%,),!,!%!!%@@@#@@@@@@$.$$)$!@@&@@@.@##########@#@######==#####@@,@@#@@@.#@=====;=;=!==;==;=!==;===;=======;======!=!=!===!!!!##@@@@@@@@@),,-&&&&&&&&#&&,%),%),%-&&%&%%&&&&&&&%%%%%%%%%%&&&,%%!)%,!,%----%-&%%%%%%%%%%&%%%%&%%%", "=###@@@@@@@#@#####=====#==========#=#=#=#@@@@!),))!%,)!))!,@@@=@@$$$@..$$!.!@@'@@.@@###=####@#@@@@@####===####@@@##@@#$$#====!==!=;====;=!=;===;==;==;=========!=====!!!=#=#=!@@@#######)@)%,&&&&&&&&-,!,)!!!)&-&&%&--%&&&&%%-%%%%%%%&&&%%--%!!,)@)%%&%%--&%%%%%%%%%%%%&%%%&&&", "==@#@@@@#@=#@#=###=======#=##=#===#===#=##@@@!!!,%!)!,),!),@@@#@@@$.$$.!.$..@@@@@$##@#########@########=#=####@#@@##.$..###====!!=;===!==;=;=============#@##==========!=!=!==#@###=###@@)@,-&&&&&&&,%)%)!)),-&&&&-%--%&&&&&%%-%%&%&%&%%&%-%-----,)---%,%%&&&%%%%%%%%%%&&&&%&%", "==###@@@@##=@####==##=========#=======#=##@@),)!!),%)%!%,)),,@@@...$@..,.$@...@@@#.@=##&#,&@############=###@@#@#######==#======;=;=====;===;=;=!=;=;===######=!===!=!=======,!###@##@#@@##,%&&&&&&))%!%!!@,--,&&&&&%&&&&&%%--%-%-%&&&&%,%-)%%---%-%%-----%&%%%%%%%%%&&&&%&&&%", "==##@@@@@###@=#@===#=======#=====#=#=#=####@,!),%!)!,),)),!)!@@@.....$!.....@$@@@@$#@#####=##@#@####=#='##,#@@@##@'''#$##=#====!==!====;==;=============#@#@#@#======!=!===!====#=##@@#@#,@)-&&&&&#%-),-%,@@%%&&&&&%%&&&#&%-%-%%%!-%------%,%,----%%-%%--%%&%%%%%%%%%%&%%&&&&%", "#==##=@@@#==@=###===========#=#=#==#==#####@@,)!),%)!)),%!@@@@@....$$...,,@..'@#=#$=######@#####@#####'###'#@@@##'#='$###=##===!=;=!;==;====;=========#=###=###==========!======###=@@##@##)!%&%&---%!%,@%-%-)%&&&&%&%&&&&%%---,@@)%%%-%-)%!)%@,%-,%--%--&&%%%%%%%%&&-%--&&&&&", "#=######@####@@==#=========#========#==#####@@,!))!),!%!)@@@@@,@$..@..@$.!,,!@@@##.@@####@@#@@#####==#=#=#######=#''.#@###=#======;=======;===========#=@#@#####===========!=!======@@@####,)-%&&&,%,%,&&,&,%&%%%&&&&%%&&&&&-%--%@@-%%---%@!%@)),%)%&-%%&&&&%%%%%%%%&&%%%&&&&&", "#@#@@##@#=##==@#=#===##====#=#==#====#=##@##@@))),),))!!,@@#@@@$.....$@@..,!@@...=$####&#@'=##############==###'==.$$#=##======;===============#=#=====##########=========!=====!==#@@@#@@#@)%$--,)-,--&&&&&&&%%&&%&&%%&&&&&%&%%@,!-%--,%,)@)@)@@,--&&&&&&%&%&%%&%%%--!%---&&&", "@@@@@@#@##=######===##=============#==##=###@@!,@)!)),!)@##,@#@..$.$@.$,.,)!%!,.$.=##@#==@&@@@##=##'=##&===#=##=#..@####=#=======!==============#=#==###@@@#@##@##=====#===!=!=====#@@#=##@@)-%---%,-&&&&%%&&%%&&&&&&&%&&%%&&&%),%!,---%%--@,#),@%,%---%%&%%&&&&&&&%%---%--&&&", "@@@@@##@@@=##@@##====================#=####,###@@@@@@@!@@@##@@@.......$..$!,!.!..$#'#####@=@=##@#@@&'@@##=###=''.@#@##=#=====!==============#=#=#==#==##@@##########======!=======!#=@#,#!@#)%-%--@@-&%%%%%%%%%%%%%%&&&&&&&&&,&--,@-%--,%!)-!@@@@@@,%%--%&&&&%&&&&&&-&-%%-&-,&", "@@@@@##@#@=##@###====#====#=####==#==##==##@####@)!@@@@!@@@@@@@$..@$.....@,),!..#.#@=####@######@#''',@@@@#==#'$@#@@#####======!==!=====;======###=#=#=#@@##@########======!====#==!==##,#@@@%-----#%%%%%%%%%%%%%%%%&&&%&&&%&&,---%--%--,%--%@,@@@@!,@%%)&&%&%%%&&&&&--%),-%-&", "=@@#@@@##@###@##=#=#==============#===#=#=###@##@!,@@@@!@@@@@@@.$.$,...,!@!,)$!...$##&=#=@###&#&#@'''+@#@#####'.@#####==#======!==;=;=======#==##===#=##@@@####@#####==;=====!========##@@@,@%%%%-@#%&%%%%%%%%%%%%%&&&&&&&&&%%-%--%,-%----,--!,@@@#@!!@,),&&%%&&&%&&%-%-)%)%-&", "=##=@@#@@###@@@#=#=======#============#=#=###@@@@!!),!@,@@@@=#@$.....!.,..),,)$.$..##@'#=######@@@&!,'@@###@#$=@#@###=#=========;====;========##=###=#=#@@@@@@@#@@##=#==!=;===!===!!==##@@@@,!-,%-%%-%&%%%%%%%%%%%%%%&&&&&&&-%-%%,-&,---%%%),-)@@@@#@@),),-&&&&&&%%%#&---,%!--", "##@=@####==##@###=#==#==#=##=#=#==#=====#=##,#@@@#@@,@),===@@@@.....$!$.$.!!!@.@#$..###=###@##,@!!!@@#@@#@=##.#@@####=#======;==!=;==========#==#==######@@@@@@@@#@####========!====!=###=@@!@)%,--!%&%%%%%%%%%%%%%&%&%&&%%&%%-,%%-%&%-%--%!%!,@!!@@@@@)!!&-%%%%%&&%%&---),%!%", "##@##@#@##==#@#@=#=====#====#====#===#=#=###=####@=###@@#@@@@,@$.....!.,.,,)!..@@,=''#####@###&,@@#@@@#@###@=$@#####=#=========!========#===#=######=#=##@@@@@@@@@@#@@###===!==!===#==#=###@,@,!%-!@-&&%%%%%%%%%%%%%%&%&%&&&&%-%%%)%,&%%%%%,!!)@#)@@@@@@@,-%&&%&&%-%%%%,%,--%!", "=#@##@##@#####=###=====#=====#====#===#==####=#=######@@#@@@@,@@!...$..!..!,..,@###,+#####@###')@@@##@#@#=##.$#@@####======!=========#=#=#=#====#=####=##@@@@@@@@@@@##@#====!====!==!=#=#@@@!@%-,-)@&&&%%%%%%%%%%%%%%&&-'%&#&&%-!%%---%-%@)%),@@@@@@@@@@@@%-&&&%-%-)%-%,%%----", "=####@@#@=######====#==#=#==#=#=#====#===#==#=##==###@@@@@@@@@@@$!,...$...,.!@@.###@####@####@#'&,@######@=##.#####==#=============#==#=#=#==#=#=###=##=##@#@@@@@@@@@#@@###======!======#@#@@,)-%-@@,&&&&&%%%%%%%%%&%%&&&&&&&&,-%,,-%%%-,%,@@@@,@@@@@@@@%-,-&&&&----&%,%!-%---", "##@@#@#@####@###=#=#===#==========#==#=#=#===#####@@#@@@@@@@,,!,..!...$...!$!@..$...###########'@@@@#####==#$=@#####=#=============#=====#=#===##=###=#==###@@@@@@@@@@@@@@@==!=====!!====#@##)!%,-)@@-&&%%%%%%%%%%&%&%-&&&&&&%&,%-%#,%%---)%@@@,!,,@@@-)---&%%-%%--%,!--%-----", "@@@@@@#@#=#=#=#=#=###====###=##=#=#==#==,##==###@=@###@@@@@@=!,.....$..!....,@...$..'@=####@@@@@@@#####=#===.#####======#======#=##=#####=#=##==###==#=#==###@@@@@@@@@@@@@@#=====!!======#@@#@,)---,@&&&&&&%%%%%%%%%---&&&&&&&%&&&&,%-%--%!,!!@@@!!,@@%-%-%--%%-%%-,-------%--", "#@##@@@#=#=@#=#====##==#==#====#=====#=#==#==#####@#@@@@@@@@@@@.@$...,.!.....@@@='=$'######@@@@#@@#@###$#='=$#@#=#========#====#=###==##=#===#=#==##===#===##@@@@@@@@@@@@@@#=======;==!=#@@@@@%,!-,%@%%%%&%%%%%%%%%%%%%%%&&&&&%%&&,%,%---,-@@!%!%!%)%!)%&&%%-%--%,)%---%------", "#@#@@@####=#@=#=##=#=====#=#=#=#=##==#=#==##=##=##@##@@@@@@@@@@@@.$....$!$!.=.@@@#@###@=####@@@@@#@###$'$'==.######=#===========###=###===#===##=##=#=##=##=#@@@@@@@@@@@@@'@##!===#=!==!=#@@,@,#@-)!@-&-%%&&%%%%%%%%%&),)%&&%%%%&&&-%,------%-----,%,-%,,&---%%),),%%--%%%%-%%", "@@@@@@##@=@@#=@#=====#===##=#===#=#=#=#==#=##########@@@@@@@@@@@@@..@$....,.,.'@####@##@#@##@#@##@=##.$.$=.$=@#==###======#======###==#=#=====##==#=#=====#==##@@@@@@@@@@@!!@@#===!=!==!=@###@%@)-)@@--&%&&%&%%&%&%%%&%-%-&&%%%%%&&---%-%%%-%)%-----%,,%-%--,!,@@)),,%,%,%%%--", "@###@##@##@@@###@##===#==#=#=#==#=#===#===######@###@#@@@@@@@@@@@$...@...!!....$$.$#.###############===''..#@=##===#=========#==#=#=#=#==#=#==#=#=#=#=====######@@@@@@@@@@==!)@==#=#===;!!#@#@-@,))!@%-&%&%%&%&%%%%%&&%-%-&&%%%%&%&-%%%--,%----%,,--%@%%------%@,!)%),%!!-%%%-", "@@@@##@@@=@@@#==@####====##=#===#===#==#==#==##=@@#@@#@@@@@@@@@@..$..$@...@!.....@.$#@@####@####@#@##===.@@#####=#=#============###=#=###==#==#===###==##=##=###@@@@@@@@@@@!;,##========#=#,#-),)@#-,%--%&&%%%&&%&&%%&&,&%&%%%%%%&%--%&-%!%---%--&%---%-%%%%--),@,!),%-,%,----", "@@#@=#@@@##@@@@###=#=###===#====##=#=#=#==#==####@#@##@@@@@@@#@@$..@@..@.@@....$#.#.#=@#@@##@#####'@#=$#@#@=###=#=#=====#=#=#=#==##==###==#==#=##=#=#=##=#=#==#==@@@@@@@@@@@@!=@@@@==#==!;#@,,-!!#@,@,%-%&&%%%%%%%&&&&&&%-&%&&%%&&&%----%%)%---%--&-%,%--%,%,%)))%,!%)--%),%%-", "@@#@=#@@@@@@';@@@@###====#==##==#=#=#===#=##==#########@#####@@#@..@@@$.$@..!...#########@####@####=#.@@#@#@=##=#=#=========#====#=#==##==#==#==##=###=###=##=##=#@@@@@@@@@@@@!,!!@@===#!#==#,!@,#@,@,%--&&&%%%%%%%&&&&&%%%&&&&&&%%%---,,)%-%%---%&-%&--%)),))%,!,--)%--,%-%--", "@@@@#@@@@@=;;!!;@@@#####====#==#=#=#==#====#=##=#@####@#####@##@.#.@@$...$..'...#..#@#@####@########.#@@###=##===============#===##=###=##=#==##===######==#=#=###@@@@@@@@@@@@@@@=@@##=#!=,=@;!)@,@-@)!--&&&%%%%%%%&%&&&%-%&&&&&&%---%-%%-----%---%,-----%,),!%)--&,-&-%,,&%-&", "@#@@#@@@@@;!!!;=@@##@=##=======#=#==#==#@=#==###=###@######=##@@.$#.$....@..@.$..=$####@######@#####$##@@###=#=#=#=====#==#====#=###=###==##=====###@@#####=##=#=#=@@@@@@@@@@@@@@=@@##=#===,#!!@%@--@,%-%%&&%%%%%%%%&%&&&--%%&&&&%%---%@%-----%%%%%&&%%--)%--)%,%--&&&&&&&-%%-", "@@@@=@@@'=!!;!!@;@@##@=##==#=#==#=#==#=##=##==#=######@###=#####..@...$=.$.@@..=#=#$######@########=.#@######===============#=#=###=###=######==#=#==@@=###=#=#####=##@@@@@@@@@@@@@@@@=##===#@@!,)%,@),!-&&&&&&%%%%%%%%&&&&&&&%-%-%%%-%!@%--%-%%-&%-%%--%-,%,,%-%%&&,&%,&&&-%%", "@#@>'@!!!,)!)!;!=;=@####=#=#=#=#===##=#=#==#=====##############@###$.$....@#@##@=#$=#######@######=#$@@@@####=#========#======#==###=####==#==#===##@@#@####=#=###=#@#@@@@@@@@@@@@@@@@#=#==###@)!-),)@@%-%%&&&&&%%%&%%&&&&&&&&&%--%%,,)%-%--%---&-%-%--%,,%-%,&&&&&&%#&&&&-&&&", "#@@@=@!;)!)!),!)!!@@@@=#=##=#==#=#=#=#=#==##=#=##=############@#@@#......#.@#####,$##@=#@##########.$#@#####====#======#====#=#########=#=##==#=##=####=##@=##=#####=##@@@@@@@@@@@@@@@#==#===,#!-!%),@@!---%%&&&%%&&%&&&&&&,#&&%%--%-%!!%%%-%%%%%%&&%%%--%-%%&&&&&&&&&&&&%&&&&", "@@@@!@!!,),,)%!!)!@@@@##==##=#==#=#=#===#=#=##=##==#######=#=#@##@@#..@#.#.#@##=##$#=######@##@#@#=#.#@#@#####=========#=====#=#=#######=####==#=#==@@##@###=##=#=####@@@@@@@@@@@@@@@###=#==#,@@-!%-,#@%---%%&&&&&&&&&&&#&&&%)%%%-----,),)%%%--&,&&-,@%%%-,%&&&&&&&&&&&%%&&&&-", "@@@!!,@)!))!),))@,@@@@@==#=#=###=#=#=#=#=#==##=#=###=###########@@....#@.$.####&==.#@=##@##@#########$@@####=#============#=#=######=########=#=###=####=@###@#$######@@@@@@@@@@@@@@@@##=!====#@!%)-%!#@%---%--%&&&&&%-&&&&&,-%-%-%&-%@!)),%--%%&-&&--,,-%&%&%&&%&%%&&&&-&&,-%", ",@@),),@!%!,!%)!!!@#@#####=#==#=#=####=#=##=##=#=###===#=####@###$...$@@@..#####'=$#=@####@###@####=#.#@@###=#=========#==#=##=#=########=###==##=###$$#.$$#.#=.#.$#..#@@@@@@@@@@#@@@#@=#=#=###))---%@@%------%-&&&&&%-&&&&&%-%-%,%%-,@)!,)%&%%&%%&&%&&%-,&&&%%%&&%&%&--&&-&%-", "-@@@!!)@,)),),)),)@@#=#####=#==#=#=##=#==##==#=#####====#@=#=@##@#...@@#@...#$.##=.=############=###=$#######===#===#==#=###=#=#########@#######=####=$.$.....$==.....@###@@@@@@@##@@###====#=@@!---,@@!%%-%%---%&&%-&-%&&&,--&&%%--%@@@,@@,-,-&%&&%,&-,&-&&&%&&%&&&&-%%&&%---", "!,@@!),!@!%,)!%!!!#@@=#####==#=##=###=##=####==###==##=#=#####@##..$#@@#$..##@...$$###=##@'@####=#..$.$@###=##=========#=#=##=#########@#####==#=#=@##$.#==!...#==..$.#@##@@@@@@#####@###==#=#@@@!-%@@@),%%%%-%-%-&&------&&&-%&&%--%)@!%@#@--,&&&&%%&%&&&%&%&%&%&&&&&&&&----!", "),@@%,)!,)),),!)!,@@=#####=#=#=#==#=#==##==##==#=#===#==######@#@@@..@@$..$..$.#..$$##@@@''#@#@@@@##..@#@#@==#==#=#=#=#==#=#==#########@@#####=#=##=#=..==#$#.$!,#!$=..=####=###@########====#@#@%--!#@@!)!%%-------%@%@!&--&&%&&&-%)@@@;,@#%-%&&&%%&%&-&&-&&&%%%&&&%&&&&&-%%!", "-%!@)!!%!!%!!%,))!#@####=#####==#=#==#==#===#=##=##==##==#@#####@@..........@...#.#..#@''@@##@'@@#@#=#.@@####=#==##===#=#==###########@@@@@@###=#=.$.#..$=......='=.$#######=###=###@###==#=,#@#@)---!),@!,%%%%---%--!%@@)&-&&&&&&,-,!)@--%@-%-&&&&&&%&&&&&&&&&&&&&&&&%%---,))", "--!,@,)!),!),)!),!@@########=#=#=##=#===#==#=##=##===##=########@@.......#.......$@#.#@''@@@#@'#@=,=='.#####=###=#=#=#=##=#==#######@@@@@@###=#=#=$....=.=$..='$=,$.########=######@###=,#=######!,%),,)!%-)----%---%,@@@@%--&&&&&,%%))-),!,%!-&&%&&&&%&&%%&&&-%&&%-&&,--%%!!@", "--%@@,),%!,)),%!!@@#@#=######=###=#==##=#==#==#==#=###==####@#@###...@...$..#.@.$.=#$..$.....$$+.##=,=!$@##@=#=#=#=#==#=##=#=########@@@@@#@#=#=##=.....=.#.=....$####@####===########=#====###@#@!)!))!))!@--%--%--%---%,-%%&&&&&,)-%,@%-!@%,,&#&&&%%&&%&&%&&&%-%&$%&&--,#,@@", "))-%@%,)!,)%,!),)@@@@#=#####==##====#==#=#===#####==####=#=#####=@#..@..@.......####=@==#=####,'#..$===.=@=###=##=#==#==#==#=###@###@@@@@@@######=#....==##.#...$##@@@@####=######==###==#,=###@#@,@,!,!,,,#&--%--%-%&-%%--%,&,&&&&%--%-@-%@%)%%&%&&&%&%&%&%&%&&&&%%%-&&--%@##", "%---,)!,),!!%,))!)@@####=#########===#=#=##===####=#==!###=#######@@#.#..#$.....@.@#=@'=,#,##@'@#=$,...=$#@=#=#=#==#=#==#==##@#@#@#@@@@@@@@#=====###...#@##.#..###@#@@@@########=#=####==##=#,###@@@@!)!))%%%--%----%%---,&-&&#&&,&&-%-%%--)),%,&&%&&&%%&&&&&&%%--%%&%%--####@", "-)---!%!),)%!!,%,)@;##=########=#========#=###===#=#=#==##==####@#@#$.@@###$#@###.#####==,=#@',@#=.#@.....####===#=#=#=##=###@@@#@@@@@@@@@@#####=##=########.####=###@@@##===#####=#############@@@@@@@@,)),-%%--%----%--%%&%&-&&&&,--%%-%%,-,%-%%&&&&&&%&&&&%&&&&&,--%%#####@", ",)%-),@@,!,%--!)!!!!#@==##=####=##=#=#=#==#==#=###=##==###=##@##@###@@@@.@.$@.$...##&##==,###!'#.=$$@@@#$@#@=#=#===#=#====#@@@@#@@@@@@@@@@@##==#=############=@###@#@@@#@#####=#==#=#####@#####@@@@@@@@@)-)%,%%#%-%-%&&%--%&-&&#&&&%&-%%--%&&-%-%-%%&&&&&&&%&%-&&&&&)%@@####@@", "!---%!@@%!)!--,),!)=@=@#@#####==##===#=#=#=#=#=##=#=###==##=########@@@@@@#.$.....$..$$.,'#@+,..@.$.@@.@@@##@##=#===#====##@@@@#@@@@@@@@@@#####=#=#=#####=###@#@@@##@@@####=##=####=##@###@##@@#@@@@@@@@@,!,%,@#-%--%%&&&&&&&%%-&,&%,%-%%-%%,-&&&%&&&%&&&&&&&%&&,,)&-,)@#,@###", "%%-)!,@@!!%,)%,))!@@#@==@#==####=#===##==###=#=#######@#==#####@#@####@##@.=.$@.$...$..@###,...@@@.=.$..@@####==#==#=#=#####@@@@@@@@@@@@@@@@####=############@#@@@@#@@@#=####@@@@###@@@@@@#@@#@@@@@@@@@@@))!)%&,%-%-&&#&&&&&&&&&%%-&%&&%&,&%&#&&&&%&&&&&&&&#&&&&%----,@,####@@", "---,,@@@%!),),),,,@@@@@#@=######==#==#=#=#=#######@=####=##=#####=##...@@#.$.....$.#==#=.#,....$$$####@..@@###@#=#=#=#==####@@@@@@@@@@@@#@#####=#=########,#@@@@#@@###@####=##@@@@@@@@@@@@@@@@@@@@@@@@@@@),)!@@@@--&,&&&&,&#&&&&)--&&&&,&&&,&&&#&&&&&&&&&&&&%-)-%--)!##@####@!", "%-%,%@@@!%!)%,))),@@@#@=@####=###=##======#=###=################@@###..##@@.......@##,..@$..==...##=#@'$#$#@=#=#==#==#=##@#@@#@@@@@@@@@#@#@@######=###=#=#@#!@@!@####@#@=#=###@@@@@@@@@@@@@@@@@@@@@@,@@@@@),!@@@@%%---%,&&&&&&&&%%&&&&&&&&-*&*&&&-&&&#&,&&&&%%---),@###=##@@!@", "!-,),@@@)!,%!%),),@@=@=######=##=##==###====#=#=##########=##=####@##....@@@....##.@#.@@@.#.!.'.@=@##''.#.@#@###=#=#=####@#@@@@@@@@#@##@#@##@##=####=##=###@@@!@##=##@@###==##@@@@@@@@#,,!@@@@@@@@@@,!@@,!,)!-@@,@!%%---&&#&&#%&%%%,&#&,&&@&-&&&&&%&&&-%-&,*---%,))!@####@@@@@", "---)@@@@,)),)!%!,)=@@@=#=#######=##=====#==##=#=#=@#@#@######=########.#......@..$#.$@@$.#.@@.@'@,#=,=@.$$#@######=#=###@@@@@@@@@@@@#@@#@#@@####=#=#####=##@@@=@#=@@#@@##@==#@@=,@,,,!@@!,@@=@!,!!,@@,@@%!!!!,,@,@)-,)%%-&&&&&&&%-&&%@-&,&%---%&&-&&%---%----,%-)@@,#####@@@@@", "-%!@@!!),),%!,))!!@,@@@######@####====#=#==#@#######@###@####==#####@####$..@.......$$$###.@@$#'####@@@.#@@#@#####=######@@@@@@@@@@#@#@#@#@########=#=#=##@;@@@,@=##@#@####==@@!!!!)!)!@@@@@@@@!),)!,@@@@@@)!)>@,@!,%%!)-&-&&&&&&%-%)%)&----&&&&&&%&'------%%@%!@##@#####@@@@@", "-!%,@!),%!!)%!%,)!@@@@@@#######=#==#=##=========@##=@@###@##@########@##.#@...$..$.@..#@#=$@@$@'@#.$#@@$.$$@@#####=######@@@@@@@@@#@##@#@#@###=#=##=#=####@@@@!,###@@@@@=#@####!!!!!!),@@@@@@@!)!),)!!!,!@@@@@!,#@---,%%--&%#&&&&&&%)%@-%&%--&--%--%--%-----,)#!!#####@#@@@@@@", "-,)!@),!!),)!)!)!!,@!@@=####@#######===#=#====######@##@@@#########@#@#@##$.#$......@$@###.@@.@...@.@@@.@#.@#@######@@@#@@@@@#@#@@#@#@#@#@#@######=#=#=#=@@@@@@@###@@@@###@==#@@)!),)!!@@@@@@@,!!,@@@,)),@@@@@@@@%----%%,%,&&&&&&&&)-),%-,%%%--%--%)%)%)%%!)#,@@,##@######@@@@", "-!%@@@@!!%!%!%!%)!!@=@##########@####=######=====####@#@#@@###==#####@####...@.....@..=@#=$@@@@@@@..@'@.@#$#@@@@@####@#@#@@@#@@#@@@##@#@#@#@###=#=#=#=#=#@@@@@@@@###@@@@=#####@@@)!!%,#@@@@,@!%!)%@@@@),,@@@@@@@!%--------!&&#&&-%-&--!@--)%---%%-,!)!,@@@@#@##########@@@@@@@", ")-,@#@@)!!),)!),!))!@@@@#=@#=#=@######===#######===##@#@###########@###@@....$..$....#@@#=$@$$@@@$$##@@.'@=$@@@#@@@@@@@@@@@#@@#@#@####@@#@#####=#=#=#=###@@@@@,@####@#@#@####@@@@@@!))@@,@,!,!@!,@@@@,)@@@@@@@@@@,),----%--%&&&&-%%---%@@,-%,----%),@@@@#,#########@@@@@@@@@@@", ",-%@@@@,!%!!%,)),!,!@@@#==@#=######=#=##===###==#=####@#@@###==###=@#@###=#...$..$.@.@=@##...@@@$#@#@@#.'##=.@@@@@@@@@@@@@@@#@@@#@@###@@#@###=#=#=####=##@@@@@@@#####@#@#@#@##@@@@@@@@),!@@),))!)@@@@@@@@@@@@@@@@%,%---------&--%-%-%-!@@@!%%%%,)%@),@@@######=######@@@@@@@@@", "!)!@@@@!!!%!!),%)))!@@@@=###=####@@########=====#=#=##@@#@@##########@#@#@#$...=.....$..@@.$..$@@@#@#@@.'@#@..@@@@@@#@@@@#@#@@#@#@####@#@###=#==#=#=#####@@@@@=##==############@@#@@@@)!)@@)!!@@@%)!@@@@,@@@@#,@@@@,%%%%----%%%%--%%!!%@@,,)!)!!@@@@,@@######@#####@#@@@@@@@@@", "!!@@@@@!),)!%!),!!!!=!;@###############==#=#=#=#===####@@#@#@@@@#@@##@####=#.......$.....@....@.##@@###$#@##@$@@@@@@@@@@@@@@@@#@@@@###@#@###==#=#=#=#=####@@@,!;####@@########@@@@!@)!,))@@@!!%@@@,)@,!!,,,,@@,,@,@@,)%%%%--&------%))#@@@,@)!,%#@#@########,=####@@@@@@@@@@@@", ")%@@@@@@!!),),)))!)!);@@##==#@###@####=#=####===##=####@@@@#@##@#@####@#@###$.=...#.......@$.@@.@@@#@#=$@=##@#$$@@@@@@@@@@@@#@@#@##@###@####=#=#=#=#######@#@!@##==#@#####=#@#!!!,),,)!,!%!),)!@@@),!),)),!!@,!@,@@@!,),%#%------%@@@@@@@@,@@@@@@@@##########@@@#@@!,#@@#@@@@@", ",@@@@@@@@),)),!!%,!@!=@@@@##=#####=###==####====#==#=##@@@@#@@@#@@#@########...=.@$.....$#$.@$@..@@@@#@$####=@#$$@@@@@@@@@@@@@#@@@##@##@##=#=#==#==##=####=@@!!@##=##@#=###,@@!)@@@,@)!)!!%,!)!%)@@)!!!!)!)!,),@,@@@@),%,%--%--%-%,,@@@@@@@@@@@@@@@@#####=#=#=#@@@!,@@#@@@@@@@", "!@!-,!,@@,@,),%!)!)@,!@@@###=##@#@#####=######==#=##=##@@@@#@#@#@#@#############@..#.......$.@@$.@$@@@#$@####=@#@$$@@@@@@@@@@@@#@#####@=###=#=####=#######@@@@)@##=##@##=#=##@!!#@@),!%!))),)),@!@@!!)!@!%!)!)),),@@@!!!%,%-%%%%)!@@@@@@#@@#@@@@###########@###@@@!'@@@@@@@#@#", ",@,-!,@@@!@,))!),)!@)=@@@###=############=#==##====#=#=@@@@###@@#@@@@@#@######@##@.@..@.'....@.$.$.$@#@.###=@#=##@$@@@@@@@@@@@@###@##@#@##==##==#####=##@##@!,@###==#@######@@@@!@@@!@)!,,!%),),,@@@,!,@),)%!!!))!,@,@)!%,%-,,!!,,@@@@@@#@#@###=####@#=###@@#@@@!,@!#@@@@#@@#@", ")@!!@@@@@@@@,),)),@@!!@@@#=###=##@##=#@@#=###=#=#==###=@@@@@@##@#@@@##@@#########$@#$....$..$.#.....$$@.##===##=@##@$@@@@@@@@##@@####=###=#=#=#=#########@@))!@##=#=#@#####@)##@@#@!)!,%))!,),))!@@@))!))!!)%!!),)!)@@,!)),%)!,@@@@@@@@@@@###########=###@@#@@!@@@@@@@@@@@@@#@", "@@@@,,@@@@),)!%),)@!,@;'@#####=##=#####@##=@#=#=====#=#@@@@@@@######@#@@@##@#@######.$..#....$..#.@$..#.######=#=#'@$$@@@@@@@@##=#@###@#=##############@##@@)!@#############!,#@@@,!!)!!,%!%!),))),@@)),)%!!)%!!,),@@@@!,)!!,@@@@@@@@@@@@#@##@##########@#@@!;,@@@@@@@@@#@#@#@", "@@@@!,!,!,!!,)),)!!),@@@@#=#=#=#=#=########@@===#=#=####@@@@@@#@####@#@@@@@####@#@#..$....$....@#@@..=@.@#########@=+@@$$$$$@@#@@@#@@@=####==#=########@#@@@,!@@,##=######=@=@@@@@@%!,)%!,!)!,@!,),@@,,),)),)!))),)@@@@,)),)!@@@@@@@@@@@@########@##@##@#@@@@!!!@@@@@##@@#@#@#", "@@@!)))!!)!),))!%,)!,@@@#####=##=####=#########===######@@@@@@######@#@@@######=####.#=.....$#.$#.#.@,#.####==#=#=#@=@@@@@#$@@.$$@$$@@#=####=#######@#####@),@@##########=###@@@@@@))!),))%!!%@@!!!,!)!%!))),),!!@!#@@@@,!)!,@@@@@@@@@@#@############@##@@@,!),,@@@@@@@#@#@#@@", "@@@!,!%!%!))!!,)!))!,@@@#@##@=##=######@#=@###=##=#=##=##@@@@@##@####@@@@@@@###########....#.$'....$@...@.$.$#.####@'@@#@@$@@#$..$.@@##@#@####@@@@##@#@@#@!!!#@@@#@###@#####@@@@!,@!!))!%,)!),!))@@)!,),),,!%),),@@@@@@@@@@@!@@@@@@@@@@@#@@#####=#@#@@@@!,!),@)@@@@@#@#@##@###", "@@@%)!,)!%!,)%!),)!!,@@@#@#@##############=@####=#=#=######@@@@@##@@#@@@@@@##########@#..$....@@.$#......$.......$.'''=..@.@@@.@@@@@@@#@#@@######@#####@#@@,@@@@@@!#@####@@@!!!@!),@),!!!),%),!@!,@!))!!%,!),))!,@@@@@@@@@@@@@@@@@@@@@@#@#@####=###@=@@!!)@@,@@@@@@#@##@#@@@#@", ",@,,)))),!%)!!)))!@@@@@@@@=########@###=#######@######==#####@@@@##@@@@@@@@@########=#@###...$.@.#$.$...=.$##=#,$..,.$.@@@@@@@@@@@@@!@@@@#@#@@@@#@#@#@###@@),#@,@@!@###@#@@@#,!)@@@%,))%!,),)),)%)!,%,),))%)),!)@@@@@##@@@@@@@@@@@@@@@@@@@@@##@###=#@#@,),@@@@@@@@#@#@@#@@#@##", "@@@),,),),),)%!!,@!!,@@@#@#################@##=@#=#####==####@@@@@####@@@@@@@##==####=#@##..$.@..@.@..@.$@..@@$=.#@.@@@@@@@@#@@@#;!!!'=@@@@@##@@@@#@#@###@@!,)@,@@@@@#####@@@)!,%@@@,!@!@@!!,@@),))!%!)%!,!,!)!!,@@@##@#@@@@@@@@@@@@@@@@@##@###,@@@#@@!;!@,@@@@@@@#@#@#@#@#@##", "@@,!%),)%))@@,,))@!!,@@@#@=#@@##############@=#@##=##=#==####@@@#@#@#@@@@@@@##=#=#=#########..##...$$...$.$...##$@@@=@@@@@=,@@#,)!,;!@#@@@@@@@@@#@@#@#@#@#@)!,),@@@@@@@#@@#@@,!)!@@@,,@,@@@@@#,@!%),---,)%!)%!)@@@@#@@@#@@@@@@@@@@@@@@@@@#####@@=@@@,@@!!@@@@@@@@#@#@#@@#@####", "@@),),)!!,!@@),),@);!@@@#@#=@#=###@#############@###=######=##@@@@@@##@#@@@@@###=##=###@#@###@@@@...$@.....@@@$.=@@@@@@@@@+,@@@)!!)!!=@@@@@@@@@@@@@#@#@##@@)!),@,!,)@##@@@@@!),!!@@@@,@@@@@@@@)@@,!%,-)%,)),!,@@@@@#@#@@@@@@@@@@@@@@#@@@@@##=##@@@@@@@@@@@@#@@@#@@@@#@#@#@#@##", "@@,)!)),),),@!),!!@@@@@@#@#=##@###@##=#=###########@####@#####@#@@@@#@##@@@######=####==##@##@#@#@.$....#.$#@@@###@@@@@@@@@@@@@!)!!)!!@@@@@@@@@@@@@@#@#@#@,;,)@#@,),!@!),),!)!)!)!@@@@@@@@@@@@!)@!%)%-%)!),)),!@@@@@@@@@@@@@@@@@@@@#@#@########@@@@@@@@@@@@@#@#@@#@#@#@#@#####", "@@!!!,)!)),!@@!)@,@@@@#@#@####@#@#@@######@#############@@@@######@@#@####@#######=#######@####@#@#.$@$@....#@.@@@=##@@!#=@@@@,!)!!!!@@@@@@@@@@@@@@@@#@#@#,!)),@),)!)!!,)!!)!!,@@@@@@@@@@@@#@@@,!),!%--,),!,!),@@@@@@@@@@@@@@@@@@#@#@###@####@@@!=#@@@@@@##@@@@#@#@##@#####@##"}; gtkextra-3.2.0/gtkextra/testgtkplotdt.in0000644000076400001440000003473112603754176015406 0000000000000018.00 3045 18.00 3055.07 18.00 3065.04 18.00 3075.05 18.00 3085.03 18.00 3095.06 18.00 3105.06 18.00 3115.03 18.00 3125.06 18.00 3135.06 18.00 3145.01 18.00 3155.05 18.00 3165.05 18.00 3175.02 18.00 3185.05 18.00 3195.05 18.00 3205.02 18.00 3215.05 18.00 3225.05 18.00 3235.02 18.00 3245.07 18.00 3255.01 18.00 3265.02 18.00 3275 18.00 3285.05 18.00 3295.06 18.00 3305.04 18.00 3315.09 18.00 3325.01 18.00 3335.03 18.00 3345.05 18.00 3355.04 18.00 3365.08 18.00 3370 18.00 3375.01 18.00 3380.09 18.00 3385.08 18.00 3390.05 18.00 3395.02 18.00 3400.08 18.00 3405.03 18.00 3410.06 18.00 3415.09 18.00 3420.02 18.00 3425.1 18.00 3430.06 18.00 3435.01 18.00 3440.05 18.00 3445.09 18.00 3450.02 18.00 3455.04 18.00 3460.05 18.00 3465.06 18.00 3470.06 18.00 3480.02 18.00 3490.06 18.00 3500.06 18.00 3510.03 18.00 3520.06 18.00 3530.06 18.00 3540.03 18.00 3550.06 18.00 3560.06 18.00 3570.03 18.00 3580.05 18.00 3590.05 18.00 3600.01 18.00 3610.03 18.00 3620.04 18.00 3630.05 18.00 3640.02 18.00 3650.05 19.50 3055.07 19.50 3065.04 19.50 3075.05 19.50 3085.03 19.50 3095.06 19.50 3105.06 19.50 3115.03 19.50 3125.06 19.50 3135.06 19.50 3145.01 19.50 3155.05 19.50 3165.05 19.50 3175.02 19.50 3185.05 19.50 3195.05 19.50 3205.02 19.50 3215.05 19.50 3225.05 19.50 3235.02 19.50 3245.07 19.50 3255.01 19.50 3265.02 19.50 3275 19.50 3285.05 19.50 3295.06 19.50 3305.04 19.50 3315.09 19.50 3325.01 19.50 3335.03 19.50 3345.05 19.50 3355.04 19.50 3365.08 19.50 3370 19.50 3375.01 19.50 3380.09 19.50 3385.08 19.50 3390.05 19.50 3395.02 19.50 3400.08 19.50 3405.03 19.50 3410.06 19.50 3415.09 19.50 3420.02 19.50 3425.1 19.50 3430.06 19.50 3435.01 19.50 3440.05 19.50 3445.09 19.50 3450.02 19.50 3455.04 19.50 3460.05 19.50 3465.06 19.50 3470.06 19.50 3480.02 19.50 3490.06 19.50 3500.06 19.50 3510.03 19.50 3520.06 19.50 3530.06 19.50 3540.03 19.50 3550.06 19.50 3560.06 19.50 3570.03 19.50 3580.05 19.50 3590.05 19.50 3600.01 19.50 3610.03 19.50 3620.04 19.50 3630.05 19.50 3640.02 19.50 3650.05 20.00 2995.09 20.00 3005.02 20.00 3015.01 20.00 3025.07 20.00 3035.01 20.00 3045 20.00 3055.07 20.00 3065.04 20.00 3075.05 20.00 3085.03 20.00 3095.06 20.00 3105.06 20.00 3115.03 20.00 3125.06 20.00 3135.06 20.00 3145.01 20.00 3155.05 20.00 3165.05 20.00 3175.02 20.00 3185.05 20.00 3195.05 20.00 3205.02 20.00 3215.05 20.00 3225.05 20.00 3235.02 20.00 3245.07 20.00 3255.01 20.00 3265.02 20.00 3275 20.00 3285.05 20.00 3295.06 20.00 3305.04 20.00 3315.09 20.00 3325.01 20.00 3335.03 20.00 3345.05 20.00 3355.04 20.00 3365.08 20.00 3370 20.00 3375.01 20.00 3380.09 20.00 3385.08 20.00 3390.05 20.00 3395.02 20.00 3400.08 20.00 3405.03 20.00 3410.06 20.00 3415.09 20.00 3420.02 20.00 3425.1 20.00 3430.06 20.00 3435.01 20.00 3440.05 20.00 3445.09 20.00 3450.02 20.00 3455.04 20.00 3460.05 20.00 3465.06 20.00 3470.06 20.00 3480.02 20.00 3490.06 20.00 3500.06 20.00 3510.03 20.00 3520.06 20.00 3530.06 20.00 3540.03 20.00 3550.06 20.00 3560.06 20.00 3570.03 20.00 3580.05 20.00 3590.05 20.00 3600.01 20.00 3610.03 20.00 3620.04 20.00 3630.05 20.00 3640.02 20.00 3650.05 20.25 2995.09 20.25 3005.02 20.25 3015.01 20.25 3025.07 20.25 3035.01 20.25 3045 20.25 3055.07 20.25 3065.04 20.25 3075.05 20.25 3085.03 20.25 3095.06 20.25 3105.06 20.25 3115.03 20.25 3125.06 20.25 3135.06 20.25 3145.01 20.25 3155.05 20.25 3165.05 20.25 3175.02 20.25 3185.05 20.25 3195.05 20.25 3205.02 20.25 3215.05 20.25 3225.05 20.25 3235.02 20.25 3245.07 20.25 3255.01 20.25 3265.02 20.25 3275 20.25 3285.05 20.25 3295.06 20.25 3305.04 20.25 3315.09 20.25 3325.01 20.25 3335.03 20.25 3345.05 20.25 3355.04 20.25 3365.08 20.25 3370 20.25 3375.01 20.25 3380.09 20.25 3385.08 20.25 3390.05 20.25 3395.02 20.25 3400.08 20.25 3405.03 20.25 3410.06 20.25 3415.09 20.25 3420.02 20.25 3425.1 20.25 3430.06 20.25 3435.01 20.25 3440.05 20.25 3445.09 20.25 3450.02 20.25 3455.04 20.25 3460.05 20.25 3465.06 20.25 3470.06 20.25 3480.02 20.25 3490.06 20.25 3500.06 20.25 3510.03 20.25 3520.06 20.25 3530.06 20.25 3540.03 20.25 3550.06 20.25 3560.06 20.25 3570.03 20.25 3580.05 20.25 3590.05 20.25 3600.01 20.25 3610.03 20.25 3620.04 20.25 3630.05 20.25 3640.02 20.25 3650.05 20.50 2995.09 20.50 3005.02 20.50 3015.01 20.50 3025.07 20.50 3035.01 20.50 3045 20.50 3055.07 20.50 3065.04 20.50 3075.05 20.50 3085.03 20.50 3095.06 20.50 3105.06 20.50 3115.03 20.50 3125.06 20.50 3135.06 20.50 3145.01 20.50 3155.05 20.50 3165.05 20.50 3175.02 20.50 3185.05 20.50 3195.05 20.50 3205.02 20.50 3215.05 20.50 3225.05 20.50 3235.02 20.50 3245.07 20.50 3255.01 20.50 3265.02 20.50 3275 20.50 3285.05 20.50 3295.06 20.50 3305.04 20.50 3315.09 20.50 3325.01 20.50 3335.03 20.50 3345.05 20.50 3355.04 20.50 3365.08 20.50 3370 20.50 3375.01 20.50 3380.09 20.50 3385.08 20.50 3390.05 20.50 3395.02 20.50 3400.08 20.50 3405.03 20.50 3410.06 20.50 3415.09 20.50 3420.02 20.50 3425.1 20.50 3430.06 20.50 3435.01 20.50 3440.05 20.50 3445.09 20.50 3450.02 20.50 3455.04 20.50 3460.05 20.50 3465.06 20.50 3470.06 20.50 3480.02 20.50 3490.06 20.50 3500.06 20.50 3510.03 20.50 3520.06 20.50 3530.06 20.50 3540.03 20.50 3550.06 20.50 3560.06 20.50 3570.03 20.50 3580.05 20.50 3590.05 20.50 3600.01 20.50 3610.03 20.50 3620.04 20.50 3630.05 20.50 3640.02 20.50 3650.05 20.70 2995.09 20.70 3005.02 20.70 3015.01 20.70 3025.07 20.70 3035.01 20.70 3045 20.70 3055.07 20.70 3065.04 20.70 3075.05 20.70 3085.03 20.70 3095.06 20.70 3105.06 20.70 3115.03 20.70 3125.06 20.70 3135.06 20.70 3145.01 20.70 3155.05 20.70 3165.05 20.70 3175.02 20.70 3185.05 20.70 3195.05 20.70 3205.02 20.70 3215.05 20.70 3225.05 20.70 3235.02 20.70 3245.07 20.70 3255.01 20.70 3265.02 20.70 3275 20.70 3285.05 20.70 3295.06 20.70 3305.04 20.70 3315.09 20.70 3320 20.70 3325.01 20.70 3330 20.70 3335.03 20.70 3340.09 20.70 3345.05 20.70 3350 20.70 3355.04 20.70 3360.06 20.70 3365.08 20.70 3370 20.70 3375.01 20.70 3380.09 20.70 3385.08 20.70 3390.05 20.70 3395.02 20.70 3400.08 20.70 3405.03 20.70 3410.06 20.70 3415.09 20.70 3420.02 20.70 3425.1 20.70 3430.06 20.70 3435.01 20.70 3440.05 20.70 3445.09 20.70 3450.02 20.70 3455.04 20.70 3460.05 20.70 3465.06 20.70 3470.06 20.70 3480.02 20.70 3490.06 20.70 3500.06 20.70 3510.03 20.70 3520.06 20.70 3530.06 20.70 3540.03 20.70 3550.06 20.70 3560.06 20.70 3570.03 20.70 3580.05 20.70 3590.05 20.70 3600.01 20.70 3610.03 20.70 3620.04 20.70 3630.05 20.70 3640.02 20.70 3650.05 20.85 2995.09 20.85 3005.02 20.85 3015.01 20.85 3025.07 20.85 3035.01 20.85 3045 20.85 3055.07 20.85 3065.04 20.85 3075.05 20.85 3085.03 20.85 3095.06 20.85 3105.06 20.85 3115.03 20.85 3125.06 20.85 3135.06 20.85 3145.01 20.85 3155.05 20.85 3165.05 20.85 3175.02 20.85 3185.05 20.85 3195.05 20.85 3205.02 20.85 3215.05 20.85 3225.05 20.85 3235.02 20.85 3245.07 20.85 3255.01 20.85 3265.02 20.85 3275 20.85 3285.05 20.85 3295.06 20.85 3305.04 20.85 3315.09 20.85 3320 20.85 3325.01 20.85 3330 20.85 3335.03 20.85 3340.09 20.85 3345.05 20.85 3350 20.85 3355.04 20.85 3360.06 20.85 3365.08 20.85 3370 20.85 3375.01 20.85 3380.09 20.85 3385.08 20.85 3390.05 20.85 3395.02 20.85 3400.08 20.85 3405.03 20.85 3410.06 20.85 3415.09 20.85 3420.02 20.85 3425.1 20.85 3430.06 20.85 3435.01 20.85 3440.05 20.85 3445.09 20.85 3450.02 20.85 3455.04 20.85 3460.05 20.85 3465.06 20.85 3470.06 20.85 3480.02 20.85 3490.06 20.85 3500.06 20.85 3510.03 20.85 3520.06 20.85 3530.06 20.85 3540.03 20.85 3550.06 20.85 3560.06 20.85 3570.03 20.85 3580.05 20.85 3590.05 20.85 3600.01 20.85 3610.03 20.85 3620.04 20.85 3630.05 20.85 3640.02 20.85 3650.05 21.00 2995.09 21.00 3005.02 21.00 3015.01 21.00 3025.07 21.00 3035.01 21.00 3045 21.00 3055.07 21.00 3065.04 21.00 3075.05 21.00 3085.03 21.00 3095.06 21.00 3105.06 21.00 3115.03 21.00 3125.06 21.00 3135.06 21.00 3145.01 21.00 3155.05 21.00 3165.05 21.00 3175.02 21.00 3185.05 21.00 3195.05 21.00 3205.02 21.00 3215.05 21.00 3225.05 21.00 3235.02 21.00 3245.07 21.00 3255.01 21.00 3265.02 21.00 3275 21.00 3285.05 21.00 3295.06 21.00 3305.04 21.00 3315.09 21.00 3320 21.00 3325.01 21.00 3330 21.00 3335.03 21.00 3340.09 21.00 3345.05 21.00 3350 21.00 3355.04 21.00 3360.06 21.00 3365.08 21.00 3370 21.00 3375.01 21.00 3380.09 21.00 3385.08 21.00 3390.05 21.00 3395.02 21.00 3400.08 21.00 3405.03 21.00 3410.06 21.00 3415.09 21.00 3420.02 21.00 3425.1 21.00 3430.06 21.00 3435.01 21.00 3440.05 21.00 3445.09 21.00 3450.02 21.00 3455.04 21.00 3460.05 21.00 3465.06 21.00 3470.06 21.00 3480.02 21.00 3490.06 21.00 3500.06 21.00 3510.03 21.00 3520.06 21.00 3530.06 21.00 3540.03 21.00 3550.06 21.00 3560.06 21.00 3570.03 21.00 3580.05 21.00 3590.05 21.00 3600.01 21.00 3610.03 21.00 3620.04 21.00 3630.05 21.00 3640.02 21.00 3650.05 21.10 2995.09 21.10 3005.02 21.10 3015.01 21.10 3025.07 21.10 3035.01 21.10 3045 21.10 3055.07 21.10 3065.04 21.10 3075.05 21.10 3085.03 21.10 3095.06 21.10 3105.06 21.10 3115.03 21.10 3125.06 21.10 3135.06 21.10 3145.01 21.10 3155.05 21.10 3165.05 21.10 3175.02 21.10 3185.05 21.10 3195.05 21.10 3205.02 21.10 3215.05 21.10 3225.05 21.10 3235.02 21.10 3245.07 21.10 3255.01 21.10 3265.02 21.10 3275 21.10 3285.05 21.10 3295.06 21.10 3305.04 21.10 3315.09 21.10 3320 21.10 3325.01 21.10 3330 21.10 3335.03 21.10 3340.09 21.10 3345.05 21.10 3350 21.10 3355.04 21.10 3360.06 21.10 3365.08 21.10 3370 21.10 3375.01 21.10 3380.09 21.10 3385.08 21.10 3390.05 21.10 3395.02 21.10 3400.08 21.10 3405.03 21.10 3410.06 21.10 3415.09 21.10 3420.02 21.10 3425.1 21.10 3430.06 21.10 3435.01 21.10 3440.05 21.10 3445.09 21.10 3450.02 21.10 3455.04 21.10 3460.05 21.10 3465.06 21.10 3470.06 21.10 3480.02 21.10 3490.06 21.10 3500.06 21.10 3510.03 21.10 3520.06 21.10 3530.06 21.10 3540.03 21.10 3550.06 21.10 3560.06 21.10 3570.03 21.10 3580.05 21.10 3590.05 21.10 3600.01 21.10 3610.03 21.10 3620.04 21.10 3630.05 21.10 3640.02 21.10 3650.05 21.20 2995.09 21.20 3005.02 21.20 3015.01 21.20 3025.07 21.20 3035.01 21.20 3045 21.20 3055.07 21.20 3065.04 21.20 3075.05 21.20 3085.03 21.20 3095.06 21.20 3105.06 21.20 3115.03 21.20 3125.06 21.20 3135.06 21.20 3145.01 21.20 3155.05 21.20 3165.05 21.20 3175.02 21.20 3185.05 21.20 3195.05 21.20 3205.02 21.20 3215.05 21.20 3225.05 21.20 3235.02 21.20 3245.07 21.20 3255.01 21.20 3265.02 21.20 3275 21.20 3285.05 21.20 3295.06 21.20 3305.04 21.20 3315.09 21.20 3320 21.20 3325.01 21.20 3330 21.20 3335.03 21.20 3340.09 21.20 3345.05 21.20 3350 21.20 3355.04 21.20 3360.06 21.20 3365.08 21.20 3370 21.20 3375.01 21.20 3380.09 21.20 3385.08 21.20 3390.05 21.20 3395.02 21.20 3400.08 21.20 3405.03 21.20 3410.06 21.20 3415.09 21.20 3420.02 21.20 3425.1 21.20 3430.06 21.20 3435.01 21.20 3440.05 21.20 3445.09 21.20 3450.02 21.20 3455.04 21.20 3460.05 21.20 3465.06 21.20 3470.06 21.20 3480.02 21.20 3490.06 21.20 3500.06 21.20 3510.03 21.20 3520.06 21.20 3530.06 21.20 3540.03 21.20 3550.06 21.20 3560.06 21.20 3570.03 21.20 3580.05 21.20 3590.05 21.20 3600.01 21.20 3610.03 21.20 3620.04 21.20 3630.05 21.20 3640.02 21.20 3650.05 21.25 2995.09 21.25 3005.02 21.25 3015.01 21.25 3025.07 21.25 3035.01 21.25 3045 21.25 3055.07 21.25 3065.04 21.25 3075.05 21.25 3085.03 21.25 3095.06 21.25 3105.06 21.25 3115.03 21.25 3125.06 21.25 3135.06 21.25 3145.01 21.25 3155.05 21.25 3165.05 21.25 3175.02 21.25 3185.05 21.25 3195.05 21.25 3205.02 21.25 3215.05 21.25 3225.05 21.25 3235.02 21.25 3245.07 21.25 3255.01 21.25 3265.02 21.25 3275 21.25 3285.05 21.25 3295.06 21.25 3305.04 21.25 3315.09 21.25 3320 21.25 3325.01 21.25 3330 21.25 3335.03 21.25 3340.09 21.25 3345.05 21.25 3350 21.25 3355.04 21.25 3360.06 21.25 3365.08 21.25 3370 21.25 3375.01 21.25 3380.09 21.25 3385.08 21.25 3390.05 21.25 3395.02 21.25 3400.08 21.25 3405.03 21.25 3410.06 21.25 3415.09 21.25 3420.02 21.25 3425.1 21.25 3430.06 21.25 3435.01 21.25 3440.05 21.25 3445.09 21.25 3450.02 21.25 3455.04 21.25 3460.05 21.25 3465.06 21.25 3470.06 21.25 3480.02 21.25 3490.06 21.25 3500.06 21.25 3510.03 21.25 3520.06 21.25 3530.06 21.25 3540.03 21.25 3550.06 21.25 3560.06 21.25 3570.03 21.25 3580.05 21.25 3590.05 21.25 3600.01 21.25 3610.03 21.25 3620.04 21.25 3630.05 21.25 3640.02 21.25 3650.05 21.30 2987.01 21.30 2997.06 21.30 3007.08 21.30 3017.07 21.30 3027.02 21.30 3037.05 21.30 3047.04 21.30 3057.03 21.30 3067.07 21.30 3077.07 21.30 3087.04 21.30 3097.06 21.30 3107.06 21.30 3117.03 21.30 3127.05 21.30 3137.04 21.30 3147 21.30 3157.03 21.30 3167.03 21.30 3177.08 21.30 3187.01 21.30 3197.01 21.30 3207.07 21.30 3217.09 21.30 3227.08 21.30 3237.07 21.30 3247.04 21.30 3257.07 21.30 3267.08 21.30 3277.05 21.30 3287.09 21.30 3297 21.30 3307.07 21.30 3317.02 21.30 3320 21.30 3323.08 21.30 3326.06 21.30 3329.04 21.30 3332.02 21.30 3335.03 21.30 3338.01 21.30 3341.08 21.30 3344.06 21.30 3347.03 21.30 3350 21.30 3353.06 21.30 3356.03 21.30 3359.08 21.30 3362.04 21.30 3365.08 21.30 3368.04 21.30 3371.08 21.30 3374.02 21.30 3377.06 21.30 3380.09 21.30 3383.03 21.30 3386.06 21.30 3389.08 21.30 3392.01 21.30 3395.02 21.30 3398.04 21.30 3401.05 21.30 3404.06 21.30 3407.06 21.30 3410.06 21.30 3413.06 21.30 3416.06 21.30 3419.05 21.30 3422.04 21.30 3425.1 21.30 3428.03 21.30 3431.07 21.30 3434 21.30 3437.03 21.30 3440.05 21.30 3443.08 21.30 3446 21.30 3449.02 21.30 3452.03 21.30 3455.04 21.30 3458.05 21.30 3461.06 21.30 3464.06 21.30 3467.06 21.30 3470.06 21.30 3480.02 21.30 3490.06 21.30 3500.06 21.30 3510.03 21.30 3520.06 21.30 3530.06 21.30 3540.03 21.30 3550.06 21.30 3560.06 21.30 3570.03 21.30 3580.05 21.30 3590.05 21.30 3600.01 21.30 3610.03 21.30 3620.04 21.30 3630.05 21.30 3640.02 21.30 3650.05 21.35 2987.01 21.35 2997.06 21.35 3007.08 21.35 3017.07 21.35 3027.02 21.35 3037.05 21.35 3047.04 21.35 3057.03 21.35 3067.07 21.35 3077.07 21.35 3087.04 21.35 3097.06 21.35 3107.06 21.35 3117.03 21.35 3127.05 21.35 3137.04 21.35 3147 21.35 3157.03 21.35 3167.03 21.35 3177.08 21.35 3187.01 21.35 3197.01 21.35 3207.07 21.35 3217.09 21.35 3227.08 21.35 3237.07 21.35 3247.04 21.35 3257.07 21.35 3267.08 21.35 3277.05 21.35 3287.09 21.35 3297 21.35 3307.07 21.35 3317.02 21.35 3320 21.35 3323.08 21.35 3326.06 21.35 3329.04 21.35 3332.02 21.35 3335.03 21.35 3338.01 21.35 3341.08 21.35 3344.06 21.35 3347.03 21.35 3350 21.35 3353.06 21.35 3356.03 21.35 3359.08 21.35 3362.04 21.35 3365.08 21.35 3368.04 21.35 3371.08 21.35 3374.02 21.35 3377.06 21.35 3380.09 21.35 3383.03 21.35 3386.06 21.35 3389.08 21.35 3392.01 21.35 3395.02 21.35 3398.04 21.35 3401.05 21.35 3404.06 21.35 3407.06 21.35 3410.06 21.35 3413.06 21.35 3416.06 21.35 3419.05 21.35 3422.04 21.35 3425.1 21.35 3428.03 21.35 3431.07 21.35 3434 21.35 3437.03 21.35 3440.05 21.35 3443.08 21.35 3446 21.35 3449.02 21.35 3452.03 21.35 3455.04 21.35 3458.05 21.35 3461.06 21.35 3464.06 21.35 3467.06 21.35 3470.06 21.35 3480.02 21.35 3490.06 21.35 3500.06 21.35 3510.03 21.35 3520.06 21.35 3530.06 21.35 3540.03 21.35 3550.06 21.35 3560.06 21.35 3570.03 21.35 3580.05 21.35 3590.05 21.35 3600.01 21.35 3610.03 21.35 3620.04 21.35 3630.05 21.35 3640.02 21.35 3650.05 gtkextra-3.2.0/gtkextra/gtkplotcandle.h0000644000076400001440000000364312603754176015144 00000000000000/* gtkplotcandle - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANDLE_H__ #define __GTK_PLOT_CANDLE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_CANDLE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_candle_get_type (), GtkPlotCandle) #define G_TYPE_PLOT_CANDLE (gtk_plot_candle_get_type ()) #define GTK_PLOT_CANDLE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_candle_get_type(), GtkPlotCandleClass) #define GTK_IS_PLOT_CANDLE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_candle_get_type ()) typedef struct _GtkPlotCandle GtkPlotCandle; typedef struct _GtkPlotCandleClass GtkPlotCandleClass; /** * GtkPlotCandle: * * The GtkPlotCandle struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCandle { GtkPlotData data; }; struct _GtkPlotCandleClass { GtkPlotDataClass parent_class; }; GType gtk_plot_candle_get_type (void); GtkWidget* gtk_plot_candle_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANDLE_H__ */ gtkextra-3.2.0/gtkextra/gtkplotcanvaspixmap.c0000644000076400001440000002056712603754176016407 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotcanvas.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotgdk.h" #include "gtkplotps.h" /** * SECTION: gtkplotcanvaspixmap * @short_description: * * FIXME:: need long description */ #define P_(string) string enum { ARG_0, ARG_PIXMAP, ARG_MASK, }; static void gtk_plot_canvas_pixmap_init (GtkPlotCanvasPixmap *pixmap); static void gtk_plot_canvas_pixmap_class_init(GtkPlotCanvasChildClass *klass); static void gtk_plot_canvas_pixmap_destroy (GtkObject *object); static void gtk_plot_canvas_pixmap_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_pixmap_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y); static void gtk_plot_canvas_pixmap_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); static void gtk_plot_canvas_pixmap_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_pixmap_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static GtkPlotCanvasChildClass *parent_class = NULL; GType gtk_plot_canvas_pixmap_get_type (void) { static GType plot_canvas_pixmap_type = 0; if (!plot_canvas_pixmap_type) { plot_canvas_pixmap_type = g_type_register_static_simple ( gtk_plot_canvas_child_get_type(), "GtkPlotCanvasPixmap", sizeof (GtkPlotCanvasPixmapClass), (GClassInitFunc) gtk_plot_canvas_pixmap_class_init, sizeof (GtkPlotCanvasPixmap), (GInstanceInitFunc) gtk_plot_canvas_pixmap_init, 0); } return plot_canvas_pixmap_type; } /** * gtk_plot_canvas_pixmap_new: * @_pixmap: a GdkPixmap. * @mask: * * * * Return value: */ GtkPlotCanvasChild* gtk_plot_canvas_pixmap_new (GdkPixmap *_pixmap, GdkBitmap *mask) { GtkPlotCanvasPixmap *pixmap; pixmap = g_object_new (gtk_plot_canvas_pixmap_get_type (), NULL); pixmap->pixmap = _pixmap; pixmap->mask = mask; if(_pixmap) gdk_pixmap_ref(_pixmap); if(mask) gdk_bitmap_ref(mask); return GTK_PLOT_CANVAS_CHILD (pixmap); } static void gtk_plot_canvas_pixmap_init (GtkPlotCanvasPixmap *pixmap) { pixmap->pixmap = NULL; pixmap->mask = NULL; } static void gtk_plot_canvas_pixmap_destroy(GtkObject *object) { GtkPlotCanvasPixmap *pixmap = GTK_PLOT_CANVAS_PIXMAP(object); if(pixmap->pixmap) gdk_pixmap_unref(pixmap->pixmap); if(pixmap->mask) gdk_bitmap_unref(pixmap->mask); pixmap->pixmap = NULL; pixmap->mask = NULL; } static void gtk_plot_canvas_pixmap_class_init (GtkPlotCanvasChildClass *klass) { GtkObjectClass *object_class = (GtkObjectClass *)klass; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_canvas_child_get_type ()); object_class->destroy = gtk_plot_canvas_pixmap_destroy; gobject_class->get_property = gtk_plot_canvas_pixmap_get_property; gobject_class->set_property = gtk_plot_canvas_pixmap_set_property; g_object_class_install_property (gobject_class, ARG_PIXMAP, g_param_spec_pointer ("pixmap", P_("Pixmap"), P_("Pixmap"), G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, ARG_MASK, g_param_spec_pointer ("mask_bitmap", P_("Mask"), P_("Mask"), G_PARAM_READABLE|G_PARAM_WRITABLE)); klass->draw = gtk_plot_canvas_pixmap_draw; klass->move = gtk_plot_canvas_pixmap_move; klass->move_resize = gtk_plot_canvas_pixmap_resize; } static void gtk_plot_canvas_pixmap_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCanvasPixmap *pixmap = GTK_PLOT_CANVAS_PIXMAP (object); switch(prop_id){ case ARG_PIXMAP: g_value_set_pointer(value, pixmap->pixmap); break; case ARG_MASK: g_value_set_pointer(value, pixmap->mask); break; } } static void gtk_plot_canvas_pixmap_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCanvasPixmap *pixmap = GTK_PLOT_CANVAS_PIXMAP (object); switch(prop_id){ case ARG_PIXMAP: if(pixmap->pixmap) gdk_pixmap_unref(pixmap->pixmap); pixmap->pixmap = (GdkPixmap *)g_value_get_pointer(value); if(pixmap->pixmap) gdk_pixmap_ref(pixmap->pixmap); break; case ARG_MASK: if(pixmap->mask) gdk_bitmap_unref(pixmap->mask); pixmap->mask = (GdkBitmap *)g_value_get_pointer(value); if(pixmap->mask) gdk_bitmap_ref(pixmap->mask); break; } } static void gtk_plot_canvas_pixmap_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasPixmap *pixmap = GTK_PLOT_CANVAS_PIXMAP(child); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(canvas))); if(pixmap->pixmap){ gdouble scale_x, scale_y; gint width, height; gdk_window_get_size(pixmap->pixmap, &width, &height); scale_x = (gdouble)child->allocation.width / (gdouble)width; scale_y = (gdouble)child->allocation.height / (gdouble)height; gtk_plot_pc_draw_pixmap(canvas->pc, pixmap->pixmap, pixmap->mask, 0, 0, child->allocation.x, child->allocation.y, width, height, scale_x, scale_y); } else { GdkColormap *colormap = gdk_colormap_get_system(); GdkColor black, white; gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); gtk_plot_pc_set_color(canvas->pc, &white); gtk_plot_pc_draw_rectangle(canvas->pc, TRUE, child->allocation.x, child->allocation.y, child->allocation.width, child->allocation.height); gtk_plot_pc_set_color(canvas->pc, &black); gtk_plot_pc_draw_rectangle(canvas->pc, FALSE, child->allocation.x, child->allocation.y, child->allocation.width, child->allocation.height); } } static void gtk_plot_canvas_pixmap_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y) { return; } static void gtk_plot_canvas_pixmap_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { return; } gtkextra-3.2.0/gtkextra/testgtkfilesel.c0000644000076400001440000000673712603754176015344 00000000000000#include #include #include #include #include #include "gtkiconlist.h" #include "gtkiconfilesel.h" #include "sg_small.xpm" GtkWidget *filesel; GtkWidget *show_button; GtkWidget *hide_button; void quit () { gtk_main_quit(); } void ok_clicked(GtkWidget *widget, gpointer data) { GtkIconFileSel *filesel; const gchar *path; const gchar *file; const gchar *selection; filesel = GTK_ICON_FILESEL(data); path = gtk_file_list_get_path(GTK_FILE_LIST(filesel->file_list)); file = gtk_file_list_get_filename(GTK_FILE_LIST(filesel->file_list)); selection = gtk_icon_file_selection_get_selection(filesel); if(path) printf("PATH: %s\n",path); if(file) printf("FILE: %s\n",file); if(selection) printf("SELECTION: %s\n",selection); if(GTK_ICON_LIST(filesel->file_list)->selection_mode == GTK_SELECTION_MULTIPLE){ GList *list; list = GTK_ICON_LIST(filesel->file_list)->selection; while(list){ gchar *text = ((GtkIconListItem *)list->data)->entry_label; if(text) printf("ICON %s\n",text); list = list->next; } } } static void show_tree(GtkWidget *widget, gpointer data) { gtk_icon_file_selection_show_tree(GTK_ICON_FILESEL(filesel), TRUE); } static void hide_tree(GtkWidget *widget, gpointer data) { gtk_icon_file_selection_show_tree(GTK_ICON_FILESEL(filesel), FALSE); } int main(int argc, char *argv[]) { GtkWidget *box; GdkPixmap *pixmap; GdkBitmap *mask; GdkColormap *colormap; gint type; gtk_init(&argc, &argv); colormap = gdk_colormap_get_system(); filesel=gtk_icon_file_selection_new("Open File"); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, sg_small_xpm); type = gtk_file_list_add_type_with_pixmap (GTK_FILE_LIST(GTK_ICON_FILESEL(filesel)->file_list), pixmap, mask); gtk_file_list_add_type_filter (GTK_FILE_LIST(GTK_ICON_FILESEL(filesel)->file_list), type, "*.sg"); gtk_file_list_add_type_filter (GTK_FILE_LIST(GTK_ICON_FILESEL(filesel)->file_list), type, "*.sgp"); gtk_file_list_add_type_filter (GTK_FILE_LIST(GTK_ICON_FILESEL(filesel)->file_list), type, "*.sgw"); gtk_icon_list_set_selection_mode(GTK_ICON_LIST(GTK_ICON_FILESEL(filesel)->file_list), GTK_SELECTION_MULTIPLE); box = gtk_hbox_new(FALSE, 1); gtk_box_pack_start(GTK_BOX(gtk_bin_get_child(GTK_BIN(filesel))), box, TRUE, TRUE, 0); gtk_widget_show(box); show_button = gtk_button_new_with_label("Show Tree"); gtk_box_pack_start(GTK_BOX(box), show_button, TRUE, TRUE, 0); gtk_widget_show(show_button); hide_button = gtk_button_new_with_label("Hide Tree"); gtk_box_pack_start(GTK_BOX(box), hide_button, TRUE, TRUE, 0); gtk_widget_show(hide_button); g_signal_connect (GTK_OBJECT (filesel), "destroy", G_CALLBACK (quit), NULL); g_signal_connect (GTK_OBJECT (GTK_ICON_FILESEL(filesel)->ok_button), "clicked", G_CALLBACK (ok_clicked), filesel); g_signal_connect (GTK_OBJECT (show_button), "clicked", G_CALLBACK (show_tree), NULL); g_signal_connect (GTK_OBJECT (hide_button), "clicked", G_CALLBACK (hide_tree), NULL); gtk_widget_show(filesel); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkplotgdk.h0000644000076400001440000000447312603754176014465 00000000000000/* gtkplotpc - gtkplot print context - a renderer for printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_GDK_H__ #define __GTK_PLOT_GDK_H__ #include #include #include "gtkpsfont.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_PLOT_GDK(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_gdk_get_type (), GtkPlotGdk) #define G_TYPE_PLOT_GDK (gtk_plot_gdk_get_type ()) #define GTK_PLOT_GDK_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_gdk_get_type(), GtkPlotGdkClass) #define GTK_IS_PLOT_GDK(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_gdk_get_type ()) typedef struct _GtkPlotGdk GtkPlotGdk; typedef struct _GtkPlotGdkClass GtkPlotGdkClass; /** * GtkPlotGdk: * * The GtkPlotGdk struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotGdk { GtkPlotPC pc; GdkGC *gc; GdkDrawable *drawable; GtkTextDirection text_direction; PangoContext *context; PangoLayout *layout; GdkWindow *window; gint ref_count; }; struct _GtkPlotGdkClass { GtkPlotPCClass parent_class; void (* set_drawable) (GtkPlotGdk *gdk, GdkDrawable *drawable); }; GType gtk_plot_gdk_get_type (void); GtkObject *gtk_plot_gdk_new (GtkWidget *widget); void gtk_plot_gdk_construct (GtkPlotGdk *pc, GtkWidget *widget); void gtk_plot_gdk_set_drawable (GtkPlotGdk *gdk, GdkDrawable *drawable); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_GDK_H__ */ gtkextra-3.2.0/gtkextra/gtkplotcanvasplot.h0000644000076400001440000000714512604171206016055 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANVAS_PLOT_H__ #define __GTK_PLOT_CANVAS_PLOT_H__ #define GTK_PLOT_CANVAS_PLOT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_plot_get_type (), GtkPlotCanvasPlot) #define GTK_PLOT_CANVAS_PLOT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_plot_get_type(), GtkPlotCanvasPlotClass) #define GTK_IS_PLOT_CANVAS_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_plot_get_type ()) #define G_TYPE_PLOT_CANVAS_PLOT (gtk_plot_canvas_plot_get_type ()) #define GTK_PLOT_CANVAS_PLOT_SELECT_POINT(plot) (plot->flags & GTK_PLOT_CANVAS_PLOT_SELECT_POINT) #define GTK_PLOT_CANVAS_PLOT_DND_POINT(plot) (plot->flags & GTK_PLOT_CANVAS_PLOT_DND_POINT) #define GTK_PLOT_CANVAS_PLOT_FLAGS(plot) (GTK_PLOT_CANVAS_PLOT(plot)->flags) #define GTK_PLOT_CANVAS_PLOT_SET_FLAGS(plot, flags) (GTK_PLOT_CANVAS_PLOT_FLAGS(plot) |= (flags)) #define GTK_PLOT_CANVAS_PLOT_UNSET_FLAGS(plot, flags) (GTK_PLOT_CANVAS_PLOT_FLAGS(plot) &= ~(flags)) #include #include "gtkplotpc.h" #include "gtkplot.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GtkPlotCanvasPlot GtkPlotCanvasPlot; typedef struct _GtkPlotCanvasPlotClass GtkPlotCanvasPlotClass; typedef enum { GTK_PLOT_CANVAS_PLOT_OUT, GTK_PLOT_CANVAS_PLOT_IN_PLOT, GTK_PLOT_CANVAS_PLOT_IN_LEGENDS, GTK_PLOT_CANVAS_PLOT_IN_TITLE, GTK_PLOT_CANVAS_PLOT_IN_AXIS, GTK_PLOT_CANVAS_PLOT_IN_DATA, GTK_PLOT_CANVAS_PLOT_IN_GRADIENT, GTK_PLOT_CANVAS_PLOT_IN_MARKER, } GtkPlotCanvasPlotPos; /** * GtkPlotCanvasPlotFlags: * @GTK_PLOT_CANVAS_PLOT_SELECT_POINT: Select point * @GTK_PLOT_CANVAS_PLOT_DND_POINT: DnD point * * Selection and DND mode of #GtkPlotCanvas * **/ typedef enum { GTK_PLOT_CANVAS_PLOT_SELECT_POINT = 1 << 0, /* Select point */ GTK_PLOT_CANVAS_PLOT_DND_POINT = 1 << 1, /* DnD point */ } GtkPlotCanvasPlotFlags; /** * GtkPlotCanvasPlot: * * The GtkPlotBar struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvasPlot { GtkPlotCanvasChild parent; GtkPlotCanvasPlotPos pos; GtkPlotAxis *axis; GtkPlotData *data; GtkPlotMarker *marker; gint datapoint; GtkPlotCanvasPlotFlags flags; GtkPlot *plot; }; struct _GtkPlotCanvasPlotClass { GtkPlotCanvasChildClass parent_class; }; GType gtk_plot_canvas_plot_get_type (void); GtkPlotCanvasChild * gtk_plot_canvas_plot_new (GtkPlot *plot); GtkPlotCanvasPlotFlags gtk_plot_canvas_plot_flags(GtkPlotCanvasPlot *plot); void gtk_plot_canvas_plot_set_flags(GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags); void gtk_plot_canvas_plot_unset_flags(GtkPlotCanvasPlot *plot, GtkPlotCanvasPlotFlags flags); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANVAS_PLOT_H__ */ gtkextra-3.2.0/gtkextra/testpolar.c0000644000076400001440000001653512603754176014325 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplotpolar.h" #include "gtkplotdata.h" #include "gtkplotcanvas.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; static gdouble r[]={0.2, 0.34, 0.45, 0.6, 0.75, 0.81}; static gdouble angle[]={15., 20., 43., 67., 84., 106.}; /* static gdouble size[]={.021, .043, .0356, .0123, .054, .013}; */ void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } widget_list = plots; active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); } return TRUE; } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_polar_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkColor color; gtk_plot_reflect_y(GTK_PLOT(active_plot), TRUE); gtk_plot_set_yrange(GTK_PLOT(active_plot), .4, 1); gtk_plot_polar_rotate(GTK_PLOT_POLAR(active_plot), 30); dataset[0] = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], r, angle, NULL, NULL, 6); /* gtk_plot_data_set_a(dataset[0], size); */ gdk_color_parse("red", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_DIAMOND, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, 0, 1, &color); gtk_plot_data_set_legend(dataset[0], "Example"); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; gint page_width, page_height; gfloat scale = 1.; GtkPlotCanvasChild *child; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotPolar Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .75, .45); gtk_widget_show(active_plot); build_example1(active_plot); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demopolar.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkcheckitem.c0000644000076400001440000003256412603754176014752 00000000000000/* gtkcheckitem - widget for gtk+ * Copyright (C) 1999-2001 Adrian E. Feiguin * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ /** * SECTION: gtkcheckitem * @short_description: Check item widget for Gtk * * It is a GtkCheckButton hack with the look and feel of the Redmond95 theme. */ /** * GtkCheckItem: * * The GtkCheckItem struct contains only private data. * It should only be accessed through the functions described below. */ #include "gtkextra-compat.h" #include "gtkcheckitem.h" #define INDICATOR_SIZE 14 #define INDICATOR_SPACING 2 static void gtk_check_item_class_init (GtkCheckItemClass *klass); static void gtk_check_item_init (GtkCheckItem *check_item); static void gtk_check_item_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_check_item_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static gboolean gtk_check_item_expose (GtkWidget *widget, GdkEventExpose *event); static void gtk_check_item_paint (GtkWidget *widget, GdkRectangle *area); static void gtk_check_item_draw_indicator (GtkCheckItem *check_item, GdkRectangle *area); static void gtk_real_check_item_draw_indicator (GtkCheckItem *check_item, GdkRectangle *area); static GtkToggleButtonClass *parent_class = NULL; GType gtk_check_item_get_type (void) { static GType check_item_type = 0; if (!check_item_type) { check_item_type = g_type_register_static_simple( gtk_toggle_button_get_type (), "GtkCheckItem", sizeof (GtkCheckItemClass), (GClassInitFunc) gtk_check_item_class_init, sizeof (GtkCheckItem), (GInstanceInitFunc) gtk_check_item_init, 0); } return check_item_type; } static void gtk_check_item_class_init (GtkCheckItemClass *klass) { GtkWidgetClass *widget_class; widget_class = (GtkWidgetClass*) klass; parent_class = g_type_class_ref (gtk_toggle_button_get_type ()); widget_class->size_request = gtk_check_item_size_request; widget_class->size_allocate = gtk_check_item_size_allocate; widget_class->expose_event = gtk_check_item_expose; klass->indicator_size = INDICATOR_SIZE; klass->indicator_spacing = INDICATOR_SPACING; /** * GtkCheckItem::draw_indicator: * @check_item: the #GtkCheckItem object that received the signal * @area: the #GdkRectangle area of the check item. * * Emmited when the check item(check button) is pressed. */ klass->draw_indicator = gtk_real_check_item_draw_indicator; } static void gtk_check_item_init (GtkCheckItem *check_item) { gtk_widget_set_has_window(GTK_WIDGET(check_item), FALSE); gtk_widget_set_receives_default(GTK_WIDGET(check_item), FALSE); GTK_TOGGLE_BUTTON (check_item)->draw_indicator = TRUE; } GtkWidget* gtk_check_item_new (void) { return gtk_widget_new (G_TYPE_CHECK_ITEM, NULL); } /** * gtk_check_item_new_with_label: * @label: text near the check item * * Create a #GtkCheckItem widget with a specified label. * * Returns: the newly-created #GtkCheckItem. */ GtkWidget* gtk_check_item_new_with_label (const gchar *label) { GtkWidget *check_item; check_item = gtk_check_item_new (); gtk_check_item_construct_with_label(GTK_CHECK_ITEM(check_item), label); return check_item; } /** * gtk_check_item_construct_with_label: * @check_item: a #GtkCheckItem widget * @label: text near the check item * * Initialize a #GtkCheckItem widget with a specified label. */ void gtk_check_item_construct_with_label (GtkCheckItem* check_item, const gchar *label) { GtkWidget *label_widget; label_widget = gtk_label_new (label); gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5); gtk_container_add (GTK_CONTAINER (check_item), label_widget); gtk_widget_show (label_widget); } /* This should only be called when toggle_button->draw_indicator * is true. */ static void gtk_check_item_paint (GtkWidget *widget, GdkRectangle *area) { GtkCheckItem *check_item; GtkAllocation allocation; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_CHECK_ITEM (widget)); check_item = GTK_CHECK_ITEM (widget); gtk_widget_get_allocation(widget, &allocation); if (gtk_widget_is_drawable (widget)) { gint border_width; gtk_check_item_draw_indicator (check_item, area); border_width = gtk_container_get_border_width(GTK_CONTAINER (widget)); if (gtk_widget_has_focus (widget)) gtk_paint_focus (gtk_widget_get_style(widget), gtk_widget_get_window(widget), gtk_widget_get_state(widget), area, widget, "checkitem", border_width + allocation.x, border_width + allocation.y, allocation.width - 2 * border_width - 1, allocation.height - 2 * border_width - 1); } } static void gtk_check_item_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkToggleButton *toggle_button; gint temp; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_CHECK_ITEM (widget)); g_return_if_fail (requisition != NULL); toggle_button = GTK_TOGGLE_BUTTON (widget); if (GTK_WIDGET_CLASS (parent_class)->size_request) (* GTK_WIDGET_CLASS (parent_class)->size_request) (widget, requisition); if (toggle_button->draw_indicator) { requisition->width += (GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_size + GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_spacing * 3 + 2); temp = (GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_size + GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_spacing * 2); requisition->height = MAX (requisition->height, temp) + 2; } } static void gtk_check_item_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GtkCheckItem *check_item; GtkToggleButton *toggle_button; GtkButton *button; GtkAllocation child_allocation; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_CHECK_ITEM (widget)); g_return_if_fail (allocation != NULL); check_item = GTK_CHECK_ITEM (widget); toggle_button = GTK_TOGGLE_BUTTON (widget); button = GTK_BUTTON (widget); if (toggle_button->draw_indicator) { gtk_widget_set_allocation(widget, allocation); if (gtk_widget_get_realized (widget)) gdk_window_move_resize (button->event_window, allocation->x, allocation->y, allocation->width, allocation->height); if (gtk_bin_get_child(GTK_BIN (button))&& gtk_widget_get_visible (gtk_bin_get_child(GTK_BIN (button)))) { guint border_width = gtk_container_get_border_width(GTK_CONTAINER (widget)); child_allocation.x = (border_width + GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_size + GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_spacing * 3 + 1 + allocation->x); child_allocation.y = border_width + 1 + allocation->y; child_allocation.width = MAX (1, allocation->width - (border_width + GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_size + GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_spacing * 3 + 1) - border_width - 1); child_allocation.height = MAX (1, allocation->height - (border_width + 1) * 2); gtk_widget_size_allocate (gtk_bin_get_child(GTK_BIN (button)), &child_allocation); } } else { if (GTK_WIDGET_CLASS (parent_class)->size_allocate) (* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); } } static gboolean gtk_check_item_expose (GtkWidget *widget, GdkEventExpose *event) { GtkCheckItem *check_item; GtkToggleButton *toggle_button; GtkBin *bin; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (GTK_IS_CHECK_ITEM (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); check_item = GTK_CHECK_ITEM (widget); toggle_button = GTK_TOGGLE_BUTTON (widget); bin = GTK_BIN (widget); if (gtk_widget_is_drawable (widget)) { if (toggle_button->draw_indicator) { gtk_check_item_paint (widget, &event->area); if (gtk_bin_get_child(bin)) gtk_container_propagate_expose (GTK_CONTAINER (widget), gtk_bin_get_child(bin), event); } else if (GTK_WIDGET_CLASS (parent_class)->expose_event) (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); } return FALSE; } static void gtk_check_item_draw_indicator (GtkCheckItem *check_item, GdkRectangle *area) { GtkCheckItemClass *klass; g_return_if_fail (check_item != NULL); g_return_if_fail (GTK_IS_CHECK_ITEM (check_item)); klass = GTK_CHECK_ITEM_GET_CLASS (check_item); if (klass->draw_indicator) (* klass->draw_indicator) (check_item, area); } static void gtk_real_check_item_draw_indicator (GtkCheckItem *check_item, GdkRectangle *area) { GtkWidget *widget; GtkToggleButton *toggle_button; GtkStateType state_type; GdkRectangle restrict_area; GdkRectangle new_area; GdkGC *fg_gc = NULL; gint width, height; gint x, y; gint border; GdkWindow *window; GtkAllocation allocation; g_return_if_fail (check_item != NULL); g_return_if_fail (GTK_IS_CHECK_ITEM (check_item)); widget = GTK_WIDGET (check_item); toggle_button = GTK_TOGGLE_BUTTON (check_item); gtk_widget_get_allocation(widget, &allocation); if (gtk_widget_is_drawable (widget)) { window = gtk_widget_get_window(widget); state_type = gtk_widget_get_state (widget); if (state_type != GTK_STATE_NORMAL && state_type != GTK_STATE_PRELIGHT) state_type = GTK_STATE_NORMAL; guint border_width = gtk_container_get_border_width(GTK_CONTAINER(widget)); restrict_area.x = allocation.x + border_width; restrict_area.y = allocation.y + border_width; restrict_area.width = allocation.width - ( 2 * border_width); restrict_area.height = allocation.height - ( 2 * border_width); if (gdk_rectangle_intersect (area, &restrict_area, &new_area)) { if (state_type != GTK_STATE_NORMAL) gtk_paint_flat_box (gtk_widget_get_style(widget), window, state_type, GTK_SHADOW_ETCHED_OUT, area, widget, "checkitem", new_area.x, new_area.y, new_area.width, new_area.height); } x = allocation.x + GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_spacing + border_width; y = allocation.y + (allocation.height - GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_size) / 2; width = GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_size; height = GTK_CHECK_ITEM_GET_CLASS (widget)->indicator_size; if(!gtk_bin_get_child(GTK_BIN(widget))){ x = allocation.x + allocation.width/2 - width/2; y = allocation.y + allocation.height/2 - height/2; } if (GTK_TOGGLE_BUTTON (widget)->active) { state_type = GTK_STATE_ACTIVE; } else { state_type = GTK_STATE_NORMAL; } fg_gc = gdk_gc_new(window); gdk_gc_set_foreground(fg_gc, >k_widget_get_style(widget)->white); gdk_draw_rectangle(window, fg_gc, TRUE, x, y, width, height); gtk_paint_shadow (gtk_widget_get_style(widget), window, GTK_STATE_NORMAL, GTK_SHADOW_IN, NULL, NULL, NULL, x, y, width, height); if(state_type == GTK_STATE_ACTIVE){ GdkPoint points[3]; border = gtk_widget_get_style(widget)->xthickness; gdk_gc_set_foreground(fg_gc, >k_widget_get_style(widget)->black); x += border; y += border; points[0].x = x+1; points[0].y = y+6; points[1].x = x+3; points[1].y = y+height-2*border-2; points[2].x = x+width-2*border-2; points[2].y = y+3; gdk_draw_lines(window, fg_gc, points, 3); points[0].x = x+1; points[0].y = y+5; points[1].x = x+3; points[1].y = y+height-2*border-3; points[2].x = x+width-2*border-2; points[2].y = y+2; gdk_draw_lines(window, fg_gc, points, 3); points[0].x = x+1; points[0].y = y+4; points[1].x = x+3; points[1].y = y+height-2*border-4; points[2].x = x+width-2*border-2; points[2].y = y+1; gdk_draw_lines(window, fg_gc, points, 3); } } gdk_gc_unref(fg_gc); } gtkextra-3.2.0/gtkextra/gtkplotcanvastext.h0000644000076400001440000000540012603754176016067 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANVAS_TEXT_H__ #define __GTK_PLOT_CANVAS_TEXT_H__ #define GTK_PLOT_CANVAS_TEXT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_text_get_type (), GtkPlotCanvasText) #define GTK_PLOT_CANVAS_TEXT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_text_get_type(), GtkPlotCanvasTextClass) #define GTK_IS_PLOT_CANVAS_TEXT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_text_get_type ()) #define G_TYPE_PLOT_CANVAS_TEXT (gtk_plot_canvas_text_get_type ()) #include #include "gtkplotpc.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GtkPlotCanvasText GtkPlotCanvasText; typedef struct _GtkPlotCanvasTextClass GtkPlotCanvasTextClass; /** * GtkPlotCanvasText: * * The GtkPlotCanvasText struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvasText { GtkPlotCanvasChild parent; GtkPlotText text; }; struct _GtkPlotCanvasTextClass { GtkPlotCanvasChildClass parent_class; }; GType gtk_plot_canvas_text_get_type (void); GtkPlotCanvasChild * gtk_plot_canvas_text_new (const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text); void gtk_plot_canvas_text_set_attributes (GtkPlotCanvasText *text, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANVAS_TEXT_H__ */ gtkextra-3.2.0/gtkextra/gtkplotcsurface.h0000644000076400001440000001150212603754176015502 00000000000000/* gtkplotcsurface - csurface plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CSURFACE_H__ #define __GTK_PLOT_CSURFACE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #include "gtkplotdt.h" #include "gtkplotsurface.h" #include "gtkplotpc.h" #define GTK_PLOT_CSURFACE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_csurface_get_type (), GtkPlotCSurface) #define G_TYPE_PLOT_CSURFACE (gtk_plot_csurface_get_type ()) #define GTK_PLOT_CSURFACE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_csurface_get_type, GtkPlotCSurfaceClass) #define GTK_IS_PLOT_CSURFACE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_csurface_get_type ()) typedef struct _GtkPlotCSurface GtkPlotCSurface; typedef struct _GtkPlotCSurfaceClass GtkPlotCSurfaceClass; typedef enum { GTK_PLOT_PROJECT_NONE, /* draw surface with no projections */ GTK_PLOT_PROJECT_EMPTY, /* draw empty contours -- lines only. Notice that the style of the lines is given by levels/sublevels_line. You should set to GTK_PLOT_LINE_NONE if you don't want the lines drawn */ GTK_PLOT_PROJECT_FULL, /* draw filled contours */ } GtkPlotProjection; /** * GtkPlotCSurface: * * The GtkPlotCSurface struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCSurface { GtkPlotSurface surface; gboolean lines_visible; /* show contour level lines -- for 3d only */ /* for 2d it is given by projection and line style */ GtkPlotProjection projection; /* project on x-y plane */ /* all fields below this line are for 2d contours */ GList *levels; /* polygons corrsponding to each contour level */ GList *bg_triangles; /* background triangles, drawn before the contour levels, that are not cut by any contour line */ GtkPlotLine levels_line; GtkPlotLine sublevels_line; }; struct _GtkPlotCSurfaceClass { GtkPlotSurfaceClass parent_class; }; /* PlotCSurface */ GType gtk_plot_csurface_get_type (void); GtkWidget* gtk_plot_csurface_new (void); GtkWidget* gtk_plot_csurface_new_function (GtkPlotFunc3D function); void gtk_plot_csurface_construct_function (GtkPlotCSurface *csurface, GtkPlotFunc3D function); void gtk_plot_csurface_set_lines_visible (GtkPlotCSurface *csurface, gboolean visible); gboolean gtk_plot_csurface_get_lines_visible (GtkPlotCSurface *csurface); void gtk_plot_csurface_set_projection (GtkPlotCSurface *csurface, GtkPlotProjection proj); GtkPlotProjection gtk_plot_csurface_projection (GtkPlotCSurface *csurface); void gtk_plot_csurface_set_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_csurface_set_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_csurface_get_levels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); void gtk_plot_csurface_get_sublevels_attributes (GtkPlotCSurface *dataset, GtkPlotLineStyle *style, gfloat *width, GdkColor *color); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CSURFACE_H__ */ gtkextra-3.2.0/gtkextra/gtkplotcanvasellipse.h0000644000076400001440000000540512603754176016545 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANVAS_ELLIPSE_H__ #define __GTK_PLOT_CANVAS_ELLIPSE_H__ #define GTK_PLOT_CANVAS_ELLIPSE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_ellipse_get_type (), GtkPlotCanvasEllipse) #define GTK_PLOT_CANVAS_ELLIPSE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_ellipse_get_type(), GtkPlotCanvasEllipseClass) #define GTK_IS_PLOT_CANVAS_ELLIPSE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_ellipse_get_type ()) #define G_TYPE_PLOT_CANVAS_ELLIPSE (gtk_plot_canvas_ellipse_get_type ()) #include #include "gtkplotpc.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GtkPlotCanvasEllipse GtkPlotCanvasEllipse; typedef struct _GtkPlotCanvasEllipseClass GtkPlotCanvasEllipseClass; /** * GtkPlotCanvasEllipse: * * The GtkPlotCanvasEllipse struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvasEllipse { GtkPlotCanvasChild parent; GtkPlotLine line; gboolean filled; GdkColor bg; }; struct _GtkPlotCanvasEllipseClass { GtkPlotCanvasChildClass parent_class; }; GType gtk_plot_canvas_ellipse_get_type (void); GtkPlotCanvasChild * gtk_plot_canvas_ellipse_new (GtkPlotLineStyle style, gfloat width, const GdkColor *fg, const GdkColor *bg, gboolean fill); void gtk_plot_canvas_ellipse_set_attributes( GtkPlotCanvasEllipse *ellipse, GtkPlotLineStyle style, gdouble width, const GdkColor *fg, const GdkColor *bg, gboolean fill); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANVAS_ELLIPSE_H__ */ gtkextra-3.2.0/gtkextra/gtkplot.c0000644000076400001440000052401112603754176013765 00000000000000/* gtkplot - 2d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplot * @short_description: 2d scientific plots widget * * GtkPlot allows to draw high quality scientific plots in two dimensions with a look and feel very similar to Microcal Origin for Windows. * The distribution includes GtkPlotCanvas subclass, and a demo program showing two layered plots with different kind of curves. * You can choose between a number of symbol types, lines, connectors -straight lines, steps, splines-, and change their attributes -color, size, width. * You can also plot functions, add error bars, edit legends, rotate and move axis titles, change axis properties, etc. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkpsfont.h" #include "gtkplotgdk.h" #include "gtkplotcairo.h" #include "gtkextra-marshal.h" #define DEFAULT_WIDTH 420 #define DEFAULT_HEIGHT 340 #define DEFAULT_FONT_HEIGHT 12 #define LABEL_MAX_LENGTH 100 #define P_(string) string static gchar DEFAULT_FONT[] = "Helvetica"; /* Signals */ extern void _gtkextra_signal_emit(GtkObject *object, guint signal_id, ...); enum { ADD_DATA, CHANGED, UPDATE, MOVED, RESIZED, PLOT_AXIS_CHANGED, LAST_SIGNAL }; enum { TICK_LABEL, AXIS_CHANGED, LAST_AXIS_SIGNAL }; enum { ARG_PLOT_0, ARG_BOTTOM, ARG_TOP, ARG_LEFT, ARG_RIGHT, ARG_ALLOCATION_X, ARG_ALLOCATION_Y, ARG_ALLOCATION_WIDTH, ARG_ALLOCATION_HEIGHT, ARG_USE_PIXMAP, ARG_BG_PIXMAP, ARG_TRANSPARENT, ARG_MAGNIFICATION, ARG_CLIP_DATA, ARG_BG, ARG_GRIDS_ON_TOP, ARG_SHOW_X0, ARG_SHOW_Y0, ARG_X0_LINE, ARG_Y0_LINE, ARG_XMIN, ARG_XMAX, ARG_YMIN, ARG_YMAX, ARG_X, ARG_Y, ARG_WIDTH, ARG_HEIGHT, ARG_XSCALE, ARG_YSCALE, ARG_REFLECT_X, ARG_REFLECT_Y, ARG_BOTTOM_ALIGN, ARG_TOP_ALIGN, ARG_LEFT_ALIGN, ARG_RIGHT_ALIGN, ARG_LEGENDS_X, ARG_LEGENDS_Y, ARG_LEGENDS_WIDTH, ARG_LEGENDS_HEIGHT, ARG_LEGENDS_BORDER, ARG_LEGENDS_LINE_WIDTH, ARG_LEGENDS_BORDER_WIDTH, ARG_LEGENDS_SHADOW_WIDTH, ARG_LEGENDS_SHOW, ARG_LEGENDS_ATTR, ARG_LEGENDS_TRANSPARENT, }; enum { ARG_AXIS_0, ARG_VISIBLE, ARG_TITLE, ARG_TITLE_VISIBLE, ARG_ORIENTATION, ARG_LINE, ARG_MAJOR_GRID, ARG_MINOR_GRID, ARG_MAJOR_MASK, ARG_MINOR_MASK, ARG_TICKS_LENGTH, ARG_TICKS_WIDTH, ARG_CUSTOM_LABELS, ARG_LABELS_OFFSET, ARG_LABELS_PREFIX, ARG_LABELS_SUFFIX, ARG_SHOW_MAJOR_GRID, ARG_SHOW_MINOR_GRID, ARG_LABELS_ATTR, ARG_LABELS_PRECISION, ARG_LABELS_STYLE, ARG_LABELS_MASK, ARG_TICKS_MIN, ARG_TICKS_MAX, ARG_TICK_LABELS, ARG_SCALE, ARG_NMAJORTICKS, ARG_NMINORTICKS, ARG_NTICKS, ARG_STEP, ARG_NMINOR, ARG_APPLY_BREAK, ARG_BREAK_SCALE, ARG_BREAK_STEP, ARG_BREAK_NMINOR, ARG_BREAK_MIN, ARG_BREAK_MAX, ARG_BREAK_POSITION, ARG_SET_LIMITS, ARG_BEGIN, ARG_END }; /* Private methods for ticks */ void gtk_plot_ticks_recalc (GtkPlotAxis *ticks); void gtk_plot_ticks_autoscale (GtkPlotAxis *ticks, gdouble xmin, gdouble xmax, gint *precision); gdouble gtk_plot_ticks_transform (GtkPlotAxis *ticks, gdouble y); gdouble gtk_plot_ticks_inverse (GtkPlotAxis *ticks, gdouble x); void gtk_plot_parse_label (GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label); static void gtk_plot_class_init (GtkPlotClass *klass); static void gtk_plot_init (GtkPlot *plot); static void gtk_plot_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_axis_class_init (GtkPlotAxisClass *klass); static void gtk_plot_axis_init (GtkPlotAxis *axis); static void gtk_plot_axis_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_axis_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_destroy (GtkObject *object); static void gtk_plot_axis_destroy (GtkObject *object); static void gtk_plot_real_set_pc (GtkPlot *plot, GtkPlotPC *pc); static void gtk_plot_real_set_drawable (GtkPlot *plot, GdkDrawable *drawable); static void gtk_plot_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_plot_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static void gtk_plot_show_all (GtkWidget *widget); static void gtk_plot_draw_grids (GtkPlot *plot); static void gtk_plot_draw_axis (GtkPlot *plot, GtkPlotAxis *axis, GtkPlotVector tick_direction); static void gtk_plot_draw_labels (GtkPlot *plot, GtkPlotAxis *axis, GtkPlotVector tick_direction); static void gtk_plot_draw_legends (GtkWidget *widget); static void gtk_plot_real_paint (GtkWidget *widget); static void gtk_plot_paint_text (GtkPlot *plot, gint x, gint y, GtkPlotText text); static void gtk_plot_real_get_pixel (GtkWidget *widget, gdouble xx, gdouble yy , gdouble *x, gdouble *y); static void gtk_plot_real_get_point (GtkWidget *widget, gint x, gint y, gdouble *px, gdouble *py); void gtk_plot_remove_dimension (GtkPlot *plot, const gchar *dimension); gint roundint (gdouble x); static void update_datasets (GtkPlot *plot, gboolean new_range); static GtkWidgetClass *parent_class = NULL; static guint plot_signals[LAST_SIGNAL] = {0}; static guint axis_signals[LAST_AXIS_SIGNAL] = {0}; GType gtk_plot_get_type (void) { static GType plot_type = 0; if (!plot_type) { plot_type = g_type_register_static_simple ( gtk_misc_get_type (), "GtkPlot", sizeof (GtkPlotClass), (GClassInitFunc) gtk_plot_class_init, sizeof (GtkPlot), (GInstanceInitFunc) gtk_plot_init, 0); } return plot_type; } static void gtk_plot_class_init (GtkPlotClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotClass *plot_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_widget_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; plot_class = (GtkPlotClass *) klass; widget_class->show_all = gtk_plot_show_all; widget_class->size_request = gtk_plot_size_request; widget_class->size_allocate = gtk_plot_size_allocate; /** * GtkPlot::add_data: * @plot: a #GtkPlot widget. * @plotdata: a #GtkPlotData. * * * * Return value: */ plot_signals[ADD_DATA] = g_signal_new("add_data", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotClass, add_data), NULL, NULL, gtkextra_BOOL__POINTER, G_TYPE_BOOLEAN, 1, G_TYPE_PLOT_DATA); /** * GtkPlot::changed: * @plot: a #GtkPlot widget. * * */ plot_signals[CHANGED] = g_signal_new("changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotClass, changed), NULL, NULL, gtkextra_VOID__VOID, G_TYPE_NONE, 0); /** * GtkPlot::update: * @plot: a #GtkPlot widget. * @new_range: * * */ plot_signals[UPDATE] = g_signal_new("update", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotClass, update), NULL, NULL, gtkextra_VOID__BOOL, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); /** * GtkPlot::moved: * @plot: a #GtkPlot widget. * @x: * @y: * * * * Return value: */ plot_signals[MOVED] = g_signal_new("moved", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotClass, moved), NULL, NULL, gtkextra_BOOL__POINTER_POINTER, G_TYPE_BOOLEAN, 2, G_TYPE_POINTER, G_TYPE_POINTER); /** * GtkPlot::resized: * @plot: a #GtkPlot widget. * @width: * @height: * * * * Return value: */ plot_signals[RESIZED] = g_signal_new("resized", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotClass, resized), NULL, NULL, gtkextra_BOOL__POINTER_POINTER, G_TYPE_BOOLEAN, 2, G_TYPE_POINTER, G_TYPE_POINTER); plot_signals[PLOT_AXIS_CHANGED] = g_signal_new("axis_changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotClass, moved), NULL, NULL, gtkextra_BOOL__POINTER, G_TYPE_BOOLEAN, 1, G_TYPE_PLOT_AXIS); object_class->destroy = gtk_plot_destroy; gobject_class->set_property = gtk_plot_set_property; gobject_class->get_property = gtk_plot_get_property; klass->changed = NULL; klass->moved = NULL; klass->resized = NULL; plot_class->set_pc = gtk_plot_real_set_pc; plot_class->set_drawable = gtk_plot_real_set_drawable; plot_class->add_data = NULL; plot_class->update = update_datasets; plot_class->plot_paint = gtk_plot_real_paint; plot_class->draw_legends = gtk_plot_draw_legends; plot_class->get_point = gtk_plot_real_get_point; plot_class->get_pixel = gtk_plot_real_get_pixel; /** * GtkPlot:bottom_axis: * * **/ g_object_class_install_property(gobject_class, ARG_BOTTOM, g_param_spec_object ("bottom_axis", P_(""), P_(""), G_TYPE_PLOT_AXIS, G_PARAM_READABLE)); /** * GtkPlot:top_axis: * * **/ g_object_class_install_property(gobject_class, ARG_TOP, g_param_spec_object ("top_axis", P_(""), P_(""), G_TYPE_PLOT_AXIS, G_PARAM_READABLE)); /** * GtkPlot:left_axis: * * **/ g_object_class_install_property(gobject_class, ARG_LEFT, g_param_spec_object ("left_axis", P_(""), P_(""), G_TYPE_PLOT_AXIS, G_PARAM_READABLE)); /** * GtkPlot:right_axis: * * **/ g_object_class_install_property(gobject_class, ARG_RIGHT, g_param_spec_object ("right_axis", P_(""), P_(""), G_TYPE_PLOT_AXIS, G_PARAM_READABLE)); /** * GtkPlot:allocation_x: * * **/ g_object_class_install_property(gobject_class, ARG_ALLOCATION_X, g_param_spec_int ("allocation_x", P_(""), P_(""), -G_MAXINT,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:allocation_y: * * **/ g_object_class_install_property(gobject_class, ARG_ALLOCATION_Y, g_param_spec_int ("allocation_y", P_(""), P_(""), -G_MAXINT,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:allocation_width: * * **/ g_object_class_install_property(gobject_class, ARG_ALLOCATION_WIDTH, g_param_spec_int ("allocation_width", P_(""), P_(""), -G_MAXINT,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:allocation_height: * * **/ g_object_class_install_property(gobject_class, ARG_ALLOCATION_HEIGHT, g_param_spec_int ("allocation_height", P_(""), P_(""), -G_MAXINT,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:use_pixmap: * * **/ g_object_class_install_property(gobject_class, ARG_USE_PIXMAP, g_param_spec_boolean ("use_pixmap", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:bg_pixmap: * * **/ g_object_class_install_property(gobject_class, ARG_BG_PIXMAP, g_param_spec_pointer ("bg_pixmap", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:transparent: * * **/ g_object_class_install_property(gobject_class, ARG_TRANSPARENT, g_param_spec_boolean ("transparent", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:magnification: * * **/ g_object_class_install_property(gobject_class, ARG_MAGNIFICATION, g_param_spec_double ("magnification", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:clip_data: * * **/ g_object_class_install_property(gobject_class, ARG_CLIP_DATA, g_param_spec_boolean ("clip_data", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:bg_color: * * **/ g_object_class_install_property(gobject_class, ARG_BG, g_param_spec_pointer ("bg_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:grids_on_top: * * **/ g_object_class_install_property(gobject_class, ARG_GRIDS_ON_TOP, g_param_spec_boolean ("grids_on_top", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:show_x0: * * **/ g_object_class_install_property(gobject_class, ARG_SHOW_X0, g_param_spec_boolean ("show_x0", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:show_y0: * * **/ g_object_class_install_property(gobject_class, ARG_SHOW_Y0, g_param_spec_boolean ("show_y0", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:x0_line: * * **/ g_object_class_install_property(gobject_class, ARG_X0_LINE, g_param_spec_pointer ("x0_line", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:y0_line: * * **/ g_object_class_install_property(gobject_class, ARG_Y0_LINE, g_param_spec_pointer ("y0_line", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:xmin: * * **/ g_object_class_install_property(gobject_class, ARG_XMIN, g_param_spec_double ("xmin", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:xmax: * * **/ g_object_class_install_property(gobject_class, ARG_XMAX, g_param_spec_double ("xmax", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:ymin: * * **/ g_object_class_install_property(gobject_class, ARG_YMIN, g_param_spec_double ("ymin", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:ymax: * * **/ g_object_class_install_property(gobject_class, ARG_YMAX, g_param_spec_double ("ymax", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:x: * * **/ g_object_class_install_property(gobject_class, ARG_X, g_param_spec_double ("x", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:y: * * **/ g_object_class_install_property(gobject_class, ARG_Y, g_param_spec_double ("y", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:width: * * **/ g_object_class_install_property(gobject_class, ARG_WIDTH, g_param_spec_double ("width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:height: * * **/ g_object_class_install_property(gobject_class, ARG_HEIGHT, g_param_spec_double ("height", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:xscale: * * **/ g_object_class_install_property(gobject_class, ARG_XSCALE, g_param_spec_int ("xscale", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:yscale: * * **/ g_object_class_install_property(gobject_class, ARG_YSCALE, g_param_spec_int ("yscale", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:reflect_x: * * **/ g_object_class_install_property(gobject_class, ARG_REFLECT_X, g_param_spec_boolean ("reflect_x", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:reflect_y: * * **/ g_object_class_install_property(gobject_class, ARG_REFLECT_Y, g_param_spec_boolean ("reflect_y", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:bottom_align: * * **/ g_object_class_install_property(gobject_class, ARG_BOTTOM_ALIGN, g_param_spec_double ("bottom_align", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:top_align: * * **/ g_object_class_install_property(gobject_class, ARG_TOP_ALIGN, g_param_spec_double ("top_align", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:left_align: * * **/ g_object_class_install_property(gobject_class, ARG_LEFT_ALIGN, g_param_spec_double ("left_align", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:right_align: * * **/ g_object_class_install_property(gobject_class, ARG_RIGHT_ALIGN, g_param_spec_double ("right_align", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_x: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_X, g_param_spec_double ("legends_x", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_y: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_Y, g_param_spec_double ("legends_y", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_width: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_WIDTH, g_param_spec_int ("legends_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_height: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_HEIGHT, g_param_spec_int ("legends_height", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_border: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_BORDER, g_param_spec_int ("legends_border", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_line_width: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_LINE_WIDTH, g_param_spec_int ("legends_line_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_border_width: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_BORDER_WIDTH, g_param_spec_int ("legends_border_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_shadow_width: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_SHADOW_WIDTH, g_param_spec_int ("legends_shadow_width", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_show: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_SHOW, g_param_spec_boolean ("legends_show", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_attr_text: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_ATTR, g_param_spec_pointer ("legends_attr_text", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlot:legends_transparent: * * **/ g_object_class_install_property(gobject_class, ARG_LEGENDS_TRANSPARENT, g_param_spec_boolean ("legends_transparent", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); } GType gtk_plot_axis_get_type (void) { static GType axis_type = 0; if (!axis_type) { axis_type = g_type_register_static_simple ( gtk_object_get_type(), "GtkPlotAxis", sizeof (GtkPlotAxisClass), (GClassInitFunc) gtk_plot_axis_class_init, sizeof (GtkPlotAxis), (GInstanceInitFunc) gtk_plot_axis_init, 0); } return axis_type; } static void gtk_plot_axis_class_init (GtkPlotAxisClass *klass) { GtkObjectClass *object_class; GtkPlotAxisClass *axis_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); object_class = (GtkObjectClass *) klass; axis_class = (GtkPlotAxisClass *) klass; /** * GtkPlotAxis::tick_label: * @axis: * @tick: * @label: * * * * Return value: */ axis_signals[TICK_LABEL] = g_signal_new("tick_label", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotAxisClass, tick_label), NULL, NULL, gtkextra_BOOL__POINTER_POINTER, G_TYPE_BOOLEAN, 2, G_TYPE_POINTER, G_TYPE_POINTER); /** * GtkPlotAxis::changed: * @axis: * * * * Return value: */ axis_signals[AXIS_CHANGED] = g_signal_new("changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotAxisClass, changed), NULL, NULL, gtkextra_VOID__VOID, G_TYPE_NONE, 0); object_class->destroy = gtk_plot_axis_destroy; gobject_class->set_property = gtk_plot_axis_set_property; gobject_class->get_property = gtk_plot_axis_get_property; axis_class->tick_label = NULL; /** * GtkPlotAxis:visible: * * **/ g_object_class_install_property(gobject_class, ARG_VISIBLE, g_param_spec_boolean ("visible", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:title_text: * * **/ g_object_class_install_property(gobject_class, ARG_TITLE, g_param_spec_pointer ("title_text", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:title_visible: * * **/ g_object_class_install_property(gobject_class, ARG_TITLE_VISIBLE, g_param_spec_boolean ("title_visible", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:orientation: * * **/ g_object_class_install_property(gobject_class, ARG_ORIENTATION, g_param_spec_int ("orientation", P_(""), P_(""), 0,2,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:line: * * **/ g_object_class_install_property(gobject_class, ARG_LINE, g_param_spec_pointer ("line", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:major_grid_line: * * **/ g_object_class_install_property(gobject_class, ARG_MAJOR_GRID, g_param_spec_pointer ("major_grid_line", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:minor_grid_line: * * **/ g_object_class_install_property(gobject_class, ARG_MINOR_GRID, g_param_spec_pointer ("minor_grid_line", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:major_mask: * * **/ g_object_class_install_property(gobject_class, ARG_MAJOR_MASK, g_param_spec_int ("major_mask", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:minor_mask: * * **/ g_object_class_install_property(gobject_class, ARG_MINOR_MASK, g_param_spec_int ("minor_mask", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:ticks_length: * * **/ g_object_class_install_property(gobject_class, ARG_TICKS_LENGTH, g_param_spec_int ("ticks_length", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:ticks_width: * * **/ g_object_class_install_property(gobject_class, ARG_TICKS_WIDTH, g_param_spec_double ("ticks_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:custom_labels: * * **/ g_object_class_install_property(gobject_class, ARG_CUSTOM_LABELS, g_param_spec_boolean ("custom_labels", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_array: * * **/ g_object_class_install_property(gobject_class, ARG_TICK_LABELS, g_param_spec_object ("labels_array", P_(""), P_(""), G_TYPE_PLOT_ARRAY, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_offset: * * **/ g_object_class_install_property(gobject_class, ARG_LABELS_OFFSET, g_param_spec_int ("labels_offset", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_prefix: * * **/ g_object_class_install_property(gobject_class, ARG_LABELS_PREFIX, g_param_spec_string ("labels_prefix", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_suffix: * * **/ g_object_class_install_property(gobject_class, ARG_LABELS_SUFFIX, g_param_spec_string ("labels_suffix", P_(""), P_(""), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:show_major_grid: * * **/ g_object_class_install_property(gobject_class, ARG_SHOW_MAJOR_GRID, g_param_spec_boolean ("show_major_grid", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:show_minor_grid: * * **/ g_object_class_install_property(gobject_class, ARG_SHOW_MINOR_GRID, g_param_spec_boolean ("show_minor_grid", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_text: * * **/ g_object_class_install_property(gobject_class, ARG_LABELS_ATTR, g_param_spec_pointer ("labels_text", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_precision: * * **/ g_object_class_install_property(gobject_class, ARG_LABELS_PRECISION, g_param_spec_int ("labels_precision", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_style: * * **/ g_object_class_install_property(gobject_class, ARG_LABELS_STYLE, g_param_spec_int ("labels_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:labels_mask: * * **/ g_object_class_install_property(gobject_class, ARG_LABELS_MASK, g_param_spec_int ("labels_mask", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:min: * * **/ g_object_class_install_property(gobject_class, ARG_TICKS_MIN, g_param_spec_double ("min", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:max: * * **/ g_object_class_install_property(gobject_class, ARG_TICKS_MAX, g_param_spec_double ("max", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:scale: * * **/ g_object_class_install_property(gobject_class, ARG_SCALE, g_param_spec_int ("scale", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:nmajorticks: * * **/ g_object_class_install_property(gobject_class, ARG_NMAJORTICKS, g_param_spec_int ("nmajorticks", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:nminorticks: * * **/ g_object_class_install_property(gobject_class, ARG_NMINORTICKS, g_param_spec_int ("nminorticks", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:nticks: * * **/ g_object_class_install_property(gobject_class, ARG_NTICKS, g_param_spec_int ("nticks", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:step: * * **/ g_object_class_install_property(gobject_class, ARG_STEP, g_param_spec_double ("step", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:nminor: * * **/ g_object_class_install_property(gobject_class, ARG_NMINOR, g_param_spec_int ("nminor", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:apply_break: * * **/ g_object_class_install_property(gobject_class, ARG_APPLY_BREAK, g_param_spec_boolean ("apply_break", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:break_scale: * * **/ g_object_class_install_property(gobject_class, ARG_BREAK_SCALE, g_param_spec_int ("break_scale", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:break_min: * * **/ g_object_class_install_property(gobject_class, ARG_BREAK_MIN, g_param_spec_double ("break_min", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:break_max: * * **/ g_object_class_install_property(gobject_class, ARG_BREAK_MAX, g_param_spec_double ("break_max", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:break_step: * * **/ g_object_class_install_property(gobject_class, ARG_BREAK_STEP, g_param_spec_double ("break_step", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:break_nminor: * * **/ g_object_class_install_property(gobject_class, ARG_BREAK_NMINOR, g_param_spec_int ("break_nminor", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:break_position: * * **/ g_object_class_install_property(gobject_class, ARG_BREAK_POSITION, g_param_spec_double ("break_position", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:set_limits: * * **/ g_object_class_install_property(gobject_class, ARG_SET_LIMITS, g_param_spec_boolean ("set_limits", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:begin: * * **/ g_object_class_install_property(gobject_class, ARG_BEGIN, g_param_spec_double ("begin", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotAxis:end: * * **/ g_object_class_install_property(gobject_class, ARG_END, g_param_spec_double ("end", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void axis_changed(GtkPlotAxis *axis, GtkPlot *plot) { g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } static void gtk_plot_init (GtkPlot *plot) { GtkWidget *widget; gtk_widget_set_has_window(GTK_WIDGET(plot), FALSE); widget = GTK_WIDGET(plot); gdk_color_black(gtk_widget_get_colormap(widget), >k_widget_get_style(widget)->black); gdk_color_white(gtk_widget_get_colormap(widget), >k_widget_get_style(widget)->white); plot->bg_pixmap = NULL; plot->transparent = FALSE; plot->clip_data = FALSE; plot->grids_on_top = FALSE; plot->reflect_x = FALSE; plot->reflect_y = FALSE; plot->magnification = 1.; plot->xmin = 0.; plot->xmax = 1.000000; plot->ymin = 0.; plot->ymax = 1.000000; plot->show_x0 = FALSE; plot->show_y0 = FALSE; plot->right = GTK_PLOT_AXIS(gtk_plot_axis_new(GTK_PLOT_AXIS_Y)); g_object_ref(GTK_OBJECT(plot->right)); g_object_ref_sink(GTK_OBJECT(plot->right)); g_object_unref(GTK_OBJECT(plot->right)); g_signal_connect(GTK_OBJECT(plot->right), "changed", (void *)axis_changed, plot); plot->left = GTK_PLOT_AXIS(gtk_plot_axis_new(GTK_PLOT_AXIS_Y)); g_object_ref(GTK_OBJECT(plot->left)); g_object_ref_sink(GTK_OBJECT(plot->left)); g_object_unref(GTK_OBJECT(plot->left)); g_signal_connect(GTK_OBJECT(plot->left), "changed", (void *)axis_changed, plot); plot->top = GTK_PLOT_AXIS(gtk_plot_axis_new(GTK_PLOT_AXIS_X)); g_object_ref(GTK_OBJECT(plot->top)); g_object_ref_sink(GTK_OBJECT(plot->top)); g_object_unref(GTK_OBJECT(plot->top)); g_signal_connect(GTK_OBJECT(plot->top), "changed", (void *)axis_changed, plot); plot->bottom = GTK_PLOT_AXIS(gtk_plot_axis_new(GTK_PLOT_AXIS_X)); g_object_ref(GTK_OBJECT(plot->bottom)); g_object_ref_sink(GTK_OBJECT(plot->bottom)); g_object_unref(GTK_OBJECT(plot->bottom)); g_signal_connect(GTK_OBJECT(plot->bottom), "changed", (void *)axis_changed, plot); plot->left->labels_attr.justification = GTK_JUSTIFY_RIGHT; plot->right->labels_attr.justification = GTK_JUSTIFY_LEFT; plot->right->title.angle = 270; gtk_plot_axis_ticks_recalc(plot->left); gtk_plot_axis_ticks_recalc(plot->right); gtk_plot_axis_ticks_recalc(plot->bottom); gtk_plot_axis_ticks_recalc(plot->top); plot->bottom_align = 0.; plot->top_align = 1.; plot->left_align = 0.; plot->right_align = 1.; plot->x0_line.line_style = GTK_PLOT_LINE_SOLID; plot->x0_line.cap_style = 0; plot->x0_line.join_style = 0; plot->x0_line.line_width = 0; plot->x0_line.color = gtk_widget_get_style(widget)->black; plot->y0_line.line_style = GTK_PLOT_LINE_SOLID; plot->y0_line.line_width = 0; plot->y0_line.cap_style = 0; plot->y0_line.join_style = 0; plot->y0_line.color = gtk_widget_get_style(widget)->black; plot->legends_x = .6; plot->legends_y = .1; plot->legends_width = 0; plot->legends_height = 0; plot->legends_line_width = 30; plot->legends_border_width = 1; plot->legends_shadow_width = 3; plot->legends_border = GTK_PLOT_BORDER_LINE; plot->show_legends = TRUE; plot->legends_attr.text = NULL; plot->legends_attr.font = g_strdup(DEFAULT_FONT); plot->legends_attr.height = DEFAULT_FONT_HEIGHT; plot->legends_attr.fg = gtk_widget_get_style(widget)->black; plot->legends_attr.bg = gtk_widget_get_style(widget)->white; plot->legends_attr.transparent = FALSE; plot->legends_attr.border = 0; plot->legends_attr.border_width = 0; plot->legends_attr.shadow_width = 0; plot->background = gtk_widget_get_style(widget)->white; plot->xscale = GTK_PLOT_SCALE_LINEAR; plot->yscale = GTK_PLOT_SCALE_LINEAR; plot->data_sets = NULL; plot->text = NULL; gtk_psfont_init(); plot->drawable = NULL; plot->pc = NULL; gtk_plot_set_pc(plot, NULL); } static void gtk_plot_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlot *plot; plot = GTK_PLOT (object); switch(prop_id){ case ARG_BOTTOM: g_value_set_object(value, GTK_OBJECT(plot->bottom)); break; case ARG_TOP: g_value_set_object(value, GTK_OBJECT(plot->top)); break; case ARG_LEFT: g_value_set_object(value, GTK_OBJECT(plot->left)); break; case ARG_RIGHT: g_value_set_object(value, GTK_OBJECT(plot->right)); break; case ARG_ALLOCATION_X: g_value_set_int(value, plot->internal_allocation.x); break; case ARG_ALLOCATION_Y: g_value_set_int(value, plot->internal_allocation.y); break; case ARG_ALLOCATION_WIDTH: g_value_set_int(value, plot->internal_allocation.width); break; case ARG_ALLOCATION_HEIGHT: g_value_set_int(value, plot->internal_allocation.height); break; case ARG_USE_PIXMAP: g_value_set_boolean(value, plot->use_pixmap); break; case ARG_BG_PIXMAP: g_value_set_pointer(value, plot->bg_pixmap); break; case ARG_TRANSPARENT: g_value_set_boolean(value, plot->transparent); break; case ARG_MAGNIFICATION: g_value_set_double(value, plot->magnification); break; case ARG_CLIP_DATA: g_value_set_boolean(value, plot->clip_data); break; case ARG_BG: g_value_set_pointer(value, &plot->background); break; case ARG_GRIDS_ON_TOP: g_value_set_boolean(value, plot->grids_on_top); break; case ARG_SHOW_X0: g_value_set_boolean(value, plot->show_x0); break; case ARG_SHOW_Y0: g_value_set_boolean(value, plot->show_y0); break; case ARG_X0_LINE: g_value_set_pointer(value, &plot->x0_line); break; case ARG_Y0_LINE: g_value_set_pointer(value, &plot->y0_line); break; case ARG_XMIN: g_value_set_double(value, plot->xmin); break; case ARG_XMAX: g_value_set_double(value, plot->xmax); break; case ARG_YMIN: g_value_set_double(value, plot->ymin); break; case ARG_YMAX: g_value_set_double(value, plot->ymax); break; case ARG_X: g_value_set_double(value, plot->x); break; case ARG_Y: g_value_set_double(value, plot->y); break; case ARG_WIDTH: g_value_set_double(value, plot->width); break; case ARG_HEIGHT: g_value_set_double(value, plot->height); break; case ARG_XSCALE: g_value_set_int(value, plot->xscale); break; case ARG_YSCALE: g_value_set_int(value, plot->yscale); break; case ARG_REFLECT_X: g_value_set_boolean(value, plot->reflect_x); break; case ARG_REFLECT_Y: g_value_set_boolean(value, plot->reflect_y); break; case ARG_BOTTOM_ALIGN: g_value_set_double(value, plot->bottom_align); break; case ARG_TOP_ALIGN: g_value_set_double(value, plot->top_align); break; case ARG_LEFT_ALIGN: g_value_set_double(value, plot->left_align); break; case ARG_RIGHT_ALIGN: g_value_set_double(value, plot->right_align); break; case ARG_LEGENDS_X: g_value_set_double(value, plot->legends_x); break; case ARG_LEGENDS_Y: g_value_set_double(value, plot->legends_y); break; case ARG_LEGENDS_WIDTH: g_value_set_int(value, plot->legends_width); break; case ARG_LEGENDS_HEIGHT: g_value_set_int(value, plot->legends_height); break; case ARG_LEGENDS_BORDER: g_value_set_int(value, plot->legends_border); break; case ARG_LEGENDS_LINE_WIDTH: g_value_set_int(value, plot->legends_line_width); break; case ARG_LEGENDS_BORDER_WIDTH: g_value_set_int(value, plot->legends_border_width); break; case ARG_LEGENDS_SHADOW_WIDTH: g_value_set_int(value, plot->legends_shadow_width); break; case ARG_LEGENDS_SHOW: g_value_set_boolean(value, plot->show_legends); break; case ARG_LEGENDS_ATTR: g_value_set_pointer(value, &plot->legends_attr); break; case ARG_LEGENDS_TRANSPARENT: g_value_set_boolean(value, plot->legends_attr.transparent); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_plot_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlot *plot; GtkPlotText *text = NULL; plot = GTK_PLOT (object); switch(prop_id){ case ARG_ALLOCATION_X: plot->internal_allocation.x = g_value_get_int(value); break; case ARG_ALLOCATION_Y: plot->internal_allocation.y = g_value_get_int(value); break; case ARG_ALLOCATION_WIDTH: plot->internal_allocation.width = g_value_get_int(value); break; case ARG_ALLOCATION_HEIGHT: plot->internal_allocation.height = g_value_get_int(value); break; case ARG_USE_PIXMAP: plot->use_pixmap = g_value_get_boolean(value); break; case ARG_BG_PIXMAP: if(plot->bg_pixmap) gdk_pixmap_unref(plot->bg_pixmap); plot->bg_pixmap = (GdkPixmap *)g_value_get_pointer(value); if(plot->bg_pixmap) gdk_pixmap_ref(plot->bg_pixmap); break; case ARG_TRANSPARENT: plot->transparent = g_value_get_boolean(value); break; case ARG_MAGNIFICATION: plot->magnification = g_value_get_double(value); break; case ARG_CLIP_DATA: plot->clip_data = g_value_get_boolean(value); break; case ARG_BG: plot->background = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_GRIDS_ON_TOP: plot->grids_on_top = g_value_get_boolean(value); break; case ARG_SHOW_X0: plot->show_x0 = g_value_get_boolean(value); break; case ARG_SHOW_Y0: plot->show_y0 = g_value_get_boolean(value); break; case ARG_X0_LINE: plot->x0_line = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_Y0_LINE: plot->y0_line = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_XMIN: plot->xmin = g_value_get_double(value); break; case ARG_XMAX: plot->xmax = g_value_get_double(value); break; case ARG_YMIN: plot->ymin = g_value_get_double(value); break; case ARG_YMAX: plot->ymax = g_value_get_double(value); break; case ARG_X: plot->x = g_value_get_double(value); break; case ARG_Y: plot->y = g_value_get_double(value); break; case ARG_WIDTH: plot->width = g_value_get_double(value); break; case ARG_HEIGHT: plot->height = g_value_get_double(value); break; case ARG_XSCALE: plot->xscale = g_value_get_int(value); break; case ARG_YSCALE: plot->yscale = g_value_get_int(value); break; case ARG_REFLECT_X: plot->reflect_x = g_value_get_boolean(value); break; case ARG_REFLECT_Y: plot->reflect_y = g_value_get_boolean(value); break; case ARG_BOTTOM_ALIGN: plot->bottom_align = g_value_get_double(value); break; case ARG_TOP_ALIGN: plot->top_align = g_value_get_double(value); break; case ARG_LEFT_ALIGN: plot->left_align = g_value_get_double(value); break; case ARG_RIGHT_ALIGN: plot->right_align = g_value_get_double(value); break; case ARG_LEGENDS_X: plot->legends_x = g_value_get_double(value); break; case ARG_LEGENDS_Y: plot->legends_y = g_value_get_double(value); break; case ARG_LEGENDS_WIDTH: plot->legends_width = g_value_get_int(value); break; case ARG_LEGENDS_HEIGHT: plot->legends_height = g_value_get_int(value); break; case ARG_LEGENDS_BORDER: plot->legends_border = g_value_get_int(value); break; case ARG_LEGENDS_LINE_WIDTH: plot->legends_line_width = g_value_get_int(value); break; case ARG_LEGENDS_BORDER_WIDTH: plot->legends_border_width = g_value_get_int(value); break; case ARG_LEGENDS_SHADOW_WIDTH: plot->legends_shadow_width = g_value_get_int(value); break; case ARG_LEGENDS_SHOW: plot->show_legends = g_value_get_boolean(value); break; case ARG_LEGENDS_ATTR: text = (GtkPlotText *)g_value_get_pointer(value); gtk_plot_legends_set_attributes(plot, text->font, text->height, &text->fg, &text->bg); break; case ARG_LEGENDS_TRANSPARENT: plot->legends_attr.transparent = g_value_get_boolean(value); break; } } /** * gtk_plot_set_pc: * @plot: a #GtkPlot widget * @pc: a #GtkPlotPc * * */ void gtk_plot_set_pc(GtkPlot *plot, GtkPlotPC *pc) { GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->set_pc(plot, pc); } static void gtk_plot_real_set_pc(GtkPlot *plot, GtkPlotPC *pc) { if(plot->pc) g_object_unref(GTK_OBJECT(plot->pc)); if(!pc){ plot->pc = (GtkPlotPC *)gtk_plot_cairo_new(NULL); g_object_ref(GTK_OBJECT(plot->pc)); g_object_ref_sink(GTK_OBJECT(plot->pc)); g_object_unref(GTK_OBJECT(plot->pc)); } else { plot->pc = pc; g_object_ref(GTK_OBJECT(plot->pc)); g_object_ref_sink(GTK_OBJECT(plot->pc)); g_object_unref(GTK_OBJECT(plot->pc)); } } static void gtk_plot_axis_init (GtkPlotAxis *axis) { GdkColor black, white; gdk_color_black(gdk_colormap_get_system(), &black); gdk_color_white(gdk_colormap_get_system(), &white); axis->ticks.nmajorticks = 0; axis->ticks.nminorticks = 0; axis->ticks.values = NULL; axis->ticks.set_limits = FALSE; axis->ticks.begin = 0; axis->ticks.end = 0; axis->ticks.step = .100000000; axis->ticks.nminor = 1; axis->ticks.scale = GTK_PLOT_SCALE_LINEAR; axis->ticks.apply_break = FALSE; axis->ticks.break_min = 0.; axis->ticks.break_max = 0.; axis->ticks.break_step = .1; axis->ticks.break_nminor = 1; axis->ticks.break_scale = GTK_PLOT_SCALE_LINEAR; axis->ticks.break_position = 0.5; axis->ticks.min = 0.0; axis->ticks.max = 1.0; axis->major_mask = GTK_PLOT_TICKS_IN; axis->minor_mask = GTK_PLOT_TICKS_IN; axis->ticks_length = 8; axis->ticks_width = 1; axis->labels_offset = 10; axis->orientation = GTK_PLOT_AXIS_X; axis->is_visible = TRUE; axis->custom_labels = FALSE; axis->line.line_style = GTK_PLOT_LINE_SOLID; axis->line.cap_style = 3; axis->line.join_style = 0; axis->line.line_width = 2; axis->line.color = black; axis->labels_attr.text = NULL; axis->labels_attr.font = g_strdup(DEFAULT_FONT); axis->labels_attr.height = DEFAULT_FONT_HEIGHT; axis->labels_attr.fg = black; axis->labels_attr.bg = white; axis->labels_attr.transparent = TRUE; axis->labels_attr.angle = 0; axis->labels_attr.border = 0; axis->labels_attr.border_width = 0; axis->labels_attr.shadow_width = 0; axis->label_mask = GTK_PLOT_LABEL_OUT; axis->label_style = GTK_PLOT_LABEL_FLOAT; axis->label_precision = 1; axis->labels_attr.justification = GTK_JUSTIFY_CENTER; axis->labels_prefix = NULL; axis->labels_suffix = NULL; axis->title.angle = 0; axis->title.justification = GTK_JUSTIFY_CENTER; axis->title.font = g_strdup(DEFAULT_FONT); axis->title.height = DEFAULT_FONT_HEIGHT; axis->title.fg = black; axis->title.bg = white; axis->title.transparent = TRUE; axis->title.text = g_strdup("Title"); axis->title.border = 0; axis->title.border_width = 0; axis->title.shadow_width = 0; axis->title_visible = TRUE; axis->direction.x = 1.; axis->direction.y = 0.; axis->direction.z = 0.; axis->show_major_grid = FALSE; axis->show_minor_grid = FALSE; axis->major_grid.line_style = GTK_PLOT_LINE_SOLID; axis->major_grid.cap_style = 0; axis->major_grid.join_style = 0; axis->major_grid.line_width = 0; axis->major_grid.color = black; axis->minor_grid.line_style = GTK_PLOT_LINE_DOTTED; axis->minor_grid.cap_style = 0; axis->minor_grid.join_style = 0; axis->minor_grid.line_width = 0; axis->minor_grid.color = black; axis->tick_labels = NULL; } static void gtk_plot_axis_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotAxis *axis; GtkPlotText *text = NULL; axis = GTK_PLOT_AXIS (object); switch(prop_id){ case ARG_VISIBLE: axis->is_visible = g_value_get_boolean(value); break; case ARG_TITLE: text = (GtkPlotText *)g_value_get_pointer(value); if(axis->title.text) g_free(axis->title.text); if(axis->title.font) g_free(axis->title.font); axis->title = *text; axis->title.text = g_strdup(text->text); axis->title.font = g_strdup(text->font); break; case ARG_TITLE_VISIBLE: axis->title_visible = g_value_get_boolean(value); break; case ARG_ORIENTATION: axis->orientation = g_value_get_int(value); break; case ARG_LINE: axis->line = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_MAJOR_GRID: axis->major_grid = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_MINOR_GRID: axis->minor_grid = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_MAJOR_MASK: axis->major_mask = g_value_get_int(value); break; case ARG_MINOR_MASK: axis->minor_mask = g_value_get_int(value); break; case ARG_TICKS_LENGTH: axis->ticks_length = g_value_get_int(value); break; case ARG_TICKS_WIDTH: axis->ticks_width = g_value_get_double(value); break; case ARG_CUSTOM_LABELS: axis->custom_labels = g_value_get_boolean(value); break; case ARG_LABELS_OFFSET: axis->labels_offset = g_value_get_int(value); break; case ARG_LABELS_PREFIX: if(axis->labels_prefix) g_free(axis->labels_prefix); axis->labels_prefix = g_strdup(g_value_get_string(value)); break; case ARG_LABELS_SUFFIX: if(axis->labels_suffix) g_free(axis->labels_suffix); axis->labels_suffix = g_strdup(g_value_get_string(value)); break; case ARG_SHOW_MAJOR_GRID: axis->show_major_grid = g_value_get_boolean(value); break; case ARG_SHOW_MINOR_GRID: axis->show_minor_grid = g_value_get_boolean(value); break; case ARG_LABELS_ATTR: text = (GtkPlotText *)g_value_get_pointer(value); if(axis->labels_attr.text) g_free(axis->labels_attr.text); if(axis->labels_attr.font) g_free(axis->labels_attr.font); axis->labels_attr = *text; axis->labels_attr.text = g_strdup(text->text); axis->labels_attr.font = g_strdup(text->font); break; case ARG_LABELS_PRECISION: axis->label_precision = g_value_get_int(value); break; case ARG_LABELS_STYLE: axis->label_style = g_value_get_int(value); break; case ARG_LABELS_MASK: axis->label_mask = g_value_get_int(value); break; case ARG_TICKS_MIN: axis->ticks.min = g_value_get_double(value); break; case ARG_TICKS_MAX: axis->ticks.max = g_value_get_double(value); break; case ARG_SCALE: axis->ticks.scale = g_value_get_int(value); break; case ARG_NMAJORTICKS: axis->ticks.nmajorticks = g_value_get_int(value); break; case ARG_NMINORTICKS: axis->ticks.nminorticks = g_value_get_int(value); break; case ARG_NTICKS: axis->ticks.nticks = g_value_get_int(value); break; case ARG_STEP: axis->ticks.step = g_value_get_double(value); break; case ARG_NMINOR: axis->ticks.nminor = g_value_get_int(value); break; case ARG_APPLY_BREAK: axis->ticks.apply_break = g_value_get_boolean(value); break; case ARG_BREAK_SCALE: axis->ticks.break_scale = g_value_get_int(value); break; case ARG_BREAK_STEP: axis->ticks.break_step = g_value_get_double(value); break; case ARG_BREAK_NMINOR: axis->ticks.break_nminor = g_value_get_int(value); break; case ARG_BREAK_MIN: axis->ticks.break_min = g_value_get_double(value); break; case ARG_BREAK_MAX: axis->ticks.break_max = g_value_get_double(value); break; case ARG_BREAK_POSITION: axis->ticks.break_position = g_value_get_double(value); break; case ARG_SET_LIMITS: axis->ticks.set_limits = g_value_get_boolean(value); break; case ARG_BEGIN: axis->ticks.begin = g_value_get_double(value); break; case ARG_END: axis->ticks.end = g_value_get_double(value); break; case ARG_TICK_LABELS: if(g_value_get_object(value)) gtk_plot_axis_set_tick_labels(axis, GTK_PLOT_ARRAY(g_value_get_object(value))); else gtk_plot_axis_set_tick_labels(axis, NULL); break; } } static void gtk_plot_axis_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotAxis *axis; axis = GTK_PLOT_AXIS (object); switch(prop_id){ case ARG_VISIBLE: g_value_set_boolean(value, axis->is_visible); break; case ARG_TITLE: g_value_set_pointer(value, &axis->title); break; case ARG_TITLE_VISIBLE: g_value_set_boolean(value, axis->title_visible); break; case ARG_ORIENTATION: g_value_set_int(value, axis->orientation); break; case ARG_LINE: g_value_set_pointer(value, &axis->line); break; case ARG_MAJOR_GRID: g_value_set_pointer(value, &axis->major_grid); break; case ARG_MINOR_GRID: g_value_set_pointer(value, &axis->minor_grid); break; case ARG_MAJOR_MASK: g_value_set_int(value, axis->major_mask); break; case ARG_MINOR_MASK: g_value_set_int(value, axis->minor_mask); break; case ARG_TICKS_LENGTH: g_value_set_int(value, axis->ticks_length); break; case ARG_TICKS_WIDTH: g_value_set_double(value, axis->ticks_width); break; case ARG_CUSTOM_LABELS: g_value_set_boolean(value, axis->custom_labels); break; case ARG_LABELS_OFFSET: g_value_set_int(value, axis->labels_offset); break; case ARG_LABELS_PREFIX: g_value_set_string(value, axis->labels_prefix); break; case ARG_LABELS_SUFFIX: g_value_set_string(value, axis->labels_suffix); break; case ARG_SHOW_MAJOR_GRID: g_value_set_boolean(value, axis->show_major_grid); break; case ARG_SHOW_MINOR_GRID: g_value_set_boolean(value, axis->show_minor_grid); break; case ARG_LABELS_ATTR: g_value_set_pointer(value, &axis->labels_attr); break; case ARG_LABELS_PRECISION: g_value_set_int(value, axis->label_precision); break; case ARG_LABELS_STYLE: g_value_set_int(value, axis->label_style); break; case ARG_LABELS_MASK: g_value_set_int(value, axis->label_mask); break; case ARG_TICKS_MIN: g_value_set_double(value, axis->ticks.min); break; case ARG_TICKS_MAX: g_value_set_double(value, axis->ticks.max); break; case ARG_SCALE: g_value_set_int(value, axis->ticks.scale); break; case ARG_NMAJORTICKS: g_value_set_int(value, axis->ticks.nmajorticks); break; case ARG_NMINORTICKS: g_value_set_int(value, axis->ticks.nminorticks); break; case ARG_NTICKS: g_value_set_int(value, axis->ticks.nticks); break; case ARG_STEP: g_value_set_double(value, axis->ticks.step); break; case ARG_NMINOR: g_value_set_int(value, axis->ticks.nminor); break; case ARG_APPLY_BREAK: g_value_set_boolean(value, axis->ticks.apply_break); break; case ARG_BREAK_SCALE: g_value_set_int(value, axis->ticks.break_scale); break; case ARG_BREAK_STEP: g_value_set_double(value, axis->ticks.break_step); break; case ARG_BREAK_NMINOR: g_value_set_int(value, axis->ticks.break_nminor); break; case ARG_BREAK_MIN: g_value_set_double(value, axis->ticks.break_min); break; case ARG_BREAK_MAX: g_value_set_double(value, axis->ticks.break_max); break; case ARG_BREAK_POSITION: g_value_set_double(value, axis->ticks.break_position); break; case ARG_SET_LIMITS: g_value_set_boolean(value, axis->ticks.set_limits); break; case ARG_BEGIN: g_value_set_double(value, axis->ticks.begin); break; case ARG_END: g_value_set_double(value, axis->ticks.end); break; case ARG_TICK_LABELS: if(axis->tick_labels) g_value_set_object(value, GTK_OBJECT(axis->tick_labels)); else g_value_set_object(value, NULL); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_plot_destroy (GtkObject *object) { GtkPlot *plot; GList *list; g_return_if_fail (object != NULL); g_return_if_fail (GTK_IS_PLOT (object)); plot = GTK_PLOT (object); if (plot->top) g_object_unref(GTK_OBJECT(plot->top)); if (plot->bottom) g_object_unref(GTK_OBJECT(plot->bottom)); if (plot->left) g_object_unref(GTK_OBJECT(plot->left)); if (plot->right) g_object_unref(GTK_OBJECT(plot->right)); plot->top = plot->bottom = plot->left = plot->right = NULL; if(plot->legends_attr.font) g_free (plot->legends_attr.font); plot->legends_attr.font = NULL; list = plot->text; while(list){ GtkPlotText *text; text = (GtkPlotText *) list->data; if(text->text) g_free(text->text); if(text->font) g_free(text->font); g_free(text); plot->text = g_list_remove_link(plot->text, list); g_list_free_1(list); list = plot->text; } plot->text = NULL; list = plot->data_sets; while(list){ g_object_unref(GTK_WIDGET(list->data)); plot->data_sets = g_list_remove_link(plot->data_sets, list); g_list_free_1(list); list = plot->data_sets; } plot->data_sets = NULL; if ( GTK_OBJECT_CLASS (parent_class)->destroy ) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); if(plot->pc) g_object_unref(GTK_OBJECT(plot->pc)); plot->pc = NULL; gtk_psfont_unref(); } static void gtk_plot_axis_destroy (GtkObject *object) { GtkPlotAxis *axis; g_return_if_fail (object != NULL); g_return_if_fail (GTK_IS_PLOT_AXIS (object)); axis = GTK_PLOT_AXIS (object); if(axis->labels_attr.font) g_free (axis->labels_attr.font); if(axis->title.font) g_free (axis->title.font); if(axis->title.text) g_free (axis->title.text); axis->labels_attr.font = NULL; axis->title.font = NULL; axis->title.text = NULL; if(axis->labels_prefix) g_free(axis->labels_prefix); if(axis->labels_suffix) g_free(axis->labels_suffix); if(axis->ticks.values){ g_free (axis->ticks.values); axis->ticks.values = NULL; } if(axis->tick_labels) g_object_unref(G_OBJECT(axis->tick_labels)); axis->tick_labels = NULL; } static void gtk_plot_show_all (GtkWidget *widget) { GtkPlot *plot; GList *list; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_PLOT (widget)); plot = GTK_PLOT (widget); list = plot->data_sets; while(list) { if (GTK_IS_WIDGET (list->data)) gtk_widget_show_all (GTK_WIDGET (list->data)); list = list->next; } gtk_widget_show (widget); } /** * gtk_plot_paint: * @plot: a #GtkPlot widget * * */ void gtk_plot_paint (GtkPlot *plot) { if(!plot->drawable) return; gtk_plot_pc_init(plot->pc); GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->plot_paint(GTK_WIDGET(plot)); gtk_plot_pc_leave(plot->pc); } static void gtk_plot_real_paint (GtkWidget *widget) { GtkPlot *plot; GtkPlotText *child_text; GtkStyle *style; GdkPixmap *pixmap; GList *dataset; GList *text; gint width, height; gint xoffset, yoffset ; plot = GTK_PLOT(widget); xoffset = plot->internal_allocation.x; yoffset = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; style = gtk_widget_get_style(widget); pixmap = plot->drawable; gtk_plot_pc_gsave(plot->pc); gtk_plot_pc_set_color(plot->pc, &plot->background); if(!gtk_plot_is_transparent(plot) && !plot->bg_pixmap) gtk_plot_pc_draw_rectangle (plot->pc, TRUE, xoffset, yoffset, width , height); if(!gtk_plot_is_transparent(plot) && plot->bg_pixmap){ gint pwidth, pheight; gdouble scale_x, scale_y; gdk_window_get_size(plot->bg_pixmap, &pwidth, &pheight); scale_x = (gdouble)width / (gdouble)pwidth; scale_y = (gdouble)height / (gdouble)pheight; gtk_plot_pc_draw_pixmap (plot->pc, plot->bg_pixmap, NULL, 0, 0, xoffset, yoffset, pwidth , pheight, scale_x, scale_y); } /* draw frame to guide the eyes*/ /* gtk_plot_pc_draw_rectangle (plot->pc, FALSE, xoffset, yoffset, width , height); */ /* draw the ticks & grid lines */ gtk_plot_axis_ticks_recalc(plot->left); gtk_plot_axis_ticks_recalc(plot->right); gtk_plot_axis_ticks_recalc(plot->bottom); gtk_plot_axis_ticks_recalc(plot->top); if(!plot->grids_on_top) gtk_plot_draw_grids(plot); else { dataset = plot->data_sets; while(dataset) { if(GTK_IS_PLOT_DATA(dataset->data)) gtk_plot_data_paint(GTK_PLOT_DATA(dataset->data)); dataset = dataset->next; } } if(plot->bottom->is_visible) { GtkPlotVector tick; gboolean reflect; tick.x = 0.; tick.y = -1.; plot->bottom->origin.x = plot->xmin; plot->bottom->origin.y = plot->ymin*(1.0-plot->bottom_align) + plot->ymax*plot->bottom_align; reflect = plot->reflect_y; plot->reflect_y = FALSE; gtk_plot_draw_axis(plot, plot->bottom, tick); gtk_plot_draw_labels(plot, plot->bottom, tick); plot->reflect_y = reflect; } if(plot->top->is_visible) { GtkPlotVector tick; gboolean reflect; tick.x = 0.; tick.y = 1.; plot->top->origin.x = plot->xmin; plot->top->origin.y = plot->ymin*(1.0-plot->top_align) + plot->ymax*plot->top_align; reflect = plot->reflect_y; plot->reflect_y = FALSE; gtk_plot_draw_axis(plot, plot->top, tick); gtk_plot_draw_labels(plot, plot->top, tick); plot->reflect_y = reflect; } if(plot->left->is_visible) { GtkPlotVector tick; gboolean reflect; tick.x = 1.; tick.y = 0.; plot->left->origin.x = plot->xmin*(1.0-plot->left_align) + plot->xmax*plot->left_align; plot->left->origin.y = plot->ymin; reflect = plot->reflect_x; plot->reflect_x = FALSE; gtk_plot_draw_axis(plot, plot->left, tick); gtk_plot_draw_labels(plot, plot->left, tick); plot->reflect_x = reflect; } if(plot->right->is_visible) { GtkPlotVector tick; gboolean reflect; tick.x = -1.; tick.y = 0.; plot->right->origin.x = plot->xmin*(1.0-plot->right_align) + plot->xmax*plot->right_align; plot->right->origin.y = plot->ymin; reflect = plot->reflect_x; plot->reflect_x = FALSE; gtk_plot_draw_axis(plot, plot->right, tick); gtk_plot_draw_labels(plot, plot->right, tick); plot->reflect_x = reflect; } if(plot->grids_on_top) gtk_plot_draw_grids(plot); else { dataset = plot->data_sets; while(dataset) { if(GTK_IS_PLOT_DATA(dataset->data)) gtk_plot_data_paint(GTK_PLOT_DATA(dataset->data)); dataset = dataset->next; } } text = plot->text; while(text) { child_text = (GtkPlotText *) text->data; gtk_plot_draw_text(plot, *child_text); text = text->next; } GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->draw_legends(GTK_WIDGET(plot)); gtk_plot_pc_grestore(plot->pc); } /** * gtk_plot_refresh: * @plot: a #GtkPlot widget * @drawing_area: a GdkRectangle * * */ void gtk_plot_refresh (GtkPlot *plot, GdkRectangle *drawing_area) { GtkWidget *widget; GdkPixmap *pixmap; GdkRectangle area; GtkAllocation allocation; widget = GTK_WIDGET(plot); if(!gtk_widget_get_visible(widget)) return; if(!plot->drawable) return; pixmap = plot->drawable; gtk_widget_get_allocation(widget, &allocation); if(drawing_area == NULL){ area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; } else { area = *drawing_area; } gdk_draw_pixmap(gtk_widget_get_window(widget), gtk_widget_get_style(widget)->fg_gc[GTK_STATE_NORMAL], pixmap, area.x, area.y, allocation.x, allocation.y, allocation.width, allocation.height); } static void gtk_plot_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkPlot *plot; plot = GTK_PLOT(widget); requisition->width = DEFAULT_WIDTH; requisition->height = DEFAULT_HEIGHT; } static void gtk_plot_size_allocate (GtkWidget *widget, GtkAllocation *arg_allocation) { GtkPlot *plot; GtkAllocation allocation; plot = GTK_PLOT(widget); gtk_widget_set_allocation(widget, arg_allocation); gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); plot->internal_allocation.x = allocation.x + roundint(plot->x * allocation.width); plot->internal_allocation.y = allocation.y + roundint(plot->y * allocation.height); plot->internal_allocation.width = roundint(plot->width * allocation.width); plot->internal_allocation.height = roundint(plot->height * allocation.height); g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, FALSE); } /** * gtk_plot_axis_new: * @orientation: * * * * Return value: */ GtkObject* gtk_plot_axis_new (GtkPlotOrientation orientation) { GtkObject *axis; axis = g_object_new (gtk_plot_axis_get_type (), NULL); gtk_plot_axis_construct(GTK_PLOT_AXIS(axis), orientation); return GTK_OBJECT (axis); } /** * gtk_plot_axis_construct: * @axis: * @orientation: * * */ void gtk_plot_axis_construct(GtkPlotAxis *axis, GtkPlotOrientation orientation) { axis->orientation = orientation; axis->title.border = GTK_PLOT_BORDER_NONE; axis->title.border_width = 0; axis->title.border_space = 2; axis->title.shadow_width = 3; axis->ticks.values = NULL; axis->ticks_transform = gtk_plot_ticks_transform; axis->ticks_inverse = gtk_plot_ticks_inverse; axis->ticks_recalc = gtk_plot_ticks_recalc; axis->ticks_autoscale = gtk_plot_ticks_autoscale; axis->parse_label = gtk_plot_parse_label; switch(orientation){ case GTK_PLOT_AXIS_X: axis->direction.x = 1.0; axis->direction.y = 0.0; axis->direction.z = 0.0; g_free(axis->title.text); axis->title.text = g_strdup("X Title"); axis->title.angle = 0; break; case GTK_PLOT_AXIS_Y: axis->direction.x = 0.0; axis->direction.y = -1.0; axis->direction.z = 0.0; g_free(axis->title.text); axis->title.text = g_strdup("Y Title"); axis->title.angle = 90; break; case GTK_PLOT_AXIS_Z: axis->direction.x = 0.0; axis->direction.y = 0.0; axis->direction.z = 1.0; g_free(axis->title.text); axis->title.text = g_strdup("Z Title"); axis->title.angle = 0; break; } } /** * gtk_plot_new: * @drawable: a Gdk drawable * * * * Return value: */ GtkWidget* gtk_plot_new (GdkDrawable *drawable) { GtkWidget *plot; plot = gtk_widget_new (gtk_plot_get_type (), NULL); gtk_plot_construct(GTK_PLOT(plot), drawable); return GTK_WIDGET (plot); } /** * gtk_plot_construct: * @plot: a #GtkPlot widget * @drawable: a Gdk drawable * * */ void gtk_plot_construct(GtkPlot *plot, GdkDrawable *drawable) { GtkAllocation allocation; gtk_plot_set_drawable(plot, drawable); plot->x = .15; plot->y = .1; plot->width = .6; plot->height = .6; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); plot->internal_allocation.x = allocation.x + roundint(plot->x * allocation.width); plot->internal_allocation.y = allocation.y + roundint(plot->y * allocation.height); plot->internal_allocation.width = roundint(plot->width * allocation.width); plot->internal_allocation.height = roundint(plot->height * allocation.height); plot->left->title.x = plot->x; plot->left->title.y = plot->y + plot->height / 2.; plot->right->title.x = plot->x + plot->width; plot->right->title.y = plot->y + plot->height / 2.; plot->top->title.x = plot->x + plot->width / 2.; plot->top->title.y = plot->y; plot->bottom->title.x = plot->x + plot->width / 2.; plot->bottom->title.y = plot->y + plot->height; plot->left->title.x -= 45. / (gdouble)DEFAULT_WIDTH; plot->right->title.x += 45. / (gdouble)DEFAULT_WIDTH; plot->top->title.y -= 35. / (gdouble)DEFAULT_HEIGHT; plot->bottom->title.y += 35. / (gdouble)DEFAULT_HEIGHT; } /** * gtk_plot_new_with_size: * @drawable: a Gdk drawable * @width: plot widget width * @height: plot widget height * * Returns: the plot widget */ GtkWidget* gtk_plot_new_with_size (GdkDrawable *drawable, gdouble width, gdouble height) { GtkWidget *plot; plot = gtk_widget_new (gtk_plot_get_type (), NULL); gtk_plot_construct_with_size(GTK_PLOT(plot), drawable, width, height); return(plot); } /** * gtk_plot_construct_with_size: * @plot: a #GtkPlot widget * @drawable: a Gdk drawable * @width: * @height: * * */ void gtk_plot_construct_with_size (GtkPlot *plot, GdkDrawable *drawable, gdouble width, gdouble height) { gtk_plot_construct(plot, drawable); gtk_plot_resize (GTK_PLOT(plot), width, height); } /** * gtk_plot_set_drawable: * @plot: a #GtkPlot widget * @drawable: a Gdk drawable * * */ void gtk_plot_set_drawable (GtkPlot *plot, GdkDrawable *drawable) { GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->set_drawable(plot, drawable); } static void gtk_plot_real_set_drawable (GtkPlot *plot, GdkDrawable *drawable) { plot->drawable = drawable; if(GTK_IS_PLOT_CAIRO(plot->pc)) { if (gtk_widget_get_window(GTK_WIDGET(plot))) { gtk_plot_set_pc(plot,GTK_PLOT_PC(gtk_plot_cairo_new_with_drawable(drawable))); } } } /** * gtk_plot_get_drawable: * @plot: a #GtkPlot widget * * Return value: (transfer none) the #GdkDrawable of the plot */ GdkDrawable * gtk_plot_get_drawable (GtkPlot *plot) { return(plot->drawable); } /** * gtk_plot_set_background_pixmap: * @plot: a #GtkPlot widget * @pixmap: a Gdk pixmap * * */ void gtk_plot_set_background_pixmap (GtkPlot *plot, GdkPixmap *pixmap) { if(plot->bg_pixmap) gdk_pixmap_unref(plot->bg_pixmap); plot->bg_pixmap = pixmap; if(pixmap) gdk_pixmap_ref(pixmap); } /** * gtk_plot_set_transparent: * @plot: a #GtkPlot widget * @transparent: * * */ void gtk_plot_set_transparent (GtkPlot *plot, gboolean transparent) { plot->transparent = transparent; } /** * gtk_plot_is_transparent: * @plot: a #GtkPlot widget * * * * Return value: */ gboolean gtk_plot_is_transparent (GtkPlot *plot) { return(plot->transparent); } static void gtk_plot_draw_grids(GtkPlot *plot) { GtkWidget *widget; GdkRectangle clip_area; gdouble width, height; gdouble xp, yp; gdouble x1, y1, x2, y2; gdouble xx, yy; gdouble x_tick; gint ntick; widget = GTK_WIDGET(plot); xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; clip_area.x = xp; clip_area.y = yp; clip_area.width = width; clip_area.height = height; gtk_plot_pc_clip(plot->pc, &clip_area); if(plot->show_x0) { if(plot->xmin <= 0. && plot->xmax >= 0.) { gtk_plot_get_pixel(plot, 0., plot->ymin, &x1, &y1); gtk_plot_get_pixel(plot, 0., plot->ymax, &x2, &y2); gtk_plot_draw_line(plot, plot->x0_line, x1, y1, x2, y2); } } if(plot->show_y0) { if(plot->ymin <= 0. && plot->ymax >= 0.) { gtk_plot_get_pixel(plot, plot->xmin, 0., &x1, &y1); gtk_plot_get_pixel(plot, plot->xmax, 0., &x2, &y2); gtk_plot_draw_line(plot, plot->y0_line, x1, y1, x2, y2); } } if(plot->bottom->show_minor_grid) { for(ntick = 0; ntick < plot->bottom->ticks.nticks; ntick++){ if(!plot->bottom->ticks.values[ntick].minor) continue; if(plot->bottom->ticks.values[ntick].value >= plot->bottom->ticks.min){ x_tick = plot->bottom->ticks.values[ntick].value; xx = x_tick; yy = plot->ymin; gtk_plot_get_pixel(plot, xx, yy, &x1, &y1); xx = x_tick; yy = plot->ymax; gtk_plot_get_pixel(plot, xx, yy, &x2, &y2); gtk_plot_draw_line(plot, plot->bottom->minor_grid, x1, y1, x2, y2); } } } if(plot->bottom->show_major_grid) { for(ntick = 0; ntick < plot->bottom->ticks.nticks; ntick++){ if(plot->bottom->ticks.values[ntick].minor) continue; if(plot->bottom->ticks.values[ntick].value >= plot->bottom->ticks.min){ x_tick = plot->bottom->ticks.values[ntick].value; xx = x_tick; yy = plot->ymin; gtk_plot_get_pixel(plot, xx, yy, &x1, &y1); xx = x_tick; yy = plot->ymax; gtk_plot_get_pixel(plot, xx, yy, &x2, &y2); gtk_plot_draw_line(plot, plot->bottom->major_grid, x1, y1, x2, y2); } } } if(plot->left->show_minor_grid) { for(ntick = 0; ntick < plot->left->ticks.nticks; ntick++){ if(!plot->left->ticks.values[ntick].minor) continue; if(plot->left->ticks.values[ntick].value >= plot->left->ticks.min){ x_tick = plot->left->ticks.values[ntick].value; xx = plot->xmin; yy = x_tick; gtk_plot_get_pixel(plot, xx, yy, &x1, &y1); xx = plot->xmax; yy = x_tick; gtk_plot_get_pixel(plot, xx, yy, &x2, &y2); gtk_plot_draw_line(plot, plot->left->minor_grid, x1, y1, x2, y2); } } } if(plot->left->show_major_grid) { for(ntick = 0; ntick < plot->left->ticks.nticks; ntick++){ if(plot->left->ticks.values[ntick].minor) continue; if(plot->left->ticks.values[ntick].value >= plot->left->ticks.min){ x_tick = plot->left->ticks.values[ntick].value; xx = plot->xmin; yy = x_tick; gtk_plot_get_pixel(plot, xx, yy, &x1, &y1); xx = plot->xmax; yy = x_tick; gtk_plot_get_pixel(plot, xx, yy, &x2, &y2); gtk_plot_draw_line(plot, plot->left->major_grid, x1, y1, x2, y2); } } } gtk_plot_pc_clip(plot->pc, NULL); } static void gtk_plot_draw_axis(GtkPlot *plot, GtkPlotAxis *axis, GtkPlotVector tick_direction) { GtkWidget *widget; gdouble x_tick; gdouble xp, yp, width, height; gint ntick; gdouble m = plot->magnification; gdouble x1, y1, x2, y2; gdouble px, py; gdouble xx, yy; widget = GTK_WIDGET(plot); xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; gtk_plot_get_pixel(plot, axis->origin.x, axis->origin.y, &x1, &y1); if(axis->ticks.apply_break){ gdouble l = m * axis->ticks_length; gtk_plot_get_pixel(plot, axis->origin.x+axis->direction.x*(axis->ticks.break_min-axis->ticks.min), axis->origin.y-axis->direction.y*(axis->ticks.break_min-axis->ticks.min), &x2, &y2); gtk_plot_draw_line(plot, axis->line, x1, y1, x2, y2); x1 = x2 + axis->direction.x * 6 * m; y1 = y2 + axis->direction.y * 6 * m; gtk_plot_draw_line(plot, axis->line, x1 - axis->direction.y * l + axis->direction.x * l/2, y1 - axis->direction.x * l + axis->direction.y * l/2, x1 + axis->direction.y * l - axis->direction.x * l/2, y1 + axis->direction.x * l - axis->direction.y * l/2); gtk_plot_draw_line(plot, axis->line, x2 - axis->direction.y * l + axis->direction.x * l/2, y2 - axis->direction.x * l + axis->direction.y * l/2, x2 + axis->direction.y * l - axis->direction.x * l/2, y2 + axis->direction.x * l - axis->direction.y * l/2); gtk_plot_get_pixel(plot, axis->origin.x+axis->direction.x*(axis->ticks.max-axis->ticks.min), axis->origin.y-axis->direction.y*(axis->ticks.max-axis->ticks.min), &x2, &y2); gtk_plot_draw_line(plot, axis->line, x1, y1, x2, y2); } else { gtk_plot_get_pixel(plot, axis->origin.x+axis->direction.x*(axis->ticks.max-axis->ticks.min), axis->origin.y-axis->direction.y*(axis->ticks.max-axis->ticks.min), &x2, &y2); gtk_plot_draw_line(plot, axis->line, x1, y1, x2, y2); } if(!axis->ticks.values) return; gtk_plot_pc_set_lineattr(plot->pc, axis->ticks_width, 0, 1, 0); for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ GtkPlotTick tick = axis->ticks.values[ntick]; x_tick = tick.value; xx = -axis->direction.y * axis->origin.x + x_tick * axis->direction.x; yy = axis->direction.x * axis->origin.y - x_tick * axis->direction.y; gtk_plot_get_pixel(plot, xx, yy, &px, &py); if(!tick.minor && x_tick >= axis->ticks.min){ if(axis->major_mask & GTK_PLOT_TICKS_IN) gtk_plot_pc_draw_line(plot->pc, px, py, px + tick_direction.x * m * axis->ticks_length, py + tick_direction.y * m * axis->ticks_length); if(axis->major_mask & GTK_PLOT_TICKS_OUT) gtk_plot_pc_draw_line(plot->pc, px, py, px - tick_direction.x * m * axis->ticks_length, py - tick_direction.y * m * axis->ticks_length); } if(tick.minor && x_tick >= axis->ticks.min){ if(axis->minor_mask & GTK_PLOT_TICKS_IN) gtk_plot_pc_draw_line(plot->pc, px, py, px + tick_direction.x * m * axis->ticks_length/2., py + tick_direction.y * m * axis->ticks_length/2.); if(axis->minor_mask & GTK_PLOT_TICKS_OUT) gtk_plot_pc_draw_line(plot->pc, px, py, px - tick_direction.x * m * axis->ticks_length/2., py - tick_direction.y * m * axis->ticks_length/2.); } } } static void gtk_plot_draw_labels(GtkPlot *plot, GtkPlotAxis *axis, GtkPlotVector tick_direction) { GtkWidget *widget; GtkPlotText title, tick; gchar label[LABEL_MAX_LENGTH], new_label[LABEL_MAX_LENGTH]; gdouble x_tick; gdouble xx, yy; gint text_height; gdouble xp, yp, width, height; gint ntick; gdouble m = plot->magnification; gboolean veto = FALSE; gdouble px, py; gdouble y; gint n = 0; GtkAllocation allocation; widget = GTK_WIDGET(plot); xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; gtk_plot_pc_set_color (plot->pc, &axis->labels_attr.fg); text_height = roundint(axis->labels_attr.height*m); y = 0.0; switch(axis->labels_attr.angle){ case 0: y += text_height / 2.; break; case 90: break; case 180: y -= text_height / 2.; break; case 270: break; } if(axis->ticks.values) { tick = axis->labels_attr; for(ntick = 0; ntick < axis->ticks.nticks; ntick++){ if(axis->ticks.values[ntick].minor) continue; x_tick = axis->ticks.values[ntick].value; xx = -axis->direction.y * axis->origin.x + x_tick * axis->direction.x; yy = axis->direction.x * axis->origin.y - x_tick * axis->direction.y; gtk_plot_get_pixel(plot, xx, yy, &px, &py); if(x_tick >= axis->ticks.min-1.e-9){ if(!axis->custom_labels){ gtk_plot_axis_parse_label(axis, x_tick, axis->label_precision, axis->label_style, label); } else { veto = FALSE; _gtkextra_signal_emit(GTK_OBJECT(axis), axis_signals[TICK_LABEL], &x_tick, label, &veto); if(!veto) { if(axis->tick_labels){ gchar **array; array = gtk_plot_array_get_string(axis->tick_labels); if(array && n < gtk_plot_array_get_size(axis->tick_labels) && array[n]) { g_snprintf(label, 100, "%s", array[n++]); } else { g_snprintf(label, 100, " "); } } else { gtk_plot_axis_parse_label(axis, x_tick, axis->label_precision, axis->label_style, label); } } } if(axis->labels_prefix){ g_snprintf(new_label, 100, "%s%s", axis->labels_prefix, label); g_snprintf(label, 100, "%s", new_label); } if(axis->labels_suffix){ g_snprintf(new_label, 100, "%s%s", label, axis->labels_suffix); g_snprintf(label, 100, "%s", new_label); } tick.text = label; tick.x = px; tick.y = py + y; gtk_widget_get_allocation(widget, &allocation); if(axis->label_mask & GTK_PLOT_LABEL_IN){ tick.x = tick.x + tick_direction.x*roundint(axis->labels_offset * m); tick.y = tick.y + tick_direction.y*roundint(axis->labels_offset * m); tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(plot, tick); } if(axis->label_mask & GTK_PLOT_LABEL_OUT){ tick.x = tick.x - tick_direction.x*roundint(axis->labels_offset * m); tick.y = tick.y - tick_direction.y*roundint(axis->labels_offset * m); tick.x = (gdouble)tick.x / (gdouble)allocation.width; tick.y = (gdouble)tick.y / (gdouble)allocation.height; gtk_plot_draw_text(plot, tick); } } } } if(axis->title_visible && axis->title.text) { title = axis->title; gtk_plot_draw_text(plot, title); } } /** * gtk_plot_draw_line: * @plot: a #GtkPlot widget * @line: * @x1: * @y1: * @x2: * @y2: * * */ void gtk_plot_draw_line(GtkPlot *plot, GtkPlotLine line, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { if(line.line_style == GTK_PLOT_LINE_NONE) return; gtk_plot_set_line_attributes(plot, line); gtk_plot_pc_draw_line(plot->pc, x1, y1, x2, y2); } /** * gtk_plot_set_line_attributes: * @plot: a #GtkPlot widget * @line: * * */ void gtk_plot_set_line_attributes(GtkPlot *plot, GtkPlotLine line) { gdouble dot[] = {2., 3.}; gdouble dash[] = {6., 4.}; gdouble dot_dash[] = {6., 4., 2., 4.}; gdouble dot_dot_dash[] = {6., 4., 2., 4., 2., 4.}; gdouble dot_dash_dash[] = {6., 4., 6., 4., 2., 4.}; gtk_plot_pc_set_color (plot->pc, &line.color); switch(line.line_style){ case GTK_PLOT_LINE_SOLID: gtk_plot_pc_set_lineattr(plot->pc, line.line_width, 0, line.cap_style, line.join_style); gtk_plot_pc_set_dash(plot->pc, 0, 0, 0); break; case GTK_PLOT_LINE_DOTTED: gtk_plot_pc_set_lineattr(plot->pc, line.line_width, GDK_LINE_ON_OFF_DASH, line.cap_style, line.join_style); gtk_plot_pc_set_dash(plot->pc, 0, dot, 2); break; case GTK_PLOT_LINE_DASHED: gtk_plot_pc_set_lineattr(plot->pc, line.line_width, GDK_LINE_ON_OFF_DASH, line.cap_style, line.join_style); gtk_plot_pc_set_dash(plot->pc, 0, dash, 2); break; case GTK_PLOT_LINE_DOT_DASH: gtk_plot_pc_set_lineattr(plot->pc, line.line_width, GDK_LINE_ON_OFF_DASH, line.cap_style, line.join_style); gtk_plot_pc_set_dash(plot->pc, 0, dot_dash, 4); break; case GTK_PLOT_LINE_DOT_DOT_DASH: gtk_plot_pc_set_lineattr(plot->pc, line.line_width, GDK_LINE_ON_OFF_DASH, line.cap_style, line.join_style); gtk_plot_pc_set_dash(plot->pc, 0, dot_dot_dash, 6); break; case GTK_PLOT_LINE_DOT_DASH_DASH: gtk_plot_pc_set_lineattr(plot->pc, line.line_width, GDK_LINE_ON_OFF_DASH, line.cap_style, line.join_style); gtk_plot_pc_set_dash(plot->pc, 0, dot_dash_dash, 6); break; case GTK_PLOT_LINE_NONE: default: break; } } static void gtk_plot_draw_legends (GtkWidget *widget) { GtkPlot *plot; GList *datasets; GtkPlotData *dataset; GtkAllocation legend_area; gint x, y; gint height; gint lwidth, lheight; gdouble m; plot = GTK_PLOT(widget); if(plot->show_legends){ m = plot->magnification; gtk_plot_pc_gsave(plot->pc); /* first draw the white rectangle for the background */ legend_area = gtk_plot_legends_get_allocation(plot); if(!plot->legends_attr.transparent){ gtk_plot_pc_set_color(plot->pc, &plot->legends_attr.bg); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, legend_area.x, legend_area.y, legend_area.width, legend_area.height); } plot->legends_width = legend_area.width; plot->legends_height = legend_area.height; /* now draw the legends */ height = roundint(4 * m); y = legend_area.y + height; x = legend_area.x + roundint(4 * m); datasets = plot->data_sets; while(datasets) { dataset = GTK_PLOT_DATA(datasets->data); if(gtk_widget_get_visible(GTK_WIDGET(dataset)) && dataset->show_legend) { GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(dataset)))->get_legend_size(dataset, &lwidth, &lheight); GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(dataset)))->draw_legend(dataset, x, y); y += lheight; height += lheight; } datasets=datasets->next; } gtk_plot_pc_set_lineattr(plot->pc, plot->legends_border_width, 0, 0, 0); gtk_plot_pc_set_color(plot->pc, &plot->legends_attr.fg); gtk_plot_pc_set_dash(plot->pc, 0, 0, 0); if(plot->legends_border != GTK_PLOT_BORDER_NONE) { gtk_plot_pc_draw_rectangle(plot->pc, FALSE, legend_area.x, legend_area.y, legend_area.width, legend_area.height); } gtk_plot_pc_set_lineattr(plot->pc, 0, 0, 0, 0); if(plot->legends_border == GTK_PLOT_BORDER_SHADOW) { gtk_plot_pc_draw_rectangle(plot->pc, TRUE, legend_area.x + roundint(plot->legends_shadow_width * m), legend_area.y + legend_area.height, legend_area.width, roundint(plot->legends_shadow_width * m)); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, legend_area.x + legend_area.width, legend_area.y + roundint(plot->legends_shadow_width * m), roundint(plot->legends_shadow_width * m), legend_area.height); } gtk_plot_pc_grestore(plot->pc); } datasets = plot->data_sets; while(datasets) { dataset = GTK_PLOT_DATA(datasets->data); if(gtk_widget_get_visible(GTK_WIDGET(dataset)) && dataset->show_gradient) { GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(dataset)))->draw_gradient(dataset); } datasets=datasets->next; } } /** * gtk_plot_axis_tick_recalc: * @axis: * * */ void gtk_plot_axis_ticks_recalc (GtkPlotAxis *axis) { axis->ticks_recalc(axis); } /** * gtk_plot_axis_ticks_autoscale: * @axis: * @xmin: * @xmax: * @precision: * * */ void gtk_plot_axis_ticks_autoscale (GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision) { axis->ticks_autoscale(axis, xmin, xmax, precision); } /** * gtk_plot_axis_ticks_transform: * @axis: * @y: * * * * Return value: */ gdouble gtk_plot_axis_ticks_transform (GtkPlotAxis *axis, gdouble y) { return (axis->ticks_transform(axis, y)); } /** * gtk_plot_axis_ticks_inverse: * @axis: * @x: * * * * Return value: */ gdouble gtk_plot_axis_ticks_inverse (GtkPlotAxis *axis, gdouble x) { return (axis->ticks_inverse(axis, x)); } /** * gtk_plot_axis_parse_label: * @axis: * @val: * @precision: * @style: * @label: * * */ void gtk_plot_axis_parse_label (GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label) { axis->parse_label(axis, val, precision, style, label); } /** * gtk_plot_ticks_transform: * @axis: * @x: * * * * Return value: */ gdouble gtk_plot_ticks_transform(GtkPlotAxis *axis, gdouble x) { gdouble position = 0; GtkPlotTicks *_ticks = &axis->ticks; GtkPlotTicks ticks = *_ticks; switch( ticks.scale ){ case GTK_PLOT_SCALE_LOG10: if( x <= 0.0 || ticks.min <= 0.0 || ticks.max <= 0.0 ) return 0; if(ticks.apply_break){ if(x <= ticks.break_min) { position = log(x/ticks.min) / log(ticks.break_min / ticks.min); position *= ticks.break_position; } else { if(x <= ticks.break_max) return ticks.break_position; if(ticks.break_scale == GTK_PLOT_SCALE_LOG10) position = log(x/ticks.break_max) / log(ticks.max/ticks.break_max); else position = (x - ticks.break_max) / (ticks.max - ticks.break_max); position = ticks.break_position + (1 - ticks.break_position) * position; } } else { position = log(x/ticks.min) / log(ticks.max/ticks.min); } break; case GTK_PLOT_SCALE_LINEAR: default: if(ticks.apply_break){ if(x <= ticks.break_min) { position = (x - ticks.min) / (ticks.break_min - ticks.min); position *= ticks.break_position; } else { if(x <= ticks.break_max) return ticks.break_position; if(ticks.break_scale == GTK_PLOT_SCALE_LOG10) position = log(x/ticks.break_max) / log(ticks.max/ticks.break_max); else position = (x - ticks.break_max) / (ticks.max - ticks.break_max); position = ticks.break_position + (1 - ticks.break_position) * position; } } else { position = (x - ticks.min) / (ticks.max - ticks.min); } break; } return(position); } /** * gtk_plot_ticks_inverse: * @axis: * @x: * * * * Return value: */ gdouble gtk_plot_ticks_inverse(GtkPlotAxis *axis, gdouble x) { gdouble point = 0; GtkPlotTicks *_ticks = &axis->ticks; GtkPlotTicks ticks = *_ticks; switch(ticks.scale){ case GTK_PLOT_SCALE_LINEAR: if(ticks.apply_break){ if(x <= ticks.break_position){ point = ticks.min + x*(ticks.break_min-ticks.min)/ticks.break_position; } else { point = ticks.break_max + (x - ticks.break_position)*(ticks.max-ticks.break_max)/(1-ticks.break_position); } } else { point = ticks.min + x*(ticks.max-ticks.min); } break; case GTK_PLOT_SCALE_LOG10: /* FIXME */ if(ticks.apply_break){ if(x <= ticks.break_position){ point = ticks.min + x*(ticks.break_min-ticks.min)/ticks.break_position; } else { point = ticks.break_max + (x - ticks.break_position)*(ticks.max-ticks.break_max)/(1-ticks.break_position); } } else { point = log(ticks.min) + x*(log(ticks.max/ticks.min)); point = exp(point); } break; } return point; } gint roundint (gdouble x) { return (x+.50999999471); } /** * gtk_plot_parse_label: * @axis: * @val: * @precision: * @style: * @label: * * */ void gtk_plot_parse_label(GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label) { gdouble auxval; gint intspace = 0; gint power; gfloat v; GtkPlotScale scale = axis->ticks.scale; auxval = fabs(val); power = 0.0; if(auxval != 0.0) power = (gint)log10(auxval); v = val / pow(10.0, power); if(fabs(v) < 1.0 && v != 0.0){ v *= 10.0; power -= 1; } if(fabs(v) >= 10.0){ v /= 10.0; power += 1; } /* if(power < -12){ power = 0; v = 0.0f; } */ if(auxval > 1) intspace = (gint)log10(auxval); switch(style){ case GTK_PLOT_LABEL_EXP: sprintf (label, "%*.*E", 1, precision, val); break; case GTK_PLOT_LABEL_POW: if(scale == GTK_PLOT_SCALE_LOG10) sprintf (label, "10\\S%i", power); else sprintf (label, "%*.*f\\4x\\N10\\S%i", 1, precision, v, power); break; case GTK_PLOT_LABEL_FLOAT: default: if(fabs(val) < pow(10,-precision)) val = 0.0f; sprintf (label, "%*.*f", intspace, precision, val); } } /** * gtk_plot_draw_text: * @plot: * @text: * * */ void gtk_plot_draw_text(GtkPlot *plot, GtkPlotText text) { gint x, y; GtkAllocation allocation; if(!text.text) return; if(strlen(text.text) == 0) return; if(plot->drawable == NULL) return; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); x = text.x * allocation.width; y = text.y * allocation.height; gtk_plot_paint_text(plot, x, y, text); } static void gtk_plot_paint_text(GtkPlot *plot, gint x, gint y, GtkPlotText text) { gdouble m = plot->magnification; if(!text.text) return; if(strlen(text.text) == 0) return; if(plot->drawable == NULL) return; gtk_plot_pc_draw_string(plot->pc, x, y, text.angle, &text.fg, &text.bg, text.transparent, text.border, roundint(m * text.border_space), roundint(m * text.border_width), roundint(m * text.shadow_width), text.font, roundint(m * text.height), text.justification, text.text); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED],0); } /** * gtk_plot_text_get_size: * @text: * @angle: * @text_font: * @text_height: * @width: * @height: * @ascent: * @descent: * * */ void gtk_plot_text_get_size(const gchar *text, gint angle, const gchar *text_font, gint text_height, gint *width, gint *height, gint *ascent, gint *descent) { PangoFontDescription *font, *latin_font; GtkPSFont *psfont, *base_psfont, *latin_psfont; gint old_width, old_height; gboolean italic, bold; gint fontsize; gint x, y, y0; GList *family; gint numf; gchar insert_char; gchar num[4]; const gchar *aux = text; const gchar *lastchar = text; const gchar *wtext = text; const gchar *xaux = text; PangoFontMetrics *metrics = NULL; PangoLayout *layout = NULL; PangoRectangle rect; PangoContext *context; gint i = 0; if(!text || strlen(text) == 0) return; layout = pango_layout_new(context = gdk_pango_context_get_for_screen(gdk_screen_get_default())); g_object_unref(G_OBJECT(context)); pango_layout_set_text(layout, text, -1); gtk_psfont_get_families(&family, &numf); base_psfont = psfont = gtk_psfont_get_by_name(text_font); font = gtk_psfont_get_font_description(psfont, text_height); pango_layout_get_extents(layout, NULL, &rect); old_width = PANGO_PIXELS(rect.width); old_height = PANGO_PIXELS(rect.height); italic = psfont->italic; bold = psfont->bold; fontsize = text_height; if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); latin_font = gtk_psfont_get_font_description(latin_psfont, text_height); } else { latin_font = NULL; latin_psfont = NULL; } metrics = pango_context_get_metrics(pango_layout_get_context(layout), font, gtk_get_default_language()); y0 = y = PANGO_PIXELS(pango_font_metrics_get_ascent(metrics)); y0 = y = 0; x = 0; old_width = 0; *ascent = PANGO_PIXELS(pango_font_metrics_get_ascent(metrics)); *descent = PANGO_PIXELS(pango_font_metrics_get_descent(metrics)); aux = wtext = text; while(aux && *aux != '\0' && *aux != '\n'){ if(*aux == '\\'){ aux = g_utf8_next_char(aux); switch(*aux){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '9': psfont = gtk_psfont_get_by_family((gchar *)g_list_nth_data(family, *aux-'0'), italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); /* The 0th-9th data of family is supposed to be a built-in Latin font defined in font_data[], so this code is not needed unless the font_data[] is modified. if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); gdk_font_unref(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } */ aux = g_utf8_next_char(aux); break; case '8': case 'g': psfont = gtk_psfont_get_by_family("Symbol", italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); /* The code commented out above might be needed here if the font_data[] is modified. */ aux = g_utf8_next_char(aux); break; case 'B': bold = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'i': italic = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'S': case '^': fontsize = (int)((gdouble)fontsize * 0.6 + 0.5); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); pango_font_metrics_unref(metrics); metrics = pango_context_get_metrics(pango_layout_get_context(layout), font, gtk_get_default_language()); y += PANGO_PIXELS(pango_font_metrics_get_ascent(metrics)); if (psfont->i18n_latinfamily) { if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 's': case '_': fontsize = (int)((gdouble)fontsize * 0.6 + 0.5); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); pango_font_metrics_unref(metrics); metrics = pango_context_get_metrics(pango_layout_get_context(layout), font, gtk_get_default_language()); y -= PANGO_PIXELS(pango_font_metrics_get_descent(metrics)); if (psfont->i18n_latinfamily) { if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case '+': fontsize += 3; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily){ if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case '-': fontsize -= 3; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily){ if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'N': psfont = base_psfont; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, text_height); y = y0; italic = psfont->italic; bold = psfont->bold; fontsize = text_height; if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'b': if(lastchar){ const gchar *aux2 = lastchar; gint i = g_utf8_next_char(aux) - aux2; pango_layout_set_text(layout, lastchar, i); pango_layout_get_extents(layout, NULL, &rect); x -= PANGO_PIXELS(rect.width); if (lastchar == wtext) lastchar = NULL; else lastchar--; } else { pango_layout_set_text(layout, "X", 1); pango_layout_get_extents(layout, NULL, &rect); x -= PANGO_PIXELS(rect.width); } aux = g_utf8_next_char(aux); break; case 'x': xaux = aux + 1; for (i=0; i<3; i++){ if (xaux[i] >= '0' && xaux[i] <= '9') num[i] = xaux[i]; else break; } if (i < 3){ aux++; break; } num[3] = '\0'; insert_char = (gchar)atoi(num); /* \xNNN is always outputted with latin fonts. */ pango_layout_set_font_description(layout, font); pango_layout_set_text(layout, aux, 1); pango_layout_get_extents(layout, NULL, &rect); x += PANGO_PIXELS(rect.width); aux += 4; lastchar = aux - 1; break; default: if(aux && *aux != '\0' && *aux !='\n'){ const gchar *aux2 = aux; gint i = g_utf8_next_char(aux) - aux2; pango_layout_set_font_description(layout, font); pango_layout_set_text(layout, aux, i); pango_layout_get_extents(layout, NULL, &rect); x += PANGO_PIXELS(rect.width); lastchar = aux; aux = g_utf8_next_char(aux); } break; } } else { if(aux && *aux != '\0' && *aux != '\n'){ const gchar *aux2 = aux; gint i = g_utf8_next_char(aux) - aux2; pango_layout_set_font_description(layout, font); pango_layout_set_text(layout, aux, i); pango_layout_get_extents(layout, NULL, &rect); x += PANGO_PIXELS(rect.width); lastchar = aux; aux = g_utf8_next_char(aux); if(x > old_width) old_width = x; } } } pango_font_description_free(font); if(latin_font) pango_font_description_free(latin_font); pango_font_metrics_unref(metrics); g_object_unref(G_OBJECT(layout)); old_height = *ascent + *descent; *width = old_width; *height = old_height; if(angle == 90 || angle == 270) { *width = old_height; *height = old_width; } } /** * gtk_plot_text_get_area: * @text: * @angle: * @just: * @font_name: * @font_size: * @x: * @y: * @width: * @height: * * */ void gtk_plot_text_get_area(const gchar *text, gint angle, GtkJustification just, const gchar *font_name, gint font_size, gint *x, gint *y, gint *width, gint *height) { gint ascent, descent; if(text == NULL) return; gtk_plot_text_get_size(text, angle, font_name, font_size, width, height, &ascent, &descent); *x = 0; *y = 0; switch(just){ case GTK_JUSTIFY_LEFT: switch(angle){ case 0: *y -= ascent; break; case 90: *y -= *height; *x -= ascent; break; case 180: *x -= *width; *y -= descent; break; case 270: *x -= descent; break; } break; case GTK_JUSTIFY_RIGHT: switch(angle){ case 0: *x -= *width; *y -= ascent; break; case 90: *x -= ascent; break; case 180: *y -= descent; break; case 270: *y -= *height; *x -= descent; break; } break; case GTK_JUSTIFY_CENTER: default: switch(angle){ case 0: *x -= *width / 2.; *y -= ascent; break; case 90: *x -= ascent; *y -= *height / 2.; break; case 180: *x -= *width / 2.; *y -= descent; break; case 270: *x -= descent; *y -= *height / 2.; break; } } } /****************************************** * gtk_plot_clip_data * gtk_plot_get_position * gtk_plot_get_size * gtk_plot_get_internal_allocation * gtk_plot_set_background * gtk_plot_move * gtk_plot_resize * gtk_plot_move_resize * gtk_plot_get_pixel * gtk_plot_get_point * gtk_plot_real_get_pixel * gtk_plot_set_xscale * gtk_plot_set_yscale * gtk_plot_draw_text ******************************************/ /** * gtk_plot_clip_data: * @plot: a #GtkPlot widget. * @clip: * * */ void gtk_plot_clip_data (GtkPlot *plot, gboolean clip) { plot->clip_data = clip; } /** * gtk_plot_get_position: * @plot: a #GtkPlot widget. * @x: * @y * * */ void gtk_plot_get_position (GtkPlot *plot, gdouble *x, gdouble *y) { *x = plot->x; *y = plot->y; } /** * gtk_plot_get_size: * @width: * @height: * * */ void gtk_plot_get_size (GtkPlot *plot, gdouble *width, gdouble *height) { *width = plot->width; *height = plot->height; } /** * gtk_plot_get_internal_allocation: * @plot: a #GtkPlot widget. * * Return value: (transfer none) internal_allocation */ GtkAllocation gtk_plot_get_internal_allocation (GtkPlot *plot) { return(plot->internal_allocation); } /** * gtk_plot_set_background: * @plot: a #GtkPlot widget. * @bg_color: * * */ void gtk_plot_set_background(GtkPlot *plot, const GdkColor *bg_color) { plot->background = *bg_color; gtk_plot_paint(plot); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED],0); } /** * gtk_plot_clip_move: * @x: * @y: * * */ void gtk_plot_move (GtkPlot *plot, gdouble x, gdouble y) { gboolean veto = TRUE; GtkAllocation allocation; _gtkextra_signal_emit (GTK_OBJECT(plot), plot_signals[MOVED], &x, &y, &veto); if(!veto) return; plot->left->title.x += (x - plot->x); plot->left->title.y += (y - plot->y); plot->right->title.x += (x - plot->x); plot->right->title.y += (y - plot->y); plot->top->title.x += (x - plot->x); plot->top->title.y += (y - plot->y); plot->bottom->title.x += (x - plot->x); plot->bottom->title.y += (y - plot->y); plot->x = x; plot->y = y; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); plot->internal_allocation.x = allocation.x + roundint(plot->x * allocation.width); plot->internal_allocation.y = allocation.y + roundint(plot->y * allocation.height); plot->internal_allocation.width = roundint(plot->width * allocation.width); plot->internal_allocation.height = roundint(plot->height * allocation.height); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_resize: * @plot: a #GtkPlot widget.a #GtkPlot widget. * @width: * @height: * * */ void gtk_plot_resize (GtkPlot *plot, gdouble width, gdouble height) { gboolean veto = TRUE; GtkAllocation allocation; _gtkextra_signal_emit (GTK_OBJECT(plot), plot_signals[RESIZED], &width, &height, &veto); if(!veto) return; plot->left->title.y += (height - plot->height) / 2.; plot->right->title.x += (width - plot->width); plot->right->title.y += (height - plot->height) / 2.; plot->top->title.x += (width - plot->width) / 2.; plot->bottom->title.x += (width - plot->width) / 2.; plot->bottom->title.y += (height - plot->height); plot->width = width; plot->height = height; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); plot->internal_allocation.x = allocation.x + roundint(plot->x * allocation.width); plot->internal_allocation.y = allocation.y + roundint(plot->y * allocation.height); plot->internal_allocation.width = roundint(plot->width * allocation.width); plot->internal_allocation.height = roundint(plot->height * allocation.height); g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, FALSE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_set_magnification: * @plot: a #GtkPlot widget. * @magnification: * * */ void gtk_plot_set_magnification (GtkPlot *plot, gdouble magnification) { GtkWidget *widget; GtkAllocation allocation; widget = GTK_WIDGET(plot); plot->magnification = magnification; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); plot->internal_allocation.x = allocation.x + roundint(plot->x * allocation.width); plot->internal_allocation.y = allocation.y + roundint(plot->y * allocation.height); plot->internal_allocation.width = roundint(plot->width * allocation.width); plot->internal_allocation.height = roundint(plot->height * allocation.height); g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, FALSE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_move_resize: * @plot: a #GtkPlot widget. * @x: * @y: * @width: * @height: * * */ void gtk_plot_move_resize (GtkPlot *plot, gdouble x, gdouble y, gdouble width, gdouble height) { gtk_plot_move(plot, x, y); gtk_plot_resize(plot, width, height); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_get_pixel: * @plot: a #GtkPlot widget. * @xx: * @yy: * @x: * @y: * * */ void gtk_plot_get_pixel(GtkPlot *plot, gdouble xx, gdouble yy, gdouble *x, gdouble *y) { GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->get_pixel (GTK_WIDGET(plot), xx, yy, x, y); } /** * gtk_plot_get_point: * @plot: a #GtkPlot widget. * @x: * @y: * @xx: * @yy: * * */ void gtk_plot_get_point(GtkPlot *plot, gint x, gint y, gdouble *xx, gdouble *yy) { GTK_PLOT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot)))->get_point (GTK_WIDGET(plot), x, y, xx, yy); } static void gtk_plot_real_get_pixel(GtkWidget *widget, gdouble xx, gdouble yy , gdouble *x, gdouble *y) { GtkPlot *plot; gint xp, yp, width, height; GtkAllocation allocation; plot = GTK_PLOT(widget); xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; *y = gtk_plot_ticks_transform(plot->left, yy)*height; *x = gtk_plot_ticks_transform(plot->bottom, xx)*width; gtk_widget_get_allocation(widget, &allocation); if(!plot->reflect_x) *x = allocation.x + xp + *x; else *x = allocation.x + xp + width - *x; if(!plot->reflect_y) *y = allocation.y + yp + height - *y; else *y = allocation.y + yp + *y; } static void gtk_plot_real_get_point(GtkWidget *widget, gint x, gint y, gdouble *px, gdouble *py) { GtkPlot *plot; gdouble xx, yy; gdouble xp, yp, width, height; gdouble rx, ry; GtkAllocation allocation; plot = GTK_PLOT(widget); xp = plot->internal_allocation.x; yp = plot->internal_allocation.y; width = plot->internal_allocation.width; height = plot->internal_allocation.height; gtk_widget_get_allocation(widget, &allocation); if(!plot->reflect_x) xx = x - allocation.x - xp; else xx = width - (x - allocation.x - xp); if(!plot->reflect_y) yy = allocation.y + yp + height - y; else yy = y - allocation.y - yp; rx = plot->bottom->ticks.max - plot->bottom->ticks.min; ry = plot->left->ticks.max - plot->left->ticks.min; *px = gtk_plot_axis_ticks_inverse(plot->bottom, xx / width); *py = gtk_plot_axis_ticks_inverse(plot->left, yy / height); } /** * gtk_plot_set_xrange: * @plot: a #GtkPlot widget. * @xmin: * @xmax: * * */ void gtk_plot_set_xrange (GtkPlot *plot, gdouble xmin, gdouble xmax) { if(xmin > xmax) return; plot->xmin = xmin; plot->xmax = xmax; plot->bottom->ticks.min = xmin; plot->bottom->ticks.max = xmax; plot->top->ticks.min = xmin; plot->top->ticks.max = xmax; g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, TRUE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_set_yrange: * @plot: a #GtkPlot widget. * @ymin: * @ymax: * * */ void gtk_plot_set_yrange (GtkPlot *plot, gdouble ymin, gdouble ymax) { if(ymin > ymax) return; plot->ymin = ymin; plot->ymax = ymax; plot->left->ticks.min = ymin; plot->left->ticks.max = ymax; plot->right->ticks.min = ymin; plot->right->ticks.max = ymax; g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, TRUE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_set_range: * @plot: a #GtkPlot widget. * @xmin: * @xmax: * @ymin: * @ymax: * * */ void gtk_plot_set_range (GtkPlot *plot, gdouble xmin, gdouble xmax, gdouble ymin, gdouble ymax) { if(xmin > xmax || ymin > ymax) return; plot->xmin = xmin; plot->xmax = xmax; plot->ymin = ymin; plot->ymax = ymax; plot->bottom->ticks.min = xmin; plot->bottom->ticks.max = xmax; plot->top->ticks.min = xmin; plot->top->ticks.max = xmax; plot->left->ticks.min = ymin; plot->left->ticks.max = ymax; plot->right->ticks.min = ymin; plot->right->ticks.max = ymax; gtk_plot_axis_ticks_recalc(plot->bottom); gtk_plot_axis_ticks_recalc(plot->top); gtk_plot_axis_ticks_recalc(plot->left); gtk_plot_axis_ticks_recalc(plot->right); g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, TRUE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_ticks_autoscale: * @axis: * @xmin: * @xmax: * @precision: * * */ void gtk_plot_ticks_autoscale(GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision) { GtkPlotTicks *ticks = &axis->ticks; if(xmin > xmax) return; if(ticks->scale == GTK_PLOT_SCALE_LOG10) { ticks->step = 1; ticks->nminor = 8; xmin = floor(log10(fabs(xmin))) - 1.; *precision = MAX(xmin + 1, 1); xmin = pow(10., xmin); xmax = ceil(log10(fabs(xmax))); xmax = pow(10., xmax); if(xmin == 0.0) xmin = xmax/1000.; } else { gdouble amin, amax; gdouble pmin, pmax; gdouble dx; gdouble pstep; amin = xmin; amax = xmax; if(xmin == xmax){ if(xmin == 0.0){ amax = xmax = 0.1; }else{ pstep = floor(log10(fabs(xmin))); dx = xmin/pow(10., pstep) * pow(10., pstep); amax = xmax = xmin + 2 * dx; amin = xmin = xmin - 2 * dx; } } dx = (xmax - xmin)/8.; xmin -= dx; xmax += dx; if(xmin == 0.0) xmin -= dx; if(xmax == 0.0) xmax += dx; pmin = floor(log10(fabs(xmin))) - 1.; pmax = floor(log10(fabs(xmax))) - 1.; xmin = floor(xmin/pow(10., pmin)) * pow(10., pmin); xmax = floor(xmax/pow(10., pmax)) * pow(10., pmax); pstep = floor(log10(fabs(dx))); dx = ticks->step = floor(dx/pow(10., pstep)) * pow(10., pstep); while(xmin >= amin) xmin -= dx; while(xmax <= amax) xmax += dx; dx = floor((xmax - xmin)/ticks->step); while(dx > 10.){ ticks->step *= 2; dx = floor((xmax - xmin)/ticks->step); } xmin = floor(xmin/ticks->step) * ticks->step; xmax = ceil(xmax/ticks->step) * ticks->step; ticks->step = ticks->step; *precision = MAX(floor(fabs(pstep)), 0); } ticks->min = xmin; ticks->max = xmax; gtk_plot_axis_ticks_recalc(axis); axis->label_precision = *precision; } /** * gtk_plot_autoscale: * @plot: a #GtkPlot widget. * * */ void gtk_plot_autoscale(GtkPlot *plot) { GtkPlotData *dataset; GList *list; gdouble xmin, xmax; gdouble ymin, ymax; gint n; gboolean change = FALSE; gint labels_precision; if(!plot->data_sets) return; xmin = plot->xmax; xmax = plot->xmin; ymin = plot->ymax; ymax = plot->ymin; list = plot->data_sets; while(list){ dataset = GTK_PLOT_DATA(list->data); if(!dataset->is_function){ for(n = 0; n < dataset->num_points; n++){ gdouble fx, fy, fz, fa; gdouble fdx, fdy, fdz, fda; gchar *label; gboolean error; gtk_plot_data_get_point(dataset, n, &fx, &fy, &fz, &fa, &fdx, &fdy, &fdz, &fda, &label, &error); if(fx < xmin) xmin = fx; if(fy < ymin) ymin = fy; if(fx > xmax) xmax = fx; if(fy > ymax) ymax = fy; change = TRUE; } } list = list->next; } if(!change) return; gtk_plot_axis_ticks_autoscale(plot->bottom, xmin, xmax, &labels_precision); gtk_plot_axis_ticks_autoscale(plot->left, ymin, ymax, &labels_precision); gtk_plot_axis_ticks_autoscale(plot->top, xmin, xmax, &labels_precision); gtk_plot_axis_ticks_autoscale(plot->right, ymin, ymax, &labels_precision); plot->xmin = plot->bottom->ticks.min; plot->xmax = plot->bottom->ticks.max; plot->ymin = plot->left->ticks.min; plot->ymax = plot->left->ticks.max; g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, TRUE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_get_xrange: * @plot: a #GtkPlot widget. * @xmin: * @xmax: * * */ void gtk_plot_get_xrange (GtkPlot *plot, gdouble *xmin, gdouble *xmax) { *xmax = plot->xmax; *xmin = plot->xmin; } /** * gtk_plot_get_yrange: * @plot: a #GtkPlot widget. * @ymin: * @ymax: * * */ void gtk_plot_get_yrange (GtkPlot *plot, gdouble *ymin, gdouble *ymax) { *ymax = plot->ymax; *ymin = plot->ymin; } /** * gtk_plot_set_xscale: * @plot: a #GtkPlot widget. * @scale_type: * * */ void gtk_plot_set_xscale (GtkPlot *plot, GtkPlotScale scale_type) { plot->xscale = scale_type; plot->bottom->ticks.scale = scale_type; plot->top->ticks.scale = scale_type; g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, FALSE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_set_yscale: * @plot: a #GtkPlot widget. * @scale_type: * * */ void gtk_plot_set_yscale (GtkPlot *plot, GtkPlotScale scale_type) { plot->yscale = scale_type; plot->left->ticks.scale = scale_type; plot->right->ticks.scale = scale_type; g_signal_emit (GTK_OBJECT(plot), plot_signals[UPDATE], 0, FALSE); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_get_xscale: * @plot: a #GtkPlot widget. * * * * Return value: */ GtkPlotScale gtk_plot_get_xscale (GtkPlot *plot) { return plot->bottom->ticks.scale; } /** * gtk_plot_get_yscale: * @plot: a #GtkPlot widget. * * * * Return value: */ GtkPlotScale gtk_plot_get_yscale (GtkPlot *plot) { return plot->left->ticks.scale; } /** * gtk_plot_reflect_x: * @plot: a #GtkPlot widget. * @reflect: * * */ void gtk_plot_reflect_x (GtkPlot *plot, gboolean reflect) { plot->reflect_x = reflect; } /** * gtk_plot_reflect_y: * @plot: a #GtkPlot widget. * @reflect: * * */ void gtk_plot_reflect_y (GtkPlot *plot, gboolean reflect) { plot->reflect_y = reflect; } /** * gtk_plot_is_x_reflected: * @plot: a #GtkPlot widget. * * * * Return value: */ gboolean gtk_plot_is_x_reflected (GtkPlot *plot) { return plot->reflect_x; } /** * gtk_plot_is_y_reflected: * @plot: a #GtkPlot widget. * * * * Return value: */ gboolean gtk_plot_is_y_reflected (GtkPlot *plot) { return plot->reflect_y; } /** * gtk_plot_put_text: * @plot: a #GtkPlot widget. * @x: * @y: * @font: * @height: * @angle: * @fg: * @bg: * @transparent: * @justification: * @text: * * Return value: (transfer none) the #GtkPlotText */ GtkPlotText * gtk_plot_put_text (GtkPlot *plot, gdouble x, gdouble y, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text) { GtkWidget *widget; GtkPlotText *text_attr; GdkRectangle area; GtkAllocation allocation; widget = GTK_WIDGET(plot); text_attr = g_new0(GtkPlotText, 1); gtk_widget_get_allocation(widget, &allocation); area.x = allocation.x; area.y = allocation.y; text_attr->x = x; text_attr->y = y; text_attr->angle = angle; text_attr->justification = justification; text_attr->fg = gtk_widget_get_style(widget)->black; text_attr->bg = gtk_widget_get_style(widget)->white; text_attr->transparent = transparent; text_attr->border = 0; text_attr->border_space = 2; text_attr->border_width = 0; text_attr->shadow_width = 3; if(!font) { text_attr->font = g_strdup(DEFAULT_FONT); text_attr->height = DEFAULT_FONT_HEIGHT; } else { text_attr->font = g_strdup(font); text_attr->height = height; } text_attr->text = NULL; if(text) text_attr->text = g_strdup(text); if(fg != NULL) text_attr->fg = *fg; if(bg != NULL) text_attr->bg = *bg; plot->text = g_list_append(plot->text, text_attr); gtk_plot_draw_text(plot, *text_attr); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); return text_attr; } /** * gtk_plot_text_set_attributes: * @text_attr: * @font: * @height: * @angle: * @fg: * @bg: * @transparent: * @justification: * @text: * * */ void gtk_plot_text_set_attributes (GtkPlotText *text_attr, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text) { text_attr->angle = angle; gdk_color_black(gdk_colormap_get_system(), &text_attr->fg); gdk_color_white(gdk_colormap_get_system(), &text_attr->bg); text_attr->justification = justification; text_attr->transparent = transparent; if(!font) { text_attr->font = g_strdup(DEFAULT_FONT); text_attr->height = DEFAULT_FONT_HEIGHT; } else { text_attr->font = g_strdup(font); text_attr->height = height; } if(text_attr->text) g_free(text_attr->text); text_attr->text = NULL; if(text) text_attr->text = g_strdup(text); if(bg != NULL) text_attr->bg = *bg; if(fg != NULL) text_attr->fg = *fg; } /** * gtk_plot_text_set_border: * @text: * @border: * @border_space: * @border_width: * @shadow_width: * * */ void gtk_plot_text_set_border (GtkPlotText *text, GtkPlotBorderStyle border, gint border_space, gint border_width, gint shadow_width) { if(!text) return; text->border = border; text->border_width = border_width; text->border_space = border_space; text->shadow_width = shadow_width; } /******************************************/ /** * gtk_plot_set_ticks: * @plot: a #GtkPlot widget. * @orientation: * @major_step: * @nminor: * * */ void gtk_plot_set_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step, gint nminor) { if(orientation == GTK_PLOT_AXIS_X){ gtk_plot_axis_set_ticks(plot->top, major_step, nminor); gtk_plot_axis_set_ticks(plot->bottom, major_step, nminor); } else { gtk_plot_axis_set_ticks(plot->left, major_step, nminor); gtk_plot_axis_set_ticks(plot->right, major_step, nminor); } } /** * gtk_plot_set_major_ticks: * @plot: a #GtkPlot widget. * @orientation: * @major_step: * * */ void gtk_plot_set_major_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step) { if(orientation == GTK_PLOT_AXIS_X){ gtk_plot_axis_set_major_ticks(plot->top, major_step); gtk_plot_axis_set_major_ticks(plot->bottom, major_step); } else { gtk_plot_axis_set_major_ticks(plot->left, major_step); gtk_plot_axis_set_major_ticks(plot->right, major_step); } } /** * gtk_plot_set_minor_ticks: * @plot: a #GtkPlot widget. * @orientation: * @nminor: * * */ void gtk_plot_set_minor_ticks (GtkPlot *plot, GtkPlotOrientation orientation, gint nminor) { if(orientation == GTK_PLOT_AXIS_X){ gtk_plot_axis_set_minor_ticks(plot->top, nminor); gtk_plot_axis_set_minor_ticks(plot->bottom, nminor); } else { gtk_plot_axis_set_minor_ticks(plot->left, nminor); gtk_plot_axis_set_minor_ticks(plot->right, nminor); } } /** * gtk_plot_set_ticks_limits: * @plot: a #GtkPlot widget. * @orientation: * @begin: * @end: * * */ void gtk_plot_set_ticks_limits (GtkPlot *plot, GtkPlotOrientation orientation, gdouble begin, gdouble end) { if(orientation == GTK_PLOT_AXIS_X){ gtk_plot_axis_set_ticks_limits(plot->top, begin, end); gtk_plot_axis_set_ticks_limits(plot->bottom, begin, end); } else { gtk_plot_axis_set_ticks_limits(plot->left, begin, end); gtk_plot_axis_set_ticks_limits(plot->right, begin, end); } } /** * gtk_plot_unset_ticks_limits: * @plot: a #GtkPlot widget. * @orientation: * * */ void gtk_plot_unset_ticks_limits (GtkPlot *plot, GtkPlotOrientation orientation) { if(orientation == GTK_PLOT_AXIS_X){ gtk_plot_axis_unset_ticks_limits(plot->top); gtk_plot_axis_unset_ticks_limits(plot->bottom); } else { gtk_plot_axis_unset_ticks_limits(plot->left); gtk_plot_axis_unset_ticks_limits(plot->right); } } /** * gtk_plot_set_break: * @plot: a #GtkPlot widget. * @orientation: * @min: * @max: * @step_after: * @nminor_after: * @scale_after: * @pos: * * */ void gtk_plot_set_break (GtkPlot *plot, GtkPlotOrientation orientation, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos) { if(orientation== GTK_PLOT_AXIS_X){ gtk_plot_axis_set_break(plot->top, min, max, step_after, nminor_after, scale_after, pos); gtk_plot_axis_set_break(plot->bottom, min, max, step_after, nminor_after, scale_after, pos); } else { gtk_plot_axis_set_break(plot->left, min, max, step_after, nminor_after, scale_after, pos); gtk_plot_axis_set_break(plot->right, min, max, step_after, nminor_after, scale_after, pos); } } /** * gtk_plot_remove_break: * @plot: a #GtkPlot widget. * @orientation: * * */ void gtk_plot_remove_break (GtkPlot *plot, GtkPlotOrientation orientation) { if(orientation == GTK_PLOT_AXIS_X){ gtk_plot_axis_remove_break(plot->top); gtk_plot_axis_remove_break(plot->bottom); } else { gtk_plot_axis_remove_break(plot->left); gtk_plot_axis_remove_break(plot->right); } } /****************************************** * gtk_plot_get_axis * gtk_plot_axis_set_visible * gtk_plot_axis_visible * gtk_plot_axis_set_title * gtk_plot_axis_show_title * gtk_plot_axis_hide_title * gtk_plot_axis_move_title * gtk_plot_axis_justify_title * gtk_plot_axis_show_labels * gtk_plot_axis_set_attributes * gtk_plot_axis_get_attributes * gtk_plot_axis_set_ticks * gtk_plot_axis_set_major_ticks * gtk_plot_axis_set_minor_ticks * gtk_plot_axis_set_ticks_length * gtk_plot_axis_show_ticks * gtk_plot_axis_set_ticks_limits * gtk_plot_axis_unset_ticks_limits * gtk_plot_axis_labels_set_attributes * gtk_plot_axis_labels_set_numbers ******************************************/ /** * gtk_plot_get_axis: * @plot: a #GtkPlot widget. * @axis: a #GtkPlotAxis. * * Return value: (transfer none) the #GtkPlotAxis at the given * position */ GtkPlotAxis * gtk_plot_get_axis (GtkPlot *plot, GtkPlotAxisPos axis) { GtkPlotAxis *aux = NULL; switch(axis){ case GTK_PLOT_AXIS_LEFT: aux = plot->left; break; case GTK_PLOT_AXIS_RIGHT: aux = plot->right; break; case GTK_PLOT_AXIS_TOP: aux = plot->top; break; case GTK_PLOT_AXIS_BOTTOM: aux = plot->bottom; break; } return aux; } /** * gtk_plot_axis_set_visible: * @axis: a #GtkPlotAxis. * @visible: * * */ void gtk_plot_axis_set_visible (GtkPlotAxis *axis, gboolean visible) { GtkPlotAxis *aux = axis; aux->is_visible = visible; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_visible: * @axis: a #GtkPlotAxis. * * * * Return value: */ gboolean gtk_plot_axis_visible (GtkPlotAxis *axis) { GtkPlotAxis *aux = axis; return aux->is_visible; } /** * gtk_plot_axis_set_title: * @axis: a #GtkPlotAxis. * @title * * */ void gtk_plot_axis_set_title (GtkPlotAxis *axis, const gchar *title) { GtkPlotAxis *aux = axis; if(aux->title.text) g_free(aux->title.text); aux->title.text = g_strdup(title); g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_show_title: * @axis: a #GtkPlotAxis. * * */ void gtk_plot_axis_show_title (GtkPlotAxis *axis) { GtkPlotAxis *aux = axis; aux->title_visible = TRUE; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_hide_title: * @axis: a #GtkPlotAxis. * * */ void gtk_plot_axis_hide_title (GtkPlotAxis *axis) { GtkPlotAxis *aux = axis; aux->title_visible = FALSE; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_move_title: * @axis: a #GtkPlotAxis. * @angle: * @x: * @y: * * */ void gtk_plot_axis_move_title (GtkPlotAxis *axis, gint angle, gdouble x, gdouble y) { GtkPlotAxis *aux = axis; aux->title.angle = angle; aux->title.x = x; aux->title.y = y; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_justify_title: * @axis: a #GtkPlotAxis. * @justification: * * */ void gtk_plot_axis_justify_title (GtkPlotAxis *axis, GtkJustification justification) { GtkPlotAxis *aux = axis; aux->title.justification = justification; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_attributes: * @axis: a #GtkPlotAxis. * @width: * @color: * * */ void gtk_plot_axis_set_attributes (GtkPlotAxis *axis, gfloat width, const GdkColor *color) { GtkPlotAxis *aux = axis; aux->line.line_width = width; aux->line.color = *color; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_get_attributes: * @axis: a #GtkPlotAxis. * @width: * color: * * */ void gtk_plot_axis_get_attributes (GtkPlotAxis *axis, gfloat *width, GdkColor *color) { GtkPlotAxis *aux = axis; *width = aux->line.line_width; *color = aux->line.color; } /** * gtk_plot_axis_set_ticks: * @axis: a #GtkPlotAxis. * @major_step: * @nminor: * * */ void gtk_plot_axis_set_ticks (GtkPlotAxis *axis, gdouble major_step, gint nminor) { axis->ticks.step = major_step; axis->ticks.nminor = nminor; gtk_plot_axis_ticks_recalc(axis); g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_major_ticks: * @axis: a #GtkPlotAxis. * @major_step: * * */ void gtk_plot_axis_set_major_ticks (GtkPlotAxis *axis, gdouble major_step) { axis->ticks.step = major_step; gtk_plot_axis_ticks_recalc(axis); g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_minor_ticks: * @axis: a #GtkPlotAxis. * @nminor: * * */ void gtk_plot_axis_set_minor_ticks (GtkPlotAxis *axis, gint nminor) { axis->ticks.nminor = nminor; gtk_plot_axis_ticks_recalc(axis); g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_ticks_length: * @axis: a #GtkPlotAxis. * @length: * * */ void gtk_plot_axis_set_ticks_length (GtkPlotAxis *axis, gint length) { GtkPlotAxis *aux = axis; aux->ticks_length = length; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_ticks_width: * @axis: a #GtkPlotAxis. * @width: * * */ void gtk_plot_axis_set_ticks_width (GtkPlotAxis *axis, gfloat width) { GtkPlotAxis *aux = axis; aux->ticks_width = width; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_show_ticks: * @axis: a #GtkPlotAxis. * @major_mask: * @minor_mask: * * */ void gtk_plot_axis_show_ticks (GtkPlotAxis *axis, gint major_mask, gint minor_mask) { GtkPlotAxis *aux = axis; aux->major_mask = major_mask; aux->minor_mask = minor_mask; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_ticks_limits: * @axis: a #GtkPlotAxis. * @begin: * @end: * * */ void gtk_plot_axis_set_ticks_limits (GtkPlotAxis *axis, gdouble begin, gdouble end) { if(end < begin) return; axis->ticks.begin = begin; axis->ticks.end = end; axis->ticks.set_limits = TRUE; gtk_plot_axis_ticks_recalc(axis); g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_unset_ticks_limits: * @axis: a #GtkPlotAxis. * * */ void gtk_plot_axis_unset_ticks_limits (GtkPlotAxis *axis) { axis->ticks.set_limits = FALSE; gtk_plot_axis_ticks_recalc(axis); g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_ticks_labels: * @axis: a #GtkPlotAxis. * @labels: * * */ void gtk_plot_axis_set_tick_labels (GtkPlotAxis *axis, GtkPlotArray *labels) { if(axis->tick_labels) g_object_unref(G_OBJECT(axis->tick_labels)); axis->tick_labels = labels; if(labels){ if(labels->name) g_free(labels->name); labels->name = g_strdup("tick_labels"); g_object_ref(G_OBJECT(labels)); } } /** * gtk_plot_axis_set_break: * @axis: a #GtkPlotAxis. * @min: * @max: * @step_after: * @nminor_after: * @scale_after: * @pos: * * */ void gtk_plot_axis_set_break (GtkPlotAxis *axis, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos) { axis->ticks.break_min = min; axis->ticks.break_max = max; axis->ticks.apply_break = TRUE; axis->ticks.break_step = step_after; axis->ticks.break_nminor = nminor_after; axis->ticks.break_position = pos; axis->ticks.break_scale = scale_after; gtk_plot_axis_ticks_recalc(axis); g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_remove_break: * @axis: a #GtkPlotAxis. * * */ void gtk_plot_axis_remove_break (GtkPlotAxis *axis) { axis->ticks.apply_break = FALSE; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_show_labels: * @axis: a #GtkPlotAxis. * @labels_mask: * * */ void gtk_plot_axis_show_labels (GtkPlotAxis *axis, gint labels_mask) { GtkPlotAxis *aux = axis; aux->label_mask = labels_mask; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_title_set_attributes: * @axis: a #GtkPlotAxis. * @font: * @height: * @angle: * @fg: * @bg: * @transparent: * @justification: * * */ void gtk_plot_axis_title_set_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification) { GtkPlotAxis *aux = axis; if(!font){ /* Use previous font */ /* aux->title.font = g_strdup(DEFAULT_FONT); aux->title.height = DEFAULT_FONT_HEIGHT; */ } else { if(aux->title.font) g_free(aux->title.font); aux->title.font = g_strdup(font); aux->title.height = height; } gdk_color_black(gdk_colormap_get_system(), &axis->title.fg); gdk_color_white(gdk_colormap_get_system(), &axis->title.bg); if(fg) aux->title.fg = *fg; if(bg) aux->title.bg = *bg; aux->title.angle = angle; aux->title.transparent = transparent; aux->title.justification = justification; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_labels_offset: * @axis: a #GtkPlotAxis. * @offset: * * */ void gtk_plot_axis_set_labels_offset (GtkPlotAxis *axis, gint offset) { GtkPlotAxis *aux = axis; aux->labels_offset = offset; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_get_labels_offset: * @axis: a #GtkPlotAxis. * * * * Return value: */ gint gtk_plot_axis_get_labels_offset (GtkPlotAxis *axis) { GtkPlotAxis *aux = axis; return(aux->labels_offset); } /** * gtk_plot_axis_set_labels_attributes: * @axis: a #GtkPlotAxis. * @font: * @height: * @angle: * @fg: * @bg: * @transparent: * @justification: * * */ void gtk_plot_axis_set_labels_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification) { GtkPlotAxis *aux = axis; if(!font){ /* Use previous font */ /* aux->labels_attr.font = g_strdup(DEFAULT_FONT); aux->labels_attr.height = DEFAULT_FONT_HEIGHT; */ } else { if(aux->labels_attr.font) g_free(aux->labels_attr.font); aux->labels_attr.font = g_strdup(font); aux->labels_attr.height = height; } aux->labels_attr.angle = angle; gdk_color_black(gdk_colormap_get_system(), &axis->labels_attr.fg); gdk_color_white(gdk_colormap_get_system(), &axis->labels_attr.bg); if(fg) aux->labels_attr.fg = *fg; if(bg) aux->labels_attr.bg = *bg; aux->labels_attr.transparent = transparent; aux->labels_attr.justification = justification; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_labels_style: * @axis: a #GtkPlotAxis. * @style: * @precision: * * */ void gtk_plot_axis_set_labels_style (GtkPlotAxis *axis, GtkPlotLabelStyle style, gint precision) { GtkPlotAxis *aux = axis; aux->label_style = style; aux->label_precision = precision; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_use_custom_ticks_labels: * @axis: a #GtkPlotAxis. * @use: * * */ void gtk_plot_axis_use_custom_tick_labels (GtkPlotAxis *axis, gboolean use) { axis->custom_labels = use; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_labels_prefix: * @axis: a #GtkPlotAxis. * @text: * * */ void gtk_plot_axis_set_labels_prefix (GtkPlotAxis *axis, const gchar *text) { if(axis->labels_prefix) g_free(axis->labels_prefix); if(text) axis->labels_prefix = g_strdup(text); else axis->labels_prefix = NULL; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_set_labels_suffix: * @axis: a #GtkPlotAxis. * @text: * * */ void gtk_plot_axis_set_labels_suffix (GtkPlotAxis *axis, const gchar *text) { if(axis->labels_suffix) g_free(axis->labels_suffix); if(text) axis->labels_suffix = g_strdup(text); else axis->labels_suffix = NULL; g_signal_emit (GTK_OBJECT(axis), axis_signals[AXIS_CHANGED], 0); } /** * gtk_plot_axis_get_labels_prefix: * @axis: a #GtkPlotAxis. * * * * Return value: */ gchar * gtk_plot_axis_get_labels_prefix (GtkPlotAxis *axis) { return (axis->labels_prefix); } /** * gtk_plot_axis_get_labels_suffix: * @axis: a #GtkPlotAxis. * * * * Return value: */ gchar * gtk_plot_axis_get_labels_suffix (GtkPlotAxis *axis) { return (axis->labels_suffix); } /****************************************** * gtk_plot_x0line_set_attributes * gtk_plot_y0line_set_attributes * gtk_plot_major_vgrid_set_attributes * gtk_plot_minor_vgrid_set_attributes * gtk_plot_major_hgrid_set_attributes * gtk_plot_minor_hgrid_set_attributes ******************************************/ /** * gtk_plot_x0_set_visible: * @plot: a #GtkPlot widget. * @visible: * * */ void gtk_plot_x0_set_visible(GtkPlot *plot, gboolean visible) { plot->show_x0 = visible; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_x0_visible: * @plot: a #GtkPlot widget. * * * * Return value: */ gboolean gtk_plot_x0_visible(GtkPlot *plot) { return plot->show_x0; } /** * gtk_plot_y0_set_visible: * @plot: a #GtkPlot widget. * @visible: * * */ void gtk_plot_y0_set_visible(GtkPlot *plot, gboolean visible) { plot->show_y0 = visible; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_y0_visible: * @plot: a #GtkPlot widget. * * * * Return value: */ gboolean gtk_plot_y0_visible(GtkPlot *plot) { return plot->show_y0; } /** * gtk_plot_grids_set_on_top: * @plot: a #GtkPlot widget. * @on_top: * * */ void gtk_plot_grids_set_on_top(GtkPlot *plot, gboolean on_top) { plot->grids_on_top = on_top; } /** * gtk_plot_grids_on_top: * @plot: a #GtkPlot widget. * * * * Return value: */ gboolean gtk_plot_grids_on_top(GtkPlot *plot) { return(plot->grids_on_top); } /** * gtk_plot_grids_set_visible: * @plot: a #GtkPlot widget. * @vmajor: * @vminor: * @hmajor: * @hminor: * * */ void gtk_plot_grids_set_visible(GtkPlot *plot, gboolean vmajor, gboolean vminor, gboolean hmajor, gboolean hminor) { plot->bottom->show_major_grid = vmajor; plot->bottom->show_minor_grid = vminor; plot->left->show_major_grid = hmajor; plot->left->show_minor_grid = hminor; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_grids_visible: * @plot: a #GtkPlot widget. * @vmajor: * @vminor: * @hmajor: * @hminor: * * */ void gtk_plot_grids_visible(GtkPlot *plot, gboolean *vmajor, gboolean *vminor, gboolean *hmajor, gboolean *hminor) { *vmajor = plot->bottom->show_major_grid; *vminor = plot->bottom->show_minor_grid; *hmajor = plot->left->show_major_grid; *hminor = plot->left->show_minor_grid; } /** * gtk_plot_x0line_set_visible: * @plot: a #GtkPlot widget. * @line_style: * @width: * @color: * * */ void gtk_plot_x0line_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color) { plot->x0_line.line_style = line_style; plot->x0_line.line_width = width; if(color) plot->x0_line.color = *color; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_y0line_set_attributes: * @plot: a #GtkPlot widget. * @line_style: * @width: * @color: * * */ void gtk_plot_y0line_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color) { plot->y0_line.line_style = line_style; plot->y0_line.line_width = width; if(color) plot->y0_line.color = *color; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_major_vgrid_set_Attributes: * @plot: a #GtkPlot widget. * @line_style: * @width: * @color: * * */ void gtk_plot_major_vgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color) { plot->bottom->major_grid.line_style = line_style; plot->bottom->major_grid.line_width = width; if(color) plot->bottom->major_grid.color = *color; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_minor_vgrid_set_attributes: * @plot: a #GtkPlot widget. * @line_style: * @width: * @color: * * */ void gtk_plot_minor_vgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color) { plot->bottom->minor_grid.line_style = line_style; plot->bottom->minor_grid.line_width = width; if(color) plot->bottom->minor_grid.color = *color; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_major_hgrid_set_attributes: * @plot: a #GtkPlot widget. * @line_style: * @width: * @color: * * */ void gtk_plot_major_hgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color) { plot->left->major_grid.line_style = line_style; plot->left->major_grid.line_width = width; if(color) plot->left->major_grid.color = *color; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_minor_hgrid_set_attributes: * @plot: a #GtkPlot widget. * @line_style: * @width: * @color: * * */ void gtk_plot_minor_hgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color) { plot->left->minor_grid.line_style = line_style; plot->left->minor_grid.line_width = width; if(color) plot->left->minor_grid.color = *color; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /****************************************** * gtk_plot_show_legends * gtk_plot_hide_legends * gtk_plot_show_legends_border * gtk_plot_hide_legends_border * gtk_plot_legends_move * gtk_plot_legends_get_position * gtk_plot_legends_get_allocation * gtk_plot_set_legends_attributes ******************************************/ /** * gtk_plot_show_legends: * @plot: a #GtkPlot widget. * * */ void gtk_plot_show_legends(GtkPlot *plot) { plot->show_legends = TRUE; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_hide_legends: * @plot: a #GtkPlot widget. * * */ void gtk_plot_hide_legends(GtkPlot *plot) { plot->show_legends = FALSE; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_set_legends_border: * @plot: a #GtkPlot widget. * @legends_border: * @shadow_width: * * */ void gtk_plot_set_legends_border(GtkPlot *plot, GtkPlotBorderStyle legends_border, gint shadow_width) { plot->legends_border = legends_border; plot->legends_shadow_width = shadow_width; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_legends_move: * @plot: a #GtkPlot widget. * @x: * @y: * * */ void gtk_plot_legends_move(GtkPlot *plot, gdouble x, gdouble y) { plot->legends_x = x; plot->legends_y = y; g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_legends_get_position: * @plot: a #GtkPlot widget. * @x: * @y: * */ void gtk_plot_legends_get_position(GtkPlot *plot, gdouble *x, gdouble *y) { *x = plot->legends_x; *y = plot->legends_y; } /** * gtk_plot_legends_get_allocation: * @plot: a #GtkPlot widget. * * Return value: (transfer full) the #GtkAllocation */ GtkAllocation gtk_plot_legends_get_allocation(GtkPlot *plot) { GtkAllocation allocation; GtkWidget *widget; GList *datasets; gdouble x, y, width, height; gdouble m; widget = GTK_WIDGET(plot); m = plot->magnification; gtk_widget_get_allocation(widget, &allocation); x = allocation.x + plot->x * allocation.width + plot->legends_x * plot->width * allocation.width; y = allocation.y + plot->y * allocation.height + plot->legends_y * plot->height * allocation.height; width = 24 * m; height = 8 * m; datasets = g_list_first(plot->data_sets); while(datasets) { GtkPlotData *dataset; gint lwidth, lheight; dataset = GTK_PLOT_DATA(datasets->data); if(gtk_widget_get_visible(GTK_WIDGET(dataset)) && dataset->show_legend) { GTK_PLOT_DATA_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(dataset)))->get_legend_size(dataset, &lwidth, &lheight); width = MAX(width, lwidth); height += lheight; } datasets = datasets->next; } allocation.x = roundint(x); allocation.y = roundint(y); allocation.width = roundint(width); allocation.height = roundint(height); return(allocation); } /** * gtk_plot_legends_set_attributes: * @plot: a #GtkPlot widget. * @font: * @height: * @foreground: * @background: * * */ void gtk_plot_legends_set_attributes(GtkPlot *plot, const gchar *font, gint height, const GdkColor *foreground, const GdkColor *background) { g_free(plot->legends_attr.font); if(!font) { plot->legends_attr.font = g_strdup(DEFAULT_FONT); plot->legends_attr.height = DEFAULT_FONT_HEIGHT; } else { plot->legends_attr.font = g_strdup(font); plot->legends_attr.height = height; } plot->legends_attr.fg = gtk_widget_get_style(GTK_WIDGET(plot))->black; plot->legends_attr.bg = gtk_widget_get_style(GTK_WIDGET(plot))->white; if(foreground != NULL) plot->legends_attr.fg = *foreground; plot->legends_attr.transparent = TRUE; if(background != NULL){ plot->legends_attr.bg = *background; plot->legends_attr.transparent = FALSE; } g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_legends_add_data: * @plot: a #GtkPlot widget. * @dataset: * * */ void gtk_plot_add_data(GtkPlot *plot, GtkPlotData *dataset) { gboolean veto = TRUE; _gtkextra_signal_emit (GTK_OBJECT(plot), plot_signals[ADD_DATA], dataset, &veto); plot->data_sets = g_list_append(plot->data_sets, dataset); g_object_ref(GTK_WIDGET(dataset)); g_object_ref_sink(GTK_OBJECT(dataset)); g_object_unref(GTK_OBJECT(dataset)); dataset->plot = plot; g_signal_emit_by_name (GTK_OBJECT(dataset), "add_to_plot", plot, &veto); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); } /** * gtk_plot_add_function: * @plot: a #GtkPlot widget. * @function: (scope async): the dataset generation function * * Return value: (transfer none) the #GtkPlotData */ GtkPlotData * gtk_plot_add_function(GtkPlot *plot, GtkPlotFunc function) { GtkPlotData *dataset; dataset = GTK_PLOT_DATA(gtk_plot_data_new_function(function)); gtk_plot_add_data(plot, dataset); return (dataset); } /** * gtk_plot_remove_data: * @plot: a #GtkPlot widget. * @dataset: * * * * Return value: */ gint gtk_plot_remove_data(GtkPlot *plot, GtkPlotData *dataset) { GList *datasets; gpointer data; datasets = plot->data_sets; while(datasets) { data = datasets->data; if(GTK_PLOT_DATA(data) == dataset){ g_object_unref(GTK_WIDGET(dataset)); plot->data_sets = g_list_remove_link(plot->data_sets, datasets); g_list_free_1(datasets); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); return TRUE; } datasets = datasets->next; } return FALSE; } /** * gtk_plot_remove_text: * @plot: a #GtkPlot widget. * @text: * * * * Return value: */ gint gtk_plot_remove_text(GtkPlot *plot, GtkPlotText *text) { GList *list; gpointer data; list = plot->text; while(list) { data = list->data; if((GtkPlotText *)data == text){ plot->text = g_list_remove_link(plot->text, list); g_list_free_1(list); g_signal_emit (GTK_OBJECT(plot), plot_signals[CHANGED], 0); return TRUE; } list = list->next; } return FALSE; } static void gtk_plot_real_ticks_recalc(GtkPlotTicks *ticks) { GtkPlotScale scale; gdouble min = 0., max = 0.; gdouble tick = 0.0; gdouble tick_step = 0.0; gdouble major_step; gdouble minor_step; gint nmajor = 0; gint n = 0; gdouble absmin, absmax; GtkPlotTick *major = NULL; gboolean changed = TRUE; scale = ticks->scale; max = ticks->max; min = ticks->min; absmin = min; absmax = max; if(ticks->set_limits){ max = MIN(max, ticks->end); min = MAX(min, ticks->begin); absmin = min; absmax = max; } else { /* printf("%f\n",ticks->step); printf("%f %f\n",min/ticks->step,floor(min/ticks->step)); printf("%f %f\n",max/ticks->step,ceil(max/ticks->step)); */ max = ceil(max/ticks->step) * ticks->step; min = floor(min/ticks->step) * ticks->step; } if(scale == GTK_PLOT_SCALE_LOG10){ min = ticks->min; max = ticks->max; if(max <= 0.0f) ticks->max = max = 1.E-11; if(max <= 0) ticks->max = max = fabs(max); if(min <= 0) ticks->min = min = max / 100.; min = floor(log10(min)); min = pow(10., min); if(min == max){ min /= 10; max *= 10; } absmin = ticks->min; absmax = ticks->max; } if(ticks->values){ g_free(ticks->values); ticks->values = NULL; } ticks->nmajorticks = 0; ticks->nminorticks = 0; major_step = ticks->step; minor_step = major_step / ((gdouble)ticks->nminor + 1.0); if(scale == GTK_PLOT_SCALE_LOG10){ if(major_step != 0.) major_step = floor(major_step); if(major_step == 0.) major_step = 1.0; ticks->nminor = 8; } if(ticks->step > 0.){ major = g_new0(GtkPlotTick,1); tick_step = min; tick = min; n = 0; while(tick <= max + 2*fabs(major_step)){ if(tick >= min-major_step*1.E-2 && tick <= max+major_step*1.E-2){ nmajor ++; major = g_realloc(major, nmajor*sizeof(GtkPlotTick)); major[nmajor-1].value = tick; major[nmajor-1].minor = FALSE; } switch(scale){ case GTK_PLOT_SCALE_LINEAR: tick += major_step; break; case GTK_PLOT_SCALE_LOG10: n++; tick = tick_step * pow(10., n*major_step); break; } } } if(nmajor == 0) return; ticks->nticks = 0; ticks->nmajorticks = nmajor; ticks->values = g_new0(GtkPlotTick, 1); if(ticks->step >0.){ gint i; n = 0; for(nmajor = 0; nmajor <= ticks->nmajorticks; nmajor++){ if(nmajor < ticks->nmajorticks && major[nmajor].value >= absmin-major_step*1.E-2 && major[nmajor].value <= absmax+major_step*1.E-2){ n++; ticks->values = g_realloc(ticks->values, n*sizeof(GtkPlotTick)); ticks->values[n-1] = major[nmajor]; } switch(scale){ case GTK_PLOT_SCALE_LINEAR: if(nmajor < ticks->nmajorticks) tick_step = major[nmajor].value - major_step; else tick_step = major[nmajor-1].value; tick = tick_step; break; case GTK_PLOT_SCALE_LOG10: if(nmajor < ticks->nmajorticks) tick_step = major[nmajor].value/10.0; else tick_step = major[nmajor-1].value; tick = tick_step; break; } for(i = 0; i < ticks->nminor; i++){ switch(scale){ case GTK_PLOT_SCALE_LINEAR: tick += minor_step; break; case GTK_PLOT_SCALE_LOG10: tick += tick_step; break; } if(tick >= absmin-major_step*1.E-2 && tick <= absmax+major_step*1.E-2){ n++; ticks->values = g_realloc(ticks->values, n*sizeof(GtkPlotTick)); ticks->values[n-1].value = tick; ticks->values[n-1].minor = TRUE; ticks->nminorticks++; } } } } ticks->nticks = n; if(major) g_free(major); /* sorting ticks */ while(changed){ gint i; changed = FALSE; for(i = 0; i < ticks->nticks - 1; i++){ if(ticks->values[i].value > ticks->values[i+1].value) { GtkPlotTick aux = ticks->values[i]; ticks->values[i] = ticks->values[i+1]; ticks->values[i+1] = aux; changed = TRUE; } } } /* ticks->values[0].value = absmin; ticks->values[n-1].value = absmax; */ } /** * gtk_plot_ticks_recalc: * @axis: * * */ void gtk_plot_ticks_recalc(GtkPlotAxis *axis) { GtkPlotTicks *ticks = &axis->ticks; if(ticks->apply_break){ GtkPlotTicks a1, a2; gint i; a1.scale = ticks->scale; a1.step = ticks->step; a1.begin = ticks->begin; a1.end = ticks->end; a1.nminor = ticks->nminor; a1.set_limits = ticks->set_limits; a1.min = ticks->min; a1.max = ticks->break_min; a1.values = NULL; gtk_plot_real_ticks_recalc(&a1); a2.scale = ticks->break_scale; a2.step = ticks->break_step; a2.begin = ticks->begin; a2.end = ticks->end; a2.nminor = ticks->break_nminor; a2.set_limits = ticks->set_limits; a2.min = ticks->break_max; a2.max = ticks->max; a2.values = NULL; gtk_plot_real_ticks_recalc(&a2); if(ticks->values){ g_free(ticks->values); ticks->values = NULL; } ticks->nmajorticks = a1.nmajorticks+a2.nmajorticks; ticks->nminorticks = a1.nminorticks+a2.nminorticks; ticks->nticks = a1.nticks+a2.nticks; ticks->values = g_new0(GtkPlotTick, ticks->nticks); for(i = 0; i < a1.nticks; i++) ticks->values[i] = a1.values[i]; for(i = 0; i < a2.nticks; i++) ticks->values[a1.nticks+i] = a2.values[i]; if(a1.values) g_free(a1.values); if(a2.values) g_free(a2.values); } else { gtk_plot_real_ticks_recalc(ticks); } } static void update_datasets(GtkPlot *plot, gboolean new_range) { GList *list = NULL; list = plot->data_sets; while(list) { g_signal_emit_by_name(GTK_OBJECT(list->data), "update", new_range); list = list->next; } } gtkextra-3.2.0/gtkextra/gtkdataformat.h0000644000076400001440000000243512603754176015137 00000000000000/* gtkdataformat - data formatter * Copyright 2011 Fredy Paquet * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) && !defined (__GTKEXTRA_H_INSIDE__) #error "Only can be included directly." #endif #ifndef __GTK_DATA_FORMAT_H__ #define __GTK_DATA_FORMAT_H__ G_BEGIN_DECLS gchar *gtk_data_format(const gchar *str, const gchar *dataformat); gchar *gtk_data_format_remove(const gchar *str, const gchar *dataformat); G_END_DECLS #endif /* __GTK_DATA_FORMAT_H__ */ gtkextra-3.2.0/gtkextra/gtkpsfont.c0000644000076400001440000004444112603754176014324 00000000000000/* gtkpsfont - PostScript Fonts handling * Copyright 1999-2006 Adrian E. Feiguin * * Some code borrowed from * DiaCanvas -- a technical canvas widget * Copyright (C) 1999 Arjan Molenaar * Dia -- an diagram creation/manipulation program * Copyright (C) 1998 Alexander Larsson * * and Xfig * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkpsfont * @short_description: PostScript Fonts handling. * * Handles Postscript fonts. */ #include #include #include #ifndef G_PLATFORM_WIN32 #include #endif //G_PLATFORM_WIN32 #include #include "gtkpsfont.h" #define FONTCACHE_SIZE 17 #define NUM_X11_FONTS 2 static GtkPSFont font_data[] = { { "Times-Roman", "Times-Roman", "Times-Roman", "Nimbus Roman No9 L, Regular", NULL, FALSE, FALSE }, { "Times-Italic", "Times-Italic", "Times-Roman", "Nimbus Roman No9 L, Italic", NULL, TRUE, FALSE }, { "Times-Bold", "Times-Bold", "Times-Roman", "Nimbus Roman No9 L, Bold", NULL, FALSE, TRUE }, { "Times-BoldItalic", "Times-BoldItalic", "Times-Roman", "Nimbus Roman No9 L, Bold Italic", NULL, TRUE, TRUE }, { "AvantGarde-Book", "AvantGarde-Book", "AvantGarde", "URW Gothic L, Book", NULL, FALSE, FALSE }, { "AvantGarde-BookOblique", "AvantGarde-BookOblique", "AvantGarde", "URW Gothic L, Book Oblique", NULL, TRUE, FALSE }, { "AvantGarde-Demi", "AvantGarde-Demi", "AvantGarde", "URW Gothic L, Demi", NULL, FALSE, TRUE }, { "AvantGarde-DemiOblique", "AvantGarde-DemiOblique", "AvantGarde", "URW Gothic L, Demi Oblique", NULL, TRUE, TRUE }, { "Bookman-Light", "Bookman-Light", "Bookman", "URW Bookman L, Light", NULL, FALSE, FALSE }, { "Bookman-LightItalic", "Bookman-LightItalic", "Bookman", "URW Bookman L, Light Italic", NULL, TRUE, FALSE }, { "Bookman-Demi", "Bookman-Demi", "Bookman", "URW Bookman L, Demi Bold", NULL, FALSE, TRUE }, { "Bookman-DemiItalic", "Bookman-DemiItalic", "Bookman", "URW Bookman L, Demi Bold Italic", NULL, TRUE, TRUE }, { "Courier", "Courier", "Courier", "Nimbus Mono L, Regular", NULL, FALSE, FALSE }, { "Courier-Oblique", "Courier-Oblique", "Courier", "Nimbus Mono L, Regular Oblique", NULL, TRUE, FALSE }, { "Courier-Bold", "Courier-Bold", "Courier", "Nimbus Mono L, Bold", NULL, FALSE, TRUE }, { "Courier-BoldOblique", "Courier-BoldOblique", "Courier", "Nimbus Mono L, Bold Oblique", NULL, TRUE, TRUE }, { "Helvetica", "Helvetica", "Helvetica", "Sans, Regular", NULL, FALSE, FALSE }, { "Helvetica-Oblique", "Helvetica-Oblique", "Helvetica", "Sans, Regular Italic", NULL, TRUE, FALSE }, { "Helvetica-Bold", "Helvetica-Bold", "Helvetica", "Sans, Bold", NULL, FALSE, TRUE }, { "Helvetica-BoldOblique", "Helvetica-BoldOblique", "Helvetica", "Sans, Bold Italic", NULL, TRUE, TRUE }, { "Helvetica-Narrow", "Helvetica-Narrow", "Helvetica-Narrow", "Sans, Regular Condensed", NULL, FALSE, FALSE }, { "Helvetica-Narrow-Oblique", "Helvetica-Narrow-Oblique", "Helvetica-Narrow", "Sans, Regular Condensed Italic", NULL, TRUE, FALSE }, { "Helvetica-Narrow-Bold", "Helvetica-Narrow-Bold", "Helvetica-Narrow", "Sans, Bold Condensed", NULL, FALSE, TRUE }, { "Helvetica-Narrow-BoldOblique", "Helvetica-Narrow-BoldOblique", "Helvetica-Narrow", "Sans, Bold Condensed Italic", NULL, TRUE, TRUE }, { "NewCenturySchoolbook-Roman", "NewCenturySchlbk-Roman", "NewCenturySchlbk", "Century Schoolbook L, Roman", NULL, FALSE, FALSE }, { "NewCenturySchoolbook-Italic", "NewCenturySchlbk-Italic", "NewCenturySchlbk", "Century Schoolbook L, Italic", NULL, TRUE, FALSE }, { "NewCenturySchoolbook-Bold", "NewCenturySchlbk-Bold", "NewCenturySchlbk", "Century Schoolbook L, Bold", NULL, FALSE, TRUE }, { "NewCenturySchoolbook-BoldItalic", "NewCenturySchlbk-BoldItalic", "NewCenturySchlbk", "Century Schoolbook L, Bold Italic", NULL, TRUE, TRUE }, { "Palatino-Roman", "Palatino-Roman", "Palatino", "URW Palladio L, Roman", NULL, FALSE, FALSE }, { "Palatino-Italic", "Palatino-Italic", "Palatino", "URW Palladio L, Italic", NULL, TRUE, FALSE }, { "Palatino-Bold", "Palatino-Bold", "Palatino", "URW Palladio L, Bold", NULL, FALSE, TRUE }, { "Palatino-BoldItalic", "Palatino-BoldItalic", "Palatino", "URW Palladio L, Bold Italic", NULL, TRUE, TRUE }, { "Symbol", "Symbol", "Symbol", "Standard Symbols L, Regular", NULL, FALSE, FALSE }, { "ZapfChancery-MediumItalic", "ZapfChancery-MediumItalic", "ZapfChancery", "URW Chancery L, Medium Italic", NULL, FALSE, FALSE }, { "ZapfDingbats", "ZapfDingbats", "ZapfDingbats", "Dingbats, Regular", NULL, FALSE, FALSE }, }; #define NUM_FONTS (sizeof(font_data)/sizeof(GtkPSFont)) static GList *user_fonts; static gboolean psfont_init = FALSE; static GList *psfont_families; static gint numf; static gint psfont_refcount = 0; #ifdef G_PLATFORM_WIN32 static const char *default_font = "sans"; #else static const char *default_font = "fixed"; #endif static GtkPSFont *find_psfont (const gchar *name); gint gtk_psfont_init() { GtkPSFont *data = NULL; GList *fonts; gint i, j; gboolean new_family = TRUE; psfont_refcount++; /* if(psfont_refcount > 1) printf("PS fonts already initilized\n");; */ if(psfont_refcount > 1) return FALSE; /* printf("Initializing PS fonts\n");; */ psfont_init = TRUE; psfont_families = NULL; numf = 0; for(i = 0; i < NUM_FONTS; i++){ new_family = TRUE; for(j = 0; j < numf; j++){ if(strcmp(font_data[i].family, (gchar *)g_list_nth_data(psfont_families, j)) == 0) new_family = FALSE; } if(new_family){ numf = numf + 1; psfont_families = g_list_append(psfont_families, font_data[i].family); } } fonts = user_fonts; while(fonts){ data = (GtkPSFont *) fonts->data; new_family = TRUE; for(j = 0; j < numf; j++){ if(strcmp(data->family, (gchar *)g_list_nth_data(psfont_families, j)) == 0) new_family = FALSE; } if(new_family){ numf = numf + 1; psfont_families = g_list_append(psfont_families, data->family); } fonts = fonts->next; } return TRUE; } /** * gtk_psfont_unref: * * Unref ps fonts. */ void gtk_psfont_unref() { GList *list; if(psfont_refcount <= 0) return; psfont_refcount--; if(psfont_refcount > 0) return; list = psfont_families; while(list){ psfont_families = g_list_remove_link(psfont_families, list); g_list_free_1(list); list = psfont_families; } list = user_fonts; while(list){ user_fonts = g_list_remove_link(user_fonts, list); g_list_free_1(list); list = user_fonts; } psfont_init = FALSE; } /* * gtk_psfont_init: * * Unref ps fonts. * void gtk_psfont_unref() { GList *list; if(psfont_refcount <= 0) return; psfont_refcount--; if(psfont_refcount > 0) return; list = psfont_families; while(list){ psfont_families = g_list_remove_link(psfont_families, list); g_list_free_1(list); list = psfont_families; } */ /** * gtk_psfont_get_by_name: * @name: font name * * Get PS Font by font name. * * Returns: (transfer none) a #GtkPSFont pointer. */ GtkPSFont * gtk_psfont_get_by_name(const gchar *name) { GtkPSFont *font; font = find_psfont(name); if (font == NULL) { font = find_psfont(default_font); if (font == NULL) { g_warning ("Error, couldn't locate default font. Shouldn't happen."); } else { g_message ("Postscript font %s not found, using %s instead.", name, default_font); } } return font; } /** * gtk_psfont_get_by_gdkfont: * @font: a #GtkPSFont * @height: font height * * Get #GdkFOnt by PS Font. * * Returns: a #GdkFont pointer. */ GdkFont * gtk_psfont_get_gdkfont(GtkPSFont *font, gint height) { PangoFontDescription *font_desc; GdkFont *gdkfont; g_return_val_if_fail (font != NULL, NULL); if (height <= 0) height = 1; font_desc = gtk_psfont_get_font_description(font, height); gdkfont = font_desc ? gdk_font_from_description(font_desc) : NULL; if (font_desc) pango_font_description_free(font_desc); if (!gdkfont) { font_desc = gtk_psfont_get_font_description(find_psfont(default_font), height); gdkfont = font_desc ? gdk_font_from_description(font_desc) : NULL; if (font_desc) pango_font_description_free(font_desc); if (gdkfont) g_message ("Pango font %s %i (PS font %s) not found, using %s instead.", font->pango_description, height, font->fontname, default_font); else g_warning ("Error, couldn't locate default font. Shouldn't happen."); } return gdkfont; } /** * gtk_psfont_get_font_description: * @font: a #GtkPSFont * @height: font height * * Get a #PangoDescriptionFont from PS Font. * * Returns: a #PangoFontDescription pointer. */ PangoFontDescription * gtk_psfont_get_font_description(GtkPSFont *font, gint height) { PangoFontDescription *font_desc; gchar *font_string; GtkSettings *settings = gtk_settings_get_for_screen(gdk_screen_get_default()); GObjectClass *klass; gdouble dpi; g_return_val_if_fail (font != NULL, NULL); if (height <= 0) height = 1; /* Dirty hack to get the correct font size for this device http://mail.gnome.org/archives/gtk-i18n-list/2003-August/msg00001.html */ klass = G_OBJECT_CLASS(GTK_SETTINGS_GET_CLASS(settings)); /* Check that the properties we're looking at are defined. */ if (!g_object_class_find_property(klass, "gtk-xft-dpi")) { dpi = 96.; } else { /* Read the settings. */ gint int_dpi; g_object_get(G_OBJECT(settings), "gtk-xft-dpi", &int_dpi, NULL); if(int_dpi <= 0) dpi = 96; else dpi = int_dpi / PANGO_SCALE; } /* { GdkScreen *screen = gdk_screen_get_default (); FcPattern *pattern; pattern = FcPatternCreate(); if (pattern) { XftDefaultSubstitute (GDK_SCREEN_XDISPLAY (screen), GDK_SCREEN_XNUMBER (screen), pattern); FcPatternGetDouble (pattern, FC_DPI, 0, &dpi); FcPatternDestroy (pattern); } } */ height *= 75./dpi; font_string = g_strdup_printf("%s %i", font->pango_description, height); font_desc = pango_font_description_from_string(font_string); g_free(font_string); if (!font_desc) { font_string = g_strdup_printf("%s %i", default_font, height); font_desc = pango_font_description_from_string(font_string); g_free(font_string); if (font_desc) g_message ("Font %s not describable, using %s instead.", font->fontname, default_font); else g_warning ("Error, couldn't describe default font. Shouldn't happen."); } /* Loading via the pango fontset facility means that pango.aliases is used */ /* This is not working */ /* It is screwing up the whole thing */ /* if (font_desc) { PangoContext *context = gdk_pango_context_get(); PangoFontset *pffontset; PangoFont *pffont; pffontset = pango_context_load_fontset(context, font_desc, pango_context_get_language(context)); if (pffontset) { pffont = pango_fontset_get_font(pffontset, g_utf8_get_char(" ")); if (pffont) { PangoFontDescription *font_desc; desc = pango_font_describe(pffont); g_object_unref(G_OBJECT(pffont)); if (desc) { pango_font_description_free(font_desc); font_desc = desc; } } g_object_unref(G_OBJECT(pffontset)); } } */ return font_desc; } /** * gtk_psfont_get_psfontname: * @psfont: a #GtkPSFont * * Get font name from PS Font. * * Returns: font name. */ const gchar * gtk_psfont_get_psfontname(GtkPSFont *psfont) { g_return_val_if_fail (psfont != NULL, NULL); return psfont->psname; } /** * gtk_psfont_add_font: * @fontname: font name * @psname: PS font name * @family: font family * @pango_description: font Pango description * @italic: TRUE or FALSE * @bold: TRUE or FALSE * * Add font in user font list. */ void gtk_psfont_add_font (const gchar *fontname, const gchar *psname, const gchar *family, const gchar *pango_description, gboolean italic, gboolean bold) { GtkPSFont *font; font = g_new0(GtkPSFont, 1); font->fontname = g_strdup(fontname); font->psname = g_strdup(psname); font->family = g_strdup(family); font->pango_description = g_strdup(pango_description); font->i18n_latinfamily = NULL; font->italic = italic; font->bold = bold; font->vertical = FALSE; user_fonts = g_list_append(user_fonts, font); } /** * gtk_psfont_add_i18n_font: * @fontname: font name * @psname: PS font name * @family: font family * @i18n_latinfamily: International font family * @pango_description: font Pango description * @italic: TRUE or FALSE * @bold: TRUE or FALSE * @vertical: TRUE or FALSE * * Add international font in user font list. */ void gtk_psfont_add_i18n_font (const gchar *fontname, const gchar *psname, const gchar *family, const gchar *i18n_latinfamily, const gchar *pango_description, gboolean italic, gboolean bold, gboolean vertical) { GtkPSFont *font; font = g_new0(GtkPSFont, 1); font->fontname = g_strdup(fontname); font->psname = g_strdup(psname); font->family = g_strdup(family); font->pango_description = g_strdup(pango_description); font->i18n_latinfamily = g_strdup(i18n_latinfamily); font->italic = italic; font->bold = bold; font->vertical = vertical; user_fonts = g_list_append(user_fonts, font); } static GtkPSFont * find_psfont(const gchar *name) { GtkPSFont *fontdata = NULL; GtkPSFont *data = NULL; GList *fonts; gint i; /* user_fonts should be superior to font_data, the built-in default settings because user_fonts is supposed to store a more appropriate existent xfont than font_data. */ fonts = user_fonts; while(fonts){ data = (GtkPSFont *) fonts->data; if(strcmp(name, data->fontname) == 0) { fontdata = data; break; } if(strcmp(name, data->psname) == 0) { fontdata = data; break; } fonts = fonts->next; } if(fontdata == NULL) { for(i = 0; i < NUM_FONTS; i++){ if(strcmp(name, font_data[i].fontname) == 0) { fontdata = &font_data[i]; break; } if(strcmp(name, font_data[i].psname) == 0) { fontdata = &font_data[i]; break; } } } return fontdata; } /** * gtk_psfont_get_by_family: * @family_name: font name * @italic: TRUE or FALSE * @bold: TRUE or FALSE * * Get #GtkPSFont by family. * * Returns: (transfer none) the #GtkPSFont */ GtkPSFont * gtk_psfont_get_by_family(const gchar *family_name, gboolean italic, gboolean bold) { GtkPSFont *fontdata = NULL; GtkPSFont *data = NULL; GtkPSFont *return_data = NULL; GList *fonts; gint i; /* user_fonts should be superior to font_data, the built-in default settings because user_fonts is supposed to store a more appropriate existent xfont than font_data. */ fonts = user_fonts; while(fonts){ data = (GtkPSFont *) fonts->data; if(strcmp(family_name, data->family) == 0) { return_data = data; if(data->italic == italic && data->bold == bold){ fontdata = data; break; } } fonts = fonts->next; } if(fontdata == NULL) { for(i = 0; i < NUM_FONTS; i++){ if(strcmp(family_name, font_data[i].family) == 0) { return_data = &font_data[i]; if(font_data[i].italic == italic && font_data[i].bold == bold){ fontdata = &font_data[i]; break; } } } } if(!fontdata) fontdata = return_data; return fontdata; } /** * gtk_psfont_get_families: * @families: (element-type gchar*) font families * @num_families: families number * * Get #GtkPSFont by family. */ void gtk_psfont_get_families(GList **families, gint *num_families) { if(!psfont_init || psfont_refcount == 0){ g_warning("PS fonts have not been initialized. Use gtk_psfont_init first."); return; } *families = psfont_families; *num_families = numf; } /* get the width, ascent and descent of a character. */ /** * gtk_psfont_get_char_size: * @psfont: a #GtkPSFont * @font: a #GdkFont * @latin_font: a #GdkFont * @wc: a #GdkWchar * @width: font width * @ascent: font ascent * @descent: font descent * * Get font character size. */ void gtk_psfont_get_char_size(GtkPSFont *psfont, GdkFont *font, GdkFont *latin_font, GdkWChar wc, gint *width, gint *ascent, gint *descent) { GdkFont *dfont; gint w, a, d, w0; if (psfont->i18n_latinfamily && psfont->vertical && (wc > 0x7f)) { /* vertical-writing CJK postscript fonts. */ w = (font->ascent + font->descent); w0 = gdk_char_width_wc(font, wc); d = w0 * font->descent / w; a = w0 - d; } else { if (psfont->i18n_latinfamily && wc <= 0x7f) dfont = latin_font; else dfont = font; w = gdk_char_width_wc(dfont, wc); a = dfont->ascent; d = dfont->descent; } if (width != NULL) *width = w; if (ascent != NULL) *ascent = a; if (descent != NULL) *descent = d; } gtkextra-3.2.0/gtkextra/gtkplotcanvastext.c0000644000076400001440000002474112604171206016057 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplotcanvas.h" #include "gtkplotcanvastext.h" #include "gtkplotgdk.h" #include "gtkplotps.h" /** * SECTION: gtkplotcanvastext * @short_description: * * FIXME:: need long description */ static gchar DEFAULT_FONT[] = "Helvetica"; #define DEFAULT_FONT_HEIGHT 12 #define P_(string) string enum { ARG_0, ARG_TEXT, }; static void gtk_plot_canvas_text_init (GtkPlotCanvasText *text); static void gtk_plot_canvas_text_destroy (GtkObject *object); static void gtk_plot_canvas_text_class_init(GtkPlotCanvasChildClass *klass); static void gtk_plot_canvas_text_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_text_size_allocate (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_text_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_text_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); extern gint roundint (gdouble x); static GtkPlotCanvasChildClass *parent_class = NULL; GType gtk_plot_canvas_text_get_type (void) { static GType plot_canvas_text_type = 0; if (!plot_canvas_text_type) { plot_canvas_text_type = g_type_register_static_simple ( gtk_plot_canvas_child_get_type(), "GtkPlotCanvasText", sizeof (GtkPlotCanvasTextClass), (GClassInitFunc) gtk_plot_canvas_text_class_init, sizeof (GtkPlotCanvasText), (GInstanceInitFunc) gtk_plot_canvas_text_init, 0); } return plot_canvas_text_type; } /** * gtk_plot_canvas_text_new: * @font: * @height: * @angle: * @fg: * @bg: * @transparent: * @justification: * @real_text: * * * * Return value: */ GtkPlotCanvasChild* gtk_plot_canvas_text_new (const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text) { GtkPlotCanvasText *text; GtkPlotText *text_attr; text = g_object_new (gtk_plot_canvas_text_get_type (), NULL); text_attr = &text->text; text_attr->angle = angle; text_attr->justification = justification; text_attr->transparent = transparent; text_attr->border = 0; text_attr->border_width = 0; text_attr->shadow_width = 0; if(!font) { text_attr->font = g_strdup(DEFAULT_FONT); text_attr->height = DEFAULT_FONT_HEIGHT; } else { text_attr->font = g_strdup(font); text_attr->height = height; } text_attr->text = NULL; if(text) text_attr->text = g_strdup(real_text); if(fg != NULL) text_attr->fg = *fg; if(bg != NULL) text_attr->bg = *bg; return GTK_PLOT_CANVAS_CHILD (text); } static void gtk_plot_canvas_text_init (GtkPlotCanvasText *text) { GtkPlotText *text_attr; text_attr = &text->text; text_attr->angle = 0; gdk_color_black(gdk_colormap_get_system(), &text_attr->fg); gdk_color_white(gdk_colormap_get_system(), &text_attr->bg); text_attr->justification = GTK_JUSTIFY_LEFT; text_attr->transparent = TRUE; text_attr->border = 0; text_attr->border_width = 0; text_attr->shadow_width = 0; text_attr->text = NULL; GTK_PLOT_CANVAS_CHILD(text)->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE; } static void gtk_plot_canvas_text_class_init (GtkPlotCanvasChildClass *klass) { GtkObjectClass *object_class = (GtkObjectClass *)klass; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_canvas_child_get_type ()); klass->draw = gtk_plot_canvas_text_draw; klass->move = NULL; klass->move_resize = NULL; klass->size_allocate = gtk_plot_canvas_text_size_allocate; object_class->destroy = gtk_plot_canvas_text_destroy; gobject_class->get_property = gtk_plot_canvas_text_get_property; gobject_class->set_property = gtk_plot_canvas_text_set_property; g_object_class_install_property (gobject_class, ARG_TEXT, g_param_spec_pointer ("text", P_("Text Attributes"), P_("Text Attributes"), G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_canvas_text_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCanvasText *text = GTK_PLOT_CANVAS_TEXT (object); switch(prop_id){ case ARG_TEXT: g_value_set_pointer(value, &text->text); break; } } static void gtk_plot_canvas_text_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCanvasText *text = GTK_PLOT_CANVAS_TEXT (object); GtkPlotText *aux_text = NULL; switch(prop_id){ case ARG_TEXT: aux_text = (GtkPlotText *)g_value_get_pointer(value); if(text->text.text) g_free(text->text.text); if(text->text.font) g_free(text->text.font); text->text.text = NULL; text->text.font = NULL; text->text = *aux_text; if(aux_text->text) text->text.text = g_strdup(aux_text->text); if(aux_text->font) text->text.font = g_strdup(aux_text->font); break; } } static void gtk_plot_canvas_text_destroy (GtkObject *object) { GtkPlotCanvasText *text = GTK_PLOT_CANVAS_TEXT(object); if(text->text.font) g_free(text->text.font); text->text.font = NULL; if(text->text.text) g_free(text->text.text); text->text.text = NULL; } static void gtk_plot_canvas_text_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasText *text_child = GTK_PLOT_CANVAS_TEXT(child); GtkPlotText *text = &text_child->text; gdouble m = canvas->magnification; gint x, y; x = text->x * canvas->pixmap_width; y = text->y * canvas->pixmap_height; gtk_plot_pc_draw_string(canvas->pc, x, y, text->angle, &text->fg, &text->bg, text->transparent, text->border, roundint(m * text->border_space), roundint(m * text->border_width), roundint(m * text->shadow_width), text->font, roundint(m * text->height), text->justification, text->text); } static void gtk_plot_canvas_text_size_allocate(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GtkPlotCanvasText *text = GTK_PLOT_CANVAS_TEXT(child); gint tx, ty, x, y, width, height; gdouble m = canvas->magnification; text->text.x = child->rx1; text->text.y = child->ry1; x = roundint(text->text.x * canvas->pixmap_width); y = roundint(text->text.y * canvas->pixmap_height); gtk_plot_text_get_area(text->text.text, text->text.angle, text->text.justification, text->text.font, roundint(m * text->text.height), &tx, &ty, &width, &height); if(text->text.border != GTK_PLOT_BORDER_NONE){ tx -= text->text.border_space; ty -= text->text.border_space; width += 2 * text->text.border_space; height += 2 * text->text.border_space; } tx += x; ty += y; child->allocation.x = tx; child->allocation.y = ty; child->allocation.width = width; child->allocation.height = height; gtk_plot_canvas_get_position(canvas, tx + width, ty + height, &child->rx2, &child->ry2); } /** * gtk_plot_canvas_text_set_attributes: * @text: a #GtkPlotCanvasText. * @font: * @height: * @angle: * @fg: * @bg: * @transparent: * @justification: * @real_text: * * */ void gtk_plot_canvas_text_set_attributes(GtkPlotCanvasText *text, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *real_text) { if(font){ g_free(text->text.font); text->text.font = g_strdup(font); } if(real_text){ g_free(text->text.text); text->text.text = g_strdup(real_text); } text->text.justification = justification; text->text.height = height; text->text.angle = angle; text->text.transparent = transparent; if(fg) text->text.fg = *fg; if(bg) text->text.bg = *bg; } gtkextra-3.2.0/gtkextra/gtkplotcandle.c0000644000076400001440000002157112603754176015137 00000000000000/* gtkplotbox - box plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gtkextra-compat.h" #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotcandle.h" #include "gtkpsfont.h" /** * SECTION: gtkplotcandle * @short_description: * * FIXME:: need long description. */ static void gtk_plot_candle_class_init (GtkPlotCandleClass *klass); static void gtk_plot_candle_init (GtkPlotCandle *data); static void gtk_plot_candle_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_candle_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); extern gint roundint (gdouble x); static GtkPlotDataClass *parent_class = NULL; GType gtk_plot_candle_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotCandle", sizeof (GtkPlotCandleClass), (GClassInitFunc) gtk_plot_candle_class_init, sizeof (GtkPlotCandle), (GInstanceInitFunc) gtk_plot_candle_init, 0); } return data_type; } static void gtk_plot_candle_class_init (GtkPlotCandleClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; data_class->draw_legend = gtk_plot_candle_draw_legend; data_class->draw_symbol = gtk_plot_candle_draw_symbol; /* data_class->draw_data = gtk_plot_candle_draw; */ } static void gtk_plot_candle_init (GtkPlotCandle *dataset) { GtkWidget *widget; GdkColor black, white; GdkColormap *colormap; GtkPlotArray *dim; widget = GTK_WIDGET(dataset); colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); GTK_PLOT_DATA(dataset)->symbol.symbol_style = GTK_PLOT_SYMBOL_FILLED; GTK_PLOT_DATA(dataset)->symbol.color = white; GTK_PLOT_DATA(dataset)->line.line_style = GTK_PLOT_LINE_SOLID; GTK_PLOT_DATA(dataset)->line.line_width = 1; GTK_PLOT_DATA(dataset)->line.color = black; dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "y"); gtk_plot_array_set_label(dim, "Open"); gtk_plot_array_set_description(dim, "Open"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "z"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "Close"); gtk_plot_array_set_description(dim, "Close"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dy"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "Min"); gtk_plot_array_set_description(dim, "Minimum"); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "dz"); gtk_plot_array_set_required(dim, TRUE); gtk_plot_array_set_label(dim, "Max"); gtk_plot_array_set_description(dim, "Maximum"); } GtkWidget* gtk_plot_candle_new (void) { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_candle_get_type (), NULL); return (widget); } static void gtk_plot_candle_draw_symbol(GtkPlotData *dataset, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot; GtkPlotCandle *box = NULL; gdouble px, py, pz, ex, ey, ez; gdouble x1 = 0.0, y1 = 0.0, width = 0.0, height = 0.0; gdouble m; gboolean filled; gdouble a_scale; g_return_if_fail(GTK_IS_PLOT_CANDLE(dataset)); box = GTK_PLOT_CANDLE(dataset); g_return_if_fail(dataset->plot != NULL); plot = dataset->plot; a_scale = gtk_plot_data_get_a_scale(dataset); m = plot->magnification * a_scale; gtk_plot_pc_set_lineattr (plot->pc, dataset->symbol.border.line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); if(x >= plot->xmin && x <= plot->xmax){ if(GTK_IS_PLOT3D(plot)){ }else if(dataset->show_zerrbars){ gtk_plot_pc_set_color(plot->pc, &dataset->symbol.border.color); gtk_plot_get_pixel(plot, x, y, &px, &py); gtk_plot_get_pixel(plot, x, z, &px, &pz); width = m * dataset->symbol.size / 2; x1 = px - width; y1 = MIN(py, pz); filled = z < y; height = abs(py - pz); gtk_plot_get_pixel(plot, x, dy, &ex, &ey); gtk_plot_get_pixel(plot, x, dz, &ex, &ez); gtk_plot_pc_draw_line(plot->pc, px, py, px, ey); gtk_plot_pc_draw_line(plot->pc, px, pz, px, ez); if(!filled && dataset->symbol.symbol_style != GTK_PLOT_SYMBOL_EMPTY){ gtk_plot_pc_set_color(plot->pc, &plot->background); gtk_plot_pc_draw_rectangle (plot->pc, TRUE, x1, y1, width * 2, height); } if(dataset->symbol.symbol_style == GTK_PLOT_SYMBOL_EMPTY){ GtkPlotPoint lines[4]; gtk_plot_pc_set_color(plot->pc, &dataset->symbol.color); lines[0].x = px - width; lines[0].y = py; lines[1].x = px; lines[1].y = py; lines[2].x = px; lines[2].y = pz; lines[3].x = px + width; lines[3].y = pz; gtk_plot_pc_draw_lines(plot->pc, lines, 4); } else { if(filled){ gtk_plot_pc_set_color(plot->pc, &dataset->symbol.color); gtk_plot_pc_draw_rectangle (plot->pc, TRUE, x1, y1, width * 2, height); } gtk_plot_pc_set_color(plot->pc, &dataset->symbol.border.color); gtk_plot_pc_draw_rectangle (plot->pc, FALSE, x1, y1, width * 2, height); } } } } static void gtk_plot_candle_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotCandle *box; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; GtkAllocation allocation; box = GTK_PLOT_CANDLE(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); if(!gtk_widget_get_realized(GTK_WIDGET(data->plot))) return; plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); legend.x = (gdouble)(area.x + x + roundint((plot->legends_line_width + 4) * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); gtk_plot_pc_set_lineattr (plot->pc, data->symbol.border.line_width, 0, 0, 0); gtk_plot_pc_set_dash (plot->pc, 0, 0, 0); gtk_plot_pc_set_color(plot->pc, &data->symbol.color); if(data->symbol.symbol_style == GTK_PLOT_SYMBOL_EMPTY){ gtk_plot_pc_draw_line(plot->pc, x, y + (lascent + ldescent) / 2, x + roundint(plot->legends_line_width * m), y + (lascent + ldescent) / 2); } else { gtk_plot_pc_draw_rectangle(plot->pc, TRUE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); gtk_plot_pc_set_color(plot->pc, &data->symbol.border.color); gtk_plot_pc_draw_rectangle(plot->pc, FALSE, x, y, roundint(plot->legends_line_width * m), lascent + ldescent); } } gtkextra-3.2.0/gtkextra/gtkplotsegment.h0000644000076400001440000000661112603754176015356 00000000000000/* gtkplotsegment - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_SEGMENT_H__ #define __GTK_PLOT_SEGMENT_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_SEGMENT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_segment_get_type (), GtkPlotSegment) #define G_TYPE_PLOT_SEGMENT (gtk_plot_segment_get_type ()) #define GTK_PLOT_SEGMENT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_segment_get_type(), GtkPlotSegmentClass) #define GTK_IS_PLOT_SEGMENT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_segment_get_type ()) typedef struct _GtkPlotSegment GtkPlotSegment; typedef struct _GtkPlotSegmentClass GtkPlotSegmentClass; typedef enum { GTK_PLOT_ARROW_NONE = 0, GTK_PLOT_ARROW_ORIGIN = 1 << 0, GTK_PLOT_ARROW_END = 1 << 1 } GtkPlotArrow; /** * GtkPlotSegment: * * The GtkPlotSegment struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotSegment { GtkPlotData data; gboolean relative; gboolean centered; GtkPlotArrow arrow_mask; gint arrow_length; gint arrow_width; GtkPlotSymbolStyle arrow_style; }; struct _GtkPlotSegmentClass { GtkPlotDataClass parent_class; }; GType gtk_plot_segment_get_type (void); GtkWidget* gtk_plot_segment_new (void); void gtk_plot_segment_set_relative (GtkPlotSegment *segment, gboolean set); gboolean gtk_plot_segment_relative (GtkPlotSegment *segment); void gtk_plot_segment_set_arrow (GtkPlotSegment *segment, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style); void gtk_plot_segment_get_arrow (GtkPlotSegment *segment, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style); void gtk_plot_segment_set_arrow_mask (GtkPlotSegment *segment, GtkPlotArrow mask); guint gtk_plot_segment_get_arrow_mask (GtkPlotSegment *segment); void gtk_plot_segment_center (GtkPlotSegment *segment, gboolean center); gboolean gtk_plot_segment_is_centered (GtkPlotSegment *segment); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_SEGMENT_H__ */ gtkextra-3.2.0/gtkextra/gtkiconlist.h0000644000076400001440000001614512603754176014644 00000000000000/* gtkiconlist - gtkiconlist widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_ICON_LIST_H__ #define __GTK_ICON_LIST_H__ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum { GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW, } GtkIconListMode; #define GTK_ICON_LIST(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_icon_list_get_type (), GtkIconList) #define GTK_ICON_LIST_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_icon_list_get_type, GtkIconListClass) #define GTK_IS_ICON_LIST(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_icon_list_get_type ()) #define G_TYPE_ICON_LIST (gtk_icon_list_get_type ()) #define G_TYPE_ICON_LIST_ITEM (gtk_icon_list_item_get_type ()) typedef struct _GtkIconList GtkIconList; typedef struct _GtkIconListClass GtkIconListClass; typedef struct _GtkIconListItem GtkIconListItem; /** * GtkIconListItem: * * The GtkIconListItem structure contains only private data. * It should only be accessed through the functions described below. */ struct _GtkIconListItem { /*< private >*/ guint x, y; gint state; gchar *entry_label; gchar *label; GtkWidget *pixmap; GtkWidget *entry; gpointer link; }; /** * GtkIconList: * * The GtkIconList structure contains only private data. * It should only be accessed through the functions described below. */ struct _GtkIconList { GtkFixed fixed; GtkIconListMode mode; GtkSelectionMode selection_mode; guint freeze_count; guint icon_width; guint text_space; /* entry width */ guint row_spacing; /* space between rows */ guint col_spacing; /* space between columns */ guint icon_border; /* space between icon and entry */ gboolean is_editable; GtkIconListItem *active_icon; GdkColor background; gint num_icons; GList *icons; GList *selection; GCompareFunc compare_func; }; struct _GtkIconListClass { GtkFixedClass parent_class; gboolean (*select_icon) (GtkIconList *iconlist, GtkIconListItem *icon, GdkEvent *event); void (*unselect_icon) (GtkIconList *iconlist, GtkIconListItem *icon, GdkEvent *event); gboolean (*text_changed) (GtkIconList *iconlist, GtkIconListItem *icon, gchar *new_text); gboolean (*activate_icon) (GtkIconList *iconlist, GtkIconListItem *icon); gboolean (*deactivate_icon) (GtkIconList *iconlist, GtkIconListItem *icon); void (*click_event) (GtkIconList *iconlist, GdkEvent *event); }; GType gtk_icon_list_get_type (void); GType gtk_icon_list_item_get_type (void); GtkWidget* gtk_icon_list_new (guint icon_width, GtkIconListMode mode); void gtk_icon_list_construct (GtkIconList *iconlist, guint icon_width, GtkIconListMode mode); void gtk_icon_list_set_mode (GtkIconList *iconlist, GtkIconListMode mode); GtkIconListMode gtk_icon_list_get_mode (GtkIconList *iconlist); void gtk_icon_list_set_editable (GtkIconList *iconlist, gboolean editable); gboolean gtk_icon_list_is_editable (GtkIconList *iconlist); void gtk_icon_list_set_row_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_row_spacing (GtkIconList *iconlist); void gtk_icon_list_set_col_spacing (GtkIconList *iconlist, guint spacing); guint gtk_icon_list_get_col_spacing (GtkIconList *iconlist); void gtk_icon_list_set_text_space (GtkIconList *iconlist, guint text_space); guint gtk_icon_list_get_text_space (GtkIconList *iconlist); void gtk_icon_list_set_icon_border (GtkIconList *iconlist, guint border); guint gtk_icon_list_get_icon_border (GtkIconList *iconlist); void gtk_icon_list_set_icon_width (GtkIconList *iconlist, guint width); guint gtk_icon_list_get_icon_width (GtkIconList *iconlist); void gtk_icon_list_freeze (GtkIconList *iconlist); void gtk_icon_list_thaw (GtkIconList *iconlist); void gtk_icon_list_set_background (GtkIconList *iconlist, GdkColor *color); GtkIconListItem *gtk_icon_list_add_from_pixmap (GtkIconList *icon_list, GdkPixmap *pixmap, GdkBitmap *bitmap_mask, const gchar *label, gpointer link); GtkIconListItem *gtk_icon_list_add_from_data (GtkIconList *iconlist, gchar **data, const gchar *label, gpointer link); GtkIconListItem *gtk_icon_list_add (GtkIconList *iconlist, const gchar *pixmap_file, const gchar *label, gpointer link); GtkIconListItem *gtk_icon_list_get_nth (GtkIconList *iconlist, guint n); gint gtk_icon_list_get_index (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_remove (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_set_active_icon (GtkIconList *iconlist, GtkIconListItem *icon); void gtk_icon_list_remove_nth (GtkIconList *iconlist, guint n); void gtk_icon_list_update (GtkIconList *iconlist); void gtk_icon_list_clear (GtkIconList *iconlist); void gtk_icon_list_link (GtkIconListItem *item, gpointer data); gpointer gtk_icon_list_get_link (GtkIconListItem *item); GtkIconListItem *gtk_icon_list_get_icon_from_link(GtkIconList *iconlist, gpointer data); GtkIconListItem *gtk_icon_list_get_icon_at (GtkIconList *iconlist, gint x, gint y); GtkIconListItem *gtk_icon_list_get_active_icon (GtkIconList *iconlist); GtkWidget *gtk_icon_list_get_entry (GtkIconListItem *item); GtkWidget *gtk_icon_list_get_pixmap (GtkIconListItem *item); void gtk_icon_list_set_pixmap (GtkIconListItem *item, GdkPixmap *pixmap, GdkBitmap *bitmap_mask); void gtk_icon_list_set_label (GtkIconList *iconlist, GtkIconListItem *item, const gchar *label); void gtk_icon_list_set_selection_mode(GtkIconList *iconlist, gint mode); void gtk_icon_list_select_icon (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_unselect_icon (GtkIconList *iconlist, GtkIconListItem *item); void gtk_icon_list_unselect_all (GtkIconList *iconlist); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_ICON_LIST_H__ */ gtkextra-3.2.0/gtkextra/testimage.c0000644000076400001440000001272412603754176014266 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gdouble gaussian(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = .65*exp(-.5*pow(x-.5,2)/.02); return y; } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .65, .55); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkPixmap *pixmap; GdkBitmap *mask = NULL; GdkColormap *colormap; colormap = gdk_colormap_get_system(); pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, colormap, &mask, NULL, "sat.xpm"); if (!pixmap) { perror("sat.xpm"); return; } gtk_plot_set_background_pixmap(GTK_PLOT(active_plot), pixmap); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; GtkPlotCanvasChild *child; gint page_width, page_height; gfloat scale = 1.; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "Image Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 0), 1., 1); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 1), 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .8, .70); gtk_plot_canvas_set_magnification(GTK_PLOT_CANVAS(canvas), 0.7); gtk_widget_show(active_plot); build_example1(active_plot); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demoimage.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkiconlist.c0000644000076400001440000016420212603754176014635 00000000000000/* gtkiconlist - gtkiconlist widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkiconlist * @short_description: A file icon list widget for GTK. * * GtkIconList is a GtkFixed subclass that allows you to display a table of xpm icons with editable labels. * It's completely designed from scratch with some ideas borrowed from gnome-icon-list. * It contains almost all of its features and more. * It can be used for file browsers and as a replacement of gnome-icon-list (without the need of using gnome libraries). * Like GtkSheet, it uses the widget GtkItemEntry to edit the text fields. */ #include #include #include #include #include #include #include "gtkextra-compat.h" #include "gtkitementry.h" #include "gtkiconlist.h" #include "gtkextra-marshal.h" #include #define DEFAULT_ROW_SPACING 4 #define DEFAULT_COL_SPACING 10 #define DEFAULT_TEXT_SPACE 60 #define DEFAULT_ICON_BORDER 2 #define DEFAULT_WIDTH 150 #define DEFAULT_HEIGHT 120 #define EVENTS_MASK (GDK_EXPOSURE_MASK | \ GDK_POINTER_MOTION_MASK | \ GDK_POINTER_MOTION_HINT_MASK | \ GDK_BUTTON_PRESS_MASK | \ GDK_BUTTON_RELEASE_MASK) /* Signals */ extern void _gtkextra_signal_emit(GtkObject *object, guint signal_id, ...); enum{ SELECT_ICON, UNSELECT_ICON, TEXT_CHANGED, ACTIVATE_ICON, DEACTIVATE_ICON, CLICK_EVENT, LAST_SIGNAL, }; static guint signals[LAST_SIGNAL] = {0}; static void gtk_icon_list_class_init (GtkIconListClass *klass); static void gtk_icon_list_init (GtkIconList *icon_list); static void gtk_icon_list_destroy (GtkObject *object); static void gtk_icon_list_finalize (GObject *object); static void gtk_icon_list_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static void gtk_icon_list_realize (GtkWidget *widget); static gint gtk_icon_list_expose (GtkWidget *widget, GdkEventExpose *event); static gint gtk_icon_list_button_press (GtkWidget *widget, GdkEventButton *event); static gint deactivate_entry (GtkIconList *iconlist); static gint entry_in (GtkWidget *widget, GdkEventButton *event, gpointer data); static gint entry_changed (GtkWidget *widget, gpointer data); static void select_icon (GtkIconList *iconlist, GtkIconListItem *item, GdkEvent *event); static void unselect_icon (GtkIconList *iconlist, GtkIconListItem *item, GdkEvent *event); static void unselect_all (GtkIconList *iconlist); static void set_labels (GtkIconList *iconlist, GtkIconListItem *item, const gchar *label); static GtkIconListItem *get_icon_from_entry (GtkIconList *iconlist, GtkWidget *widget); static void reorder_icons (GtkIconList *iconlist); static void item_size_request (GtkIconList *iconlist, GtkIconListItem *item, GtkRequisition *requisition); static void gtk_icon_list_move (GtkIconList *iconlist, GtkIconListItem *icon, guint x, guint y); static GtkIconListItem *gtk_icon_list_real_add (GtkIconList *iconualist, GdkPixmap *pixmap, GdkBitmap *mask, const gchar *label, gpointer data); static GtkIconListItem *gtk_icon_list_put (GtkIconList *iconlist, guint x, guint y, GdkPixmap *pixmap, GdkBitmap *mask, const gchar *label, gpointer data); static gint icon_key_press (GtkWidget *widget, GdkEventKey *key, gpointer data); static gint sort_list (gpointer a, gpointer b); static void pixmap_destroy ( GtkImage* pixmap); static GtkFixedClass *parent_class = NULL; static guint STRING_WIDTH(GtkWidget *widget, PangoFontDescription *font, const gchar *text) { PangoRectangle rect; PangoLayout *layout; layout = gtk_widget_create_pango_layout (widget, text); pango_layout_set_font_description (layout, font); pango_layout_get_pixel_extents (layout, NULL, &rect); g_object_unref(G_OBJECT(layout)); return rect.width; } GType gtk_icon_list_get_type (void) { static GType icon_list_type = 0; if (!icon_list_type) { icon_list_type = g_type_register_static_simple ( gtk_fixed_get_type (), "GtkIconList", sizeof (GtkIconListClass), (GClassInitFunc) gtk_icon_list_class_init, sizeof (GtkIconList), (GInstanceInitFunc) gtk_icon_list_init, 0); } return icon_list_type; } static GtkIconListItem* gtk_icon_list_item_copy (const GtkIconListItem *item) { GtkIconListItem *new_item; g_return_val_if_fail (item != NULL, NULL); new_item = g_new (GtkIconListItem, 1); *new_item = *item; return new_item; } static void gtk_icon_list_item_free (GtkIconListItem *item) { g_return_if_fail (item != NULL); g_free (item); } GType gtk_icon_list_item_get_type (void) { static GType icon_list_item_type; if(!icon_list_item_type) { icon_list_item_type = g_boxed_type_register_static("GtkIconListItem", (GBoxedCopyFunc)gtk_icon_list_item_copy, (GBoxedFreeFunc)gtk_icon_list_item_free); } return icon_list_item_type; } static void gtk_icon_list_class_init (GtkIconListClass *klass) { GtkObjectClass *object_class; GObjectClass *gobject_class; GtkWidgetClass *widget_class; parent_class = g_type_class_ref (gtk_fixed_get_type ()); object_class = (GtkObjectClass *) klass; gobject_class = (GObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; object_class->destroy = gtk_icon_list_destroy; gobject_class->finalize = gtk_icon_list_finalize; widget_class->realize = gtk_icon_list_realize; widget_class->size_allocate = gtk_icon_list_size_allocate; widget_class->expose_event = gtk_icon_list_expose; widget_class->button_press_event = gtk_icon_list_button_press; /** * GtkIconList::select_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new() * @icon: a #GtkIconListItem * @event: a #GdkEvent * * Emmited whenever the icon is selected. */ signals[SELECT_ICON] = g_signal_new("select_icon", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkIconListClass, select_icon), NULL, NULL, gtkextra_BOOLEAN__BOXED_BOXED, G_TYPE_BOOLEAN, 2, G_TYPE_ICON_LIST_ITEM, GDK_TYPE_EVENT); /** * GtkIconList::unselect_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new() * @icon: a #GtkIconListItem * @event: a #GdkEvent * * Emmited whenever the icon is unselected. */ signals[UNSELECT_ICON] = g_signal_new("unselect_icon", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(GtkIconListClass, unselect_icon), NULL, NULL, gtkextra_VOID__BOXED_BOXED, G_TYPE_NONE, 2, G_TYPE_ICON_LIST_ITEM, GDK_TYPE_EVENT); /** * GtkIconList::text_changed: * @iconlist: #GtkIconList widget created with gtk_icon_list_new() * @icon: a #GtkIconListItem * @new_text: modified text * * Emmited whenever text of the icon is changed. */ signals[TEXT_CHANGED] = g_signal_new("text_changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkIconListClass, text_changed), NULL,NULL, gtkextra_BOOLEAN__BOXED_STRING, G_TYPE_BOOLEAN, 2, G_TYPE_ICON_LIST_ITEM, G_TYPE_STRING); /** * GtkIconList::activate_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new() * @icon: a #GtkIconListItem * * Emmited whenever whenever an icon is activated. */ signals[ACTIVATE_ICON] = g_signal_new("activate_icon", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkIconListClass, activate_icon), NULL, NULL, gtkextra_BOOLEAN__BOXED, G_TYPE_BOOLEAN, 1, G_TYPE_ICON_LIST_ITEM); /** * GtkIconList::deactivate_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new() * @icon: a #GtkIconListItem * * Emmited whenever whenever an icon is deactivated. */ signals[DEACTIVATE_ICON] = g_signal_new("deactivate_icon", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkIconListClass, deactivate_icon), NULL, NULL, gtkextra_BOOLEAN__BOXED, G_TYPE_BOOLEAN, 1, G_TYPE_ICON_LIST_ITEM); /** * GtkIconList::click_event: * @iconlist: #GtkIconList widget created with gtk_icon_list_new() * @event: a #GdkEvent * * Emmited whenever an event occures. */ signals[CLICK_EVENT] = g_signal_new("click_event", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(GtkIconListClass, click_event), NULL, NULL, gtkextra_VOID__BOXED, G_TYPE_NONE, 1, GDK_TYPE_EVENT); } /** * gtk_icon_list_freeze: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Freeze icon list. */ void gtk_icon_list_freeze(GtkIconList *iconlist) { iconlist->freeze_count++; } /** * gtk_icon_list_thaw: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Thaw(unfreeze) icon list. */ void gtk_icon_list_thaw(GtkIconList *iconlist) { if(iconlist->freeze_count == 0) return; iconlist->freeze_count--; if(iconlist->freeze_count == 0) reorder_icons(iconlist); } /** * gtk_icon_list_update: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Update the icon list widget.. */ void gtk_icon_list_update(GtkIconList *iconlist) { reorder_icons(iconlist); } static void reorder_icons(GtkIconList *iconlist) { GtkWidget *widget; GtkIconListItem *item; GtkRequisition req; GtkAllocation allocation; GList *icons; gint hspace = 0; gint vspace = 0; gint x = 0; gint y = 0; gint old_width, old_height; widget = GTK_WIDGET(iconlist); if(iconlist->freeze_count > 0) return; /* gdk_threads_enter(); */ gtk_widget_get_allocation(widget, &allocation); old_width = allocation.width; old_height = allocation.height; if(gtk_widget_get_realized(widget)){ if(GTK_IS_VIEWPORT(gtk_widget_get_parent(widget))) gdk_window_get_size( GTK_VIEWPORT(gtk_widget_get_parent(widget))->view_window, &old_width, &old_height); } y = iconlist->row_spacing; x = iconlist->col_spacing; icons = iconlist->icons; while(icons){ item = (GtkIconListItem *) icons->data; gtk_icon_list_move(iconlist, item, x, y); item_size_request(iconlist, item, &req); vspace = req.height + iconlist->row_spacing; hspace = req.width + iconlist->col_spacing; switch(iconlist->mode){ case GTK_ICON_LIST_TEXT_RIGHT: y += vspace; if(y + vspace >= old_height - DEFAULT_COL_SPACING){ x += hspace; y = iconlist->row_spacing; } break; case GTK_ICON_LIST_TEXT_BELOW: case GTK_ICON_LIST_ICON: default: x += hspace; if(x + hspace >= old_width - DEFAULT_COL_SPACING){ x = iconlist->col_spacing; y += vspace; } break; } icons = icons->next; } /* gdk_threads_leave(); */ } static void gtk_icon_list_move(GtkIconList *iconlist, GtkIconListItem *icon, guint x, guint y) { GtkRequisition req1, req2; GtkRequisition req; GtkRequisition pixmap_req; GtkRequisition entry_req; GtkAllocation a; GtkAllocation pixmap_allocation; GtkAllocation entry_allocation; GtkAllocation icon_allocation; const gchar *text; gint old_width, old_height, width, height; gint old_x, old_y; gint size; old_x = icon->x; old_y = icon->y; icon->x = x; icon->y = y; /* if(x == old_x && y == old_y) return; */ item_size_request(iconlist, icon, &req); gtk_widget_get_requisition(icon->pixmap, &pixmap_req); gtk_widget_get_requisition(icon->entry, &entry_req); req1 = pixmap_req; req2 = entry_req; req2.width = iconlist->text_space; req1.width += 2*iconlist->icon_border; req1.height += 2*iconlist->icon_border; if(iconlist->mode == GTK_ICON_LIST_TEXT_BELOW){ req1.width = MAX(req1.width, req.width); } if(iconlist->mode == GTK_ICON_LIST_ICON) req2.width = req2.height = 0; gtk_widget_get_allocation(GTK_WIDGET(iconlist), &icon_allocation); old_width = width = icon_allocation.width; old_height = height = icon_allocation.height; gtk_fixed_move(GTK_FIXED(iconlist), icon->pixmap, x + req1.width/2 - pixmap_req.width/2, y + iconlist->icon_border); gtk_widget_get_allocation(icon->pixmap, &pixmap_allocation); gtk_widget_get_allocation(icon->entry, &entry_allocation); pixmap_allocation.x += (x - old_x); pixmap_allocation.y += (y - old_y); entry_allocation.x += (x - old_x); entry_allocation.y += (y - old_y); entry_allocation.width = req2.width; gtk_widget_set_allocation(icon->pixmap, &pixmap_allocation); gtk_widget_set_allocation(icon->entry, &entry_allocation); switch(iconlist->mode){ case GTK_ICON_LIST_TEXT_BELOW: text = gtk_entry_get_text(GTK_ENTRY(icon->entry)); size = STRING_WIDTH(icon->entry, gtk_widget_get_style(icon->entry)->font_desc, text); size = MIN(size, req2.width); gtk_fixed_move(GTK_FIXED(iconlist), icon->entry, x - req2.width/2 + req1.width/2, y + req1.height + iconlist->icon_border); if(y + req.height > height) height += req.height; break; case GTK_ICON_LIST_TEXT_RIGHT: gtk_fixed_move(GTK_FIXED(iconlist), icon->entry, x + req1.width + iconlist->icon_border, y + req1.height/2 - req2.height/2); if(x + req.width > width) width += req.width; break; case GTK_ICON_LIST_ICON: default: ; } gtk_widget_get_allocation(icon->entry, &a); if(icon->entry){ gtk_widget_size_allocate(icon->entry, &a); gtk_widget_draw(icon->entry, NULL); } } static void gtk_icon_list_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { GtkAllocation *old = gtk_object_get_data(GTK_OBJECT(widget),"viewport"); GTK_WIDGET_CLASS(parent_class)->size_allocate(widget, allocation); if(gtk_widget_get_realized(widget) && old){ gint new_width, new_height; gdk_window_get_size(GTK_VIEWPORT(gtk_widget_get_parent(widget))->view_window, &new_width, &new_height); if(old->width != new_width || old->height != new_height) reorder_icons(GTK_ICON_LIST(widget)); old->width = new_width; old->height = new_height; } } static void gtk_icon_list_realize(GtkWidget *widget) { GList *icons; GtkIconList *iconlist; GtkIconListItem *item; GtkStyle *style; GTK_WIDGET_CLASS(parent_class)->realize (widget); iconlist = GTK_ICON_LIST(widget); style = gtk_style_copy(gtk_widget_get_style(widget)); style->bg[0] = iconlist->background; gtk_widget_set_style(widget, style); gtk_style_set_background(style, gtk_widget_get_window(widget), GTK_STATE_NORMAL); gtk_style_set_background(style, gtk_widget_get_window(widget), GTK_STATE_ACTIVE); icons = iconlist->icons; while(icons){ item = (GtkIconListItem *) icons->data; gtk_widget_draw(item->pixmap, NULL); if(iconlist->mode != GTK_ICON_LIST_ICON){ GtkStyle *style; gtk_widget_realize(item->entry); style = gtk_style_copy(gtk_widget_get_style(item->entry)); style->bg[GTK_STATE_ACTIVE] = iconlist->background; style->bg[GTK_STATE_NORMAL] = iconlist->background; gtk_widget_set_style(item->entry, style); gtk_widget_show(item->entry); } if(item->entry) gtk_widget_draw(item->entry, NULL); icons = icons->next; } /* if(GTK_IS_VIEWPORT(widget->parent) && gtk_widget_get_realized(widget->parent)){ GtkAllocation *allocation = gtk_object_get_data(GTK_OBJECT(widget),"viewport"); gdk_window_get_size(GTK_VIEWPORT(widget->parent)->view_window, &allocation->width, &allocation->height); } reorder_icons(iconlist); */ } static void gtk_icon_list_init (GtkIconList *icon_list) { GtkWidget *widget; widget = GTK_WIDGET(icon_list); gtk_widget_ensure_style(widget); gdk_color_black(gtk_widget_get_colormap(widget), &(gtk_widget_get_style(widget)->black)); gdk_color_white(gtk_widget_get_colormap(widget), &(gtk_widget_get_style(widget)->white)); gtk_fixed_set_has_window(GTK_FIXED(widget), TRUE); gtk_widget_set_events (widget, gtk_widget_get_events(widget)| EVENTS_MASK); icon_list->selection = NULL; icon_list->is_editable = TRUE; icon_list->num_icons = 0; icon_list->background = gtk_widget_get_style(widget)->white; icon_list->row_spacing = DEFAULT_ROW_SPACING; icon_list->col_spacing = DEFAULT_COL_SPACING; icon_list->text_space = DEFAULT_TEXT_SPACE; icon_list->icon_border = DEFAULT_ICON_BORDER; icon_list->active_icon = NULL; icon_list->compare_func = (GCompareFunc)sort_list; } static gint sort_list(gpointer a, gpointer b) { GtkIconListItem *itema; GtkIconListItem *itemb; itema = (GtkIconListItem *)a; itemb = (GtkIconListItem *)b; return (strcmp(itema->label, itemb->label)); } static gboolean gtk_icon_list_expose (GtkWidget *widget, GdkEventExpose *event) { GtkIconList *icon_list; icon_list = GTK_ICON_LIST(widget); if(!gtk_widget_is_drawable(widget)) return FALSE; gtk_paint_flat_box (gtk_widget_get_style(widget), gtk_widget_get_window(widget), GTK_STATE_NORMAL, GTK_SHADOW_NONE, &event->area, widget, "base", 0, 0, -1, -1); GTK_WIDGET_CLASS(parent_class)->expose_event(widget, event); if(icon_list->active_icon && icon_list->active_icon->entry){ GtkAllocation allocation; gtk_widget_get_allocation(icon_list->active_icon->entry, &allocation); gdk_draw_rectangle(gtk_widget_get_window(widget), gtk_widget_get_style(widget)->black_gc, FALSE, allocation.x-2, allocation.y-2, allocation.width+4, allocation.height+4); } return FALSE; } static gint gtk_icon_list_button_press(GtkWidget *widget, GdkEventButton *event) { GtkIconList *iconlist; GtkIconListItem *item; gint x, y; GtkAllocation allocation; if(!GTK_IS_ICON_LIST(widget)) return FALSE; iconlist = GTK_ICON_LIST(widget); gtk_widget_get_pointer(widget, &x, &y); item = gtk_icon_list_get_icon_at(iconlist, x , y ); if(!item){ g_signal_emit(GTK_OBJECT(iconlist), signals[CLICK_EVENT], 0, event); return FALSE; } if(item->entry){ gtk_widget_get_allocation(item->entry, &allocation); if(x >= allocation.x && x <= allocation.x + allocation.width && y >= allocation.y && y <= allocation.y + allocation.height) return FALSE; } if(item) switch(iconlist->selection_mode){ case GTK_SELECTION_SINGLE: case GTK_SELECTION_BROWSE: unselect_all(iconlist); case GTK_SELECTION_MULTIPLE: select_icon(iconlist, item, (GdkEvent *)event); case GTK_SELECTION_NONE: break; } return FALSE; } static gint deactivate_entry(GtkIconList *iconlist) { GdkGC *gc; GtkEntry *entry; gboolean veto = TRUE; if(iconlist->active_icon) { _gtkextra_signal_emit(GTK_OBJECT(iconlist), signals[DEACTIVATE_ICON], iconlist->active_icon, &veto); if(!veto) return FALSE; entry = GTK_ENTRY(iconlist->active_icon->entry); if(!entry || !gtk_widget_get_realized(GTK_WIDGET(entry))) return TRUE; gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_entry_select_region(entry, 0, 0); gtk_item_entry_set_cursor_visible(GTK_ITEM_ENTRY(entry), FALSE); switch(iconlist->mode){ case GTK_ICON_LIST_TEXT_RIGHT: gtk_item_entry_set_text(GTK_ITEM_ENTRY(entry), iconlist->active_icon->entry_label, GTK_JUSTIFY_LEFT); break; case GTK_ICON_LIST_TEXT_BELOW: gtk_item_entry_set_text(GTK_ITEM_ENTRY(entry), iconlist->active_icon->entry_label, GTK_JUSTIFY_CENTER); break; case GTK_ICON_LIST_ICON: default: break; } if(gtk_widget_get_realized(iconlist->active_icon->entry)){ GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(entry), &allocation); gc = gdk_gc_new(gtk_widget_get_window(GTK_WIDGET(iconlist))); gdk_gc_set_foreground(gc, &iconlist->background); gdk_draw_rectangle(gtk_widget_get_window((GTK_WIDGET(iconlist))), gc, FALSE, allocation.x-2, allocation.y-2, allocation.width+4, allocation.height+4); gdk_gc_unref(gc); } /* iconlist->active_icon->state = GTK_STATE_NORMAL; */ iconlist->active_icon = NULL; } return TRUE; } static void select_icon(GtkIconList *iconlist, GtkIconListItem *item, GdkEvent *event) { gboolean veto = TRUE; if(item == NULL) return; _gtkextra_signal_emit(GTK_OBJECT(iconlist), signals[SELECT_ICON], item, event, &veto); if(!veto) return; if(iconlist->mode != GTK_ICON_LIST_ICON){ if(!deactivate_entry(iconlist)) return; if(item->state != GTK_STATE_NORMAL && iconlist->selection_mode == GTK_SELECTION_MULTIPLE) { unselect_icon(iconlist, item, event); return; } if(item->state == GTK_STATE_SELECTED) return; if(item->entry && gtk_widget_get_realized(item->entry)){ GtkStyle *style = gtk_style_copy(gtk_widget_get_style(item->entry)); style->bg[GTK_STATE_ACTIVE] = style->base[GTK_STATE_SELECTED]; style->bg[GTK_STATE_NORMAL] = style->base[GTK_STATE_SELECTED]; style->text[GTK_STATE_ACTIVE] = style->text[GTK_STATE_SELECTED]; style->text[GTK_STATE_NORMAL] = style->text[GTK_STATE_SELECTED]; gtk_widget_set_style(item->entry, style); gtk_style_unref(style); switch(iconlist->mode){ case GTK_ICON_LIST_TEXT_RIGHT: gtk_item_entry_set_text(GTK_ITEM_ENTRY(item->entry), item->label, GTK_JUSTIFY_LEFT); break; case GTK_ICON_LIST_TEXT_BELOW: gtk_item_entry_set_text(GTK_ITEM_ENTRY(item->entry), item->label, GTK_JUSTIFY_CENTER); break; case GTK_ICON_LIST_ICON: default: break; } } } iconlist->selection = g_list_append(iconlist->selection, item); /* { GList *aux = iconlist->selection; while(aux){ GtkIconListItem *kk = (GtkIconListItem *)aux->data; printf("SELECTION %s\n",kk->entry_label); aux = aux->next; } } */ item->state = GTK_STATE_SELECTED; if(item->entry) gtk_widget_grab_focus(item->entry); } static void unselect_icon(GtkIconList *iconlist, GtkIconListItem *item, GdkEvent *event) { GList *selection; GtkIconListItem *icon; if(!item) return; if(item->state == GTK_STATE_NORMAL) return; selection = iconlist->selection; while(selection){ icon = (GtkIconListItem *)selection->data; if(item == icon) break; selection = selection->next; } if(selection){ iconlist->selection = g_list_remove_link(iconlist->selection, selection); } item->state = GTK_STATE_NORMAL; if(iconlist->mode != GTK_ICON_LIST_ICON){ if(item->entry && gtk_widget_get_realized(item->entry)){ GtkStyle *style = gtk_style_copy(gtk_widget_get_style(item->entry)); style->bg[GTK_STATE_ACTIVE] = iconlist->background; style->bg[GTK_STATE_NORMAL] = iconlist->background; style->text[GTK_STATE_ACTIVE] = gtk_widget_get_style(GTK_WIDGET(iconlist))->text[GTK_STATE_ACTIVE]; style->text[GTK_STATE_NORMAL] = gtk_widget_get_style(GTK_WIDGET(iconlist))->text[GTK_STATE_NORMAL]; gtk_widget_set_style(item->entry, style); gtk_style_unref(style); gtk_entry_select_region(GTK_ENTRY(item->entry), 0, 0); gtk_entry_set_text(GTK_ENTRY(item->entry), item->entry_label); gtk_editable_set_editable(GTK_EDITABLE(item->entry), FALSE); gtk_widget_draw(item->entry, NULL); } } g_signal_emit(GTK_OBJECT(iconlist), signals[UNSELECT_ICON], 0, item, event); } static void unselect_all(GtkIconList *iconlist) { GList *selection; GtkIconListItem *item; selection = iconlist->selection; while(selection){ item = (GtkIconListItem *)selection->data; unselect_icon(iconlist, item, NULL); selection = iconlist->selection; } g_list_free(iconlist->selection); iconlist->selection = NULL; } /** * gtk_icon_list_new: * @icon_width: the width of the icon * @mode: GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW * * Creates a new #GtkIconList widget. * * Returns: the newly-created #GtkIconList widget. */ GtkWidget* gtk_icon_list_new (guint icon_width, GtkIconListMode mode) { GtkIconList *icon_list; GtkAllocation *allocation; icon_list = g_object_new (gtk_icon_list_get_type (),NULL); gtk_icon_list_construct(icon_list, icon_width, mode); allocation = g_new0(GtkAllocation, 1); gtk_object_set_data(GTK_OBJECT(icon_list), "viewport", allocation); return GTK_WIDGET (icon_list); } /** * gtk_icon_list_construct: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @icon_width: the width of the icon * @mode: GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW * * Initialize iconlist structure. */ void gtk_icon_list_construct (GtkIconList *icon_list, guint icon_width, GtkIconListMode mode) { icon_list->icon_width = icon_width; icon_list->mode = mode; icon_list->icons = NULL; icon_list->selection = NULL; icon_list->selection_mode = GTK_SELECTION_SINGLE; } /** * gtk_icon_list_set_mode: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @mode: GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW * * Set the icons display mode . */ void gtk_icon_list_set_mode (GtkIconList *iconlist, GtkIconListMode mode) { GList *icons; iconlist->mode = mode; icons = iconlist->icons; while(icons){ GtkIconListItem *item; item = (GtkIconListItem *)icons->data; switch(mode){ case GTK_ICON_LIST_TEXT_RIGHT: gtk_item_entry_set_justification(GTK_ITEM_ENTRY(item->entry), GTK_JUSTIFY_LEFT); break; case GTK_ICON_LIST_TEXT_BELOW: gtk_item_entry_set_justification(GTK_ITEM_ENTRY(item->entry), GTK_JUSTIFY_CENTER); break; case GTK_ICON_LIST_ICON: default: break; } icons = icons->next; } reorder_icons(iconlist); } /** * gtk_icon_list_get_mode: * @iconlist: a #GtkIconList widget created with gtk_icon_list_new(). * * Get the icons display mode . * * Returns: * GTK_ICON_LIST_ICON,GTK_ICON_LIST_TEXT_RIGHT,GTK_ICON_LIST_TEXT_BELOW */ GtkIconListMode gtk_icon_list_get_mode (GtkIconList *iconlist) { return(iconlist->mode); } /** * gtk_icon_list_set_text_space: * @iconlist: a #GtkIconList widget created with gtk_icon_list_new(). * @text_space: distance in pixels. * * Set the text max size in pixels. */ void gtk_icon_list_set_text_space (GtkIconList *iconlist, guint text_space) { GList *icons; iconlist->text_space = text_space; icons = iconlist->icons; while(icons){ GtkIconListItem *item; item = (GtkIconListItem *)icons->data; if(item->entry) GTK_ITEM_ENTRY(item->entry)->text_max_size = text_space; icons = icons->next; } reorder_icons(iconlist); } static void gtk_icon_list_destroy (GtkObject *object) { GtkIconList *icon_list; g_return_if_fail (object != NULL); g_return_if_fail (GTK_IS_ICON_LIST (object)); icon_list = GTK_ICON_LIST (object); gtk_icon_list_clear(icon_list); if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void gtk_icon_list_finalize (GObject *object) { GtkIconList *icon_list; GtkAllocation *allocation; icon_list = GTK_ICON_LIST (object); allocation = gtk_object_get_data(GTK_OBJECT(icon_list), "viewport"); if(allocation) g_free(allocation); gtk_object_set_data(GTK_OBJECT(icon_list), "viewport", NULL); if (G_OBJECT_CLASS (parent_class)->finalize) (*G_OBJECT_CLASS (parent_class)->finalize) (object); } /** * gtk_icon_list_set_background: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @color: a #GdkColor * * Set the iconlist background color. */ void gtk_icon_list_set_background (GtkIconList *iconlist, GdkColor *color) { GtkWidget *widget; GtkStyle *style; g_return_if_fail (iconlist != NULL); g_return_if_fail (GTK_IS_ICON_LIST (iconlist)); widget = GTK_WIDGET(iconlist); iconlist->background = *color; style = gtk_style_copy(gtk_widget_get_style(widget)); style->bg[0] = iconlist->background; gtk_widget_set_style(widget, style); if(gtk_widget_get_window(widget)) gdk_window_set_background(gtk_widget_get_window(widget), color); gtk_style_unref(style); } static gint entry_changed (GtkWidget *widget, gpointer data) { GtkIconList *iconlist; GtkIconListItem *item; gboolean veto = TRUE; const gchar *text; iconlist = GTK_ICON_LIST(data); item = get_icon_from_entry(iconlist, widget); text = gtk_entry_get_text(GTK_ENTRY(widget)); _gtkextra_signal_emit(GTK_OBJECT(data), signals[TEXT_CHANGED], item, text, &veto); if(!veto) return veto; if(item->entry && gtk_editable_get_editable(GTK_EDITABLE(item->entry))){ if(item->label) g_free(item->label); if(text) item->label = g_strdup(text); if(item->entry_label) g_free(item->entry_label); set_labels(iconlist, item, text); } return veto; } static gint entry_in (GtkWidget *widget, GdkEventButton *event, gpointer data) { GtkIconList *iconlist; GtkIconListItem *item; gboolean veto = TRUE; if(!GTK_IS_ENTRY(widget)) return FALSE; iconlist = GTK_ICON_LIST(data); item = get_icon_from_entry(iconlist, widget); if(iconlist->active_icon && iconlist->active_icon->entry == widget) return FALSE; _gtkextra_signal_emit(GTK_OBJECT(iconlist), signals[ACTIVATE_ICON], &item, &veto); if(!veto) return FALSE; if(!deactivate_entry(iconlist)) return FALSE; if(item->state == GTK_STATE_SELECTED){ if(iconlist->is_editable && !gtk_editable_get_editable(GTK_EDITABLE(widget))){ unselect_all(iconlist); gtk_editable_set_editable(GTK_EDITABLE(widget), TRUE); gtk_item_entry_set_cursor_visible(GTK_ITEM_ENTRY(widget), TRUE); if(item->label) gtk_entry_set_text(GTK_ENTRY(widget), item->label); iconlist->active_icon = item; item->state = GTK_STATE_NORMAL; if(gtk_widget_is_drawable(widget)) { GtkAllocation allocation; gtk_widget_get_allocation(iconlist->active_icon->entry, &allocation); gdk_draw_rectangle(gtk_widget_get_window(GTK_WIDGET(iconlist)), gtk_widget_get_style(widget)->black_gc, FALSE, allocation.x-2, allocation.y-2, allocation.width+4, allocation.height+4); } }else{ g_signal_stop_emission_by_name (GTK_OBJECT(widget), "button_press_event"); if(iconlist->selection_mode == GTK_SELECTION_SINGLE || iconlist->selection_mode == GTK_SELECTION_BROWSE) unselect_all(iconlist); select_icon(iconlist, item, (GdkEvent *)event); } }else{ if(iconlist->selection_mode == GTK_SELECTION_SINGLE || iconlist->selection_mode == GTK_SELECTION_BROWSE) unselect_all(iconlist); select_icon(iconlist, item, (GdkEvent *)event); } return FALSE; } /** * gtk_icon_list_get_active_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Set the iconlist background color. * * Returns: the icon pointer */ GtkIconListItem * gtk_icon_list_get_active_icon(GtkIconList *iconlist) { return iconlist->active_icon; } static GtkIconListItem * get_icon_from_entry(GtkIconList *iconlist, GtkWidget *widget) { GList *icons; GtkIconListItem *item; icons = iconlist->icons; while(icons){ item = (GtkIconListItem *) icons->data; if(widget == item->entry) return item; icons = icons->next; } return NULL; } /** * gtk_icon_list_get_icon_at: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @x: x coordindate * @y: y coordinate * * Get the icon situated at x,y coordinates in icon list. * * Returns: the icon pointer */ GtkIconListItem * gtk_icon_list_get_icon_at(GtkIconList *iconlist, gint x, gint y) { GList *icons; GtkIconListItem *item; GtkRequisition req; icons = iconlist->icons; while(icons){ item = (GtkIconListItem *) icons->data; item_size_request(iconlist, item, &req); if(x >= item->x && x <= item->x + req.width && y >= item->y && y <= item->y + req.height) return item; icons = icons->next; } return NULL; } /** * gtk_icon_list_add: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @pixmap_file: from #include "file.xpm" * @label: label of the icon * @link: link * * Add a icon to the icon list. * * Returns: the icon pointer */ GtkIconListItem * gtk_icon_list_add (GtkIconList *iconlist, const gchar *pixmap_file, const gchar *label, gpointer link) { GtkIconListItem *item; GdkColormap *colormap; GdkPixmap *pixmap; GdkBitmap *mask; colormap = gdk_colormap_get_system(); pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, colormap, &mask, NULL, pixmap_file); item = gtk_icon_list_real_add(iconlist, pixmap, mask, label, link); return item; } /** * gtk_icon_list_add_from_data: * @iconlist: a #GtkIconList widget created with gtk_icon_list_new(). * @data: pointer to the xpm data string * @label: label of the icon * @link: a data pointer * * Add a icon to the icon list. * * Returns: the icon pointer */ GtkIconListItem * gtk_icon_list_add_from_data (GtkIconList *iconlist, gchar **data, const gchar *label, gpointer link) { GtkIconListItem *item; GdkColormap *colormap; GdkPixmap *pixmap; GdkBitmap *mask; colormap = gdk_colormap_get_system(); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, data); item = gtk_icon_list_real_add(iconlist, pixmap, mask, label, link); return item; } /** * gtk_icon_list_add_from_pixmap: * @icon_list: a #GtkIconList widget created with gtk_icon_list_new(). * @pixmap: a #GdkPixmap * @bitmap_mask: a #GdkBitmap * @label: label of the icon * @link: a gpointer link to some data * * Add a icon to the icon list. * * Returns: the icon pointer */ GtkIconListItem * gtk_icon_list_add_from_pixmap (GtkIconList *iconlist, GdkPixmap *pixmap, GdkBitmap *bitmap_mask, const gchar *label, gpointer link) { GtkIconListItem *item; gdk_pixmap_ref(pixmap); if(bitmap_mask) gdk_bitmap_ref(bitmap_mask); item = gtk_icon_list_real_add(iconlist, pixmap, bitmap_mask, label, link); return item; } static GtkIconListItem* gtk_icon_list_real_add (GtkIconList *iconlist, GdkPixmap *pixmap, GdkBitmap *mask, const gchar *label, gpointer data) { GtkIconListItem *item; GtkRequisition requisition; GtkAllocation allocation; gint hspace = 0; gint vspace = 0; gint x = 0; gint y = 0; gint width, height; gtk_widget_get_allocation(GTK_WIDGET(iconlist), &allocation); width = allocation.width; height = allocation.height; if(iconlist->num_icons > 0){ item = gtk_icon_list_get_nth(iconlist, iconlist->num_icons-1); x = item->x; y = item->y; item_size_request(iconlist, item, &requisition); vspace = requisition.height + iconlist->row_spacing; hspace = requisition.width + iconlist->col_spacing; switch(iconlist->mode){ case GTK_ICON_LIST_TEXT_RIGHT: y += vspace; if(y >= height){ x += hspace; y = iconlist->row_spacing; } break; case GTK_ICON_LIST_TEXT_BELOW: case GTK_ICON_LIST_ICON: default: x += hspace; if(x >= width){ x = iconlist->col_spacing; y += vspace; } break; } } else { y = iconlist->row_spacing; x = iconlist->col_spacing; } item = gtk_icon_list_put(iconlist, x, y, pixmap, mask, label, data); return item; } static GtkIconListItem * gtk_icon_list_put (GtkIconList *iconlist, guint x, guint y, GdkPixmap *pixmap, GdkBitmap *mask, const gchar *label, gpointer data) { GtkIconListItem *icon; GtkIconListItem *active_icon; GtkWidget *widget; GtkRequisition req, req1, req2; gint text_width; gint width, height, old_width, old_height; GtkAllocation alloc; GtkAllocation allocation; GtkRequisition pixmap_requisition; GtkRequisition entry_requisition; widget = GTK_WIDGET(iconlist); gtk_widget_get_allocation(GTK_WIDGET(iconlist), &allocation); old_width = width = allocation.width; old_height = height = allocation.height; active_icon = iconlist->active_icon; gtk_icon_list_set_active_icon(iconlist, NULL); icon = g_new(GtkIconListItem, 1); icon->x = x; icon->y = y; icon->state = GTK_STATE_NORMAL; icon->label = NULL; icon->entry_label = NULL; if(label) icon->label = g_strdup(label); icon->entry = gtk_item_entry_new(); icon->pixmap = gtk_image_new_from_pixmap(pixmap, mask); icon->link = data; GTK_ITEM_ENTRY(icon->entry)->text_max_size = iconlist->text_space; item_size_request(iconlist, icon, &req); gtk_widget_get_requisition(icon->pixmap, &pixmap_requisition); req1 = pixmap_requisition; gtk_widget_get_requisition(icon->entry, &entry_requisition); req2 = entry_requisition; req2.width = iconlist->text_space; req1.width += 2*iconlist->icon_border; req1.height += 2*iconlist->icon_border; if(iconlist->mode == GTK_ICON_LIST_TEXT_BELOW){ req1.width = MAX(req1.width, req.width); } if(iconlist->mode == GTK_ICON_LIST_ICON) req2.width = req2.height = 0; else set_labels(iconlist, icon, label); text_width = 0; if(label) { text_width = STRING_WIDTH(icon->entry, gtk_widget_get_style(icon->entry)->font_desc, label); } gtk_fixed_put(GTK_FIXED(iconlist), icon->pixmap, x + req1.width/2 - pixmap_requisition.width/2, y + iconlist->icon_border); alloc.x = x + req1.width/2 - pixmap_requisition.width/2; alloc.y = y + iconlist->icon_border; alloc.width = req1.width; alloc.height = req1.height; gtk_widget_size_allocate(icon->pixmap, &alloc); switch(iconlist->mode){ case GTK_ICON_LIST_TEXT_BELOW: gtk_item_entry_set_text(GTK_ITEM_ENTRY(icon->entry), icon->entry_label, GTK_JUSTIFY_CENTER); gtk_fixed_put(GTK_FIXED(iconlist), icon->entry, x - req2.width/2 + req1.width/2, y + req1.height + iconlist->icon_border); alloc.x = x - req2.width/2 + req1.width/2; alloc.y = y + req1.height + iconlist->icon_border; alloc.width = req2.width; alloc.height = req2.height; gtk_widget_size_allocate(icon->entry, &alloc); if(y + req1.height + iconlist->icon_border + req2.height > height) height += req1.height + iconlist->icon_border + req2.height; break; case GTK_ICON_LIST_TEXT_RIGHT: gtk_item_entry_set_text(GTK_ITEM_ENTRY(icon->entry), icon->entry_label, GTK_JUSTIFY_LEFT); gtk_fixed_put(GTK_FIXED(iconlist), icon->entry, x + req1.width + iconlist->icon_border, y + req1.height/2 - req2.height/2); alloc.x = x + req1.width + iconlist->icon_border; alloc.y = y + req1.height/2 - req2.height/2; alloc.width = req2.width; alloc.height = req2.height; gtk_widget_size_allocate(icon->entry, &alloc); if(x + req1.width + iconlist->icon_border + text_width > width) width += req1.width + iconlist->icon_border + text_width; break; case GTK_ICON_LIST_ICON: default: ; } if(gtk_widget_get_realized(GTK_WIDGET(iconlist))) if(iconlist->mode != GTK_ICON_LIST_ICON){ GtkStyle *style = gtk_style_copy(gtk_widget_get_style(icon->entry)); style->bg[GTK_STATE_ACTIVE] = iconlist->background; style->bg[GTK_STATE_NORMAL] = iconlist->background; gtk_widget_set_style(icon->entry, style); gtk_style_unref(style); gtk_widget_show(icon->entry); } gtk_widget_show(icon->pixmap); if(iconlist->compare_func) iconlist->icons = g_list_insert_sorted(iconlist->icons, icon, iconlist->compare_func); else iconlist->icons = g_list_append(iconlist->icons, icon); iconlist->num_icons++; if(gtk_widget_get_realized(GTK_WIDGET(iconlist))) reorder_icons(iconlist); gtk_editable_set_editable(GTK_EDITABLE(icon->entry), FALSE); g_signal_connect(GTK_OBJECT(icon->entry), "key_press_event", (void *)icon_key_press, iconlist); g_signal_connect(GTK_OBJECT(icon->entry), "button_press_event", (void *)entry_in, iconlist); g_signal_connect(GTK_OBJECT(icon->entry), "changed", (void *)entry_changed, iconlist); gtk_icon_list_set_active_icon(iconlist, active_icon); return icon; } static void set_labels(GtkIconList *iconlist, GtkIconListItem *icon, const gchar *label) { gint text_width; gint point_width; gint max_width; gchar *entry_label = NULL; gint n, space; if(!label) return; entry_label = (gchar *)g_malloc(strlen(label) + 5); entry_label[0] = label[0]; entry_label[1] = '\0'; text_width = STRING_WIDTH(icon->entry, gtk_widget_get_style(icon->entry)->font_desc, label); point_width = STRING_WIDTH(icon->entry, gtk_widget_get_style(icon->entry)->font_desc, "X"); max_width = iconlist->text_space; for(n = 0; n < strlen(label); n++){ space = strlen(label) - n + 1; if(space > 3 && STRING_WIDTH(icon->entry, gtk_widget_get_style(icon->entry)->font_desc, entry_label) + 3 * point_width > max_width) break; entry_label[n] = label[n]; entry_label[n + 1] = '\0'; } if(strlen(entry_label) < strlen(label)) sprintf(entry_label,"%s...", entry_label); icon->entry_label = g_strdup(entry_label); g_free(entry_label); } static gint icon_key_press(GtkWidget *widget, GdkEventKey *key, gpointer data) { GtkIconList *iconlist; iconlist = GTK_ICON_LIST(data); if(key->keyval != GDK_KEY_Return) return FALSE; if(iconlist->active_icon) select_icon(iconlist, iconlist->active_icon, NULL); return FALSE; } static void item_size_request(GtkIconList *iconlist, GtkIconListItem *item, GtkRequisition *requisition) { GtkRequisition req2; gtk_widget_size_request(item->entry, &req2); req2.width = iconlist->text_space; gtk_widget_size_request(item->pixmap, requisition); requisition->width = MAX(iconlist->icon_width, requisition->width); requisition->width += 2*iconlist->icon_border; requisition->height += 2*iconlist->icon_border; switch(iconlist->mode){ case GTK_ICON_LIST_TEXT_BELOW: requisition->height += req2.height; requisition->width = MAX(requisition->width, req2.width); break; case GTK_ICON_LIST_TEXT_RIGHT: requisition->width += req2.width; break; case GTK_ICON_LIST_ICON: default: ; } } /** * gtk_icon_list_set_editable: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @editable: TUE or FALSE * * Set if the user can edit the text in the editable widget or not. */ void gtk_icon_list_set_editable (GtkIconList *iconlist, gboolean editable) { GList *icons; GtkIconListItem *item; icons = iconlist->icons; while(icons){ item = (GtkIconListItem *) icons->data; gtk_editable_set_editable(GTK_EDITABLE(item->entry), editable); icons = icons->next; } iconlist->is_editable = editable; } /** * gtk_icon_list_get_nth: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @n: icon index number. * * Get nth icon from the icon list. * * Returns: a #GtkIconListItem */ GtkIconListItem * gtk_icon_list_get_nth(GtkIconList *iconlist, guint n) { return (GtkIconListItem *)g_list_nth_data(iconlist->icons, n); } /** * gtk_icon_list_get_index: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @item: a #GtkIconListItem * * Get the index number of the icon specified by its #GtkIconListItem pointer. * * Returns: icon index number */ gint gtk_icon_list_get_index(GtkIconList *iconlist, GtkIconListItem *item) { GList *icons; GtkIconListItem *icon; gint n = 0; if(item == NULL) return -1; icons = iconlist->icons; while(icons){ n++; icon = (GtkIconListItem *) icons->data; if(item == icon) break; icons = icons->next; } if(icons) return n; return -1; } static void remove_from_fixed(GtkIconList *iconlist, GtkWidget *widget) { GtkFixed *fixed; GList *children; fixed = GTK_FIXED(iconlist); children = fixed->children; while(children){ GtkFixedChild *child; child = children->data; if(child->widget == widget){ gtk_widget_unparent(widget); fixed->children = g_list_remove_link (fixed->children, children); g_list_free (children); g_free (child); break; } children = children->next; } } static void pixmap_destroy( GtkImage* pixmap) { /* release pixmap */ if (pixmap){ GdkPixmap* pm = NULL; GdkBitmap* bm = NULL; gtk_image_get_pixmap(pixmap, &pm, &bm); /* HB: i don't know enough about Gtk+ to call this a design flaw, but it * appears the pixmaps need to be destroyed by hand ... */ if (pm) gdk_pixmap_unref(pm); if (bm) gdk_pixmap_unref(bm); } } /** * gtk_icon_list_remove: * @iconlist: a #GtkIconList widget created with gtk_icon_list_new(). * @item: a #GtkIconListItem * * Remove the icon from the iconlist. */ void gtk_icon_list_remove (GtkIconList *iconlist, GtkIconListItem *item) { GList *icons; GtkIconListItem *icon = 0; if(item == NULL) return; icons = iconlist->icons; while(icons){ icon = (GtkIconListItem *) icons->data; if(item == icon) break; icons = icons->next; } if(icons){ if(icon->state == GTK_STATE_SELECTED) unselect_icon(iconlist, icon, NULL); if(icon == iconlist->active_icon) deactivate_entry(iconlist); pixmap_destroy((GtkImage*)icon->pixmap); if(icon->entry && iconlist->mode != GTK_ICON_LIST_ICON){ remove_from_fixed(iconlist, icon->entry); icon->entry = NULL; } if(icon->pixmap){ remove_from_fixed(iconlist, icon->pixmap); icon->pixmap = NULL; } if(icon->label){ g_free(icon->label); icon->label = NULL; } if(icon->entry_label){ g_free(icon->entry_label); icon->entry_label = NULL; } g_free(icon); iconlist->icons = g_list_remove_link(iconlist->icons, icons); g_list_free_1(icons); iconlist->num_icons--; } if(iconlist->num_icons == 0){ iconlist->icons = NULL; iconlist->selection = NULL; } } /** * gtk_icon_list_remove_nth: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @n: icon index number * * Remove nth icon from the iconlist. */ void gtk_icon_list_remove_nth (GtkIconList *iconlist, guint n) { GtkIconListItem *item; item = gtk_icon_list_get_nth(iconlist, n); gtk_icon_list_remove(iconlist, item); } /** * gtk_icon_list_clear: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Clear the icon list widget. */ void gtk_icon_list_clear(GtkIconList *iconlist) { GList *icons; GtkIconListItem *icon; if(iconlist->num_icons == 0) return; if(!deactivate_entry(iconlist)) return; unselect_all(iconlist); icons = iconlist->icons; while(icons){ icon = (GtkIconListItem *) icons->data; pixmap_destroy((GtkImage*)icon->pixmap); if(icon->entry && iconlist->mode != GTK_ICON_LIST_ICON){ remove_from_fixed(iconlist, icon->entry); icon->entry = NULL; } if(icon->pixmap){ gtk_widget_hide(icon->pixmap); remove_from_fixed(iconlist, icon->pixmap); icon->pixmap = NULL; } if(icon->label){ g_free(icon->label); icon->label = NULL; } if(icon->entry_label){ g_free(icon->entry_label); icon->entry_label = NULL; } g_free(icon); icon = NULL; iconlist->icons = g_list_remove_link(iconlist->icons, icons); g_list_free_1(icons); icons = iconlist->icons; } iconlist->icons = NULL; iconlist->selection = NULL; iconlist->active_icon = NULL; iconlist->num_icons = 0; } /** * gtk_icon_list_link: * @item: #GtkIconListItem * @data: a gpointer to some data * * Add a gpointer link to a icon from the iconlist. */ void gtk_icon_list_link(GtkIconListItem *item, gpointer data) { item->link = data; } /** * gtk_icon_list_get_link: * @item: a #GtkIconListItem * * Add a gpointer link to a icon from the iconlist. * * Returns: (transfer none) a gpointer to some data sed with * gtk_icon_list_link(). */ gpointer gtk_icon_list_get_link(GtkIconListItem *item) { return item->link; } /** * gtk_icon_list_get_icon_from_link: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @data: a gpointer to some data * * Gets the icon pointer from the link attached to it. * * Returns: a #GtkIconListItem */ GtkIconListItem * gtk_icon_list_get_icon_from_link(GtkIconList *iconlist, gpointer data) { GList *icons; GtkIconListItem *item; icons = iconlist->icons; while(icons){ item = (GtkIconListItem *) icons->data; if(data == item->link) return item; icons = icons->next; } return NULL; } /** * gtk_icon_list_get_entry: * @item: a #GtkIconListItem * * Get the item->entry. * * Returns: (transfer none) a #GtkWidget */ GtkWidget * gtk_icon_list_get_entry(GtkIconListItem *item) { return item->entry; } /** * gtk_icon_list_get_pixmap: * @item: a #GtkIconListItem * * Get the icon pixmap. * * Returns: (transfer none) a #GtkWidget */ GtkWidget * gtk_icon_list_get_pixmap(GtkIconListItem *item) { return item->pixmap; } /** * gtk_icon_list_set_pixmap: * @item: a #GtkIconListItem * @pixmap: a #GdkPixmap * @bitmap_mask: a #GdkBitmap * * Set the icon pixmap. */ void gtk_icon_list_set_pixmap(GtkIconListItem *item, GdkPixmap *pixmap, GdkBitmap *bitmap_mask) { gint x, y; GtkAllocation allocation; GtkWidget *widget = gtk_widget_get_parent(item->pixmap); x = item->x; y = item->y; gtk_container_remove(GTK_CONTAINER(widget), item->pixmap); gtk_widget_get_allocation(item->pixmap, &allocation); x = allocation.x; y = allocation.y; item->pixmap = gtk_image_new_from_pixmap(pixmap, bitmap_mask); gtk_widget_show(item->pixmap); gtk_fixed_put(GTK_FIXED(widget), item->pixmap, x, y); } /** * gtk_icon_list_set_label: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @item: a #GtkIconListItem * @label: icon label * * Set the icon label. */ void gtk_icon_list_set_label(GtkIconList *iconlist, GtkIconListItem *item, const gchar *label) { if(item->label){ g_free(item->label); item->label = NULL; } if(item->entry_label){ g_free(item->entry_label); item->entry_label = NULL; } if(label) item->label = g_strdup(label); gtk_entry_set_text(GTK_ENTRY(item->entry), label); set_labels(iconlist, item, label); } /********************************** * gtk_icon_list_set_icon_width * gtk_icon_list_set_row_spacing * gtk_icon_list_set_col_spacing * gtk_icon_list_set_text_space * gtk_icon_list_icon_border **********************************/ /** * gtk_icon_list_set_icon_width: * @iconlist: a #GtkIconList widget created with gtk_icon_list_new(). * @width: icon width in pixels. * * Set the icon width. */ void gtk_icon_list_set_icon_width(GtkIconList *iconlist, guint width) { iconlist->icon_width = width; reorder_icons(iconlist); } /** * gtk_icon_list_set_icon_border: * @iconlist: a #GtkIconList widget created with gtk_icon_list_new(). * @border: icon border in pixels. * * Set the icon border. */ void gtk_icon_list_set_icon_border(GtkIconList *iconlist, guint border) { iconlist->icon_border = border; reorder_icons(iconlist); } /** * gtk_icon_list_set_row_spacing: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @spacing: spacing between rows in pixels. * * Set the icon spacing between rows. */ void gtk_icon_list_set_row_spacing(GtkIconList *iconlist, guint spacing) { iconlist->row_spacing = spacing; reorder_icons(iconlist); } /** * gtk_icon_list_set_col_spacing: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @spacing: spacing between columns in pixels. * * Set the icon spacing between columns. */ void gtk_icon_list_set_col_spacing(GtkIconList *iconlist, guint spacing) { iconlist->col_spacing = spacing; reorder_icons(iconlist); } /********************************** * gtk_icon_list_set_selection_mode * gtk_icon_list_select_icon * gtk_icon_list_unselect_icon * gtk_icon_list_unselect_all **********************************/ /** * gtk_icon_list_set_selection_mode: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @mode: GTK_ICON_LIST_ICON, GTK_ICON_LIST_TEXT_RIGHT, GTK_ICON_LIST_TEXT_BELOW * * Set the icon selection mode. */ void gtk_icon_list_set_selection_mode(GtkIconList *iconlist, gint mode) { iconlist->selection_mode = mode; } /** * gtk_icon_list_select_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @item: a #GtkIconListItem * * Select the icon specified by pointer. */ void gtk_icon_list_select_icon(GtkIconList *iconlist, GtkIconListItem *item) { select_icon(iconlist, item, NULL); } /** * gtk_icon_list_unselect_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @item: a #GtkIconListItem * * Unselect the icon specified by pointer. */ void gtk_icon_list_unselect_icon(GtkIconList *iconlist, GtkIconListItem *item) { unselect_icon(iconlist, item, NULL); } /** * gtk_icon_list_unselect_all: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Unselect all icons. */ void gtk_icon_list_unselect_all(GtkIconList *iconlist) { unselect_all(iconlist); } /** * gtk_icon_list_set_active_icon: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * @icon: a #GtkIconListItem * * Set an active icon in the icon list. */ void gtk_icon_list_set_active_icon(GtkIconList *iconlist, GtkIconListItem *icon) { if(!icon){ deactivate_entry(iconlist); unselect_all(iconlist); return; } if(icon->entry){ icon->state = GTK_STATE_SELECTED; entry_in(icon->entry, NULL, iconlist); gtk_widget_grab_focus(icon->entry); } } /** * gtk_icon_list_is_editable: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Get the editable status of icon list. * * Returns: TRUE or FALSE */ gboolean gtk_icon_list_is_editable (GtkIconList *iconlist) { return (iconlist->is_editable); } /** * gtk_icon_list_get_row_spacing: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Get the spacing between rows. * * Returns: spacing between rows in pixels. */ guint gtk_icon_list_get_row_spacing (GtkIconList *iconlist) { return(iconlist->row_spacing); } /** * gtk_icon_list_get_col_spacing: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Get the spacing between columns. * * Returns: spacing between columns in pixels. */ guint gtk_icon_list_get_col_spacing (GtkIconList *iconlist) { return(iconlist->col_spacing); } /** * gtk_icon_list_get_text_space: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Get the text maximum size in pixels. * * Returns: text maximum size distance in pixels. */ guint gtk_icon_list_get_text_space (GtkIconList *iconlist) { return(iconlist->text_space); } /** * gtk_icon_list_get_icon_border: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Get the icon border width. * * Returns: icon border width in pixels. */ guint gtk_icon_list_get_icon_border (GtkIconList *iconlist) { return(iconlist->icon_border); } /** * gtk_icon_list_get_icon_width: * @iconlist: #GtkIconList widget created with gtk_icon_list_new(). * * Get the icon width. * * Returns: icon width in pixels. */ guint gtk_icon_list_get_icon_width (GtkIconList *iconlist) { return(iconlist->icon_width); } gtkextra-3.2.0/gtkextra/gtkplotsurface.c0000644000076400001440000015165212603754176015345 00000000000000/* gtkplotsurface - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotsurface * @short_description: * * FIXME:: need long description */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotsurface.h" #include "gtkpsfont.h" #include "gtkplotpc.h" #define P_(string) string static void gtk_plot_surface_class_init (GtkPlotSurfaceClass *klass); static void gtk_plot_surface_init (GtkPlotSurface *data); static void gtk_plot_surface_destroy (GtkObject *object); static void gtk_plot_surface_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_surface_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_surface_clone (GtkPlotData *data, GtkPlotData *copy); static void gtk_plot_surface_update_range (GtkPlotData *data); static void gtk_plot_surface_real_build_mesh (GtkPlotSurface *surface); static void gtk_plot_surface_build_polygons (GtkPlotSurface *surface); static void gtk_plot_surface_sort_polygons (GtkPlotSurface *surface); static void update_data (GtkPlotData *data, gboolean new_range); static gboolean gtk_plot_surface_add_to_plot (GtkPlotData *data, GtkPlot *plot); static void gtk_plot_surface_draw_private (GtkPlotData *data); static void gtk_plot_surface_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_surface_get_legend_size (GtkPlotData *data, gint *width, gint *height); static void gtk_plot_surface_draw_polygons (GtkPlotSurface *surface); static void gtk_plot_surface_lighting (GdkColor *a, GdkColor *b, gdouble normal, gdouble ambient); static void clear_polygons (GtkPlotSurface *surface); extern gint roundint (gdouble x); static void hsv_to_rgb (gdouble h, gdouble s, gdouble v, gdouble *r, gdouble *g, gdouble *b); static void rgb_to_hsv (gdouble r, gdouble g, gdouble b, gdouble *h, gdouble *s, gdouble *v); static gint compare_func (gpointer a, gpointer b); enum { ARG_0, ARG_USE_HEIGHT, ARG_USE_AMPLITUD, ARG_LIGHT, ARG_AMBIENT, ARG_NX, ARG_NY, ARG_SHOW_GRID, ARG_SHOW_MESH, ARG_TRANSPARENT, ARG_XSTEP, ARG_YSTEP, ARG_MESH_STYLE, ARG_MESH_WIDTH, ARG_MESH_COLOR, }; static GtkPlotDataClass *parent_class = NULL; /* "stolen" from 3dgpl */ gulong _sqrt(register gulong arg) { register gint i; register gulong nprd,msk=0x8000L,val=0,prd=0; for(i=15;i>=0;i--){ nprd = prd + (val<<(i+1))+(msk<>= 1; } return val; } GType gtk_plot_surface_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotSurface", sizeof (GtkPlotSurfaceClass), (GClassInitFunc) gtk_plot_surface_class_init, sizeof (GtkPlotSurface), (GInstanceInitFunc) gtk_plot_surface_init, 0); } return data_type; } static void gtk_plot_surface_class_init (GtkPlotSurfaceClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GtkPlotSurfaceClass *surface_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; surface_class = (GtkPlotSurfaceClass *) klass; object_class->destroy = gtk_plot_surface_destroy; gobject_class->set_property = gtk_plot_surface_set_property; gobject_class->get_property = gtk_plot_surface_get_property; /** * GtkPlotSurface:use_height: * * **/ g_object_class_install_property (gobject_class, ARG_USE_HEIGHT, g_param_spec_boolean ("use_height", P_(""), P_(""), TRUE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:use_amplitud: * * **/ g_object_class_install_property (gobject_class, ARG_USE_AMPLITUD, g_param_spec_boolean ("use_amplitud", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:vector_light: * * **/ g_object_class_install_property (gobject_class, ARG_LIGHT, g_param_spec_pointer ("vector_light", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:ambient: * * **/ g_object_class_install_property (gobject_class, ARG_AMBIENT, g_param_spec_double ("ambient", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:nx: * * **/ g_object_class_install_property (gobject_class, ARG_NX, g_param_spec_int ("nx", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:ny: * * **/ g_object_class_install_property (gobject_class, ARG_NY, g_param_spec_int ("ny", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:show_grid: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_GRID, g_param_spec_boolean ("show_grid", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:show_mesh: * * **/ g_object_class_install_property (gobject_class, ARG_SHOW_MESH, g_param_spec_boolean ("show_mesh", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:transparent: * * **/ g_object_class_install_property (gobject_class, ARG_TRANSPARENT, g_param_spec_boolean ("transparent", P_(""), P_(""), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:xstep: * * **/ g_object_class_install_property (gobject_class, ARG_XSTEP, g_param_spec_double ("xstep", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:ystep: * * **/ g_object_class_install_property (gobject_class, ARG_YSTEP, g_param_spec_double ("ystep", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:mesh_style: * * **/ g_object_class_install_property (gobject_class, ARG_MESH_STYLE, g_param_spec_int ("mesh_style", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:mesh_width: * * **/ g_object_class_install_property (gobject_class, ARG_MESH_WIDTH, g_param_spec_double ("mesh_width", P_(""), P_(""), 0,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotSurface:mesh_color: * * **/ g_object_class_install_property (gobject_class, ARG_MESH_COLOR, g_param_spec_pointer ("mesh_color", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); data_class->clone = gtk_plot_surface_clone; data_class->update = update_data; data_class->add_to_plot = gtk_plot_surface_add_to_plot; data_class->draw_data = gtk_plot_surface_draw_private; data_class->draw_legend = gtk_plot_surface_draw_legend; data_class->get_legend_size = gtk_plot_surface_get_legend_size; surface_class->draw_polygons = gtk_plot_surface_draw_polygons; surface_class->build_polygons = gtk_plot_surface_build_polygons; surface_class->sort_polygons = gtk_plot_surface_sort_polygons; } static void gtk_plot_surface_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotSurface *data; data = GTK_PLOT_SURFACE (object); switch (prop_id) { case ARG_USE_HEIGHT: data->use_height_gradient = g_value_get_boolean(value); break; case ARG_USE_AMPLITUD: data->use_amplitud = g_value_get_boolean(value); break; case ARG_LIGHT: data->light = *((GtkPlotVector *)g_value_get_pointer(value)); break; case ARG_AMBIENT: data->ambient = g_value_get_double(value); break; case ARG_NX: data->nx = g_value_get_int(value); break; case ARG_NY: data->ny = g_value_get_int(value); break; case ARG_SHOW_GRID: data->show_grid = g_value_get_boolean(value); break; case ARG_SHOW_MESH: data->show_mesh = g_value_get_boolean(value); break; case ARG_TRANSPARENT: data->transparent = g_value_get_boolean(value); break; case ARG_XSTEP: data->xstep = g_value_get_double(value); break; case ARG_YSTEP: data->ystep = g_value_get_double(value); break; case ARG_MESH_STYLE: data->mesh_line.line_style = g_value_get_int(value); break; case ARG_MESH_WIDTH: data->mesh_line.line_width = g_value_get_double(value); break; case ARG_MESH_COLOR: data->mesh_line.color = *((GdkColor *)g_value_get_pointer(value)); break; } } static void gtk_plot_surface_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotSurface *data; data = GTK_PLOT_SURFACE (object); switch (prop_id) { case ARG_USE_HEIGHT: g_value_set_boolean(value, data->use_height_gradient); break; case ARG_USE_AMPLITUD: g_value_set_boolean(value, data->use_amplitud); break; case ARG_LIGHT: g_value_set_pointer(value, &data->light); break; case ARG_AMBIENT: g_value_set_double(value, data->ambient); break; case ARG_NX: g_value_set_int(value, data->nx); break; case ARG_NY: g_value_set_int(value, data->ny); break; case ARG_SHOW_GRID: g_value_set_boolean(value, data->show_grid); break; case ARG_SHOW_MESH: g_value_set_boolean(value, data->show_mesh); break; case ARG_TRANSPARENT: g_value_set_boolean(value, data->transparent); break; case ARG_XSTEP: g_value_set_double(value, data->xstep); break; case ARG_YSTEP: g_value_set_double(value, data->ystep); break; case ARG_MESH_STYLE: g_value_set_int(value, data->mesh_line.line_style); break; case ARG_MESH_WIDTH: g_value_set_double(value, data->mesh_line.line_width); break; case ARG_MESH_COLOR: g_value_set_pointer(value, &data->mesh_line.color); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void update_data (GtkPlotData *data, gboolean new_range) { if(new_range && data->is_function) GTK_PLOT_SURFACE(data)->recalc_dt = TRUE; GTK_PLOT_DATA_CLASS(parent_class)->update(data, new_range); } static void gtk_plot_surface_update_range (GtkPlotData *data) { GtkPlotSurface *surface; GtkPlot *plot; if(!data->redraw_pending) return; surface = GTK_PLOT_SURFACE(data); plot = data->plot; if(!surface->recalc_dt && data->num_points > 0){ gtk_plot_surface_recalc_nodes(surface); data->redraw_pending = FALSE; surface->recalc_dt = FALSE; return; } if(!data->is_function && data->num_points > 0){ if(surface->recalc_dt) gtk_plot_surface_build_mesh(surface); else gtk_plot_surface_recalc_nodes(surface); data->redraw_pending = FALSE; surface->recalc_dt = FALSE; return; } if(data->is_function){ gdouble xstep, ystep; gdouble xmin, xmax, ymin, ymax; gdouble x, y; gdouble *fx = NULL, *fy = NULL, *fz = NULL; gint nx, ny; gint npoints; xmin = GTK_PLOT(plot)->xmin; xmax = GTK_PLOT(plot)->xmax; ymin = GTK_PLOT(plot)->ymin; ymax = GTK_PLOT(plot)->ymax; xstep = surface->xstep; surface->nx = roundint((xmax - xmin) / xstep) + 1; ystep = surface->ystep; surface->ny = roundint((ymax - ymin) / ystep) + 1; npoints = surface->nx * surface->ny; fx = (gdouble *)g_malloc((npoints + 1) * sizeof(gdouble)); fy = (gdouble *)g_malloc((npoints + 1) * sizeof(gdouble)); fz = (gdouble *)g_malloc((npoints + 1) * sizeof(gdouble)); npoints = 0; y = ymin; for(ny = 0; ny < surface->ny; ny++) { x = xmin; for(nx = 0; nx < surface->nx; nx++) { gboolean error; fx[npoints] = x; fy[npoints] = y; fz[npoints] = data->function3d(plot, data, x, y, &error); x += xstep; npoints++; } y += ystep; } gtk_plot_data_set_x(GTK_PLOT_DATA(surface), fx); gtk_plot_data_set_y(GTK_PLOT_DATA(surface), fy); gtk_plot_data_set_z(GTK_PLOT_DATA(surface), fz); gtk_plot_data_set_numpoints(GTK_PLOT_DATA(surface), npoints); gtk_plot_surface_build_mesh(surface); g_free(fx); g_free(fy); g_free(fz); } data->redraw_pending = FALSE; surface->recalc_dt = FALSE; } static gboolean gtk_plot_surface_add_to_plot (GtkPlotData *data, GtkPlot *plot) { if(!data->is_function && data->num_points > 0){ gtk_plot_surface_build_mesh(GTK_PLOT_SURFACE(data)); } data->redraw_pending = TRUE; return TRUE; } static void gtk_plot_surface_init (GtkPlotSurface *dataset) { GtkWidget *widget; GdkColormap *colormap; GdkColor color; GtkPlotArray *dim; gtk_widget_set_has_window(GTK_WIDGET(dataset), FALSE); widget = GTK_WIDGET(dataset); colormap = gtk_widget_get_colormap(widget); gdk_color_parse("black", &color); gdk_color_alloc(colormap, &color); dataset->grid_foreground = color; gdk_color_parse("dark green", &color); gdk_color_alloc(colormap, &color); dataset->grid_background = color; gdk_color_parse("gray30", &color); gdk_color_alloc(colormap, &color); dataset->shadow = color; gdk_color_parse("blue", &color); gdk_color_alloc(colormap, &color); dataset->color = color; dataset->light.x = 0.; dataset->light.y = 0.; dataset->light.z = 1.; dataset->nx = 0; dataset->ny = 0; dataset->show_grid = TRUE; dataset->show_mesh = FALSE; dataset->transparent = FALSE; dataset->use_height_gradient = FALSE; dataset->use_amplitud = FALSE; dataset->ambient = 0.3; dataset->xstep = 0.05; dataset->ystep = 0.05; dataset->mesh_line.color = dataset->grid_foreground; dataset->mesh_line.line_width = 1; dataset->mesh_line.line_style = GTK_PLOT_LINE_SOLID; dataset->dt = GTK_PLOT_DT(gtk_plot_dt_new(0)); dataset->dt->quadrilateral = FALSE; dataset->recalc_dt = TRUE; dataset->polygons = NULL; dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "y"); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "z"); gtk_plot_array_set_required(dim, TRUE); } GtkWidget* gtk_plot_surface_new (void) { GtkPlotData *data; data = g_object_new (gtk_plot_surface_get_type (), NULL); return GTK_WIDGET (data); } /** * gtk_plot_surface_new_function: * @function: (scope async): a #GtkPlotFunc3D * * Return value: (transfer full) the constructed #GtkWidget */ GtkWidget* gtk_plot_surface_new_function (GtkPlotFunc3D function) { GtkWidget *dataset; dataset = g_object_new (gtk_plot_surface_get_type (), NULL); gtk_plot_surface_construct_function(GTK_PLOT_SURFACE(dataset), function); return dataset; } /** * gtk_plot_surface_construct_function: * @surface: * @function: (scope async): a #GtkPlotFunc3D */ void gtk_plot_surface_construct_function(GtkPlotSurface *surface, GtkPlotFunc3D function) { GTK_PLOT_DATA(surface)->is_function = TRUE; GTK_PLOT_DATA(surface)->function3d = function; } /** * gtk_plot_surface_destroy: * @object: * * */ void gtk_plot_surface_destroy(GtkObject *object) { GtkPlotSurface *surface; surface = GTK_PLOT_SURFACE(object); if(surface->dt){ gtk_object_destroy(GTK_OBJECT(surface->dt)); surface->dt = NULL; } clear_polygons(surface); if ( GTK_OBJECT_CLASS (parent_class)->destroy ) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void clear_polygons(GtkPlotSurface *surface) { if(surface->polygons){ GList *list; for (list = surface->polygons; list; list = list->next) if (list->data) g_free(list->data); g_list_free(surface->polygons); surface->polygons= NULL; } } static void gtk_plot_surface_clone(GtkPlotData *real_data, GtkPlotData *copy_data) { GTK_PLOT_DATA_CLASS(parent_class)->clone(real_data, copy_data); GTK_PLOT_SURFACE(copy_data)->color = GTK_PLOT_SURFACE(real_data)->color; GTK_PLOT_SURFACE(copy_data)->shadow = GTK_PLOT_SURFACE(real_data)->shadow; GTK_PLOT_SURFACE(copy_data)->grid_foreground = GTK_PLOT_SURFACE(real_data)->grid_foreground; GTK_PLOT_SURFACE(copy_data)->grid_background = GTK_PLOT_SURFACE(real_data)->grid_background; GTK_PLOT_SURFACE(copy_data)->use_height_gradient = GTK_PLOT_SURFACE(real_data)->use_height_gradient; GTK_PLOT_SURFACE(copy_data)->use_amplitud = GTK_PLOT_SURFACE(real_data)->use_amplitud; GTK_PLOT_SURFACE(copy_data)->light = GTK_PLOT_SURFACE(real_data)->light; GTK_PLOT_SURFACE(copy_data)->ambient = GTK_PLOT_SURFACE(real_data)->ambient; GTK_PLOT_SURFACE(copy_data)->nx = GTK_PLOT_SURFACE(real_data)->nx; GTK_PLOT_SURFACE(copy_data)->ny = GTK_PLOT_SURFACE(real_data)->ny; GTK_PLOT_SURFACE(copy_data)->show_grid = GTK_PLOT_SURFACE(real_data)->show_grid; GTK_PLOT_SURFACE(copy_data)->show_mesh = GTK_PLOT_SURFACE(real_data)->show_mesh; GTK_PLOT_SURFACE(copy_data)->transparent = GTK_PLOT_SURFACE(real_data)->transparent; GTK_PLOT_SURFACE(copy_data)->xstep = GTK_PLOT_SURFACE(real_data)->xstep; GTK_PLOT_SURFACE(copy_data)->ystep = GTK_PLOT_SURFACE(real_data)->ystep; GTK_PLOT_SURFACE(copy_data)->mesh_line = GTK_PLOT_SURFACE(real_data)->mesh_line; } static void gtk_plot_surface_draw_private (GtkPlotData *data) { GtkPlot *plot; GtkPlotSurface *surface; g_return_if_fail(GTK_IS_PLOT_SURFACE(data)); surface = GTK_PLOT_SURFACE(data); data = GTK_PLOT_DATA(surface); g_return_if_fail(GTK_PLOT_DATA(data)->plot != NULL); g_return_if_fail(GTK_IS_PLOT(GTK_PLOT_DATA(data)->plot)); if(!gtk_widget_get_visible(GTK_WIDGET(data))) return; plot = GTK_PLOT(data->plot); g_return_if_fail(GTK_PLOT_DATA(data)->plot != NULL); g_return_if_fail(GTK_IS_PLOT(GTK_PLOT_DATA(data)->plot)); if(data->redraw_pending) gtk_plot_surface_update_range(data); gtk_plot_pc_gsave(plot->pc); GTK_PLOT_SURFACE_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(surface)))->draw_polygons(surface); gtk_plot_pc_grestore(plot->pc); } static void gtk_plot_surface_draw_polygons (GtkPlotSurface *surface) { GtkPlot *plot; GtkPlotData *data; GtkPlotPoint t[3]; GtkPlotDTtriangle *triangle; GdkDrawable *drawable; gboolean visible = TRUE; GtkPlotVector side1, side2, light, normal; GdkColor color, real_color; GtkPlotVector points[3]; gdouble factor, norm; GList *list; gboolean color_set = FALSE; gdouble *array_a; gint n; data = GTK_PLOT_DATA(surface); plot = GTK_PLOT(data->plot); drawable = plot->drawable; gtk_plot_set_line_attributes(plot, surface->mesh_line); array_a = gtk_plot_data_get_a(GTK_PLOT_DATA(surface), &n); list = surface->polygons; while(list){ GtkPlotPolygon *poly = (GtkPlotPolygon *)list->data; triangle = poly->t; visible = TRUE; t[0].x = poly->p[0].x; t[0].y = poly->p[0].y; t[1].x = poly->p[1].x; t[1].y = poly->p[1].y; t[2].x = poly->p[2].x; t[2].y = poly->p[2].y; points[0].x = triangle->na->x; points[0].y = triangle->na->y; points[0].z = triangle->na->z; points[1].x = triangle->nb->x; points[1].y = triangle->nb->y; points[1].z = triangle->nb->z; points[2].x = triangle->nc->x; points[2].y = triangle->nc->y; points[2].z = triangle->nc->z; if(plot->clip_data){ gboolean discard = FALSE; gint i; if(GTK_IS_PLOT3D(plot)){ GtkPlot3D *plot3d = GTK_PLOT3D(plot); for(i = 0; i < 3; i++){ if(points[i].x < plot3d->ax->ticks.min || points[i].x > plot3d->ax->ticks.max || points[i].y < plot3d->ay->ticks.min || points[i].y > plot3d->ay->ticks.max || points[i].z < plot3d->az->ticks.min || points[i].z > plot3d->az->ticks.max) { discard = TRUE; break; } } } else { for(i = 0; i < 3; i++){ if(points[i].x < plot->bottom->ticks.min || points[i].x > plot->bottom->ticks.max || points[i].y < plot->left->ticks.min || points[i].y > plot->left->ticks.max) { discard = TRUE; break; } } } if(discard) { list = list->next; continue; } } side1.x = -(points[1].x - points[0].x); side1.y = -(points[1].y - points[0].y); side1.z = -(points[1].z - points[0].z); side2.x = -(points[2].x - points[0].x); side2.y = -(points[2].y - points[0].y); side2.z = -(points[2].z - points[0].z); if(surface->use_amplitud && array_a){ gtk_plot_data_get_gradient_level(GTK_PLOT_DATA(surface), (array_a[triangle->na->id] + array_a[triangle->nb->id] + array_a[triangle->nc->id]) / 3.0, &real_color); } else if(surface->use_height_gradient){ gtk_plot_data_get_gradient_level(GTK_PLOT_DATA(surface), (triangle->na->z + triangle->nb->z + triangle->nc->z) / 3.0, &real_color); }else{ color = surface->color; light = surface->light; norm = _sqrt(10000*(light.x*light.x + light.y*light.y + light.z*light.z))/100; light.x /= norm; light.y /= norm; light.z /= norm; factor = 1.0; if(GTK_IS_PLOT3D(plot)){ normal.x = side1.y * side2.z - side1.z * side2.y; normal.y = side1.z * side2.x - side1.x * side2.z; normal.z = side1.x * side2.y - side1.y * side2.x; norm = _sqrt(100000000*(normal.x*normal.x + normal.y*normal.y + normal.z*normal.z))/10000.; factor = (normal.x*light.x + normal.y*light.y + normal.z*light.z) / norm; } gtk_plot_surface_lighting(&color, &real_color, factor, surface->ambient); } if(GTK_IS_PLOT3D(plot)) if(((t[1].x-t[0].x)*(t[2].y-t[0].y) - (t[1].y-t[0].y)*(t[2].x-t[0].x)) > 0) visible = FALSE; if(visible) gtk_plot_pc_set_color(plot->pc, &real_color); else gtk_plot_pc_set_color(plot->pc, &surface->shadow); gtk_plot_pc_draw_polygon(plot->pc, !surface->transparent, t, 3); color_set = FALSE; if(surface->show_mesh){ if(visible) gtk_plot_pc_set_color(plot->pc, &surface->grid_foreground); else gtk_plot_pc_set_color(plot->pc, &surface->grid_background); color_set = TRUE; gtk_plot_pc_draw_polygon(plot->pc, FALSE, t, 3); } if(!surface->show_mesh && surface->show_grid && surface->dt->quadrilateral){ if(!color_set){ if(visible) gtk_plot_pc_set_color(plot->pc, &surface->grid_foreground); else gtk_plot_pc_set_color(plot->pc, &surface->grid_background); } gtk_plot_pc_draw_line(plot->pc, t[1].x, t[1].y, t[2].x, t[2].y); } list = list->next; } } static void gtk_plot_surface_get_legend_size(GtkPlotData *data, gint *width, gint *height) { GtkPlotSurface *surface; GtkPlot *plot = NULL; GtkPlotText legend; gint lascent = 0, ldescent = 0, lheight = 0, lwidth = 0; gdouble m; surface = GTK_PLOT_SURFACE(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); plot = data->plot; m = plot->magnification; legend = plot->legends_attr; if(data->legend && strlen(data->legend) > 0) legend.text = data->legend; else legend.text = "X"; *height = 0; *width = roundint(16*m); if(data->show_legend){ int lstep = roundint(plot->legends_line_width * m / 10.); double step = (data->gradient->ticks.max - data->gradient->ticks.min) / 10; double level; for(level = data->gradient->ticks.min; level < data->gradient->ticks.max; level += step) *width += lstep; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); *height = *height + lascent + ldescent; *width = *width + lwidth; } } static void gtk_plot_surface_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotSurface *surface; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; GtkAllocation allocation; surface = GTK_PLOT_SURFACE(data); g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend && strlen(data->legend) > 0) legend.text = data->legend; else legend.text = "X"; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); if(data->show_legend){ if(!surface->use_height_gradient && !surface->use_amplitud){ gtk_plot_pc_set_color(plot->pc, &surface->color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, area.x + x, area.y + y, roundint(plot->legends_line_width * m), lascent + ldescent); }else{ gdouble level, step; gint lx = x, lstep; step = (data->gradient->ticks.max - data->gradient->ticks.min) / 10; lstep = roundint(plot->legends_line_width * m / 10.); for(level = data->gradient->ticks.min; level < data->gradient->ticks.max; level += step){ GdkColor color; gtk_plot_data_get_gradient_level(data, level, &color); gtk_plot_pc_set_color(plot->pc, &color); gtk_plot_pc_draw_rectangle(plot->pc, TRUE, area.x + lx, area.y + y, lstep, lascent + ldescent); lx += lstep; } } legend.x = (gdouble)(area.x + x + roundint((plot->legends_line_width + 4) * m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; if(data->legend && strlen(data->legend) > 0) gtk_plot_draw_text(plot, legend); y += 2*lheight; } else y += lheight; } static void gtk_plot_surface_lighting (GdkColor *a, GdkColor *b, gdouble normal, gdouble ambient) { gdouble red, green, blue; gdouble h, s, v; if(normal == 1.0){ *b = *a; return; } normal = MIN(fabs(normal), 1.0); red = a->red; green = a->green; blue = a->blue; rgb_to_hsv(red, green, blue, &h, &s, &v); s *= normal; v *= normal; s += ambient; v += ambient; hsv_to_rgb(h, MIN(s, 1.0), MIN(v, 1.0), &red, &green, &blue); b->red = red; b->green = green; b->blue = blue; } static void hsv_to_rgb (gdouble h, gdouble s, gdouble v, gdouble *r, gdouble *g, gdouble *b) { gint i; gdouble f, w, q, t; if (s == 0.0) s = 0.000001; if (h == -1.0) { *r = v; *g = v; *b = v; } else { if (h == 360.0) h = 0.0; h = h / 60.0; i = (gint) h; f = h - i; w = v * (1.0 - s); q = v * (1.0 - (s * f)); t = v * (1.0 - (s * (1.0 - f))); switch (i) { case 0: *r = v; *g = t; *b = w; break; case 1: *r = q; *g = v; *b = w; break; case 2: *r = w; *g = v; *b = t; break; case 3: *r = w; *g = q; *b = v; break; case 4: *r = t; *g = w; *b = v; break; case 5: *r = v; *g = w; *b = q; break; } } *r *= 65535.; *g *= 65535.; *b *= 65535.; } static void rgb_to_hsv (gdouble r, gdouble g, gdouble b, gdouble *h, gdouble *s, gdouble *v) { double max, min, delta; r /= 65535.; g /= 65535.; b /= 65535.; max = r; if (g > max) max = g; if (b > max) max = b; min = r; if (g < min) min = g; if (b < min) min = b; *v = max; if (max != 0.0) *s = (max - min) / max; else *s = 0.0; if (*s == 0.0) *h = -1.0; else { delta = max - min; if (r == max) *h = (g - b) / delta; else if (g == max) *h = 2.0 + (b - r) / delta; else if (b == max) *h = 4.0 + (r - g) / delta; *h = *h * 60.0; if (*h < 0.0) *h = *h + 360; } } /****************************************** * gtk_plot_surface_set_color * gtk_plot_surface_set_shadow * gtk_plot_surface_set_grid_foreground * gtk_plot_surface_set_grid_background * gtk_plot_surface_set_grid_visible * gtk_plot_surface_set_mesh_visible * gtk_plot_surface_get_grid_visible * gtk_plot_surface_get_mesh_visible ******************************************/ /** * gtk_plot_surface_set_color: * @data: * @color: * * */ void gtk_plot_surface_set_color (GtkPlotSurface *data, GdkColor *color) { data->color = *color; } /** * gtk_plot_surface_set_shadow: * @data: * @color: * * */ void gtk_plot_surface_set_shadow (GtkPlotSurface *data, GdkColor *color) { data->shadow = *color; } /** * gtk_plot_surface_set_grid_foreground: * @data: * @foreground: * * */ void gtk_plot_surface_set_grid_foreground (GtkPlotSurface *data, GdkColor *foreground) { data->grid_foreground = *foreground; } /** * gtk_plot_surface_set_grid_background: * @data: * @background: * * */ void gtk_plot_surface_set_grid_background (GtkPlotSurface *data, GdkColor *background) { data->grid_background = *background; } /** * gtk_plot_surface_set_grid_visible: * @data: * @visible: * * */ void gtk_plot_surface_set_grid_visible (GtkPlotSurface *data, gboolean visible) { data->show_grid = visible; } /** * gtk_plot_surface_get_grid_visible: * @data: * * */ gboolean gtk_plot_surface_get_grid_visible (GtkPlotSurface *data) { return (data->show_grid); } /** * gtk_plot_surface_set_mesh_visible: * @data: * @visible: * * */ void gtk_plot_surface_set_mesh_visible (GtkPlotSurface *data, gboolean visible) { data->show_mesh = visible; } /** * gtk_plot_surface_get_mesh_visible: * @data: * * */ gboolean gtk_plot_surface_get_mesh_visible (GtkPlotSurface *data) { return (data->show_mesh); } /** * gtk_plot_surface_set_light: * @data: * @x: * @y: * @z: * * */ void gtk_plot_surface_set_light (GtkPlotSurface *data, gdouble x, gdouble y, gdouble z) { data->light.x = x; data->light.y = y; data->light.z = z; } /** * gtk_plot_surface_use_height_gradient: * @data: * @use_gradient: * * */ void gtk_plot_surface_use_height_gradient (GtkPlotSurface *data, gboolean use_gradient) { data->use_height_gradient = use_gradient; } /** * gtk_plot_surface_use_amplitud: * @data: * @use_amplitud: * * */ void gtk_plot_surface_use_amplitud (GtkPlotSurface *data, gboolean use_amplitud) { data->use_amplitud = use_amplitud; } /** * gtk_plot_surface_set_ambient: * @data: * @ambient: * * */ void gtk_plot_surface_set_ambient (GtkPlotSurface *data, gdouble ambient) { data->ambient = ambient; } /** * gtk_plot_surface_set_transparent: * @data: * @transparent: * * */ void gtk_plot_surface_set_transparent (GtkPlotSurface *data, gboolean transparent) { data->transparent = transparent; } /****************************************** * gtk_plot_surface_set_points * gtk_plot_surface_get_points * gtk_plot_surface_set_x * gtk_plot_surface_set_y * gtk_plot_surface_set_z * gtk_plot_surface_set_dx * gtk_plot_surface_set_dy * gtk_plot_surface_set_dz * gtk_plot_surface_get_x * gtk_plot_surface_get_y * gtk_plot_surface_get_z * gtk_plot_surface_get_dx * gtk_plot_surface_get_dy * gtk_plot_surface_get_dz * gtk_plot_surface_set_nx * gtk_plot_surface_set_ny * gtk_plot_surface_get_nx * gtk_plot_surface_get_ny * gtk_plot_surface_set_xstep * gtk_plot_surface_set_ystep * gtk_plot_surface_get_xstep * gtk_plot_surface_get_ystep ******************************************/ /** * gtk_plot_surface_set_points: * @x: * @y: * @z: * @dx: * @dy: * @dz: * @nx: * @ny: * * */ void gtk_plot_surface_set_points(GtkPlotSurface *data, gdouble *x, gdouble *y, gdouble *z, gdouble *dx, gdouble *dy, gdouble *dz, gint nx, gint ny) { gtk_plot_data_set_x(GTK_PLOT_DATA(data), x); gtk_plot_data_set_y(GTK_PLOT_DATA(data), y); gtk_plot_data_set_z(GTK_PLOT_DATA(data), z); gtk_plot_data_set_dx(GTK_PLOT_DATA(data), dx); gtk_plot_data_set_dy(GTK_PLOT_DATA(data), dy); gtk_plot_data_set_dz(GTK_PLOT_DATA(data), dz); data->nx = nx; data->ny = ny; gtk_plot_data_set_numpoints(GTK_PLOT_DATA(data), nx * ny); gtk_plot_surface_build_mesh(data); } /** * gtk_plot_surface_get_points: * @x: * @y: * @z: * @dx: * @dy: * @dz: * @nx: * @ny: * * */ void gtk_plot_surface_get_points(GtkPlotSurface *data, gdouble **x, gdouble **y, gdouble **z, gdouble **dx, gdouble **dy, gdouble **dz, gint *nx, gint *ny) { gint n; *x = gtk_plot_data_get_x(GTK_PLOT_DATA(data), &n); *y = gtk_plot_data_get_y(GTK_PLOT_DATA(data), &n); *z = gtk_plot_data_get_z(GTK_PLOT_DATA(data), &n); *dx = gtk_plot_data_get_dx(GTK_PLOT_DATA(data), &n); *dy = gtk_plot_data_get_dy(GTK_PLOT_DATA(data), &n); *dz = gtk_plot_data_get_dz(GTK_PLOT_DATA(data), &n); *nx = data->nx; *ny = data->ny; } /** * gtk_plot_surface_set_x: * @data: * @x: the value to be set * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_surface_set_x(GtkPlotSurface *data, gdouble *x) { return gtk_plot_data_set_x(GTK_PLOT_DATA(data), x); } /** * gtk_plot_surface_set_y: * @data: * @y: the value to be set * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_surface_set_y(GtkPlotSurface *data, gdouble *y) { return gtk_plot_data_set_y(GTK_PLOT_DATA(data), y); } /** * gtk_plot_surface_set_z: * @data: * @z: the value to be set * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_surface_set_z(GtkPlotSurface *data, gdouble *z) { return gtk_plot_data_set_z(GTK_PLOT_DATA(data), z); } /** * gtk_plot_surface_set_dx: * @data: * @dx: the value to be set * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_surface_set_dx(GtkPlotSurface *data, gdouble *dx) { return gtk_plot_data_set_dx(GTK_PLOT_DATA(data), dx); } /** * gtk_plot_surface_set_dy: * @data: * @dy: the value to be set * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_surface_set_dy(GtkPlotSurface *data, gdouble *dy) { return gtk_plot_data_set_dy(GTK_PLOT_DATA(data), dy); } /** * gtk_plot_surface_set_dz: * @data: * @dz: the value to be set * * Return value: (transfer none) the affected #GtkPlotArray */ GtkPlotArray * gtk_plot_surface_set_dz(GtkPlotSurface *data, gdouble *dz) { return gtk_plot_data_set_dz(GTK_PLOT_DATA(data), dz); } /** * gtk_plot_surface_get_x: * @dataset: * @nx: the value to be set * * Return value: */ gdouble * gtk_plot_surface_get_x(GtkPlotSurface *dataset, gint *nx) { gint n; *nx = dataset->nx; return(gtk_plot_data_get_x(GTK_PLOT_DATA(dataset), &n)); } /** * gtk_plot_surface_get_y: * @dataset: * @ny: * * * * Return value: */ gdouble * gtk_plot_surface_get_y(GtkPlotSurface *dataset, gint *ny) { gint n; *ny = dataset->ny; return(gtk_plot_data_get_y(GTK_PLOT_DATA(dataset), &n)); } /** * gtk_plot_surface_get_z: * @dataset: * @nx: * @ny: * * * * Return value: */ gdouble * gtk_plot_surface_get_z(GtkPlotSurface *dataset, gint *nx, gint *ny) { gint n; *nx = dataset->nx; *ny = dataset->ny; return(gtk_plot_data_get_z(GTK_PLOT_DATA(dataset), &n)); } /** * gtk_plot_surface_get_dz: * @dataset: * * * * Return value: */ gdouble * gtk_plot_surface_get_dz(GtkPlotSurface *dataset) { gint n; return(gtk_plot_data_get_dz(GTK_PLOT_DATA(dataset), &n)); } /** * gtk_plot_surface_get_dx: * @dataset: * * * * Return value: */ gdouble * gtk_plot_surface_get_dx(GtkPlotSurface *dataset) { gint n; return(gtk_plot_data_get_dx(GTK_PLOT_DATA(dataset), &n)); } /** * gtk_plot_surface_get_dy: * @dataset: * * * * Return value: */ gdouble * gtk_plot_surface_get_dy(GtkPlotSurface *dataset) { gint n; return(gtk_plot_data_get_dy(GTK_PLOT_DATA(dataset), &n)); } /** * gtk_plot_surface_set_nx: * @dataset: * @nx: * * */ void gtk_plot_surface_set_nx(GtkPlotSurface *dataset, gint nx) { dataset->nx = nx; } /** * gtk_plot_surface_set_ny: * @dataset: * @ny: * * */ void gtk_plot_surface_set_ny(GtkPlotSurface *dataset, gint ny) { dataset->ny = ny; } /** * gtk_plot_surface_get_nx: * @dataset: * * * * Return value: */ gint gtk_plot_surface_get_nx(GtkPlotSurface *dataset) { return(dataset->nx); } /** * gtk_plot_surface_get_ny: * @dataset: * * * * Return value: */ gint gtk_plot_surface_get_ny(GtkPlotSurface *dataset) { return(dataset->ny); } /** * gtk_plot_surface_set_xstep: * @dataset: * @xstep: * * */ void gtk_plot_surface_set_xstep(GtkPlotSurface *dataset, gdouble xstep) { dataset->xstep = xstep; } /** * gtk_plot_surface_set_ystep: * @dataset: * @ystep: * * */ void gtk_plot_surface_set_ystep(GtkPlotSurface *dataset, gdouble ystep) { dataset->ystep = ystep; } /** * gtk_plot_surface_get_xstep: * @dataset: * * * * Return value: */ gdouble gtk_plot_surface_get_xstep(GtkPlotSurface *dataset) { return (dataset->xstep); } /** * gtk_plot_surface_get_ystep: * @dataset: * * * * Return value: */ gdouble gtk_plot_surface_get_ystep(GtkPlotSurface *dataset) { return (dataset->ystep); } /** * gtk_plot_surface_build_mesh: * @surface: * * */ void gtk_plot_surface_build_mesh(GtkPlotSurface *surface) { GtkPlotData *data; GtkPlot *plot; data = GTK_PLOT_DATA(surface); if(!data->plot) return; plot = data->plot; if(data->is_function){ gdouble xstep, ystep; gdouble xmin, xmax, ymin, ymax; gdouble x, y; gdouble *fx = NULL, *fy = NULL, *fz = NULL; gint nx, ny; gint npoints; xmin = GTK_PLOT(plot)->xmin; xmax = GTK_PLOT(plot)->xmax; ymin = GTK_PLOT(plot)->ymin; ymax = GTK_PLOT(plot)->ymax; xstep = surface->xstep; surface->nx = roundint((xmax - xmin) / xstep) + 1; ystep = surface->ystep; surface->ny = roundint((ymax - ymin) / ystep) + 1; npoints = surface->nx * surface->ny; fx = (gdouble *)g_malloc((npoints + 1) * sizeof(gdouble)); fy = (gdouble *)g_malloc((npoints + 1) * sizeof(gdouble)); fz = (gdouble *)g_malloc((npoints + 1) * sizeof(gdouble)); npoints = 0; y = ymin; for(ny = 0; ny < surface->ny; ny++) { x = xmin; for(nx = 0; nx < surface->nx; nx++) { gboolean error; fx[npoints] = x; fy[npoints] = y; fz[npoints] = data->function3d(plot, data, x, y, &error); x += xstep; npoints++; } y += ystep; } gtk_plot_data_set_x(data, fx); gtk_plot_data_set_y(data, fy); gtk_plot_data_set_z(data, fz); gtk_plot_data_set_numpoints(data, npoints); gtk_plot_surface_real_build_mesh(surface); g_free(fx); g_free(fy); g_free(fz); } else if(data->is_iterator){ gdouble x, y, z, a, dx, dy, dz, da; gchar *label; gdouble *fx = NULL, *fy = NULL, *fz = NULL; gint iter; if(data->iterator_mask & GTK_PLOT_DATA_X) fx = g_new0(gdouble, data->num_points); if(data->iterator_mask & GTK_PLOT_DATA_Y) fy = g_new0(gdouble, data->num_points); if(data->iterator_mask & GTK_PLOT_DATA_Z) fz = g_new0(gdouble, data->num_points); for(iter = 0; iter < data->num_points; iter++) { gboolean error; data->iterator (plot, data, iter, &x, &y, &z, &a, &dx, &dy, &dz, &da, &label, &error); if(error) { break; } else { if(data->iterator_mask & GTK_PLOT_DATA_X) fx[iter] = x; if(data->iterator_mask & GTK_PLOT_DATA_Y) fy[iter] = y; if(data->iterator_mask & GTK_PLOT_DATA_Z) fz[iter] = z; } } gtk_plot_data_set_x(GTK_PLOT_DATA(surface), fx); gtk_plot_data_set_y(GTK_PLOT_DATA(surface), fy); gtk_plot_data_set_z(GTK_PLOT_DATA(surface), fz); gtk_plot_surface_real_build_mesh(surface); g_free(fx); g_free(fy); g_free(fz); } else gtk_plot_surface_real_build_mesh(surface); } static void gtk_plot_surface_real_build_mesh(GtkPlotSurface *surface) { GtkPlotData *data; gdouble *array_x, *array_y, *array_z; GtkPlot *plot; gint i; data = GTK_PLOT_DATA(surface); if(!data->plot) return; plot = data->plot; if(data->num_points == 0) return; gtk_plot_dt_clear(surface->dt); array_x = gtk_plot_data_get_x(GTK_PLOT_DATA(surface), &i); array_y = gtk_plot_data_get_y(GTK_PLOT_DATA(surface), &i); array_z = gtk_plot_data_get_z(GTK_PLOT_DATA(surface), &i); for(i = 0; i < data->num_points; i++){ GtkPlotDTnode node; node.x = array_x[i]; node.y = array_y[i]; node.z = 0.0; if(array_z) node.z = array_z[i]; gtk_plot_dt_add_node(surface->dt, node); } gtk_plot_dt_triangulate(surface->dt); GTK_PLOT_SURFACE_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(surface)))->build_polygons(surface); gtk_plot_surface_recalc_nodes(surface); surface->recalc_dt = FALSE; } static void gtk_plot_surface_build_polygons(GtkPlotSurface *surface) { GList *list; clear_polygons(surface); list = surface->dt->triangles; while(list){ GtkPlotPolygon *polygon; GtkPlotDTtriangle *triangle = (GtkPlotDTtriangle *)list->data; polygon = g_new0(GtkPlotPolygon, 1); polygon->t = triangle; polygon->n = 3; polygon->cut_level = FALSE; polygon->xyz[0].x = triangle->na->x; polygon->xyz[0].y = triangle->na->y; polygon->xyz[0].z = triangle->na->z; polygon->xyz[1].x = triangle->nb->x; polygon->xyz[1].y = triangle->nb->y; polygon->xyz[1].z = triangle->nb->z; polygon->xyz[2].x = triangle->nc->x; polygon->xyz[2].y = triangle->nc->y; polygon->xyz[2].z = triangle->nc->z; surface->polygons = g_list_append(surface->polygons, polygon); list = list->next; }; } /** * gtk_plot_surface_recalc_nodes: * @surface: * * */ void gtk_plot_surface_recalc_nodes(GtkPlotSurface *surface) { GtkPlotData *data; GtkPlot *plot; GList *list; gint i; data = GTK_PLOT_DATA(surface); if(!data->plot) return; plot = data->plot; for(i= surface->dt->node_0; i < surface->dt->node_cnt; i++){ GtkPlotDTnode *node; node = gtk_plot_dt_get_node(surface->dt,i); if(GTK_IS_PLOT3D(plot)){ gtk_plot3d_get_pixel(GTK_PLOT3D(plot), node->x, node->y, node->z, &node->px, &node->py, &node->pz); } else { gtk_plot_get_pixel(plot, node->x, node->y, &node->px, &node->py); node->pz = 0.0; } } list = surface->polygons; while(list){ GtkPlotPolygon *polygon = (GtkPlotPolygon *)list->data; for(i = 0; i < polygon->n; i++){ if(GTK_IS_PLOT3D(plot)){ gtk_plot3d_get_pixel(GTK_PLOT3D(plot), polygon->xyz[i].x, polygon->xyz[i].y, polygon->xyz[i].z, &polygon->p[i].x, &polygon->p[i].y, &polygon->p[i].z); } else { gtk_plot_get_pixel(plot, polygon->xyz[i].x, polygon->xyz[i].y, &polygon->p[i].x, &polygon->p[i].y); polygon->p[i].z = 0.0; } } list = list->next; }; GTK_PLOT_SURFACE_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(surface)))->sort_polygons(surface); } static void gtk_plot_surface_sort_polygons(GtkPlotSurface *surface) { if(surface->polygons) surface->polygons = g_list_sort(surface->polygons, (GCompareFunc)compare_func); } /* PAINTER'S COMPARISON */ static gint compare_func (gpointer a, gpointer b) { GtkPlotPolygon *pa, *pb; GtkPlotDTtriangle *ta, *tb; gint i, j; gint na[3], nb[3]; gint naz[3], nbz[3]; gdouble pax[3], pbx[3]; gdouble pay[3], pby[3]; gdouble paz[3], pbz[3]; gint xg = 0, xl = 0; gint yg = 0, yl = 0; gint zg = 0, zl = 0; GtkPlotDTnode *nda[3], *ndb[3]; gdouble cza = 0, czb = 0; pa = (GtkPlotPolygon *)a; pb = (GtkPlotPolygon *)b; ta = pa->t; tb = pb->t; if(ta == tb) { gdouble z1, z2; z1 = pa->p[0].z; z2 = pb->p[0].z; for(i = 1; i < pa->n; i++) z1 = MIN(z1, pa->p[i].z); for(i = 1; i < pb->n; i++) z2 = MIN(z2, pb->p[i].z); if(z1 == z2) return (pa->level > pb->level ? -1 : (pa->level == pb->level ? 0 : 1)); else return (z2 > z1 ? -1 : 1); } naz[0] = nbz[0] = 0; naz[1] = nbz[1] = 1; naz[2] = nbz[2] = 2; paz[0] = ta->na->pz; paz[1] = ta->nb->pz; paz[2] = ta->nc->pz; pbz[0] = tb->na->pz; pbz[1] = tb->nb->pz; pbz[2] = tb->nc->pz; /* paz[0] = pa->p[0].z; paz[1] = pa->p[1].z; paz[2] = pa->p[2].z; if(pa->n == 4) paz[0] = pa->p[3].z; pbz[0] = pb->p[0].z; pbz[1] = pb->p[1].z; pbz[2] = pb->p[2].z; if(pb->n == 4) pbz[0] = pb->p[3].z; */ zg = zl = 0; for(i = 0; i < 3; i++){ for(j = 0; j < 3; j++){ if(paz[i] < pbz[j]) zg++; if(paz[i] > pbz[j]) zl++; } } if(zg == 9) return 1; if(zl == 9) return -1; na[0] = nb[0] = 0; na[1] = nb[1] = 1; na[2] = nb[2] = 2; pax[0] = ta->na->px; pax[1] = ta->nb->px; pax[2] = ta->nc->px; pbx[0] = tb->na->px; pbx[1] = tb->nb->px; pbx[2] = tb->nc->px; /* pax[0] = pa->p[0].x; pax[1] = pa->p[1].x; pax[2] = pa->p[2].x; if(pa->n == 4) pax[0] = pa->p[3].x; pbx[0] = pb->p[0].x; pbx[1] = pb->p[1].x; pbx[2] = pb->p[2].x; if(pb->n == 4) pbx[0] = pb->p[3].x; */ xg = xl = 0; for(i = 0; i < 3; i++){ for(j = 0; j < 3; j++){ if(pax[i] < pbx[j]) xg++; if(pax[i] > pbx[j]) xl++; } } if(xg == 9 || xl == 9){ cza = (paz[0] + paz[1] + paz[2]); czb = (pbz[0] + pbz[1] + pbz[2]); return(czb > cza ? 1 : -1); } na[0] = nb[0] = 0; na[1] = nb[1] = 1; na[2] = nb[2] = 2; pay[0] = ta->na->py; pay[1] = ta->nb->py; pay[2] = ta->nc->py; pby[0] = tb->na->py; pby[1] = tb->nb->py; pby[2] = tb->nc->py; /* pay[0] = pa->p[0].y; pay[1] = pa->p[1].y; pay[2] = pa->p[2].y; if(pa->n == 4) pay[0] = pa->p[3].y; pby[0] = pb->p[0].y; pby[1] = pb->p[1].y; pby[2] = pb->p[2].y; if(pb->n == 4) pby[0] = pb->p[3].y; */ yg = yl = 0; for(i = 0; i < 3; i++){ for(j = 0; j < 3; j++){ if(pay[i] < pby[j]) yg++; if(pay[i] > pby[j]) yl++; } } if(yg == 9 || yl == 9){ cza = (paz[0] + paz[1] + paz[2]); czb = (pbz[0] + pbz[1] + pbz[2]); return(czb > cza ? 1 : -1); } nda[0] = ta->na; nda[1] = ta->nb; nda[2] = ta->nc; ndb[0] = tb->na; ndb[1] = tb->nb; ndb[2] = tb->nc; /* for(i = 0; i < 3; i++){ gdouble n1[3], n2[3]; gdouble t1, t2, det; gdouble x1, x2; gdouble y1, y2; gdouble z1, z2; gint ia0 = naz[i]; gint ja0 = naz[i == 2 ? 0 : i+1]; n1[0] = pax[ja0]-pax[ia0]; n1[1] = pay[ja0]-pay[ia0]; n1[2] = paz[ja0]-paz[ia0]; for(j = 0; j < 3; j++){ gint ib0 = nbz[j]; gint jb0 = nbz[j == 2 ? 0 : j+1]; gdouble c1, c2; c1 = (pax[ia0]-pbx[ib0]); c2 = (pay[ia0]-pby[ib0]); n2[0] = pbx[jb0]-pbx[ib0]; n2[1] = pby[jb0]-pby[ib0]; n2[2] = pbz[jb0]-pbz[ib0]; det = (-n1[0]*n2[1]+n1[1]*n2[0]); if(fabs(det) < 1.e-5){ coincide++; if(coincide == 2) return 0; } } } */ for(i = 0; i < 3; i++){ gdouble n1[3], n2[3]; gdouble t1, t2, det; gdouble x1, x2; gdouble y1, y2; gdouble z1, z2; gint ia0 = naz[i]; gint ja0 = naz[i == 2 ? 0 : i+1]; n1[0] = pax[ja0]-pax[ia0]; n1[1] = pay[ja0]-pay[ia0]; n1[2] = paz[ja0]-paz[ia0]; for(j = 0; j < 3; j++){ gint ib0 = nbz[j]; gint jb0 = nbz[j == 2 ? 0 : j+1]; gdouble c1, c2; if(nda[ia0] == ndb[ib0] || nda[ia0] == ndb[jb0]) continue; if(nda[ja0] == ndb[ib0] || nda[ja0] == ndb[jb0]) continue; c1 = (pax[ia0]-pbx[ib0]); c2 = (pay[ia0]-pby[ib0]); n2[0] = pbx[jb0]-pbx[ib0]; n2[1] = pby[jb0]-pby[ib0]; n2[2] = pbz[jb0]-pbz[ib0]; det = (-n1[0]*n2[1]+n1[1]*n2[0]); if(fabs(det) > 1.e-5){ t1 = (c1*n2[1]-c2*n2[0]) / det; t2 = (-n1[0]*c2+n1[1]*c1) / det; if(t1 < -0.0001 || t2 < -0.0001) continue; if(t1 > 1.0001 || t2 > 1.0001) continue; x1 = pax[ia0] + t1 * n1[0]; y1 = pay[ia0] + t1 * n1[1]; z1 = paz[ia0] + t1 * n1[2]; x2 = pbx[ib0] + t2 * n2[0]; y2 = pby[ib0] + t2 * n2[1]; z2 = pbz[ib0] + t2 * n2[2]; if(z1 < z2) return 1; if(z2 < z1) return -1; } } } cza = (paz[0] + paz[1] + paz[2]); czb = (pbz[0] + pbz[1] + pbz[2]); return(czb > cza ? 1 : -1); return 0; } gtkextra-3.2.0/gtkextra/gtkfontcombo.h0000644000076400001440000000510512603754176015000 00000000000000/* gtkfontcombo - font_combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_FONT_COMBO_H__ #define __GTK_FONT_COMBO_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkpsfont.h" #define GTK_FONT_COMBO(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_font_combo_get_type (), GtkFontCombo) #define GTK_FONT_COMBO_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_font_combo_get_type (), GtkFontComboClass) #define GTK_IS_FONT_COMBO(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_font_combo_get_type ()) typedef struct _GtkFontCombo GtkFontCombo; typedef struct _GtkFontComboClass GtkFontComboClass; /* you should access only the entry and list fields directly */ struct _GtkFontCombo { GtkToolbar toolbar; GtkWidget *name_combo; GtkWidget *size_combo; GtkWidget *bold_button; GtkWidget *italic_button; }; struct _GtkFontComboClass { GtkToolbarClass parent_class; void (* changed) (GtkFontCombo *font_combo); }; GType gtk_font_combo_get_type (void); GtkWidget *gtk_font_combo_new (void); void gtk_font_combo_select (GtkFontCombo *font_combo, const gchar *family, gboolean bold, gboolean italic, gint height); void gtk_font_combo_select_nth (GtkFontCombo *font_combo, gint n, gboolean bold, gboolean italic, gint height); gint gtk_font_combo_get_font_height (GtkFontCombo *font_combo); GtkPSFont *gtk_font_combo_get_psfont (GtkFontCombo *font_combo); PangoFontDescription *gtk_font_combo_get_font_description (GtkFontCombo *font_combo); GdkFont *gtk_font_combo_get_gdkfont (GtkFontCombo *font_combo); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_FONT_COMBO_H__ */ gtkextra-3.2.0/gtkextra/gtkplotbubble.h0000644000076400001440000000534612603754176015153 00000000000000/* gtkplotbubble - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_BUBBLE_H__ #define __GTK_PLOT_BUBBLE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_BUBBLE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_bubble_get_type (), GtkPlotBubble) #define G_TYPE_PLOT_BUBBLE (gtk_plot_bubble_get_type ()) #define GTK_PLOT_BUBBLE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_bubble_get_type(), GtkPlotBubbleClass) #define GTK_IS_PLOT_BUBBLE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_bubble_get_type ()) typedef struct _GtkPlotBubble GtkPlotBubble; typedef struct _GtkPlotBubbleClass GtkPlotBubbleClass; /** * GtkPlotBubble: * * The GtkPlotBubble struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotBubble { GtkPlotData data; gdouble scale_max; guint size_max; gboolean show_scale; gint labels_precision; gint labels_style; gchar *labels_prefix; gchar *labels_suffix; }; struct _GtkPlotBubbleClass { GtkPlotDataClass parent_class; }; GType gtk_plot_bubble_get_type (void); GtkWidget* gtk_plot_bubble_new (void); void gtk_plot_bubble_show_scale (GtkPlotBubble *bubble, gboolean show); void gtk_plot_bubble_set_scale_max (GtkPlotBubble *bubble, gdouble scale_max); void gtk_plot_bubble_set_size_max (GtkPlotBubble *bubble, guint size_max); void gtk_plot_bubble_set_labels_precision (GtkPlotBubble *bubble, gint precision); void gtk_plot_bubble_set_labels_style (GtkPlotBubble *bubble, GtkPlotLabelStyle style); void gtk_plot_bubble_set_labels_prefix (GtkPlotBubble *bubble, const gchar *prefix); void gtk_plot_bubble_set_labels_suffix (GtkPlotBubble *bubble, const gchar *suffix); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_BUBBLE_H__ */ gtkextra-3.2.0/gtkextra/cloud.xpm0000644000076400001440000000146612603754176013775 00000000000000/* XPM */ static char * cloud_xpm[] = { "24 24 5 1", " c None", "x c #FFFFFFFFFFFF", ". c #6E6E6E6E6E6E", "X c #000000000000", "o c #CCCCCCCCCCCC", " ", " ", " ", " ", " ", " ..... ", " .xxxxxX ", " ...xxxxxxX ", " .xxxxxxxxxxX ", " .xxxxoxxxoxx.XXX ", " .xxxxxooxxo.xxxXX ", " ..xxxoxxxoxoxxxxxxXX ", " ..xxxxoxxxxxxxoxxxoxX ", " .xxxxxoxxxxxxooxoxxxX ", " XxxxxxoxoXxxooXoxoxXXX ", " Xxooooooooooo.XoooxXoX ", " XXooxooXXoo..Xooo.Xo.X ", " XX....XXo..XX...XX.XX ", " XX..XXX.XXXX..XXXXX ", " XXXX XXX XXXXX ", " ", " ", " ", " "}; gtkextra-3.2.0/gtkextra/gtkitementry.c0000644000076400001440000021731112603754176015031 00000000000000/* GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ /** * SECTION: gtkitementry * @short_description: An item entry widget. * * Originally GtkSheetEntry. This widget allows to change colors and justification and can be dinamically resized. */ /** * GtkItemEntry: * * The GtkItemEntry struct contains only private data. * It should only be accessed through the functions described below. */ #include #include #include #include #include "gtkextra-compat.h" #include "gtkitementry.h" #define MIN_ENTRY_WIDTH 150 #define DRAW_TIMEOUT 20 #define INNER_BORDER 0 /* Initial size of buffer, in bytes */ #define MIN_SIZE 16 /* Maximum size of text buffer, in bytes */ #define MAX_SIZE G_MAXUSHORT #undef GTK_ITEM_ENTRY_DEBUG #ifdef DEBUG #define GTK_ITEM_ENTRY_DEBUG 0 /* define to activate debug output */ #endif #ifdef GTK_ITEM_ENTRY_DEBUG # define GTK_ITEM_ENTRY_DEBUG_JUSTIFICATION 0 # define GTK_ITEM_ENTRY_DEBUG_ALLOC 0 # define GTK_ITEM_ENTRY_DEBUG_TEXT 0 # define GTK_ITEM_ENTRY_DEBUG_DESTUCTION 0 /* destroy, dispose, finalize */ #endif typedef enum { CURSOR_STANDARD, CURSOR_DND } CursorType; /* GObject, GtkObject methods */ static void gtk_item_entry_class_init(GtkItemEntryClass *klass); static void gtk_item_entry_init(GtkItemEntry *entry); static void gtk_item_entry_editable_init(GtkEditableClass *iface); /* GtkWidget methods */ static void gtk_item_entry_realize(GtkWidget *widget); static void gtk_item_entry_size_request(GtkWidget *widget, GtkRequisition *requisition); static void gtk_item_entry_size_allocate(GtkWidget *widget, GtkAllocation *allocation); static void gtk_item_entry_draw_frame(GtkWidget *widget); static void gtk_item_entry_destroy(GtkObject *object); static void gtk_item_entry_dispose(GObject *object); static void gtk_item_entry_finalize(GObject *object); static gint gtk_item_entry_expose(GtkWidget *widget, GdkEventExpose *event); static void gtk_item_entry_grab_focus(GtkWidget *widget); static void gtk_item_entry_style_set(GtkWidget *widget, GtkStyle *previous_style); static void gtk_item_entry_direction_changed(GtkWidget *widget, GtkTextDirection previous_dir); static void gtk_item_entry_state_changed(GtkWidget *widget, GtkStateType previous_state); /* GtkEditable method implementations */ static void gtk_item_entry_insert_text(GtkEditable *editable, const gchar *new_text, gint new_text_length, gint *position); static void gtk_item_entry_delete_text(GtkEditable *editable, gint start_pos, gint end_pos); static void gtk_item_entry_real_set_position(GtkEditable *editable, gint position); static gint gtk_item_entry_get_position(GtkEditable *editable); /* Default signal handlers */ static void gtk_item_entry_real_insert_text(GtkEditable *editable, const gchar *new_text, gint new_text_length, gint *position); static void gtk_item_entry_real_delete_text(GtkEditable *editable, gint start_pos, gint end_pos); static void gtk_item_entry_move_cursor(GtkEntry *entry, GtkMovementStep step, gint count, gboolean extend_selection); static void gtk_item_entry_insert_at_cursor(GtkEntry *entry, const gchar *str); static void gtk_item_entry_delete_from_cursor(GtkEntry *entry, GtkDeleteType type, gint count); /* IM Context Callbacks */ static void gtk_item_entry_commit_cb(GtkIMContext *context, const gchar *str, GtkEntry *entry); static void gtk_item_entry_preedit_changed_cb(GtkIMContext *context, GtkEntry *entry); static gboolean gtk_item_entry_retrieve_surrounding_cb(GtkIMContext *context, GtkEntry *entry); static gboolean gtk_item_entry_delete_surrounding_cb(GtkIMContext *context, gint offset, gint n_chars, GtkEntry *entry); /* Internal routines */ static void gtk_item_entry_enter_text(GtkEntry *entry, const gchar *str); static void gtk_item_entry_set_positions(GtkEntry *entry, gint current_pos, gint selection_bound); static void gtk_item_entry_draw_text(GtkEntry *entry); static void gtk_item_entry_draw_cursor(GtkEntry *entry, CursorType type); static PangoLayout *gtk_item_entry_ensure_layout(GtkEntry *entry, gboolean include_preedit); static void gtk_item_entry_queue_draw(GtkEntry *entry); #if GTK_CHECK_VERSION(2,21,0) == 0 static void gtk_entry_reset_im_context(GtkEntry *entry); #endif static void gtk_item_entry_recompute(GtkEntry *entry); static void gtk_item_entry_get_cursor_locations(GtkEntry *entry, CursorType type, gint *strong_x, gint *weak_x); static void gtk_item_entry_adjust_scroll(GtkEntry *entry); static gint gtk_item_entry_move_visually(GtkEntry *editable, gint start, gint count); static gint gtk_item_entry_move_logically(GtkEntry *entry, gint start, gint count); static gint gtk_item_entry_move_forward_word(GtkEntry *entry, gint start); static gint gtk_item_entry_move_backward_word(GtkEntry *entry, gint start); static void gtk_item_entry_delete_whitespace(GtkEntry *entry); static char *gtk_item_entry_get_public_chars(GtkEntry *entry, gint start, gint end); static void gtk_item_entry_update_primary_selection(GtkEntry *entry); static void gtk_item_entry_state_changed(GtkWidget *widget, GtkStateType previous_state); static void gtk_item_entry_check_cursor_blink(GtkEntry *entry); static void gtk_item_entry_pend_cursor_blink(GtkEntry *entry); static void _item_entry_get_text_area_size(GtkEntry *entry, gint *x, gint *y, gint *width, gint *height); static void _item_entry_get_widget_window_size(GtkEntry *entry, gint *x, gint *y, gint *width, gint *height); static GtkEntryClass *parent_class = NULL; #ifdef GTK_TYPE_ENTRY_BUFFER // In GTK+ 2.18, changes were made to GtkEntry. This caused gtk+extra // to crash. So from 2.18 call the appropriate buffer routines in GTK+ // gtk/gtkentrybuffer.c. // // rrankin AT ihug DOT com DOT au 21/12/09 // typedef struct _GtkEntryPrivate GtkEntryPrivate; struct _GtkEntryPrivate { GtkEntryBuffer *buffer; // The remainder of this structure has been truncated }; # define GTK_ENTRY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), gtk_entry_get_type(), GtkEntryPrivate)) #endif GType gtk_item_entry_get_type(void) { static GType item_entry_type = 0; if (!item_entry_type) { static const GInterfaceInfo item_editable_info = { (GInterfaceInitFunc)gtk_item_entry_editable_init, /* interface_init */ NULL, /* interface_finalize */ NULL /* interface_data */ }; item_entry_type = g_type_register_static_simple( gtk_entry_get_type(), "GtkItemEntry", sizeof(GtkItemEntryClass), (GClassInitFunc)gtk_item_entry_class_init, sizeof(GtkItemEntry), (GInstanceInitFunc)gtk_item_entry_init, 0); g_type_add_interface_static(item_entry_type, gtk_editable_get_type(), &item_editable_info); } return item_entry_type; } static void gtk_item_entry_class_init(GtkItemEntryClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GtkObjectClass *gtk_object_class; GtkWidgetClass *widget_class; GtkEntryClass *entry_class; gobject_class->dispose = gtk_item_entry_dispose; gobject_class->finalize = gtk_item_entry_finalize; gtk_object_class = (GtkObjectClass *)klass; widget_class = (GtkWidgetClass *)klass; parent_class = g_type_class_ref(gtk_entry_get_type()); entry_class = (GtkEntryClass *)klass; widget_class->realize = gtk_item_entry_realize; widget_class->size_request = gtk_item_entry_size_request; widget_class->size_allocate = gtk_item_entry_size_allocate; widget_class->expose_event = gtk_item_entry_expose; widget_class->grab_focus = gtk_item_entry_grab_focus; widget_class->style_set = gtk_item_entry_style_set; widget_class->direction_changed = gtk_item_entry_direction_changed; widget_class->state_changed = gtk_item_entry_state_changed; entry_class->move_cursor = gtk_item_entry_move_cursor; entry_class->insert_at_cursor = gtk_item_entry_insert_at_cursor; entry_class->delete_from_cursor = gtk_item_entry_delete_from_cursor; gtk_object_class->destroy = gtk_item_entry_destroy; } static void gtk_item_entry_editable_init(GtkEditableClass *iface) { iface->do_insert_text = gtk_item_entry_insert_text; iface->do_delete_text = gtk_item_entry_delete_text; iface->insert_text = gtk_item_entry_real_insert_text; iface->delete_text = gtk_item_entry_real_delete_text; iface->set_position = gtk_item_entry_real_set_position; iface->get_position = gtk_item_entry_get_position; } static void gtk_item_entry_init(GtkItemEntry *entry) { entry->justification = GTK_JUSTIFY_LEFT; entry->max_length_bytes = 0; entry->text_max_size = 0; entry->item_text_size = 0; entry->item_n_bytes = 0; GTK_ENTRY(entry)->has_frame = FALSE; g_object_unref(G_OBJECT(GTK_ENTRY(entry)->im_context)); GTK_ENTRY(entry)->im_context = gtk_im_multicontext_new(); g_signal_connect(G_OBJECT(GTK_ENTRY(entry)->im_context), "commit", G_CALLBACK(gtk_item_entry_commit_cb), entry); g_signal_connect(G_OBJECT(GTK_ENTRY(entry)->im_context), "preedit_changed", G_CALLBACK(gtk_item_entry_preedit_changed_cb), entry); g_signal_connect(G_OBJECT(GTK_ENTRY(entry)->im_context), "retrieve_surrounding", G_CALLBACK(gtk_item_entry_retrieve_surrounding_cb), entry); g_signal_connect(G_OBJECT(GTK_ENTRY(entry)->im_context), "delete_surrounding", G_CALLBACK(gtk_item_entry_delete_surrounding_cb), entry); } static void gtk_item_entry_realize(GtkWidget *widget) { GtkEntry *entry; GtkEditable *editable; GdkWindowAttr attributes; gint attributes_mask; gtk_widget_set_realized_true(widget); entry = GTK_ENTRY(widget); editable = GTK_EDITABLE(widget); attributes.window_type = GDK_WINDOW_CHILD; _item_entry_get_widget_window_size(entry, &attributes.x, &attributes.y, &attributes.width, &attributes.height); attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual(widget); attributes.colormap = gtk_widget_get_colormap(widget); attributes.event_mask = gtk_widget_get_events(widget); attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; gtk_widget_set_window(widget, gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask)); gdk_window_set_user_data(gtk_widget_get_window(widget), entry); _item_entry_get_text_area_size(entry, &attributes.x, &attributes.y, &attributes.width, &attributes.height); attributes.cursor = gdk_cursor_new(GDK_XTERM); attributes_mask |= GDK_WA_CURSOR; entry->text_area = gdk_window_new(gtk_widget_get_window(widget), &attributes, attributes_mask); gdk_window_set_user_data(entry->text_area, entry); gdk_cursor_unref(attributes.cursor); gtk_widget_set_style(widget, gtk_style_attach( gtk_widget_get_style(widget), gtk_widget_get_window(widget))); gdk_window_set_background(gtk_widget_get_window(widget), &(gtk_widget_get_style(widget)->bg[gtk_widget_get_state(widget)])); gdk_window_set_background(entry->text_area, &(gtk_widget_get_style(widget)->bg[gtk_widget_get_state(widget)])); gdk_window_show(entry->text_area); gtk_im_context_set_client_window(entry->im_context, entry->text_area); gtk_item_entry_adjust_scroll(entry); } static void _item_entry_get_borders(GtkEntry *entry, gint *xborder, gint *yborder) { GtkWidget *widget = GTK_WIDGET(entry); gint focus_width; gboolean interior_focus; gtk_widget_style_get(widget, "interior-focus", &interior_focus, "focus-line-width", &focus_width, NULL); if (entry->has_frame) { *xborder = gtk_widget_get_style(widget)->xthickness; *yborder = gtk_widget_get_style(widget)->ythickness; } else { *xborder = 0; *yborder = 0; } if (!interior_focus) { *xborder += focus_width; *yborder += focus_width; } } static void gtk_item_entry_size_request(GtkWidget *widget, GtkRequisition *requisition) { GtkEntry *entry = GTK_ENTRY(widget); PangoFontMetrics *metrics; gint xborder, yborder; PangoContext *context; context = gtk_widget_get_pango_context(widget); metrics = pango_context_get_metrics(context, gtk_widget_get_style(widget)->font_desc, pango_context_get_language(context)); entry->ascent = pango_font_metrics_get_ascent(metrics); entry->descent = pango_font_metrics_get_descent(metrics); _item_entry_get_borders(entry, &xborder, &yborder); xborder += INNER_BORDER; yborder += INNER_BORDER; if (entry->width_chars < 0) requisition->width = MIN_ENTRY_WIDTH + xborder * 2; else { gint char_width = pango_font_metrics_get_approximate_char_width(metrics); requisition->width = PANGO_PIXELS(char_width) * entry->width_chars + xborder * 2; } requisition->height = PANGO_PIXELS(entry->ascent + entry->descent) + yborder * 2; pango_font_metrics_unref(metrics); } static void _item_entry_get_text_area_size(GtkEntry *entry, gint *x, gint *y, gint *width, gint *height) { gint xborder, yborder; GtkRequisition requisition; GtkAllocation allocation; GtkWidget *widget = GTK_WIDGET(entry); gtk_widget_get_child_requisition(widget, &requisition); _item_entry_get_borders(entry, &xborder, &yborder); if (x) *x = xborder; if (y) *y = yborder; if (width) { gtk_widget_get_allocation(widget, &allocation); *width = allocation.width - xborder * 2; } if (height) *height = requisition.height - yborder * 2; } static void _item_entry_get_widget_window_size(GtkEntry *entry, gint *x, gint *y, gint *width, gint *height) { GtkRequisition requisition; GtkAllocation allocation; GtkWidget *widget = GTK_WIDGET(entry); /* GtkEntry->is_cell_renderer is a GSEAL()ed structure member. It will only be set to TRUE when calling the GtkEntry's GtkCellEditable interface function gtk_entry_cell_editable_init(). This should never be the case in GtkSheet or GtkItemEntry. Anyhow, if the above statement wasn't true, solutions could be: - ask the Gtk maintainers to add the function GtkEntry::_get_widget_window_size() to the public GtkEntry interface - last resort work-around: use the sealed member anyhow GtkEntry->GSEAL(is_cell_renderer) */ #if 0 # define ENTRY_IS_CELL_RENDERER entry->is_cell_renderer #else # define ENTRY_IS_CELL_RENDERER FALSE #endif gtk_widget_get_child_requisition(widget, &requisition); gtk_widget_get_allocation(widget, &allocation); if (x) *x = allocation.x; if (y) { if (ENTRY_IS_CELL_RENDERER) *y = allocation.y; else *y = allocation.y + (allocation.height - requisition.height) / 2; } if (width) *width = allocation.width; if (height) { if (ENTRY_IS_CELL_RENDERER) *height = allocation.height; else *height = requisition.height; } } static void gtk_item_entry_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { GtkEntry *entry = GTK_ENTRY(widget); GtkItemEntry *ientry = GTK_ITEM_ENTRY(widget); if (ientry->text_max_size > 0) allocation->width = MIN(ientry->text_max_size, allocation->width); gtk_widget_set_allocation(widget, allocation); if (gtk_widget_get_realized(widget)) { /* We call gtk_widget_get_child_requisition, since we want (for * backwards compatibility reasons) the realization here to * be affected by the usize of the entry, if set */ gint x, y, width, height; _item_entry_get_widget_window_size(entry, &x, &y, &width, &height); #if GTK_ITEM_ENTRY_DEBUG_ALLOC>0 g_debug("gtk_item_entry_size_allocate: _get_widget_window_size (%d, %d, %d, %d)", x, y, width, height); #endif #if GTK_ITEM_ENTRY_DEBUG_ALLOC>0 g_debug("gtk_item_entry_size_allocate: move widget window (%d, %d, %d, %d)", allocation->x, allocation->y, allocation->width, allocation->height); #endif gdk_window_move_resize(gtk_widget_get_window(widget), allocation->x, allocation->y, allocation->width, allocation->height); _item_entry_get_text_area_size(entry, &x, &y, &width, &height); #if GTK_ITEM_ENTRY_DEBUG_ALLOC>0 g_debug("gtk_item_entry_size_allocate: _get_text_area_size (%d, %d, %d, %d)", x, y, width, height); #endif #if GTK_ITEM_ENTRY_DEBUG_ALLOC>0 g_debug("gtk_item_entry_size_allocate: move text_area (%d, %d, %d, %d)", 0, allocation->height - height, allocation->width, height); #endif gdk_window_move_resize(entry->text_area, 0, allocation->height - height, allocation->width, height); gtk_item_entry_recompute(entry); } } static void gtk_item_entry_draw_frame(GtkWidget *widget) { } static void gtk_item_entry_destroy (GtkObject *object) { #if GTK_ITEM_ENTRY_DEBUG_DESTUCTION>0 GtkItemEntry *ientry = GTK_ITEM_ENTRY(object); g_debug("gtk_item_entry_destroy %p %s", ientry, gtk_widget_get_name(GTK_WIDGET(ientry))); #endif GTK_OBJECT_CLASS (parent_class)->destroy(object); } static void gtk_item_entry_dispose (GObject *object) { #if GTK_ITEM_ENTRY_DEBUG_DESTUCTION>0 GtkItemEntry *ientry = GTK_ITEM_ENTRY(object); g_debug("gtk_item_entry_dispose %p", ientry); #endif G_OBJECT_CLASS (parent_class)->dispose(object); } static void gtk_item_entry_finalize (GObject *object) { #if GTK_ITEM_ENTRY_DEBUG_DESTUCTION>0 GtkItemEntry *ientry = GTK_ITEM_ENTRY(object); g_debug("gtk_item_entry_finalize %p", ientry); #endif G_OBJECT_CLASS (parent_class)->finalize(object); } static gint gtk_item_entry_expose(GtkWidget *widget, GdkEventExpose *event) { GtkEntry *entry = GTK_ENTRY(widget); gfloat align = 0.0; switch(GTK_ITEM_ENTRY(widget)->justification) { case GTK_JUSTIFY_LEFT: align = 0.0; break; case GTK_JUSTIFY_RIGHT: align = 1.0; break; case GTK_JUSTIFY_CENTER: align = 0.5; break; case GTK_JUSTIFY_FILL: align = 0.5; break; } #if GTK_ITEM_ENTRY_DEBUG_JUSTIFICATION > 0 g_debug("gtk_item_entry_expose: just %d align %g", GTK_ITEM_ENTRY(widget)->justification, align); #endif if (gtk_entry_get_alignment(entry) != align) { gtk_entry_set_alignment(entry, align); } if (gtk_widget_get_window(widget) == event->window) gtk_item_entry_draw_frame(widget); else if (entry->text_area == event->window) { gint area_width, area_height; _item_entry_get_text_area_size(entry, NULL, NULL, &area_width, &area_height); gdk_draw_rectangle(entry->text_area, gtk_widget_get_style(widget)->bg_gc[gtk_widget_get_state(widget)], TRUE, 0, 0, area_width, area_height); if ((entry->visible || entry->invisible_char != 0) && gtk_widget_has_focus(GTK_WIDGET(widget)) && entry->selection_bound == entry->current_pos && entry->cursor_visible) gtk_item_entry_draw_cursor(GTK_ENTRY(widget), CURSOR_STANDARD); if (entry->dnd_position != -1) gtk_item_entry_draw_cursor(GTK_ENTRY(widget), CURSOR_DND); gtk_item_entry_draw_text(GTK_ENTRY(widget)); } return FALSE; } static void gtk_item_entry_grab_focus(GtkWidget *widget) { GtkEntry *entry = GTK_ENTRY(widget); gboolean select_on_focus; GTK_WIDGET_CLASS(parent_class)->grab_focus(widget); g_object_get(G_OBJECT(gtk_settings_get_default()), "gtk-entry-select-on-focus", &select_on_focus, NULL); if (select_on_focus && entry->editable && !entry->in_click) { gtk_editable_select_region(GTK_EDITABLE(widget), 0, -1); } } static void gtk_item_entry_direction_changed(GtkWidget *widget, GtkTextDirection previous_dir) { GtkEntry *entry = GTK_ENTRY(widget); gtk_item_entry_recompute(entry); GTK_WIDGET_CLASS(parent_class)->direction_changed(widget, previous_dir); } static void gtk_item_entry_state_changed(GtkWidget *widget, GtkStateType previous_state) { GtkEntry *entry = GTK_ENTRY(widget); if (gtk_widget_get_realized(widget)) { gdk_window_set_background(gtk_widget_get_window(widget), >k_widget_get_style(widget)->bg[gtk_widget_get_state(widget)]); gdk_window_set_background(entry->text_area, >k_widget_get_style(widget)->bg[gtk_widget_get_state(widget)]); } if (!gtk_widget_is_sensitive(widget)) { /* Clear any selection */ gtk_editable_select_region(GTK_EDITABLE(entry), entry->current_pos, entry->current_pos); } gtk_widget_queue_draw(widget); } /* GtkEditable method implementations */ static void gtk_item_entry_insert_text(GtkEditable *editable, const gchar *new_text, gint new_text_length, gint *position) { GtkEntry *entry = GTK_ENTRY(editable); gchar buf[64]; gchar *text; if (*position < 0 || *position > entry->text_length) *position = entry->text_length; g_object_ref(G_OBJECT(editable)); if (new_text_length <= 63) text = buf; else text = g_new(gchar, new_text_length + 1); text[new_text_length] = '\0'; strncpy(text, new_text, new_text_length); g_signal_emit_by_name(editable, "insert_text", text, new_text_length, position); if (new_text_length > 63) g_free(text); g_object_unref(G_OBJECT(editable)); } static void gtk_item_entry_delete_text(GtkEditable *editable, gint start_pos, gint end_pos) { GtkEntry *entry = GTK_ENTRY(editable); if (end_pos < 0 || end_pos > entry->text_length) end_pos = entry->text_length; if (start_pos < 0) start_pos = 0; if (start_pos > end_pos) start_pos = end_pos; g_object_ref(G_OBJECT(editable)); g_signal_emit_by_name(editable, "delete_text", start_pos, end_pos); g_object_unref(G_OBJECT(editable)); } static void gtk_item_entry_style_set(GtkWidget *widget, GtkStyle *previous_style) { GtkEntry *entry = GTK_ENTRY(widget); if (previous_style && gtk_widget_get_realized(widget)) { gtk_item_entry_recompute(entry); gdk_window_set_background(gtk_widget_get_window(widget), >k_widget_get_style(widget)->bg[gtk_widget_get_state(widget)]); gdk_window_set_background(entry->text_area, >k_widget_get_style(widget)->bg[gtk_widget_get_state(widget)]); } } static void gtk_item_entry_real_set_position(GtkEditable *editable, gint position) { GtkEntry *entry = GTK_ENTRY(editable); if (position < 0 || position > entry->text_length) position = entry->text_length; if (position != entry->current_pos || position != entry->selection_bound) { gtk_entry_reset_im_context(entry); gtk_item_entry_set_positions(entry, position, position); } } static gint gtk_item_entry_get_position(GtkEditable *editable) { return GTK_ENTRY(editable)->current_pos; } #ifdef GTK_TYPE_ENTRY_BUFFER // // Get_buffer copied from gtk/gtkentry.c // static GtkEntryBuffer * _item_entry_get_buffer(GtkEntry *entry) { GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE(entry); if (priv->buffer == NULL) { GtkEntryBuffer *buffer; buffer = gtk_entry_buffer_new(NULL, 0); gtk_entry_set_buffer(entry, buffer); g_object_unref(buffer); } return priv->buffer; } #endif //GTK_TYPE_ENTRY_BUFFER /* Default signal handlers */ static void gtk_item_entry_real_insert_text(GtkEditable *editable, const gchar *new_text, gint new_text_length, gint *position) { gint n_chars; #ifndef GTK_TYPE_ENTRY_BUFFER GtkItemEntry *ientry = GTK_ITEM_ENTRY(editable); #endif GtkEntry *entry = GTK_ENTRY(editable); if (new_text_length < 0) new_text_length = strlen(new_text); n_chars = g_utf8_strlen(new_text, new_text_length); if (entry->text_max_length > 0 && n_chars + entry->text_length > entry->text_max_length) { gdk_beep(); n_chars = entry->text_max_length - entry->text_length; new_text_length = g_utf8_offset_to_pointer(new_text, n_chars) - new_text; } #if GTK_ITEM_ENTRY_DEBUG_TEXT>0 g_debug("gtk_item_entry_real_insert_text: n_chars %d %d", n_chars, *position); #endif #ifdef GTK_TYPE_ENTRY_BUFFER { guint n_bytes_inserted; GtkEntryBuffer *buffer = _item_entry_get_buffer(entry); n_bytes_inserted = gtk_entry_buffer_insert_text(buffer, *position, new_text, n_chars); #if GTK_ITEM_ENTRY_DEBUG_TEXT>0 g_debug("gtk_item_entry_real_insert_text: GTK_TYPE_ENTRY_BUFFER n_chars %d %d", n_chars, *position); #endif } #else if (new_text_length + ientry->item_n_bytes + 1 > ientry->item_text_size) { while (new_text_length + ientry->item_n_bytes + 1 > ientry->item_text_size) { if (ientry->item_text_size == 0) ientry->item_text_size = MIN_SIZE; else { if (2 * (guint)ientry->item_text_size < MAX_SIZE && 2 * (guint)ientry->item_text_size > ientry->item_text_size) ientry->item_text_size *= 2; else { ientry->item_text_size = MAX_SIZE; if (new_text_length > (gint)ientry->item_text_size - (gint)ientry->item_n_bytes - 1) { new_text_length = (gint)ientry->item_text_size - (gint)ientry->item_n_bytes - 1; new_text_length = g_utf8_find_prev_char(new_text, new_text + new_text_length + 1) - new_text; n_chars = g_utf8_strlen(new_text, new_text_length); } break; } } } entry->text = g_realloc(entry->text, ientry->item_text_size); } gint index; index = g_utf8_offset_to_pointer(entry->text, *position) - entry->text; g_memmove(entry->text + index + new_text_length, entry->text + index, ientry->item_n_bytes - index); memcpy(entry->text + index, new_text, new_text_length); if (new_text_length + *position > ientry->item_n_bytes) ientry->item_n_bytes = new_text_length + *position; /* NUL terminate for safety and convenience */ entry->text[ientry->item_n_bytes] = '\0'; entry->text_length = strlen(entry->text); if (entry->current_pos > *position) entry->current_pos += n_chars; if (entry->selection_bound > *position) entry->selection_bound += n_chars; #endif //GTK_TYPE_ENTRY_BUFFER #if GTK_ITEM_ENTRY_DEBUG_TEXT>0 g_debug("gtk_item_entry_real_insert_text: n_chars %d %d", n_chars, *position); #endif *position += n_chars; gtk_item_entry_recompute(entry); g_signal_emit_by_name(editable, "changed"); g_object_notify(G_OBJECT(editable), "text"); } static void gtk_item_entry_real_delete_text(GtkEditable *editable, gint start_pos, gint end_pos) { GtkEntry *entry = GTK_ENTRY(editable); if (start_pos < 0) start_pos = 0; if (end_pos < 0 || end_pos > entry->text_length) end_pos = entry->text_length; if (start_pos < end_pos) { #ifdef GTK_TYPE_ENTRY_BUFFER GtkEntryBuffer *buffer = _item_entry_get_buffer(entry); gtk_entry_buffer_delete_text(buffer, start_pos, end_pos - start_pos); #else GtkItemEntry *ientry = GTK_ITEM_ENTRY(editable); gint start_index = g_utf8_offset_to_pointer(entry->text, start_pos) - entry->text; gint end_index = g_utf8_offset_to_pointer(entry->text, end_pos) - entry->text; g_memmove(entry->text + start_index, entry->text + end_index, ientry->item_n_bytes + 1 - end_index); ientry->item_n_bytes -= (end_index - start_index); entry->text_length -= (end_pos - start_pos); if (entry->current_pos > start_pos) entry->current_pos -= MIN(entry->current_pos, end_pos) - start_pos; if (entry->selection_bound > start_pos) entry->selection_bound -= MIN(entry->selection_bound, end_pos) - start_pos; #endif // GTK_TYPE_ENTRY_BUFFER /* We might have deleted the selection */ gtk_item_entry_update_primary_selection(entry); gtk_item_entry_recompute(entry); g_signal_emit_by_name(editable, "changed"); g_object_notify(G_OBJECT(editable), "text"); } } /* Compute the X position for an offset that corresponds to the "more important * cursor position for that offset. We use this when trying to guess to which * end of the selection we should go to when the user hits the left or * right arrow key. */ static gint _item_entry_get_better_cursor_x(GtkEntry *entry, gint offset) { GtkTextDirection keymap_direction = (gdk_keymap_get_direction(gdk_keymap_get_default()) == PANGO_DIRECTION_LTR) ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL; GtkTextDirection widget_direction = gtk_widget_get_direction(GTK_WIDGET(entry)); gboolean split_cursor; PangoLayout *layout = gtk_item_entry_ensure_layout(entry, TRUE); gint index = g_utf8_offset_to_pointer(entry->text, offset) - entry->text; PangoRectangle strong_pos, weak_pos; g_object_get(gtk_widget_get_settings(GTK_WIDGET(entry)), "gtk-split-cursor", &split_cursor, NULL); pango_layout_get_cursor_pos(layout, index, &strong_pos, &weak_pos); if (split_cursor) return strong_pos.x / PANGO_SCALE; else return (keymap_direction == widget_direction) ? strong_pos.x / PANGO_SCALE : weak_pos.x / PANGO_SCALE; } static void gtk_item_entry_move_cursor(GtkEntry *entry, GtkMovementStep step, gint count, gboolean extend_selection) { gint new_pos = entry->current_pos; gtk_entry_reset_im_context(entry); if (entry->current_pos != entry->selection_bound && !extend_selection) { /* If we have a current selection and aren't extending it, move to the * start/or end of the selection as appropriate */ switch(step) { case GTK_MOVEMENT_VISUAL_POSITIONS: { gint current_x = _item_entry_get_better_cursor_x(entry, entry->current_pos); gint bound_x = _item_entry_get_better_cursor_x(entry, entry->selection_bound); if (count < 0) new_pos = current_x < bound_x ? entry->current_pos : entry->selection_bound; else new_pos = current_x > bound_x ? entry->current_pos : entry->selection_bound; break; } case GTK_MOVEMENT_LOGICAL_POSITIONS: case GTK_MOVEMENT_WORDS: if (count < 0) new_pos = MIN(entry->current_pos, entry->selection_bound); else new_pos = MAX(entry->current_pos, entry->selection_bound); break; case GTK_MOVEMENT_DISPLAY_LINE_ENDS: case GTK_MOVEMENT_PARAGRAPH_ENDS: case GTK_MOVEMENT_BUFFER_ENDS: new_pos = count < 0 ? 0 : entry->text_length; break; case GTK_MOVEMENT_DISPLAY_LINES: case GTK_MOVEMENT_PARAGRAPHS: case GTK_MOVEMENT_PAGES: case GTK_MOVEMENT_HORIZONTAL_PAGES: break; } } else { switch(step) { case GTK_MOVEMENT_LOGICAL_POSITIONS: new_pos = gtk_item_entry_move_logically(entry, new_pos, count); break; case GTK_MOVEMENT_VISUAL_POSITIONS: new_pos = gtk_item_entry_move_visually(entry, new_pos, count); break; case GTK_MOVEMENT_WORDS: while (count > 0) { new_pos = gtk_item_entry_move_forward_word(entry, new_pos); count--; } while (count < 0) { new_pos = gtk_item_entry_move_backward_word(entry, new_pos); count++; } break; case GTK_MOVEMENT_DISPLAY_LINE_ENDS: case GTK_MOVEMENT_PARAGRAPH_ENDS: case GTK_MOVEMENT_BUFFER_ENDS: new_pos = count < 0 ? 0 : entry->text_length; break; case GTK_MOVEMENT_DISPLAY_LINES: case GTK_MOVEMENT_PARAGRAPHS: case GTK_MOVEMENT_PAGES: case GTK_MOVEMENT_HORIZONTAL_PAGES: break; } } if (extend_selection) gtk_editable_select_region(GTK_EDITABLE(entry), entry->selection_bound, new_pos); else gtk_editable_set_position(GTK_EDITABLE(entry), new_pos); gtk_item_entry_pend_cursor_blink(entry); } static void gtk_item_entry_insert_at_cursor(GtkEntry *entry, const gchar *str) { GtkEditable *editable = GTK_EDITABLE(entry); gint pos = entry->current_pos; if (entry->editable) { gtk_entry_reset_im_context(entry); gtk_editable_insert_text(editable, str, -1, &pos); gtk_editable_set_position(editable, pos); } } static void gtk_item_entry_delete_from_cursor(GtkEntry *entry, GtkDeleteType type, gint count) { GtkEditable *editable = GTK_EDITABLE(entry); gint start_pos = entry->current_pos; gint end_pos = entry->current_pos; gtk_entry_reset_im_context(entry); if (!entry->editable) return; if (entry->selection_bound != entry->current_pos) { gtk_editable_delete_selection(editable); return; } switch(type) { case GTK_DELETE_CHARS: end_pos = gtk_item_entry_move_logically(entry, entry->current_pos, count); gtk_editable_delete_text(editable, MIN(start_pos, end_pos), MAX(start_pos, end_pos)); break; case GTK_DELETE_WORDS: if (count < 0) { /* Move to end of current word, or if not on a word, end of previous word */ end_pos = gtk_item_entry_move_backward_word(entry, end_pos); end_pos = gtk_item_entry_move_forward_word(entry, end_pos); } else if (count > 0) { /* Move to beginning of current word, or if not on a word, begining of next word */ start_pos = gtk_item_entry_move_forward_word(entry, start_pos); start_pos = gtk_item_entry_move_backward_word(entry, start_pos); } /* Fall through */ case GTK_DELETE_WORD_ENDS: while (count < 0) { start_pos = gtk_item_entry_move_backward_word(entry, start_pos); count++; } while (count > 0) { end_pos = gtk_item_entry_move_forward_word(entry, end_pos); count--; } gtk_editable_delete_text(editable, start_pos, end_pos); break; case GTK_DELETE_DISPLAY_LINE_ENDS: case GTK_DELETE_PARAGRAPH_ENDS: if (count < 0) gtk_editable_delete_text(editable, 0, entry->current_pos); else gtk_editable_delete_text(editable, entry->current_pos, -1); break; case GTK_DELETE_DISPLAY_LINES: case GTK_DELETE_PARAGRAPHS: gtk_editable_delete_text(editable, 0, -1); break; case GTK_DELETE_WHITESPACE: gtk_item_entry_delete_whitespace(entry); break; } gtk_item_entry_pend_cursor_blink(entry); } /* IM Context Callbacks */ static void gtk_item_entry_commit_cb(GtkIMContext *context, const gchar *str, GtkEntry *entry) { gtk_item_entry_enter_text(entry, str); } static void gtk_item_entry_preedit_changed_cb(GtkIMContext *context, GtkEntry *entry) { gchar *preedit_string; gint cursor_pos; gtk_im_context_get_preedit_string(entry->im_context, &preedit_string, NULL, &cursor_pos); entry->preedit_length = strlen(preedit_string); cursor_pos = CLAMP(cursor_pos, 0, g_utf8_strlen(preedit_string, -1)); entry->preedit_cursor = cursor_pos; g_free(preedit_string); gtk_item_entry_recompute(entry); } static gboolean gtk_item_entry_retrieve_surrounding_cb(GtkIMContext *context, GtkEntry *entry) { GtkEntryBuffer *buffer = _item_entry_get_buffer(entry); gtk_im_context_set_surrounding(context, entry->text, gtk_entry_buffer_get_bytes(buffer), g_utf8_offset_to_pointer(entry->text, entry->current_pos) - entry->text); return TRUE; } static gboolean gtk_item_entry_delete_surrounding_cb(GtkIMContext *slave, gint offset, gint n_chars, GtkEntry *entry) { gtk_editable_delete_text(GTK_EDITABLE(entry), entry->current_pos + offset, entry->current_pos + offset + n_chars); return TRUE; } /* Internal functions */ /* Used for im_commit_cb and inserting Unicode chars */ static void gtk_item_entry_enter_text(GtkEntry *entry, const gchar *str) { GtkEditable *editable = GTK_EDITABLE(entry); gint tmp_pos; if (gtk_editable_get_selection_bounds(editable, NULL, NULL)) gtk_editable_delete_selection(editable); else { if (entry->overwrite_mode) gtk_item_entry_delete_from_cursor(entry, GTK_DELETE_CHARS, 1); } tmp_pos = entry->current_pos; gtk_editable_insert_text(editable, str, strlen(str), &tmp_pos); gtk_editable_set_position(editable, tmp_pos); } /* All changes to entry->current_pos and entry->selection_bound * should go through this function. */ static void gtk_item_entry_set_positions(GtkEntry *entry, gint current_pos, gint selection_bound) { gboolean changed = FALSE; g_object_freeze_notify(G_OBJECT(entry)); if (current_pos != -1 && entry->current_pos != current_pos) { entry->current_pos = current_pos; changed = TRUE; g_object_notify(G_OBJECT(entry), "cursor_position"); } if (selection_bound != -1 && entry->selection_bound != selection_bound) { entry->selection_bound = selection_bound; changed = TRUE; g_object_notify(G_OBJECT(entry), "selection_bound"); } g_object_thaw_notify(G_OBJECT(entry)); if (changed) gtk_item_entry_recompute(entry); } static void gtk_item_entry_reset_layout(GtkEntry *entry) { if (entry->cached_layout) { g_object_unref(G_OBJECT(entry->cached_layout)); entry->cached_layout = NULL; } } static void _item_entry_update_im_cursor_location(GtkEntry *entry) { GdkRectangle area; gint strong_x; gint strong_xoffset; gint x, y, area_width, area_height; gtk_item_entry_get_cursor_locations(entry, CURSOR_STANDARD, &strong_x, NULL) ; _item_entry_get_text_area_size(entry, &x, &y, &area_width, &area_height); strong_xoffset = strong_x - entry->scroll_offset; if (strong_xoffset < 0) { strong_xoffset = 0; } else if (strong_xoffset > area_width) { strong_xoffset = area_width; } area.x = x + strong_xoffset; area.y = y + area_height; area.width = area_width; area.height = area_height; gtk_im_context_set_cursor_location(entry->im_context, &area); } static gboolean _item_entry_recompute_idle_func(gpointer data) { GtkEntry *entry; GDK_THREADS_ENTER(); entry = GTK_ENTRY(data); gtk_item_entry_adjust_scroll(entry); gtk_item_entry_queue_draw(entry); entry->recompute_idle = FALSE; _item_entry_update_im_cursor_location(entry); GDK_THREADS_LEAVE(); return FALSE; } static void gtk_item_entry_recompute(GtkEntry *entry) { gtk_item_entry_reset_layout(entry); gtk_item_entry_check_cursor_blink(entry); if (!entry->recompute_idle) { entry->recompute_idle = g_idle_add_full(G_PRIORITY_HIGH_IDLE + 15, /* between resize and redraw */ _item_entry_recompute_idle_func, entry, NULL); } } static void _item_entry_append_char(GString *str, gunichar ch, gint count) { gint i; gint char_len; gchar buf[7]; char_len = g_unichar_to_utf8(ch, buf); i = 0; while (i < count) { g_string_append_len(str, buf, char_len); ++i; } } static PangoLayout * gtk_item_entry_create_layout(GtkEntry *entry, gboolean include_preedit) { PangoLayout *layout = gtk_widget_create_pango_layout(GTK_WIDGET(entry), NULL); PangoAttrList *tmp_attrs = pango_attr_list_new(); gchar *preedit_string = NULL; gint preedit_length = 0; PangoAttrList *preedit_attrs = NULL; pango_layout_set_single_paragraph_mode(layout, TRUE); if (include_preedit) { gtk_im_context_get_preedit_string(entry->im_context, &preedit_string, &preedit_attrs, NULL); preedit_length = entry->preedit_length; } if (preedit_length) { GString *tmp_string = g_string_new(NULL); GtkEntryBuffer *buffer = _item_entry_get_buffer(entry); gint cursor_index = g_utf8_offset_to_pointer(entry->text, entry->current_pos) - entry->text; if (entry->visible) { g_string_prepend_len(tmp_string, entry->text, gtk_entry_buffer_get_bytes(buffer)); g_string_insert(tmp_string, cursor_index, preedit_string); } else { gint ch_len; gint preedit_len_chars; gunichar invisible_char; ch_len = g_utf8_strlen(entry->text, gtk_entry_buffer_get_bytes(buffer)); preedit_len_chars = g_utf8_strlen(preedit_string, -1); ch_len += preedit_len_chars; if (entry->invisible_char != 0) invisible_char = entry->invisible_char; else invisible_char = ' '; /* just pick a char */ _item_entry_append_char(tmp_string, invisible_char, ch_len); /* Fix cursor index to point to invisible char corresponding * to the preedit, fix preedit_length to be the length of * the invisible chars representing the preedit */ cursor_index = g_utf8_offset_to_pointer(tmp_string->str, entry->current_pos) - tmp_string->str; preedit_length = preedit_len_chars * g_unichar_to_utf8(invisible_char, NULL); } pango_layout_set_text(layout, tmp_string->str, tmp_string->len); pango_attr_list_splice(tmp_attrs, preedit_attrs, cursor_index, preedit_length); g_string_free(tmp_string, TRUE); } else { if (entry->visible) { GtkEntryBuffer *buffer = _item_entry_get_buffer(entry); pango_layout_set_text(layout, entry->text, gtk_entry_buffer_get_bytes(buffer)); } else { GString *str = g_string_new(NULL); gunichar invisible_char; if (entry->invisible_char != 0) invisible_char = entry->invisible_char; else invisible_char = ' '; /* just pick a char */ _item_entry_append_char(str, invisible_char, entry->text_length); pango_layout_set_text(layout, str->str, str->len); g_string_free(str, TRUE); } } pango_layout_set_attributes(layout, tmp_attrs); if (preedit_string) g_free(preedit_string); if (preedit_attrs) pango_attr_list_unref(preedit_attrs); pango_attr_list_unref(tmp_attrs); return layout; } static PangoLayout * gtk_item_entry_ensure_layout(GtkEntry *entry, gboolean include_preedit) { if (entry->preedit_length > 0 && !include_preedit != !entry->cache_includes_preedit) gtk_item_entry_reset_layout(entry); if (!entry->cached_layout) { entry->cached_layout = gtk_item_entry_create_layout(entry, include_preedit); entry->cache_includes_preedit = include_preedit; } return entry->cached_layout; } static void _item_entry_get_layout_position(GtkEntry *entry, gint *x, gint *y) { PangoLayout *layout; PangoRectangle logical_rect; gint area_width, area_height; gint y_pos; PangoLayoutLine *line; layout = gtk_item_entry_ensure_layout(entry, TRUE); _item_entry_get_text_area_size(entry, NULL, NULL, &area_width, &area_height); area_height = PANGO_SCALE * (area_height); line = pango_layout_get_lines(layout)->data; pango_layout_line_get_extents(line, NULL, &logical_rect); /* Align primarily for locale's ascent/descent */ y_pos = ((area_height - entry->ascent - entry->descent) / 2 + entry->ascent + logical_rect.y); /* Now see if we need to adjust to fit in actual drawn string */ if (logical_rect.height > area_height) y_pos = (area_height - logical_rect.height) / 2; else if (y_pos < 0) y_pos = 0; else if (y_pos + logical_rect.height > area_height) y_pos = area_height - logical_rect.height; y_pos = y_pos / PANGO_SCALE; if (x) *x = -entry->scroll_offset; if (y) *y = y_pos; } static void gtk_item_entry_draw_text(GtkEntry *entry) { GtkWidget *widget; PangoLayoutLine *line; if (!entry->visible && entry->invisible_char == 0) return; if (gtk_widget_is_drawable(GTK_WIDGET(entry))) { PangoLayout *layout = gtk_item_entry_ensure_layout(entry, TRUE); gint area_width, area_height; gint x, y; gint start_pos, end_pos; widget = GTK_WIDGET(entry); _item_entry_get_layout_position(entry, &x, &y); _item_entry_get_text_area_size(entry, NULL, NULL, &area_width, &area_height); gdk_draw_layout(entry->text_area, gtk_widget_get_style(widget)->text_gc[gtk_widget_get_state(widget)], x, y, layout); if (gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start_pos, &end_pos)) { gint *ranges; gint n_ranges, i; PangoRectangle logical_rect; const gchar *text = pango_layout_get_text(layout); gint start_index = g_utf8_offset_to_pointer(text, start_pos) - text; gint end_index = g_utf8_offset_to_pointer(text, end_pos) - text; GdkRegion *clip_region = gdk_region_new(); GdkGC *text_gc; GdkGC *selection_gc; line = pango_layout_get_lines(layout)->data; pango_layout_line_get_x_ranges(line, start_index, end_index, &ranges, &n_ranges); pango_layout_get_extents(layout, NULL, &logical_rect); if (gtk_widget_has_focus(GTK_WIDGET(entry))) { selection_gc = gtk_widget_get_style(widget)->base_gc[GTK_STATE_SELECTED]; text_gc = gtk_widget_get_style(widget)->text_gc[GTK_STATE_SELECTED]; } else { selection_gc = gtk_widget_get_style(widget)->base_gc[GTK_STATE_ACTIVE]; text_gc = gtk_widget_get_style(widget)->text_gc[GTK_STATE_ACTIVE]; } for (i = 0; i < n_ranges; i++) { GdkRectangle rect; rect.x = INNER_BORDER - entry->scroll_offset + ranges[2 * i] / PANGO_SCALE; rect.y = y; rect.width = (ranges[2 * i + 1] - ranges[2 * i]) / PANGO_SCALE; rect.height = logical_rect.height / PANGO_SCALE; gdk_draw_rectangle(entry->text_area, selection_gc, TRUE, rect.x, rect.y, rect.width, rect.height); gdk_region_union_with_rect(clip_region, &rect); } gdk_gc_set_clip_region(text_gc, clip_region); gdk_draw_layout(entry->text_area, text_gc, x, y, layout); gdk_gc_set_clip_region(text_gc, NULL); gdk_region_destroy(clip_region); g_free(ranges); } } } /* * From _gtk_get_insertion_cursor_gc */ typedef struct _CursorInfo CursorInfo; struct _CursorInfo { GType for_type; GdkGC *primary_gc; GdkGC *secondary_gc; }; static GdkGC * _item_entry_make_cursor_gc(GtkWidget *widget, const gchar *property_name, GdkColor *fallback) { GdkGCValues gc_values; GdkGCValuesMask gc_values_mask; GdkColor *cursor_color; gtk_widget_style_get(widget, property_name, &cursor_color, NULL); gc_values_mask = GDK_GC_FOREGROUND; if (cursor_color) { gc_values.foreground = *cursor_color; gdk_color_free(cursor_color); } else gc_values.foreground = *fallback; gdk_rgb_find_color(gtk_widget_get_style(widget)->colormap, &gc_values.foreground); return gtk_gc_get(gtk_widget_get_style(widget)->depth, gtk_widget_get_style(widget)->colormap, &gc_values, gc_values_mask); } static GdkGC * _item_entry_get_insertion_cursor_gc(GtkWidget *widget, gboolean is_primary) { CursorInfo *cursor_info; cursor_info = g_object_get_data(G_OBJECT(gtk_widget_get_style(widget)), "gtk-style-cursor-info"); if (!cursor_info) { cursor_info = g_new(CursorInfo, 1); g_object_set_data(G_OBJECT(gtk_widget_get_style(widget)), "gtk-style-cursor-info", cursor_info); cursor_info->primary_gc = NULL; cursor_info->secondary_gc = NULL; cursor_info->for_type = G_TYPE_INVALID; } /* We have to keep track of the type because gtk_widget_style_get() * can return different results when called on the same property and * same style but for different widgets. :-(. That is, * GtkEntry::cursor-color = "red" in a style will modify the cursor * color for entries but not for text view. */ if (cursor_info->for_type != G_OBJECT_TYPE(widget)) { cursor_info->for_type = G_OBJECT_TYPE(widget); if (cursor_info->primary_gc) { gtk_gc_release(cursor_info->primary_gc); cursor_info->primary_gc = NULL; } if (cursor_info->secondary_gc) { gtk_gc_release(cursor_info->secondary_gc); cursor_info->secondary_gc = NULL; } } if (is_primary) { if (!cursor_info->primary_gc) cursor_info->primary_gc = _item_entry_make_cursor_gc(widget, "cursor-color", >k_widget_get_style(widget)->black); return g_object_ref(cursor_info->primary_gc); } else { static GdkColor gray = { 0, 0x8888, 0x8888, 0x8888 }; if (!cursor_info->secondary_gc) cursor_info->secondary_gc = _item_entry_make_cursor_gc(widget, "secondary-cursor-color", &gray); return g_object_ref(cursor_info->secondary_gc); } } /* * From _gtk_draw_insertion_cursor */ static void _item_entry_draw_insertion_cursor(GtkWidget *widget, GdkDrawable *drawable, GdkGC *gc, GdkRectangle *location, GtkTextDirection direction, gboolean draw_arrow) { gint stem_width; gint arrow_width; gint x, y; gint i; gfloat cursor_aspect_ratio; gint offset; g_return_if_fail(direction != GTK_TEXT_DIR_NONE); gtk_widget_style_get(widget, "cursor-aspect-ratio", &cursor_aspect_ratio, NULL); stem_width = location->height * cursor_aspect_ratio + 1; arrow_width = stem_width + 1; /* put (stem_width % 2) on the proper side of the cursor */ if (direction == GTK_TEXT_DIR_LTR) offset = stem_width / 2; else offset = stem_width - stem_width / 2; for (i = 0; i < stem_width; i++) gdk_draw_line(drawable, gc, location->x + i - offset, location->y, location->x + i - offset, location->y + location->height - 1); if (draw_arrow) { if (direction == GTK_TEXT_DIR_RTL) { x = location->x - offset - 1; y = location->y + location->height - arrow_width * 2 - arrow_width + 1; for (i = 0; i < arrow_width; i++) { gdk_draw_line(drawable, gc, x, y + i + 1, x, y + 2 * arrow_width - i - 1); x--; } } else if (direction == GTK_TEXT_DIR_LTR) { x = location->x + stem_width - offset; y = location->y + location->height - arrow_width * 2 - arrow_width + 1; for (i = 0; i < arrow_width; i++) { gdk_draw_line(drawable, gc, x, y + i + 1, x, y + 2 * arrow_width - i - 1); x++; } } } } static void gtk_item_entry_draw_cursor(GtkEntry *entry, CursorType type) { GtkTextDirection keymap_direction = (gdk_keymap_get_direction(gdk_keymap_get_default()) == PANGO_DIRECTION_LTR) ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL; GtkTextDirection widget_direction = gtk_widget_get_direction(GTK_WIDGET(entry)); if (gtk_widget_is_drawable(GTK_WIDGET(entry)) && GTK_ENTRY(entry)->cursor_visible) { GtkWidget *widget = GTK_WIDGET(entry); GdkRectangle cursor_location; gboolean split_cursor; gint xoffset = INNER_BORDER - entry->scroll_offset; gint strong_x, weak_x; gint text_area_height; GtkTextDirection dir1 = GTK_TEXT_DIR_NONE; GtkTextDirection dir2 = GTK_TEXT_DIR_NONE; gint x1 = 0; gint x2 = 0; GdkGC *gc; gdk_window_get_size(entry->text_area, NULL, &text_area_height); gtk_item_entry_get_cursor_locations(entry, type, &strong_x, &weak_x); g_object_get(gtk_widget_get_settings(widget), "gtk-split-cursor", &split_cursor, NULL); dir1 = widget_direction; if (split_cursor) { x1 = strong_x; if (weak_x != strong_x) { dir2 = (widget_direction == GTK_TEXT_DIR_LTR) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; x2 = weak_x; } } else { if (keymap_direction == widget_direction) x1 = strong_x; else x1 = weak_x; } cursor_location.x = xoffset + x1; cursor_location.y = INNER_BORDER; cursor_location.width = 0; cursor_location.height = text_area_height - 2 * INNER_BORDER; gc = _item_entry_get_insertion_cursor_gc(widget, TRUE); _item_entry_draw_insertion_cursor(widget, entry->text_area, gc, &cursor_location, dir1, dir2 != GTK_TEXT_DIR_NONE); g_object_unref(gc); if (dir2 != GTK_TEXT_DIR_NONE) { cursor_location.x = xoffset + x2; gc = _item_entry_get_insertion_cursor_gc(widget, FALSE); _item_entry_draw_insertion_cursor(widget, entry->text_area, gc, &cursor_location, dir2, TRUE); g_object_unref(gc); } } } static void gtk_item_entry_queue_draw(GtkEntry *entry) { if (gtk_widget_get_realized(GTK_WIDGET(entry))) gdk_window_invalidate_rect(entry->text_area, NULL, FALSE); } #if GTK_CHECK_VERSION(2,21,0) == 0 static void gtk_entry_reset_im_context(GtkEntry *entry) { if (entry->need_im_reset) { entry->need_im_reset = 0; gtk_im_context_reset(entry->im_context); } } #endif // GTK_CHECK_VERSION(2,21,0) == 0 static void gtk_item_entry_get_cursor_locations(GtkEntry *entry, CursorType type, gint *strong_x, gint *weak_x) { PangoLayout *layout = gtk_item_entry_ensure_layout(entry, TRUE); const gchar *text; PangoRectangle strong_pos, weak_pos; gint index; if (type == CURSOR_STANDARD) { text = pango_layout_get_text(layout); index = g_utf8_offset_to_pointer(text, entry->current_pos + entry->preedit_cursor) - text; } else /* type == CURSOR_DND */ { index = g_utf8_offset_to_pointer(entry->text, entry->dnd_position) - entry->text; if (entry->dnd_position > entry->current_pos) index += entry->preedit_length; } pango_layout_get_cursor_pos(layout, index, &strong_pos, &weak_pos); if (strong_x) *strong_x = strong_pos.x / PANGO_SCALE; if (weak_x) *weak_x = weak_pos.x / PANGO_SCALE; } static void gtk_item_entry_adjust_scroll(GtkEntry *entry) { gint min_offset, max_offset; gint text_area_width; gint strong_x, weak_x; PangoLayout *layout; PangoLayoutLine *line; PangoRectangle logical_rect; GtkItemEntry *item_entry; gint text_width; if (!gtk_widget_get_realized(GTK_WIDGET(entry))) return; item_entry = GTK_ITEM_ENTRY(entry); gdk_window_get_size(entry->text_area, &text_area_width, NULL); text_area_width -= 2 * INNER_BORDER; layout = gtk_item_entry_ensure_layout(entry, TRUE); line = pango_layout_get_lines(layout)->data; pango_layout_line_get_extents(line, NULL, &logical_rect); text_width = logical_rect.width / PANGO_SCALE + 2; /* 2 for cursor */ gtk_item_entry_get_cursor_locations(entry, CURSOR_STANDARD, &strong_x, &weak_x); /* Display as much text as we can */ if (gtk_widget_get_direction(GTK_WIDGET(entry)) == GTK_TEXT_DIR_LTR) { entry->scroll_offset = 0; switch(item_entry->justification) { case GTK_JUSTIFY_FILL: case GTK_JUSTIFY_LEFT: /* LEFT JUSTIFICATION */ strong_x -= entry->scroll_offset; if (strong_x < 0) entry->scroll_offset += strong_x; else if (strong_x > text_area_width) { if (item_entry->text_max_size != 0 && text_area_width + 2 <= item_entry->text_max_size) { GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(entry), &allocation); allocation.width += text_width - text_area_width; entry->scroll_offset = 0; gtk_item_entry_size_allocate(GTK_WIDGET(entry), &allocation); } else { entry->scroll_offset += (strong_x - text_area_width) + 1; } } break; case GTK_JUSTIFY_RIGHT: /* RIGHT JUSTIFICATION FOR NUMBERS */ if (entry->text) { entry->scroll_offset = -(text_area_width - text_width) + 1; if (entry->scroll_offset > 0) { if (item_entry->text_max_size != 0 && text_area_width + 2 <= item_entry->text_max_size) { GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(entry), &allocation); allocation.x -= text_width - text_area_width; allocation.width += text_width - text_area_width; entry->scroll_offset = 0; gtk_item_entry_size_allocate(GTK_WIDGET(entry), &allocation); } else { entry->scroll_offset = -(text_area_width - strong_x) + 1; if (entry->scroll_offset < 0) entry->scroll_offset = 0; } } } else entry->scroll_offset = 0; break; case GTK_JUSTIFY_CENTER: if (entry->text) { entry->scroll_offset = -(text_area_width - text_width) / 2; if (entry->scroll_offset > 0) { if (item_entry->text_max_size != 0 && text_area_width + 1 <= item_entry->text_max_size) { GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(entry), &allocation); allocation.x += (text_area_width / 2 - text_width / 2); allocation.width += text_width - text_area_width; entry->scroll_offset = 0; gtk_item_entry_size_allocate(GTK_WIDGET(entry), &allocation); } else { entry->scroll_offset = -(text_area_width - strong_x) + 1; if (entry->scroll_offset < 0) entry->scroll_offset = 0; } } } else entry->scroll_offset = 0; break; } } else { max_offset = text_width - text_area_width; min_offset = MIN(0, max_offset); entry->scroll_offset = CLAMP(entry->scroll_offset, min_offset, max_offset); } g_object_notify(G_OBJECT(entry), "scroll_offset"); } static gint gtk_item_entry_move_visually(GtkEntry *entry, gint start, gint count) { gint index; PangoLayout *layout = gtk_item_entry_ensure_layout(entry, FALSE); const gchar *text; text = pango_layout_get_text(layout); index = g_utf8_offset_to_pointer(text, start) - text; while (count != 0) { int new_index, new_trailing; gboolean split_cursor; gboolean strong; g_object_get(gtk_widget_get_settings(GTK_WIDGET(entry)), "gtk-split-cursor", &split_cursor, NULL); if (split_cursor) strong = TRUE; else { GtkTextDirection keymap_direction = (gdk_keymap_get_direction(gdk_keymap_get_default()) == PANGO_DIRECTION_LTR) ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL; strong = keymap_direction == gtk_widget_get_direction(GTK_WIDGET(entry)); } if (count > 0) { pango_layout_move_cursor_visually(layout, strong, index, 0, 1, &new_index, &new_trailing); count--; } else { pango_layout_move_cursor_visually(layout, strong, index, 0, -1, &new_index, &new_trailing); count++; } if (new_index < 0 || new_index == G_MAXINT) break; index = new_index; while (new_trailing--) index = g_utf8_next_char(entry->text + new_index) - entry->text; } return g_utf8_pointer_to_offset(text, text + index); } static gint gtk_item_entry_move_logically(GtkEntry *entry, gint start, gint count) { gint new_pos = start; /* Prevent any leak of information */ if (!entry->visible) { new_pos = CLAMP(start + count, 0, entry->text_length); } else if (entry->text) { PangoLayout *layout = gtk_item_entry_ensure_layout(entry, FALSE); PangoLogAttr *log_attrs; gint n_attrs; pango_layout_get_log_attrs(layout, &log_attrs, &n_attrs); while (count > 0 && new_pos < entry->text_length) { do new_pos++; while (new_pos < entry->text_length && !log_attrs[new_pos].is_cursor_position); count--; } while (count < 0 && new_pos > 0) { do new_pos--; while (new_pos > 0 && !log_attrs[new_pos].is_cursor_position); count++; } g_free(log_attrs); } return new_pos; } static gint gtk_item_entry_move_forward_word(GtkEntry *entry, gint start) { gint new_pos = start; /* Prevent any leak of information */ if (!entry->visible) { new_pos = entry->text_length; } else if (entry->text && (new_pos < entry->text_length)) { PangoLayout *layout = gtk_item_entry_ensure_layout(entry, FALSE); PangoLogAttr *log_attrs; gint n_attrs; pango_layout_get_log_attrs(layout, &log_attrs, &n_attrs); /* Find the next word end */ new_pos++; while (new_pos < n_attrs && !log_attrs[new_pos].is_word_end) new_pos++; g_free(log_attrs); } return new_pos; } static gint gtk_item_entry_move_backward_word(GtkEntry *entry, gint start) { gint new_pos = start; /* Prevent any leak of information */ if (!entry->visible) { new_pos = 0; } else if (entry->text && start > 0) { PangoLayout *layout = gtk_item_entry_ensure_layout(entry, FALSE); PangoLogAttr *log_attrs; gint n_attrs; pango_layout_get_log_attrs(layout, &log_attrs, &n_attrs); new_pos = start - 1; /* Find the previous word beginning */ while (new_pos > 0 && !log_attrs[new_pos].is_word_start) new_pos--; g_free(log_attrs); } return new_pos; } static void gtk_item_entry_delete_whitespace(GtkEntry *entry) { PangoLayout *layout = gtk_item_entry_ensure_layout(entry, FALSE); PangoLogAttr *log_attrs; gint n_attrs; gint start, end; pango_layout_get_log_attrs(layout, &log_attrs, &n_attrs); start = end = entry->current_pos; while (start > 0 && log_attrs[start - 1].is_white) start--; while (end < n_attrs && log_attrs[end].is_white) end++; g_free(log_attrs); if (start != end) gtk_editable_delete_text(GTK_EDITABLE(entry), start, end); } /* * Like gtk_editable_get_chars, but if the editable is not * visible, return asterisks; also convert result to UTF-8. */ static char * gtk_item_entry_get_public_chars(GtkEntry *entry, gint start, gint end) { if (end < 0) end = entry->text_length; if (entry->visible) return gtk_editable_get_chars(GTK_EDITABLE(entry), start, end); else { gchar *str; gint i; gint n_chars = end - start; str = g_malloc(n_chars + 1); for (i = 0; i < n_chars; i++) str[i] = '*'; str[i] = '\0'; return str; } } static void _item_entry_primary_get_cb(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info, gpointer data) { GtkEntry *entry = GTK_ENTRY(data); gint start, end; if (gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start, &end)) { gchar *str = gtk_item_entry_get_public_chars(entry, start, end); gtk_selection_data_set_text(selection_data, str, -1); g_free(str); } } static void _item_entry_primary_clear_cb(GtkClipboard *clipboard, gpointer data) { GtkEntry *entry = GTK_ENTRY(data); gtk_editable_select_region(GTK_EDITABLE(entry), entry->current_pos, entry->current_pos); } static void gtk_item_entry_update_primary_selection(GtkEntry *entry) { static const GtkTargetEntry targets[] = { { "UTF8_STRING", 0, 0 }, { "STRING", 0, 0 }, { "TEXT", 0, 0 }, { "COMPOUND_TEXT", 0, 0 } }; GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); gint start, end; if (gtk_editable_get_selection_bounds(GTK_EDITABLE(entry), &start, &end)) { if (!gtk_clipboard_set_with_owner(clipboard, targets, G_N_ELEMENTS(targets), _item_entry_primary_get_cb, _item_entry_primary_clear_cb, G_OBJECT(entry))) _item_entry_primary_clear_cb(clipboard, entry); } else { if (gtk_clipboard_get_owner(clipboard) == G_OBJECT(entry)) gtk_clipboard_clear(clipboard); } } /* Public API */ GtkWidget * gtk_item_entry_new(void) { return gtk_widget_new(G_TYPE_ITEM_ENTRY, NULL); } /** * gtk_item_entry_new_with_max_length: * @max: the maximum character length of the entry, or 0 for no * maximum. (other than the maximum length of entries.) The * value passed in will be clamped to the range 0-65536. * * Creates a new #GtkItemEntry with the maximum allowed number * of characters in the contents of the widget. If the current * contents are longer than the given length, then they will be * truncated to fit. * * Returns: the newly-created #GtkItemEntry widget. */ GtkWidget * gtk_item_entry_new_with_max_length(gint max) { GtkItemEntry *entry; entry = g_object_new(G_TYPE_ITEM_ENTRY, NULL); gtk_entry_set_max_length(GTK_ENTRY(entry), max); return GTK_WIDGET(entry); } /** * gtk_item_entry_set_text: * @entry: a #GtkItemEntry * @text: the new text * @justification: a #GtkJustification : GTK_JUSTIFY_LEFT,GTK_JUSTIFY_RIGHT,GTK_JUSTIFY_CENTER,GTK_JUSTIFY_FILL * * Sets the text in the widget to the given value, replacing the current contents. */ void gtk_item_entry_set_text(GtkItemEntry *entry, const gchar *text, GtkJustification justification) { g_return_if_fail(GTK_IS_ITEM_ENTRY(entry)); g_return_if_fail(text != NULL); entry->justification = justification; /* Actually setting the text will affect the cursor and selection; * if the contents don't actually change, this will look odd to the user. */ if (GTK_ENTRY(entry)->text && strcmp(GTK_ENTRY(entry)->text, text) == 0) { return; } if (GTK_ENTRY(entry)->recompute_idle) { g_source_remove(GTK_ENTRY(entry)->recompute_idle); GTK_ENTRY(entry)->recompute_idle = 0; } if (GTK_ENTRY(entry)->blink_timeout) { g_source_remove(GTK_ENTRY(entry)->blink_timeout); GTK_ENTRY(entry)->blink_timeout = 0; } gtk_editable_delete_text(GTK_EDITABLE(entry), 0, -1); entry->item_n_bytes = 0; // rraptor edited if (text[0]) { gint tmp_pos = 0; gtk_editable_insert_text(GTK_EDITABLE(entry), text, -1, &tmp_pos); } } /** * gtk_item_entry_get_layout_offsets: * @entry: a #GtkEntry * @x: location to store X offset of layout, or %NULL * @y: location to store Y offset of layout, or %NULL * * * Obtains the position of the #PangoLayout used to render text * in the entry, in widget coordinates. Useful if you want to line * up the text in an entry with some other text, e.g. when using the * entry to implement editable cells in a sheet widget. * * Also useful to convert mouse events into coordinates inside the * #PangoLayout, e.g. to take some action if some part of the entry text * is clicked. * * Note that as the user scrolls around in the entry the offsets will * change; you'll need to connect to the "notify::scroll_offset" * signal to track this. Remember when using the #PangoLayout * functions you need to convert to and from pixels using * PANGO_PIXELS() or #PANGO_SCALE. * * Keep in mind that the layout text may contain a preedit string, so * gtk_entry_layout_index_to_text_index() and * gtk_entry_text_index_to_layout_index() are needed to convert byte * indices in the layout to byte indices in the entry contents. * */ void gtk_item_entry_get_layout_offsets(GtkItemEntry *entry, gint *x, gint *y) { gint text_area_x, text_area_y; g_return_if_fail(GTK_IS_ITEM_ENTRY(entry)); /* this gets coords relative to text area */ _item_entry_get_layout_position(GTK_ENTRY(entry), x, y); /* convert to widget coords */ _item_entry_get_text_area_size(GTK_ENTRY(entry), &text_area_x, &text_area_y, NULL, NULL); if (x) *x += text_area_x; if (y) *y += text_area_y; } /** * gtk_item_entry_get_max_length_bytes: * @item_entry: a #GtkItemEntry * * Retrieves the maximum byte length for the contents of * #GtkItemEntry. * * Returns: maximum byte length or 0. * * Since: 3.0.6 **/ gint gtk_item_entry_get_max_length_bytes(GtkItemEntry *item_entry) { g_return_val_if_fail(GTK_IS_ITEM_ENTRY(item_entry), 0); return item_entry->max_length_bytes; } /** * gtk_item_entry_set_max_length_bytes: * @item_entry: a #GtkItemEntry * @max_length_bytes: maximum byte length or 0 * * Sets the maximum byte length for the contents of the * #GtkItemEntry. Existing content will not be truncted. * * Since: 3.0.6 */ void gtk_item_entry_set_max_length_bytes(GtkItemEntry *item_entry, gint max_length_bytes) { g_return_if_fail(item_entry != NULL); g_return_if_fail(GTK_IS_ITEM_ENTRY(item_entry)); if (max_length_bytes < 0) max_length_bytes = 0; if (max_length_bytes > GTK_ENTRY_BUFFER_MAX_SIZE) max_length_bytes = GTK_ENTRY_BUFFER_MAX_SIZE; item_entry->max_length_bytes = max_length_bytes; } /** * gtk_item_entry_set_justification: * @entry: a #GtkItemEntry * @just: a #GtkJustification : GTK_JUSTIFY_LEFT,GTK_JUSTIFY_RIGHT,GTK_JUSTIFY_CENTER,GTK_JUSTIFY_FILL * * Sets justification of the widget to the given value, replacing the current one. */ void gtk_item_entry_set_justification(GtkItemEntry *entry, GtkJustification just) { g_return_if_fail(GTK_IS_ITEM_ENTRY(entry)); entry->justification = just; } /* We display the cursor when * * - the selection is empty, AND * - the widget has focus */ #define CURSOR_ON_MULTIPLIER 0.66 #define CURSOR_OFF_MULTIPLIER 0.34 #define CURSOR_PEND_MULTIPLIER 1.0 static gboolean _item_entry_cursor_blinks(GtkEntry *entry) { GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(entry)); gboolean blink; if (gtk_widget_has_focus(GTK_WIDGET(entry)) && entry->selection_bound == entry->current_pos) { g_object_get(G_OBJECT(settings), "gtk-cursor-blink", &blink, NULL); return blink; } else return FALSE; } static gint _item_entry_get_cursor_time(GtkEntry *entry) { GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(entry)); gint time; g_object_get(G_OBJECT(settings), "gtk-cursor-blink-time", &time, NULL); return time; } static void _item_entry_show_cursor(GtkEntry *entry) { if (!entry->cursor_visible) { entry->cursor_visible = TRUE; if (gtk_widget_has_focus(GTK_WIDGET(entry)) && entry->selection_bound == entry->current_pos) gtk_widget_queue_draw(GTK_WIDGET(entry)); } } static void _item_entry_hide_cursor(GtkEntry *entry) { if (entry->cursor_visible) { entry->cursor_visible = FALSE; if (gtk_widget_has_focus(GTK_WIDGET(entry)) && entry->selection_bound == entry->current_pos) gtk_widget_queue_draw(GTK_WIDGET(entry)); } } /* * Blink! */ static gint _item_entry_blink_cb(gpointer data) { GtkEntry *entry; GDK_THREADS_ENTER(); entry = GTK_ENTRY(data); g_assert(gtk_widget_has_focus(GTK_WIDGET(entry))); g_assert(entry->selection_bound == entry->current_pos); if (entry->cursor_visible) { _item_entry_hide_cursor(entry); entry->blink_timeout = g_timeout_add_full( 0, _item_entry_get_cursor_time(entry) * CURSOR_OFF_MULTIPLIER, _item_entry_blink_cb, entry, NULL); } else { _item_entry_show_cursor(entry); entry->blink_timeout = g_timeout_add_full( 0, _item_entry_get_cursor_time(entry) * CURSOR_ON_MULTIPLIER, _item_entry_blink_cb, entry, NULL); } GDK_THREADS_LEAVE(); /* Remove ourselves */ return FALSE; } static void gtk_item_entry_check_cursor_blink(GtkEntry *entry) { if (_item_entry_cursor_blinks(entry)) { if (!entry->blink_timeout) { entry->blink_timeout = g_timeout_add_full( 0, _item_entry_get_cursor_time(entry) * CURSOR_ON_MULTIPLIER, _item_entry_blink_cb, entry, NULL); _item_entry_show_cursor(entry); } } else { if (entry->blink_timeout) { g_source_remove(entry->blink_timeout); entry->blink_timeout = 0; } entry->cursor_visible = TRUE; } } static void gtk_item_entry_pend_cursor_blink(GtkEntry *entry) { if (_item_entry_cursor_blinks(entry)) { if (entry->blink_timeout != 0) g_source_remove(entry->blink_timeout); entry->blink_timeout = g_timeout_add_full( 0, _item_entry_get_cursor_time(entry) * CURSOR_PEND_MULTIPLIER, _item_entry_blink_cb, entry, NULL); _item_entry_show_cursor(entry); } } /** * gtk_item_set_cursor_visible: * @entry: a #GtkItemEntry * @visible: TRUE for visible or FALSE for invisible * * Sets the cursor visibility in the widget. */ void gtk_item_entry_set_cursor_visible(GtkItemEntry *entry, gboolean visible) { g_return_if_fail(GTK_IS_ITEM_ENTRY(entry)); GTK_ENTRY(entry)->cursor_visible = visible; } /** * gtk_item_get_cursor_visible: * @entry: a #GtkItemEntry * * Gets the cursor visibility in the widget. * * Returns: TRUEfor visible or FALSE for invisible */ gboolean gtk_item_entry_get_cursor_visible(GtkItemEntry *entry) { g_return_val_if_fail(GTK_IS_ITEM_ENTRY(entry), FALSE); return (GTK_ENTRY(entry)->cursor_visible); } gtkextra-3.2.0/gtkextra/gtkplotcanvas.c0000644000076400001440000022421312604171206015146 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include "gtkextra-compat.h" #include "gtkplotcairo.h" #include "gtkplotcanvas.h" #include "gtkplotgdk.h" #include "gtkplotps.h" #include "gtkextra-marshal.h" /** * SECTION: gtkplotcanvas * @short_description: * * FIXME:: need long description. */ #define P_(string) string #define DEFAULT_WIDTH 100 #define DEFAULT_HEIGHT 150 #define DEFAULT_MARKER_SIZE 6 #define SHADOW_WIDTH 3 #define GRAPH_MASK (GDK_EXPOSURE_MASK | \ GDK_POINTER_MOTION_MASK | \ GDK_POINTER_MOTION_HINT_MASK | \ GDK_BUTTON_PRESS_MASK | \ GDK_BUTTON_RELEASE_MASK) #if !GTK_CHECK_VERSION(2,22,0) static GdkCursorType gdk_cursor_get_cursor_type (GdkCursor *cursor) { g_return_val_if_fail (cursor != NULL, GDK_BLANK_CURSOR); return cursor->type; } #endif enum { ARG_CANVAS_0, ARG_CANVAS_FLAGS, ARG_CANVAS_WIDTH, ARG_CANVAS_HEIGHT, ARG_CANVAS_MAGNIFICATION, ARG_CANVAS_SHOW_GRID, ARG_CANVAS_GRID_STEP, ARG_CANVAS_LINE_GRID, ARG_CANVAS_COLOR_BG, ARG_CANVAS_TRANSPARENT, }; enum { ARG_CHILD_0, ARG_CHILD_RX1, ARG_CHILD_RY1, ARG_CHILD_RX2, ARG_CHILD_RY2, ARG_CHILD_ALLOCATION, ARG_CHILD_MIN_WIDTH, ARG_CHILD_MIN_HEIGHT, ARG_CHILD_STATE, ARG_CHILD_FLAGS, ARG_CHILD_SELECTION, ARG_CHILD_SELECTION_MODE, }; static void gtk_plot_canvas_class_init (GtkPlotCanvasClass *klass); static void gtk_plot_canvas_init (GtkPlotCanvas *plot_canvas); static void gtk_plot_canvas_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_child_class_init (GtkPlotCanvasChildClass *klass); static void gtk_plot_canvas_child_init (GtkPlotCanvasChild *child); static void gtk_plot_canvas_child_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_child_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_canvas_destroy (GtkObject *object); static void gtk_plot_canvas_map (GtkWidget *widget); static void gtk_plot_canvas_size_request (GtkWidget *widget, GtkRequisition *requisition); static gint gtk_plot_canvas_motion (GtkWidget *widget, GdkEventMotion *event); static gint gtk_plot_canvas_button_press (GtkWidget *widget, GdkEventButton *event); static gint gtk_plot_canvas_key_press (GtkWidget *widget, GdkEventKey *event); static gint gtk_plot_canvas_button_release (GtkWidget *widget, GdkEventButton *event); static gint gtk_plot_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event); static gint gtk_plot_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event); static void gtk_plot_canvas_child_size_allocate (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static GtkPlotCanvasPos gtk_plot_canvas_child_button_press (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gint x, gint y); static void gtk_plot_canvas_child_button_release(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); /* Drawing functions */ static gint gtk_plot_canvas_expose (GtkWidget *widget, GdkEventExpose *event); static void gtk_plot_canvas_create_pixmap (GtkWidget *widget, gint width, gint height); static void gtk_plot_canvas_child_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); static void gtk_plot_canvas_child_draw_selection(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area); static void draw_selection (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area); static void draw_marker (GtkPlotCanvas *canvas, GdkGC *gc, gint x, gint y); static void gtk_plot_canvas_draw_grid (GtkPlotCanvas *canvas); static void gtk_plot_canvas_child_draw (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); /* Auxiliary functions */ GtkPlotCanvasPos possible_selection (GtkAllocation area, gint x, gint y); extern gint roundint (gdouble x); /* Signals */ extern void _gtkextra_signal_emit(GtkObject *object, guint signal_id, ...); enum { SELECT_ITEM, MOVE_ITEM, RESIZE_ITEM, DELETE_ITEM, ADD_ITEM, SELECT_REGION, CHANGED, LAST_SIGNAL }; typedef gboolean (*GtkPlotCanvasSignal1) (GtkObject *object, gpointer arg1, gdouble arg2, gdouble arg3, gpointer user_data); typedef gboolean (*GtkPlotCanvasSignal2) (GtkObject *object, gpointer arg1, gpointer arg2, gpointer user_data); typedef gboolean (*GtkPlotCanvasSignal3) (GtkObject *object, gdouble arg1, gdouble arg2, gdouble arg3, gdouble arg4, gpointer user_data); static GtkFixedClass *parent_class = NULL; static guint canvas_signals[LAST_SIGNAL] = {0}; GType gtk_plot_canvas_get_type (void) { static GType plot_canvas_type = 0; if (!plot_canvas_type) { plot_canvas_type = g_type_register_static_simple ( gtk_fixed_get_type(), "GtkPlotCanvas", sizeof (GtkPlotCanvasClass), (GClassInitFunc) gtk_plot_canvas_class_init, sizeof (GtkPlotCanvas), (GInstanceInitFunc) gtk_plot_canvas_init, 0); } return plot_canvas_type; } GType gtk_plot_canvas_child_get_type (void) { static GType plot_canvas_child_type = 0; if (!plot_canvas_child_type) { plot_canvas_child_type = g_type_register_static_simple ( gtk_object_get_type(), "GtkPlotCanvasChild", sizeof(GtkPlotCanvasChildClass), (GClassInitFunc) gtk_plot_canvas_child_class_init, sizeof(GtkPlotCanvasChild), (GInstanceInitFunc) gtk_plot_canvas_child_init, 0); } return plot_canvas_child_type; } static void gtk_plot_canvas_child_class_init (GtkPlotCanvasChildClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); klass->size_allocate = gtk_plot_canvas_child_size_allocate; klass->draw = NULL; klass->unselect = NULL; klass->move = NULL; klass->move_resize = NULL; klass->draw_selection = draw_selection; klass->button_press = gtk_plot_canvas_child_button_press; klass->button_release = gtk_plot_canvas_child_button_release; klass->set_magnification = NULL; gobject_class->get_property = gtk_plot_canvas_child_get_property; gobject_class->set_property = gtk_plot_canvas_child_set_property; /** * GtkPlotCanvasChild:rx1: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_RX1, g_param_spec_double ("rx1", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:ry1: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_RY1, g_param_spec_double ("ry1", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:rx2: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_RX2, g_param_spec_double ("rx2", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:ry2: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_RY2, g_param_spec_double ("ry2", P_(""), P_(""), -G_MAXDOUBLE,G_MAXDOUBLE,0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:allocation: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_ALLOCATION, g_param_spec_pointer ("allocation", P_(""), P_(""), G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:min_width: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_MIN_WIDTH, g_param_spec_int ("min_width", P_(""), P_(""), -1,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:min_height: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_MIN_HEIGHT, g_param_spec_int ("min_height", P_(""), P_(""), -1,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:state: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_STATE, g_param_spec_int ("state", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:flags: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_FLAGS, g_param_spec_int ("flags", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:selection: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_SELECTION, g_param_spec_int ("selection", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotCanvasChild:selection_mode: * * **/ g_object_class_install_property (gobject_class, ARG_CHILD_SELECTION_MODE, g_param_spec_int ("selection_mode", P_(""), P_(""), 0,G_MAXINT,0, G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_canvas_child_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCanvasChild *child = GTK_PLOT_CANVAS_CHILD(object); switch(prop_id){ case ARG_CHILD_RX1: g_value_set_double(value, child->rx1); break; case ARG_CHILD_RY1: g_value_set_double(value, child->ry1); break; case ARG_CHILD_RX2: g_value_set_double(value, child->rx2); break; case ARG_CHILD_RY2: g_value_set_double(value, child->ry2); break; case ARG_CHILD_ALLOCATION: g_value_set_pointer(value, &child->allocation); break; case ARG_CHILD_MIN_WIDTH: g_value_set_int(value, child->min_width); break; case ARG_CHILD_MIN_HEIGHT: g_value_set_int(value, child->min_height); break; case ARG_CHILD_STATE: g_value_set_int(value, child->state); break; case ARG_CHILD_FLAGS: g_value_set_int(value, child->flags); break; case ARG_CHILD_SELECTION: g_value_set_int(value, child->selection); break; case ARG_CHILD_SELECTION_MODE: g_value_set_int(value, child->mode); break; } } static void gtk_plot_canvas_child_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCanvasChild *child = GTK_PLOT_CANVAS_CHILD(object); switch(prop_id){ case ARG_CHILD_RX1: child->rx1 = g_value_get_double(value); break; case ARG_CHILD_RY1: child->ry1 = g_value_get_double(value); break; case ARG_CHILD_RX2: child->rx2 = g_value_get_double(value); break; case ARG_CHILD_RY2: child->ry2 = g_value_get_double(value); break; case ARG_CHILD_ALLOCATION: child->allocation = *((GtkAllocation *)g_value_get_pointer(value)); break; case ARG_CHILD_MIN_WIDTH: child->min_width = g_value_get_int(value); break; case ARG_CHILD_MIN_HEIGHT: child->min_height = g_value_get_int(value); break; case ARG_CHILD_STATE: child->state = g_value_get_int(value); break; case ARG_CHILD_FLAGS: child->flags = g_value_get_int(value); break; case ARG_CHILD_SELECTION: child->selection = g_value_get_int(value); break; case ARG_CHILD_SELECTION_MODE: child->mode = g_value_get_int(value); break; } } static void gtk_plot_canvas_child_init(GtkPlotCanvasChild *child) { child->flags = GTK_PLOT_CANVAS_CHILD_CAN_MOVE | GTK_PLOT_CANVAS_CHILD_CAN_RESIZE; child->min_width = -1; child->min_height = -1; child->selection = GTK_PLOT_CANVAS_SELECT_MARKERS; child->mode = GTK_PLOT_CANVAS_SELECT_CLICK_2; child->parent = NULL; } static void gtk_plot_canvas_class_init (GtkPlotCanvasClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkContainerClass *container_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_fixed_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; container_class = (GtkContainerClass *) klass; /** * GtkPlotCanvas::select_item: * @canvas: * @event: * @item: * * * * Return value: */ canvas_signals[SELECT_ITEM] = g_signal_new ("select_item", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotCanvasClass, select_item), NULL, NULL, gtkextra_BOOLEAN__BOXED_BOXED, G_TYPE_BOOLEAN, 2, GDK_TYPE_EVENT, G_TYPE_PLOT_CANVAS_CHILD); /** * GtkPlotCanvas::move_item: * @canvas: * @item: * @new_x: * @new_y * * * * Return value: */ canvas_signals[MOVE_ITEM] = g_signal_new ("move_item", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotCanvasClass, move_item), NULL, NULL, gtkextra_BOOLEAN__BOXED_DOUBLE_DOUBLE, G_TYPE_BOOLEAN, 3, G_TYPE_PLOT_CANVAS_CHILD, G_TYPE_DOUBLE, G_TYPE_DOUBLE); /** * GtkPlotCanvas::resize_item: * @canvas: * @item: * @new_width: * @new_height: * * * * Return value: */ canvas_signals[RESIZE_ITEM] = g_signal_new ("resize_item", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotCanvasClass, resize_item), NULL, NULL, gtkextra_BOOLEAN__BOXED_DOUBLE_DOUBLE, G_TYPE_BOOLEAN, 3, G_TYPE_PLOT_CANVAS_CHILD, G_TYPE_DOUBLE, G_TYPE_DOUBLE); /** * GtkPlotCanvas::add_item: * @canvas: * @item: * * */ canvas_signals[ADD_ITEM] = g_signal_new ("add_item", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotCanvasClass, add_item), NULL, NULL, gtkextra_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_PLOT_CANVAS_CHILD); /** * GtkPlotCanvas::delete_item: * @canvas: * @item: * * * * Return value: */ canvas_signals[DELETE_ITEM] = g_signal_new ("delete_item", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotCanvasClass, delete_item), NULL, NULL, gtkextra_BOOL__POINTER, G_TYPE_BOOLEAN, 1, G_TYPE_PLOT_CANVAS_CHILD); /** * GtkPlotCanvas::select_region: * @canvas: * @xmin: * @ymin: * @xmax: * @ymax: * * */ canvas_signals[SELECT_REGION] = g_signal_new ("select_region", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotCanvasClass, select_region), NULL, NULL, gtkextra_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE, G_TYPE_NONE, 4, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_DOUBLE); /** * GtkPlotCanvas::changed: * @canvas: * * */ canvas_signals[CHANGED] = g_signal_new("changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkPlotCanvasClass, changed), NULL, NULL, gtkextra_VOID__VOID, G_TYPE_NONE, 0); object_class->destroy = gtk_plot_canvas_destroy; gobject_class->get_property = gtk_plot_canvas_get_property; gobject_class->set_property = gtk_plot_canvas_set_property; widget_class->map = gtk_plot_canvas_map; widget_class->expose_event = gtk_plot_canvas_expose; widget_class->size_request = gtk_plot_canvas_size_request; widget_class->focus_in_event = gtk_plot_canvas_focus_in; widget_class->focus_out_event = gtk_plot_canvas_focus_out; widget_class->motion_notify_event = gtk_plot_canvas_motion; widget_class->button_press_event = gtk_plot_canvas_button_press; widget_class->button_release_event = gtk_plot_canvas_button_release; widget_class->key_press_event = gtk_plot_canvas_key_press; klass->move_item = NULL; klass->resize_item = NULL; klass->select_item = NULL; klass->delete_item = NULL; klass->select_region = NULL; GParamSpec *pspec; /** * GtkPlotCanvas:flags: * * PlotCanvas flags control selection and DND, * see #GtkPlotCanvasFlags. **/ pspec = g_param_spec_int ("flags", P_("Flags"), P_("Canvas flags"), 0,G_MAXINT,0, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_FLAGS, pspec); /** * GtkPlotCanvas:magnification: * * PlotCanvas magnification factor **/ pspec = g_param_spec_double ("magnification", P_("Magnification"), P_("Canvas magnification"), 0,G_MAXDOUBLE,1.0, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_MAGNIFICATION, pspec ); /** * GtkPlotCanvas:width: * * PlotCanvas width in pixels. **/ pspec = g_param_spec_int ("width", P_("Width"), P_("Canvas width"), 0,G_MAXINT,1, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_WIDTH, pspec); /** * GtkPlotCanvas:height: * * PlotCanvas height in pixels. **/ pspec = g_param_spec_int ("height", P_("Height"), P_("Canvas height"), 0,G_MAXINT,1, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_HEIGHT, pspec); /** * GtkPlotCanvas:show_grid: * * Show grid lines. **/ pspec = g_param_spec_boolean ("show_grid", P_("Show grid"), P_("Show grid"), FALSE, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_SHOW_GRID, pspec); /** * GtkPlotCanvas:grid_step: * * Distance between grid lines. **/ pspec = g_param_spec_double ("grid_step", P_("Grid step"), P_("Distance between grid lines"), 0,G_MAXDOUBLE,0.0, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_GRID_STEP, pspec); /** * GtkPlotCanvas:line_grid: * * Line grid pattern. **/ pspec = g_param_spec_pointer ("line_grid", P_("Line Grid"), P_("Canvas line grid"), G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_LINE_GRID, pspec); /** * GtkPlotCanvas:color_bg: * * Background color. **/ pspec = g_param_spec_pointer ("color_bg", P_("Background"), P_("Background color"), G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_COLOR_BG, pspec); /** * GtkPlotCanvas:transparent: * * Canvas transparency **/ pspec = g_param_spec_boolean ("transparent", P_("Transparent"), P_("Canvas transparency"), TRUE, G_PARAM_READWRITE); g_object_class_install_property (gobject_class, ARG_CANVAS_TRANSPARENT, pspec); } static void gtk_plot_canvas_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotCanvas *canvas = GTK_PLOT_CANVAS(object); switch(prop_id){ case ARG_CANVAS_FLAGS: g_value_set_int(value, canvas->flags); break; case ARG_CANVAS_WIDTH: g_value_set_int(value, canvas->width); break; case ARG_CANVAS_HEIGHT: g_value_set_int(value, canvas->height); break; case ARG_CANVAS_MAGNIFICATION: g_value_set_double(value, canvas->magnification); break; case ARG_CANVAS_SHOW_GRID: g_value_set_boolean(value, canvas->show_grid); break; case ARG_CANVAS_GRID_STEP: g_value_set_double(value, canvas->grid_step); break; case ARG_CANVAS_LINE_GRID: g_value_set_pointer(value, &canvas->grid); break; case ARG_CANVAS_COLOR_BG: g_value_set_pointer(value, &canvas->background); break; case ARG_CANVAS_TRANSPARENT: g_value_set_boolean(value, canvas->transparent); break; } } static void gtk_plot_canvas_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotCanvas *canvas; canvas = GTK_PLOT_CANVAS (object); switch(prop_id){ case ARG_CANVAS_FLAGS: canvas->flags = g_value_get_int(value); break; case ARG_CANVAS_WIDTH: canvas->width = g_value_get_int(value); break; case ARG_CANVAS_HEIGHT: canvas->height = g_value_get_int(value); break; case ARG_CANVAS_MAGNIFICATION: canvas->magnification = g_value_get_double(value); break; case ARG_CANVAS_SHOW_GRID: canvas->show_grid = g_value_get_boolean(value); break; case ARG_CANVAS_GRID_STEP: canvas->grid_step = g_value_get_double(value); break; case ARG_CANVAS_LINE_GRID: canvas->grid = *((GtkPlotLine *)g_value_get_pointer(value)); break; case ARG_CANVAS_COLOR_BG: canvas->background = *((GdkColor *)g_value_get_pointer(value)); break; case ARG_CANVAS_TRANSPARENT: canvas->transparent = g_value_get_boolean(value); break; } } static void gtk_plot_canvas_init (GtkPlotCanvas *plot_canvas) { GtkWidget *widget; GdkColor color; widget = GTK_WIDGET(plot_canvas); gtk_widget_set_can_focus(GTK_WIDGET(widget), TRUE); gdk_color_black(gtk_widget_get_colormap(widget), >k_widget_get_style(widget)->black); gdk_color_white(gtk_widget_get_colormap(widget), >k_widget_get_style(widget)->white); gtk_widget_set_events (widget, gtk_widget_get_events(widget)| GRAPH_MASK); plot_canvas->freeze_count = 0; plot_canvas->cursor = gdk_cursor_new(GDK_TOP_LEFT_ARROW); plot_canvas->background = gtk_widget_get_style(widget)->white; plot_canvas->transparent = TRUE; plot_canvas->flags = 0; plot_canvas->state = GTK_STATE_NORMAL; plot_canvas->action = GTK_PLOT_CANVAS_ACTION_INACTIVE; plot_canvas->magnification = 1.; plot_canvas->show_grid = FALSE; plot_canvas->grid_step = 20.; plot_canvas->grid.line_style = GTK_PLOT_LINE_SOLID; plot_canvas->grid.line_width = 0; gdk_color_parse("grey90", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); plot_canvas->grid.color = color; plot_canvas->drag_x = plot_canvas->drag_y = 0; plot_canvas->pointer_x = plot_canvas->pointer_y = 0; plot_canvas->childs = NULL; plot_canvas->width = DEFAULT_WIDTH; plot_canvas->height = DEFAULT_HEIGHT; plot_canvas->pixmap_width = DEFAULT_WIDTH; plot_canvas->pixmap_height = DEFAULT_HEIGHT; gtk_psfont_init(); plot_canvas->pc = NULL; gtk_plot_canvas_set_pc(plot_canvas, NULL); plot_canvas->pixmap = NULL; } GtkPlotCanvasFlags gtk_plot_canvas_flags(GtkPlotCanvas *canvas) { g_return_val_if_fail(canvas != NULL, 0); return(canvas->flags); } void gtk_plot_canvas_set_flags(GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags) { g_return_if_fail(canvas != NULL); canvas->flags |= flags; } void gtk_plot_canvas_unset_flags(GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags) { g_return_if_fail(canvas != NULL); canvas->flags &= ~flags; } void gtk_plot_canvas_set_pc(GtkPlotCanvas *canvas, GtkPlotPC *pc) { if(canvas->pc) g_object_unref(GTK_OBJECT(canvas->pc)); if(!pc){ canvas->pc = (GtkPlotPC *)gtk_plot_cairo_new(NULL); g_object_ref(GTK_OBJECT(canvas->pc)); gtk_object_sink(GTK_OBJECT(canvas->pc)); } else { canvas->pc = pc; g_object_ref(GTK_OBJECT(pc)); gtk_object_sink(GTK_OBJECT(pc)); } if(canvas->pc && GTK_IS_PLOT_GDK(canvas->pc)){ GTK_PLOT_GDK(canvas->pc)->drawable = canvas->pixmap; } gtk_plot_pc_set_viewport(canvas->pc, canvas->pixmap_width, canvas->pixmap_height); } /** * gtk_plot_canvas_new: * @width: * @height: * @magnification: * * * * Return value: */ GtkWidget* gtk_plot_canvas_new (gint width, gint height, gdouble magnification) { GtkPlotCanvas *plot_canvas; plot_canvas = g_object_new (gtk_plot_canvas_get_type (), NULL); gtk_plot_canvas_construct(GTK_PLOT_CANVAS(plot_canvas), width, height, magnification); return GTK_WIDGET (plot_canvas); } /** * gtk_plot_canvas_construct: * @canvas: a #GtkPlotCanvas. * @width: * @height: * @magnification: * * */ void gtk_plot_canvas_construct(GtkPlotCanvas *canvas, gint width, gint height, gdouble magnification) { gdouble m = magnification; canvas->width = width; canvas->height = height; canvas->pixmap_width = roundint(width * m); canvas->pixmap_height = roundint(height * m); gtk_plot_canvas_set_magnification(canvas, m); gtk_fixed_set_has_window (GTK_FIXED(canvas), TRUE); } /** * gtk_plot_canvas_freeze: * @canvas: a #GtkPlotCanvas. * * */ void gtk_plot_canvas_freeze(GtkPlotCanvas *canvas) { canvas->freeze_count++; } /** * gtk_plot_canvas_thaw: * @canvas: a #GtkPlotCanvas. * * */ void gtk_plot_canvas_thaw(GtkPlotCanvas *canvas) { if(canvas->freeze_count == 0) return; canvas->freeze_count--; } static void gtk_plot_canvas_destroy (GtkObject *object) { GtkPlotCanvas *plot_canvas; GList *list; gboolean veto = TRUE; g_return_if_fail (object != NULL); g_return_if_fail (GTK_IS_PLOT_CANVAS (object)); plot_canvas = GTK_PLOT_CANVAS (object); list = plot_canvas->childs; while(list){ g_signal_emit(GTK_OBJECT(plot_canvas), canvas_signals[DELETE_ITEM], 0, GTK_PLOT_CANVAS_CHILD(list->data), &veto); g_object_unref(GTK_OBJECT(list->data)); plot_canvas->childs = g_list_remove_link(plot_canvas->childs, list); g_list_free_1(list); list = plot_canvas->childs; } plot_canvas->childs = NULL; if( plot_canvas->cursor ){ gdk_cursor_destroy(plot_canvas->cursor); plot_canvas->cursor = NULL; } if( plot_canvas->pc ){ g_object_unref(GTK_OBJECT(plot_canvas->pc)); plot_canvas->pc = NULL; } /* Added by Jacek Sieka jsieka at memphite.se , from Memphite AB */ if( plot_canvas->pixmap ){ gdk_pixmap_unref(plot_canvas->pixmap); plot_canvas->pixmap = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); gtk_psfont_unref(); } /** * gtk_plot_canvas_remove_child: * @canvas: a #GtkPlotCanvas. * @child: a #GtkPlotCanvasChild * * */ void gtk_plot_canvas_remove_child(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { GList *list; gtk_plot_canvas_cancel_action(canvas); list = canvas->childs; while(list){ if(list->data == child){ gboolean veto = TRUE; _gtkextra_signal_emit(GTK_OBJECT(canvas), canvas_signals[DELETE_ITEM], child, &veto); if(veto){ child->parent = NULL; g_object_unref(GTK_OBJECT(child)); canvas->childs = g_list_remove_link(canvas->childs, list); g_list_free_1(list); } break; } list = list->next; } } /* static void gtk_plot_canvas_draw (GtkWidget *widget, GdkRectangle *area) { GtkPlotCanvas *canvas; canvas = GTK_PLOT_CANVAS(widget); if(!gtk_widget_get_realized(widget)) return; if(!canvas->pixmap) return; GTK_WIDGET_CLASS(parent_class)->draw(widget, area); gtk_plot_canvas_paint(canvas); gtk_plot_canvas_refresh(canvas); } */ /** * gtk_plot_canvas_paint: * @canvas: a #GtkPlotCanvas. * * */ void gtk_plot_canvas_paint (GtkPlotCanvas *canvas) { GtkWidget *widget; GList *childs; widget = GTK_WIDGET(canvas); if(gtk_widget_get_realized(widget) && !canvas->pixmap) return; if(canvas->freeze_count > 0) return; if(!gtk_plot_pc_init(canvas->pc)) return; gtk_plot_pc_gsave(canvas->pc); if(!GTK_IS_PLOT_PS(canvas->pc) || !canvas->transparent){ if(canvas->transparent){ GdkColor white; gdk_color_white(gtk_widget_get_colormap(GTK_WIDGET(canvas)), &white); gtk_plot_pc_set_color(canvas->pc, &white); } else gtk_plot_pc_set_color(canvas->pc, &canvas->background); gtk_plot_pc_draw_rectangle(canvas->pc, TRUE, 0,0,canvas->pixmap_width, canvas->pixmap_height); } gtk_plot_canvas_draw_grid(canvas); childs = canvas->childs; while(childs) { GtkPlotCanvasChild *child; child = GTK_PLOT_CANVAS_CHILD(childs->data); gtk_plot_canvas_child_draw(canvas, child); childs = childs->next; } gtk_plot_pc_grestore(canvas->pc); gtk_plot_pc_leave(canvas->pc); } /** * gtk_plot_canvas_refresh: * @canvas: a #GtkPlotCanvas. * * */ void gtk_plot_canvas_refresh(GtkPlotCanvas *canvas) { GList *children = NULL; GtkFixed *fixed = GTK_FIXED(canvas); if(!gtk_widget_get_realized(GTK_WIDGET(canvas))) return; if(!canvas->pixmap) return; if(canvas->freeze_count > 0) return; gdk_draw_drawable(gtk_widget_get_window(GTK_WIDGET(canvas)), gtk_widget_get_style(GTK_WIDGET(canvas))->fg_gc[GTK_STATE_NORMAL], canvas->pixmap, 0, 0, 0, 0, -1, -1); children = fixed->children; while (children) { GtkFixedChild *child; child = children->data; gtk_widget_queue_draw(child->widget); children = children->next; } } static void gtk_plot_canvas_draw_grid(GtkPlotCanvas *canvas) { gdouble x, y; if(!canvas->pixmap) return; if(!canvas->show_grid) return; if(!canvas->pc) return; gtk_plot_canvas_set_line_attributes(canvas, canvas->grid); for(x = 0; x < canvas->pixmap_width; x += canvas->grid_step) gtk_plot_pc_draw_line(canvas->pc, roundint(x), 0, roundint(x), canvas->pixmap_height); for(y = 0; y < canvas->pixmap_height; y += canvas->grid_step) gtk_plot_pc_draw_line(canvas->pc, 0, roundint(y), canvas->pixmap_width, roundint(y)); } static void gtk_plot_canvas_map(GtkWidget *widget) { GtkPlotCanvas *plot_canvas; plot_canvas=GTK_PLOT_CANVAS(widget); GTK_WIDGET_CLASS(parent_class)->map(widget); if(!plot_canvas->pixmap){ gtk_plot_canvas_create_pixmap(widget, plot_canvas->pixmap_width, plot_canvas->pixmap_height); if (GTK_IS_PLOT_CAIRO(plot_canvas->pc)) { gtk_plot_canvas_set_pc(plot_canvas, GTK_PLOT_PC(gtk_plot_cairo_new_with_drawable(plot_canvas->pixmap))); } } gtk_plot_canvas_paint(plot_canvas); gdk_window_set_cursor(gtk_widget_get_window(widget), plot_canvas->cursor); } static gint gtk_plot_canvas_key_press(GtkWidget *widget, GdkEventKey *key) { GtkPlotCanvas *canvas = GTK_PLOT_CANVAS(widget); switch (key->keyval) { case GDK_KEY_Escape: gtk_plot_canvas_cancel_action(canvas); break; default: break; } return TRUE; } static gint gtk_plot_canvas_motion (GtkWidget *widget, GdkEventMotion *event) { GtkPlotCanvas *canvas; GtkAllocation area; gint x, y; gint new_x = 0, new_y = 0; gint new_width = 0, new_height = 0; gint cursor = GDK_TOP_LEFT_ARROW; gint pivot_x, pivot_y; canvas = GTK_PLOT_CANVAS(widget); gtk_widget_get_pointer(widget, &x, &y); if(canvas->active_item && canvas->active_item->flags == GTK_PLOT_CANVAS_CHILD_FROZEN) return TRUE; if(canvas->active_item){ area = canvas->active_item->drag_area; new_x = area.x; new_y = area.y; new_width = area.width; new_height = area.height; } pivot_x = x; pivot_y = y; if(canvas->action == GTK_PLOT_CANVAS_ACTION_INACTIVE) cursor = GDK_TOP_LEFT_ARROW; else if(canvas->action == GTK_PLOT_CANVAS_ACTION_DRAG) cursor = GDK_FLEUR; else switch(canvas->drag_point){ case GTK_PLOT_CANVAS_TOP_LEFT: cursor = GDK_UL_ANGLE; pivot_x = area.x + area.width; pivot_y = area.y + area.height; break; case GTK_PLOT_CANVAS_TOP_RIGHT: cursor = GDK_UR_ANGLE; pivot_x = area.x; pivot_y = area.y + area.height; break; case GTK_PLOT_CANVAS_TOP: cursor = GDK_TOP_SIDE; pivot_y = area.y + area.height; break; case GTK_PLOT_CANVAS_BOTTOM_LEFT: cursor = GDK_LL_ANGLE; pivot_x = area.x + area.width; pivot_y = area.y; break; case GTK_PLOT_CANVAS_BOTTOM_RIGHT: cursor = GDK_LR_ANGLE; pivot_x = area.x; pivot_y = area.y; break; case GTK_PLOT_CANVAS_BOTTOM: cursor = GDK_BOTTOM_SIDE; pivot_y = area.y; break; case GTK_PLOT_CANVAS_LEFT: cursor = GDK_LEFT_SIDE; pivot_x = area.x + area.width; break; case GTK_PLOT_CANVAS_RIGHT: cursor = GDK_RIGHT_SIDE; pivot_x = area.x; break; default: cursor = GDK_TOP_LEFT_ARROW; } if(cursor != gdk_cursor_get_cursor_type(canvas->cursor)){ gdk_cursor_destroy(canvas->cursor); canvas->cursor = gdk_cursor_new(cursor); gdk_window_set_cursor(gtk_widget_get_window(widget), canvas->cursor); } if(canvas->action == GTK_PLOT_CANVAS_ACTION_INACTIVE) return TRUE; switch(canvas->action){ case GTK_PLOT_CANVAS_ACTION_DRAG: if(canvas->active_item && canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_MOVE){ gint dx, dy; gtk_plot_canvas_child_draw_selection(canvas, canvas->active_item, canvas->drag_area); canvas->pointer_x = x; canvas->pointer_y = y; dx = x - canvas->drag_x; dy = y - canvas->drag_y; area.x = canvas->active_item->drag_area.x + dx; area.y = canvas->active_item->drag_area.y + dy; gtk_plot_canvas_child_draw_selection(canvas, canvas->active_item, area); canvas->drag_area = area; } break; case GTK_PLOT_CANVAS_ACTION_RESIZE: switch(canvas->drag_point){ case GTK_PLOT_CANVAS_TOP_LEFT: case GTK_PLOT_CANVAS_TOP_RIGHT: if(canvas->active_item && canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE){ new_x = MIN(x, pivot_x); new_width = abs(x - pivot_x); } case GTK_PLOT_CANVAS_TOP: if(canvas->active_item && canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE){ new_y = MIN(y, pivot_y); new_height = abs(y - pivot_y); } gdk_cursor_destroy(canvas->cursor); canvas->cursor = gdk_cursor_new(cursor); gdk_window_set_cursor(gtk_widget_get_window(widget), canvas->cursor); break; case GTK_PLOT_CANVAS_BOTTOM_LEFT: case GTK_PLOT_CANVAS_BOTTOM_RIGHT: if(canvas->active_item && canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE){ new_x = MIN(x, pivot_x); new_width = abs(x - pivot_x); } case GTK_PLOT_CANVAS_BOTTOM: if(canvas->active_item && canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE){ new_y = MIN(y, pivot_y); new_height = abs(y - pivot_y); } break; case GTK_PLOT_CANVAS_LEFT: case GTK_PLOT_CANVAS_RIGHT: if(canvas->active_item && canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE){ new_x = MIN(x, pivot_x); new_width = abs(x - pivot_x); } break; case GTK_PLOT_CANVAS_IN: case GTK_PLOT_CANVAS_OUT: default: break; } if(canvas->active_item && new_width >= canvas->active_item->min_width && new_height >= canvas->active_item->min_height){ gtk_plot_canvas_child_draw_selection(canvas, canvas->active_item, canvas->drag_area); canvas->pointer_x = x; canvas->pointer_y = y; if(canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_MOVE || canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE){ area.x = new_x; area.y = new_y; } if(canvas->active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE){ area.width = new_width; area.height = new_height; } gtk_plot_canvas_child_draw_selection(canvas, canvas->active_item, area); canvas->drag_area = area; } break; case GTK_PLOT_CANVAS_ACTION_SELECTION: draw_selection(canvas, NULL, canvas->drag_area); canvas->pointer_x = x; canvas->pointer_y = y; area.x = MIN(canvas->pointer_x, canvas->drag_x); area.y = MIN(canvas->pointer_y, canvas->drag_y); area.width = abs(x - canvas->drag_x); area.height = abs(y - canvas->drag_y); canvas->drag_area = area; draw_selection(canvas, NULL, canvas->drag_area); break; case GTK_PLOT_CANVAS_ACTION_INACTIVE: default: break; } return TRUE; } static GtkPlotCanvasPos gtk_plot_canvas_child_button_press(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gint x, gint y) { GtkPlotCanvasPos pos; GtkAllocation area; area = child->allocation; if((pos = possible_selection(area, x, y)) != GTK_PLOT_CANVAS_OUT){ child->state = GTK_STATE_SELECTED; child->drag_area = area; } return pos; } static gint gtk_plot_canvas_button_press(GtkWidget *widget, GdkEventButton *event) { GtkPlotCanvas *canvas = NULL; GtkPlotCanvasChild *active_item = NULL; GList *childs = NULL; GdkModifierType mods; gint x = 0, y = 0; gboolean veto; gboolean double_click = FALSE; gdouble m; gboolean new_item = FALSE; GtkPlotCanvasPos pos = GTK_PLOT_CANVAS_OUT; gdk_window_get_pointer(gtk_widget_get_window(widget), NULL, NULL, &mods); if(!(mods & GDK_BUTTON1_MASK)) return FALSE; double_click = (event->button == GDK_2BUTTON_PRESS); canvas = GTK_PLOT_CANVAS(widget); m = canvas->magnification; /* if(double_click && canvas->state == GTK_STATE_SELECTED) return TRUE; */ /* gdk_pointer_ungrab(event->time); */ if(!gtk_widget_has_focus(widget)) gtk_widget_grab_focus(widget); gtk_widget_get_pointer(widget, &x, &y); /**********************************************************************/ if(GTK_PLOT_CANVAS_CAN_SELECT_ITEM(canvas)){ childs = g_list_last(canvas->childs); while(childs) { GtkPlotCanvasChild *child = GTK_PLOT_CANVAS_CHILD(childs->data); pos = GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->button_press(canvas, child, x, y); if(pos != GTK_PLOT_CANVAS_OUT && child->state == GTK_STATE_SELECTED){ active_item = child; break; } childs = childs->prev; } /**********************************************************************/ new_item = active_item && ((canvas->state != GTK_STATE_SELECTED || active_item != canvas->active_item)); veto = TRUE; if(active_item && active_item->state == GTK_STATE_SELECTED) _gtkextra_signal_emit(GTK_OBJECT(canvas), canvas_signals[SELECT_ITEM], event, active_item, &veto); if(new_item){ if(veto){ gtk_plot_canvas_unselect(canvas); canvas->active_item = active_item; canvas->drag_area = active_item->drag_area; canvas->state = GTK_STATE_SELECTED; canvas->action = GTK_PLOT_CANVAS_ACTION_INACTIVE; canvas->drag_point = pos; canvas->drag_x = x; canvas->drag_y = y; canvas->pointer_x = x; canvas->pointer_y = y; gtk_plot_canvas_child_draw_selection(canvas, active_item, active_item->drag_area); if(active_item->mode == GTK_PLOT_CANVAS_SELECT_CLICK_2) return TRUE; } } if(active_item && veto){ if((!new_item && active_item->mode == GTK_PLOT_CANVAS_SELECT_CLICK_2) || active_item->mode == GTK_PLOT_CANVAS_SELECT_CLICK_1) { if(GTK_PLOT_CANVAS_CAN_DND(canvas)) { switch(pos){ case GTK_PLOT_CANVAS_IN: canvas->action = GTK_PLOT_CANVAS_ACTION_DRAG; break; default: if(active_item->flags & GTK_PLOT_CANVAS_CHILD_CAN_RESIZE) canvas->action = GTK_PLOT_CANVAS_ACTION_RESIZE; else canvas->action = GTK_PLOT_CANVAS_ACTION_DRAG; } /* gdk_pointer_grab (gtk_widget_get_window(widget), FALSE, GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); */ canvas->drag_point = pos; canvas->drag_x = x; canvas->drag_y = y; canvas->pointer_x = x; canvas->pointer_y = y; return TRUE; } } } } gtk_plot_canvas_unselect(canvas); if(GTK_PLOT_CANVAS_CAN_SELECT(canvas)){ veto = TRUE; _gtkextra_signal_emit(GTK_OBJECT(canvas), canvas_signals[SELECT_ITEM], event, NULL, &veto); if(veto){ canvas->active_item = NULL; canvas->state = GTK_STATE_SELECTED; canvas->action = GTK_PLOT_CANVAS_ACTION_SELECTION; canvas->drag_point = pos; canvas->drag_x = x; canvas->drag_y = y; canvas->pointer_x = x; canvas->pointer_y = y; canvas->drag_area.x = x; canvas->drag_area.y = y; canvas->drag_area.width = 0; canvas->drag_area.height = 0; /* gdk_pointer_grab (gtk_widget_get_window(widget), FALSE, GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, NULL, event->time); */ draw_selection(canvas, NULL, canvas->drag_area); } } return TRUE; } static void gtk_plot_canvas_child_button_release(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { gdouble new_x, new_y, new_width, new_height; double dx, dy; gdouble x1, x2, y1, y2; gtk_plot_canvas_get_position(canvas, canvas->drag_area.width, canvas->drag_area.height, &new_width, &new_height); gtk_plot_canvas_get_position(canvas, canvas->drag_area.x, canvas->drag_area.y, &new_x, &new_y); gtk_plot_canvas_get_position(canvas, canvas->drag_area.x - child->drag_area.x, canvas->drag_area.y - child->drag_area.y, &dx, &dy); x1 = MIN(child->rx1, child->rx2); y1 = MIN(child->ry1, child->ry2); x2 = MAX(child->rx1, child->rx2); y2 = MAX(child->ry1, child->ry2); x1 += dx; y1 += dy; x2 = x1 + new_width; y2 = y1 + new_height; gtk_plot_canvas_child_move_resize(canvas, child, x1, y1, x2, y2); child->drag_area = canvas->drag_area; } static gint gtk_plot_canvas_button_release(GtkWidget *widget, GdkEventButton *event) { GtkPlotCanvas *canvas; gdouble new_x, new_y; gdouble new_width, new_height; gdouble x1 = 0., y1 = 0., x2 = 0., y2 = 0.; gboolean veto = TRUE; gdouble dx = 0., dy = 0.; canvas = GTK_PLOT_CANVAS(widget); /* gdk_pointer_ungrab(event->time); */ if(gtk_widget_get_mapped(widget)){ gdk_cursor_destroy(canvas->cursor); canvas->cursor = gdk_cursor_new(GDK_TOP_LEFT_ARROW); gdk_window_set_cursor(gtk_widget_get_window(widget), canvas->cursor); } if(canvas->action == GTK_PLOT_CANVAS_ACTION_INACTIVE) return TRUE; gtk_plot_canvas_get_position(canvas, canvas->drag_area.width, canvas->drag_area.height, &new_width, &new_height); gtk_plot_canvas_get_position(canvas, canvas->drag_area.x, canvas->drag_area.y, &new_x, &new_y); if(canvas->action != GTK_PLOT_CANVAS_ACTION_SELECTION && canvas->active_item){ GtkPlotCanvasChild *child = canvas->active_item; gtk_plot_canvas_get_position(canvas, canvas->drag_area.x - canvas->active_item->drag_area.x, canvas->drag_area.y - canvas->active_item->drag_area.y, &dx, &dy); x1 = MIN(child->rx1, child->rx2); y1 = MIN(child->ry1, child->ry2); x2 = MAX(child->rx1, child->rx2); y2 = MAX(child->ry1, child->ry2); x1 += dx; y1 += dy; x2 = x1 + new_width; y2 = y1 + new_height; if(canvas->action == GTK_PLOT_CANVAS_ACTION_DRAG){ _gtkextra_signal_emit(GTK_OBJECT(canvas), canvas_signals[MOVE_ITEM], child, x1, y1, &veto); } if(canvas->action == GTK_PLOT_CANVAS_ACTION_RESIZE){ _gtkextra_signal_emit(GTK_OBJECT(canvas), canvas_signals[RESIZE_ITEM], child, new_width, new_height, &veto); } if(canvas->action != GTK_PLOT_CANVAS_ACTION_INACTIVE && veto) { if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(canvas->active_item)))->button_release) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(canvas->active_item)))->button_release(canvas, canvas->active_item); g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); canvas->pointer_x = canvas->pointer_y = canvas->drag_x = canvas->drag_y = 0; gtk_plot_canvas_child_draw_selection(canvas, canvas->active_item, canvas->active_item->drag_area); canvas->action = GTK_PLOT_CANVAS_ACTION_INACTIVE; return TRUE; } else { canvas->state = GTK_STATE_NORMAL; } } else { gtk_plot_canvas_get_position(canvas, canvas->drag_x, canvas->drag_y, &x1, &y1); gtk_plot_canvas_get_position(canvas, canvas->pointer_x, canvas->pointer_y, &x2, &y2); new_width = abs(canvas->pointer_x - canvas->drag_x); new_height = abs(canvas->pointer_y - canvas->drag_y); draw_selection(canvas, NULL, canvas->drag_area); g_signal_emit(GTK_OBJECT(canvas), canvas_signals[SELECT_REGION], 0, x1, y1, x2, y2); canvas->state = GTK_STATE_NORMAL; canvas->action = GTK_PLOT_CANVAS_ACTION_INACTIVE; return TRUE; } canvas->drag_x = canvas->pointer_x; canvas->drag_y = canvas->pointer_y; if(canvas->action != GTK_PLOT_CANVAS_ACTION_SELECTION) canvas->state = GTK_STATE_NORMAL; canvas->action = GTK_PLOT_CANVAS_ACTION_INACTIVE; return TRUE; } static gint gtk_plot_canvas_focus_in(GtkWidget *widget, GdkEventFocus *event) { GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS); return FALSE; } static gint gtk_plot_canvas_focus_out(GtkWidget *widget, GdkEventFocus *event) { GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS); gtk_plot_canvas_unselect(GTK_PLOT_CANVAS(widget)); return FALSE; } /** * gtk_plot_canvas_set_transparent: * @canvas: a #GtkPlotCanvas. * @transparent: * * */ void gtk_plot_canvas_set_transparent (GtkPlotCanvas *canvas, gboolean transparent) { g_return_if_fail (canvas != NULL); g_return_if_fail (GTK_IS_PLOT_CANVAS (canvas)); canvas->transparent = transparent; } /** * gtk_plot_canvas_trasnparent: * @canvas: a #GtkPlotCanvas. * * * * Return value: */ gboolean gtk_plot_canvas_transparent (GtkPlotCanvas *canvas) { g_return_val_if_fail (canvas != NULL, TRUE); g_return_val_if_fail (GTK_IS_PLOT_CANVAS (canvas), TRUE); return(canvas->transparent); } /** * gtk_plot_canvas_set_background: * @canvas: a #GtkPlotCanvas. * @bg_color: a GdkColor. * * */ void gtk_plot_canvas_set_background (GtkPlotCanvas *canvas, const GdkColor *bg_color) { g_return_if_fail (canvas != NULL); g_return_if_fail (GTK_IS_PLOT_CANVAS (canvas)); if(!bg_color) { canvas->transparent = TRUE; return; } else { canvas->background = *bg_color; canvas->transparent = FALSE; } if(gtk_widget_get_realized(GTK_WIDGET(canvas))) gtk_plot_canvas_paint(canvas); g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } /** * gtk_plot_canvas_get_pixel: * @canvas: a #GtkPlotCanvas. * @px: * @py: * @x: * @y: * * */ void gtk_plot_canvas_get_pixel(GtkPlotCanvas *canvas, gdouble px, gdouble py, gint *x, gint *y) { *x = roundint(canvas->pixmap_width * px); *y = roundint(canvas->pixmap_height * py); } /** * gtk_plot_canvas_get_position: * @plot_canvas: a #GtkPlotCanvas. * @x: * @y: * @px: * @py: * * */ void gtk_plot_canvas_get_position(GtkPlotCanvas *plot_canvas, gint x, gint y, gdouble *px, gdouble *py) { *px = (gdouble) x / (gdouble) plot_canvas->pixmap_width; *py = (gdouble) y / (gdouble) plot_canvas->pixmap_height; } /** * gtk_plot_canvas_unselect: * @plot_canvas: a #GtkPlotCanvas. * * */ void gtk_plot_canvas_unselect (GtkPlotCanvas *plot_canvas) { if(plot_canvas->state == GTK_STATE_SELECTED){ if(plot_canvas->active_item) gtk_plot_canvas_child_draw_selection(plot_canvas, plot_canvas->active_item, plot_canvas->drag_area); else draw_selection(plot_canvas, NULL, plot_canvas->drag_area); } plot_canvas->action = GTK_PLOT_CANVAS_ACTION_INACTIVE; plot_canvas->state = GTK_STATE_NORMAL; if(plot_canvas->active_item){ plot_canvas->active_item->state = GTK_STATE_NORMAL; if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot_canvas->active_item)))->unselect) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(plot_canvas->active_item)))->unselect(plot_canvas, plot_canvas->active_item); } plot_canvas->active_item = NULL; if(gtk_widget_get_mapped(GTK_WIDGET(plot_canvas))){ gdk_cursor_destroy(plot_canvas->cursor); plot_canvas->cursor = gdk_cursor_new(GDK_TOP_LEFT_ARROW); gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(plot_canvas)), plot_canvas->cursor); } } /** * gtk_plot_canvas_cancel_action: * @plot_canvas: a #GtkPlotCanvas. * * */ void gtk_plot_canvas_cancel_action (GtkPlotCanvas *plot_canvas) { gtk_plot_canvas_unselect(plot_canvas); /* gdk_pointer_ungrab(GDK_CURRENT_TIME); */ } /** * gtk_plot_canvas_get_active_item: * @canvas: a #GtkPlotCanvas. * * Return value: (transfer none): the active #GtkPlotCanvasChild */ GtkPlotCanvasChild * gtk_plot_canvas_get_active_item(GtkPlotCanvas *canvas) { return (canvas->active_item); } /** * gtk_plot_canvas_child_get_position: * @canvas: a #GtkPlotCanvas. * @child: a #GtkPlotCanvasChild. * @x1: * @y1: * @x2: * @y2: * * * * Return value: */ gboolean gtk_plot_canvas_child_get_position(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, double *x1, double *y1, double *x2, double *y2) { GList *list; gpointer data; *x1 = child->rx1; *x2 = child->rx2; *y1 = child->ry1; *y2 = child->ry2; list = canvas->childs; /* Return TRUE if child is actually contained w/in canvas, and coordinates of the childs bounding box, else FALSE */ while(list) { data = list->data; if(GTK_PLOT_CANVAS_CHILD(data) == child) return TRUE; list = list->next; } return FALSE; } /** * gtk_plot_canvas_get_size: * @canvas: a #GtkPlotCanvas. * @width: * @height: * */ void gtk_plot_canvas_set_size(GtkPlotCanvas *canvas, gint width, gint height) { GList *list = NULL; gdouble m = canvas->magnification; GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(canvas), &allocation); gtk_plot_canvas_cancel_action(canvas); canvas->width = width; canvas->height = height; canvas->pixmap_width = roundint(m * width); canvas->pixmap_height = roundint(m * height); if(gtk_widget_get_mapped(GTK_WIDGET(canvas)) && canvas->pixmap){ gtk_plot_canvas_create_pixmap(GTK_WIDGET(canvas), canvas->pixmap_width, canvas->pixmap_height); } /* gtk_widget_set_size_request(GTK_WIDGET(canvas), canvas->pixmap_width, canvas->pixmap_height); */ allocation.width = canvas->pixmap_width; allocation.height = canvas->pixmap_height; gtk_widget_size_allocate(GTK_WIDGET(canvas), &allocation); list = canvas->childs; while(list){ GtkPlotCanvasChild *child = GTK_PLOT_CANVAS_CHILD(list->data); if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); list = list->next; } g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } static void gtk_plot_canvas_create_pixmap(GtkWidget *widget, gint width, gint height) { GtkPlotCanvas *canvas; gint pixmap_width, pixmap_height; canvas = GTK_PLOT_CANVAS(widget); if (!canvas->pixmap){ canvas->pixmap = gdk_pixmap_new (gtk_widget_get_window(widget), width, height, -1); }else{ gdk_window_get_size(canvas->pixmap, &pixmap_width, &pixmap_height); if(width != pixmap_width || height != pixmap_height){ gdk_pixmap_unref(canvas->pixmap); canvas->pixmap = gdk_pixmap_new (gtk_widget_get_window(widget), width, height, -1); } } if (canvas->pc && GTK_IS_PLOT_CAIRO(canvas->pc)) { gtk_plot_canvas_set_pc(canvas, GTK_PLOT_PC(gtk_plot_cairo_new_with_drawable(canvas->pixmap))); } if(canvas->pc && GTK_IS_PLOT_GDK(canvas->pc)){ GTK_PLOT_GDK(canvas->pc)->drawable = canvas->pixmap; } gtk_plot_pc_set_viewport(canvas->pc, width, height); } static gint gtk_plot_canvas_expose(GtkWidget *widget, GdkEventExpose *event) { GtkPlotCanvas *canvas; GdkPixmap *pixmap; if(!gtk_widget_is_drawable(widget)) return FALSE; canvas = GTK_PLOT_CANVAS(widget); if(!canvas->pixmap){ gtk_plot_canvas_create_pixmap(widget, canvas->pixmap_width, canvas->pixmap_height); gtk_plot_canvas_paint(canvas); return FALSE; } pixmap = canvas->pixmap; gdk_draw_pixmap(gtk_widget_get_window(GTK_WIDGET(canvas)), gtk_widget_get_style(widget)->fg_gc[GTK_STATE_NORMAL], pixmap, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); GTK_WIDGET_CLASS(parent_class)->expose_event(widget, event); return FALSE; } static void gtk_plot_canvas_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkPlotCanvas *canvas; canvas = GTK_PLOT_CANVAS(widget); GTK_WIDGET_CLASS(parent_class)->size_request(widget, requisition); gtk_widget_set_size_request(widget, MAX(canvas->pixmap_width, requisition->width), MAX(canvas->pixmap_height, requisition->height)); } /** * gtk_plot_canvas_set_magnification: * @canvas: a #GtkPlotCanvas. * @magnification: * * */ void gtk_plot_canvas_set_magnification(GtkPlotCanvas *canvas, gdouble magnification) { GList *list; canvas->magnification = magnification; list = canvas->childs; while(list){ GtkPlotCanvasChild *child = GTK_PLOT_CANVAS_CHILD(list->data); if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->set_magnification) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->set_magnification(canvas, child, magnification); list = list->next; } gtk_plot_canvas_set_size(canvas, canvas->width, canvas->height); g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } static void gtk_plot_canvas_child_draw_selection(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area) { if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->draw_selection) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->draw_selection(canvas, child, area); } static void draw_selection(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation area) { GdkGC *xor_gc = NULL; GdkGCValues values; gdk_gc_get_values(gtk_widget_get_style(GTK_WIDGET(canvas))->fg_gc[0], &values); values.function = GDK_INVERT; values.foreground = gtk_widget_get_style(GTK_WIDGET(canvas))->white; values.subwindow_mode = GDK_INCLUDE_INFERIORS; xor_gc = gdk_gc_new_with_values(gtk_widget_get_window(GTK_WIDGET(canvas)), &values, GDK_GC_FOREGROUND | GDK_GC_FUNCTION | GDK_GC_SUBWINDOW); if(canvas->active_item){ if(canvas->active_item->selection == GTK_PLOT_CANVAS_SELECT_TARGET){ area.x += area.width / 2 - 10; area.y += area.height / 2 - 10; area.width = 20; area.height = 20; gdk_draw_rectangle (gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, FALSE, area.x, area.y, area.width, area.height); gdk_draw_line(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, area.x + 1, area.y + area.height/2, area.x + 6, area.y + area.height/2); gdk_draw_line(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, area.x + area.width - 1, area.y + area.height / 2, area.x + area.width - 6, area.y + area.height / 2); gdk_draw_line(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, area.x + area.width/2, area.y + 1, area.x + area.width/2, area.y + 6); gdk_draw_line(gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, area.x + area.width/2, area.y + area.height - 1, area.x + area.width/2, area.y + area.height - 6); if(xor_gc) gdk_gc_destroy(xor_gc); return; } if(canvas->active_item->selection == GTK_PLOT_CANVAS_SELECT_MARKERS){ gdk_draw_rectangle (gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, FALSE, area.x, area.y, area.width, area.height); draw_marker(canvas, xor_gc, area.x, area.y); draw_marker(canvas, xor_gc, area.x, area.y + area.height); draw_marker(canvas, xor_gc, area.x + area.width, area.y); draw_marker(canvas, xor_gc, area.x + area.width, area.y + area.height); if(area.height > DEFAULT_MARKER_SIZE * 2){ draw_marker(canvas, xor_gc, area.x, area.y + area.height / 2); draw_marker(canvas, xor_gc, area.x + area.width, area.y + area.height / 2); } if(area.width > DEFAULT_MARKER_SIZE * 2){ draw_marker(canvas, xor_gc, area.x + area.width / 2, area.y); draw_marker(canvas, xor_gc, area.x + area.width / 2, area.y + area.height); } } } else { gdk_gc_set_line_attributes(xor_gc, 1, 1, 0 ,0 ); gdk_draw_rectangle (gtk_widget_get_window(GTK_WIDGET(canvas)), xor_gc, FALSE, area.x, area.y, area.width, area.height); } if(xor_gc) gdk_gc_unref(xor_gc); } static void draw_marker(GtkPlotCanvas *canvas, GdkGC *gc, gint x, gint y) { GdkDrawable *darea; darea = gtk_widget_get_window(GTK_WIDGET(canvas)); gdk_draw_rectangle(darea, gc, TRUE, x - DEFAULT_MARKER_SIZE / 2, y - DEFAULT_MARKER_SIZE / 2, DEFAULT_MARKER_SIZE + 1, DEFAULT_MARKER_SIZE + 1); } /* FIXME:: Is this private or public */ GtkPlotCanvasPos possible_selection(GtkAllocation area, gint x, gint y) { GtkPlotCanvasPos return_value = GTK_PLOT_CANVAS_OUT; if(x >= area.x - DEFAULT_MARKER_SIZE / 2 && x <= area.x + DEFAULT_MARKER_SIZE / 2){ if(y >= area.y - DEFAULT_MARKER_SIZE / 2. && y <= area.y + DEFAULT_MARKER_SIZE / 2.) return_value = GTK_PLOT_CANVAS_TOP_LEFT; if(y >= area.y + area.height - DEFAULT_MARKER_SIZE / 2. && y <= area.y + area.height + DEFAULT_MARKER_SIZE / 2.) return_value = GTK_PLOT_CANVAS_BOTTOM_LEFT; if(y >= area.y + area.height / 2 - DEFAULT_MARKER_SIZE / 2. && y <= area.y + area.height / 2 + DEFAULT_MARKER_SIZE / 2. && area.height > DEFAULT_MARKER_SIZE * 2) return_value = GTK_PLOT_CANVAS_LEFT; } if(x >= area.x + area.width - DEFAULT_MARKER_SIZE / 2 && x <= area.x + area.width + DEFAULT_MARKER_SIZE / 2){ if(y >= area.y - DEFAULT_MARKER_SIZE / 2. && y <= area.y + DEFAULT_MARKER_SIZE / 2.) return_value = GTK_PLOT_CANVAS_TOP_RIGHT; if(y >= area.y + area.height - DEFAULT_MARKER_SIZE / 2. && y <= area.y + area.height + DEFAULT_MARKER_SIZE / 2.) return_value = GTK_PLOT_CANVAS_BOTTOM_RIGHT; if(y >= area.y + area.height / 2 - DEFAULT_MARKER_SIZE / 2. && y <= area.y + area.height / 2 + DEFAULT_MARKER_SIZE / 2. && area.height > DEFAULT_MARKER_SIZE * 2) return_value = GTK_PLOT_CANVAS_RIGHT; } if(x >= area.x + area.width / 2 - DEFAULT_MARKER_SIZE / 2 && x <= area.x + area.width / 2 + DEFAULT_MARKER_SIZE / 2 && area.width > DEFAULT_MARKER_SIZE * 2){ if(y >= area.y - DEFAULT_MARKER_SIZE / 2. && y <= area.y + DEFAULT_MARKER_SIZE / 2.) return_value = GTK_PLOT_CANVAS_TOP; if(y >= area.y + area.height - DEFAULT_MARKER_SIZE / 2. && y <= area.y + area.height + DEFAULT_MARKER_SIZE / 2.) return_value = GTK_PLOT_CANVAS_BOTTOM; } if(return_value == GTK_PLOT_CANVAS_OUT){ if (x >= area.x && x <= area.x + area.width && y >= area.y && y <= area.y + area.height) return_value = GTK_PLOT_CANVAS_IN; } return (return_value); } /**********************************************************************/ /** * gtk_plot_canvas_grid_set_visible: * @canvas: a #GtkPlotCanvas. * @visible: * * */ void gtk_plot_canvas_grid_set_visible(GtkPlotCanvas *canvas, gboolean visible) { canvas->show_grid= visible; g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } /** * gtk_plot_canvas_grid_set_step: * @canvas: a #GtkPlotCanvas. * @step: * * */ void gtk_plot_canvas_grid_set_step(GtkPlotCanvas *canvas, gdouble step) { canvas->grid_step = step; g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } /** * gtk_plot_canvas_grid_set_attributes: * @canvas: a #GtkPlotCanvas. * @style: * @width: * @color: * * */ void gtk_plot_canvas_grid_set_attributes(GtkPlotCanvas *canvas, GtkPlotLineStyle style, gint width, const GdkColor *color) { if(color) canvas->grid.color = *color; canvas->grid.line_width = width; canvas->grid.line_style = style; g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } /**********************************************************************/ /** * gtk_plot_canvas_put_child: * @canvas: a #GtkPlotCanvas. * @x1: * @y1: * @x2: * @y2: * * */ void gtk_plot_canvas_put_child(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { child->rx1 = x1; child->ry1 = y1; child->rx2 = x2; child->ry2 = y2; child->parent = canvas; canvas->childs = g_list_append(canvas->childs, child); g_object_ref(GTK_OBJECT(child)); gtk_object_sink(GTK_OBJECT(child)); if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); if(gtk_widget_get_realized(GTK_WIDGET(canvas)) && gtk_widget_get_visible(GTK_WIDGET(canvas))) gtk_plot_canvas_child_draw(canvas, child); g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); g_signal_emit(GTK_OBJECT(canvas), canvas_signals[ADD_ITEM], 0, child); } /** * gtk_plot_canvas_child_move: * @canvas: a #GtkPlotCanvas. * @child: a #GtkPlotCanvasChild * @x1: * @y1: * * */ void gtk_plot_canvas_child_move(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1) { child->rx2 += (x1 - child->rx1); child->ry2 += (y1 - child->ry1); child->rx1 = x1; child->ry1 = y1; if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->move) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->move(canvas, child, x1, y1); GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); gtk_plot_canvas_paint(canvas); gtk_plot_canvas_refresh(canvas); g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } /** * gtk_plot_canvas_child_move_resize: * @canvas: a #GtkPlotCanvas. * @x1: * @y1: * @x2: * @y2: * * */ void gtk_plot_canvas_child_move_resize(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { child->rx1 = x1; child->ry1 = y1; child->rx2 = x2; child->ry2 = y2; if(GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->move_resize) GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->move_resize(canvas, child, x1, y1, x2, y2); GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->size_allocate(canvas, child); gtk_plot_canvas_paint(canvas); gtk_plot_canvas_refresh(canvas); g_signal_emit (GTK_OBJECT(canvas), canvas_signals[CHANGED], 0); } static void gtk_plot_canvas_child_size_allocate(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { gint x1, x2, y1, y2; gtk_plot_canvas_get_pixel(canvas, child->rx1, child->ry1, &x1, &y1); gtk_plot_canvas_get_pixel(canvas, child->rx2, child->ry2, &x2, &y2); child->allocation.x = MIN(x1, x2); child->allocation.y = MIN(y1, y2); child->allocation.width = abs(x1 - x2); child->allocation.height = abs(y1 - y2); } /** * gtk_plot_canvas_set_selection: * @child: a #GtkPlotCanvasChild. * @selection: a #GtkPlotCanvasSelection * * */ void gtk_plot_canvas_child_set_selection (GtkPlotCanvasChild *child, GtkPlotCanvasSelection selection) { if(!child) return; child->selection = selection; } /** * gtk_plot_canvas_child_set_selection_mode: * @child: a #GtkPlotCanvasChild. * @mode: * * */ void gtk_plot_canvas_child_set_selection_mode (GtkPlotCanvasChild *child, GtkPlotCanvasSelectionMode mode) { if(!child) return; child->mode = mode; } /** * gtk_plot_canvas_child_draw: * @canvas: a #GtkPlotCanvas. * @child: a #GtkPlotCanvasChild. * * */ void gtk_plot_canvas_child_draw(GtkPlotCanvas *canvas, GtkPlotCanvasChild *child) { gtk_plot_pc_gsave(canvas->pc); GTK_PLOT_CANVAS_CHILD_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(child)))->draw(canvas, child); gtk_plot_pc_grestore(canvas->pc); } /** * gtk_plot_canvas_set_line_attributes: * @canvas: a #GtkPlotCanvas. * @line: * * */ void gtk_plot_canvas_set_line_attributes(GtkPlotCanvas *canvas, GtkPlotLine line) { gdouble dot[] = {2., 3.}; gdouble dash[] = {6., 4.}; gdouble dot_dash[] = {6., 4., 2., 4.}; gdouble dot_dot_dash[] = {6., 4., 2., 4., 2., 4.}; gdouble dot_dash_dash[] = {6., 4., 6., 4., 2., 4.}; gtk_plot_pc_set_color(canvas->pc, &line.color); switch(line.line_style){ case GTK_PLOT_LINE_SOLID: gtk_plot_pc_set_lineattr(canvas->pc, line.line_width, 0, 0, 0); break; case GTK_PLOT_LINE_DOTTED: gtk_plot_pc_set_lineattr(canvas->pc, line.line_width, GDK_LINE_ON_OFF_DASH, 0, 0); gtk_plot_pc_set_dash(canvas->pc, 0, dot, 2); break; case GTK_PLOT_LINE_DASHED: gtk_plot_pc_set_lineattr(canvas->pc, line.line_width, GDK_LINE_ON_OFF_DASH, 0, 0); gtk_plot_pc_set_dash(canvas->pc, 0, dash, 2); case GTK_PLOT_LINE_DOT_DASH: gtk_plot_pc_set_lineattr(canvas->pc, line.line_width, GDK_LINE_ON_OFF_DASH, 0, 0); gtk_plot_pc_set_dash(canvas->pc, 0, dot_dash, 4); break; case GTK_PLOT_LINE_DOT_DOT_DASH: gtk_plot_pc_set_lineattr(canvas->pc, line.line_width, GDK_LINE_ON_OFF_DASH, 0, 0); gtk_plot_pc_set_dash(canvas->pc, 0, dot_dot_dash, 6); break; case GTK_PLOT_LINE_DOT_DASH_DASH: gtk_plot_pc_set_lineattr(canvas->pc, line.line_width, GDK_LINE_ON_OFF_DASH, 0, 0); gtk_plot_pc_set_dash(canvas->pc, 0, dot_dash_dash, 6); break; case GTK_PLOT_LINE_NONE: default: break; } } gtkextra-3.2.0/gtkextra/testgtkplot3d.c0000644000076400001440000002433312603754176015116 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotsurface.h" #include "gtkplotcsurface.h" #include "gtkplotcanvas.h" #include "gtkplotps.h" #include "gtkplotprint.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvaspixmap.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gdouble y, gboolean *err) { gdouble z; *err = FALSE; z = cos(((x-0.5)*(x-0.5) + (y-0.5)*(y-0.5))*24) / 4. + .5; /* z = (x*x + y*y) / 9.0; */ return z; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); plots[nlayers-1] = gtk_plot3d_new_with_size(NULL, .70, .70); gtk_widget_show(plots[nlayers-1]); return plots[nlayers-1]; } void rotate_x(GtkWidget *button, gpointer data) { gtk_plot3d_rotate_x(GTK_PLOT3D(active_plot), 10.); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(data)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(data)); } void rotate_y(GtkWidget *button, gpointer data) { gtk_plot3d_rotate_y(GTK_PLOT3D(active_plot), 10.); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(data)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(data)); } void rotate_z(GtkWidget *button, gpointer data) { gtk_plot3d_rotate_z(GTK_PLOT3D(active_plot), 10.); gtk_plot_canvas_paint(GTK_PLOT_CANVAS(data)); gtk_plot_canvas_refresh(GTK_PLOT_CANVAS(data)); } #define MAXNODES 50000 int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; GtkWidget *button; GtkWidget *surface; gdouble *x,*y,*z,*a; gint cnt= 0; gint page_width, page_height; gfloat scale = 1.; char buffer[1000]; FILE *f; gdouble xmin=1e99; gdouble xmax=-1e99; gdouble ymin=1e99; gdouble ymax=-1e99; gdouble zmin=1e99; gdouble zmax=-1e99; gdouble dx,dy,dz; gint n, nx, ny; GtkPlotCanvasChild *child; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlot3D Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ active_plot = new_layer(canvas); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .10, .06, .85, .85); x = (gdouble *)g_malloc(1600 * sizeof(gdouble)); y = (gdouble *)g_malloc(1600 * sizeof(gdouble)); z = (gdouble *)g_malloc(1600 * sizeof(gdouble)); a = (gdouble *)g_malloc(1600 * sizeof(gdouble)); n = 0; for(nx = 0; nx < 40; nx++) for(ny = 0; ny < 40; ny++) { x[n]=0.025*(gdouble)nx; y[n]=0.025*(gdouble)ny; z[n]=cos(((x[n]-0.5)*(x[n]-0.5) + (y[n]-0.5)*(y[n]-0.5))*24) / 4. + .5; a[n]=((x[n]-0.5)*(x[n]-0.5) + (y[n]-0.5)*(y[n]-0.5)); n++; } surface = gtk_plot_surface_new(); gtk_plot_surface_set_points(GTK_PLOT_SURFACE(surface), x, y, z, NULL, NULL, NULL, 40, 40); gtk_plot_data_set_legend(GTK_PLOT_DATA(surface), "cos ((r-r\\s0\\N)\\S2\\N)"); gtk_plot_surface_use_amplitud(GTK_PLOT_SURFACE(surface), TRUE); gtk_plot_data_set_a(GTK_PLOT_DATA(surface), a); gtk_plot_data_gradient_set_visible(GTK_PLOT_DATA(surface), TRUE); /* for(nx = 0; nx < 10; nx++) for(ny = 0; ny < 10; ny++) { x[n]=(gdouble)0.1*(gdouble)nx; y[n]=(gdouble)0.1*(gdouble)ny; z[n]=(x[n]-0.5)*(x[n]-0.5) + (y[n]-0.5)*(y[n]-0.5); n++; } surface = gtk_plot_surface_new(); gtk_plot_surface_set_points(GTK_PLOT_SURFACE(surface), x, y, z, NULL, NULL, NULL, 10, 10); */ gtk_plot3d_set_minor_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_AXIS_X, 1); gtk_plot3d_set_minor_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_AXIS_Y, 1); gtk_plot3d_show_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_SIDE_XY, GTK_PLOT_TICKS_OUT, GTK_PLOT_TICKS_OUT); gtk_plot3d_show_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_SIDE_XZ, GTK_PLOT_TICKS_OUT, GTK_PLOT_TICKS_OUT); gtk_plot3d_show_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_SIDE_YX, GTK_PLOT_TICKS_OUT, GTK_PLOT_TICKS_OUT); gtk_plot3d_show_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_SIDE_YZ, GTK_PLOT_TICKS_OUT, GTK_PLOT_TICKS_OUT); gtk_plot3d_show_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_SIDE_ZX, GTK_PLOT_TICKS_OUT, GTK_PLOT_TICKS_OUT); gtk_plot3d_show_ticks(GTK_PLOT3D(active_plot), GTK_PLOT_SIDE_ZY, GTK_PLOT_TICKS_OUT, GTK_PLOT_TICKS_OUT); /* if a file was specified on the commandline, try to open and display it: */ if (argc!=2 || !(f=fopen(argv[1],"r"))) { /* x= y= z= NULL; surface = gtk_plot_surface_new_function((GtkPlotFunc3D) function); gtk_plot_surface_set_xstep(GTK_PLOT_SURFACE(surface), .025); gtk_plot_surface_set_ystep(GTK_PLOT_SURFACE(surface), .025); gtk_plot_data_set_legend(GTK_PLOT_DATA(surface), "cos ((r-r\\s0\\N)\\S2\\N)"); */ gtk_plot_add_data(GTK_PLOT(active_plot), GTK_PLOT_DATA(surface)); } else { x= g_new(gdouble,MAXNODES); y= g_new(gdouble,MAXNODES); z= g_new(gdouble,MAXNODES); while (fgets(buffer,1000,f) && cntx[cnt]) xmin= x[cnt]; if (xmaxy[cnt]) ymin= y[cnt]; if (ymaxz[cnt]) zmin= z[cnt]; if (zmaxa1+360-300); gtk_plot3d_rotate_y(GTK_PLOT3D(active_plot), GTK_PLOT3D(active_plot)->a2+360-360); gtk_plot3d_rotate_z(GTK_PLOT3D(active_plot), GTK_PLOT3D(active_plot)->a3+360-330); */ gtk_widget_show(surface); button = gtk_button_new_with_label("Rotate X"); gtk_fixed_put(GTK_FIXED(canvas), button, 80, 0); g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(rotate_x), canvas); button = gtk_button_new_with_label("Rotate Y"); gtk_fixed_put(GTK_FIXED(canvas), button, 160, 0); g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(rotate_y), canvas); button = gtk_button_new_with_label("Rotate Z"); gtk_fixed_put(GTK_FIXED(canvas), button, 240, 0); /* gtk_plot3d_set_xfactor(GTK_PLOT3D(active_plot), 0.5); */ /* gtk_plot3d_set_xrange(GTK_PLOT3D(active_plot), 0., 2.0); */ g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(rotate_z), canvas); gtk_widget_show_all(window1); /* gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demo3d.ps", 0, 0, GTK_PLOT_LETTER); */ gtk_plot_canvas_export_ps_with_size(GTK_PLOT_CANVAS(canvas), "demo3d.ps", 0, 0, GTK_PLOT_PSPOINTS, GTK_PLOT_LETTER_W, GTK_PLOT_LETTER_H); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/testbubbles.c0000644000076400001440000002231212603754176014614 00000000000000 #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotbubble.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gdouble gaussian(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = .65*exp(-.5*pow(x-.5,2)/.02); return y; } gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } widget_list = plots; active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); } return TRUE; } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), (void *)activate_plot, data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), (void *)activate_plot, data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkColor color; GtkPlotAxis *gradient; static gdouble px1[]={0., 0.1, 0.2, 0.3, 0.4, 0.5, .6, .7, .8, .9}; static gdouble py1[]={.2, .4, .5, .35, .30, .40, .45, .56, .76, 87, .89}; static gdouble pa1[]={.12, .22, .27, .12, .052, .12, .045, .214, .123, .088}; static gdouble pda1[]={.132, .23, .432, .34, .46, .56, .785, .76, .86, .89}; dataset[0] = GTK_PLOT_DATA(gtk_plot_bubble_new()); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, NULL, NULL, 10); gtk_plot_data_set_a(dataset[0], pa1); gtk_plot_data_set_da(dataset[0], pda1); gtk_plot_bubble_set_size_max(GTK_PLOT_BUBBLE(dataset[0]), 50); gtk_plot_bubble_set_scale_max(GTK_PLOT_BUBBLE(dataset[0]), 0.5); gdk_color_parse("blue", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_NONE, 0, 0, 1, &color); gtk_plot_data_set_legend(dataset[0], "Bubbles"); gtk_plot_data_gradient_set_visible(dataset[0], TRUE); gtk_plot_data_gradient_use_custom_colors(dataset[0], TRUE); gradient = gtk_plot_data_gradient(dataset[0]); gradient->orientation = GTK_ORIENTATION_HORIZONTAL; gradient->label_precision = 1; dataset[0]->gradient_title_pos = GTK_PLOT_AXIS_BOTTOM; /* dataset[0]->gradient_border_offset = 0; */ gtk_plot_data_set_gradient_size(dataset[0], GTK_PLOT(active_plot)->internal_allocation.width); gtk_plot_data_move_gradient(dataset[0], 0., 1.2); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; gint page_width, page_height; gfloat scale = 1.; GtkPlotCanvasChild *child; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotBubble Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_set_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", (void *)quit, NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); gtk_plot_legends_move(GTK_PLOT(active_plot), .050, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_grids_set_visible(GTK_PLOT(active_plot), TRUE, TRUE, TRUE, TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .65, .31); build_example1(active_plot); gtk_widget_show(active_plot); g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demobubbles.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkplotcanvasline.h0000644000076400001440000000624112603754176016036 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANVAS_LINE_H__ #define __GTK_PLOT_CANVAS_LINE_H__ #define GTK_PLOT_CANVAS_LINE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_line_get_type (), GtkPlotCanvasLine) #define GTK_PLOT_CANVAS_LINE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_line_get_type(), GtkPlotCanvasLineClass) #define GTK_IS_PLOT_CANVAS_LINE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_line_get_type ()) #define G_TYPE_PLOT_CANVAS_LINE (gtk_plot_canvas_line_get_type ()) #include #include "gtkplotpc.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _GtkPlotCanvasLine GtkPlotCanvasLine; typedef struct _GtkPlotCanvasLineClass GtkPlotCanvasLineClass; typedef enum { GTK_PLOT_CANVAS_ARROW_NONE = 0, GTK_PLOT_CANVAS_ARROW_ORIGIN = 1 << 0, GTK_PLOT_CANVAS_ARROW_END = 1 << 1 } GtkPlotCanvasArrow; /** * GtkPlotCanvasLine: * * The GtkPlotCanvasLine struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvasLine { /*< private >*/ GtkPlotCanvasChild parent; GtkPlotLine line; gdouble x1, y1, x2, y2; GtkPlotCanvasPos pos; GtkPlotCanvasArrow arrow_mask; gint arrow_length; gint arrow_width; GtkPlotSymbolStyle arrow_style; }; struct _GtkPlotCanvasLineClass { GtkPlotCanvasChildClass parent_class; }; GType gtk_plot_canvas_line_get_type (void); GtkPlotCanvasChild * gtk_plot_canvas_line_new (GtkPlotLineStyle style, gfloat width, const GdkColor *color, GtkPlotCanvasArrow arrow_mask); void gtk_plot_canvas_line_set_attributes (GtkPlotCanvasLine *line, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_canvas_line_set_arrow (GtkPlotCanvasLine *line, GtkPlotSymbolStyle style, gfloat width, gfloat length, GtkPlotCanvasArrow mask); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANVAS_LINE_H__ */ gtkextra-3.2.0/gtkextra/gtkdatatextview.h0000644000076400001440000000626412603754176015532 00000000000000/* gtkdatatextview - data textview widget, based on GtkTextView * Copyright 2013 Fredy Paquet * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) && !defined (__GTKEXTRA_H_INSIDE__) #error "Only can be included directly." #endif #ifndef __GTK_DATA_TEXT_VIEW_H__ #define __GTK_DATA_TEXT_VIEW_H__ #include G_BEGIN_DECLS #define GTK_TYPE_DATA_TEXT_VIEW (gtk_data_text_view_get_type ()) #define GTK_DATA_TEXT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DATA_TEXT_VIEW, GtkDataTextView)) #define GTK_DATA_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATA_TEXT_VIEW, GtkDataTextViewClass)) #define GTK_IS_DATA_TEXT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATA_TEXT_VIEW)) #define GTK_IS_DATA_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA_TEXT_VIEW)) #define GTK_DATA_TEXT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DATA_TEXT_VIEW, GtkDataTextViewClass)) typedef struct _GtkDataTextView GtkDataTextView; typedef struct _GtkDataTextViewClass GtkDataTextViewClass; /** * GtkDataTextView: * * The GtkDataTextView struct contains only private data. It should * only be accessed through the functions described below. */ struct _GtkDataTextView { /*< private >*/ GtkTextView textview; gchar *description; /* column description */ gint max_length; /* maximum length in characters */ gint max_length_bytes; /* maximum length in bytes */ }; struct _GtkDataTextViewClass { GtkTextViewClass parent_class; }; GType gtk_data_text_view_get_type(void) G_GNUC_CONST; GtkDataTextView *gtk_data_text_view_new(void); const gchar * gtk_data_text_view_get_description(GtkDataTextView *data_text_view); void gtk_data_text_view_set_description(GtkDataTextView *data_text_view, const gchar *description); gint gtk_data_text_view_get_max_length(GtkDataTextView *data_text_view); void gtk_data_text_view_set_max_length(GtkDataTextView *data_text_view, gint max_length); gint gtk_data_text_view_get_max_length_bytes(GtkDataTextView *data_text_view); void gtk_data_text_view_set_max_length_bytes(GtkDataTextView *data_text_view, gint max_length_bytes); G_END_DECLS #endif /* __GTK_DATA_TEXT_VIEW_H__ */ gtkextra-3.2.0/gtkextra/testgtkplotdt.c0000644000076400001440000002067312603754176015222 00000000000000#include #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotsegment.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotps.h" #include "gtkplotprint.h" #include "gtkplotdt.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; void quit () { gtk_main_quit(); } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .5); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot,GtkPlotDT *data, gint num) { GdkColor color; gdouble *px1= (gdouble *)g_malloc(sizeof(gdouble)*num*3); gdouble *py1= (gdouble *)g_malloc(sizeof(gdouble)*num*3); gdouble *px2= (gdouble *)g_malloc(sizeof(gdouble)*num*3); gdouble *py2= (gdouble *)g_malloc(sizeof(gdouble)*num*3); gdouble ax,ay,bx,by,cx,cy; GtkPlotDTtriangle *t= NULL; GList *list = NULL; gint i = 0; list = data->triangles; while(list){ t = (GtkPlotDTtriangle *)list->data; ax= gtk_plot_dt_get_node(data,t->a)->x; ay= gtk_plot_dt_get_node(data,t->a)->y; bx= gtk_plot_dt_get_node(data,t->b)->x; by= gtk_plot_dt_get_node(data,t->b)->y; cx= gtk_plot_dt_get_node(data,t->c)->x; cy= gtk_plot_dt_get_node(data,t->c)->y; px1[i*3+0]= ax; py1[i*3+0]= ay; px2[i*3+0]= bx; py2[i*3+0]= by; px1[i*3+1]= bx; py1[i*3+1]= by; px2[i*3+1]= cx; py2[i*3+1]= cy; px1[i*3+2]= cx; py1[i*3+2]= cy; px2[i*3+2]= ax; py2[i*3+2]= ay; i++; list = list->next; } fprintf(stderr,"%d triangles, %d points\n",num,num*3); dataset[0] = GTK_PLOT_DATA(gtk_plot_segment_new()); gtk_plot_segment_set_relative(GTK_PLOT_SEGMENT(dataset[0]), FALSE); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, px2, py2, num*3); gtk_plot_segment_center(GTK_PLOT_SEGMENT(dataset[0]), FALSE); gdk_color_parse("red", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_segment_set_arrow(GTK_PLOT_SEGMENT(dataset[0]), 0, 0, 0); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_OPAQUE, 0,1, &color, &color); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_NONE, 0, 0, 0, &color); gtk_plot_data_set_legend(dataset[0], "Delaunay triangulization"); } static int simpleprogressbar(double p) { static int lastprog= -1; int prog,i; if (p<0) p=0; if (p>1) p=1; prog= 70*p; if (prog>lastprog) { fprintf(stderr,"\r %3d%% ",(int)(p*100)); for (i=0; i1) p=1; prog= 70*p; if (prog>lastprog) { fprintf(stderr,"\r %3d%% ",(int)(p*100)); for (i=0; ipbar= simpleprogressbar; /* read X/Y pairs from f: */ while (fgets(buffer,1000,f)) { if (sscanf(buffer,"%lf %lf", &p.x, &p.y)==2) { /* add this node */ gtk_plot_dt_add_node(dtdata,p); if (xmin>p.x) xmin= p.x; if (xmaxp.y) ymin= p.y; if (ymax * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_ICON_FILESEL_H__ #define __GTK_ICON_FILESEL_H__ #include #include #include "gtkdirtree.h" #include "gtkiconlist.h" #include "gtkfilelist.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define G_TYPE_ICON_FILESEL (gtk_icon_file_selection_get_type ()) #define GTK_ICON_FILESEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ICON_FILESEL, GtkIconFileSel)) #define GTK_ICON_FILESEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_ICON_FILESEL, GtkIconFileSelClass)) #define GTK_IS_ICON_FILESEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ICON_FILESEL)) #define GTK_IS_ICON_FILESEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), G_TYPE_ICON_FILESEL)) typedef struct _GtkIconFileSel GtkIconFileSel; typedef struct _GtkIconFileSelClass GtkIconFileSelClass; struct _GtkIconFileSel { GtkWindow window; gchar *title; gboolean show_tree; GtkWidget *path_label; GtkWidget *tree_window; GtkWidget *dir_tree; GtkWidget *list_window; GtkWidget *file_list; GtkWidget *history_combo; GtkWidget *up_button; GtkWidget *refresh_button; GtkWidget *home_button; guint tree_signal_id; GtkWidget *file_entry; GtkWidget *filter_entry; GtkWidget *ok_button; GtkWidget *cancel_button; GtkWidget *action_area; /* It's a GtkTable with the entries */ gchar *selection; }; struct _GtkIconFileSelClass { GtkWindowClass parent_class; }; GType gtk_icon_file_selection_get_type (void); GtkWidget* gtk_icon_file_selection_new (const gchar *title); void gtk_icon_file_selection_construct (GtkIconFileSel *filesel, const gchar *title); void gtk_icon_file_selection_show_tree (GtkIconFileSel *filesel, gboolean show); gint gtk_icon_file_selection_open_dir (GtkIconFileSel *filesel, const gchar *path); void gtk_icon_file_selection_show_hidden (GtkIconFileSel *filesel, gboolean visible); void gtk_icon_file_selection_set_filter (GtkIconFileSel *filesel, const gchar *filter); const gchar *gtk_icon_file_selection_get_selection(GtkIconFileSel *filesel); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_ICON_FILESEL_H__ */ gtkextra-3.2.0/gtkextra/gtkplotflux.h0000644000076400001440000000642412603754176014674 00000000000000/* gtkplotflux - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_FLUX_H__ #define __GTK_PLOT_FLUX_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_FLUX(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_flux_get_type (), GtkPlotFlux) #define G_TYPE_PLOT_FLUX (gtk_plot_flux_get_type ()) #define GTK_PLOT_FLUX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_flux_get_type(), GtkPlotFluxClass) #define GTK_IS_PLOT_FLUX(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_flux_get_type ()) typedef struct _GtkPlotFlux GtkPlotFlux; typedef struct _GtkPlotFluxClass GtkPlotFluxClass; /** * GtkPlotFlux: * * The GtkPlotFlux struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotFlux { GtkPlotData data; gboolean centered; gint arrow_length; gint arrow_width; GtkPlotSymbolStyle arrow_style; gdouble scale_max; guint size_max; gboolean show_scale; gint labels_precision; gint labels_style; gchar *labels_prefix; gchar *labels_suffix; }; struct _GtkPlotFluxClass { GtkPlotDataClass parent_class; }; GType gtk_plot_flux_get_type (void); GtkWidget* gtk_plot_flux_new (void); void gtk_plot_flux_set_arrow (GtkPlotFlux *flux, gint arrow_length, gint arrow_width, GtkPlotSymbolStyle arrow_style); void gtk_plot_flux_get_arrow (GtkPlotFlux *flux, gint *arrow_length, gint *arrow_width, GtkPlotSymbolStyle *arrow_style); void gtk_plot_flux_center (GtkPlotFlux *flux, gboolean center); gboolean gtk_plot_flux_is_centered (GtkPlotFlux *flux); void gtk_plot_flux_show_scale (GtkPlotFlux *flux, gboolean show); void gtk_plot_flux_set_scale_max (GtkPlotFlux *flux, gdouble scale_max); void gtk_plot_flux_set_size_max (GtkPlotFlux *flux, guint size_max); void gtk_plot_flux_set_labels_precision (GtkPlotFlux *flux, gint precision); void gtk_plot_flux_set_labels_style (GtkPlotFlux *flux, GtkPlotLabelStyle style); void gtk_plot_flux_set_labels_prefix (GtkPlotFlux *flux, const gchar *prefix); void gtk_plot_flux_set_labels_suffix (GtkPlotFlux *flux, const gchar *suffix); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_FLUX_H__ */ gtkextra-3.2.0/gtkextra/gtksheetcolumn.c0000644000076400001440000016566612603754176015356 00000000000000/* GtkSheetColumn widget for Gtk+. * Copyright 2011 Fredy Paquet * * Based on GtkClist widget by Jay Painter, but major changes. * Memory allocation routines inspired on SC (Spreadsheet Calculator) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtksheetcolumn * @short_description: A spreadsheet column widget for #GtkSheet * * The #GtkSheetColumn provides properties for sheet columns. */ #include #include #include #include #include #include #include #include #include #include #define __GTKEXTRA_H_INSIDE__ #include "gtkextra-compat.h" #include "gtkitementry.h" #include "gtksheet.h" #include "gtksheetcolumn.h" #include "gtkextra-marshal.h" #include "gtkextratypebuiltins.h" #undef GTK_SHEET_COL_DEBUG #ifdef DEBUG #define GTK_SHEET_COL_DEBUG 0 /* define to activate debug output */ #endif #ifdef GTK_SHEET_COL_DEBUG # define GTK_SHEET_COL_DEBUG_BUILDER 0 # define GTK_SHEET_COL_DEBUG_DRAW 0 # define GTK_SHEET_COL_DEBUG_PROPERTIES 0 # define GTK_SHEET_COL_DEBUG_SIZE 0 #endif /* local macros */ /* beware - repeated macro definitions from gtksheet.c */ #define COLPTR(sheet, colidx) (sheet->column[colidx]) #define MIN_VIEW_COLUMN(sheet) sheet->view.col0 #define MAX_VIEW_COLUMN(sheet) sheet->view.coli #define GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE (G_MAXINT / 2) static GtkObjectClass *sheet_column_parent_class = NULL; enum _GtkSheetColumnProperties { PROP_0, PROP_SHEET_COLUMN_0, /* dummy */ PROP_SHEET_COLUMN_POSITION, /* position of the column */ PROP_SHEET_COLUMN_LABEL, /* gtk_sheet_column_button_add_label() */ PROP_SHEET_COLUMN_WIDTH, /* gtk_sheet_set_column_width() */ PROP_SHEET_COLUMN_JUSTIFICATION, /* gtk_sheet_column_set_justification() */ PROP_SHEET_COLUMN_ISKEY, /* gtk_sheet_column_set_iskey() */ PROP_SHEET_COLUMN_READONLY, /* gtk_sheet_column_set_readonly() */ PROP_SHEET_COLUMN_DATATYPE, /* gtk_sheet_column_set_datatype() */ PROP_SHEET_COLUMN_DATAFMT, /* gtk_sheet_column_set_format() */ PROP_SHEET_COLUMN_DESCRIPTION, /* gtk_sheet_column_set_description() */ PROP_SHEET_COLUMN_ENTRY_TYPE, /* gtk_sheet_column_set_entry_type() */ PROP_SHEET_COLUMN_VJUST, /* gtk_sheet_column_set_vjustification() */ PROP_SHEET_COLUMN_VISIBLE, /* gtk_sheet_column_set_visibility() */ PROP_SHEET_COLUMN_MAX_LENGTH, /* max char length */ PROP_SHEET_COLUMN_MAX_LENGTH_BYTES, /* max byte length */ PROP_SHEET_COLUMN_WRAP_MODE, /* wrap_mode */ }; static void gtk_sheet_column_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { GtkSheetColumn *colobj = GTK_SHEET_COLUMN(object); GtkSheet *sheet = colobj->sheet; gint col = gtk_sheet_column_get_index(colobj); #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_property: %s called (%d)", pspec->name, property_id); #endif /* note: glade/gtkbuilder will set column properties before the column gets added to the sheet and before the sheet gets realized and mapped. if the column was not yet added (col < 0), we cannot use public interface functions. */ switch(property_id) { case PROP_SHEET_COLUMN_POSITION: { GtkSheetColumn *swapcol; gint newcol = g_value_get_int(value); if (!sheet) return; if (newcol < 0 || newcol > sheet->maxcol) return; if (col < 0) return; if (newcol == col) return; #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_property: swapping column %d/%d", col, newcol); #endif /* method: swap */ swapcol = sheet->column[newcol]; sheet->column[newcol] = sheet->column[col]; sheet->column[col] = swapcol; /* todo: swap cell data! */ _gtk_sheet_reset_text_column(sheet, MIN(col, newcol)); _gtk_sheet_recalc_left_xpixels(sheet); } break; case PROP_SHEET_COLUMN_LABEL: { const gchar *label = g_value_get_string(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { GtkSheetButton *button = &colobj->button; if (button->label) g_free(button->label); button->label = g_strdup(label); } else gtk_sheet_column_button_add_label(sheet, col, label); } break; case PROP_SHEET_COLUMN_WIDTH: { gint width = g_value_get_int(value); if (width < 0) return; if (width < GTK_SHEET_COLUMN_MIN_WIDTH) width = GTK_SHEET_COLUMN_DEFAULT_WIDTH; if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { colobj->width = width; } else { #if GTK_SHEET_COL_DEBUG_SIZE > 0 g_debug("gtk_sheet_column_set_property[%d]: set width %d", col, width); #endif gtk_sheet_set_column_width(sheet, col, width); } } break; case PROP_SHEET_COLUMN_JUSTIFICATION: { gint justification = g_value_get_enum(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { colobj->justification = justification; } else gtk_sheet_column_set_justification(sheet, col, justification); } break; case PROP_SHEET_COLUMN_ISKEY: { gint is_key = g_value_get_boolean(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { colobj->is_key = is_key; } else gtk_sheet_column_set_iskey(sheet, col, is_key); } break; case PROP_SHEET_COLUMN_READONLY: { gint is_readonly = g_value_get_boolean(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { colobj->is_readonly = is_readonly; } else gtk_sheet_column_set_readonly(sheet, col, is_readonly); } break; case PROP_SHEET_COLUMN_DATATYPE: { const gchar *data_type = g_value_get_string(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { if (colobj->data_type) g_free(colobj->data_type); colobj->data_type = g_strdup(data_type); } else gtk_sheet_column_set_datatype(sheet, col, data_type); } break; case PROP_SHEET_COLUMN_DATAFMT: { const gchar *data_format = g_value_get_string(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { if (colobj->data_format) g_free(colobj->data_format); colobj->data_format = g_strdup(data_format); } else gtk_sheet_column_set_format(sheet, col, data_format); } break; case PROP_SHEET_COLUMN_DESCRIPTION: { const gchar *description = g_value_get_string(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { if (colobj->description) g_free(colobj->description); colobj->description = g_strdup(description); } else gtk_sheet_column_set_description(sheet, col, description); } break; case PROP_SHEET_COLUMN_ENTRY_TYPE: { GType entry_type = _gtk_sheet_entry_type_to_gtype(g_value_get_enum(value)); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { colobj->entry_type = entry_type; } else gtk_sheet_column_set_entry_type(sheet, col, entry_type); } break; case PROP_SHEET_COLUMN_VJUST: { GtkSheetVerticalJustification vjust = g_value_get_enum(value); if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { colobj->vjust = vjust; } else gtk_sheet_column_set_vjustification(sheet, col, vjust); } break; case PROP_SHEET_COLUMN_VISIBLE: { gint visible = g_value_get_boolean(value); #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_property: col %d visible %d sheet %p", col, visible, sheet); #endif if ((col < 0) || !G_IS_OBJECT(sheet) || !gtk_widget_get_realized(GTK_WIDGET(sheet))) { GTK_SHEET_COLUMN_SET_VISIBLE(colobj, visible); } else gtk_sheet_column_set_visibility(sheet, col, visible); } break; case PROP_SHEET_COLUMN_MAX_LENGTH: colobj->max_length = g_value_get_int(value); break; case PROP_SHEET_COLUMN_MAX_LENGTH_BYTES: colobj->max_length = g_value_get_int(value); break; case PROP_SHEET_COLUMN_WRAP_MODE: colobj->wrap_mode = g_value_get_enum(value); break; default: /* We don't have any other property... */ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } if (G_IS_OBJECT(sheet) && gtk_widget_get_realized(GTK_WIDGET(sheet)) && !gtk_sheet_is_frozen(sheet)) { _gtk_sheet_range_draw(sheet, NULL, TRUE); } } static void gtk_sheet_column_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { GtkSheetColumn *colobj = GTK_SHEET_COLUMN(object); GtkSheet *sheet = colobj->sheet; gint col = gtk_sheet_column_get_index(colobj); switch(property_id) { case PROP_SHEET_COLUMN_POSITION: { if (!sheet) return; if (col >= 0) g_value_set_int(value, col); } break; case PROP_SHEET_COLUMN_LABEL: g_value_set_string(value, colobj->button.label); break; case PROP_SHEET_COLUMN_WIDTH: g_value_set_int(value, colobj->width); break; case PROP_SHEET_COLUMN_JUSTIFICATION: g_value_set_enum(value, colobj->justification); break; case PROP_SHEET_COLUMN_ISKEY: g_value_set_boolean(value, colobj->is_key); break; case PROP_SHEET_COLUMN_READONLY: g_value_set_boolean(value, colobj->is_readonly); break; case PROP_SHEET_COLUMN_DATATYPE: g_value_set_string(value, colobj->data_type); break; case PROP_SHEET_COLUMN_DATAFMT: g_value_set_string(value, colobj->data_format); break; case PROP_SHEET_COLUMN_DESCRIPTION: g_value_set_string(value, colobj->description); break; case PROP_SHEET_COLUMN_ENTRY_TYPE: { GtkSheetEntryType et = _gtk_sheet_entry_type_from_gtype(colobj->entry_type); g_value_set_enum(value, et); } break; case PROP_SHEET_COLUMN_VJUST: g_value_set_enum(value, colobj->vjust); break; case PROP_SHEET_COLUMN_VISIBLE: g_value_set_boolean(value, GTK_SHEET_COLUMN_IS_VISIBLE(colobj)); break; case PROP_SHEET_COLUMN_MAX_LENGTH: g_value_set_int(value, colobj->max_length); break; case PROP_SHEET_COLUMN_MAX_LENGTH_BYTES: g_value_set_int(value, colobj->max_length_bytes); break; case PROP_SHEET_COLUMN_WRAP_MODE: g_value_set_enum(value, colobj->wrap_mode); break; default: /* We don't have any other property... */ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void gtk_sheet_column_class_init_properties(GObjectClass *gobject_class) { GParamSpec *pspec; gobject_class->set_property = gtk_sheet_column_set_property; gobject_class->get_property = gtk_sheet_column_get_property; /** * GtkSheetColumn:position: * * The packing position of the column */ pspec = g_param_spec_int("position", "Position", "Packing position", 0, 1024, 0, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_POSITION, pspec); /** * GtkSheetColumn:label: * * Label of the column button */ pspec = g_param_spec_string("label", "Column Button Label", "Label of the column button", "" /* default value */, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_LABEL, pspec); /** * GtkSheetColumn:width: * * Width of the column */ pspec = g_param_spec_int("width", "Width", "Width of the column", -1, 8192, -1, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_WIDTH, pspec); /** * GtkSheetColumn:justification: * * Justification of the column */ pspec = g_param_spec_enum("justification", "Justification", "Column justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER)", GTK_TYPE_JUSTIFICATION, GTK_SHEET_COLUMN_DEFAULT_JUSTIFICATION, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_JUSTIFICATION, pspec); /** * GtkSheetColumn:iskey: * * Flag for key columns */ pspec = g_param_spec_boolean("iskey", "Key column", "Wether this is a key column", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_ISKEY, pspec); /** * GtkSheetColumn:readonly: * * Lock column contents for editing. */ pspec = g_param_spec_boolean("readonly", "Readonly", "Column contents are locked for editing", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_READONLY, pspec); /** * GtkSheetColumn:datatype: * * no functionality, a datatype hint for the application because * any widget content is text */ pspec = g_param_spec_string("datatype", "Data type", "Data type for application use", "", G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_DATATYPE, pspec); /** * GtkSheetColumn:dataformat: * * a formatting string that controls what you see when the * widget doesn't contain input focus */ pspec = g_param_spec_string("dataformat", "Data format", "A formatting string that controls what you see when the widget doesn't contain input focus", "", G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_DATAFMT, pspec); /** * GtkSheetColumn:description: * * Description of column contents */ pspec = g_param_spec_string("description", "Description", "Description of column contents", "", G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_DESCRIPTION, pspec); /** * GtkSheetColumn:entry-type: * * Column cell entry widget type */ pspec = g_param_spec_enum("entry-type", "Entry Type", "Supersedes sheet entry type, if not default", gtk_sheet_entry_type_get_type(), GTK_SHEET_ENTRY_TYPE_DEFAULT, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_ENTRY_TYPE, pspec); /** * GtkSheetColumn:vjust: * * Column vertical cell text justification */ pspec = g_param_spec_enum("vjust", "Vertical justification", "Supersedes sheet vertical cell text justification", gtk_sheet_vertical_justification_get_type(), GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_VJUST, pspec); /** * GtkSheetColumn:visible: * * Visible property for columns */ pspec = g_param_spec_boolean("visible", "Column is visible", "Wether the column is visible", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_VISIBLE, pspec); /** * GtkSheetColumn:max-length: * * Maximum number orf characters in this column, Zero if no * maximum. * * This property is passed to the sheet entry editor. It is * supported for the following editors: #GtkItemEntry, * #GtkEntry, #GtkDataTextView * * Since: 3.0.6 */ pspec = g_param_spec_int("max-length", "Maximum char length", "Maximum number orf characters in this column, Zero if no maximum.", 0, GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE, 0, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_MAX_LENGTH, pspec); /** * GtkSheetColumn:max-length-bytes: * * Set the maximum length in bytes for the GtkDataEntry. For * details see #gtk_data_entry_set_max_length_bytes. * * This property is passed to the sheet entry editor. It is * supported for the following editors: #GtkItemEntry, * #GtkDataTextView. * * Sometimes, systems cannot handle UTF-8 string length * correctly, to overcome this problem, you can use the maximum * string length in bytes. When setting both limits, max-length * and max-length-bytes, both must be fulfilled. * * Since: 3.0.6 */ pspec = g_param_spec_int("max-length-bytes", "Maximum bytes length", "The maximum number of bytes for this entry. Zero if no maximum", 0, GTK_DATA_TEXT_VIEW_BUFFER_MAX_SIZE, 0, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_MAX_LENGTH_BYTES, pspec); /** * GtkSheetColumn:wrap-mode: * * This property is passed to the sheet entry editor. It is * supported for the following editors: #GtkTextView, * #GtkDataTextView. * * Since: 3.0.6 */ pspec = g_param_spec_enum("wrap-mode", "Wrap-mode", "Whether to wrap lines never, at word boundaries, or at character boundaries", GTK_TYPE_WRAP_MODE, GTK_WRAP_NONE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_SHEET_COLUMN_WRAP_MODE, pspec); } static void gtk_sheet_column_init(GtkSheetColumn *column) { column->sheet = NULL; column->title = NULL; column->width = GTK_SHEET_COLUMN_DEFAULT_WIDTH; column->requisition = GTK_SHEET_COLUMN_DEFAULT_WIDTH; column->left_xpixel = 0; column->max_extent_width = 0; column->button.state = GTK_STATE_NORMAL; column->button.label = NULL; column->button.label_visible = TRUE; column->button.child = NULL; column->button.justification = GTK_JUSTIFY_CENTER; #if GTK_SHEET_OPTIMIZE_COLUMN_DRAW>0 column->left_text_column = column->right_text_column = 0; #endif column->justification = GTK_SHEET_COLUMN_DEFAULT_JUSTIFICATION; column->vjust = GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT; column->is_key = FALSE; column->is_readonly = FALSE; column->data_format = NULL; column->data_type = NULL; column->description = NULL; column->entry_type = G_TYPE_NONE; column->max_length = 0; column->max_length_bytes = 0; column->wrap_mode = GTK_WRAP_NONE; GTK_SHEET_COLUMN_SET_VISIBLE(column, TRUE); GTK_SHEET_COLUMN_SET_SENSITIVE(column, TRUE); gtk_widget_set_can_focus(GTK_WIDGET(column), TRUE); gtk_widget_set_has_window(GTK_WIDGET(column), FALSE); } /* * gtk_sheet_column_finalize_handler: * * this is the #GtkSheetColumn object class "finalize" handler * * @param gobject the #GtkSheetColumn */ static void gtk_sheet_column_finalize_handler(GObject *gobject) { GtkSheetColumn *column = GTK_SHEET_COLUMN(gobject); if (column->title) { g_free(column->title); column->title = NULL; } if (column->button.label) { g_free(column->button.label); column->button.label = NULL; } if (column->data_format) { g_free(column->data_format); column->data_format = NULL; } if (column->description) { g_free(column->description); column->description = NULL; } G_OBJECT_CLASS(sheet_column_parent_class)->finalize(gobject); } static void gtk_sheet_column_class_init(GtkSheetColumnClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); sheet_column_parent_class = g_type_class_peek_parent(klass); gobject_class->finalize = gtk_sheet_column_finalize_handler; gtk_sheet_column_class_init_properties(gobject_class); } static void gtk_sheet_column_set_buildable_property(GtkBuildable *buildable, GtkBuilder *builder, const gchar *name, const GValue *value) { #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_buildable_property: %s", name); #endif #if 0 if (strcmp(name, "visible") == 0) { gboolean v = g_value_get_boolean(value); # if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_buildable_property: %s = %s", name, v ? "true" : "false"); # endif GTK_SHEET_COLUMN_SET_VISIBLE(buildable, v); } else if (strcmp(name, "width-request") == 0) { # if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_buildable_property: width-request = %d", GTK_SHEET_COLUMN(buildable)->width); # endif GTK_SHEET_COLUMN(buildable)->width = g_value_get_int(value); } else #endif g_object_set_property(G_OBJECT(buildable), name, value); } static void gtk_sheet_column_buildable_init(GtkBuildableIface *iface) { #if GTK_SHEET_COL_DEBUG_BUILDER > 0 g_debug("gtk_sheet_column_buildable_init"); #endif iface->set_buildable_property = gtk_sheet_column_set_buildable_property; } /* Type initialisation */ GType gtk_sheet_column_get_type(void) { static GType sheet_column_type = 0; if (!sheet_column_type) { static const GTypeInfo sheet_column_info = { sizeof(GtkSheetColumnClass), NULL, NULL, (GClassInitFunc)gtk_sheet_column_class_init, NULL, NULL, sizeof(GtkSheetColumn), 0, (GInstanceInitFunc)gtk_sheet_column_init, NULL, }; static const GInterfaceInfo interface_info = { (GInterfaceInitFunc)gtk_sheet_column_buildable_init, (GInterfaceFinalizeFunc)NULL, (gpointer)NULL }; sheet_column_type = g_type_register_static(gtk_widget_get_type(), "GtkSheetColumn", &sheet_column_info, 0); g_type_add_interface_static(sheet_column_type, GTK_TYPE_BUILDABLE, &interface_info); } return (sheet_column_type); } /** * gtk_sheet_column_get: * @sheet: a #GtkSheet. * @col: column index * * Get a #GtkSheetColumn * * Returns: (transfer none) the requested #GtkSheetColumn or * NULL */ GtkSheetColumn *gtk_sheet_column_get(GtkSheet *sheet, gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); return (COLPTR(sheet, col)); } /** * gtk_sheet_column_get_index: * @colobj: #GtkSheetColumn to find * * find index of @colobj in GtkSheet * * Returns: column index or -1 */ gint gtk_sheet_column_get_index(GtkSheetColumn *colobj) { GtkSheet *sheet = colobj->sheet; int i; if (!sheet) return (-1); for (i = 0; i <= sheet->maxcol; i++) { if (COLPTR(sheet, i) == colobj) return (i); } return (-1); } /** * gtk_sheet_column_rightmost_visible: * @sheet: the sheet * * rightmost visible column index * * Returns: index of rightmost visible column or -1 (if none) */ static inline gint gtk_sheet_column_rightmost_visible(GtkSheet *sheet) { gint i, res = -1; for (i = 0; i <= sheet->maxcol; i++) { if (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, i))) res = i; } return (res); } /** * _gtk_sheet_column_left_xpixel: * @sheet: the #GtkSheet * @col: column index * * gives the left pixel of the given column in context of the sheet's hoffset * * Returns: pixel offset */ gint _gtk_sheet_column_left_xpixel(GtkSheet *sheet, gint col) { if (col < 0 || col > sheet->maxcol) return (sheet->hoffset); return (sheet->hoffset + COLPTR(sheet, col)->left_xpixel); } /** * _gtk_sheet_column_right_xpixel: * @sheet: the #GtkSheet * @col: column index * * gives the right pixel of the given column in context of the * sheet's hoffset * * Returns: pixel offset */ gint _gtk_sheet_column_right_xpixel(GtkSheet *sheet, gint col) { gint xpixel = _gtk_sheet_column_left_xpixel(sheet, col); if (0 <= col && col <= sheet->maxcol) xpixel += COLPTR(sheet, col)->width; return (xpixel); } /** * _gtk_sheet_column_size_request: * @sheet: the #GtkSheet * @col: column index * @button_requisition: the requisition width * * size request handler for all sheet buttons */ void _gtk_sheet_column_size_request(GtkSheet *sheet, gint col, guint *requisition) { GtkRequisition button_requisition; GList *children; _gtk_sheet_button_size_request(sheet, &COLPTR(sheet, col)->button, &button_requisition); *requisition = button_requisition.width; children = sheet->children; while (children) { GtkSheetChild *child = (GtkSheetChild *)children->data; GtkRequisition child_requisition; if (child->attached_to_cell && child->col == col && child->row != -1 && !child->floating && !child->xshrink) { gtk_widget_get_child_requisition(child->widget, &child_requisition); if (child_requisition.width + 2 * child->xpadding > *requisition) *requisition = child_requisition.width + 2 * child->xpadding; } children = children->next; } COLPTR(sheet, col)->requisition = *requisition; #if GTK_SHEET_COL_DEBUG_SIZE > 0 g_debug("_gtk_sheet_column_size_request: col %d = %d", col, *requisition); #endif } /** * _gtk_sheet_column_buttons_size_allocate: * @sheet: the #GtkSheet * * column title button size allocation */ void _gtk_sheet_column_buttons_size_allocate(GtkSheet *sheet) { gint i, x, width; GdkRectangle *cta = &sheet->column_title_area; if (!sheet->column_titles_visible) return; if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; #if GTK_SHEET_COL_DEBUG_SIZE > 0 g_debug("_gtk_sheet_column_buttons_size_allocate: called"); #endif width = sheet->sheet_window_width; x = 0; if (sheet->row_titles_visible) { width -= sheet->row_title_area.width; x = sheet->row_title_area.width; } /* if neccessary, resize the column title window */ if (cta->width != width || cta->x != x) { cta->width = width; cta->x = x; gdk_window_move_resize(sheet->column_title_window, cta->x, cta->y, cta->width, cta->height); } /* if the right edge of the sheet is visible, clear it */ if (MAX_VIEW_COLUMN(sheet) >= sheet->maxcol) { gint mc = gtk_sheet_column_rightmost_visible(sheet); gint mx = _gtk_sheet_column_right_xpixel(sheet, mc); if (sheet->row_titles_visible) mx -= sheet->row_title_area.width; #if GTK_SHEET_COL_DEBUG_SIZE > 0 # if 0 g_debug("_gtk_sheet_column_buttons_size_allocate: mc %d mx %d w %d", mc, mx, cta->width-mx); # endif #endif gdk_window_clear_area(sheet->column_title_window, mx, 0, cta->width - mx, cta->height); } if (!gtk_widget_is_drawable(GTK_WIDGET(sheet))) return; for (i = MIN_VIEW_COLUMN(sheet); i <= MAX_VIEW_COLUMN(sheet); i++) { _gtk_sheet_draw_button(sheet, -1, i); } } /** * gtk_sheet_set_column_width: * @sheet: a #GtkSheet. * @column: column number. * @width: the width of the column. * * Set column width. */ void gtk_sheet_set_column_width(GtkSheet *sheet, gint col, guint width) { guint min_width; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; #if GTK_SHEET_COL_DEBUG_SIZE > 0 g_debug("gtk_sheet_set_column_width[%d]: width %d", col, width); #endif _gtk_sheet_column_size_request(sheet, col, &min_width); if (width < min_width) return; COLPTR(sheet, col)->width = width; _gtk_sheet_recalc_left_xpixels(sheet); if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && !gtk_sheet_is_frozen(sheet)) { _gtk_sheet_column_buttons_size_allocate(sheet); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_entry_size_allocate(sheet); _gtk_sheet_range_draw(sheet, NULL, TRUE); } g_signal_emit_by_name(GTK_OBJECT(sheet), "new-column-width", col, width); } /** * gtk_sheet_get_column_width: * @sheet: a #GtkSheet * @column: column number * * Get column width. * * Returns: column width */ const gint gtk_sheet_get_column_width(GtkSheet *sheet, gint col) { g_return_val_if_fail(sheet != NULL, 0); g_return_val_if_fail(GTK_IS_SHEET(sheet), 0); return (COLPTR(sheet, col)->width); } /** * gtk_sheet_column_button_add_label: * @sheet: a #GtkSheet * @col: column number * @label: text label * * Set button label.It is used to set a column title. */ void gtk_sheet_column_button_add_label(GtkSheet *sheet, gint col, const gchar *label) { GtkSheetButton *button; GtkRequisition req; gboolean aux_c, aux_r; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; #if GTK_SHEET_COL_DEBUG_SIZE > 0 g_debug("gtk_sheet_column_button_add_label: col %d", col); #endif button = &COLPTR(sheet, col)->button; if (button->label) g_free(button->label); button->label = g_strdup(label); aux_c = gtk_sheet_autoresize_columns(sheet); aux_r = gtk_sheet_autoresize_rows(sheet); gtk_sheet_set_autoresize(sheet, FALSE); gtk_sheet_set_autoresize_columns(sheet, TRUE); _gtk_sheet_button_size_request(sheet, button, &req); gtk_sheet_set_autoresize_columns(sheet, aux_c); gtk_sheet_set_autoresize_rows(sheet, aux_r); if (req.width > COLPTR(sheet, col)->width) { #if GTK_SHEET_COL_DEBUG_SIZE > 0 g_debug("gtk_sheet_column_button_add_label[%d]: set width %d", col, req.width); #endif gtk_sheet_set_column_width(sheet, col, req.width); } if (req.height > sheet->column_title_area.height) gtk_sheet_set_column_titles_height(sheet, req.height); if (!gtk_sheet_is_frozen(sheet)) { _gtk_sheet_draw_button(sheet, -1, col); } g_signal_emit_by_name(GTK_OBJECT(sheet), "changed", -1, col); } /** * gtk_sheet_column_set_justification: * @sheet: a #GtkSheet. * @col: column number * @just: a #GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER * * Set column justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER). * The default value is GTK_JUSTIFY_LEFT. * If autoformat is on, the default justification for numbers is * GTK_JUSTIFY_RIGHT. */ void gtk_sheet_column_set_justification(GtkSheet *sheet, gint col, GtkJustification justification) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; COLPTR(sheet, col)->justification = justification; if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && !gtk_sheet_is_frozen(sheet) && col >= MIN_VIEW_COLUMN(sheet) && col <= MAX_VIEW_COLUMN(sheet)) { _gtk_sheet_range_draw(sheet, NULL, TRUE); } } /** * gtk_sheet_column_get_justification: * @sheet: a #GtkSheet. * @col: column number * * Get the column justification. * * Returns: a #GtkJustification */ GtkJustification gtk_sheet_column_get_justification(GtkSheet *sheet, gint col) { g_return_val_if_fail(sheet != NULL, GTK_JUSTIFY_LEFT); g_return_val_if_fail(GTK_IS_SHEET(sheet), GTK_JUSTIFY_LEFT); if (col < 0 || col > sheet->maxcol) return (GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT); return (COLPTR(sheet, col)->justification); } /** * gtk_sheet_column_set_vjustification: * @sheet: a #GtkSheet. * @col: column number * @vjust: a #GtkSheetVerticalJustification * * Set vertical cell text jjustification */ void gtk_sheet_column_set_vjustification(GtkSheet *sheet, gint col, GtkSheetVerticalJustification vjust) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; COLPTR(sheet, col)->vjust = vjust; if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && !gtk_sheet_is_frozen(sheet) && col >= MIN_VIEW_COLUMN(sheet) && col <= MAX_VIEW_COLUMN(sheet)) { _gtk_sheet_range_draw(sheet, NULL, TRUE); } } /** * gtk_sheet_column_get_vjustification: * @sheet: a #GtkSheet. * @col: column number * * Get the vertical cell text justification. This overrides the * default vertical cell text justification of the #GtkSheet. * * Returns: a #GtkSheetVerticalJustification */ GtkSheetVerticalJustification gtk_sheet_column_get_vjustification(GtkSheet *sheet, gint col) { g_return_val_if_fail(sheet != NULL, GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT); g_return_val_if_fail(GTK_IS_SHEET(sheet), GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT); if (col < 0 || col > sheet->maxcol) return (GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT); return (COLPTR(sheet, col)->vjust); } /** * gtk_sheet_column_get_iskey: * @sheet: a #GtkSheet. * @col: column index * * Gets the column is_key flag * * Returns: the is_key flag */ gboolean gtk_sheet_column_get_iskey(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if (col < 0 || col > sheet->maxcol) return (FALSE); return (COLPTR(sheet, col)->is_key); } /** * gtk_sheet_column_set_iskey: * @sheet: a #GtkSheet. * @col: column index * @is_key: the column is_key flag * * Sets the column is_key flag. This flag has no effect on * calculation or presentation, it is reserved for application * usage. */ void gtk_sheet_column_set_iskey(GtkSheet *sheet, const gint col, const gboolean is_key) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; COLPTR(sheet, col)->is_key = is_key; } /** * gtk_sheet_column_get_readonly: * @sheet: a #GtkSheet. * @col: column index * * Gets the column readonly flag * * Returns: the readonly flag */ gboolean gtk_sheet_column_get_readonly(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if (col < 0 || col > sheet->maxcol) return (FALSE); return (COLPTR(sheet, col)->is_readonly); } /** * gtk_sheet_column_set_readonly: * @sheet: a #GtkSheet. * @col: column index * @is_readonly: the column is_readonly flag * * Sets the column readonly flag. * A cell is editable if the sheet is not locked, the column is * not readonly and the cell (-range) was set to editable. */ void gtk_sheet_column_set_readonly(GtkSheet *sheet, const gint col, const gboolean is_readonly) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; COLPTR(sheet, col)->is_readonly = is_readonly; } /** * gtk_sheet_column_get_format: * @sheet: a #GtkSheet. * @col: column index * * Gets the column data formatting pattern * * Returns: the formatting pattern or NULL, You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_column_get_format(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); return (g_strdup(COLPTR(sheet, col)->data_format)); } /** * gtk_sheet_column_set_format: * @sheet: a #GtkSheet. * @col: column index * @format: the data_format pattern or NULL * * Sets the column data formatting pattern. */ void gtk_sheet_column_set_format(GtkSheet *sheet, const gint col, const gchar *data_format) { GtkSheetColumn *colp; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; colp = COLPTR(sheet, col); if (colp->data_format) g_free(colp->data_format); colp->data_format = g_strdup(data_format); } /** * gtk_sheet_column_get_datatype: * @sheet: a #GtkSheet. * @col: column index * * Gets the column data_type for application use * * Returns: the datatype or NULL */ gchar *gtk_sheet_column_get_datatype(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); return (g_strdup(COLPTR(sheet, col)->data_type)); } /** * gtk_sheet_column_set_datatype: * @sheet: a #GtkSheet. * @col: column index * @data_type: the datatype * * Sets the column data data_type for application use */ void gtk_sheet_column_set_datatype(GtkSheet *sheet, const gint col, const gchar *data_type) { GtkSheetColumn *colp; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; colp = COLPTR(sheet, col); if (colp->data_type) g_free(colp->data_type); colp->data_type = g_strdup(data_type); } /** * gtk_sheet_column_get_description: * @sheet: a #GtkSheet. * @col: column index * * Gets the column description * * Returns: the description or NULL, You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_column_get_description(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); return (g_strdup(COLPTR(sheet, col)->description)); } /** * gtk_sheet_column_set_description: * @sheet: a #GtkSheet. * @col: column index * @description: the description or NULL * * Sets the column description. */ void gtk_sheet_column_set_description(GtkSheet *sheet, const gint col, const gchar *description) { GtkSheetColumn *colp; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; colp = COLPTR(sheet, col); if (colp->description) g_free(colp->description); colp->description = g_strdup(description); } /** * gtk_sheet_column_get_entry_type: * @sheet: a #GtkSheet. * @col: column index * * Gets the column entry type if known * * Returns: the entry type or GTK_SHEET_ENTRY_TYPE_DEFAULT */ GType gtk_sheet_column_get_entry_type(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, GTK_SHEET_ENTRY_TYPE_DEFAULT); g_return_val_if_fail(GTK_IS_SHEET(sheet), GTK_SHEET_ENTRY_TYPE_DEFAULT); if (col < 0 || col > sheet->maxcol) return (GTK_SHEET_ENTRY_TYPE_DEFAULT); return (COLPTR(sheet, col)->entry_type); } /** * gtk_sheet_column_set_entry_type: * @sheet: a #GtkSheet. * @col: column index * @entry_type: the entry type or G_TYPE_NONE * * Supersedes the sheet entry type for this column. Pass * G_TYPE_NONE to reset the column to the sheet entry type. */ void gtk_sheet_column_set_entry_type(GtkSheet *sheet, const gint col, const GType entry_type) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; COLPTR(sheet, col)->entry_type = entry_type ? entry_type : G_TYPE_NONE; } /** * gtk_sheet_column_get_tooltip_markup: * @sheet: a #GtkSheet. * @col: column index * * Gets the contents of the tooltip (markup) for the column * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_column_get_tooltip_markup(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); return (gtk_widget_get_tooltip_markup(GTK_WIDGET(COLPTR(sheet, col)))); } /** * gtk_sheet_column_set_tooltip_markup: * @sheet: a #GtkSheet. * @col: column index * @markup: the contents of the tooltip for widget, or NULL. * * Sets markup as the contents of the tooltip, which is marked * up with the Pango text markup language. */ void gtk_sheet_column_set_tooltip_markup(GtkSheet *sheet, const gint col, const gchar *markup) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; gtk_widget_set_tooltip_markup(GTK_WIDGET(COLPTR(sheet, col)), markup); } /** * gtk_sheet_column_get_tooltip_text: * @sheet: a #GtkSheet. * @col: column index * * Gets the contents of the tooltip for the column * * Returns: the tooltip text, or NULL. You should free the * returned string with g_free() when done. */ gchar *gtk_sheet_column_get_tooltip_text(GtkSheet *sheet, const gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); return (gtk_widget_get_tooltip_text(GTK_WIDGET(COLPTR(sheet, col)))); } /** * gtk_sheet_column_set_tooltip_text: * @sheet: a #GtkSheet. * @col: column index * @text: the contents of the tooltip for widget * * Sets text as the contents of the tooltip. */ void gtk_sheet_column_set_tooltip_text(GtkSheet *sheet, const gint col, const gchar *text) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; gtk_widget_set_tooltip_text(GTK_WIDGET(COLPTR(sheet, col)), text); } /** * gtk_sheet_column_sensitive: * @sheet: a #GtkSheet. * @column: column number * * Get column button sensitivity. * * Returns: * TRUE - the column is sensitive, FALSE - insensitive or not * existant */ gboolean gtk_sheet_column_sensitive(GtkSheet *sheet, gint column) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if (column < 0 || column > sheet->maxcol) return (FALSE); return (GTK_SHEET_COLUMN_IS_SENSITIVE(COLPTR(sheet, column))); } /** * gtk_sheet_column_set_sensitivity: * @sheet: a #GtkSheet. * @column: column number * @sensitive: TRUE or FALSE * * Set column button sensitivity. If sensitivity is TRUE it can be toggled, otherwise it acts as a title. */ void gtk_sheet_column_set_sensitivity(GtkSheet *sheet, gint col, gboolean sensitive) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_sensitivity: col %d", col); #endif GTK_SHEET_COLUMN_SET_SENSITIVE(COLPTR(sheet, col), sensitive); if (!sensitive) COLPTR(sheet, col)->button.state = GTK_STATE_INSENSITIVE; else COLPTR(sheet, col)->button.state = GTK_STATE_NORMAL; if (gtk_widget_get_realized(GTK_WIDGET(sheet)) && !gtk_sheet_is_frozen(sheet)) { _gtk_sheet_draw_button(sheet, -1, col); } } /** * gtk_sheet_columns_set_sensitivity: * @sheet: a #GtkSheet. * @sensitive: TRUE or FALSE * * Set all columns buttons sensitivity. If sensitivity is TRUE * button can be toggled, otherwise act as titles. The sheet itself * has no such property, it is a convenience function to set the * property for all existing columns. */ void gtk_sheet_columns_set_sensitivity(GtkSheet *sheet, gboolean sensitive) { gint i; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); for (i = 0; i <= sheet->maxcol; i++) gtk_sheet_column_set_sensitivity(sheet, i, sensitive); } /** * gtk_sheet_columns_set_resizable: * @sheet: a #GtkSheet. * @resizable: TRUE or FALSE * * Set columns resizable status. */ void gtk_sheet_columns_set_resizable(GtkSheet *sheet, gboolean resizable) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); sheet->columns_resizable = resizable; } /** * gtk_sheet_columns_resizable: * @sheet: a #GtkSheet. * * Get columns resizable status. * * Returns: TRUE or FALSE */ gboolean gtk_sheet_columns_resizable(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->columns_resizable); } /** * _gtk_sheet_column_button_set: * @sheet: the #GtkSheet * @col: column index * * activate and draw column button */ void _gtk_sheet_column_button_set(GtkSheet *sheet, gint col) { if (col < 0 || col > sheet->maxcol) return; if (COLPTR(sheet, col)->button.state == GTK_STATE_ACTIVE) return; #if GTK_SHEET_COL_DEBUG_DRAW > 0 g_debug("_gtk_sheet_column_button_set: col %d", col); #endif COLPTR(sheet, col)->button.state = GTK_STATE_ACTIVE; _gtk_sheet_draw_button(sheet, -1, col); } /** * _gtk_sheet_column_button_release: * @sheet: the #GtkSheet * @col: column index * * reset and draw column button */ void _gtk_sheet_column_button_release(GtkSheet *sheet, gint col) { if (col < 0 || col > sheet->maxcol) return; if (COLPTR(sheet, col)->button.state == GTK_STATE_NORMAL) return; #if GTK_SHEET_COL_DEBUG_DRAW > 0 g_debug("_gtk_sheet_column_button_release: col %d", col); #endif COLPTR(sheet, col)->button.state = GTK_STATE_NORMAL; _gtk_sheet_draw_button(sheet, -1, col); } /** * gtk_sheet_column_visible: * @sheet: a #GtkSheet. * @column: column number * * Get column visible property. * * Returns: TRUE - visible, FALSE - hidden or not existant */ gboolean gtk_sheet_column_visible(GtkSheet *sheet, gint column) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); if (column < 0 || column > sheet->maxcol) return (FALSE); return (GTK_SHEET_COLUMN_IS_VISIBLE(COLPTR(sheet, column))); } /** * gtk_sheet_column_set_visibility: * @sheet: a #GtkSheet. * @column: column number * @visible: TRUE or FALSE * * Set column visible property. * * Default value is TRUE. When set to FALSE, the column is * hidden. */ void gtk_sheet_column_set_visibility(GtkSheet *sheet, gint col, gboolean visible) { GtkSheetColumn *colobj; gint act_row, act_col; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; colobj = COLPTR(sheet, col); if (GTK_SHEET_COLUMN_IS_VISIBLE(colobj) == visible) return; act_row = sheet->active_cell.row; act_col = sheet->active_cell.col; if (act_col == col) /* hide active column -> disable active cell */ { _gtk_sheet_hide_active_cell(sheet); sheet->active_cell.row = -1; sheet->active_cell.col = -1; } #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_set_visibility: col %d = %s, m %d r %d v %d parent %p", col, visible ? "true" : "false", gtk_widget_get_mapped(GTK_WIDGET(colobj)), gtk_widget_get_realized(GTK_WIDGET(colobj)), gtk_widget_get_visible(GTK_WIDGET(colobj)), gtk_widget_get_parent(GTK_WIDGET(colobj)) ); #endif /* the following is a hack, to get rid of: ? Gtk - gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed */ if (!gtk_widget_get_visible(GTK_WIDGET(colobj))) { gtk_widget_unparent(GTK_WIDGET(colobj)); } GTK_SHEET_COLUMN_SET_VISIBLE(colobj, visible); _gtk_sheet_range_fixup(sheet, &sheet->range); _gtk_sheet_recalc_left_xpixels(sheet); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, TRUE, FALSE); } /** * gtk_sheet_column_button_justify: * @sheet: a #GtkSheet. * @col: column number * @justification: a #GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, * CENTER * * Set the justification(alignment) of the column buttons. */ void gtk_sheet_column_button_justify(GtkSheet *sheet, gint col, GtkJustification justification) { GtkSheetButton *button; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_button_justify: col %d", col); #endif button = &COLPTR(sheet, col)->button; button->justification = justification; if (!gtk_sheet_is_frozen(sheet)) { _gtk_sheet_draw_button(sheet, -1, col); } } /** * gtk_sheet_column_button_get_label: * @sheet: a #GtkSheet. * @col: column number. * * Get column button label. * * Returns: Column button label. */ const gchar * gtk_sheet_column_button_get_label(GtkSheet *sheet, gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); if (col < 0 || col > sheet->maxcol) return (NULL); return (COLPTR(sheet, col)->button.label); } /** * gtk_sheet_column_label_set_visibility: * @sheet: a #GtkSheet. * @col: column number. * @visible: TRUE or FALSE * * Set column label visibility. The default value is TRUE. If FALSE, the column label is hidden. */ void gtk_sheet_column_label_set_visibility(GtkSheet *sheet, gint col, gboolean visible) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (col < 0 || col > sheet->maxcol) return; #if GTK_SHEET_COL_DEBUG_PROPERTIES > 0 g_debug("gtk_sheet_column_label_set_visibility: col %d", col); #endif COLPTR(sheet, col)->button.label_visible = visible; if (!gtk_sheet_is_frozen(sheet)) { _gtk_sheet_draw_button(sheet, -1, col); } } /** * gtk_sheet_columns_labels_set_visibility: * @sheet: a #GtkSheet. * @visible: TRUE or FALSE * * Set all columns labels visibility. The default value is TRUE. * If FALSE, the columns labels are hidden. The sheet itself * has no such property, it is a convenience function to set the * property for all existing columns. */ void gtk_sheet_columns_labels_set_visibility(GtkSheet *sheet, gboolean visible) { gint i; g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); for (i = 0; i <= sheet->maxcol; i++) gtk_sheet_column_label_set_visibility(sheet, i, visible); } /** * gtk_sheet_set_column_titles_height: * @sheet: a #GtkSheet * @height: column title height. * * Resize column titles area . */ void gtk_sheet_set_column_titles_height(GtkSheet *sheet, guint height) { if (height < _gtk_sheet_row_default_height(GTK_WIDGET(sheet))) return; sheet->column_title_area.height = height; _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_left_xpixels(sheet); _gtk_sheet_recalc_view_range(sheet); _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, FALSE, TRUE); } /** * gtk_sheet_show_column_titles: * @sheet: a #GtkSheet * * Show column titles . */ void gtk_sheet_show_column_titles(GtkSheet *sheet) { gint col; if (sheet->column_titles_visible) return; sheet->column_titles_visible = TRUE; _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_left_xpixels(sheet); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (gtk_sheet_is_frozen(sheet)) return; gdk_window_show(sheet->column_title_window); gdk_window_move_resize(sheet->column_title_window, sheet->column_title_area.x, sheet->column_title_area.y, sheet->column_title_area.width, sheet->column_title_area.height); for (col = MIN_VIEW_COLUMN(sheet); col <= MAX_VIEW_COLUMN(sheet); col++) { GtkSheetChild *child; if (col < 0 || col > sheet->maxcol) continue; child = COLPTR(sheet, col)->button.child; if (child) _gtk_sheet_child_show(child); } _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, FALSE, TRUE); } /** * gtk_sheet_hide_column_titles: * @sheet: a #GtkSheet * * Hide column titles . */ void gtk_sheet_hide_column_titles(GtkSheet *sheet) { gint col; if (!sheet->column_titles_visible) return; sheet->column_titles_visible = FALSE; _gtk_sheet_recalc_top_ypixels(sheet); _gtk_sheet_recalc_left_xpixels(sheet); if (!gtk_widget_get_realized(GTK_WIDGET(sheet))) return; if (gtk_sheet_is_frozen(sheet)) return; if (sheet->column_title_window) gdk_window_hide(sheet->column_title_window); if (gtk_widget_get_visible(sheet->button)) gtk_widget_hide(sheet->button); for (col = MIN_VIEW_COLUMN(sheet); col <= MAX_VIEW_COLUMN(sheet); col++) { GtkSheetChild *child; if (col < 0 || col > sheet->maxcol) continue; child = COLPTR(sheet, col)->button.child; if (child) _gtk_sheet_child_hide(child); } _gtk_sheet_scrollbar_adjust(sheet); _gtk_sheet_redraw_internal(sheet, FALSE, TRUE); } /** * gtk_sheet_set_column_title: * @sheet: a #GtkSheet * @column: column number * @title: column title * * Set column title. */ void gtk_sheet_set_column_title(GtkSheet *sheet, gint col, const gchar *title) { g_return_if_fail(sheet != NULL); g_return_if_fail(GTK_IS_SHEET(sheet)); if (COLPTR(sheet, col)->title) g_free(COLPTR(sheet, col)->title); COLPTR(sheet, col)->title = g_strdup(title); } /** * gtk_sheet_get_column_title: * @sheet: a #GtkSheet * @column: column number * * Get column title. * * Returns: column title, do not modify or free it. */ const gchar * gtk_sheet_get_column_title(GtkSheet *sheet, gint col) { g_return_val_if_fail(sheet != NULL, NULL); g_return_val_if_fail(GTK_IS_SHEET(sheet), NULL); return (COLPTR(sheet, col)->title); } /** * gtk_sheet_column_titles_visible: * @sheet: a #GtkSheet * * Get the visibility of sheet column titles . * * Returns: TRUE or FALSE */ gboolean gtk_sheet_column_titles_visible(GtkSheet *sheet) { g_return_val_if_fail(sheet != NULL, FALSE); g_return_val_if_fail(GTK_IS_SHEET(sheet), FALSE); return (sheet->column_titles_visible); } gtkextra-3.2.0/gtkextra/gtkcombobutton.h0000644000076400001440000000375212603754176015353 00000000000000/* gtkcombo_button - combo_button widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_COMBO_BUTTON_H__ #define __GTK_COMBO_BUTTON_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_COMBO_BUTTON(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_combo_button_get_type (), GtkComboButton) #define GTK_COMBO_BUTTON_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_combo_button_get_type (), GtkComboButtonClass) #define GTK_IS_COMBO_BUTTON(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_combo_button_get_type ()) typedef struct _GtkComboButton GtkComboButton; typedef struct _GtkComboButtonClass GtkComboButtonClass; /* you should access only the entry and list fields directly */ struct _GtkComboButton { GtkHBox hbox; GtkWidget *button; GtkWidget *arrow; GtkWidget *popup; GtkWidget *popwin; GtkWidget *frame; }; struct _GtkComboButtonClass { GtkHBoxClass parent_class; }; GType gtk_combo_button_get_type (void); GtkWidget *gtk_combo_button_new (void); void gtk_combo_button_hide_popdown_window (GtkComboButton *combo_button); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_COMBO_BUTTON_H__ */ gtkextra-3.2.0/gtkextra/gtkcharsel.c0000644000076400001440000002430512603754176014431 00000000000000/* gtkcharselection - character selection dialog for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkcharsel * @short_description: Character selection dialog * * Char selection is a widget which contains all the characters in a font. * Connecting a callback to the ok button of the widget you get the selected char. */ /** * GtkCharSelection: * * The GtkCharSelection struct contains only private data. * It should only be accessed through the functions described below. */ #include #include #include #include "gtkextra-compat.h" #include "gtkcharsel.h" static void gtk_char_selection_class_init (GtkCharSelectionClass *klass); static void gtk_char_selection_init (GtkCharSelection *charsel); static void gtk_char_selection_realize (GtkWidget *widget); static void gtk_char_selection_map (GtkWidget *widget); static void new_font (GtkFontCombo *font_combo, gpointer data); static void new_selection (GtkButton *button, gpointer data); static GtkWindowClass *parent_class = NULL; GType gtk_char_selection_get_type (void) { static GType charsel_type = 0; if (!charsel_type) { charsel_type = g_type_register_static_simple ( gtk_window_get_type(), "GtkCharSelection", sizeof (GtkCharSelectionClass), (GClassInitFunc) gtk_char_selection_class_init, sizeof (GtkCharSelection), (GInstanceInitFunc) gtk_char_selection_init, 0); } return charsel_type; } GtkWidget* gtk_char_selection_new (void) { GtkWidget *widget; widget = gtk_widget_new (gtk_char_selection_get_type(), NULL); return widget; } static void gtk_char_selection_class_init (GtkCharSelectionClass *klass) { GtkWidgetClass *widget_class; widget_class = (GtkWidgetClass*) klass; parent_class = g_type_class_ref (gtk_window_get_type ()); widget_class->realize = gtk_char_selection_realize; widget_class->map = gtk_char_selection_map; } static void gtk_char_selection_init (GtkCharSelection *charsel) { GtkWidget *main_vbox; GtkWidget *action_area; GtkWidget *frame; GtkWidget *separator; GtkWidget *label; gint i; charsel->selection = -1; gtk_window_set_resizable(GTK_WINDOW(charsel), FALSE); gtk_window_set_title(GTK_WINDOW(charsel), "Select Character"); gtk_container_set_border_width (GTK_CONTAINER (charsel), 10); main_vbox=gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(main_vbox), 0); gtk_container_add(GTK_CONTAINER(charsel), main_vbox); gtk_widget_show(main_vbox); charsel->font_combo = GTK_FONT_COMBO(gtk_font_combo_new()); gtk_box_pack_start(GTK_BOX(main_vbox), GTK_WIDGET(charsel->font_combo), TRUE, TRUE, 0); label = gtk_label_new("Font: "); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(charsel->font_combo)); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start(GTK_BOX(main_vbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); charsel->table = GTK_TABLE(gtk_table_new(FALSE, 8, 32)); gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(charsel->table)); gtk_widget_show(GTK_WIDGET(charsel->table)); for(i = 0; i < 256; i++){ gint x, y; y = i / 32; x = i % 32; charsel->button[i] = GTK_TOGGLE_BUTTON(gtk_toggle_button_new()); gtk_container_set_border_width(GTK_CONTAINER(charsel->button[i]), 0); gtk_table_attach_defaults(charsel->table, GTK_WIDGET(charsel->button[i]), x, x+1, y, y+1); /* gtk_button_set_relief(GTK_BUTTON(charsel->button[i]), GTK_RELIEF_NONE); */ gtk_widget_set_size_request(GTK_WIDGET(charsel->button[i]), 18, 18); gtk_widget_show(GTK_WIDGET(charsel->button[i])); g_signal_connect(GTK_OBJECT(charsel->button[i]), "clicked", (void *)new_selection, charsel); } /* Action Area */ separator = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(main_vbox), separator, TRUE, TRUE, 0); gtk_widget_show(separator); charsel->action_area = action_area = gtk_hbutton_box_new (); gtk_button_box_set_layout(GTK_BUTTON_BOX(action_area), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(action_area), 5); gtk_box_pack_end (GTK_BOX (main_vbox), action_area, FALSE, FALSE, 0); gtk_widget_show (action_area); charsel->ok_button = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_box_pack_start (GTK_BOX (action_area), charsel->ok_button, TRUE, TRUE, 0); gtk_widget_show (charsel->ok_button); charsel->cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_box_pack_start (GTK_BOX (action_area), charsel->cancel_button, TRUE, TRUE, 0); gtk_widget_show (charsel->cancel_button); /* Signals */ g_signal_connect(GTK_OBJECT(charsel->font_combo), "changed", (void *)new_font, charsel); new_font(charsel->font_combo, charsel); } static void gtk_char_selection_realize (GtkWidget *widget) { GtkCharSelection *charsel; charsel = GTK_CHAR_SELECTION(widget); GTK_WIDGET_CLASS(parent_class)->realize(widget); } static void gtk_char_selection_map (GtkWidget *widget) { GtkCharSelection *charsel; charsel = GTK_CHAR_SELECTION(widget); GTK_WIDGET_CLASS(parent_class)->map(widget); new_font(charsel->font_combo, charsel); } static void new_font(GtkFontCombo *font_combo, gpointer data) { GtkCharSelection *charsel; GdkColor color; GdkPixmap *pixmap; GtkWidget *wpixmap; PangoFontDescription *font; PangoContext *context = gtk_widget_get_pango_context(GTK_WIDGET(data)); PangoFontMetrics *metrics; PangoLayout *layout; gint ascent, descent; gint width; gint i; charsel = GTK_CHAR_SELECTION(data); gdk_color_white(gtk_widget_get_colormap(GTK_WIDGET(charsel)), &color); font = gtk_font_combo_get_font_description(font_combo); layout = gtk_widget_create_pango_layout(GTK_WIDGET(charsel), NULL); pango_layout_set_font_description(layout, font); metrics = pango_context_get_metrics(context, font, pango_context_get_language(context)); ascent = PANGO_PIXELS(pango_font_metrics_get_ascent(metrics)); descent = PANGO_PIXELS(pango_font_metrics_get_descent(metrics)); pango_font_metrics_unref(metrics); width = ascent + descent + 8; for(i = 0; i < 256; i++){ GtkWidget *widget; PangoRectangle rect; GtkRequisition req; gchar *s2; gunichar s[2]; s[0] = i; s[1] = '\0'; s2 = g_ucs4_to_utf8(s,1,NULL,NULL,NULL); widget = GTK_WIDGET(charsel->button[i]); if(gtk_bin_get_child(GTK_BIN(widget))) gtk_container_remove(GTK_CONTAINER(widget), gtk_bin_get_child(GTK_BIN(widget))); pango_layout_set_text(layout, s2, -1); g_free(s2); pango_layout_get_extents(layout, NULL, &rect); req.width = width + 2 * gtk_widget_get_style(widget)->xthickness; req.height = PANGO_PIXELS(rect.height); if(gtk_widget_get_mapped(widget)){ pixmap = gdk_pixmap_new(gtk_widget_get_window(widget), width, width, -1); gdk_draw_rectangle(pixmap, gtk_widget_get_style(widget)->white_gc, TRUE, 0, 0, width, width); gdk_draw_layout(pixmap, gtk_widget_get_style(widget)->fg_gc[GTK_STATE_NORMAL], width/2 - PANGO_PIXELS(rect.width)/2, descent, layout); wpixmap = gtk_image_new_from_pixmap(pixmap, NULL); gtk_container_add (GTK_CONTAINER (charsel->button[i]), wpixmap); gtk_widget_show(wpixmap); gdk_pixmap_unref(pixmap); } gtk_widget_set_size_request(widget, req.width, req.width); if(charsel->selection == i) gtk_toggle_button_set_active(charsel->button[i], TRUE); else gtk_toggle_button_set_active(charsel->button[i], FALSE); } pango_font_description_free(font); g_object_unref(G_OBJECT(layout)); } static void new_selection(GtkButton *button, gpointer data) { GtkCharSelection *charsel; gint i; gint new_selection = -1; charsel = GTK_CHAR_SELECTION(data); for(i = 0; i < 256; i++){ if(button == GTK_BUTTON(charsel->button[i])){ new_selection = i; break; } } if(new_selection == charsel->selection){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(charsel->button[new_selection]), TRUE); return; } if(new_selection != -1){ gtk_char_selection_set_selection(charsel, new_selection); } } /** * gtk_char_selection_get_selection: * @charsel: Char Selection widget. * * Gets the current selection * * Returns: The current selection(a character from the list).0 * is left,upper corner;256 is right, down corner. */ gint gtk_char_selection_get_selection(GtkCharSelection *charsel) { return (charsel->selection); } /** * gtk_char_selection_set_selection: * @charsel: Char Selection widget. * @selection: a character index from the list. 0 is left,upper * corner;256 is right, down corner. * * Sets the selection for the #GtkCharSelection widget. */ void gtk_char_selection_set_selection(GtkCharSelection *charsel, gint selection) { if(selection >= 256) return; if(charsel->selection >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(charsel->button[charsel->selection]), FALSE); if(gtk_widget_get_mapped(GTK_WIDGET(charsel))) gtk_widget_queue_draw(GTK_WIDGET(charsel->button[charsel->selection])); } charsel->selection = selection; if(charsel->selection >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(charsel->button[selection]), TRUE); if(gtk_widget_get_mapped(GTK_WIDGET(charsel))) gtk_widget_queue_draw(GTK_WIDGET(charsel->button[selection])); } } gtkextra-3.2.0/gtkextra/testgtkplotcanvas.c0000644000076400001440000001154412603754176016063 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; void quit () { gtk_main_quit(); } gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } } return TRUE; } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *active_plot; GtkWidget *canvas; GtkPlotCanvasChild *child = NULL; gint page_width, page_height; gfloat scale = 1.; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotCanvas Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS|GTK_PLOT_CANVAS_CAN_SELECT); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); gtk_widget_show(canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ active_plot = gtk_plot_new(NULL); gtk_widget_show(active_plot); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .1, .1, .8, .65); child = gtk_plot_canvas_rectangle_new(GTK_PLOT_LINE_SOLID, 1, NULL, NULL, GTK_PLOT_BORDER_SHADOW, FALSE); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, 0.2, 0.2, 0.3, 0.5); child = gtk_plot_canvas_ellipse_new(GTK_PLOT_LINE_SOLID, 1, NULL, NULL, FALSE); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, 0.5, 0.45, 0.75, 0.6); child = gtk_plot_canvas_line_new(GTK_PLOT_LINE_SOLID, 1, NULL, GTK_PLOT_CANVAS_ARROW_END); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, 0.15, 0.4, 0.2, 0.6); child = gtk_plot_canvas_text_new("Helvetica", 24, 0, NULL, NULL, TRUE, GTK_JUSTIFY_CENTER, "This is a text box"); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, 0.5, 0.05, 0.6, 0.1); g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "democanvas.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkiconfilesel.c0000644000076400001440000007031412603754176015305 00000000000000/* gtkiconfileselection - gtkiconfileselection dialog widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkiconfilesel * @short_description: A file selection dialog widget for GTK. * * It is a nice looking file selection dialog using icons. * It combines GtkDirTree and GtkFileList to navigate the file system and select files. * It has also two entries to select the file and filter. */ /** * GtkIconFileSelection: * * The GtkIconFileSelection structure contains only private data. * It should only be accessed through the functions described below. */ #include "config.h" #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_DIRENT_H # include #endif #include #include #include #include "gtkextra-compat.h" #include "gtkiconfilesel.h" #include "gtkextraicons.h" #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN 64 #endif #ifndef MAXPATHLEN # define MAXPATHLEN 1024 #endif static void gtk_icon_file_selection_class_init (GtkIconFileSelClass *klass); static void gtk_icon_file_selection_init (GtkIconFileSel *filesel); static void gtk_icon_file_selection_destroy (GtkObject *object); static void open_dir (GtkWidget *widget, GtkCTreeNode *node, gint n, gpointer data); static gboolean entry_set_file (GtkWidget *widget, GdkEventKey *key, gpointer data); static void real_set_file (GtkWidget *widget, gpointer data); static gboolean set_filter (GtkWidget *widget, GdkEventKey *key, gpointer data); static gboolean select_icon (GtkIconList *iconlist, GtkIconListItem *icon, GdkEvent *event, gpointer data); static gboolean insert_text (GtkEditable *editable, const gchar *new_text, gint new_text_length, gint *position, gpointer data); static void init_history_combo (GtkIconFileSel *filesel, const gchar *curr_dir); static void update_history_combo (GtkIconFileSel *filesel, const gchar *curr_dir); static void go_to_history (const gchar *path, gpointer data); static gboolean combo_changed (GtkWidget *widget, gpointer data); static gboolean entry_key_press (GtkWidget *widget, GdkEventKey *event, gpointer data); static gchar *get_real_path (const gchar *full_path); static GtkWindowClass *parent_class = NULL; GType gtk_icon_file_selection_get_type (void) { static GType filesel_type = 0; if (!filesel_type) { filesel_type = g_type_register_static_simple ( gtk_window_get_type(), "GtkIconFileSel", sizeof (GtkIconFileSelClass), (GClassInitFunc) gtk_icon_file_selection_class_init, sizeof (GtkIconFileSel), (GInstanceInitFunc) gtk_icon_file_selection_init, 0); } return filesel_type; } GtkWidget* gtk_icon_file_selection_new (const gchar *title) { GtkWidget *widget; widget = gtk_widget_new (gtk_icon_file_selection_get_type(), NULL); gtk_icon_file_selection_construct(GTK_ICON_FILESEL(widget), title); return widget; } /** * gtk_icon_file_selection_construct: * @filesel: the #GtkIconFileSelection widget. * @title: window title. * * Sets the window title for #GtkIconFileSelection widget. */ void gtk_icon_file_selection_construct (GtkIconFileSel *filesel, const gchar *title) { /* GTK_ICON_FILESEL(widget)->title = g_strdup(title); */ gtk_window_set_title(GTK_WINDOW(filesel),title); } static void gtk_icon_file_selection_class_init (GtkIconFileSelClass *klass) { GtkWidgetClass *widget_class; GtkObjectClass *object_class; widget_class = (GtkWidgetClass*) klass; object_class = (GtkObjectClass*) klass; parent_class = g_type_class_ref (gtk_window_get_type ()); object_class->destroy = gtk_icon_file_selection_destroy; } static void up_clicked(GtkWidget *widget, gpointer data) { GtkIconFileSel *filesel = GTK_ICON_FILESEL(widget); gchar *current_dir; gint dir_len; gint i; current_dir = g_strdup (GTK_FILE_LIST(filesel->file_list)->path); dir_len = strlen (current_dir); for (i = dir_len - 1; i >= 0; i--){ /* the i == dir_len is to catch the full path for the first * entry. */ if ( current_dir[i] == G_DIR_SEPARATOR ) { current_dir[i + 1] = '\0'; gtk_icon_file_selection_open_dir(filesel, current_dir); break; } } g_free(current_dir); } static void refresh_clicked(GtkWidget *widget, gpointer data) { GtkIconFileSel *filesel = GTK_ICON_FILESEL(widget); gtk_icon_file_selection_open_dir(filesel, GTK_FILE_LIST(filesel->file_list)->path); } static void home_clicked(GtkWidget *widget, gpointer data) { GtkIconFileSel *filesel = GTK_ICON_FILESEL(widget); gtk_icon_file_selection_open_dir(filesel, g_get_home_dir()); } static void gtk_icon_file_selection_init (GtkIconFileSel *filesel) { GtkWidget *main_vbox; GtkWidget *hbox, *box; GtkWidget *table; GtkWidget *label; GtkWidget *scrolled_window; GtkWidget *wpixmap; GtkTooltips *tp; GdkPixmap *pixmap; GdkBitmap *mask; gchar cwd_path[2*MAXPATHLEN] = ""; gchar path[2*MAXPATHLEN] = ""; GdkColormap *colormap = gtk_widget_get_colormap(GTK_WIDGET(filesel)); filesel->show_tree = FALSE; /* We don't use getcwd() on SUNOS, because, it does a popen("pwd") * and, if that wasn't bad enough, hangs in doing so. */ #if defined(sun) && !defined(__SVR4) getwd (cwd_path); #else getcwd (cwd_path, MAXPATHLEN); #endif g_snprintf(path, MAXPATHLEN, "%s%s", cwd_path, G_DIR_SEPARATOR_S); gtk_window_set_resizable(GTK_WINDOW(filesel), FALSE); gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); main_vbox=gtk_vbox_new(FALSE,1); gtk_container_set_border_width(GTK_CONTAINER(main_vbox),0); gtk_container_add(GTK_CONTAINER(filesel), main_vbox); gtk_widget_show(main_vbox); hbox = gtk_hbox_new(FALSE, 1); gtk_box_pack_start(GTK_BOX(main_vbox), hbox, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new ("Go to: "), FALSE, FALSE, 0); filesel->history_combo = gtk_combo_box_entry_new_text(); gtk_box_pack_start(GTK_BOX(hbox), filesel->history_combo, TRUE, TRUE, 0); init_history_combo(filesel, path); gtk_widget_show_all(hbox); /* RRR */ g_signal_connect(GTK_OBJECT(GTK_COMBO_BOX(filesel->history_combo)), "key_press_event", (void *)entry_key_press, filesel); g_signal_connect(GTK_OBJECT(GTK_COMBO_BOX(filesel->history_combo)), "changed", (void *)combo_changed, filesel); filesel->up_button = gtk_button_new(); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, up_xpm); wpixmap = gtk_image_new_from_pixmap(pixmap, mask); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); gtk_container_add(GTK_CONTAINER(filesel->up_button), wpixmap); gtk_box_pack_start(GTK_BOX(hbox), filesel->up_button, FALSE, FALSE, 0); gtk_widget_show_all(filesel->up_button); g_signal_connect_swapped(GTK_OBJECT(filesel->up_button), "clicked", (void *)up_clicked, GTK_OBJECT(filesel)); tp = gtk_tooltips_new(); gtk_tooltips_set_tip(GTK_TOOLTIPS(tp), filesel->up_button, "Parent directory", "Parent directory"); gtk_tooltips_enable(GTK_TOOLTIPS(tp)); filesel->home_button = gtk_button_new(); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, home_xpm); wpixmap = gtk_image_new_from_pixmap(pixmap, mask); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); gtk_container_add(GTK_CONTAINER(filesel->home_button), wpixmap); gtk_box_pack_start(GTK_BOX(hbox), filesel->home_button, FALSE, FALSE, 0); gtk_widget_show_all(filesel->home_button); g_signal_connect_swapped(GTK_OBJECT(filesel->home_button), "clicked", (void *)home_clicked, GTK_OBJECT(filesel)); tp = gtk_tooltips_new(); gtk_tooltips_set_tip(GTK_TOOLTIPS(tp), filesel->home_button, "Home", "Home"); gtk_tooltips_enable(GTK_TOOLTIPS(tp)); filesel->refresh_button = gtk_button_new(); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, refresh_xpm); wpixmap = gtk_image_new_from_pixmap(pixmap, mask); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); gtk_container_add(GTK_CONTAINER(filesel->refresh_button), wpixmap); gtk_box_pack_start(GTK_BOX(hbox), filesel->refresh_button, FALSE, FALSE, 0); gtk_widget_show_all(filesel->refresh_button); g_signal_connect_swapped(GTK_OBJECT(filesel->refresh_button), "clicked", (void *)refresh_clicked, GTK_OBJECT(filesel)); tp = gtk_tooltips_new(); gtk_tooltips_set_tip(GTK_TOOLTIPS(tp), filesel->refresh_button, "Refresh", "Refresh"); gtk_tooltips_enable(GTK_TOOLTIPS(tp)); filesel->path_label = gtk_label_new(path); gtk_misc_set_alignment(GTK_MISC(filesel->path_label), 0., .5); gtk_box_pack_start(GTK_BOX(main_vbox), filesel->path_label, FALSE, TRUE, 0); gtk_widget_show(filesel->path_label); hbox=gtk_hbox_new(FALSE,1); gtk_box_pack_start(GTK_BOX(main_vbox), hbox, TRUE, TRUE, 0); gtk_widget_show(hbox); filesel->tree_window = scrolled_window=gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_size_request(scrolled_window, 200, 250); gtk_box_pack_start(GTK_BOX(hbox), scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); /* FIXME filesel->dir_tree = gtk_dir_tree_new(); GTK_DIR_TREE(filesel->dir_tree)->show_hidden = TRUE; gtk_container_add(GTK_CONTAINER(scrolled_window), filesel->dir_tree); gtk_widget_show(filesel->dir_tree); gtk_box_pack_start(GTK_BOX(hbox), gtk_vseparator_new(), TRUE, TRUE, 0); */ filesel->list_window = scrolled_window=gtk_scrolled_window_new(NULL, NULL); gtk_box_pack_start(GTK_BOX(hbox), scrolled_window, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_ALWAYS, GTK_POLICY_AUTOMATIC); filesel->file_list = gtk_file_list_new(20, GTK_ICON_LIST_TEXT_RIGHT, G_DIR_SEPARATOR_S); GTK_ICON_LIST(filesel->file_list)->is_editable = FALSE; GTK_FILE_LIST(filesel->file_list)->show_folders = TRUE; GTK_FILE_LIST(filesel->file_list)->show_hidden = TRUE; gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), filesel->file_list); gtk_widget_show(filesel->file_list); if(filesel->show_tree){ gtk_icon_file_selection_show_tree(filesel, TRUE); gtk_widget_set_size_request(filesel->list_window, 380, 250); }else{ gtk_widget_set_size_request(filesel->list_window, 550, 250); } gtk_widget_show(scrolled_window); g_signal_connect(GTK_OBJECT(filesel->file_list), "select_icon", (void *)select_icon, filesel); filesel->action_area = table = gtk_table_new(TRUE, 2, 4); gtk_box_pack_start(GTK_BOX(main_vbox), table, TRUE, TRUE, 3); gtk_widget_show(table); label = gtk_label_new("File: "); gtk_misc_set_alignment(GTK_MISC(label), 1., 0.5); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); gtk_widget_show(label); label = gtk_label_new("Filter: "); gtk_misc_set_alignment(GTK_MISC(label), 1., 0.5); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); gtk_widget_show(label); filesel->file_entry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(table), filesel->file_entry, 1, 3, 0, 1); gtk_widget_show(filesel->file_entry); g_signal_connect(GTK_OBJECT(filesel->file_entry), "key_press_event", (void *)entry_set_file, filesel); filesel->filter_entry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(table), filesel->filter_entry, 1, 3, 1, 2); gtk_widget_show(filesel->filter_entry); g_signal_connect(GTK_OBJECT(filesel->filter_entry), "key_press_event", (void *)set_filter, filesel); /* FIXME g_signal_connect(GTK_OBJECT(filesel->filter_entry), "insert_text", (void *)insert_text, NULL); */ box = gtk_vbutton_box_new(); gtk_table_attach_defaults(GTK_TABLE(table), box, 3, 4, 0, 2); gtk_widget_show(box); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, ok_xpm); wpixmap = gtk_image_new_from_pixmap(pixmap, mask); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); filesel->ok_button = gtk_button_new_from_stock(GTK_STOCK_OK); gtk_box_pack_end (GTK_BOX (box), filesel->ok_button, TRUE, TRUE, 0); gtk_widget_show(filesel->ok_button); g_signal_connect(GTK_OBJECT(filesel->ok_button), "clicked", (void *)real_set_file, filesel); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, cancel_xpm); wpixmap = gtk_image_new_from_pixmap(pixmap, mask); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); filesel->cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); gtk_box_pack_end (GTK_BOX (box), filesel->cancel_button, TRUE, TRUE, 0); gtk_widget_show(filesel->cancel_button); gtk_icon_file_selection_open_dir(filesel, path); filesel->selection = NULL; } static void gtk_icon_file_selection_destroy(GtkObject *object) { if(GTK_ICON_FILESEL(object)->selection) g_free(GTK_ICON_FILESEL(object)->selection); GTK_ICON_FILESEL(object)->selection = NULL; if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); } /** * gtk_icon_file_selection_show_tree: * @filesel: the #GtkIconFileSelection widget. * @show: TRUE(show) or FALSE(don't show). * * Show icon file selection tree in filesel widget. */ void gtk_icon_file_selection_show_tree(GtkIconFileSel *filesel, gboolean show) { /* FIXME if(show == filesel->show_tree) return; filesel->show_tree = show; if(show){ const gchar *path; filesel->tree_signal_id = g_signal_connect(GTK_OBJECT(filesel->dir_tree), "tree_select_row", (void *)open_dir, filesel); path = gtk_file_list_get_path(GTK_FILE_LIST(filesel->file_list)); gtk_dir_tree_open_dir(GTK_DIR_TREE(filesel->dir_tree), path); gtk_widget_set_size_request(filesel->list_window, 380, 250); gtk_widget_show(filesel->tree_window); } else { g_signal_disconnect(GTK_OBJECT(filesel->dir_tree), filesel->tree_signal_id); gtk_widget_hide(filesel->tree_window); gtk_widget_set_size_request(filesel->list_window, 550, 250); } */ } static gboolean insert_text (GtkEditable *editable, const gchar *new_text, gint new_text_length, gint *position, gpointer data) { g_object_ref(editable); g_signal_stop_emission_by_name (GTK_OBJECT(editable), "insert_text"); if(new_text[0] != ' '){ GTK_EDITABLE_CLASS (g_type_class_ref(gtk_editable_get_type ()))->insert_text(editable, new_text, new_text_length, position); } g_object_unref(editable); return TRUE; } static gboolean select_icon(GtkIconList *iconlist, GtkIconListItem *icon, GdkEvent *event, gpointer data) { GtkIconFileSel *filesel; GdkModifierType mods; const gchar *path = NULL; gchar *real_path = NULL; gchar *full_path = NULL; const gchar *file = NULL; GtkFileListItem *item; gboolean return_val = FALSE; item = (GtkFileListItem *)icon->link; filesel = GTK_ICON_FILESEL(data); if(item->type != GTK_FILE_LIST_FOLDER){ GList *list = iconlist->selection; if(iconlist->selection_mode == GTK_SELECTION_MULTIPLE && list != NULL){ gchar *text = g_strdup(((GtkIconListItem *)list->data)->label); list = list->next; while(list){ text = g_strconcat(text,";",((GtkIconListItem *)list->data)->label,NULL); list = list->next; } text = g_strconcat(text,";",icon->label,NULL); gtk_entry_set_text(GTK_ENTRY(filesel->file_entry), text); g_free(text); } else { gtk_entry_set_text(GTK_ENTRY(filesel->file_entry), icon->label); } return TRUE; }else{ gtk_entry_set_text(GTK_ENTRY(filesel->file_entry), ""); } if(!event) return FALSE; if(event->type == GDK_BUTTON_PRESS || event->type == GDK_2BUTTON_PRESS) gdk_window_get_pointer(event->button.window, NULL, NULL, &mods); else return FALSE; path = gtk_file_list_get_path(GTK_FILE_LIST(filesel->file_list)); file = gtk_file_list_get_filename(GTK_FILE_LIST(filesel->file_list)); file = icon->label; if(strlen(path) == 1) full_path = g_strconcat(G_DIR_SEPARATOR_S,file,G_DIR_SEPARATOR_S,NULL); else full_path = g_strconcat(path,G_DIR_SEPARATOR_S,file,G_DIR_SEPARATOR_S,NULL); real_path = get_real_path((const gchar *)full_path); if(filesel->selection) g_free(filesel->selection); filesel->selection = NULL; if(item->type != GTK_FILE_LIST_FOLDER){ filesel->selection = g_strdup(real_path); } if((mods & GDK_BUTTON1_MASK) && event->type == GDK_2BUTTON_PRESS){ gtk_label_set_text(GTK_LABEL(filesel->path_label), "Scanning..."); if(filesel->show_tree){ /* FIXME return_val = gtk_dir_tree_open_dir(GTK_DIR_TREE(filesel->dir_tree), real_path); */ } else return_val = gtk_file_list_open_dir(GTK_FILE_LIST(filesel->file_list), real_path); update_history_combo(filesel, real_path); gtk_label_set_text(GTK_LABEL(filesel->path_label), real_path); } g_free(full_path); g_free(real_path); return (!return_val); } static gboolean entry_set_file(GtkWidget *widget, GdkEventKey *key, gpointer data) { GtkIconFileSel *filesel = GTK_ICON_FILESEL(data); if (key->keyval != GDK_KEY_Return && key->keyval != GDK_KEY_KP_Enter) return FALSE; /* real_set_file(widget, data); */ g_signal_emit_by_name(GTK_OBJECT(filesel->ok_button), "clicked", filesel); return FALSE; } static void real_set_file(GtkWidget *widget, gpointer data) { GtkIconFileSel *filesel; GtkIconListItem *item; GList *list; const gchar *c; gchar *last, *text; gchar *folder; gchar *file; gint nlen, file_len; filesel = (GtkIconFileSel *)data; c = gtk_entry_get_text(GTK_ENTRY(filesel->file_entry)); folder = NULL; file = NULL; last = NULL; file_len = nlen = 0; while(*c != '\0' && *c != '\n' && c != NULL){ nlen++; file_len++; folder = (char *)g_realloc(folder, (nlen+1)*sizeof(char)); folder[nlen-1] = *c; folder[nlen]='\0'; file = (char *)g_realloc(file, (file_len+1)*sizeof(char)); file[file_len-1] = *c; file[file_len]='\0'; if(*c == G_DIR_SEPARATOR){ g_free(file); g_free(last); last = g_strdup(folder); file_len = 0; file = NULL; } c++; } if(last) gtk_icon_file_selection_open_dir(filesel, last); if(file){ list = GTK_ICON_LIST(filesel->file_list)->icons; while(list){ item = (GtkIconListItem *)list->data; text = ((GtkFileListItem *)item->link)->file_name; if(strcmp(text, file) == 0){ item->state = GTK_STATE_SELECTED; /* gtk_icon_list_select_icon(GTK_ICON_LIST(filesel->file_list), item); */ break; } list = list->next; } } g_free(folder); g_free(file); g_free(last); } static gboolean set_filter(GtkWidget *widget, GdkEventKey *key, gpointer data) { GtkIconFileSel *filesel; if (key->keyval != GDK_KEY_Return && key->keyval != GDK_KEY_KP_Enter) return FALSE; filesel = (GtkIconFileSel *)data; gtk_file_list_set_filter(GTK_FILE_LIST(filesel->file_list), gtk_entry_get_text(GTK_ENTRY(widget))); return TRUE; } static void open_dir(GtkWidget *widget, GtkCTreeNode *node, gint n, gpointer data) { DIR *dir; GtkDirTreeNode *dirnode; gchar *path; const gchar *last_path; GtkIconFileSel *filesel; filesel = GTK_ICON_FILESEL(data); dirnode=gtk_ctree_node_get_row_data(GTK_CTREE(widget),node); path = dirnode->path; last_path = gtk_file_list_get_path(GTK_FILE_LIST(filesel->file_list)); if(strcmp(last_path, G_DIR_SEPARATOR_S) !=0 && strcmp(last_path, path) == 0) return; gtk_widget_unmap(filesel->file_list); if((dir = opendir(path)) == NULL){ return; } closedir(dir); gtk_label_set_text(GTK_LABEL(filesel->path_label), "Scanning..."); gtk_file_list_open_dir(GTK_FILE_LIST(filesel->file_list), path); update_history_combo(filesel, path); gtk_widget_map(filesel->file_list); gtk_label_set_text(GTK_LABEL(filesel->path_label), path); } /** * gtk_icon_file_selection_open_dir: * @filesel: the #GtkIconFileSelection widget. * @path: directory path. * * Show the file from path directory in filesel widget. * * Returns: TRUE or FALSE depending on success */ gint gtk_icon_file_selection_open_dir(GtkIconFileSel *filesel, const gchar *path) { DIR *dir; gint return_val = TRUE; gchar *real_path = NULL; if(!path) return FALSE; real_path = get_real_path(path); if((dir = opendir(real_path)) == NULL){ g_warning("Can not open folder: %s",real_path); g_free(real_path); return FALSE; } gtk_label_set_text(GTK_LABEL(filesel->path_label), "Scanning..."); if(filesel->show_tree){ /* FIXME return_val = gtk_dir_tree_open_dir(GTK_DIR_TREE(filesel->dir_tree), real_path); */ } else return_val = gtk_file_list_open_dir(GTK_FILE_LIST(filesel->file_list), real_path); gtk_label_set_text(GTK_LABEL(filesel->path_label), real_path); update_history_combo(filesel, (const gchar *)real_path); g_free(real_path); return return_val; } /** * gtk_icon_file_selection_show_hidden: * @filesel: the #GtkIconFileSelection widget. * @visible: TRUE(show hidden files) or FALSE(don't show hidden files). * * Set the visibility of hidden files. */ void gtk_icon_file_selection_show_hidden(GtkIconFileSel *filesel, gboolean visible) { /* FIXME GTK_DIR_TREE(filesel->dir_tree)->show_hidden = visible; */ GTK_FILE_LIST(filesel->file_list)->show_hidden = visible; } /** * gtk_icon_file_selection_set_filter: * @filesel: the #GtkIconFileSelection widget. * @filter: filter to be applied on files. * * Set a filter for the files show in filelist. */ void gtk_icon_file_selection_set_filter(GtkIconFileSel *filesel, const gchar *filter) { GTK_FILE_LIST(filesel->file_list)->filter = g_strdup(filter); gtk_file_list_open_dir(GTK_FILE_LIST(filesel->file_list), GTK_FILE_LIST(filesel->file_list)->path); update_history_combo(filesel, GTK_FILE_LIST(filesel->file_list)->path); if(filter != NULL) gtk_entry_set_text(GTK_ENTRY(filesel->filter_entry),filter); } static gchar * get_real_path(const gchar *full_path) { gchar root[5], root1[5], root2[5], root3[5], root4[5]; gchar *aux_path; gint length; /* GET ABSOLUTE PATH */ sprintf(root,"%s",G_DIR_SEPARATOR_S); sprintf(root1,"%s.",G_DIR_SEPARATOR_S); sprintf(root2,"%s..",G_DIR_SEPARATOR_S); sprintf(root3,"%s..%s",G_DIR_SEPARATOR_S,G_DIR_SEPARATOR_S); sprintf(root4,"%s.%s",G_DIR_SEPARATOR_S,G_DIR_SEPARATOR_S); aux_path = g_strdup(full_path); length = strlen(aux_path); if(strcmp(aux_path + length - 2, root1) == 0){ if(length == 2) { g_free(aux_path); aux_path = g_strdup(root); } else { aux_path[length - 2] = '\0'; } } else if(strcmp(aux_path + length - 3, root2) == 0){ if(length == 3) { g_free(aux_path); aux_path = g_strdup(root); } else { gint i = length - 4; while(i >= 0){ if(aux_path[i] == root[0]){ aux_path[i] = '\0'; break; } i--; } } } else if(strcmp(aux_path + length - 4, root3) == 0){ if(length == 4) { g_free(aux_path); aux_path = g_strdup(root); } else { gint i = length - 5; while(i >= 0){ if(aux_path[i] == root[0]){ aux_path[i] = '\0'; break; } i--; } } } else if(strcmp(aux_path + length - 3, root4) == 0){ if(length == 3) { g_free(aux_path); aux_path = g_strdup(root); } else { aux_path[length - 3] = '\0'; } } else if(strcmp(aux_path + length - 1, root) == 0 && length > 1){ aux_path[length - 1] = '\0'; } if(strlen(aux_path) == 0) { g_free(aux_path); aux_path = g_strdup(G_DIR_SEPARATOR_S); } return(aux_path); } static void init_history_combo(GtkIconFileSel *filesel, const gchar *current_directory) { gchar *current_dir; gint dir_len; gint i; current_dir = g_strdup (current_directory); dir_len = strlen (current_dir); for (i = dir_len - 1; i >= 0; i--){ /* the i == dir_len is to catch the full path for the first * entry. */ if ( current_dir[i] == G_DIR_SEPARATOR ) { current_dir[i + 1] = '\0'; gtk_combo_box_append_text(GTK_COMBO_BOX(filesel->history_combo), current_dir); } } gtk_combo_box_set_active (GTK_COMBO_BOX(filesel->history_combo), 0); g_free(current_dir); } static void update_history_combo(GtkIconFileSel *filesel, const gchar *current_directory) { GtkComboBox *combo; gchar *sel_dir; combo = GTK_COMBO_BOX(filesel->history_combo); sel_dir = gtk_combo_box_get_active_text(GTK_COMBO_BOX(filesel->history_combo)); if (strcmp(current_directory, sel_dir) == 0) return; gtk_combo_box_prepend_text(combo, current_directory); gtk_combo_box_set_active(combo, 0); return; } static void go_to_history(const gchar *path, gpointer data) { gchar *real_path; if(path[strlen(path)-1] != G_DIR_SEPARATOR) real_path = g_strconcat(path, G_DIR_SEPARATOR_S, NULL); else real_path = g_strdup(path); gtk_icon_file_selection_open_dir(GTK_ICON_FILESEL(data), real_path); g_free(real_path); } static gboolean combo_changed(GtkWidget *widget, gpointer data) { GtkComboBox *comboBox; GtkIconFileSel *filesel; gchar *dir_selected; filesel = GTK_ICON_FILESEL(data); comboBox = GTK_COMBO_BOX(filesel->history_combo); dir_selected = gtk_combo_box_get_active_text(comboBox); go_to_history(dir_selected, filesel); return TRUE; } static gboolean entry_key_press(GtkWidget *widget, GdkEventKey *event, gpointer data) { GtkEntry *entry = GTK_ENTRY (widget); if (event->keyval == GDK_KEY_Return) { g_signal_stop_emission_by_name( GTK_OBJECT(entry), "key_press_event"); //RRRgo_to_history(entry, data); return TRUE; } return FALSE; } /** * gtk_icon_file_selection_get_selection: * @filesel: the #GtkIconFileSelection widget. * * Gets the current selection applied on #GtkIconFileSelection. * * Returns: the current selection. */ const gchar * gtk_icon_file_selection_get_selection(GtkIconFileSel *filesel) { return filesel->selection; } gtkextra-3.2.0/gtkextra/gtkbordercombo.h0000644000076400001440000000400112603754176015301 00000000000000/* gtkbordercombo - border combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_BORDER_COMBO_H__ #define __GTK_BORDER_COMBO_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkcombobutton.h" #define GTK_BORDER_COMBO(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_border_combo_get_type (), GtkBorderCombo) #define GTK_BORDER_COMBO_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_border_combo_get_type (), GtkBorderComboClass) #define GTK_IS_BORDER_COMBO(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_border_combo_get_type ()) typedef struct _GtkBorderCombo GtkBorderCombo; typedef struct _GtkBorderComboClass GtkBorderComboClass; /* you should access only the entry and list fields directly */ struct _GtkBorderCombo { GtkComboButton border_combo; gint nrows; gint ncols; gint row; gint column; GtkWidget ***button; GtkWidget *table; }; struct _GtkBorderComboClass { GtkComboButtonClass parent_class; void (*changed) (GtkBorderCombo *border_combo, gint selection); }; GType gtk_border_combo_get_type (void); GtkWidget *gtk_border_combo_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_BORDER_COMBO_H__ */ gtkextra-3.2.0/gtkextra/gtkfontcombo.c0000644000076400001440000003155612603754176015004 00000000000000/* gtkfontcombo - font_combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkfontcombo * @short_description: A font combo widget for GTK. * * It is a GtkToolBar subclass with two combos to select among the 35 standard Adobe PostScript fonts with different sizes. * It has also two buttons to select bold and italics. * When you select a new font, it returns the name of the corresponding Postscript font and the equivalent Xfont. * This is what we all expect to have on the top of a GUI for a spreadsheet or word processor. */ /** * GtkFontCombo: * * The GtkFontCombo struct contains only private data. * It should only be accessed through the functions described below. */ #include #include #include #include #include #include "gtkfontcombo.h" #include "gtkextra-marshal.h" /* Signals */ enum { CHANGED, LAST_SIGNAL }; /* XPM */ static char * bold_xpm[] = { "16 16 2 1", " c None", ". c #000000000000", " ", " ......... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ........ ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ......... ", " "}; /* XPM */ static char * italic_xpm[] = { "16 16 2 1", " c None", ". c #000000000000", " ", " ..... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ..... ", " "}; #define NUM_SIZES 20 static gchar *default_sizes[] = {"8","9","10","12","13","14","16","18", "20","22","24","26","28","32","36","40", "48","56","64","72"}; static void gtk_font_combo_class_init (GtkFontComboClass *klass); static void gtk_font_combo_init (GtkFontCombo *font_combo); static void gtk_font_combo_destroy (GtkObject *font_combo); static void gtk_font_combo_finalize (GObject *font_combo); static void new_font (GtkWidget *widget, gpointer data); static GtkToolbarClass *parent_class = NULL; static guint font_combo_signals[LAST_SIGNAL] = {0}; static void gtk_font_combo_class_init (GtkFontComboClass * klass) { GObjectClass *gobject_class; GtkObjectClass *object_class; GtkWidgetClass *widget_class; parent_class = g_type_class_ref (gtk_toolbar_get_type ()); object_class = (GtkObjectClass *) klass; gobject_class = (GObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; object_class->destroy = gtk_font_combo_destroy; gobject_class->finalize = gtk_font_combo_finalize; /** * GtkFontCombo::changed: * @bfont_combo: the #GtkFontCombo object that received the signal. * * Emmited whenever a different font is choosed. */ font_combo_signals[CHANGED] = g_signal_new ("changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkFontComboClass, changed), NULL, NULL, gtkextra_VOID__VOID, G_TYPE_NONE, 0); } static void gtk_font_combo_destroy (GtkObject * font_combo) { if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (font_combo); } static void gtk_font_combo_finalize (GObject * font_combo) { gtk_psfont_unref(); if (G_OBJECT_CLASS (parent_class)->finalize) (*G_OBJECT_CLASS (parent_class)->finalize) (font_combo); } static void gtk_font_combo_init (GtkFontCombo * font_combo) { GtkWidget *widget; GtkToolbar *toolbar; GdkColormap *colormap; GdkPixmap *pixmap; GtkWidget *tpixmap; GtkWidget *label; GtkWidget *space; GdkBitmap *mask; GtkRequisition req; GList *family = NULL; gint numf, i; gtk_psfont_init(); widget=GTK_WIDGET(font_combo); toolbar = GTK_TOOLBAR(font_combo); gtk_container_set_border_width(GTK_CONTAINER(toolbar), 0); colormap = gdk_colormap_get_system(); label = gtk_label_new("Font: "); font_combo->name_combo = gtk_combo_box_new_text(); font_combo->size_combo = gtk_combo_box_new_text(); space = gtk_label_new(" "); gtk_container_add(GTK_CONTAINER(toolbar), label); gtk_container_add(GTK_CONTAINER(toolbar), font_combo->name_combo); gtk_container_add(GTK_CONTAINER(toolbar), font_combo->size_combo); gtk_container_add(GTK_CONTAINER(toolbar), space); gtk_widget_show(label); gtk_widget_show(space); font_combo->bold_button = GTK_WIDGET(gtk_toggle_button_new()); font_combo->italic_button = GTK_WIDGET(gtk_toggle_button_new()); gtk_container_add(GTK_CONTAINER(toolbar), font_combo->bold_button); gtk_container_add(GTK_CONTAINER(toolbar), font_combo->italic_button); gtk_widget_set_size_request(font_combo->bold_button, 24, 24); gtk_widget_set_size_request(font_combo->italic_button, 24, 24); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, bold_xpm); tpixmap = gtk_image_new_from_pixmap(pixmap, mask); gtk_container_add(GTK_CONTAINER(font_combo->bold_button), tpixmap); gtk_widget_show(tpixmap); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, italic_xpm); tpixmap = gtk_image_new_from_pixmap(pixmap, mask); gtk_container_add(GTK_CONTAINER(font_combo->italic_button), tpixmap); gtk_widget_show(tpixmap); gtk_widget_size_request(font_combo->size_combo, &req); req.width = 56; gtk_widget_set_size_request(font_combo->size_combo, req.width, req.height); /* FIXME */ // gtk_toolbar_set_space_size(toolbar, 20); for(i = 0; i < NUM_SIZES; i++) gtk_combo_box_append_text(GTK_COMBO_BOX(font_combo->size_combo), default_sizes[i]); gtk_psfont_get_families(&family, &numf); GList *list; list = family; while(list) { gtk_combo_box_append_text(GTK_COMBO_BOX(font_combo->name_combo), (gchar *)list->data); list = list->next; } gtk_combo_box_set_active (GTK_COMBO_BOX(font_combo->name_combo), 0); gtk_combo_box_set_active (GTK_COMBO_BOX(font_combo->size_combo), 3); gtk_widget_show (font_combo->size_combo); gtk_widget_show (font_combo->bold_button); gtk_widget_show (font_combo->italic_button); gtk_widget_show (font_combo->name_combo); g_signal_connect( GTK_OBJECT(GTK_COMBO_BOX(font_combo->name_combo)), "changed", (void *)new_font, font_combo); g_signal_connect( GTK_OBJECT(GTK_FONT_COMBO(font_combo)->size_combo), "changed", (void *)new_font, font_combo); g_signal_connect( GTK_OBJECT(GTK_FONT_COMBO(font_combo)->italic_button), "clicked", (void *)new_font, font_combo); g_signal_connect( GTK_OBJECT(GTK_FONT_COMBO(font_combo)->bold_button), "clicked", (void *)new_font, font_combo); } GType gtk_font_combo_get_type () { static GType font_combo_type = 0; if (!font_combo_type) { font_combo_type = g_type_register_static_simple ( gtk_toolbar_get_type (), "GtkFontCombo", sizeof (GtkFontComboClass), (GClassInitFunc) gtk_font_combo_class_init, sizeof (GtkFontCombo), (GInstanceInitFunc) gtk_font_combo_init, 0); } return font_combo_type; } GtkWidget * gtk_font_combo_new () { GtkFontCombo *font_combo; font_combo = g_object_new (gtk_font_combo_get_type (), NULL); return(GTK_WIDGET(font_combo)); } static void new_font(GtkWidget *widget, gpointer data) { GtkFontCombo *font_combo; gchar *text; font_combo = GTK_FONT_COMBO(data); text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(font_combo->name_combo)); if(!text || strlen(text) == 0) return; g_free(text); text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(font_combo->size_combo)); if(!text || strlen(text) == 0) return; g_free(text); g_signal_emit(GTK_OBJECT(font_combo), font_combo_signals[CHANGED], 0); } /** * gtk_font_combo_select: * @font_combo: a #GtkFontCombo * @family: font family * @bold: TRUE or FALSE * @italic: TRUE or FALSE * @height: height of the font * * Select from the combo a font which satisfies the arguments. */ void gtk_font_combo_select (GtkFontCombo *combo, const gchar *family, gboolean bold, gboolean italic, gint height) { GtkItem *item; GList *children; gchar *text; gint n = 0; children = GTK_LIST(GTK_COMBO_BOX(combo->name_combo))->children; while(children){ item = GTK_ITEM(children->data); text = GTK_LABEL(gtk_bin_get_child(GTK_BIN(item)))->label; if(strcmp(text, family) == 0) break; n++; children = children->next; } gtk_font_combo_select_nth(combo, n, bold, italic, height); } /** * gtk_font_combo_select_nth: * @font_combo: a #GtkFontCombo * @n: nth font * @bold: TRUE or FALSE * @italic: TRUE or FALSE * @height: height of the font * * Select from the combo the nth font which satisfies the arguments. */ void gtk_font_combo_select_nth (GtkFontCombo *combo, gint n, gboolean bold, gboolean italic, gint height) { gint i; gtk_list_select_item(GTK_LIST(GTK_COMBO_BOX(combo->name_combo)), n); for(i = 0; i < NUM_SIZES; i++){ if(atoi(default_sizes[i]) >= height) break; } if(i < NUM_SIZES) gtk_list_select_item(GTK_LIST(GTK_COMBO_BOX(combo->size_combo)), i); if(GTK_IS_TOGGLE_BUTTON(combo->bold_button)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(combo->bold_button), bold); if(GTK_IS_TOGGLE_BUTTON(combo->italic_button)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(combo->italic_button), italic); } gint gtk_font_combo_get_font_height (GtkFontCombo *combo) { gchar *size; int isize; size = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo->size_combo)); if (size) { isize = atoi(size); g_free(size); return isize; } else { printf("gtk_font_combo_get_font_height no size\n"); return(10); } } /** * gtk_font_combo_get_psfont: * @font_combo: the #GtkFontCombo * * Returns: (transfer none) the #GtkPSFont */ GtkPSFont * gtk_font_combo_get_psfont (GtkFontCombo *font_combo) { const gchar *text; gboolean italic = FALSE, bold = FALSE; text=gtk_entry_get_text(GTK_ENTRY(GTK_COMBO_BOX(font_combo->name_combo))); if(GTK_IS_TOGGLE_BUTTON(GTK_FONT_COMBO(font_combo)->italic_button)) italic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_FONT_COMBO(font_combo)->italic_button)); if(GTK_IS_TOGGLE_BUTTON(GTK_FONT_COMBO(font_combo)->bold_button)) bold = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_FONT_COMBO(font_combo)->bold_button)); return (gtk_psfont_get_by_family(text, italic, bold)); } PangoFontDescription * gtk_font_combo_get_font_description (GtkFontCombo *combo) { gchar *text; GtkPSFont *psfont; gboolean italic, bold; gint height; text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo->name_combo)); if (text == NULL) return NULL; italic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_FONT_COMBO(combo)->italic_button)); bold = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_FONT_COMBO(combo)->bold_button)); height = gtk_font_combo_get_font_height(combo); psfont = gtk_psfont_get_by_family(text, italic, bold); g_free(text); return (gtk_psfont_get_font_description(psfont, height)); } GdkFont * gtk_font_combo_get_gdkfont (GtkFontCombo *combo) { const gchar *text; GtkPSFont *psfont; gboolean italic, bold; gint height; text=gtk_entry_get_text(GTK_ENTRY(GTK_COMBO_BOX(combo->name_combo))); italic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_FONT_COMBO(combo)->italic_button)); bold = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_FONT_COMBO(combo)->bold_button)); height = gtk_font_combo_get_font_height(combo); psfont = gtk_psfont_get_by_family(text, italic, bold); return (gtk_psfont_get_gdkfont(psfont, height)); } gtkextra-3.2.0/gtkextra/gtkplotbar.h0000644000076400001440000000432212603754176014455 00000000000000/* gtkplotbar - 3d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_BAR_H__ #define __GTK_PLOT_BAR_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplot.h" #define GTK_PLOT_BAR(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_bar_get_type (), GtkPlotBar) #define G_TYPE_PLOT_BAR (gtk_plot_bar_get_type ()) #define GTK_PLOT_BAR_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_bar_get_type(), GtkPlotBarClass) #define GTK_IS_PLOT_BAR(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_bar_get_type ()) typedef struct _GtkPlotBar GtkPlotBar; typedef struct _GtkPlotBarClass GtkPlotBarClass; typedef enum { GTK_PLOT_BAR_POINTS, GTK_PLOT_BAR_RELATIVE, GTK_PLOT_BAR_ABSOLUTE, } GtkPlotBarUnits; /** * GtkPlotBar: * * The GtkPlotBar struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotBar { GtkPlotData data; GtkOrientation orientation; gdouble width; }; struct _GtkPlotBarClass { GtkPlotDataClass parent_class; }; GType gtk_plot_bar_get_type (void); GtkWidget* gtk_plot_bar_new (GtkOrientation orientation); void gtk_plot_bar_construct (GtkPlotBar *bar, GtkOrientation orientation); void gtk_plot_bar_set_width (GtkPlotBar *bar, gdouble width); gdouble gtk_plot_bar_get_width (GtkPlotBar *bar); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_BAR_H__ */ gtkextra-3.2.0/gtkextra/gtkplotbubble.c0000644000076400001440000004450512603754176015146 00000000000000/* gtkplotbubble - bubble plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotbubble * @short_description: * * FIXME:: Need long description. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotpolar.h" #include "gtkplotdata.h" #include "gtkplotbubble.h" #include "gtkpsfont.h" #define P_(string) string static void gtk_plot_bubble_class_init (GtkPlotBubbleClass *klass); static void gtk_plot_bubble_init (GtkPlotBubble *data); static void gtk_plot_bubble_destroy (GtkObject *data); static void gtk_plot_bubble_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_bubble_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_bubble_get_legend_size(GtkPlotData *data, gint *width, gint *height); static void gtk_plot_bubble_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_bubble_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); extern gint roundint (gdouble x); enum { ARG_0, ARG_CENTERED, ARG_STYLE, ARG_WIDTH, ARG_LENGTH, ARG_SCALE_MAX, ARG_SIZE_MAX, ARG_SHOW_SCALE, ARG_LABEL_PRECISION, ARG_LABEL_STYLE, ARG_LABEL_PREFIX, ARG_LABEL_SUFFIX, }; static GtkPlotDataClass *parent_class = NULL; GType gtk_plot_bubble_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotBubble", sizeof (GtkPlotBubbleClass), (GClassInitFunc) gtk_plot_bubble_class_init, sizeof (GtkPlotBubble), (GInstanceInitFunc) gtk_plot_bubble_init, 0); } return data_type; } static void gtk_plot_bubble_class_init (GtkPlotBubbleClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; gobject_class->set_property = gtk_plot_bubble_set_property; gobject_class->get_property = gtk_plot_bubble_get_property; object_class->destroy = gtk_plot_bubble_destroy; /** * GtkPlotBubble:scale_max: * * **/ g_object_class_install_property(gobject_class, ARG_SCALE_MAX, g_param_spec_double ("scale_max", P_("Scale Max"), P_("Scale Max."), 0, G_MAXDOUBLE, 0.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotBubble:size_max: * * **/ g_object_class_install_property(gobject_class, ARG_SIZE_MAX, g_param_spec_int ("size_max", P_("Size Max."), P_("Size Max."), 0, G_MAXINT, 0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotBubble:show_scale: * * **/ g_object_class_install_property(gobject_class, ARG_SHOW_SCALE, g_param_spec_boolean ("show_scale", P_("Show Scale"), P_("Show scale in gradient legend"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotBubble:labels_precision: * * **/ g_object_class_install_property(gobject_class, ARG_LABEL_PRECISION, g_param_spec_int ("labels_precision", P_("Labels Precision"), P_("Labels Precision"), 0, G_MAXINT, 0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotBubble:labels_style: * * **/ g_object_class_install_property(gobject_class, ARG_LABEL_STYLE, g_param_spec_int ("labels_style", P_("Labels Style"), P_("Labels Style"), 0, G_MAXINT, 0, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotBubble:labels_prefix: * * **/ g_object_class_install_property(gobject_class, ARG_LABEL_PREFIX, g_param_spec_string ("labels_prefix", P_("Labels Prefix"), P_("Labels Prefix"), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); /** * GtkPlotBubble:labels_suffix: * * **/ g_object_class_install_property(gobject_class, ARG_LABEL_SUFFIX, g_param_spec_string ("labels_suffix", P_("Labels Suffix"), P_("Labels Suffix"), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); data_class->draw_legend = gtk_plot_bubble_draw_legend; data_class->get_legend_size = gtk_plot_bubble_get_legend_size; data_class->draw_symbol = gtk_plot_bubble_draw_symbol; } static void gtk_plot_bubble_init (GtkPlotBubble *dataset) { GtkWidget *widget; GdkColor black, white; GdkColormap *colormap; GtkPlotArray *dim; widget = GTK_WIDGET(dataset); colormap = gdk_colormap_get_system(); gdk_color_black(colormap, &black); gdk_color_white(colormap, &white); GTK_PLOT_DATA(dataset)->symbol.symbol_style = GTK_PLOT_SYMBOL_EMPTY; GTK_PLOT_DATA(dataset)->symbol.color = black; GTK_PLOT_DATA(dataset)->line.line_style = GTK_PLOT_LINE_SOLID; GTK_PLOT_DATA(dataset)->line.line_width = 1; GTK_PLOT_DATA(dataset)->line.color = black; dataset->size_max = 50; dataset->scale_max = 1.; dataset->show_scale = TRUE; dataset->labels_precision = 3; dataset->labels_style = GTK_PLOT_LABEL_FLOAT; dataset->labels_prefix = NULL; dataset->labels_suffix = NULL; dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "y"); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "z"); gtk_plot_array_set_independent(dim, TRUE); dim = gtk_plot_data_find_dimension(GTK_PLOT_DATA(dataset), "a"); gtk_plot_array_set_required(dim, TRUE); } static void gtk_plot_bubble_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotBubble *data; data = GTK_PLOT_BUBBLE (object); switch (prop_id) { case ARG_SCALE_MAX: data->scale_max = g_value_get_double(value); break; case ARG_SIZE_MAX: data->size_max = g_value_get_int(value); break; case ARG_SHOW_SCALE: data->show_scale = g_value_get_boolean(value); break; case ARG_LABEL_PRECISION: data->labels_precision = g_value_get_int(value); break; case ARG_LABEL_STYLE: data->labels_style = g_value_get_int(value); break; case ARG_LABEL_PREFIX: gtk_plot_bubble_set_labels_prefix(data, g_value_get_string(value)); break; case ARG_LABEL_SUFFIX: gtk_plot_bubble_set_labels_suffix(data, g_value_get_string(value)); break; } } static void gtk_plot_bubble_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotBubble *data; data = GTK_PLOT_BUBBLE (object); switch (prop_id) { case ARG_SCALE_MAX: g_value_set_double(value, data->scale_max); break; case ARG_SIZE_MAX: g_value_set_int(value, data->size_max); break; case ARG_SHOW_SCALE: g_value_set_boolean(value, data->show_scale); break; case ARG_LABEL_PRECISION: g_value_set_int(value, data->labels_precision); break; case ARG_LABEL_STYLE: g_value_set_int(value, data->labels_style); break; case ARG_LABEL_PREFIX: g_value_set_string(value, data->labels_prefix); break; case ARG_LABEL_SUFFIX: g_value_set_string(value, data->labels_suffix); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } GtkWidget* gtk_plot_bubble_new () { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_bubble_get_type (), NULL); return (widget); } static void gtk_plot_bubble_destroy(GtkObject *object) { GtkPlotBubble *bubble = GTK_PLOT_BUBBLE(object); if(bubble->labels_prefix) g_free(bubble->labels_prefix); bubble->labels_prefix = NULL; if(bubble->labels_suffix) g_free(bubble->labels_suffix); bubble->labels_suffix = NULL; if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void gtk_plot_bubble_draw_symbol(GtkPlotData *dataset, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot; GtkPlotBubble *bubble = NULL; GdkRectangle area, clip_area; gdouble m; gdouble x1 = 0.0, y1 = 0.0; gdouble r; GtkAllocation allocation; g_return_if_fail(GTK_IS_PLOT_BUBBLE(dataset)); bubble = GTK_PLOT_BUBBLE(dataset); g_return_if_fail(dataset->plot != NULL); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(dataset->plot))); plot = dataset->plot; m = plot->magnification; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; clip_area.x = area.x + roundint(plot->x * area.width); clip_area.y = area.y + roundint(plot->y * area.height); clip_area.width = roundint(plot->width * area.width); clip_area.height = roundint(plot->height * area.height); /* gtk_plot_pc_clip(plot->pc, &clip_area); */ r = fabs(a); r /= bubble->scale_max; r = r * bubble->size_max; dataset->symbol.size = r; if(GTK_IS_PLOT3D(plot)){ gdouble z1 = 0.0; if(plot->clip_data && (x < plot->xmin || x > plot->xmax || y ymin || y > plot->ymax || z < GTK_PLOT3D(plot)->zmin || z > GTK_PLOT3D(plot)->zmax)) return; gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &x1, &y1, &z1); }else{ if(plot->clip_data && !GTK_IS_PLOT_POLAR(plot) && (x < plot->xmin || x > plot->xmax || y ymin || y > plot->ymax)) return; gtk_plot_get_pixel(plot, x, y, &x1, &y1); } gtk_plot_data_draw_symbol(dataset, x1, y1); /* gtk_plot_pc_clip(plot->pc, NULL); */ } static void gtk_plot_bubble_get_legend_size(GtkPlotData *data, gint *width, gint *height) { GtkPlotBubble *bubble; GtkPlot *plot = NULL; GtkPlotText legend; gint lascent, ldescent, lheight, lwidth; gdouble m; gchar new_label[100], text[100]; bubble = GTK_PLOT_BUBBLE(data); plot = data->plot; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; *width = *height = 0; if(data->show_legend) gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), width, height, &lascent, &ldescent); if(bubble->show_scale){ gchar aux_text[100]; gtk_plot_axis_parse_label(data->gradient, bubble->scale_max, bubble->labels_precision, bubble->labels_style, text); if(bubble->labels_prefix){ g_snprintf(aux_text, 100, "%s%s", bubble->labels_prefix, text); memcpy(text, aux_text, 100*sizeof(gchar)); } if(bubble->labels_suffix){ g_snprintf(aux_text, 100, "%s%s", text, bubble->labels_suffix); memcpy(text, aux_text, 100*sizeof(gchar)); } g_snprintf(new_label, 100, "%s", text); legend.text = new_label; gtk_plot_text_get_size(legend.text, 0, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); *width = MAX(*width, roundint(m*bubble->size_max)); *width = MAX(*width, lwidth); *width += roundint(m * 8); *height += MAX(lheight , lheight + roundint(m*bubble->size_max)); } } static void gtk_plot_bubble_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotBubble *bubble; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; gint line_width; GtkPlotSymbolStyle style; GtkAllocation allocation; bubble = GTK_PLOT_BUBBLE(data); style = data->symbol.symbol_style; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); g_return_if_fail(gtk_widget_get_visible(GTK_WIDGET(data->plot))); plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); if(data->show_legend){ line_width = plot->legends_line_width; legend.x = (gdouble)(area.x + x) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + lascent) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); } if(bubble->show_scale){ gchar new_label[100], text_max[100]; gint cx; gtk_plot_axis_parse_label(data->gradient, bubble->scale_max, bubble->labels_precision, bubble->labels_style, text_max); if(bubble->labels_prefix){ gchar aux_text[100]; g_snprintf(aux_text, 100, "%s%s", bubble->labels_prefix, text_max); memcpy(text_max, aux_text, 100*sizeof(gchar)); } if(bubble->labels_suffix){ gchar aux_text[100]; g_snprintf(aux_text, 100, "%s%s", text_max, bubble->labels_suffix); memcpy(text_max, aux_text, 100*sizeof(gchar)); } g_snprintf(new_label, 100, "%s", text_max); gtk_plot_text_get_size(new_label, 0, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); cx = MAX(lwidth, roundint(m*bubble->size_max)); cx = x + cx / 2; /* data->symbol.symbol_style = GTK_PLOT_SYMBOL_EMPTY; */ data->symbol.border.color = legend.fg; data->symbol.size = bubble->size_max; gtk_plot_data_draw_symbol(data, area.x + cx, area.y + y + lheight + roundint(bubble->size_max*m / 2)); gtk_plot_data_draw_symbol(data, area.x + cx, area.y + y + lheight + roundint(m*bubble->size_max/2.)); y += MAX(lheight, roundint(m*bubble->size_max) + 2 * lheight); legend.x = (gdouble)(area.x + cx) / (gdouble)area.width; legend.y = (gdouble)(area.y + y) / (gdouble)area.height; legend.text = new_label; legend.justification = GTK_JUSTIFY_CENTER; gtk_plot_draw_text(plot, legend); y += lheight; } else y += lheight; data->symbol.symbol_style = style; } /** * gtk_plot_bubble_show_scale: * @bubble: a #GtkPlotBubble. * @show: * * */ void gtk_plot_bubble_show_scale (GtkPlotBubble *bubble, gboolean show) { bubble->show_scale = show; } /** * gtk_plot_bubble_set_scale_max: * @bubble: a #GtkPlotBubble. * @scale_max: * * */ void gtk_plot_bubble_set_scale_max (GtkPlotBubble *bubble, gdouble scale_max) { bubble->scale_max = fabs(scale_max); } /** * gtk_plot_bubble_set_size_max: * @bubble: a #GtkPlotBubble. * @size_max: * * */ void gtk_plot_bubble_set_size_max (GtkPlotBubble *bubble, guint size_max) { bubble->size_max = size_max; } /** * gtk_plot_bubble_set_labels_precision: * @bubble: a #GtkPlotBubble. * @precision: * * */ void gtk_plot_bubble_set_labels_precision (GtkPlotBubble *bubble, gint precision) { bubble->labels_precision = precision; } /** * gtk_plot_bubble_set_labels_style: * @bubble: a #GtkPlotBubble. * @style: * * */ void gtk_plot_bubble_set_labels_style (GtkPlotBubble *bubble, GtkPlotLabelStyle style) { bubble->labels_style = style; } /** * gtk_plot_bubble_set_labels_prefix: * @bubble: a #GtkPlotBubble. * @prefix: * * */ void gtk_plot_bubble_set_labels_prefix (GtkPlotBubble *bubble, const gchar *prefix) { if(bubble->labels_prefix) g_free(bubble->labels_prefix); bubble->labels_prefix = NULL; if(prefix) bubble->labels_prefix = g_strdup(prefix); } /** * gtk_plot_bubble_set_labels_suffix: * @bubble: a #GtkPlotBubble. * @suffix: * * */ void gtk_plot_bubble_set_labels_suffix (GtkPlotBubble *bubble, const gchar *suffix) { if(bubble->labels_suffix) g_free(bubble->labels_suffix); bubble->labels_suffix = NULL; if(suffix) bubble->labels_suffix = g_strdup(suffix); } gtkextra-3.2.0/gtkextra/gtkplot.h0000644000076400001440000006067412603754176014004 00000000000000/* gtkplot - 2d scientific plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_H__ #define __GTK_PLOT_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkplotpc.h" #include "gtkplotarray.h" #define GTK_PLOT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_get_type (), GtkPlot) #define G_TYPE_PLOT (gtk_plot_get_type ()) #define GTK_PLOT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_get_type(), GtkPlotClass) #define GTK_IS_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_get_type ()) #define GTK_PLOT_AXIS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_axis_get_type (), GtkPlotAxis) #define G_TYPE_PLOT_AXIS (gtk_plot_axis_get_type ()) #define GTK_IS_PLOT_AXIS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_axis_get_type ()) typedef struct _GtkPlot GtkPlot; typedef struct _GtkPlotClass GtkPlotClass; typedef struct _GtkPlotData GtkPlotData; typedef struct _GtkPlotDataClass GtkPlotDataClass; typedef struct _GtkPlotAxis GtkPlotAxis; typedef struct _GtkPlotAxisClass GtkPlotAxisClass; typedef struct _GtkPlotText GtkPlotText; typedef struct _GtkPlotLine GtkPlotLine; typedef struct _GtkPlotSymbol GtkPlotSymbol; typedef struct _GtkPlotTick GtkPlotTick; typedef struct _GtkPlotTicks GtkPlotTicks; typedef struct _GtkPlotVector GtkPlotVector; typedef struct _GtkPlotMarker GtkPlotMarker; typedef gdouble(*GtkPlotFunc)(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *error); typedef gdouble(*GtkPlotFunc3D)(GtkPlot *plot, GtkPlotData *data, gdouble x, gdouble y, gboolean *error); typedef void (*GtkPlotIterator)(GtkPlot *plot, GtkPlotData *data, gint iter, gdouble *x, gdouble *y, gdouble *z, gdouble *a, gdouble *dx, gdouble *dy, gdouble *dz, gdouble *da, gchar **label, gboolean *error); enum { GTK_PLOT_DATA_X = 1 << 0, GTK_PLOT_DATA_Y = 1 << 1, GTK_PLOT_DATA_Z = 1 << 2, GTK_PLOT_DATA_A = 1 << 3, GTK_PLOT_DATA_DX = 1 << 4, GTK_PLOT_DATA_DY = 1 << 5, GTK_PLOT_DATA_DZ = 1 << 6, GTK_PLOT_DATA_DA = 1 << 7, GTK_PLOT_DATA_LABELS = 1 << 8, }; typedef enum { GTK_PLOT_SCALE_LINEAR, GTK_PLOT_SCALE_LOG10 } GtkPlotScale; typedef enum { GTK_PLOT_SYMBOL_NONE, GTK_PLOT_SYMBOL_SQUARE, GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_UP_TRIANGLE, GTK_PLOT_SYMBOL_DOWN_TRIANGLE, GTK_PLOT_SYMBOL_RIGHT_TRIANGLE, GTK_PLOT_SYMBOL_LEFT_TRIANGLE, GTK_PLOT_SYMBOL_DIAMOND, GTK_PLOT_SYMBOL_PLUS, GTK_PLOT_SYMBOL_CROSS, GTK_PLOT_SYMBOL_STAR, GTK_PLOT_SYMBOL_DOT, GTK_PLOT_SYMBOL_IMPULSE, } GtkPlotSymbolType; typedef enum { GTK_PLOT_SYMBOL_EMPTY, GTK_PLOT_SYMBOL_FILLED, GTK_PLOT_SYMBOL_OPAQUE } GtkPlotSymbolStyle; typedef enum { GTK_PLOT_BORDER_NONE, GTK_PLOT_BORDER_LINE, GTK_PLOT_BORDER_SHADOW, } GtkPlotBorderStyle; typedef enum { GTK_PLOT_LINE_NONE, GTK_PLOT_LINE_SOLID, GTK_PLOT_LINE_DOTTED, GTK_PLOT_LINE_DASHED, GTK_PLOT_LINE_DOT_DASH, GTK_PLOT_LINE_DOT_DOT_DASH, GTK_PLOT_LINE_DOT_DASH_DASH } GtkPlotLineStyle; typedef enum { GTK_PLOT_CONNECT_NONE, GTK_PLOT_CONNECT_STRAIGHT, GTK_PLOT_CONNECT_SPLINE, GTK_PLOT_CONNECT_HV_STEP, GTK_PLOT_CONNECT_VH_STEP, GTK_PLOT_CONNECT_MIDDLE_STEP } GtkPlotConnector; typedef enum { GTK_PLOT_LABEL_NONE = 0, GTK_PLOT_LABEL_IN = 1 << 0, GTK_PLOT_LABEL_OUT = 1 << 1, }GtkPlotLabelPos; typedef enum { GTK_PLOT_ERROR_DIV_ZERO, GTK_PLOT_ERROR_LOG_NEG } GtkPlotError; typedef enum { GTK_PLOT_AXIS_X, GTK_PLOT_AXIS_Y, GTK_PLOT_AXIS_Z, } GtkPlotOrientation; typedef enum { GTK_PLOT_AXIS_LEFT, GTK_PLOT_AXIS_RIGHT, GTK_PLOT_AXIS_TOP, GTK_PLOT_AXIS_BOTTOM } GtkPlotAxisPos; typedef enum { GTK_PLOT_LABEL_FLOAT, GTK_PLOT_LABEL_EXP, GTK_PLOT_LABEL_POW } GtkPlotLabelStyle; typedef enum { GTK_PLOT_TICKS_NONE = 0, GTK_PLOT_TICKS_IN = 1 << 0, GTK_PLOT_TICKS_OUT = 1 << 1 } GtkPlotTicksPos; enum { GTK_PLOT_GRADIENT_H = 1 << 0, GTK_PLOT_GRADIENT_V = 1 << 1, GTK_PLOT_GRADIENT_S = 1 << 2, }; /** * GtkPlotMarker: * * The GtkPlotMarker struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotMarker { /*< private >*/ GtkPlotData *data; gint point; }; /** * GtkPlotText: * * The GtkPlotText struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotText { /*< private >*/ gdouble x, y; gint angle; /* 0, 90, 180, 270 */ GdkColor fg; GdkColor bg; gboolean transparent; GtkPlotBorderStyle border; gint border_width; gint shadow_width; gint border_space; gchar *font; gint height; gchar *text; GtkJustification justification; }; /** * GtkPlotLine: * * The GtkPlotLine struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotLine { /*< private >*/ GtkPlotLineStyle line_style; GdkCapStyle cap_style; GdkJoinStyle join_style; gfloat line_width; GdkColor color; }; /** * GtkPlotSymbol: * * The GtkPlotSymbol struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotSymbol { /*< private >*/ GtkPlotSymbolType symbol_type; GtkPlotSymbolStyle symbol_style; gint size; GdkColor color; GtkPlotLine border; }; /** * GtkPlotVector: * * The GtkPlotVector struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotVector { /*< private >*/ gdouble x, y, z; }; /** * GtkPlotTick: * * The GtkPlotTick struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotTick { /*< private >*/ gdouble value; gboolean minor; }; /** * GtkPlotTicks: * * The GtkPlotTicks struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotTicks { /*< private >*/ gdouble min; gdouble max; GtkPlotScale scale; gint nmajorticks; /* Number of major ticks drawn */ gint nminorticks; /* Number of minor ticks drawn */ gint nticks; /* total number of ticks */ gdouble step; /* major ticks step */ gint nminor; /* number of minor ticks between major ticks */ gboolean apply_break; GtkPlotScale break_scale; gdouble break_step; gint break_nminor; gdouble break_min; gdouble break_max; gdouble break_position; GtkPlotTick *values; gboolean set_limits; gdouble begin, end; }; typedef void (*GtkPlotTicksRecalcFunc)(GtkPlotAxis *axis); typedef void (*GtkPlotTicksAutoscaleFunc)(GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision); typedef gdouble(*GtkPlotTicksTransformFunc)(GtkPlotAxis *axis, gdouble y); typedef gdouble(*GtkPlotTicksInverseFunc)(GtkPlotAxis *axis, gdouble y); typedef void (*GtkPlotParseLabelFunc)(GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label); /** * GtkPlotAxis: * * The GtkPlotAxis struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotAxis { /*< private >*/ GtkObject object; gboolean is_visible; GtkPlotVector origin; GtkPlotVector direction; GtkPlotText title; gboolean title_visible; GtkPlotTicks ticks; GtkPlotOrientation orientation; GtkPlotLine line; GtkPlotLine major_grid; GtkPlotLine minor_grid; gint major_mask; gint minor_mask; gint ticks_length; gfloat ticks_width; gboolean custom_labels; gint labels_offset; gchar *labels_prefix; gchar *labels_suffix; gboolean show_major_grid; gboolean show_minor_grid; GtkPlotText labels_attr; gint label_precision; gint label_style; gint label_mask; GtkPlotArray *tick_labels; GtkPlotTicksRecalcFunc ticks_recalc; GtkPlotTicksAutoscaleFunc ticks_autoscale; GtkPlotTicksTransformFunc ticks_transform; GtkPlotTicksInverseFunc ticks_inverse; GtkPlotParseLabelFunc parse_label; }; /** * GtkPlotData: * * The GtkPlotData struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotData { /*< private >*/ GtkWidget widget; gboolean is_function; gboolean is_iterator; guint16 iterator_mask; gboolean show_legend; gboolean show_labels; gboolean fill_area; gchar *name; gchar *legend; GtkPlot *plot; GtkPlotSymbol symbol; GtkPlotLine line; GtkPlotConnector line_connector; GtkPlotLine x_line; GtkPlotLine y_line; GtkPlotLine z_line; gboolean show_xerrbars; gint xerrbar_width; gint xerrbar_caps; gboolean show_yerrbars; gint yerrbar_width; gint yerrbar_caps; gboolean show_zerrbars; gint zerrbar_width; gint zerrbar_caps; gint num_points; GtkPlotArrayList *data; gint labels_offset; GtkPlotText labels_attr; GtkPlotFunc function; GtkPlotFunc3D function3d; GtkPlotIterator iterator; gdouble x_step; gdouble y_step; gdouble z_step; GdkColor color_min, color_max; GdkColor color_lt_min, color_gt_max; gboolean gradient_show_lt_gt; gint gradient_mask; GtkPlotAxis *gradient; gboolean gradient_custom; GdkColor *gradient_colors; gboolean show_gradient; gint legends_precision; GtkPlotLabelStyle legends_style; gpointer link; GList *markers; gboolean show_markers; gboolean redraw_pending; GtkPlotAxisPos gradient_title_pos; gint gradient_line_width; gint gradient_line_height; gdouble gradient_x, gradient_y; GtkPlotBorderStyle gradient_border; gint gradient_border_offset; gint gradient_border_width; gint gradient_shadow_width; }; struct _GtkPlot { GtkWidget widget; GtkAllocation internal_allocation; GdkDrawable *drawable; GdkPixmap *bg_pixmap; gboolean use_pixmap; gboolean transparent; gdouble magnification; gboolean clip_data; GdkColor background; gboolean grids_on_top; gboolean show_x0; gboolean show_y0; /* location and size in percentage of the widget's size */ gdouble x, y, width, height; gdouble xmin, xmax; gdouble ymin, ymax; GtkPlotScale xscale, yscale; GtkPlotAxis *bottom; GtkPlotAxis *top; GtkPlotAxis *left; GtkPlotAxis *right; gboolean reflect_x; gboolean reflect_y; gfloat bottom_align; gfloat top_align; gfloat left_align; gfloat right_align; GtkPlotLine x0_line; GtkPlotLine y0_line; gdouble legends_x, legends_y; /* position in % */ gint legends_width, legends_height; /* absolute size */ GtkPlotBorderStyle legends_border; gint legends_line_width; gint legends_border_width; gint legends_shadow_width; gboolean show_legends; GtkPlotText legends_attr; GList *data_sets; GList *text; GtkPlotPC *pc; }; struct _GtkPlotClass { GtkWidgetClass parent_class; void (*set_pc)(GtkPlot *plot, GtkPlotPC *pc); void (*set_drawable)(GtkPlot *plot, GdkDrawable *drawable); gboolean(*add_data)(GtkPlot *plot, GtkPlotData *data); void (*update)(GtkPlot *plot, gboolean new_range); void (*changed)(GtkPlot *plot); gboolean(*moved)(GtkPlot *plot, gdouble *x, gdouble *y); gboolean(*resized)(GtkPlot *plot, gdouble *width, gdouble *height); void (*plot_paint)(GtkWidget *plot); void (*draw_legends)(GtkWidget *plot); void (*get_pixel)(GtkWidget *plot, gdouble x, gdouble y, gdouble *px, gdouble *py); void (*get_point)(GtkWidget *plot, gint px, gint py, gdouble *x, gdouble *y); /* void (* error) (GtkPlot *plot, gint errno); */ }; struct _GtkPlotDataClass { GtkWidgetClass parent_class; gboolean(*add_to_plot)(GtkPlotData *data, GtkPlot *plot); void (*update)(GtkPlotData *data, gboolean new_range); void (*gradient_changed)(GtkPlotData *data); void (*gradient_colors_changed)(GtkPlotData *data); void (*draw_data)(GtkPlotData *data); void (*draw_symbol)(GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); void (*draw_legend)(GtkPlotData *data, gint x, gint y); void (*get_legend_size)(GtkPlotData *data, gint *width, gint *height); void (*draw_gradient)(GtkPlotData *data); void (*get_gradient_size)(GtkPlotData *data, gint *width, gint *height); void (*clone)(GtkPlotData *data, GtkPlotData *copy); /* void (* error) (GtkPlotData *data, gint errno); */ }; struct _GtkPlotAxisClass { GtkObjectClass parent_class; gboolean(*tick_label)(GtkPlotAxis *axis, gdouble *tick, gchar *label); gboolean(*changed)(GtkPlotAxis *axis); }; /* Plot */ GType gtk_plot_get_type(void); GtkWidget *gtk_plot_new(GdkDrawable *drawable); GtkWidget *gtk_plot_new_with_size(GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_construct(GtkPlot *plot, GdkDrawable *drawable); void gtk_plot_construct_with_size(GtkPlot *plot, GdkDrawable *drawable, gdouble width, gdouble height); void gtk_plot_set_drawable(GtkPlot *plot, GdkDrawable *drawable); GdkDrawable *gtk_plot_get_drawable(GtkPlot *plot); void gtk_plot_set_pc(GtkPlot *plot, GtkPlotPC *pc); void gtk_plot_set_background_pixmap(GtkPlot *plot, GdkPixmap *pixmap); void gtk_plot_set_transparent(GtkPlot *plot, gboolean transparent); gboolean gtk_plot_is_transparent(GtkPlot *plot); void gtk_plot_get_position(GtkPlot *plot, gdouble *x, gdouble *y); void gtk_plot_get_size(GtkPlot *plot, gdouble *width, gdouble *height); GtkAllocation gtk_plot_get_internal_allocation(GtkPlot *plot); void gtk_plot_set_background(GtkPlot *plot, const GdkColor *bg_color); void gtk_plot_paint(GtkPlot *plot); void gtk_plot_refresh(GtkPlot *plot, GdkRectangle *drawing_area); void gtk_plot_move(GtkPlot *plot, gdouble x, gdouble y); void gtk_plot_resize(GtkPlot *plot, gdouble width, gdouble height); void gtk_plot_set_magnification(GtkPlot *plot, gdouble magnification); void gtk_plot_move_resize(GtkPlot *plot, gdouble x, gdouble y, gdouble width, gdouble height); void gtk_plot_get_pixel(GtkPlot *plot, gdouble xx, gdouble yy, gdouble *x, gdouble *y); void gtk_plot_get_point(GtkPlot *plot, gint x, gint y, gdouble *xx, gdouble *yy); void gtk_plot_clip_data(GtkPlot *plot, gboolean clip); void gtk_plot_set_xrange(GtkPlot *plot, gdouble xmin, gdouble xmax); void gtk_plot_set_yrange(GtkPlot *plot, gdouble ymin, gdouble ymax); void gtk_plot_set_range(GtkPlot *plot, gdouble xmin, gdouble xmax, gdouble ymin, gdouble ymax); void gtk_plot_autoscale(GtkPlot *plot); void gtk_plot_get_xrange(GtkPlot *plot, gdouble *xmin, gdouble *xmax); void gtk_plot_get_yrange(GtkPlot *plot, gdouble *ymin, gdouble *ymax); void gtk_plot_set_xscale(GtkPlot *plot, GtkPlotScale scale_type); void gtk_plot_set_yscale(GtkPlot *plot, GtkPlotScale scale_type); GtkPlotScale gtk_plot_get_xscale(GtkPlot *plot); GtkPlotScale gtk_plot_get_yscale(GtkPlot *plot); void gtk_plot_reflect_x(GtkPlot *plot, gboolean reflect); void gtk_plot_reflect_y(GtkPlot *plot, gboolean reflect); gboolean gtk_plot_is_x_reflected(GtkPlot *plot); gboolean gtk_plot_is_y_reflected(GtkPlot *plot); GtkPlotText *gtk_plot_put_text(GtkPlot *plot, gdouble x, gdouble y, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text); gint gtk_plot_remove_text(GtkPlot *plot, GtkPlotText *text); void gtk_plot_text_get_size(const gchar *text, gint angle, const gchar *text_font, gint text_height, gint *width, gint *height, gint *ascent, gint *descent); void gtk_plot_text_get_area(const gchar *text, gint angle, GtkJustification just, const gchar *font_name, gint font_size, gint *x, gint *y, gint *width, gint *height); void gtk_plot_text_set_attributes(GtkPlotText *text_attr, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification, const gchar *text); void gtk_plot_text_set_border(GtkPlotText *text, GtkPlotBorderStyle border, gint border_space, gint border_width, gint shadow_width); void gtk_plot_draw_line(GtkPlot *plot, GtkPlotLine line, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_draw_text(GtkPlot *plot, GtkPlotText text); void gtk_plot_set_ticks(GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step, gint nminor); void gtk_plot_set_major_ticks(GtkPlot *plot, GtkPlotOrientation orientation, gdouble major_step); void gtk_plot_set_minor_ticks(GtkPlot *plot, GtkPlotOrientation orientation, gint nminor); void gtk_plot_set_ticks_limits(GtkPlot *plot, GtkPlotOrientation orientation, gdouble begin, gdouble end); void gtk_plot_unset_ticks_limits(GtkPlot *plot, GtkPlotOrientation orientation); void gtk_plot_set_break(GtkPlot *plot, GtkPlotOrientation orientation, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos); void gtk_plot_remove_break(GtkPlot *plot, GtkPlotOrientation orientation); /* Axis */ GType gtk_plot_axis_get_type(void); GtkObject *gtk_plot_axis_new(GtkPlotOrientation orientation); void gtk_plot_axis_construct(GtkPlotAxis *axis, GtkPlotOrientation orientation); GtkPlotAxis *gtk_plot_get_axis(GtkPlot *plot, GtkPlotAxisPos axis); void gtk_plot_axis_set_visible(GtkPlotAxis *axis, gboolean visible); gboolean gtk_plot_axis_visible(GtkPlotAxis *axis); void gtk_plot_axis_set_title(GtkPlotAxis *axis, const gchar *title); void gtk_plot_axis_show_title(GtkPlotAxis *axis); void gtk_plot_axis_hide_title(GtkPlotAxis *axis); void gtk_plot_axis_move_title(GtkPlotAxis *axis, gint angle, gdouble x, gdouble y); void gtk_plot_axis_justify_title(GtkPlotAxis *axis, GtkJustification justification); void gtk_plot_axis_set_attributes(GtkPlotAxis *axis, gfloat width, const GdkColor *color); void gtk_plot_axis_get_attributes(GtkPlotAxis *axis, gfloat *width, GdkColor *color); void gtk_plot_axis_set_ticks(GtkPlotAxis *axis, gdouble major_step, gint nminor); void gtk_plot_axis_set_major_ticks(GtkPlotAxis *axis, gdouble major_step); void gtk_plot_axis_set_minor_ticks(GtkPlotAxis *axis, gint nminor); void gtk_plot_axis_set_ticks_length(GtkPlotAxis *axis, gint length); void gtk_plot_axis_set_ticks_width(GtkPlotAxis *axis, gfloat width); void gtk_plot_axis_show_ticks(GtkPlotAxis *axis, gint major_mask, gint minor_mask); void gtk_plot_axis_set_ticks_limits(GtkPlotAxis *axis, gdouble begin, gdouble end); void gtk_plot_axis_unset_ticks_limits(GtkPlotAxis *axis); void gtk_plot_axis_set_tick_labels(GtkPlotAxis *axis, GtkPlotArray *array); void gtk_plot_axis_set_break(GtkPlotAxis *axis, gdouble min, gdouble max, gdouble step_after, gint nminor_after, GtkPlotScale scale_after, gdouble pos); void gtk_plot_axis_remove_break(GtkPlotAxis *axis); void gtk_plot_axis_show_labels(GtkPlotAxis *axis, gint labels_mask); void gtk_plot_axis_title_set_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification); void gtk_plot_axis_set_labels_attributes (GtkPlotAxis *axis, const gchar *font, gint height, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, GtkJustification justification); #define gtk_plot_axis_set_labels_numbers gtk_plot_axis_set_labels_style void gtk_plot_axis_set_labels_style(GtkPlotAxis *axis, GtkPlotLabelStyle style, gint precision); void gtk_plot_axis_set_labels_offset(GtkPlotAxis *axis, gint offset); gint gtk_plot_axis_get_labels_offset(GtkPlotAxis *axis); void gtk_plot_axis_use_custom_tick_labels (GtkPlotAxis *axis, gboolean use); void gtk_plot_axis_set_labels_suffix(GtkPlotAxis *axis, const gchar *text); void gtk_plot_axis_set_labels_prefix(GtkPlotAxis *axis, const gchar *text); gchar *gtk_plot_axis_get_labels_suffix(GtkPlotAxis *axis); gchar *gtk_plot_axis_get_labels_prefix(GtkPlotAxis *axis); void gtk_plot_axis_ticks_recalc(GtkPlotAxis *axis); void gtk_plot_axis_ticks_autoscale(GtkPlotAxis *axis, gdouble xmin, gdouble xmax, gint *precision); gdouble gtk_plot_axis_ticks_transform(GtkPlotAxis *axis, gdouble y); gdouble gtk_plot_axis_ticks_inverse(GtkPlotAxis *axis, gdouble x); void gtk_plot_axis_parse_label(GtkPlotAxis *axis, gdouble val, gint precision, gint style, gchar *label); /* Grids */ void gtk_plot_x0_set_visible(GtkPlot *plot, gboolean visible); gboolean gtk_plot_x0_visible(GtkPlot *plot); void gtk_plot_y0_set_visible(GtkPlot *plot, gboolean visible); gboolean gtk_plot_y0_visible(GtkPlot *plot); void gtk_plot_grids_set_on_top(GtkPlot *plot, gboolean on_top); gboolean gtk_plot_grids_on_top(GtkPlot *plot); void gtk_plot_grids_set_visible(GtkPlot *plot, gboolean vmajor, gboolean vminor, gboolean hmajor, gboolean hminor); void gtk_plot_grids_visible(GtkPlot *plot, gboolean *vmajor, gboolean *vminor, gboolean *hmajor, gboolean *hminor); void gtk_plot_y0line_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_x0line_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_major_vgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle style, gfloat width, const GdkColor *color); void gtk_plot_minor_vgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_major_hgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); void gtk_plot_minor_hgrid_set_attributes(GtkPlot *plot, GtkPlotLineStyle line_style, gfloat width, const GdkColor *color); /* Legends */ void gtk_plot_show_legends(GtkPlot *plot); void gtk_plot_hide_legends(GtkPlot *plot); void gtk_plot_set_legends_border(GtkPlot *plot, GtkPlotBorderStyle legends_border, gint shadow_width); void gtk_plot_legends_move(GtkPlot *plot, gdouble x, gdouble y); void gtk_plot_legends_get_position(GtkPlot *plot, gdouble *x, gdouble *y); GtkAllocation gtk_plot_legends_get_allocation(GtkPlot *plot); void gtk_plot_legends_set_attributes(GtkPlot *plot, const gchar *font, gint height, const GdkColor *foreground, const GdkColor *background); void gtk_plot_set_line_attributes(GtkPlot *plot, GtkPlotLine line); /* Datasets */ void gtk_plot_add_data(GtkPlot *plot, GtkPlotData *data); gint gtk_plot_remove_data(GtkPlot *plot, GtkPlotData *dataset); GtkPlotData *gtk_plot_add_function(GtkPlot *plot, GtkPlotFunc function); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_H__ */ gtkextra-3.2.0/gtkextra/testcharsel.c0000644000076400001440000000134612603754176014623 00000000000000 #include #include #include #include "gtkcharsel.h" GtkWidget *charsel; void quit () { gtk_main_quit(); } void ok_clicked(GtkWidget *widget, gpointer data) { GtkCharSelection *charsel; charsel = GTK_CHAR_SELECTION(data); } int main(int argc, char *argv[]) { gtk_init(&argc, &argv); charsel=gtk_char_selection_new(); g_signal_connect (GTK_OBJECT (charsel), "destroy", (void *)quit, NULL); /* g_signal_connect (GTK_OBJECT (GTK_CHAR_SELECTION(charsel)->ok_button), "clicked", G_CALLBACK(ok_clicked), charsel); */ /* gtk_char_selection_set_selection(GTK_CHAR_SELECTION(charsel), 25); */ gtk_widget_show(charsel); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkplotcanvas.h0000644000076400001440000002770112604171206015156 00000000000000/* gtkplotcanvas - gtkplot canvas widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_CANVAS_H__ #define __GTK_PLOT_CANVAS_H__ #include #include "gtkplot.h" #include "gtkplotpc.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * GtkPlotCanvasFlags: * @GTK_PLOT_CANVAS_CAN_SELECT: Select region * @GTK_PLOT_CANVAS_CAN_SELECT_ITEM: Select items * @GTK_PLOT_CANVAS_CAN_DND: DnD items * * Selection and DND mode of #GtkPlotCanvas * **/ typedef enum { GTK_PLOT_CANVAS_CAN_SELECT = 1 << 0, GTK_PLOT_CANVAS_CAN_SELECT_ITEM = 1 << 1, GTK_PLOT_CANVAS_CAN_DND = 1 << 2, } GtkPlotCanvasFlags; /* canvas actions */ typedef enum { GTK_PLOT_CANVAS_ACTION_INACTIVE, GTK_PLOT_CANVAS_ACTION_SELECTION, GTK_PLOT_CANVAS_ACTION_DRAG, GTK_PLOT_CANVAS_ACTION_RESIZE, } GtkPlotCanvasAction; #ifndef DISABLE_DEPRECATED /** * GtkPlotCanvasFlag: * @GTK_PLOT_CANVAS_FROZEN: Child is frozen * @GTK_PLOT_CANVAS_CAN_MOVE: Child can be moved * @GTK_PLOT_CANVAS_CAN_RESIZE: Child can be resized * * Deprecated, Used for GtkPlotCanvasChild. Use * #GtkPlotCanvasChildFlags instead. * * Deprecated: 3.1.6: use #GtkPlotCanvasChildFlags **/ typedef enum { GTK_PLOT_CANVAS_FROZEN = 0, GTK_PLOT_CANVAS_CAN_MOVE = 1 << 0, GTK_PLOT_CANVAS_CAN_RESIZE = 1 << 1, } GtkPlotCanvasFlag; #endif /** * GtkPlotCanvasChildFlags: * @GTK_PLOT_CANVAS_CHILD_FROZEN: Child is frozen * @GTK_PLOT_CANVAS_CHILD_CAN_MOVE: Child can be moved * @GTK_PLOT_CANVAS_CHILD_CAN_RESIZE: Child can be resized * * move/resize-mode of #GtkPlotCanvasChild * **/ typedef enum { GTK_PLOT_CANVAS_CHILD_FROZEN = 0, GTK_PLOT_CANVAS_CHILD_CAN_MOVE = 1 << 0, GTK_PLOT_CANVAS_CHILD_CAN_RESIZE = 1 << 1, } GtkPlotCanvasChildFlags; typedef enum { GTK_PLOT_CANVAS_SELECT_NONE, GTK_PLOT_CANVAS_SELECT_MARKERS, GTK_PLOT_CANVAS_SELECT_TARGET, } GtkPlotCanvasSelection; typedef enum { GTK_PLOT_CANVAS_SELECT_CLICK_1, GTK_PLOT_CANVAS_SELECT_CLICK_2, } GtkPlotCanvasSelectionMode; typedef enum { GTK_PLOT_CANVAS_OUT, GTK_PLOT_CANVAS_IN, GTK_PLOT_CANVAS_LEFT, GTK_PLOT_CANVAS_RIGHT, GTK_PLOT_CANVAS_TOP, GTK_PLOT_CANVAS_BOTTOM, GTK_PLOT_CANVAS_TOP_LEFT, GTK_PLOT_CANVAS_TOP_RIGHT, GTK_PLOT_CANVAS_BOTTOM_LEFT, GTK_PLOT_CANVAS_BOTTOM_RIGHT, } GtkPlotCanvasPos; #define GTK_PLOT_CANVAS_DND_FLAGS (GTK_PLOT_CANVAS_CAN_SELECT_ITEM | \ GTK_PLOT_CANVAS_CAN_DND ) #define GTK_PLOT_CANVAS(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_get_type (), GtkPlotCanvas) #define GTK_PLOT_CANVAS_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_get_type(), GtkPlotCanvasClass) #define GTK_IS_PLOT_CANVAS(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_get_type ()) #define G_TYPE_PLOT_CANVAS (gtk_plot_canvas_get_type ()) /* Public flags, for compatibility */ #define GTK_PLOT_CANVAS_FLAGS(canvas) gtk_plot_canvas_flags(canvas) #define GTK_PLOT_CANVAS_SET_FLAGS(canvas, flags) \ gtk_plot_canvas_set_flags(canvas, flags) #define GTK_PLOT_CANVAS_UNSET_FLAGS(canvas, flags) \ gtk_plot_canvas_unset_flags(canvas,flags) #define GTK_PLOT_CANVAS_CAN_DND_POINT(canvas) (GTK_PLOT_CANVAS_FLAGS(canvas) & GTK_PLOT_CANVAS_CAN_DND_POINT) #define GTK_PLOT_CANVAS_CAN_DND(canvas) (GTK_PLOT_CANVAS_FLAGS(canvas) & GTK_PLOT_CANVAS_CAN_DND) #define GTK_PLOT_CANVAS_CAN_SELECT_POINT(canvas) (GTK_PLOT_CANVAS_FLAGS(canvas) & GTK_PLOT_CANVAS_CAN_SELECT_POINT) #define GTK_PLOT_CANVAS_CAN_SELECT_ITEM(canvas) (GTK_PLOT_CANVAS_FLAGS(canvas) & GTK_PLOT_CANVAS_CAN_SELECT_ITEM) #define GTK_PLOT_CANVAS_CAN_SELECT(canvas) (GTK_PLOT_CANVAS_FLAGS(canvas) & GTK_PLOT_CANVAS_CAN_SELECT) #define GTK_PLOT_CANVAS_CHILD(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_plot_canvas_child_get_type (), GtkPlotCanvasChild) #define GTK_PLOT_CANVAS_CHILD_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_plot_canvas_child_get_type(), GtkPlotCanvasChildClass) #define GTK_IS_PLOT_CANVAS_CHILD(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_plot_canvas_child_get_type ()) #define G_TYPE_PLOT_CANVAS_CHILD (gtk_plot_canvas_child_get_type ()) typedef struct _GtkPlotCanvas GtkPlotCanvas; typedef struct _GtkPlotCanvasClass GtkPlotCanvasClass; typedef struct _GtkPlotCanvasChild GtkPlotCanvasChild; typedef struct _GtkPlotCanvasChildClass GtkPlotCanvasChildClass; /** * GtkPlotCanvasChild: * * The GtkPlotCanvasChild struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvasChild { GtkObject object; GtkPlotCanvas *parent; gdouble rx1, rx2, ry1, ry2; gint min_width, min_height; GtkAllocation allocation; GtkAllocation drag_area; guint state; GtkPlotCanvasChildFlags flags; GtkPlotCanvasSelection selection; GtkPlotCanvasSelectionMode mode; }; struct _GtkPlotCanvasChildClass { GtkObjectClass parent_class; void (*draw) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); void (*draw_selection) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, GtkAllocation allocation); void (*size_allocate) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); void (*move) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x, gdouble y); void (*move_resize) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); GtkPlotCanvasPos (*button_press) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gint x, gint y); void (*button_release) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); void (*unselect) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); void (*set_magnification) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble m); }; /** * GtkPlotCanvas: * * The GtkPlotCanvas struct contains only private data. * It should only be accessed through the functions described below. */ struct _GtkPlotCanvas { GtkFixed fixed; GtkPlotCanvasFlags flags; guint state; guint freeze_count; gint pixmap_width, pixmap_height; gint width, height; gdouble magnification; gboolean show_grid; gdouble grid_step; GtkPlotLine grid; GtkPlotCanvasAction action; GdkPixmap *pixmap; GdkColor background; gboolean transparent; gdouble active_x, active_y; GtkPlotCanvasChild *active_item; GtkPlotCanvasPos drag_point; gint drag_x, drag_y; gint pointer_x, pointer_y; GtkAllocation drag_area; GList *childs; GdkCursor *cursor; GtkPlotPC *pc; }; struct _GtkPlotCanvasClass { GtkLayoutClass parent_class; gboolean (*select_item) (GtkPlotCanvas *canvas, GdkEventButton *event, GtkPlotCanvasChild *item); gboolean (*move_item) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *item, gdouble new_x, gdouble new_y); gboolean (*resize_item) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *item, gdouble new_width, gdouble new_height); void (*add_item) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *item); gboolean (*delete_item) (GtkPlotCanvas *canvas, GtkPlotCanvasChild *item); void (*select_region) (GtkPlotCanvas *canvas, gdouble xmin, gdouble ymin, gdouble xmax, gdouble ymax); void (*changed) (GtkPlotCanvas *canvas); }; GType gtk_plot_canvas_get_type (void); GType gtk_plot_canvas_child_get_type (void); GtkWidget* gtk_plot_canvas_new (gint width, gint height, gdouble magnification); void gtk_plot_canvas_construct (GtkPlotCanvas *canvas, gint width, gint height, gdouble magnification); void gtk_plot_canvas_set_pc (GtkPlotCanvas *canvas, GtkPlotPC *pc); GtkPlotCanvasFlags gtk_plot_canvas_flags(GtkPlotCanvas *canvas); void gtk_plot_canvas_set_flags(GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags); void gtk_plot_canvas_unset_flags(GtkPlotCanvas *canvas, GtkPlotCanvasFlags flags); void gtk_plot_canvas_paint (GtkPlotCanvas *canvas); void gtk_plot_canvas_refresh (GtkPlotCanvas *canvas); void gtk_plot_canvas_freeze (GtkPlotCanvas *canvas); void gtk_plot_canvas_thaw (GtkPlotCanvas *canvas); void gtk_plot_canvas_grid_set_visible(GtkPlotCanvas *canvas, gboolean visible); void gtk_plot_canvas_grid_set_step (GtkPlotCanvas *canvas, gdouble step); void gtk_plot_canvas_grid_set_attributes(GtkPlotCanvas *canvas, GtkPlotLineStyle style, gint width, const GdkColor *color); void gtk_plot_canvas_cancel_action (GtkPlotCanvas *plot_canvas); void gtk_plot_canvas_unselect (GtkPlotCanvas *plot_canvas); GtkPlotCanvasChild * gtk_plot_canvas_get_active_item (GtkPlotCanvas *canvas); void gtk_plot_canvas_set_size (GtkPlotCanvas *canvas, gint width, gint height); void gtk_plot_canvas_set_magnification (GtkPlotCanvas *canvas, gdouble magnification); void gtk_plot_canvas_set_transparent (GtkPlotCanvas *canvas, gboolean transparent); gboolean gtk_plot_canvas_transparent (GtkPlotCanvas *canvas); void gtk_plot_canvas_set_background (GtkPlotCanvas *canvas, const GdkColor *bg_color); void gtk_plot_canvas_get_pixel (GtkPlotCanvas *canvas, gdouble px, gdouble py, gint *x, gint *y); void gtk_plot_canvas_get_position (GtkPlotCanvas *plot_canvas, gint x, gint y, gdouble *px, gdouble *py); void gtk_plot_canvas_put_child (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_canvas_remove_child (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child); void gtk_plot_canvas_child_move (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1); void gtk_plot_canvas_child_move_resize (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, gdouble x1, gdouble y1, gdouble x2, gdouble y2); void gtk_plot_canvas_child_set_selection (GtkPlotCanvasChild *child, GtkPlotCanvasSelection selection); void gtk_plot_canvas_child_set_selection_mode (GtkPlotCanvasChild *child, GtkPlotCanvasSelectionMode mode); gboolean gtk_plot_canvas_child_get_position (GtkPlotCanvas *canvas, GtkPlotCanvasChild *child, double *x1, double *y1, double *x2, double *y2); void gtk_plot_canvas_set_line_attributes (GtkPlotCanvas *canvas, GtkPlotLine line); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_CANVAS_H__ */ gtkextra-3.2.0/gtkextra/gtkfileicons.h0000644000076400001440000010323212603754176014765 00000000000000/* gtkfileicons - icons for gtkfilelist */ #ifndef __GTK_FILE_ICONS_H__ #define __GTK_FILE_ICONS_H__ /* XPM */ static char * exec_xpm[] = { "24 24 80 1", " c None", ". c #000000", "+ c #B2A97E", "@ c #B6AD81", "# c #7A7356", "$ c #B0A77C", "% c #B5AC80", "& c #BAB184", "* c #BBB284", "= c #B6AD80", "- c #ADA57B", "; c #B7AE81", "> c #BDB486", ", c #837C5C", "' c #B4AC80", ") c #7C7557", "! c #C0B687", "~ c #BEB586", "{ c #B1A87D", "] c #B9B082", "^ c #C0B788", "/ c #AFA67B", "( c #AFA77C", "_ c #BAB183", ": c #BBB285", "< c #BCB385", "[ c #C4BB8B", "} c #C6BC8C", "| c #C7BD8D", "1 c #C7BE8D", "2 c #C8BF8E", "3 c #C8BE8D", "4 c #C5BC8B", "5 c #C1B788", "6 c #B9B083", "7 c #CDC391", "8 c #D0C693", "9 c #D1C794", "0 c #D3C995", "a c #CDC491", "b c #C2B889", "c c #CAC18F", "d c #D5CB97", "e c #D6CC97", "f c #D6CC98", "g c #D7CD98", "h c #CEC491", "i c #C2B98A", "j c #CBC18F", "k c #C1B889", "l c #8A8261", "m c #D4CA96", "n c #C0B787", "o c #80785A", "p c #B9B183", "q c #827C5B", "r c #CFC592", "s c #C7BD8C", "t c #C3BA8A", "u c #CAC08F", "v c #D0C793", "w c #7C7657", "x c #D2C894", "y c #D2C995", "z c #CCC290", "A c #C4BA8A", "B c #D1C793", "C c #CEC592", "D c #C5BC8C", "E c #CFC693", "F c #C1B888", "G c #BEB486", "H c #C8BF8D", "I c #C9C08F", "J c #C9BF8E", "K c #C5BB8B", "L c #B2A97D", "M c #C2B989", "N c #BFB687", "O c #B3AA7E", " ", " ", " ", " .... ", " .+.@#. ", " .$%&*=-. ", " ..;>,$.. ", " .-')!~@. ... ", " ..{]~^.. ./({. . ", " .#._#._..&:<..@. ", " . ..>[}|1232456. ", " .2789009a2. ", " .bc9defge0h.. ", " .]ij9ekl1gm83n. ", " .*ic9dopqgmrs~. ", " . c #BAB4A4", ", c #DCD9CD", "' c #C6C5C0", ") c #AAA9A9", "! c #22201B", "~ c #655F51", "{ c #99907B", "] c #4C483D", "^ c #666052", "/ c #B2AB9A", "( c #CBC6B8", "_ c #FEFDF6", ": c #D4D3CD", "< c #7F7E7B", "[ c #5D5A52", "} c #988F7A", "| c #88806D", "1 c #A49C88", "2 c #EEEBE2", "3 c #555452", "4 c #5A5852", "5 c #7F7766", "6 c #AAA28F", "7 c #FFFEF7", "8 c #71706D", "9 c #2A2A29", "0 c #A79F8C", "a c #F3F1E9", "b c #7F7F7B", "c c #6E6858", "d c #BBB4A4", "e c #66635C", "f c #555044", "g c #4C473D", "h c #595447", "i c #837C69", "j c #6A6455", "k c #444036", " ", " ", " ", " ", " . ", " +@#$% ", " &* =*-;>>,')*!. ", " .~{]^/((_:<[]}^. ", " !|1,2__34~;{}^. ", " .5677895;}}{}^. ", " .0ab~}}}}}{}^. ", " .cd<~}}}}}{}^. ", " @6e~}}}}}}}^. ", " fg~}}}}}}=. ", " *g~}}}}=. ", " .~ij=. ", " .k=. ", " . ", " ", " "}; /* XPM */ static char * file_xpm[] = { "20 20 101 2", " c None", ". c #0E0E0C", "+ c #393934", "@ c #000000", "# c #525249", "$ c #9C9C8C", "% c #919183", "& c #0C0C0C", "* c #45453E", "= c #A5A594", "- c #C9C9B4", "; c #DCDCC4", "> c #D4D4BE", ", c #606057", "' c #111111", ") c #2A2A27", "! c #BBBBA7", "~ c #D6D6BF", "{ c #D6D6C0", "] c #D8D8C1", "^ c #E0E0C8", "/ c #CFCFB9", "( c #44443D", "_ c #858585", ": c #686865", "< c #CECEB8", "[ c #D5D5BE", "} c #DADAC3", "| c #DFDFC7", "1 c #E3E3CB", "2 c #E7E7CF", "3 c #9A9A8C", "4 c #C2C2C2", "5 c #8E8E8B", "6 c #979787", "7 c #D3D3BC", "8 c #DDDDC5", "9 c #EAEAD2", "0 c #EEEED5", "a c #6C6C61", "b c #C5C5C0", "c c #D0D0CA", "d c #5E5E57", "e c #BABAA6", "f c #DADAC2", "g c #E1E1C9", "h c #E8E8D0", "i c #EBEBD2", "j c #F1F1D8", "k c #DDDDC6", "l c #C6C6BF", "m c #6E6E6B", "n c #999989", "o c #D0D0B8", "p c #DEDEC6", "q c #E5E5CD", "r c #F2F2D9", "s c #F3F3DA", "t c #AAAA98", "u c #10100F", "v c #A9A997", "w c #D5D5BF", "x c #E2E2CA", "y c #E8E8CF", "z c #EDEDD4", "A c #F4F4DB", "B c #EDEDD5", "C c #909082", "D c #111110", "E c #6D6D67", "F c #D9D9C2", "G c #DBDBC4", "H c #DFDFC8", "I c #E9E9D0", "J c #F5F5DC", "K c #E1E1CA", "L c #5D5D54", "M c #3F3F3B", "N c #DEDEC7", "O c #E6E6CE", "P c #E0E0C9", "Q c #67675C", "R c #20201D", "S c #CDCDB9", "T c #ECECD3", "U c #F0F0D7", "V c #777770", "W c #E9E9D1", "X c #B4B4A1", "Y c #373731", "Z c #D1D1BC", "` c #5A5A51", " . c #494942", ".. c #494941", "+. c #1F1F1C", "@. c #A8A896", "#. c #D9D9C3", "$. c #77776B", "%. c #20201C", "&. c #282824", "*. c #3F3F39", " ", " ", " . + ", " @ # $ % & ", " @ * = - ; > , ", " ' ) ! ~ { ] ; ^ / ( ", " @ _ : < [ { } | 1 2 3 ", " @ 4 5 6 7 ] 8 1 2 9 0 a ", " @ b c d e f g h i 0 j k @ ", " @ l m n o p q i 0 j r s t @ ", " @ u v w k x y z j s A A B C D ", " @ E F G H q I 0 j s A J A K L ", " M 8 N x O 9 0 r A A J P Q R ", " @ S 1 q h T U s A A O ( ", " V 2 W i 0 j s s X Y ", " R Z z 0 U 0 w ` ", " .2 j 2 v .. ", " +.@.#.$.%. ", " &.*. ", " "}; /* XPM */ static char * symlink_xpm[] = { "7 7 4 1", " c None", ". c #7F7F7F", "+ c #000000", "@ c #FFFFFF", "......+", ".@@@@@+", ".@@++@+", ".@+.+@+", ".@+@@@+", ".@@@@@+", "+++++++"}; /* XPM */ static char * html_xpm[] = { "16 16 208 2", " c None", ". c #4D5761", "+ c #7C8F9B", "@ c #8699AD", "# c #758BA3", "$ c #69777E", "% c #4E555A", "& c #6C827E", "* c #6995BE", "= c #5390BF", "- c #6196AD", "; c #70A3B9", "> c #76A394", ", c #5A784B", "' c #4D6039", ") c #46504B", "! c #5C6B6F", "~ c #688479", "{ c #7AAAA3", "] c #5098CF", "^ c #459CD3", "/ c #4590CD", "( c #4482BD", "_ c #6F9E7C", ": c #587B40", "< c #52732A", "[ c #495D21", "} c #5B615A", "| c #515B67", "1 c #49688B", "2 c #4377B7", "3 c #4580CC", "4 c #519BDD", "5 c #61B8E3", "6 c #377AC0", "7 c #4A86BF", "8 c #89A27E", "9 c #728465", "0 c #6E8572", "a c #526655", "b c #485031", "c c #4B504C", "d c #46637E", "e c #486DCA", "f c #4573D3", "g c #5E9FE3", "h c #468BD1", "i c #387CC8", "j c #3878C7", "k c #7EA3C3", "l c #B4B580", "m c #A49F57", "n c #A29E62", "o c #86835D", "p c #706D4A", "q c #474732", "r c #3D474D", "s c #6C8BAA", "t c #5278D3", "u c #5784E4", "v c #579DDF", "w c #4472CE", "x c #5080D9", "y c #5195D6", "z c #A1C19C", "A c #BCB064", "B c #B9AA5D", "C c #A19557", "D c #8D8350", "E c #75703C", "F c #4E4F27", "G c #3C3E38", "H c #5C6970", "I c #72959E", "J c #7CA8D2", "K c #4D85DB", "L c #4391D5", "M c #4F74D1", "N c #4871CD", "O c #4084C6", "P c #8AAE88", "Q c #9DA12F", "R c #94932D", "S c #8B8934", "T c #787638", "U c #63632D", "V c #454A20", "W c #363B2D", "X c #65736D", "Y c #759351", "Z c #7CA563", "` c #78B1CE", " . c #4590D5", ".. c #4D8EDC", "+. c #4E90DB", "@. c #4488CE", "#. c #4A7C9E", "$. c #5B7C40", "%. c #526A37", "&. c #53672E", "*. c #556025", "=. c #4A511E", "-. c #3A3F1C", ";. c #21261A", ">. c #68704F", ",. c #5E6E1D", "'. c #5D7717", "). c #638B44", "!. c #6FA3A1", "~. c #5196BB", "{. c #357BC4", "]. c #346DB6", "^. c #3A7AB9", "/. c #316495", "(. c #2B5681", "_. c #44647A", ":. c #3D5230", "<. c #363F19", "[. c #343B19", "}. c #151B19", "|. c #656F59", "1. c #637628", "2. c #5E7616", "3. c #688216", "4. c #7B9127", "5. c #608852", "6. c #2F5BA3", "7. c #3661BA", "8. c #417EC1", "9. c #29609C", "0. c #27538C", "a. c #234876", "b. c #485F40", "c. c #3C421D", "d. c #292F17", "e. c #1D2527", "f. c #4E585F", "g. c #718169", "h. c #6F8522", "i. c #7B9220", "j. c #819726", "k. c #3E6243", "l. c #3055A6", "m. c #395FA5", "n. c #3D74A4", "o. c #2A5A90", "p. c #22437A", "q. c #284268", "r. c #495842", "s. c #323719", "t. c #1E2418", "u. c #293031", "v. c #59696E", "w. c #617329", "x. c #7B8F1E", "y. c #6F8833", "z. c #315570", "A. c #2A4F98", "B. c #2F5195", "C. c #326498", "D. c #1F4979", "E. c #244167", "F. c #2E425F", "G. c #3F4932", "H. c #282C19", "I. c #19211E", "J. c #3E4A56", "K. c #5E6844", "L. c #6F811B", "M. c #405F5C", "N. c #245388", "O. c #2C5D89", "P. c #2E558C", "Q. c #2A5D80", "R. c #1B4668", "S. c #233C58", "T. c #1B2D48", "U. c #2F382C", "V. c #191F19", "W. c #22292E", "X. c #535D46", "Y. c #69784F", "Z. c #243C5A", "`. c #1E477D", " + c #1E4B72", ".+ c #1E4972", "++ c #1E4B69", "@+ c #1D3A56", "#+ c #142B41", "$+ c #101F30", "%+ c #111C28", "&+ c #192127", "*+ c #49524C", "=+ c #2F3D4F", "-+ c #223858", ";+ c #1D3656", ">+ c #1E3855", ",+ c #1E3650", "'+ c #1A2E45", ")+ c #122236", "!+ c #0F1E2E", "~+ c #242E3A", "{+ c #2C3643", "]+ c #263345", "^+ c #132031", "/+ c #15212D", "(+ c #242F38", "_+ c #262E3A", " . + @ # $ ", " % & * = - ; > , ' ) ", " ! ~ { ] ^ / ( _ : < [ } ", " | 1 2 3 4 5 6 7 8 9 0 a b c ", " d e f g h i j k l m n o p q ", "r s t u v w x y z A B C D E F G ", "H I J K L M N O P Q R S T U V W ", "X Y Z ` ...+.@.#.$.%.&.*.=.-.;.", ">.,.'.).!.~.{.].^./.(._.:.<.[.}.", "|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.", "f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.", " v.w.x.y.z.A.B.C.D.E.F.G.H.I. ", " J.K.L.M.N.O.P.Q.R.S.T.U.V.W. ", " X.Y.Z.`. +.+++@+#+$+%+&+ ", " *+=+-+;+>+,+'+)+!+~+ ", " {+]+^+/+(+_+ "}; /* XPM */ /* Drawn for the K Desktop Environment */ /* See http://www.kde.org */ static char*arch_xpm[]={ "16 16 5 1", "a c #000000", "# c #ff0000", "b c #ff8000", "c c #ffdca8", ". c None", ".......##.......", "................", "......####......", "................", ".....a####a.....", "...aa######a....", ".aabbc####bbaa..", "..aaccc##bbbbaa.", ".accaacbbbbaaca.", "acccccaabaaccca.", ".aaccccaacccaa..", "..aaacabcaaaca..", "..abbabbccccca..", "..aabbbbcccaa...", "....aabbcaa.....", "......aaa......."}; /* XPM */ static char * core_xpm[] = { "16 16 23 1", " c None", ". c #000000000000", "X c #C8C860604545", "o c #FFFF00000000", "O c #FFFFFFFF0000", "+ c #6A6A17171414", "@ c #777715151212", "# c #858513131010", "$ c #929211110E0E", "% c #999910100D0D", "& c #56561B1B1717", "* c #8C8C12120F0F", "= c #A7A70E0E0B0B", "- c #ADAD0C0C0B0B", "; c #636318181515", ": c #B4B40B0B0A0A", "> c #C2C209090808", ", c #7E7E14141111", "< c #C8C808080707", "1 c #D6D606060505", "2 c #E3E304040303", "3 c #EAEA03030202", "4 c #717116161313", " .... . ", " . ..X ", " . .XoX", " ...... OXO", " ..+@#$%.. .O ", " .&+@*%=---. .", " .;@#%=:>>>. ", " .&+,$=:<111<. ", " .&+,%->12321. ", " .&4#%->13o31. ", " .&+,%->12321. ", " .&+,$=:<111<. ", " .;@#%=:>>>. ", " .&+@*%=---. ", " ..+@#$%.. ", " ..... "}; /* XPM */ static char *package_xpm[] = { /* width height num_colors chars_per_pixel */ " 16 16 5 1", /* colors */ ". c #000000", "# c #808000", "a c #c0c000", "b c #ffffc0", "c c none", /* pixels */ "ccccc..ccc.ccccc", "ccc..bb...b..ccc", "c..bb..#a..bb..c", ".bb..###aaa..bb.", "...#####aaaaa...", "c.b..###aaa...cc", "c.bbb..#a..aa.cc", "c.bbbbb..aaaa.cc", "c.bbbbbbaaaaa.cc", "c.bbbbbbaaaaa.cc", "c.bbbbbbaaaaa.cc", "c.bbbbbbaaaaa.cc", "c.abbbbbaaaa..cc", "cc..abbbaa..cccc", "cccc..ab..cccccc", "cccccc..cccccccc" }; /* XPM */ static char * ps_xpm[] = { "16 16 3 1", " c None", ". c #000000000000", "X c #FFFF00000000", " .... ", " . . ", " XXX XXX ", " X . X X . X ", " X . XX . X ", " X . . . . X ", " X . . . . X ", " X . XX . X ", " X. X X .X ", " .XXX XXX. ", " . . ", ".. ..", ".. ..", " .. .. ", " .. . . .. ", " .......... "}; /* XPM */ static char*sound_xpm[]={ "16 16 10 1", "d c #a0a0a0", "e c #c3c3c3", "a c #000000", "# c #800000", ". c None", "g c #beffff", "h c #c00000", "b c #585858", "c c #ffffff", "f c #ff0000", "..........#....a", "..........#..aab", "...aaaaaaa#aacdb", ".aaccccccc#cccda", "aecccccccc#ccaab", ".ecaaaaaaa#aacdb", "caaccccccc#cccda", "aecccccccc#ccaab", "cecaaaaaaa#aacdb", "caacccfffc#cccda", "aecccffgff#ccaab", "cecaafgffh#aacdb", "caaccfffhh#cccda", "aecccchhh#cccaa.", "cecaaaaaaaaaa...", "caa............."}; /* XPM */ static char * c_xpm[] = { "16 16 6 1", " c None", ". c #7F7F7F", "+ c #FFFFFF", "@ c #BFBFBF", "# c #000000", "$ c #00007F", " .......... ", " .++++++++@. ", " .++++++++@+. ", " .++++++++#### ", " .++++++++++@# ", " .+++$$$++++@# ", " .++$$+$$+++@# ", " .++$$+$$+++@# ", " .++$$++++++@# ", " .++$$+$$+++@# ", " .++$$+$$+++@# ", " .+++$$$++++@# ", " .++++++++++@# ", " .++++++++++@# ", " .@@@@@@@@@@@# ", " ############# "}; /* XPM */ static char * cat_xpm[] = { "16 16 71 1", " c None", ". c #000000", "+ c #404040", "@ c #C0C0C0", "# c #FFF8FF", "$ c #20585F", "% c #3FF8FF", "& c #5F98DF", "* c #BFB8BF", "= c #003800", "- c #7FF8FF", "; c #7FB8FF", "> c #AFA8AF", ", c #202020", "' c #20985F", ") c #7FF87F", "! c #60D8DF", "~ c #B09090", "{ c #CFC8CF", "] c #EFE8EF", "^ c #3FB8BF", "/ c #00F8FF", "( c #5F207F", "_ c #DF985F", ": c #FFB83F", "< c #7FB8BF", "[ c #5F585F", "} c #DFD8DF", "| c #6F686F", "1 c #3FB87F", "2 c #3F387F", "3 c #AFE8EF", "4 c #CF90CF", "5 c #9F989F", "6 c #3F383F", "7 c #5F205F", "8 c #7FB87F", "9 c #AF68AF", "0 c #3FF87F", "a c #7FF8BF", "b c #6FE8EF", "c c #40787F", "d c #00787F", "e c #7F78BF", "f c #7F783F", "g c #5F5820", "h c #FF787F", "i c #20B8BF", "j c #3F003F", "k c #7F787F", "l c #9FD8DF", "m c #3FB8FF", "n c #00783F", "o c #505050", "p c #9FD820", "q c #7FF800", "r c #AF70AF", "s c #503050", "t c #303030", "u c #606060", "v c #8F88CF", "w c #CF888F", "x c #305050", "y c #9F98BF", "z c #20B89F", "A c #DF983F", "B c #B0B0B0", "C c #8098BF", "D c #00F8BF", "E c #9F98DF", "F c #CF50CF", " .+@#.. ", " $%&@##*. ", " =--;@###>. ", " .,+')-!~{]]{, ", " ,^/(_:<([[{}{| ", ".1--234<|56789+ ", ",0abc>]*de{#5fg ", "gh:ijk*l-m@###6 ", "|l*>[kn--;@###{.", "o{#}5+pqarsk{}}t", ".####uvw&x}[y*@[", " 6###u{{}5[7z:Ag", " 6*#B5###>CbaD.", " ,..6###}E--1.", " [##}F/^t ", " ,k|o,. "}; /* XPM */ static char * cpp_xpm[] = { "16 16 6 1", " c None", ". c #7F7F7F", "+ c #FFFFFF", "@ c #BFBFBF", "# c #000000", "$ c #00007F", " .......... ", " .++++++++@. ", " .++++++++@+. ", " .++++++++#### ", " .++++++++++@# ", " .++$$$+++$+@# ", " .+$$+$$+$$$@# ", " .+$$+$$++$+@# ", " .+$$+++++++@# ", " .+$$+$$++$+@# ", " .+$$+$$+$$$@# ", " .++$$$+++$+@# ", " .++++++++++@# ", " .++++++++++@# ", " .@@@@@@@@@@@# ", " ############# "}; /* XPM */ static char * deb_xpm[] = { "16 16 88 1", " c None", ". c #DE2D36", "+ c #D3262E", "@ c #D6474F", "# c #D6343D", "$ c #8D434A", "% c #815A61", "& c #B0646B", "* c #D74C54", "= c #DB797F", "- c #E46C74", "; c #C0373E", "> c #888888", ", c #18176D", "' c #212072", ") c #C37279", "! c #DA232B", "~ c #D4333C", "{ c #E0444C", "] c #D5373F", "^ c #847174", "/ c #2D2D79", "( c #53537F", "_ c #C0A2A6", ": c #A84A50", "< c #8D5659", "[ c #E04850", "} c #AB454D", "| c #949293", "1 c #B3AFB0", "2 c #D9444E", "3 c #856267", "4 c #AC5960", "5 c #CB343E", "6 c #8C8789", "7 c #DC2932", "8 c #CC5D62", "9 c #AC4E56", "0 c #CB343C", "a c #B1B1B1", "b c #D63C43", "c c #DB2B34", "d c #C9AEB0", "e c #B7494F", "f c #D4333B", "g c #DA7780", "h c #C43E45", "i c #DE2831", "j c #D64850", "k c #904349", "l c #D14C54", "m c #DC2E37", "n c #DB5E66", "o c #AA363C", "p c #726E6F", "q c #DD2831", "r c #DD4C56", "s c #B22D35", "t c #6F5A5C", "u c #DC373F", "v c #DE474C", "w c #D21E27", "x c #BF1D25", "y c #942F35", "z c #625759", "A c #969696", "B c #DC2E36", "C c #D02934", "D c #A54249", "E c #7E6A6B", "F c #8C8A8B", "G c #D7434B", "H c #DC2831", "I c #D92831", "J c #BF2D36", "K c #DB2931", "L c #D92D36", "M c #D0434D", "N c #C9747D", "O c #D1343D", "P c #A24046", "Q c #7C5055", "R c #7B7A79", "S c #948B8D", "T c #9F5D63", "U c #C03137", "V c #D92932", "W c #9A9798", " .+@ ", " #$%&*= ", " -;>,')!~ ", " {]^ /(_:< ", " [}| 1 ", " 23 ", " 456 78 ", " 90a bc d ", " ef gh ", " i jk ", " lm nop ", " qi rst ", " uvwxyzA ", " BCDEF ", " GHIJKLMN ", " OPQRSTUVW "}; /* XPM */ static char * f_xpm[] = { "16 16 6 1", " c None", ". c #7F7F7F", "+ c #FFFFFF", "@ c #BFBFBF", "# c #000000", "$ c #00007F", " .......... ", " .++++++++@. ", " .++++++++@+. ", " .++++++++#### ", " .+++$$$$+++@# ", " .++$$++$$++@# ", " .++$$++++++@# ", " .++$$++++++@# ", " .++$$$$$+++@# ", " .++$$++++++@# ", " .++$$++++++@# ", " .++$$++++++@# ", " .++++++++++@# ", " .++++++++++@# ", " .@@@@@@@@@@@# ", " ############# "}; /* XPM */ static char * h_xpm[] = { "16 16 6 1", " c None", ". c #7F7F7F", "+ c #FFFFFF", "@ c #BFBFBF", "# c #000000", "$ c #00007F", " .......... ", " .++++++++@. ", " .++++++++@+. ", " .++++++++#### ", " .++$$++++++@# ", " .++$$++++++@# ", " .++$$$$$+++@# ", " .++$$++$$++@# ", " .++$$++$$++@# ", " .++$$++$$++@# ", " .++$$++$$++@# ", " .++$$++$$++@# ", " .++++++++++@# ", " .++++++++++@# ", " .@@@@@@@@@@@# ", " ############# "}; /* XPM */ static char * image_xpm[] = { "16 16 33 1", " c None", ". c #D0D0D0", "+ c #CFC8CF", "@ c #DFD8DF", "# c #FFF8FF", "$ c #3F383F", "% c #606060", "& c #505050", "* c #707070", "= c #808080", "- c #AFA8AF", "; c #909090", "> c #9F98A0", ", c #303030", "' c #4F484F", ") c #2F2800", "! c #2F602F", "~ c #60602F", "{ c #2F282F", "] c #90F890", "^ c #2FC800", "/ c #0F080F", "( c #60C82F", "_ c #60902F", ": c #602860", "< c #2F6000", "[ c #00602F", "} c #00C800", "| c #CFF8CF", "1 c #BFD8BF", "2 c #90F82F", "3 c #E0E0D0", "4 c #CF90CF", ".++++++.@#@@@@#+", "+$%%&&%*=-.@@@#;", "-&==>>=*%%=>.##>", "+*;>++..-=*%*;+>", "+%>>-+++++>****=", "+%*;>-----++=**=", "+*===;;>>-+++>=*", "+%==*===;;;;-++=", "-$&&$$%**=;==>+;", "+,',&*),!~'*=;>;", ".%{=#]^!/(_:%=>=", ".=%'+#^<[}|#%*;;", ".-;=&>12(3###&;;", "+-++-==>+4;;>%=>", "..@.@#@.+-->;-@-", "+=;;;>>>>>>->>-="}; /* XPM */ static char * movie_xpm[] = { "16 16 9 1", " c None", ". c #7F7F7F", "+ c #FFFFFF", "@ c #BFBFBF", "# c #000000", "$ c #007F7F", "% c #00FFFF", "& c #FF0000", "* c #00007F", " ......... ", " .+++++++@. ", " .+++++++@+. ", " .+++++++####", " .+++++++++@#", "$ .+++++++++@#", "$$%$$$$$$$++..@#", "$##%%%#%%$#$.#@#", "# ####%%%$#%@#@#", " $%%%%%%$##$#@#", " $&%%#%#*#+##@#", " ######*##+++@#", " .+++++++++@#", " .+++++++++@#", " .@@@@@@@@@@#", " ############"}; /* XPM */ static char * pdf_xpm[] = { "16 16 71 1", " c None", ". c #F47075", "+ c #CC6E6D", "@ c #E34342", "# c #AC8F90", "$ c #E53634", "% c #BA4548", "& c #A5686A", "* c #F04748", "= c #EF2E32", "- c #8F5859", "; c #DB1E1B", "> c #685858", ", c #FD1315", "' c #AF6968", ") c #F22020", "! c #EA2324", "~ c #C18886", "{ c #F35D5E", "] c #9A4241", "^ c #C74747", "/ c #EE2829", "( c #C48583", "_ c #EA3939", ": c #B79090", "< c #E6494A", "[ c #E52221", "} c #F43938", "| c #E45453", "1 c #DD4F4B", "2 c #CD423F", "3 c #E24E4D", "4 c #B69392", "5 c #EF8E8D", "6 c #EC3637", "7 c #AB5455", "8 c #C67475", "9 c #846564", "0 c #8D6A6A", "a c #C03E3F", "b c #ED2426", "c c #F21E1C", "d c #A5312D", "e c #DC3232", "f c #873737", "g c #F44341", "h c #983636", "i c #585858", "j c #898989", "k c #AF3A39", "l c #8E3D3F", "m c #5E4C4C", "n c #656565", "o c #E46360", "p c #E16A66", "q c #BB3331", "r c #5C5A5A", "s c #D1706F", "t c #B1706D", "u c #C93C39", "v c #664E4D", "w c #F07D79", "x c #B06460", "y c #CA655F", "z c #72605F", "A c #EB716E", "B c #E43B36", "C c #874845", "D c #909090", "E c #7F5654", "F c #6F6F6F", " .+ ", " @ # ", " $%& ", " *=- ", " ;> ", " ,' ", " )!~ ", " {]^/( ", " _ :<[}|1234", " 567890abcdef", " ghij klmn", " opqr ", " stuv ", "wxyz ", "ABCD ", " EF "}; /* XPM */ static char * rpm_xpm[] = { "16 16 80 2", " c None", ". c #FFFFFF", "+ c #E1E1E1", "@ c #A2A2A2", "# c #959595", "$ c #9E9E9E", "% c #9B9B9B", "& c #929292", "* c #BEBBBB", "= c #FDF8F8", "- c #C8C8C8", "; c #464646", "> c #6F6F6F", ", c #DBDBDB", "' c #F9F9F9", ") c #CFB7B8", "! c #E15A5D", "~ c #E98A8C", "{ c #FDF4F4", "] c #969696", "^ c #030303", "/ c #A7A7A7", "( c #E1595C", "_ c #DD4346", ": c #FAE5E6", "< c #020202", "[ c #2C2C2C", "} c #C0C0C0", "| c #F0F0F0", "1 c #F4C5C6", "2 c #D72226", "3 c #E05558", "4 c #FEFEFE", "5 c #707070", "6 c #797979", "7 c #EAEAEA", "8 c #D6C1C2", "9 c #C14C4E", "0 c #BC272A", "a c #F4DCDC", "b c #9C9C9C", "c c #727272", "d c #D8D8D8", "e c #6A6A6A", "f c #888888", "g c #9A9A9A", "h c #F4F4F4", "i c #DEDEDE", "j c #A6A6A6", "k c #7E7E7E", "l c #818181", "m c #A3A3A3", "n c #D7D7D7", "o c #575757", "p c #494949", "q c #FAFAFA", "r c #E5E5E5", "s c #000000", "t c #B8B8B8", "u c #515151", "v c #434343", "w c #C7C7C7", "x c #4E4E4E", "y c #D3D3D3", "z c #CBCBCB", "A c #B1B1B1", "B c #414141", "C c #616161", "D c #B4B4B4", "E c #ADADAD", "F c #C3C3C3", "G c #E6E6E6", "H c #8D8D8D", "I c #EDEDED", "J c #B0B0B0", "K c #EBEBEB", "L c #E8E8E8", "M c #F7F7F7", "N c #C9C9C9", "O c #F6F6F6", ". . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . ", ". . . . + @ # $ % & * = . . . . ", ". . - ; > , . . . ' ) ! ~ { . . ", ". ] ^ / . . . . . . . = ( _ : . ", "- < [ . . . . } , | . . 1 2 3 4 ", "5 [ 6 . . . . . 4 7 , , 8 9 0 a ", "b 5 c d e f g h i e j k l m 6 n ", "o p q r s t u v w s n x u y s z ", "o p . r s A B C w s n x u y s z ", "D E . r s > F 4 G H I J A K H L ", ". . . M N O . . . . . . . . . . ", ". . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . "}; /* XPM */ static char * text_xpm[] = { "16 16 5 1", " c None", ". c #000000", "+ c #FFFFFF", "@ c #7F7F7F", "# c #BFBFBF", " .+.+.+.+. ", " .+@+@+@+@+. ", " @+.+.+.+.+.+. ", " @++++++++++#. ", " @++++++++++#. ", " @++...+..++#. ", " @++++++++++#. ", " @++......++#. ", " @++++++++++#. ", " @++......++#. ", " @++++++++++#. ", " @++......++#. ", " @++++++++++#. ", " @++++++++++#. ", " @###########. ", " ........... "}; /* XPM */ static char * java_xpm[] = { "16 16 5 1", " c #FFFFFFFFFFFF", ". c #FFFF00000000", "X c #98980000FFFF", "o c #7D7D7E7E7C7C", "O c #D6D6D6D6D6D6", " ... . ", " .... .. ", " .. ... ", " ..... ", " ..X.X. XX ", " X..X .XXX X", " XXX ....XXX X", " XXXX.X..XXX X ", " ..X XXX ", " XXXXXXXXXXX ", " XXX X XXX ", " X XXXXXXXX XX ", "XXXXXoO XX XXXX", "XXXoXXXXXX XXXX ", " XXXXXXXXXXXXX ", " XXXXXXX "}; /* XPM */ static char * doc_xpm[] = { "16 16 5 1", " c None", ". c #000000000000", "X c #FAFAFAFAD4D4", "o c #ACACADADABAB", "O c #D6D6D6D6D6D6", " ........ ", " .XXXXXX. ", " ..X..X.X.. ", " ..XX.X.X.. ", " ..X.X..X.. ", ".....X..X.X.....", "..o..........o..", "....OoOoOoOo....", " ............ ", " .o.O.O.O.Oo. ", " ...O.O.O.O.o.. ", " .oO.O.O.O.O.o. ", "..o.O.O.O.O.Oo..", ".o.O........O.o.", ".oooooooooooooo.", "................"}; /* XPM */ static char *home_xpm[]={ "24 24 220 2", "Qt c None", "bq c #1c1f1a", "bp c #1e1715", "a5 c #291b1a", "br c #293427", "bc c #2a1f1d", "ai c #2a2c2a", "aU c #2c1a17", "av c #312b29", "aH c #32211f", "bj c #3a4237", "bo c #3b2a28", "aj c #3b3e3b", "ab c #3d4140", "ah c #3f3e3d", "ay c #3f4141", "bu c #3f5a34", ".i c #40372f", ".K c #403a35", "am c #424544", "#s c #443f3b", "a8 c #444444", ".z c #45403b", "bv c #465b3f", "#d c #47433f", "#n c #493d31", ".Z c #494540", "a0 c #494949", "bn c #494c39", "aK c #4a4c4a", "#E c #4c4844", "aZ c #4c4c4c", "#G c #4d4036", "aO c #4e4e4e", "bt c #4e6247", ".9 c #4f4137", "#o c #4f4237", ".q c #4f4c4a", "ac c #4f5251", "ba c #513631", "bs c #515e4d", ".p c #524942", "#F c #53483f", "#T c #555555", "bd c #555854", "an c #555857", "aa c #555958", "b# c #57574f", "aN c #575757", "a2 c #5a5554", ".0 c #5a5957", "aC c #5a5a5a", "bi c #5a6356", ".S c #5b5047", "aQ c #5b5b5b", "a3 c #5d312d", "#. c #5f544c", "aY c #5f5f5e", "aB c #606060", "a1 c #656565", "aF c #662e29", "aV c #666766", "ap c #676766", "#5 c #676767", ".F c #6a5e54", "aI c #6a6b6a", ".8 c #6b6662", "ar c #6b6b6b", "bb c #6d4642", "#c c #6d645d", "bh c #6d7766", "aR c #6e6362", "b. c #6f746c", "aE c #706665", "aw c #707170", ".T c #716861", ".l c #716c68", "at c #724642", ".u c #726d6a", "aq c #727272", ".j c #736b65", ".G c #736c67", "aX c #737371", "#t c #757471", ".k c #766c64", "as c #776f6e", "#K c #777675", ".t c #786f67", ".B c #787877", "ad c #787978", ".E c #797470", ".L c #797877", "ao c #7a7a79", "aP c #7a7a7a", "#r c #7b746d", ".R c #7b7570", "aW c #7b7974", "az c #7b7c7c", "bw c #7b8479", ".Y c #7c746b", ".d c #7d6e65", "ae c #7d7d7d", "aS c #7e3b34", "aD c #7e7e7e", "ag c #7e7f7e", "#m c #7f7c7a", "a4 c #80443f", "a9 c #808280", "bg c #81897b", "bf c #828b7c", ".s c #837d76", ".A c #838281", "#e c #848482", "#f c #858584", "#L c #858685", ".c c #867b72", "af c #868686", "aT c #883f38", ".J c #888178", ".r c #888784", ".N c #888888", "bk c #898f87", "bm c #899283", "aL c #8a8c8c", "ak c #8b8c8c", "be c #8b9287", ".y c #8c8176", "#7 c #8c8c8c", "au c #8d645f", "#4 c #909090", ".h c #928a82", "#V c #938e8a", ".1 c #939493", ".Q c #949493", "bz c #94a489", "aG c #954c45", "ax c #959494", "#X c #969696", "#p c #97928f", ".M c #979796", ".e c #9b948f", "aJ c #9b9b9b", "a7 c #9c9d9c", ".o c #9d9286", "#u c #9d9e9c", ".2 c #a2a2a1", "#v c #a2a3a2", "aM c #a3a3a2", "#2 c #a3a4a4", "#U c #a4a2a0", "#1 c #a4a4a4", "## c #a6a4a3", ".D c #a6a5a4", ".6 c #a6a6a6", ".7 c #a7a6a5", "al c #a8a8a7", "bl c #acb2a8", "#l c #adadac", "#J c #aeaaa7", ".3 c #aeaeae", "a. c #aeafae", "aA c #afafaf", ".C c #b0b0b0", "a# c #b0b1b0", "#9 c #b1b2b1", "#3 c #b1b2b2", "#0 c #b2b2b2", "#W c #b3b3b3", "#8 c #b6b7b6", "#A c #b7b7b7", "bx c #b7bbb6", "a6 c #b8b8b8", "#D c #babab9", "#g c #bbbbba", ".P c #bbbbbb", "#j c #bcbcbc", "#C c #bdbdbd", "by c #bdc4b7", "#I c #bebab6", "#S c #c0c0c0", "#H c #c2c1c1", "#z c #c2c2c2", "#h c #c3c3c3", ".5 c #c4c4c4", ".a c #c5bfbb", ".O c #c5c5c5", "#q c #c6c1b9", "#B c #c6c6c6", ".x c #c8c2bc", "#R c #c8c8c8", ".U c #c9c8c7", ".H c #c9c8c8", "#y c #c9c9c9", ".f c #cac9c7", "#k c #cbcbcb", "#M c #cccccc", "#x c #cdcdcd", "#i c #cecece", "#b c #cfcac1", ".I c #cfcbc6", ".4 c #cfcfcf", "#Z c #d0d0d0", ".n c #d1cdc8", ".# c #d2cec8", "#w c #d2d2d2", ".v c #d3d3d2", "#Q c #d3d3d3", ".m c #d4d3d3", "#6 c #d4d4d4", ".b c #d5d3d1", "#N c #d5d5d5", ".g c #d6d2ce", "#Y c #d6d6d6", "#P c #dadada", "#O c #dcdcdc", ".X c #dfdad4", ".V c #dfdfdf", ".W c #e2e1df", ".w c #e3e3e2", "#a c #e8e7e5", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt.b.c.d.e.fQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQt.g.h.i.j.k.l.mQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt.n.o.p.q.r.s.t.u.vQtQtQtQtQtQtQt", "QtQtQtQtQtQt.w.x.y.z.A.B.C.D.E.F.G.HQtQtQtQtQtQt", "QtQtQtQtQtQt.I.J.K.L.M.N.O.P.Q.R.S.T.U.VQtQtQtQt", "QtQtQtQt.W.X.Y.Z.0.1.2.3.4.5.6.7.8.9#.##QtQtQtQt", "QtQtQt#a#b#c#d#e#f#g.5#h#i.O#j#k#l#m#n#o#pQtQtQt", "QtQtQt#q#r#s#t#u#v#w#x#h#y#z#A#B#C#D#E#F#G#HQtQt", "QtQtQt#I#J#K#L#M#N#O#P#N#Q.4#R#k#y#S#T#U#V.mQtQt", "QtQtQtQtQt#W#X#P#Y#Q#Z#i#y#0#1#2#3#4#5#6QtQtQtQt", "QtQtQtQtQtQt#7#B#8#9a..Pa#aaabacadaeafQtQtQtQtQt", "QtQtQtQtQtQtaeagahaiajakalamanaoapaq.NQtQtQtQtQt", "QtQtQtQtQtQtarasatauavawaxayazaAaBaCaDQtQtQtQtQt", "QtQtQtQtQtQt#5aEaFaGaHaIaJaKaLaMaNaOaPQtQtQtQtQt", "QtQtQtQtQtQtaQaRaSaTaUaV.DaWaXaYaZa0aPQtQtQtQtQt", "QtQtQtQtQtQta1a2a3a4a5aVa6#W.3a7aoa8a9QtQtQtQtQt", "QtQtQtQtQtQtb.b#babbbcbdbebfbgbhbibjbkQtQtQtQtQt", "QtQtQtQtQtQtblbmbnbobpbqbrbsbtbubvbwbxQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtbybzbyQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; /* XPM */ static char *up_xpm[]={ "24 24 67 2", "Qt c None", ".# c #000000", ".a c #2f2f2f", ".J c #3d4e39", ".u c #3e4f39", ".o c #3f5239", ".e c #41533c", "#a c #43543d", ".E c #4c6046", "## c #4d6146", ".D c #4d6246", "#. c #4d6247", ".9 c #5a7257", ".y c #5d7555", ".5 c #5e7656", ".Z c #5e7756", ".4 c #607857", ".R c #607858", ".N c #607958", ".t c #617959", ".Y c #617a59", ".I c #627b59", ".C c #637c5b", ".n c #637d5b", ".Q c #647d5b", ".x c #657e5c", ".s c #657f5c", ".i c #66815e", ".H c #67815e", ".m c #68835f", ".r c #6a8561", ".8 c #71916e", ".7 c #748a72", ".6 c #8db389", ".3 c #93b690", ".d c #96b892", ".X c #99bc97", ".U c #9cbf99", ".P c #9dc19b", ".h c #9fc49d", ".M c #a0c39d", ".G c #a1c69e", ".l c #a1c69f", ".q c #a2c7a0", ".b c #a5b4a4", ".2 c #aecbad", ".1 c #afccae", ".W c #b1ceb0", ".T c #b4d2b3", ".O c #b5d2b4", ".L c #b5d3b4", ".j c #b6d4b5", ".w c #b7d5b6", ".g c #b8d6b7", ".p c #b8d7b7", ".k c #b9d7b8", ".A c #bfd4bf", ".B c #c0d5c0", ".0 c #c0d9bf", ".V c #c5dfc4", ".S c #c6e0c5", ".F c #c7e1c6", ".K c #d0e7d0", ".z c #d6ead6", ".c c #e8f4e6", ".v c #f0feef", ".f c #f1fff0", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt.a.b.#QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQt.#.c.d.e.#QtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt.#.f.g.h.i.e.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.f.j.k.l.m.n.o.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQt.#.f.p.j.k.q.r.s.t.u.#QtQtQtQtQtQtQt", "QtQtQtQtQt.#.v.p.k.w.k.l.r.x.t.y.u.#QtQtQtQtQtQt", "QtQtQtQt.#.z.A.B.k.p.p.l.m.C.D.E.E.E.#QtQtQtQtQt", "QtQtQt.#.#.#.#.#.F.j.j.G.H.I.J.#.#.#.#.#QtQtQtQt", "QtQtQtQtQtQtQt.#.K.j.L.M.s.N.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.F.j.O.P.Q.R.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.S.L.T.U.C.R.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.V.T.W.X.Y.Z.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.0.1.2.3.4.5.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.6.7.8.9#.###a.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.#.#.#.#.#.#.#.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; /* XPM */ static char *refresh_xpm[]={ "24 24 126 2", "Qt c None", ".# c #000000", ".d c #0d110c", ".i c #172116", "#7 c #283926", ".y c #2b3a29", "#E c #3a4e37", "#5 c #4d6a49", ".V c #4f6b4c", ".X c #516d4c", ".2 c #51714e", ".Q c #526f4c", "#Q c #557451", ".G c #567453", "#h c #5b7b57", "#4 c #5d8059", "#F c #5e7f5a", "#Z c #5f815a", ".S c #60835b", ".x c #63865f", "#R c #63885e", "#s c #64885f", ".p c #689063", "#2 c #698f63", "#6 c #6a8f64", "#3 c #6b9166", ".6 c #6b9265", "#P c #6b9266", "#Y c #6c9367", ".1 c #6d9568", "#1 c #6e9467", "#X c #6e9668", ".K c #6f9669", ".L c #70976a", ".A c #70986a", "#0 c #70996b", ".B c #71986b", ".M c #71996b", "#W c #71996c", "#U c #72996b", ".C c #729a6b", ".e c #729c6c", "#V c #739a6d", ".N c #739b6d", "#g c #749e6d", "#T c #749e6f", ".D c #759c6d", "#S c #759c70", ".O c #759f6e", ".E c #759f6f", ".W c #769f70", "#D c #76a071", ".F c #76a170", ".P c #77a170", ".J c #78a472", "#a c #79a674", ".Z c #7ba574", "#r c #7ea778", ".I c #7eab77", ".o c #7fa879", "#. c #80a87a", ".4 c #81ab7c", "#O c #88af82", ".j c #88b583", "#i c #8cb087", ".z c #8cb887", "#G c #8faf8b", "## c #90b68b", "#C c #96b991", ".w c #9abc95", ".U c #9ac195", "#H c #9cbe97", ".T c #a5c9a0", "#t c #a6c1a3", ".f c #a6caa1", ".8 c #a7cca2", ".v c #aed5a9", ".H c #afcbac", "#f c #afccab", "#u c #b3d5ae", "#d c #b3d7ae", ".9 c #b5d2b1", "#B c #b5d2b2", ".3 c #b6d3b2", ".R c #b7d2b2", ".Y c #b9d5b4", "#e c #bbd9b8", "#j c #bbe1b6", "#q c #bcd6b9", "#A c #bddcba", "#N c #c2dbbf", ".5 c #c3dbbf", "#z c #c3e3bf", "#p c #c6e3c3", "#b c #c6eac1", ".0 c #c7e0c3", "#I c #c7e0c4", "#M c #c7e1c4", "#y c #c7e6c3", ".7 c #c8efc3", ".b c #cae3c6", "#x c #cae9c5", "#J c #cbe3c6", ".g c #cbe4c7", "#L c #cbe4c8", ".k c #cce5c8", "#K c #cde4c9", ".q c #cde5c9", ".l c #cde6c9", "#v c #cdeac9", ".r c #cfe7ca", ".m c #cfe7cb", "#o c #cfeccb", ".s c #d0e9cc", "#w c #d0ebcb", ".t c #d4ead0", ".u c #d5ecd1", "#n c #d7f0d3", "#k c #daf5d6", "#m c #dcf4d6", "#c c #def7d9", "#l c #e1f7dd", ".h c #effdee", ".a c #f0ffee", ".n c #f3fff2", ".c c #f5fff4", "QtQtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.a.#QtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQt.#.#.#.#.b.c.#QtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQt.d.e.f.b.b.g.g.h.#QtQtQtQtQt.#.#QtQtQtQtQt", "QtQt.i.j.b.b.g.g.k.l.m.n.#QtQtQt.#.o.p.#QtQtQtQt", "Qt.#.e.b.g.g.k.q.r.s.t.u.v.#QtQtQt.#.w.x.#QtQtQt", "Qt.y.f.b.z.A.B.C.D.E.F.G.#QtQtQtQtQt.#.H.#QtQtQt", ".#.I.b.J.K.L.M.N.O.P.Q.#QtQtQtQtQtQt.#.R.S.#QtQt", ".#.T.U.K.V.#.#.#.W.X.#QtQtQt.#QtQtQt.#.Y.Z.#QtQt", ".#.0.1.S.#QtQt.#.2.#QtQtQt.#.#QtQtQt.#.3.4.#QtQt", ".#.5.6.#QtQtQt.#.#QtQtQt.#.7.#QtQt.#.8.9#..#QtQt", ".####a.#QtQtQt.#QtQtQt.##b#c.#.#.##d#e#f#g.#QtQt", ".##h#i.#QtQtQtQtQtQt.##j#k#l#m#n#o#p#q#r#s.#QtQt", "Qt.##t.#QtQtQtQtQt.##u#v#w#x#y#z#A#B#C#D#EQtQtQt", "Qt.##F#G.#QtQtQt.##H#I#J.l#K#L#M#N#O#P#Q.#QtQtQt", "QtQt.##R#S.#QtQtQt.##T#U.N#V#W.A#X#Y#Z.#QtQtQtQt", "QtQtQt.#.#QtQtQtQtQt.##0#1#2.p#3#4#5.#QtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.#.1#6.#.#.#.#QtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#7#P.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.#.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; #endif /* __GTK_FILE_ICONS_H__ */ gtkextra-3.2.0/gtkextra/gtktogglecombo.h0000644000076400001440000000504212603754176015313 00000000000000/* gtkcolorcombo - color combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_TOGGLE_COMBO_H__ #define __GTK_TOGGLE_COMBO_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "gtkcombobutton.h" #define GTK_TOGGLE_COMBO(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_toggle_combo_get_type (), GtkToggleCombo) #define GTK_TOGGLE_COMBO_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_toggle_combo_get_type (), GtkToggleComboClass) #define GTK_IS_TOGGLE_COMBO(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_toggle_combo_get_type ()) typedef struct _GtkToggleCombo GtkToggleCombo; typedef struct _GtkToggleComboClass GtkToggleComboClass; /* you should access only the entry and list fields directly */ struct _GtkToggleCombo { GtkComboButton toggle_combo; gint default_flag:1; gint nrows; gint ncols; gint row; gint column; GtkWidget ***button; GtkWidget *table; GtkWidget *custom_button; }; struct _GtkToggleComboClass { GtkComboButtonClass parent_class; void (*changed) (GtkToggleCombo *toggle_combo, gint row, gint col); }; GType gtk_toggle_combo_get_type (void); GtkWidget* gtk_toggle_combo_new (gint nrows, gint ncols); void gtk_toggle_combo_construct (GtkToggleCombo *toggle_combo, gint nrows, gint ncols); gint gtk_toggle_combo_get_nrows (GtkToggleCombo *combo); gint gtk_toggle_combo_get_ncols (GtkToggleCombo *combo); void gtk_toggle_combo_select (GtkToggleCombo *toggle_combo, gint new_row, gint new_col); void gtk_toggle_combo_get_selection (GtkToggleCombo *combo, gint *row, gint *col); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_TOGGLE_COMBO_H__ */ gtkextra-3.2.0/gtkextra/gtkplotprint.h0000644000076400001440000000546012603754176015051 00000000000000/* gtkplotpc - gtkplot printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __GTK_PLOT_PRINT_H__ #define __GTK_PLOT_PRINT_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ gboolean gtk_plot_export_ps (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size); gboolean gtk_plot_export_ps_with_size (GtkPlot *plot, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height); gboolean gtk_plot_canvas_export_ps (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotPageSize page_size); gboolean gtk_plot_canvas_export_ps_with_size (GtkPlotCanvas *canvas, char *file_name, GtkPlotPageOrientation orient, gboolean epsflag, GtkPlotUnits units, gint width, gint height); gboolean gtk_plot_canvas_export_cairo (GtkPlotCanvas *canvas, cairo_t *cairo); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTK_PLOT_PRINT_H__ */ gtkextra-3.2.0/gtkextra/gtktogglecombo.c0000644000076400001440000002531512603754176015313 00000000000000/* gtkcolorcombo - toggle_combo widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtktogglecombo * @short_description: A toggle combo widget for GTK. * * A GtkToggleCombo is a GtkCombo which will remain 'pressed-in' when clicked. * Clicking it again will cause the toggle combo to return to it's normal state. * A toggle combo is created by calling gtk_toggle_combo_new(). * The number of rows/columns may be find out by calling gtk_toggle_combo_get_nrows() or gtk_toggle_combo_get_ncols(). * A combo row may be selected with gtk_toggle_combo_select().The current selection is returned by gtk_toggle_combo_get_selection(). */ /** * GtkToggleCombo: * * The GtkToggleCombo struct contains only private data. * It should only be accessed through the functions described below. */ #include #include #include #include #include #include #include #include "gtkcombobutton.h" #include "gtktogglecombo.h" #include "gtkextra-marshal.h" /* SIGNALS */ enum { CHANGED, LAST_SIGNAL }; static gint toggle_combo_signals[LAST_SIGNAL] = {0}; static void gtk_toggle_combo_class_init (GtkToggleComboClass *klass); static void gtk_toggle_combo_init (GtkToggleCombo *toggle_combo); static void gtk_toggle_combo_destroy (GtkObject *toggle_combo); static void gtk_toggle_combo_create_buttons (GtkWidget *widget); static GtkComboButtonClass *parent_class = NULL; static void gtk_toggle_combo_class_init (GtkToggleComboClass * klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; parent_class = g_type_class_ref (gtk_hbox_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; object_class->destroy = gtk_toggle_combo_destroy; /** * GtkToggleCombo::changed: * @toggle_combo: the #GtkToggleCombo object that received the signal * @row: row number * @col: column number * * Emmited when the @row,@col are selected in #GtkToggleCombo */ toggle_combo_signals[CHANGED]=g_signal_new("changed", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(GtkToggleComboClass, changed), NULL, NULL, gtkextra_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); klass->changed = NULL; } static void gtk_toggle_combo_destroy (GtkObject * toggle_combo) { gint i,j; GtkToggleCombo *combo; combo=GTK_TOGGLE_COMBO(toggle_combo); if(combo && combo->button) for(i=0; inrows; i++) for(j=0; jncols; j++) if(combo->button[i][j]){ gtk_widget_destroy(combo->button[i][j]); combo->button[i][j] = NULL; } if(GTK_TOGGLE_COMBO(toggle_combo)->table){ gtk_widget_destroy (GTK_TOGGLE_COMBO(toggle_combo)->table); GTK_TOGGLE_COMBO(toggle_combo)->table = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (*GTK_OBJECT_CLASS (parent_class)->destroy) (toggle_combo); } static void gtk_toggle_combo_update (GtkWidget * widget, GtkToggleCombo * toggle_combo) { gint i,j; gint focus_row = -1, focus_col = -1; gint new_row = -1, new_col = -1; gint new_selection=FALSE; gint row,column; row = toggle_combo->row; column = toggle_combo->column; for(i=0 ; inrows; i++) for(j=0; jncols; j++){ if(gtk_widget_has_focus(toggle_combo->button[i][j])){ focus_row=i; focus_col=j; } if(gtk_widget_get_state(toggle_combo->button[i][j])==GTK_STATE_ACTIVE){ if(i != row || j != column){ new_selection=TRUE; new_row=i; new_col=j; } } } if(!new_selection && focus_row >= 0 && focus_col >= 0){ if(focus_row != row && focus_col != column){ new_selection = TRUE; new_row=focus_row; new_col=focus_col; } } if(new_selection){ if(row >= 0 && column >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle_combo->button[row][column]), FALSE); gtk_widget_queue_draw(toggle_combo->button[row][column]); } toggle_combo->row = new_row; toggle_combo->column = new_col; g_signal_emit (GTK_OBJECT(toggle_combo), toggle_combo_signals[CHANGED], 0, new_row, new_col); } if(!new_selection && row >= 0 && column >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle_combo->button[row][column]), TRUE); gtk_widget_queue_draw(toggle_combo->button[row][column]); g_signal_emit (GTK_OBJECT(toggle_combo), toggle_combo_signals[CHANGED], 0, row, column); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(GTK_COMBO_BUTTON(toggle_combo)->arrow), FALSE); gtk_grab_remove(GTK_COMBO_BUTTON(toggle_combo)->popwin); gdk_pointer_ungrab(GDK_CURRENT_TIME); gtk_widget_hide(GTK_COMBO_BUTTON(toggle_combo)->popwin); return; } static void gtk_toggle_combo_init (GtkToggleCombo * toggle_combo) { toggle_combo->row = -1; toggle_combo->column = -1; } static void gtk_toggle_combo_create_buttons(GtkWidget *widget) { GtkToggleCombo *toggle_combo; GtkComboButton *combo; gint i,j; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_TOGGLE_COMBO (widget)); toggle_combo = GTK_TOGGLE_COMBO(widget); combo = GTK_COMBO_BUTTON(widget); toggle_combo->table = gtk_table_new (toggle_combo->nrows, toggle_combo->ncols, TRUE); toggle_combo->button = (GtkWidget ***)g_malloc(toggle_combo->nrows*sizeof(GtkWidget **)); for(i = 0; i < toggle_combo->nrows; i++){ toggle_combo->button[i] = (GtkWidget **)g_malloc(toggle_combo->ncols*sizeof(GtkWidget *)); for(j = 0; j < toggle_combo->ncols; j++){ toggle_combo->button[i][j] = gtk_toggle_button_new(); gtk_button_set_relief(GTK_BUTTON(toggle_combo->button[i][j]), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE(toggle_combo->table), toggle_combo->button[i][j], j, j+1, i, i+1, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_set_size_request(toggle_combo->button[i][j], 24, 24); gtk_widget_show(toggle_combo->button[i][j]); g_signal_connect (GTK_OBJECT (toggle_combo->button[i][j]), "toggled", (void *) gtk_toggle_combo_update, toggle_combo); } } gtk_container_add(GTK_CONTAINER(GTK_COMBO_BUTTON(toggle_combo)->frame), toggle_combo->table); gtk_widget_show(toggle_combo->table); g_signal_connect (GTK_OBJECT (combo->button), "clicked", (void *) gtk_toggle_combo_update, toggle_combo); gtk_toggle_combo_update(NULL, toggle_combo); } GType gtk_toggle_combo_get_type () { static GType toggle_combo_type = 0; if (!toggle_combo_type) { toggle_combo_type = g_type_register_static_simple ( gtk_combo_button_get_type (), "GtkToggleCombo",sizeof (GtkToggleComboClass), (GClassInitFunc) gtk_toggle_combo_class_init, sizeof (GtkToggleCombo), (GInstanceInitFunc) gtk_toggle_combo_init, 0); } return toggle_combo_type; } /** * gtk_toggle_combo_new: * @nrows: number of rows * @ncols: number of columns * * Creates a new #GtkToggleCombo widget with @nrows rows and @ncols columns. * * Returns: the newly-created #GtkToggleCombo widget. */ GtkWidget * gtk_toggle_combo_new (gint nrows, gint ncols) { GtkWidget *widget; widget = gtk_widget_new (gtk_toggle_combo_get_type (), NULL); gtk_toggle_combo_construct(GTK_TOGGLE_COMBO(widget), nrows, ncols); return(widget); } /** * gtk_toggle_combo_construct: * @toggle_combo: a #GtkToggleCombo * @nrows: number of rows * @ncols: number of columns * * Initializes the #GtkToggleCombo with @nrows rows and @ncols columns. */ void gtk_toggle_combo_construct(GtkToggleCombo *toggle_combo, gint nrows, gint ncols) { toggle_combo->default_flag = FALSE; toggle_combo->nrows = nrows; toggle_combo->ncols = ncols; gtk_toggle_combo_create_buttons(GTK_WIDGET(toggle_combo)); } /** * gtk_toggle_combo_get_nrows: * @combo: a #GtkToggleCombo * * Get the number of rows in #GtkToggleCombo. * * Returns: number of rows */ gint gtk_toggle_combo_get_nrows(GtkToggleCombo *combo) { return (combo->nrows); } /** * gtk_toggle_combo_get_ncols: * @combo: a #GtkToggleCombo * * Get the number of columns in #GtkToggleCombo. * * Returns: number of columns */ gint gtk_toggle_combo_get_ncols(GtkToggleCombo *combo) { return (combo->ncols); } /** * gtk_toggle_combo_get_selection: * @combo: a #GtkToggleCombo * @row: number of row * @col: number of column * * Get the current selection(row,col) in #GtkToggleCombo. */ void gtk_toggle_combo_get_selection(GtkToggleCombo *combo, gint *row, gint *col) { *col = combo->column; *row = combo->row; } /** * gtk_toggle_combo_select: * @toggle_combo: a #GtkToggleCombo * @new_row: number of row * @new_col: number of column * * Select the cell(row,col) from #GtkToggleCombo. */ void gtk_toggle_combo_select (GtkToggleCombo *toggle_combo, gint new_row, gint new_col) { gint row, column; row = toggle_combo->row; column = toggle_combo->column; if(row >= 0 && column >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle_combo->button[row][column]), FALSE); gtk_widget_queue_draw(toggle_combo->button[row][column]); } toggle_combo->row = new_row; toggle_combo->column = new_col; if(new_row >= 0 && new_col >= 0){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle_combo->button[new_row][new_col]), TRUE); gtk_widget_queue_draw(toggle_combo->button[new_row][new_col]); } g_signal_emit (GTK_OBJECT(toggle_combo), toggle_combo_signals[CHANGED], 0, new_row, new_col); } gtkextra-3.2.0/gtkextra/testflux.c0000644000076400001440000002154712603754176014165 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotflux.h" #include "gtkplotcanvas.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gdouble gaussian(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = .65*exp(-.5*pow(x-.5,2)/.02); return y; } gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } widget_list = plots; active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); n = 0; } return TRUE; } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkColor color; static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py1[]={.2, .4, .5, .35, .30, .40}; static gdouble px2[]={.12, .22, .27, .12, .052, .42}; static gdouble py2[]={.0, .05, .12, .22, .16, .1}; /* static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py1[]={.2, .4, .5, .35, .30, .40}; static gdouble px2[]={.02, 0, -.02, 0, .052, .42}; static gdouble py2[]={.0, .05, .0, -0.02, .16, .1}; */ dataset[0] = GTK_PLOT_DATA(gtk_plot_flux_new()); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, px2, py2, 6); gtk_plot_flux_set_size_max(GTK_PLOT_FLUX(dataset[0]), 50); gtk_plot_flux_set_scale_max(GTK_PLOT_FLUX(dataset[0]), 0.5); /* gtk_plot_flux_set_labels_prefix(GTK_PLOT_FLUX(dataset[0]), "A"); gtk_plot_flux_set_labels_suffix(GTK_PLOT_FLUX(dataset[0]), "B"); */ /* gtk_plot_flux_center(GTK_PLOT_FLUX(dataset[0]), FALSE); */ gdk_color_parse("red", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_NONE, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_NONE, 0, 0, 1, &color); gtk_plot_data_set_legend(dataset[0], "Flux"); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; GtkPlotCanvasChild *child; gint page_width, page_height; gfloat scale = 1.; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotFlux Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); gtk_plot_set_range(GTK_PLOT(active_plot), -1. ,1., -1., 1.4); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 0), 1., 1); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 1), 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_x0_set_visible(GTK_PLOT(active_plot), TRUE); gtk_plot_y0_set_visible(GTK_PLOT(active_plot), TRUE); gtk_plot_grids_set_visible(GTK_PLOT(active_plot), TRUE, TRUE, TRUE, TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .65, .31); gtk_widget_show(active_plot); build_example1(active_plot); g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demoflux.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkextra-compat.h0000644000076400001440000000546312603754176015425 00000000000000/* gtkextra-compat - gtk version compatibility stuff * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef GTK_EXTRA_COMPAT_H #define GTK_EXTRA_COMPAT_H #include #if !GTK_CHECK_VERSION(2,20,0) /* before V2.20 */ # define gtk_widget_get_realized GTK_WIDGET_REALIZED # define gtk_widget_get_mapped GTK_WIDGET_MAPPED # define gtk_widget_get_requisition(widget, requisitionptr) \ *(requisitionptr) = GTK_WIDGET(widget)->requisition # define gtk_widget_set_realized_true(widget) \ GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED) # define gtk_widget_set_realized_false(widget) \ GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED) # define gtk_widget_set_mapped_true(widget) \ GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED) # define gtk_widget_set_mapped_false(widget) \ GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED) #else /* from V2.20 */ # define gtk_widget_set_realized_true(widget) \ gtk_widget_set_realized(widget, TRUE) # define gtk_widget_set_realized_false(widget) \ gtk_widget_set_realized(widget, FALSE) # define gtk_widget_set_mapped_true(widget) \ gtk_widget_set_mapped(widget, TRUE) # define gtk_widget_set_mapped_false(widget) \ gtk_widget_set_mapped(widget, FALSE) #endif #if !GTK_CHECK_VERSION(2,22,0) /* before V2.22 */ # define GDK_KEY_Return GDK_Return # define GDK_KEY_KP_Enter GDK_KP_Enter # define GDK_KEY_Escape GDK_Escape # define GDK_KEY_Tab GDK_Tab # define GDK_KEY_ISO_Left_Tab GDK_ISO_Left_Tab # define GDK_KEY_BackSpace GDK_BackSpace # define GDK_KEY_Up GDK_Up # define GDK_KEY_Down GDK_Down # define GDK_KEY_Left GDK_Left # define GDK_KEY_Right GDK_Right # define GDK_KEY_Home GDK_Home # define GDK_KEY_End GDK_End # define GDK_KEY_Page_Up GDK_Page_Up # define GDK_KEY_Page_Down GDK_Page_Down # define GDK_KEY_Control_L GDK_Control_L # define GDK_KEY_Control_R GDK_Control_R # define GDK_KEY_Shift_L GDK_Shift_L # define GDK_KEY_Shift_R GDK_Shift_R #endif #endif /* GTK_EXTRA_COMPAT_H */ gtkextra-3.2.0/gtkextra/testpixmap.c0000644000076400001440000001211412603754176014473 00000000000000#include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotpixmap.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; void quit () { gtk_main_quit(); } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkColormap *colormap; GdkPixmap *pixmap; GdkBitmap *mask; static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py1[]={.2, .4, .5, .35, .30, .40}; static gdouble px2[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py2[]={.12, .22, .27, .12, .52, .62}; colormap = gdk_colormap_get_system(); pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, colormap, &mask, NULL, "cloud.xpm"); dataset[0] = GTK_PLOT_DATA(gtk_plot_pixmap_new(pixmap, mask)); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, px2, py2, 6); gtk_plot_data_set_legend(dataset[0], "Pixmap 1"); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, colormap, &mask, NULL, "suncloud.xpm"); dataset[1] = GTK_PLOT_DATA(gtk_plot_pixmap_new(pixmap, mask)); gtk_plot_add_data(GTK_PLOT(active_plot), dataset[1]); gtk_widget_show(GTK_WIDGET(dataset[1])); gtk_plot_data_set_points(dataset[1], px2, py2, NULL, NULL, 6); gtk_plot_data_set_legend(dataset[1], "Pixmap 2"); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *active_plot; GtkWidget *canvas; gint page_width, page_height; gfloat scale = 1.; GtkPlotCanvasChild *child; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotFlux Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); gtk_plot_set_range(GTK_PLOT(active_plot), 0. ,1., 0., 1.4); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 0), 1., 1); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 1), 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_x0_set_visible(GTK_PLOT(active_plot), TRUE); gtk_plot_y0_set_visible(GTK_PLOT(active_plot), TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .65, .35); gtk_widget_show(active_plot); build_example1(active_plot); gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demopixmap.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkplotdt.c0000644000076400001440000010002312603754176014306 00000000000000/* gtkplotdt - delaunay triangulization algorithm for gtk+ * Copyright 2001 Andy Thaller * * This library is g_free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotdt * @short_description: * * FIXME:: Need long description. */ #include #include #include #include #include #include "gtkplotdt.h" #if(0) #define DELAUNAY_DEBUG #endif typedef struct { gint a,b; GtkPlotDTtriangle *t; } GtkPlotDTedge; static void gtk_plot_dt_class_init (GtkPlotDTClass *klass); static void gtk_plot_dt_init (GtkPlotDT *data); static void gtk_plot_dt_destroy (GtkObject *object); static gboolean gtk_plot_dt_real_add_node (GtkPlotDT *dt, GtkPlotDTnode node); static GtkPlotDTnode *gtk_plot_dt_real_get_node (GtkPlotDT *dt, gint idx); static gboolean gtk_plot_dt_real_triangulate (GtkPlotDT *dt); static void gtk_plot_dt_real_clear (GtkPlotDT *dt); static gboolean gtk_plot_dt_triangulate_tryquad (GtkPlotDT *dt); static void gtk_plot_dt_clear_triangles (GtkPlotDT *data); static GtkObjectClass *parent_class = NULL; GType gtk_plot_dt_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_object_get_type(), "GtkPlotDT", sizeof (GtkPlotDTClass), (GClassInitFunc) gtk_plot_dt_class_init, sizeof (GtkPlotDT), (GInstanceInitFunc) gtk_plot_dt_init, 0); } return data_type; } static void gtk_plot_dt_class_init (GtkPlotDTClass *klass) { GtkObjectClass *object_class; GtkPlotDTClass *dt_class; parent_class = g_type_class_ref (gtk_object_get_type ()); object_class = (GtkObjectClass *) klass; dt_class = (GtkPlotDTClass *) klass; object_class->destroy = gtk_plot_dt_destroy; dt_class->add_node = gtk_plot_dt_real_add_node; dt_class->get_node = gtk_plot_dt_real_get_node; dt_class->triangulate = gtk_plot_dt_real_triangulate; dt_class->clear = gtk_plot_dt_real_clear; } /* increase storage size of nodes * * num: new number of nodes, must be greater that data->node_max * returns 0 on failure, 1 on success */ static gint gtk_plot_dt_expand(GtkPlotDT *data, gint num) { GtkPlotDTnode *nodes= 0; #ifdef DELAUNAY_DEBUG fprintf(stderr,"delaunay: expanding to %d\n",num); #endif if (!data) return 0; if (!num || num<=data->node_max) return 1; nodes= (GtkPlotDTnode*) g_malloc(sizeof(GtkPlotDTnode)*num); if (!nodes) return 0; if (data->nodes && data->node_cnt) memcpy(nodes,data->nodes,sizeof(GtkPlotDTnode)*data->node_cnt); if (data->nodes) g_free(data->nodes); data->nodes= nodes; data->node_max= num; return 1; } /* * num: initial number of nodes */ /** * gtk_plot_dt_new: * @num: * * * * Return value: */ GtkObject* gtk_plot_dt_new (gint num) { GtkObject *object; object = g_object_new (gtk_plot_dt_get_type (), NULL); gtk_plot_dt_expand(GTK_PLOT_DT(object), num); return (object); } static void gtk_plot_dt_init (GtkPlotDT *data) { data->quadrilateral= TRUE; data->subsampling= FALSE; data->nodes= 0; data->tmp_nodes= 0; data->node_0= 0; data->node_cnt= 0; data->node_max= 0; data->triangles = NULL; data->compare_func = NULL; data->pbar= 0; } static void gtk_plot_dt_destroy(GtkObject *object) { GtkPlotDT *data; g_return_if_fail(GTK_IS_PLOT_DT(object)); data = GTK_PLOT_DT(object); gtk_plot_dt_clear(data); } /** * gtk_plot_dt_clear: * @data: * * */ void gtk_plot_dt_clear(GtkPlotDT *data) { GTK_PLOT_DT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->clear(data); } /** * gtk_plot_dt_add_node: * @data: * * * * Return value: */ gboolean gtk_plot_dt_add_node(GtkPlotDT *data, GtkPlotDTnode node) { return(GTK_PLOT_DT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->add_node(data, node)); } /** * gtk_plot_dt_get_node: * @data: * @idx: * * Return value: (transfer none) the #GtkPlotDTnode */ GtkPlotDTnode * gtk_plot_dt_get_node(GtkPlotDT *data, gint idx) { return(GTK_PLOT_DT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->get_node(data, idx)); } /** * gtk_plot_dt_triangulate: * @data: * * * * Return value: */ gboolean gtk_plot_dt_triangulate(GtkPlotDT *data) { return(GTK_PLOT_DT_CLASS(GTK_OBJECT_GET_CLASS(GTK_OBJECT(data)))->triangulate(data)); } static void gtk_plot_dt_real_clear(GtkPlotDT *data) { if (!data) return; if (data->nodes) g_free(data->nodes); data->nodes= NULL; if (data->tmp_nodes) g_free(data->tmp_nodes); data->tmp_nodes= NULL; data->node_cnt= data->node_max= data->node_0= 0; gtk_plot_dt_clear_triangles(data); } static void gtk_plot_dt_clear_triangles(GtkPlotDT *data) { GList *list; if(data->triangles){ for (list= data->triangles; list; list=list->next) if (list->data) g_free(list->data); g_list_free(data->triangles); data->triangles= NULL; } } static gint gtk_plot_dt_count_triangles(GtkPlotDT *data) { GList *list; gint count=0; if(data->triangles) for (list= data->triangles; list; list=list->next) ++count; return count; } static gboolean gtk_plot_dt_real_add_node(GtkPlotDT *data, GtkPlotDTnode node) { gint i; GtkPlotDTnode *n; #ifdef DELAUNAY_DEBUG fprintf(stderr,"delaunay: adding node %d\n",data->node_cnt); #endif if (!data) return FALSE; for (i=0, n= data->nodes; inode_cnt; i++, n++) { /* test for multiple insertions */ if (n->x==node.x && n->y==node.y && n->z==node.z) { #ifdef DELAUNAY_DEBUG fprintf(stderr,"gtk_plot_dt_add_node(): rejecting multiple node %d\n", data->node_cnt); #endif return FALSE; } } if (data->node_cnt+1>=data->node_max && !gtk_plot_dt_expand(data,data->node_cnt+10)) { fprintf(stderr,"gtk_plot_dt_add_node(): out of memory on node %d\n", data->node_cnt); return FALSE; } n= &data->nodes[data->node_cnt]; memcpy(n, &node, sizeof(GtkPlotDTnode)); n->id= data->node_cnt; n->a= n->b= n->c= n->d= 0; data->node_cnt++; return TRUE; } static gint gtk_plot_dt_circle(GtkPlotDTnode *center, gdouble *r, GtkPlotDTnode *a, GtkPlotDTnode *b, GtkPlotDTnode *c) { gdouble ax= a->x*a->x; gdouble ay= a->y*a->y; gdouble bx= b->x*b->x; gdouble by= b->y*b->y; gdouble cx= c->x*c->x; gdouble cy= c->y*c->y; gdouble U= bx - ax + by - ay; gdouble V= cx - ax + cy - ay; gdouble Bx= 2*(b->x-a->x); gdouble By= 2*(b->y-a->y); gdouble Cx= 2*(c->x-a->x); gdouble Cy= 2*(c->y-a->y); gdouble x,y; if (fabs(Bx)>1e-10) { center->y= (V*Bx-U*Cx)/(Bx*Cy-By*Cx); center->x= (U-center->y*By)/Bx; x= a->x-center->x; y= a->y-center->y; *r= x*x + y*y; return 1; } if(fabs(By)>1e-10) { center->x= (V*By-U*Cy)/(Cx*By-Bx*Cy); center->y= (U-center->x*Bx)/By; x= a->x-center->x; y= a->y-center->y; *r= x*x + y*y; return 1; } if (fabs(Cx)>1e-20) { center->y= (U*Cx-V*Bx)/(By*Cx-Cy*Bx); center->x= (V-center->y*Cy)/Cx; x= a->x-center->x; y= a->y-center->y; *r= x*x + y*y; return 1; } if(fabs(Cy)>1e-20) { center->x= (U*Cy-V*By)/(Bx*Cy-Cx*By); center->y= (V-center->x*Cx)/Cy; x= a->x-center->x; y= a->y-center->y; *r= x*x + y*y; return 1; } return 0; } static GtkPlotDTnode * gtk_plot_dt_real_get_node(GtkPlotDT *data, gint idx) { if (!data) return 0; if (idxnode_0) return 0; if (idx<0) return &data->tmp_nodes[-1-idx]; if (idxnode_cnt) return &data->nodes[idx]; return 0; } /* calculates __twice__ the area of a given triangle */ static gdouble gtk_plot_dt_area_triangle(GtkPlotDTnode *a, GtkPlotDTnode *b, GtkPlotDTnode *c) { if (!a || !b || !c) return 0; return fabs((a->x*b->y + a->y*c->x + b->x*c->y - c->x*b->y - c->y*a->x - b->x*a->y)); } static GtkPlotDTtriangle * gtk_plot_dt_add_triangle(GtkPlotDT *data, gint a, gint b, gint c) { GtkPlotDTtriangle *t= 0; GtkPlotDTnode *na,*nb,*nc; gdouble xmin,xmax,ymin,ymax, orientation; if (!data) return 0; if (a==b || a==c || b==c) return NULL; t= g_new0(GtkPlotDTtriangle, 1); if (!t) return NULL; t->a= a; t->b= b; t->c= c; t->nn[0] = t->nn[1] = t->nn[2] = NULL; na= t->na= gtk_plot_dt_get_node(data,a); nb= t->nb= gtk_plot_dt_get_node(data,b); nc= t->nc= gtk_plot_dt_get_node(data,c); /* make sure the orientation of the new triangle is positive: */ orientation= (nb->x-na->x)*(nc->y-na->y) - (nb->y-na->y)*(nc->x-na->x); if (orientation<0) { t->nc= nb; t->nb= nc; t->c= b; t->b= c; /* if this ever turns up, enclose it in ifdef DELAUNAY_DEBUG ! */ fprintf(stderr,"corrected orientation of new triangle\n"); } /* create bounding-box */ xmin= xmax= na->x; ymin= ymax= na->y; if (xmax< nb->x) xmax= nb->x; else if (xmin>nb->x) xmin= nb->x; if (ymax< nb->y) ymax= nb->y; else if (ymin>nb->y) ymin= nb->y; if (xmax< nc->x) xmax= nc->x; else if (xmin>nc->x) xmin= nc->x; if (ymax< nc->y) ymax= nc->y; else if (ymin>nc->y) ymin= nc->y; t->min.x= xmin; t->min.y= ymin; t->max.x= xmax; t->max.y= ymax; t->area= 0.0; t->radius= -1.0; /* prepending gives the same result in the end but >twice as fast */ data->triangles = g_list_prepend(data->triangles, t); #ifdef DELAUNAY_DEBUG fprintf(stderr,"added triangle : %d/%d/%d c=(%g,%g) r=%g\n",a,b,c, t->ccenter.x,t->ccenter.y, t->radius); #endif return t; } static gint gtk_plot_dt_update_tmpnodes(GtkPlotDT *data) { gint i; gdouble xmin,xmax,ymin,ymax,delta=0.5; if (!data || data->node_cnt<3) return 0; /* determine bounding box */ xmin= xmax= data->nodes[0].x; ymin= ymax= data->nodes[0].y; for (i=1; inode_cnt; i++) { if (xmaxnodes[i].x) xmax=data->nodes[i].x; if (xmin>data->nodes[i].x) xmin=data->nodes[i].x; if (ymaxnodes[i].y) ymax=data->nodes[i].y; if (ymin>data->nodes[i].y) ymin=data->nodes[i].y; } #ifdef DELAUNAY_DEBUG fprintf(stderr,"data confinement: [%g:%g] [%g:%g]\n",xmin,xmax,ymin,ymax); #endif /* some practical magic: have two triangles which cover _all_ the nodes */ if (data->tmp_nodes) g_free(data->tmp_nodes); data->tmp_nodes= g_new0(GtkPlotDTnode, 8); data->node_0= -8; if (!data->tmp_nodes) return 0; data->tmp_nodes[0].x= xmin-delta*(xmax-xmin); data->tmp_nodes[0].y= ymin-delta*(ymax-ymin); data->tmp_nodes[1].x= xmax+delta*(xmax-xmin); data->tmp_nodes[1].y= ymin-delta*(ymax-ymin); data->tmp_nodes[2].x= xmax+delta*(xmax-xmin); data->tmp_nodes[2].y= ymax+delta*(ymax-ymin); data->tmp_nodes[3].x= xmin-delta*(xmax-xmin); data->tmp_nodes[3].y= ymax+delta*(ymax-ymin); gtk_plot_dt_add_triangle(data,-1,-2,-3); gtk_plot_dt_add_triangle(data,-1,-3,-4); return 1; } static gint gtk_plot_dt_drop_tmpstuff(GtkPlotDT *data) { GtkPlotDTtriangle *t; GList *list = NULL, *next = NULL; gint tri_cnt = 0; gint i; if (!data) return 0; list = data->triangles; while(list) { t= (GtkPlotDTtriangle *)list->data; for(i = 0; i < 3; i++) if(t->nn[i] && (t->nn[i]->a < 0 || t->nn[i]->b < 0 || t->nn[i]->c < 0)) t->nn[i] = NULL; list = list->next; } list = data->triangles; while(list) { next= list->next; t= (GtkPlotDTtriangle *)list->data; if (t->a<0 || t->b<0 || t->c<0) { #ifdef DELAUNAY_DEBUG fprintf(stderr,"dropping triangle %d/%d/%d\n",t->a,t->b,t->c); #endif data->triangles = g_list_remove_link(data->triangles, list); g_free(list->data); g_list_free_1(list); } else { tri_cnt++; } list = next; } g_free(data->tmp_nodes); data->tmp_nodes= NULL; data->node_0= 0; return tri_cnt; } /* checks if the node is inside the triangle's empty circle or not */ static gboolean gtk_plot_dt_inside_triangle_circle(GtkPlotDTtriangle *t, GtkPlotDTnode *n) { gdouble r,x,y; if (!t || !n) return FALSE; if (t->radius < 0.0) { gtk_plot_dt_circle(&t->ccenter,&t->radius,t->na,t->nb,t->nc); } x= n->x-t->ccenter.x; y= n->y-t->ccenter.y; r= x*x + y*y; #ifdef DELAUNAY_DEBUG2 fprintf(stderr,"gtk_plot_dt_inside_triangle_circle : %g < %g = %d\n", r,t->radius,(r < t->radius)); #endif if (r < t->radius) return TRUE; return FALSE; } /* checks if the node is inside the triangle or not */ static gdouble gtk_plot_dt_inside_triangle(GtkPlotDT *data, GtkPlotDTtriangle *t, GtkPlotDTnode *n) { gdouble A,B; GtkPlotDTnode *a,*b,*c; if (!t || !n) return 1e99; /* test boundary box first */ if ((n->x < t->min.x) || (n->x > t->max.x) || (n->y < t->min.y) || (n->y > t->max.y)) return 1e99; a= t->na; b= t->nb; c= t->nc; /* calculate triangle's area if it's not yet known: */ A= t->area; if (A==0.0) A= t->area= gtk_plot_dt_area_triangle(a,b,c); B= gtk_plot_dt_area_triangle(n,a,b)+ gtk_plot_dt_area_triangle(n,b,c)+ gtk_plot_dt_area_triangle(n,c,a); /* fprintf(stderr,"gtk_plot_dt_inside_triangle %d/%d/%d: %g > %g = %d! " "(%ld,%ld,%ld)\n",t->a,t->b,t->c,B,A,(B>A),a,b,c); */ return B/A; /* A cannot be 0 - see gtk_plot_dt_add_triangle()! */ } static gboolean edges_equal(GtkPlotDTedge *e1, GtkPlotDTedge *e2) { if((e1->a == e2->a && e1->b == e2->b) || (e1->b == e2->a && e1->a == e2->b)) return TRUE; return FALSE; } static void gtk_plot_dt_triangulate_insert_node(GtkPlotDT *data, GtkPlotDTnode *node) { gint j,k,l, delinquentes; GtkPlotDTtriangle *t = NULL; gdouble err, min; GList *list = NULL, *doomed = NULL, *last = NULL, *new = NULL, *aux = NULL; gint num = 0; GtkPlotDTedge *edges = NULL; #ifdef DELAUNAY_DEBUG printf("inserting node %d %f %f\n",node->id,node->x,node->y); #endif /* first, find the triangle that contains this node: */ num = 0; delinquentes = 0; doomed = NULL; min= 1e99; /* minimal inside-triangle criteria found (==1: inside) */ list = data->triangles; while(list) { t = (GtkPlotDTtriangle *)list->data; if ((err=gtk_plot_dt_inside_triangle(data,t,node)) next; } if (doomed) { /* triangle found with node inside! */ GList *last_doomed; /* "doomed" is a new list where all removed triangles go to * for finding the outline of the new triangles to be inserted. * The first triangle to go there is the one found above. * Afterwards the "doomed" list is doomed to die :-) */ data->triangles= g_list_remove_link(data->triangles, doomed); last_doomed = g_list_last(doomed); delinquentes++; #ifdef DELAUNAY_DEBUG fprintf(stderr,"marking triangle %d/%d/%d doomed (min=%g)\n", t->a,t->b,t->c,min); #endif /* now, find all adjacent triangles with this node in their circles: */ list = data->triangles; while(list) { GtkPlotDTtriangle *doomed_t; t = (GtkPlotDTtriangle *)list->data; doomed_t = (GtkPlotDTtriangle *)doomed->data; if ((t->a==doomed_t->a || t->b==doomed_t->a || t->c==doomed_t->a || t->a==doomed_t->b || t->b==doomed_t->b || t->c==doomed_t->b || t->a==doomed_t->c || t->b==doomed_t->c || t->c==doomed_t->c) && gtk_plot_dt_inside_triangle_circle(t,node)) { /* move triangle to "doomed" list */ last= list->next; data->triangles= g_list_remove_link(data->triangles, list); /* faster than g_list_concat */ list->prev = last_doomed; list->next = NULL; last_doomed->next = list; last_doomed = list; delinquentes++; #ifdef DELAUNAY_DEBUG fprintf(stderr,"marking also %d/%d/%d doomed\n",t->a,t->b,t->c); #endif list = last; } else { list = list->next; } } edges= (GtkPlotDTedge*)g_malloc(sizeof(GtkPlotDTedge)*delinquentes*3); num= 0; list = doomed; while(list){ t = (GtkPlotDTtriangle *)list->data; edges[num].a= t->a; edges[num].b= t->b; edges[num].t = t; num++; edges[num].a= t->b; edges[num].b= t->c; edges[num].t = t; num++; edges[num].a= t->c; edges[num].b= t->a; edges[num].t = t; num++; list = list->next; } #ifdef DELAUNAY_DEBUG fprintf(stderr,"detected edges: "); for (j=0; jid,edges[j].a,edges[j].b); if(t) new = g_list_append(new, t); } } if(edges) g_free(edges); /* Find neighbours */ list = new; while(list){ GtkPlotDTtriangle *t = (GtkPlotDTtriangle *)list->data; GtkPlotDTedge t_edges[3]; gint l, m, n; gboolean found = FALSE; t_edges[0].a = t->a; t_edges[0].b = t->b; t_edges[1].a = t->b; t_edges[1].b = t->c; t_edges[2].a = t->c; t_edges[2].b = t->a; /* I look for the neighbours into the doomed triangles' neighbours */ aux = doomed; while(aux){ GtkPlotDTedge nn[3]; GtkPlotDTtriangle *doomed_t = (GtkPlotDTtriangle *)aux->data; /* for each doomed triangles I have 3 neighbours */ for(l = 0; l < 3; l++){ GtkPlotDTtriangle *doomed_nn = doomed_t->nn[l]; GList *aux2; /* verify that doomed_nn is not doomed */ for(aux2 = doomed; aux2; aux2 = aux2->next) if(doomed_nn == aux2->data) doomed_nn = NULL; if(doomed_nn){ nn[0].a = doomed_nn->a; nn[0].b = doomed_nn->b; nn[1].a = doomed_nn->b; nn[1].b = doomed_nn->c; nn[2].a = doomed_nn->c; nn[2].b = doomed_nn->a; /* for each of the 3 neighbours I have 3 edges */ for(m = 0; m < 3; m++){ for(n = 0; n < 3; n++){ if(edges_equal(&nn[m], &t_edges[n])){ doomed_nn->nn[m] = t; t->nn[n] = doomed_nn; found = TRUE; break; } } if(found) break; } } if(found) break; } if(found) break; aux = aux->next; } /* I look for the triangle's neighbours into the new triangles */ aux = new; while(aux){ GtkPlotDTedge nn[3]; GtkPlotDTtriangle *new_t = (GtkPlotDTtriangle *)aux->data; if(new_t != t){ nn[0].a = new_t->a; nn[0].b = new_t->b; nn[1].a = new_t->b; nn[1].b = new_t->c; nn[2].a = new_t->c; nn[2].b = new_t->a; /* for each of the triangles I have 3 edges */ found = FALSE; for(m = 0; m < 3; m++){ for(n = 0; n < 3; n++){ if(edges_equal(&nn[m], &t_edges[n])){ new_t->nn[m] = t; t->nn[n] = new_t; found = TRUE; break; } if(found) break; } if(found) break; } } aux = aux->next; } list = list->next; } } /* now actually delete the "doomed" triangles, * we don't need them any longer: */ if(doomed){ for (list = doomed; list; list = list->next){ GtkPlotDTtriangle *t = (GtkPlotDTtriangle *)list->data; gint i; if(t->nn[0]){ for(i = 0; i < 3; i++) if(t->nn[0]->nn[i] == t) t->nn[0]->nn[i] = NULL; } if(t->nn[1]){ for(i = 0; i < 3; i++) if(t->nn[1]->nn[i] == t) t->nn[1]->nn[i] = NULL; } if(t->nn[2]){ for(i = 0; i < 3; i++) if(t->nn[2]->nn[i] == t) t->nn[2]->nn[i] = NULL; } g_free(list->data); } g_list_free(doomed); } if(new) g_list_free(new); } /* Not used static GList * gtk_plot_dt_triangle_list_copy(GtkPlotDT *data) { GList *list= g_list_copy(data->triangles); GList *next; GtkPlotDTtriangle *t; for (next=list; next; next=next->next) { t= g_new(GtkPlotDTtriangle,1); memcpy(t,next->data,sizeof(GtkPlotDTtriangle)); } return list; } */ static void gtk_plot_dt_create_center_node_4(GtkPlotDTnode *x, GtkPlotDTnode *a, GtkPlotDTnode *b, GtkPlotDTnode *c, GtkPlotDTnode *d) { if (!x || !a || !b || !c || !d) return; x->x= (a->x+b->x+c->x+d->x)/4.; x->y= (a->y+b->y+c->y+d->y)/4.; x->z= (a->z+b->z+c->z+d->z)/4.; x->px= (a->px+b->px+c->px+d->px)/4.; x->py= (a->py+b->py+c->py+d->py)/4.; x->pz= (a->pz+b->pz+c->pz+d->pz)/4.; x->a= x->b= x->c= x->d= 0; } /* gtk_plot_dt_triangle_subsample() * * first, we have to check if triangles t1 and t2 have a common edge, * i.e. two common node indices: the node indices of each triangle t1 * and t2 are held in u[] and v[], respectively. First, we check all * u[i] against v[i] - if we find two identical values, we're done. If * not, we permutate v[] and try again until we're through will all * permutations. If we still didn't find anything, the triangles don't * have a common edge and we return 0. * * If they have a common edge, we already saved the four outline points * of the two triangles (giving a polygon with 4 nodes) in a,b,c,d. * * All we have to do now is create a new node in the center. */ static GtkPlotDTnode * gtk_plot_dt_triangle_subsample(GtkPlotDT *data, GtkPlotDTtriangle *t1, GtkPlotDTtriangle *t2) { gint i,tmp; GtkPlotDTnode *n= NULL; gint a= 0,b= 0,c= 0,d= 0, found= 0; gint u[3], v[3]; u[0] = t1->a; u[1] = t1->b; u[2] = t1->c; v[0] = t2->a; v[1] = t2->b; v[2] = t2->c; for (i=0; i<4; i++) { if (u[0]==v[0] && u[1]==v[2]) { a= u[0]; b=v[1]; c=u[1]; d= u[2]; found++; break; } if (u[1]==v[1] && u[2]==v[0]) { a= u[0]; b=u[1]; c=v[2]; d= u[2]; found++; break; } if (u[0]==v[0] && u[2]==v[1]) { a= u[0]; b=u[1]; c=u[2]; d= v[2]; found++; break; } /* permutate nodelist */ tmp= v[0]; v[0]= v[1]; v[1]= v[2]; v[2]= tmp; } if (found) { n= g_new(GtkPlotDTnode,1); gtk_plot_dt_create_center_node_4(n, gtk_plot_dt_get_node(data,a), gtk_plot_dt_get_node(data,b), gtk_plot_dt_get_node(data,c), gtk_plot_dt_get_node(data,d)); } return n; } /* prerequisite: data->tmp_nodes[] must be empty! If this is a problem, * it must be made sure that the old content is kept and additional entries * have not-yet-used indices! */ static gint gtk_plot_dt_triangulate_subsample(GtkPlotDT *data) { gint node_idx, cnt; GList *tmplist, *t, *tmpnodes=NULL; GtkPlotDTnode *n= NULL; /* for each triangle: walk through the rest of the list, if the triangle * and one of the rest are neighbours, store interpolated node */ cnt= 0; for (tmplist= data->triangles; tmplist; tmplist=tmplist->next) { for (t= tmplist->next; t; t=t->next) { /* if the two triangles are neighbours, n will be the subsampled node */ n=gtk_plot_dt_triangle_subsample(data,tmplist->data,t->data); if (n) { tmpnodes= g_list_prepend(tmpnodes,n); cnt++; } } } data->tmp_nodes= g_new(GtkPlotDTnode,cnt); for (t= tmpnodes, node_idx=0; t && node_idxnext, node_idx++) { n= tmpnodes->data; n->id= -1-node_idx; memcpy(&(data->tmp_nodes[node_idx]),n,sizeof(GtkPlotDTnode)); } for (t= tmpnodes; t; t=t->next) { g_free(t->data); } g_list_free(tmpnodes); data->node_0= -1-cnt; for (node_idx=data->node_0;node_idx<0;node_idx++) gtk_plot_dt_triangulate_insert_node(data, gtk_plot_dt_get_node(data,node_idx)); return gtk_plot_dt_count_triangles(data); } static gboolean gtk_plot_dt_real_triangulate(GtkPlotDT *data) { gint node_idx, tcnt; gdouble max; if (!data) return FALSE; if (!data || ! data->nodes || data->node_cnt<3) return FALSE; gtk_plot_dt_clear_triangles(data); if (data->quadrilateral && gtk_plot_dt_triangulate_tryquad(data)) return gtk_plot_dt_count_triangles(data); /* create auxiliary triangles all to-be-inserted nodes will reside in */ if (!gtk_plot_dt_update_tmpnodes(data)) return FALSE; /* now insert all nodes in the nodelist */ max= data->node_cnt-1; max*=max; for (node_idx=0; node_idxnode_cnt; node_idx++) { #ifdef DELAUNAY_DEBUG fprintf(stderr,"inserting node %d/%d\n",node_idx,data->node_cnt); #endif gtk_plot_dt_triangulate_insert_node(data, &data->nodes[node_idx]); if (data->pbar) { (*data->pbar) (1.0*node_idx*node_idx/max); } } /* remove auxiliary triangles: */ tcnt= gtk_plot_dt_drop_tmpstuff(data); /* { GList *list = data->triangles; while(list){ GtkPlotDTtriangle *t = (GtkPlotDTtriangle *)list->data; printf("TRIANGLE %d %d %d\n",t->a,t->b,t->c); if(t->nn[0]) printf("NN0 : %d %d %d\n",t->nn[0]->a,t->nn[0]->b,t->nn[0]->c); if(t->nn[1]) printf("NN1 : %d %d %d\n",t->nn[1]->a,t->nn[1]->b,t->nn[1]->c); if(t->nn[2]) printf("NN2 : %d %d %d\n",t->nn[2]->a,t->nn[2]->b,t->nn[2]->c); list = list->next; } } */ /* if we don't have any triangles left or we don't want subsampling, * we're done here */ if (!tcnt || !data->subsampling) return tcnt; return gtk_plot_dt_triangulate_subsample(data); } static gint gtk_plot_dt_compare_nodes_x_wise(gconstpointer _a, gconstpointer _b) { GtkPlotDTnode *a= (GtkPlotDTnode *)_a; GtkPlotDTnode *b= (GtkPlotDTnode *)_b; double dx; /* find relative difference of x values */ if (b->x != 0.0) dx= fabs((a->x/b->x) - 1.0); else if (a->x != 0.0) dx= fabs((b->x/a->x) - 1.0); else dx= 0.0; /* first, lets see if two values differ by less than a certain amount */ if (dx < 1e-10) return 0; else if (a->x < b->x) /* ax < bx */ return -1; else /* ax > bx */ return 1; /* just in case: */ fprintf(stderr,"gtk_plot_dt_compare_nodes_x_wise(): internal error!\n"); return 0; } static gint gtk_plot_dt_compare_nodes_y_wise(gconstpointer _a, gconstpointer _b) { GtkPlotDTnode *a= (GtkPlotDTnode *)_a; GtkPlotDTnode *b= (GtkPlotDTnode *)_b; double dy; /* find relative difference of y values */ if (b->y != 0.0) dy= fabs((a->y/b->y) - 1.0); else if (a->y != 0.0) dy= fabs((b->y/a->y) - 1.0); else dy= 0.0; if (dy < 1e-10) /* ay == by */ return 0; else if (a->y < b->y) /* ay < by */ return -1; else /* ay > by */ return 1; /* just in case: */ fprintf(stderr,"gtk_plot_dt_compare_nodes_y_wise(): internal error!\n"); return 0; } static gint gtk_plot_dt_compare_nodes_xy_wise(gconstpointer a, gconstpointer b) { switch(gtk_plot_dt_compare_nodes_x_wise(a,b)) { case -1: return -1; break; case 1: return 1; break; case 0: switch(gtk_plot_dt_compare_nodes_y_wise(a,b)) { case -1: return -1; break; case 1: return 1; break; case 0: return 0; break; } break; } /* just in case: */ fprintf(stderr,"gtk_plot_dt_compare_nodes_xy_wise(): internal error!\n"); return 0; } static GtkPlotDTtriangle * find_neighbor(GtkPlotDT *dt, GtkPlotDTtriangle *t, gint n1, gint n2) { GList *list; GtkPlotDTtriangle *triangle; list = dt->triangles; while(list) { triangle = (GtkPlotDTtriangle *)list->data; if(triangle != t){ if(triangle->na->id == n1 && triangle->nb->id == n2) return triangle; if(triangle->nb->id == n1 && triangle->na->id == n2) return triangle; if(triangle->na->id == n1 && triangle->nc->id == n2) return triangle; if(triangle->nc->id == n1 && triangle->na->id == n2) return triangle; if(triangle->nb->id == n1 && triangle->nc->id == n2) return triangle; if(triangle->nc->id == n1 && triangle->nb->id == n2) return triangle; } list = list->next; } return NULL; } static gboolean gtk_plot_dt_triangulate_tryquad(GtkPlotDT *data) { GList *nodes= NULL, *list= NULL; GList *xrow_prev, *xrow_next= NULL, *xrow_sec= NULL; GtkPlotDTnode *node, *x0y0, *x0y1, *x1y0, *x1y1, *center; gint i, nc, nx= 0, ny= 0, x, y, num_mid, m; double x0; if (!data) return 0; if (!data || ! data->nodes || data->node_cnt<3) return 0; nc= data->node_cnt; node= data->nodes; for (i=0; idata)->x; /* sort order: x0y0 x0y1 x0y2 .. x1y0 x1y1 x1y2 .. xnyn */ for (list=nodes, i=0; list; list=list->next, i++) { if (!gtk_plot_dt_compare_nodes_x_wise(nodes->data, list->data)) ny++; else if (!xrow_sec) xrow_sec= list; } /* if we have only data in one row, we cannot go on: */ if (ny<2 || !xrow_sec) { #ifdef DELAUNAY_DEBUG fprintf(stderr,"the grid is not quadrilateral (single row)!\n"); #endif g_list_free(nodes); data->quadrilateral = FALSE; return FALSE; } nx= nc/ny; if (nc!= nx*ny) { #ifdef DELAUNAY_DEBUG fprintf(stderr,"the grid is not quadrilateral (%dx%d != %d)!\n",nx,ny,nc); #endif g_list_free(nodes); data->quadrilateral = FALSE; return FALSE; } for (xrow_prev= nodes, xrow_next= xrow_sec; xrow_next; xrow_prev= xrow_prev->next, xrow_next= xrow_next->next) { if (gtk_plot_dt_compare_nodes_y_wise(xrow_prev->data, xrow_next->data)) { #ifdef DELAUNAY_DEBUG fprintf(stderr,"the grid is not quadrilateral!\n"); #endif g_list_free(nodes); data->quadrilateral = FALSE; return FALSE; } } num_mid= (nx-1)*(ny-1); #ifdef DELAUNAY_DEBUG fprintf(stderr,"the grid is quadrilateral %dx%d, inserting %d nodes!\n", nx,ny,num_mid); #endif /* now create center nodes and triangle list: */ data->tmp_nodes= g_new(GtkPlotDTnode, num_mid); data->node_0= -num_mid; for (xrow_prev= nodes, xrow_next= xrow_sec, x=0, y=0, m=0; xrow_next && xrow_next->next; xrow_prev= xrow_prev->next, xrow_next= xrow_next->next) { if (xdata; x0y1= xrow_prev->next->data; x1y0= xrow_next->data; x1y1= xrow_next->next->data; center= data->tmp_nodes+m; gtk_plot_dt_create_center_node_4(center,x0y0,x0y1,x1y0,x1y1); center->id= -1-m; center->a= x0y0->id; center->b= x0y1->id; center->c= x1y0->id; center->d= x1y1->id; t1 = gtk_plot_dt_add_triangle(data,-1-m,x0y0->id,x1y0->id); t2 = gtk_plot_dt_add_triangle(data,-1-m,x1y0->id,x1y1->id); t3 = gtk_plot_dt_add_triangle(data,-1-m,x1y1->id,x0y1->id); t4 = gtk_plot_dt_add_triangle(data,-1-m,x0y1->id,x0y0->id); t1->nn[0] = t4; t1->nn[1] = t2; t2->nn[0] = t1; t2->nn[1] = t3; t3->nn[0] = t2; t3->nn[1] = t4; t4->nn[0] = t3; t4->nn[1] = t1; find_neighbor(data, t1, x0y0->id, x1y0->id); find_neighbor(data, t2, x1y0->id, x1y1->id); find_neighbor(data, t3, x1y1->id, x0y1->id); find_neighbor(data, t4, x0y1->id, x0y0->id); m++; y++; } else { x++; y= 0; } } else { fprintf(stderr,"gtk_plot_dt_triangulate_tryquad(): internal error!\n"); } } g_list_free(nodes); return TRUE; } /** * gtk_plot_dt_set_quadriteral: * @dt: * @set: * * */ void gtk_plot_dt_set_quadrilateral(GtkPlotDT *dt, gboolean set) { gboolean old = dt->quadrilateral; dt->quadrilateral = set; if(dt->triangles && old!=set) gtk_plot_dt_triangulate(dt); } /** * gtk_plot_dt_set_subsampling: * @dt: * @set: * * */ void gtk_plot_dt_set_subsampling(GtkPlotDT *dt, gboolean set) { gboolean old = dt->subsampling; dt->subsampling = set; if(dt->triangles && old!=set) gtk_plot_dt_triangulate(dt); } gtkextra-3.2.0/gtkextra/gtkdataentry.c0000644000076400001440000004255312603754176015010 00000000000000/* gtkdataentry - data entry widget, based on GtkEntry * Copyright 2011 Fredy Paquet * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #define __GTKEXTRA_H_INSIDE__ #include "gtkextra-compat.h" #include "gtkdataentry.h" #include "gtkdataformat.h" /** * SECTION: gtkdataentry * @short_description: a data entry widget, based on GtkEntry * * GtkDataEntry provides additional properties: * * - #GtkDataEntry:description - no functionality, a place for * private information that cannot be put anywhere else * * - #GtkDataEntry:datatype - no functionality, a datatype hint * for the application because any widget content is text * * - #GtkDataEntry:dataformat - a formatting instruction that * controls what you see when the widget doesn't have input * focus * * - #GtkDataEntry:text - set the contents of the widget. if the * widget doesn't have input focus text will be formatted * according to the data_format * * - #GtkDataEntry:max-length-bytes - set the maximum byte * length for the contents of the widget. * * The main reason for this widget is to provide a formatting * entry widget for numeric data like integer, float, money * which also supports NULL values (GtkSpinButton is nice but * doesn't support empty field values). Handling of Null values * is supported by all SQL database systems. The Null values are * represented by empty field contents. * * When editing field contents, all data formatting is removed * before the focus enters the widget. As soon as the focus * leaves the widget, data will be nicely formatted again. * * As an additional feature, the minus sign (negative numbers) * can be entered at the end of the data. As soon as you leave * the field it will be placed properly in front of the number. * * See also: gtk_data_format() * */ #undef GTK_DATA_ENTRY_DEBUG #ifdef DEBUG #define GTK_DATA_ENTRY_DEBUG 0 /* define to activate debug output */ #endif #if GTK_DATA_ENTRY_DEBUG #define GTK_DATA_ENTRY_DEBUG_SIGNAL 0 /* debug signal handlers */ #endif enum { PROP_0, PROP_DATA_ENTRY_DATATYPE, PROP_DATA_ENTRY_DATAFORMAT, PROP_DATA_ENTRY_DESCRIPTION, PROP_DATA_ENTRY_TEXT, PROP_DATA_ENTRY_MAX_LENGTH_BYTES, } GTK_DATA_ENTRY_PROPERTIES; enum { LAST_SIGNAL } GTK_DATA_ENTRY_SIGNALS; static void gtk_data_entry_class_init(GtkDataEntryClass *klass); static void gtk_data_entry_init(GtkDataEntry *data); static GtkEntryClass *parent_class = NULL; /** * gtk_data_entry_get_description: * @data_entry: a #GtkDataEntry * * Retrieves the #GtkDataEntry description. * * Returns: a pointer to the contents of the widget as a * string. This string points to internally allocated * storage in the widget and must not be freed, modified or * stored. **/ const gchar * gtk_data_entry_get_description(GtkDataEntry *data_entry) { g_return_val_if_fail(GTK_IS_DATA_ENTRY(data_entry), NULL); return data_entry->description; } /** * gtk_data_entry_set_description: * @data_entry: a #GtkDataEntry * @description: the description or NULL * * Sets the GtkDataEntry description. */ void gtk_data_entry_set_description(GtkDataEntry *data_entry, const gchar *description) { g_return_if_fail(data_entry != NULL); g_return_if_fail(GTK_IS_DATA_ENTRY(data_entry)); if (data_entry->description) g_free(data_entry->description); data_entry->description = g_strdup(description); } /** * gtk_data_entry_get_data_type: * @data_entry: a #GtkDataEntry * * Retrieves the #GtkDataEntry data_type. * * Returns: a pointer to the contents of the widget as a * string. This string points to internally allocated * storage in the widget and must not be freed, modified or * stored. **/ const gchar * gtk_data_entry_get_data_type(GtkDataEntry *data_entry) { g_return_val_if_fail(GTK_IS_DATA_ENTRY(data_entry), NULL); return data_entry->data_type; } /** * gtk_data_entry_set_data_type: * @data_entry: a #GtkDataEntry * @data_type: the data type or NULL * * Sets the GtkDataEntry data type for application use. */ void gtk_data_entry_set_data_type(GtkDataEntry *data_entry, const gchar *data_type) { g_return_if_fail(data_entry != NULL); g_return_if_fail(GTK_IS_DATA_ENTRY(data_entry)); if (data_entry->data_type) g_free(data_entry->data_type); data_entry->data_type = g_strdup(data_type); } /** * gtk_data_entry_get_data_format: * @data_entry: a #GtkDataEntry * * Retrieves the #GtkDataEntry data_format. * * See gtk_data_format() for details. * * Returns: a pointer to the contents of the widget as a * string. This string points to internally allocated * storage in the widget and must not be freed, modified or * stored. **/ const gchar * gtk_data_entry_get_data_format(GtkDataEntry *data_entry) { g_return_val_if_fail(GTK_IS_DATA_ENTRY(data_entry), NULL); return data_entry->data_format; } /** * gtk_data_entry_set_data_format: * @data_entry: a #GtkDataEntry * @data_format: the data type or NULL * * Sets the GtkDataEntry data type for application use. The * display will not be refreshed upon change. * * See gtk_data_format() for details. * */ void gtk_data_entry_set_data_format(GtkDataEntry *data_entry, const gchar *data_format) { g_return_if_fail(data_entry != NULL); g_return_if_fail(GTK_IS_DATA_ENTRY(data_entry)); if (data_entry->data_format) g_free(data_entry->data_format); data_entry->data_format = g_strdup(data_format); } /** * gtk_data_entry_get_text: * @data_entry: a #GtkDataEntry * * Retrieves the #GtkDataEntry contents. All formatting will be * removed. * * Returns: a pointer to the contents of the widget as a * string. This string points to internally allocated * storage in the widget and must not be freed, modified or * stored. **/ const gchar * gtk_data_entry_get_text(GtkDataEntry *data_entry) { gchar *text; g_return_val_if_fail(GTK_IS_DATA_ENTRY(data_entry), NULL); text = (gchar *)gtk_entry_get_text(GTK_ENTRY(data_entry)); /* if (!gtk_widget_has_focus(GTK_WIDGET(data_entry) -- PR#205431 */ text = gtk_data_format_remove(text, data_entry->data_format); #if GTK_DATA_ENTRY_DEBUG g_debug("gtk_data_entry_get_text: %s", text ? text : ""); #endif return text; } /** * gtk_data_entry_set_text: * @data_entry: a #GtkDataEntry * @text: the contents to be set * * Sets the GtkDataEntry contents. The contents will be * formatted due to the current data_format. */ void gtk_data_entry_set_text(GtkDataEntry *data_entry, const gchar *text) { g_return_if_fail(data_entry != NULL); g_return_if_fail(GTK_IS_DATA_ENTRY(data_entry)); if (!gtk_widget_has_focus(GTK_WIDGET(data_entry))) { text = gtk_data_format(text, data_entry->data_format); } #if GTK_DATA_ENTRY_DEBUG g_debug("gtk_data_entry_set_text: %s", text ? text : ""); #endif gtk_entry_set_text(GTK_ENTRY(data_entry), text); } /** * gtk_data_entry_get_max_length_bytes: * @data_entry: a #GtkDataEntry * * Retrieves the maximum byte length for the contents of * #GtkDataEntry. * * Returns: maximum byte length or 0. * * Since: 3.0.6 **/ gint gtk_data_entry_get_max_length_bytes(GtkDataEntry *data_entry) { g_return_val_if_fail(GTK_IS_DATA_ENTRY(data_entry), 0); return data_entry->max_length_bytes; } /** * gtk_data_entry_set_max_length_bytes: * @data_entry: a #GtkDataEntry * @max_length_bytes: maximum byte length or 0 * * Sets the maximum byte length for the contents of the * #GtkDataEntry. Existing content will not be truncted. * * Since: 3.0.6 */ void gtk_data_entry_set_max_length_bytes(GtkDataEntry *data_entry, gint max_length_bytes) { g_return_if_fail(data_entry != NULL); g_return_if_fail(GTK_IS_DATA_ENTRY(data_entry)); if (max_length_bytes < 0) max_length_bytes = 0; if (max_length_bytes > GTK_ENTRY_BUFFER_MAX_SIZE) max_length_bytes = GTK_ENTRY_BUFFER_MAX_SIZE; data_entry->max_length_bytes = max_length_bytes; } GType gtk_data_entry_get_type(void) { static GType data_entry_type = 0; if (!data_entry_type) { static const GInterfaceInfo interface_info = { (GInterfaceInitFunc)NULL, (GInterfaceFinalizeFunc)NULL, (gpointer)NULL }; data_entry_type = g_type_register_static_simple( gtk_entry_get_type(), "GtkDataEntry", sizeof(GtkDataEntryClass), (GClassInitFunc)gtk_data_entry_class_init, sizeof(GtkDataEntry), (GInstanceInitFunc)gtk_data_entry_init, 0); g_type_add_interface_static(data_entry_type, GTK_TYPE_BUILDABLE, &interface_info); } return (data_entry_type); } static void gtk_data_entry_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkDataEntry *data_entry = GTK_DATA_ENTRY(object); switch(prop_id) { case PROP_DATA_ENTRY_DATATYPE: { const gchar *data_type = g_value_get_string(value); if (!gtk_widget_get_realized(GTK_WIDGET(data_entry))) { if (data_entry->data_type) g_free(data_entry->data_type); data_entry->data_type = g_strdup(data_type); } else { gtk_data_entry_set_data_type(data_entry, data_type); } } break; case PROP_DATA_ENTRY_DATAFORMAT: { const gchar *data_format = g_value_get_string(value); if (!gtk_widget_get_realized(GTK_WIDGET(data_entry))) { if (data_entry->data_format) g_free(data_entry->data_format); data_entry->data_format = g_strdup(data_format); } else { gtk_data_entry_set_data_format(data_entry, data_format); } } break; case PROP_DATA_ENTRY_DESCRIPTION: { const gchar *description = g_value_get_string(value); if (!gtk_widget_get_realized(GTK_WIDGET(data_entry))) { if (data_entry->description) g_free(data_entry->description); data_entry->description = g_strdup(description); } else { gtk_data_entry_set_description(data_entry, description); } } break; case PROP_DATA_ENTRY_TEXT: gtk_data_entry_set_text(data_entry, g_value_get_string(value)); break; case PROP_DATA_ENTRY_MAX_LENGTH_BYTES: gtk_data_entry_set_max_length_bytes(data_entry, g_value_get_int(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } static void gtk_data_entry_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkDataEntry *data_entry = GTK_DATA_ENTRY(object); switch(prop_id) { case PROP_DATA_ENTRY_DATATYPE: g_value_set_string(value, data_entry->data_type); break; case PROP_DATA_ENTRY_DATAFORMAT: g_value_set_string(value, data_entry->data_format); break; case PROP_DATA_ENTRY_DESCRIPTION: g_value_set_string(value, data_entry->description); break; case PROP_DATA_ENTRY_TEXT: g_value_set_string(value, gtk_data_entry_get_text(data_entry)); break; case PROP_DATA_ENTRY_MAX_LENGTH_BYTES: g_value_set_int(value, gtk_data_entry_get_max_length_bytes(data_entry)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } } static gint gtk_data_entry_focus_in(GtkWidget *widget, GdkEventFocus *event) { const gchar *text = gtk_entry_get_text(GTK_ENTRY(widget)); gchar *data_format = GTK_DATA_ENTRY(widget)->data_format; #if GTK_DATA_ENTRY_DEBUG g_debug("gtk_data_entry_focus_in: called"); #endif if (data_format && data_format[0]) { text = gtk_data_format_remove(text, data_format); gtk_entry_set_text(GTK_ENTRY(widget), text); } return ((*GTK_WIDGET_CLASS(parent_class)->focus_in_event)(widget, event)); } static gint gtk_data_entry_focus_out(GtkWidget *widget, GdkEventFocus *event) { const gchar *text = gtk_entry_get_text(GTK_ENTRY(widget)); gchar *data_format = GTK_DATA_ENTRY(widget)->data_format; #if GTK_DATA_ENTRY_DEBUG g_debug("gtk_data_entry_focus_out: called"); #endif if (data_format && data_format[0]) { text = gtk_data_format(text, data_format); gtk_entry_set_text(GTK_ENTRY(widget), text); } return ((*GTK_WIDGET_CLASS(parent_class)->focus_out_event)(widget, event)); } static void gtk_data_entry_class_init(GtkDataEntryClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); #if 0 GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass); GtkEntryClass *entry_class = GTK_ENTRY_CLASS (klass); #endif parent_class = g_type_class_ref(gtk_entry_get_type()); gobject_class->set_property = gtk_data_entry_set_property; gobject_class->get_property = gtk_data_entry_get_property; widget_class->focus_in_event = gtk_data_entry_focus_in; widget_class->focus_out_event = gtk_data_entry_focus_out; /** * GtkDataEntry:datatype: * * no functionality, a datatype hint for the application because * any widget content is text. */ g_object_class_install_property(gobject_class, PROP_DATA_ENTRY_DATATYPE, g_param_spec_string("datatype", "Datatype", "Data type for application use", "" /* default value */, G_PARAM_READWRITE)); /** * GtkDataEntry:dataformat: * * a formatting string that controls what you see when the * widget doesn't contain input focus. * * See gtk_data_format() for details. * */ g_object_class_install_property(gobject_class, PROP_DATA_ENTRY_DATAFORMAT, g_param_spec_string("dataformat", "Data format", "A formatting string that controls what you see when the widget doesn't contain input focus", "" /* default value */, G_PARAM_READWRITE)); /** * GtkDataEntry:description: * * Description of the GtkDataEntry, no functionality, a place * for private information that cannot be put anywhere else. */ g_object_class_install_property(gobject_class, PROP_DATA_ENTRY_DESCRIPTION, g_param_spec_string("description", "Description", "Description of entry contents", "" /* default value */, G_PARAM_READWRITE)); /** * GtkDataEntry:text: * * Set the contents of the GtkDataEntry. For details see * #gtk_data_entry_set_text. */ g_object_class_install_property(gobject_class, PROP_DATA_ENTRY_TEXT, g_param_spec_string("text", "Text", "The contents of the data_entry", "" /* default value */, G_PARAM_READWRITE)); /** * GtkDataEntry:max-length-bytes: * * Set the maximum length in bytes for the GtkDataEntry. For * details see #gtk_data_entry_set_max_length_bytes. * * Sometimes, systems cannot handle UTF-8 string length * correctly, to overcome this problem, you can use the maximum * string length in bytes. When setting both limits, max-length * and max-length-bytes, both must be fulfilled. * * Since: 3.0.6 */ g_object_class_install_property(gobject_class, PROP_DATA_ENTRY_MAX_LENGTH_BYTES, g_param_spec_int("max-length-bytes", "Maximum bytes length", "The maximum number of bytes for this entry. Zero if no maximum", 0, GTK_ENTRY_BUFFER_MAX_SIZE, 0 /* default value */, G_PARAM_READWRITE)); } /* Signal interception */ static void _gtk_data_entry_insert_text_handler(GtkEditable *editable, gchar *new_text, gint new_text_length, gpointer position, gpointer user_data) { GtkDataEntry *data_entry = GTK_DATA_ENTRY(editable); gint max_len = data_entry->max_length_bytes; if (!max_len) return; const gchar *old_text = gtk_data_entry_get_text(data_entry); gint old_length = strlen(old_text); if (new_text_length < 0) new_text_length = strlen(new_text); #if GTK_DATA_ENTRY_DEBUG_SIGNAL > 0 g_debug("_gtk_data_entry_insert_text_handler(bytes): cl %d max %d new %d", old_length, max_len, new_text_length); #endif if (old_length + new_text_length > max_len) { gdk_beep(); g_signal_stop_emission_by_name(editable, "insert-text"); } } static void gtk_data_entry_init(GtkDataEntry *data_entry) { #if 0 GtkWidget *widget = GTK_WIDGET(data_entry); #endif data_entry->description = NULL; data_entry->data_type = NULL; data_entry->data_format = NULL; data_entry->max_length_bytes = 0; #if GTK_DATA_ENTRY_DEBUG > 0 g_debug("gtk_data_entry_init"); #endif g_signal_connect(GTK_BUILDABLE(data_entry), "insert-text", G_CALLBACK(_gtk_data_entry_insert_text_handler), NULL); } /** * gtk_data_entry_new: * * Creates a new GtkDataEntry Widget. * * Returns: the new GtkDataEntry Widget */ GtkDataEntry * gtk_data_entry_new(void) { GtkDataEntry *data_entry = GTK_DATA_ENTRY( gtk_widget_new(gtk_data_entry_get_type(), NULL)); return (data_entry); } gtkextra-3.2.0/gtkextra/gtkplotcairo.c0000644000076400001440000011323712603754176015007 00000000000000/* gtkplotpc - gtkplot print context - a renderer for printing functions * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotcairo * @short_description: Cairo drawing backend. * * Subclass of #GtkPlotPC used for screen drawing. */ #include #include #include #include #include #include #include #include #include "gtkplotpc.h" #include "gtkplotcairo.h" #include "gtkplot.h" #include "gtkpsfont.h" #include "gtkplotcanvas.h" #include static void gtk_plot_cairo_init (GtkPlotCairo *pc); static void gtk_plot_cairo_class_init (GtkPlotCairoClass *klass); static void gtk_plot_cairo_finalize (GObject *object); static gboolean gtk_plot_cairo_real_init (GtkPlotPC *pc); static void gtk_plot_cairo_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h); static void gtk_plot_cairo_leave (GtkPlotPC *pc); static void gtk_plot_cairo_gsave (GtkPlotPC *pc); static void gtk_plot_cairo_grestore (GtkPlotPC *pc); static void gtk_plot_cairo_clip (GtkPlotPC *pc, const GdkRectangle *area); static void gtk_plot_cairo_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, const GdkBitmap *mask); static void gtk_plot_cairo_set_color (GtkPlotPC *pc, const GdkColor *color); static void gtk_plot_cairo_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style); static void gtk_plot_cairo_set_dash (GtkPlotPC *pc, gdouble offset_, gdouble *values, gint num_values); static void gtk_plot_cairo_draw_point (GtkPlotPC *pc, gdouble x, gdouble y); static void gtk_plot_cairo_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2); static void gtk_plot_cairo_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints); static void gtk_plot_cairo_draw_rectangle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height); static void gtk_plot_cairo_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints); static void gtk_plot_cairo_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size); static void gtk_plot_cairo_draw_ellipse (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height); static void gtk_plot_cairo_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height); static void gtk_plot_cairo_draw_string (GtkPlotPC *pc, gint x, gint y, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font, gint height, GtkJustification just, const gchar *text); static void gtk_plot_cairo_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y); extern gint roundint (gdouble x); static GtkPlotPCClass *parent_class = NULL; GType gtk_plot_cairo_get_type (void) { static GType pc_type = 0; if (!pc_type) { pc_type = g_type_register_static_simple ( gtk_plot_pc_get_type(), "GtkPlotCairo", sizeof (GtkPlotCairoClass), (GClassInitFunc) gtk_plot_cairo_class_init, sizeof (GtkPlotCairo), (GInstanceInitFunc) gtk_plot_cairo_init, 0); } return pc_type; } static void gtk_plot_cairo_init (GtkPlotCairo *pc) { pc->cairo = NULL; /* CairoWindowAttr attributes; gint attributes_mask; CairoScreen *screen; attributes.window_type = CAIRO_WINDOW_CHILD; attributes.title = NULL; attributes.wclass = CAIRO_INPUT_OUTPUT; attributes.visual = cairo_visual_get_system (); attributes.colormap = cairo_colormap_get_system (); attributes.event_mask = 0; attributes_mask = CAIRO_WA_VISUAL | CAIRO_WA_COLORMAP; */ /* pc->window = cairo_window_new (NULL, &attributes, attributes_mask); screen = cairo_screen_get_default (); */ /* pc->context = cairo_pango_context_get (); */ /* pango_context_set_base_dir (pc->context, pc->text_direction == GTK_TEXT_DIR_LTR ? PANGO_DIRECTION_LTR : PANGO_DIRECTION_RTL); */ /* pango_context_set_language (pc->context, gtk_get_default_language ()); pc->layout = pango_layout_new(pc->context); */ } static void gtk_plot_cairo_class_init (GtkPlotCairoClass *klass) { GtkObjectClass *object_class; GObjectClass *gobject_class; GtkPlotPCClass *pc_class; GtkPlotCairoClass *cairo_class; parent_class = g_type_class_ref (gtk_plot_pc_get_type ()); object_class = (GtkObjectClass *) klass; gobject_class = (GObjectClass *) klass; pc_class = (GtkPlotPCClass *) klass; cairo_class = (GtkPlotCairoClass *) klass; gobject_class->finalize = gtk_plot_cairo_finalize; pc_class->init = gtk_plot_cairo_real_init; pc_class->leave = gtk_plot_cairo_leave; pc_class->set_viewport = gtk_plot_cairo_set_viewport; pc_class->gsave = gtk_plot_cairo_gsave; pc_class->grestore = gtk_plot_cairo_grestore; pc_class->clip = gtk_plot_cairo_clip; pc_class->clip_mask = gtk_plot_cairo_clip_mask; pc_class->set_color = gtk_plot_cairo_set_color; pc_class->set_dash = gtk_plot_cairo_set_dash; pc_class->set_lineattr = gtk_plot_cairo_set_lineattr; pc_class->draw_point = gtk_plot_cairo_draw_point; pc_class->draw_line = gtk_plot_cairo_draw_line; pc_class->draw_lines = gtk_plot_cairo_draw_lines; pc_class->draw_rectangle = gtk_plot_cairo_draw_rectangle; pc_class->draw_polygon = gtk_plot_cairo_draw_polygon; pc_class->draw_circle = gtk_plot_cairo_draw_circle; pc_class->draw_ellipse = gtk_plot_cairo_draw_ellipse; pc_class->set_font = gtk_plot_cairo_set_font; pc_class->draw_string = gtk_plot_cairo_draw_string; pc_class->draw_pixmap = gtk_plot_cairo_draw_pixmap; } /** * gtk_plot_cairo_new: * @cairo: * * * * Return value: */ GtkObject * gtk_plot_cairo_new (cairo_t *cairo) { GtkObject *object; object = g_object_new(gtk_plot_cairo_get_type(), NULL); gtk_plot_cairo_construct(GTK_PLOT_CAIRO(object), cairo, NULL); GTK_PLOT_CAIRO(object)->destroy_cairo = FALSE; return (object); } /** * gtk_plot_cairo_new_with_drawable: * @drawable: * * * * Return value: */ GtkObject * gtk_plot_cairo_new_with_drawable (GdkDrawable *drawable) { GtkObject *object; cairo_t *cairo = NULL; object = g_object_new(gtk_plot_cairo_get_type(), NULL); if(drawable) cairo = gdk_cairo_create(drawable); gtk_plot_cairo_construct(GTK_PLOT_CAIRO(object), cairo, NULL); GTK_PLOT_CAIRO(object)->destroy_cairo = TRUE; return (object); } /** * gtk_plot_cairo_construct: * @pc: A #GtkPlotCairo. * @cairo: * @context: * * */ void gtk_plot_cairo_construct(GtkPlotCairo *pc, cairo_t *cairo, PangoContext *context) { gtk_plot_cairo_set_cairo(pc, cairo); pc->context = context; if (pc->context) { g_object_ref(G_OBJECT(pc->context)); } if (pc->layout) { g_object_ref(G_OBJECT(pc->layout)); } else { if(pc->cairo) pc->layout = pango_cairo_create_layout(cairo); } } static void gtk_plot_cairo_finalize (GObject *object) { GtkPlotCairo *pc = GTK_PLOT_CAIRO(object); if(pc->destroy_cairo && pc->cairo) cairo_destroy(pc->cairo); GTK_PLOT_CAIRO(object)->cairo = NULL; if(pc->layout) g_object_unref(G_OBJECT(pc->layout)); pc->layout = NULL; if(pc->context) g_object_unref(G_OBJECT(pc->context)); pc->context = NULL; } static gboolean gtk_plot_cairo_real_init (GtkPlotPC *pc) { return TRUE; } static void gtk_plot_cairo_leave (GtkPlotPC *pc) { } /** * gtk_plot_cairo_set_cairo: * @pc: a #GtkPlotCairo * @cairo: * * */ void gtk_plot_cairo_set_cairo(GtkPlotCairo *pc, cairo_t *cairo) { if(pc->destroy_cairo && pc->cairo && cairo) cairo_destroy(pc->cairo); pc->cairo = cairo; } static void gtk_plot_cairo_set_viewport (GtkPlotPC *pc, gdouble w, gdouble h) { } static void gtk_plot_cairo_gsave (GtkPlotPC *pc) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if (!cairo) return; cairo_save(cairo); } static void gtk_plot_cairo_grestore (GtkPlotPC *pc) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if (!cairo) return; cairo_restore(cairo); } static void gtk_plot_cairo_clip (GtkPlotPC *pc, const GdkRectangle *area) { /* discard CairoRectangle* const: * cairo_gc_set_clip_rectangle should have a const arg. * I've checked the code and it doesn't change it or keep it. murrayc. */ cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; /* Shortcut */ if (!cairo) return; cairo_reset_clip(cairo); cairo_new_path(cairo); if (area) { cairo_move_to(cairo, area->x, area->y); cairo_line_to(cairo, area->x+area->width, area->y); cairo_line_to(cairo, area->x+area->width, area->y+area->height); cairo_line_to(cairo, area->x, area->y+area->height); cairo_close_path(cairo); cairo_clip(cairo); } } static void gtk_plot_cairo_clip_mask (GtkPlotPC *pc, gdouble x, gdouble y, const GdkBitmap *mask) { /* TBD: Currently no support for clip mask */ return; } static void gtk_plot_cairo_set_color (GtkPlotPC *pc, const GdkColor *color) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; /* Shortcut */ if (!cairo) return; cairo_set_source_rgba(cairo, 1.0/65535 * color->red, 1.0/65535 * color->green, 1.0/65535 * color->blue, 1.0); // TBD fix alpha } static void gtk_plot_cairo_set_dash (GtkPlotPC *pc, gdouble offset, gdouble *values, gint num_values) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; /* Shortcut */ if (!cairo) return; gchar list[] = {'\0','\1','\2','\3','\4','\5','\6','\7'}; double dash[1000]; gint i; if(num_values == 0){ return; } /* TBD - Fix this */ for(i = 0; i < num_values; i++){ gint value; value = values[i]; dash[i] = list[value]; } cairo_set_dash(cairo, dash, num_values, 0); } static void gtk_plot_cairo_set_lineattr (GtkPlotPC *pc, gfloat line_width, GdkLineStyle line_style, GdkCapStyle cap_style, GdkJoinStyle join_style) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; /* Shortcut */ if (!cairo) return; if (line_style == GDK_LINE_SOLID) cairo_set_dash(cairo, NULL, 0, 0); if (line_width == 0) line_width = 0.5; // What should be the minimum line width? cairo_set_line_width(cairo, line_width); if(cap_style == GDK_CAP_NOT_LAST || cap_style == GDK_CAP_PROJECTING) cairo_set_line_cap(cairo, CAIRO_LINE_CAP_SQUARE); if(cap_style == GDK_CAP_BUTT) cairo_set_line_cap(cairo, CAIRO_LINE_CAP_BUTT); if(cap_style == GDK_CAP_ROUND) cairo_set_line_cap(cairo, CAIRO_LINE_CAP_ROUND); cairo_set_line_join(cairo, (cairo_line_join_t)join_style); } static void gtk_plot_cairo_draw_point (GtkPlotPC *pc, gdouble x, gdouble y) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; /* Shortcut */ if (!cairo) return; /* Move and draw to same point, like in the postscript backend */ cairo_move_to(cairo, x,y); cairo_line_to(cairo, x,y); cairo_stroke(cairo); } static void gtk_plot_cairo_draw_line (GtkPlotPC *pc, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if (!cairo) return; cairo_move_to(cairo, x1,y1); cairo_line_to(cairo, x2,y2); cairo_stroke(cairo); } static void gtk_plot_cairo_draw_lines (GtkPlotPC *pc, GtkPlotPoint *points, gint numpoints) { gint i; cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if (!cairo) return; cairo_move_to(cairo, points[0].x,points[0].y); for(i = 1; i < numpoints; i++){ cairo_line_to(cairo, points[i].x, points[i].y); } cairo_stroke(cairo); } static void gtk_plot_cairo_draw_rectangle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if(!cairo) return; cairo_move_to(cairo, x, y); cairo_line_to(cairo, x+width, y); cairo_line_to(cairo, x+width, y+height); cairo_line_to(cairo, x, y+height); cairo_close_path(cairo); if (filled) cairo_fill(cairo); else cairo_stroke(cairo); } static void gtk_plot_cairo_draw_polygon (GtkPlotPC *pc, gint filled, GtkPlotPoint *points, gint numpoints) { gint i; cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if (!cairo) return; cairo_move_to(cairo, points[0].x,points[0].y); for(i = 1; i < numpoints; i++) cairo_line_to(cairo, points[i].x, points[i].y); cairo_close_path(cairo); if (filled) cairo_fill(cairo); else cairo_stroke(cairo); } static void gtk_plot_cairo_draw_circle (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble size) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if (!cairo) return; cairo_arc (cairo, x, y, size/2, 0., 2 * M_PI); if (filled) cairo_fill(cairo); else cairo_stroke(cairo); } static void gtk_plot_cairo_draw_ellipse (GtkPlotPC *pc, gint filled, gdouble x, gdouble y, gdouble width, gdouble height) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; if (!cairo) return; cairo_save(cairo); cairo_translate(cairo, x+width/2.0,y+height/2.0); cairo_scale (cairo, 1. / (height / 2.), 1. / (width / 2.)); cairo_arc (cairo, 0., 0., 1., 0., 2 * M_PI); cairo_restore(cairo); if (filled) cairo_fill(cairo); else cairo_stroke(cairo); } static void gtk_plot_cairo_set_font (GtkPlotPC *pc, GtkPSFont *psfont, gint height) { } /* subfunction of gtk_plot_cairo_draw_string(). */ static gint drawstring(GtkPlotPC *pc, gint angle, gint dx, gint dy, GtkPSFont *psfont, gint height, const gchar *text) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; PangoLayout *layout = GTK_PLOT_CAIRO(pc)->layout; PangoFontDescription *font; PangoRectangle rect; PangoFontMap *map; gint ret_value; gint dpi_cairo, dpi_screen; GdkScreen *screen = gdk_screen_get_default(); if(!text || strlen(text) == 0) return 0; cairo_save(cairo); map = pango_cairo_font_map_get_default(); dpi_cairo = pango_cairo_font_map_get_resolution(PANGO_CAIRO_FONT_MAP(map)); dpi_screen = gdk_screen_get_resolution(screen); if (dpi_screen != -1) height *= (double)dpi_screen/(double)dpi_cairo; font = gtk_psfont_get_font_description(psfont, height); pango_layout_set_font_description(GTK_PLOT_CAIRO(pc)->layout, font); pango_layout_set_text(GTK_PLOT_CAIRO(pc)->layout, text, strlen(text)); pango_layout_get_extents(GTK_PLOT_CAIRO(pc)->layout, NULL, &rect); if (psfont->i18n_latinfamily && psfont->vertical) { /* vertical-writing CJK postscript fonts. */ return rect.height; } else { /* horizontal writing */ if(angle == 90) // cairo_translate(cairo, dx, dy-PANGO_PIXELS(rect.width)); cairo_translate(cairo, dx, dy); else if(angle == 270) cairo_translate(cairo, dx+PANGO_PIXELS(rect.height), dy); else if(angle == 180) cairo_translate(cairo, dx-PANGO_PIXELS(rect.width), dy); else cairo_translate(cairo, dx, dy); } cairo_rotate(cairo, -angle * G_PI / 180); pango_cairo_update_layout(cairo, layout); pango_cairo_show_layout(cairo, layout); cairo_restore(cairo); pango_font_description_free(font); ret_value = (angle == 0 || angle == 180) ? rect.width : rect.height; return PANGO_PIXELS(rect.width); } static void gtk_plot_cairo_draw_string (GtkPlotPC *pc, gint tx, gint ty, gint angle, const GdkColor *fg, const GdkColor *bg, gboolean transparent, gint border, gint border_space, gint border_width, gint shadow_width, const gchar *font_name, gint font_height, GtkJustification just, const gchar *text) { cairo_t *cairo = GTK_PLOT_CAIRO(pc)->cairo; GList *family = NULL; gint x0, y0; gint old_width, old_height; gboolean bold, italic; gint fontsize; gint ascent, descent; gint numf; gint width, height; gint x, y; gint i; PangoFontDescription *font = NULL, *latin_font = NULL; GtkPSFont *psfont, *base_psfont, *latin_psfont; gchar subs[2], insert_char; const gchar *aux = text; const gchar *lastchar = text; const gchar *wtext = text; const gchar *xaux = text; gchar *new_text; /* Support Tiny C compiler : Original : gchar new_text[strlen(text)+1];*/ gchar num[4]; PangoRectangle rect; PangoLayout *layout = NULL; gint real_x, real_y, real_width, real_height; GdkColor real_fg = *fg; GdkColor real_bg = *bg; gint sign_x = 1, sign_y = 0; gint old_tx = tx, old_ty = ty; if (!cairo) return; layout = GTK_PLOT_CAIRO(pc)->layout; cairo_save(cairo); gtk_plot_cairo_set_color(pc, fg); /* font_name = "sans"; desc = pango_font_description_from_string(font_name); // Since the name does not contain the size yet... Also there is some // factor that I have to figure out... pango_font_description_set_size (desc, font_height *0.9 * PANGO_SCALE); pango_layout_set_font_description(layout, desc); pango_layout_set_text(layout, text, -1); cairo_save(cairo); cairo_translate(cairo, tx, ty); cairo_rotate(cairo, angle * G_PI / 180); gtk_plot_cairo_set_color(pc, fg); pango_cairo_update_layout(cairo, layout); PangoFontMetrics *metrics = NULL; metrics = pango_context_get_metrics(pango_layout_get_context(layout), desc, gtk_get_default_language()); pango_layout_get_size (layout, &width, &height); ascent = pango_font_metrics_get_ascent(metrics); descent = pango_font_metrics_get_descent(metrics); if (just == GTK_JUSTIFY_RIGHT) cairo_move_to(cairo, -PANGO_PIXELS(width), -PANGO_PIXELS(ascent) ); else if (just == GTK_JUSTIFY_CENTER) cairo_move_to(cairo, -PANGO_PIXELS(width)/2.0, -PANGO_PIXELS(ascent) ); else if (just == GTK_JUSTIFY_LEFT) cairo_move_to(cairo, 0, -PANGO_PIXELS(ascent) ); pango_cairo_show_layout(cairo, layout); cairo_restore(cairo); */ gtk_plot_text_get_size(text, angle, font_name, font_height, &width, &height, &ascent, &descent); if(height == 0 || width == 0) return; old_width = width; old_height = height; if(angle == 90 || angle == 270) { old_width = height; old_height = width; } switch(angle){ case 90: sign_x = 0; sign_y = -1; break; case 180: sign_x = -1; sign_y = 0; break; case 270: sign_x = 0; sign_y = 1; break; case 0: default: sign_x = 1; sign_y = 0; break; } switch(just){ case GTK_JUSTIFY_LEFT: switch(angle){ case 0: ty -= ascent; break; case 90: ty -= height; tx -= ascent; break; case 180: tx -= width; ty -= descent; break; case 270: tx -= descent; break; } old_tx = tx; old_ty = ty; break; case GTK_JUSTIFY_RIGHT: switch(angle){ case 0: tx -= width; ty -= ascent; old_tx -= width; old_ty -= ascent; break; case 90: tx -= ascent; ty += height; old_tx -= ascent; break; case 180: tx += width; ty -= descent; old_ty -= descent; break; case 270: tx -= descent; old_tx -= descent; old_ty -= height; break; } break; case GTK_JUSTIFY_CENTER: default: switch(angle){ case 0: tx -= width / 2.; ty -= ascent; old_tx -= width / 2.; old_ty -= ascent; break; case 90: tx -= ascent; ty += height / 2.; old_tx -= ascent; old_ty -= height / 2.; break; case 180: tx += width / 2.; ty -= descent; old_tx -= width / 2.; old_ty -= descent; break; case 270: tx -= descent; ty -= height / 2.; old_tx -= descent; old_ty -= height / 2.; break; } } real_x = tx; real_y = ty; real_width = width; real_height = height; if(!transparent){ gtk_plot_cairo_set_color(pc, &real_bg); gtk_plot_cairo_draw_rectangle(pc, TRUE, old_tx, old_ty, old_width, old_height); } gtk_psfont_get_families(&family, &numf); base_psfont = psfont = gtk_psfont_get_by_name(font_name); font = gtk_psfont_get_font_description(psfont, font_height); italic = psfont->italic; bold = psfont->bold; fontsize = font_height; x0 = x = 0; y0 = y = 0; if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } else { latin_psfont = NULL; latin_font = NULL; } gtk_plot_cairo_set_color(pc, &real_fg); aux = text; while(aux && *aux != '\0' && *aux != '\n'){ if(*aux == '\\'){ aux = g_utf8_next_char(aux); switch(*aux){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '9': psfont = gtk_psfont_get_by_family((gchar *)g_list_nth_data(family, *aux-'0'), italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); aux = g_utf8_next_char(aux); break; case '8': case 'g': psfont = gtk_psfont_get_by_family("Symbol", italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); aux = g_utf8_next_char(aux); break; case 'B': bold = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if(latin_font){ latin_font = NULL; } if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'x': xaux = aux + 1; for (i=0; i<3; i++){ if (xaux[i] >= '0' && xaux[i] <= '9') num[i] = xaux[i]; else break; } if (i < 3){ aux = g_utf8_next_char(aux); break; } num[3] = '\0'; insert_char = (gchar)atoi(num); subs[0] = insert_char; subs[1] = '\0'; pango_layout_set_font_description(layout, font); pango_layout_set_text(layout, subs, 1); pango_layout_get_extents(layout, NULL, &rect); x += sign_x*PANGO_PIXELS(rect.width); y += sign_y*PANGO_PIXELS(rect.width); aux += 4; lastchar = aux - 1; break; case 'i': italic = TRUE; psfont = gtk_psfont_get_by_family(psfont->family, italic, bold); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_psfont = gtk_psfont_get_by_family(psfont->i18n_latinfamily, italic, bold); if(latin_font) pango_font_description_free(latin_font); latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'S': case '^': fontsize = (int)((gdouble)fontsize * 0.6 + 0.5); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } if(angle == 180) y = y0 + fontsize; else if(angle == 270) x = x0 + sign_y*fontsize; aux = g_utf8_next_char(aux); break; case 's': case '_': fontsize = (int)((gdouble)fontsize * 0.6 + 0.5); pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if(angle == 0) y = y0 + fontsize; else if(angle == 90) x = x0 - sign_y*fontsize; if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case '+': fontsize += 3; y -= sign_x*3; x += sign_y*3; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case '-': fontsize -= 3; y += sign_x*3; x -= sign_y*3; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if (psfont->i18n_latinfamily) { latin_font = gtk_psfont_get_font_description(latin_psfont, fontsize); } aux = g_utf8_next_char(aux); break; case 'N': psfont = base_psfont; fontsize = font_height; pango_font_description_free(font); font = gtk_psfont_get_font_description(psfont, fontsize); if(angle == 0 || angle == 180) y = y0; else x = x0; italic = psfont->italic; bold = psfont->bold; aux = g_utf8_next_char(aux); break; case 'b': if (lastchar) { const gchar *aux2 = lastchar; gint i = aux2 - g_utf8_prev_char(lastchar); pango_layout_set_text(layout, lastchar, i); pango_layout_get_extents(layout, NULL, &rect); x -= sign_x*PANGO_PIXELS(rect.width); y -= sign_y*PANGO_PIXELS(rect.width); if (lastchar == wtext) lastchar = NULL; else lastchar = g_utf8_prev_char(lastchar); } else { pango_layout_set_text(layout, "X", 1); pango_layout_get_extents(layout, NULL, &rect); x -= sign_x*PANGO_PIXELS(rect.width); y -= sign_y*PANGO_PIXELS(rect.width); } aux = g_utf8_next_char(aux); break; default: if(aux && *aux != '\0' && *aux !='\n'){ gint new_width = 0; new_width = drawstring(pc, angle, tx+x, ty+y, psfont, fontsize, aux); x += sign_x * new_width; y += sign_y * new_width; lastchar = aux; aux = g_utf8_next_char(aux); } break; } } else { gint new_len = 0; gint new_width = 0; lastchar = aux; while(aux && *aux != '\0' && *aux !='\n' && *aux != '\\'){ xaux = aux; new_len += g_utf8_next_char(aux) - xaux; xaux++; aux = g_utf8_next_char(aux); } xaux = lastchar; new_text = (gchar *) g_new0(gchar , strlen(text)+1); /* Tiny C Compiler support */ for(i = 0; i < new_len; i++) new_text[i] = *xaux++; new_text[new_len] = '\0'; new_width = drawstring(pc, angle, tx+x, ty+y, psfont, fontsize, new_text); x += sign_x * new_width; y += sign_y * new_width; lastchar = aux; g_free (new_text); } } if(latin_font) pango_font_description_free(latin_font); /* border */ gtk_plot_cairo_set_color(pc, &real_fg); gtk_plot_pc_set_dash(pc, 0, NULL, 0); gtk_plot_pc_set_lineattr(pc, border_width, 0, 0, 0); switch(border){ case GTK_PLOT_BORDER_SHADOW: gtk_plot_pc_draw_rectangle(pc, TRUE, old_tx - border_space + shadow_width, old_ty + height + border_space, width + 2 * border_space, shadow_width); gtk_plot_pc_draw_rectangle(pc, TRUE, old_tx + width + border_space, old_ty - border_space + shadow_width, shadow_width, height + 2 * border_space); case GTK_PLOT_BORDER_LINE: gtk_plot_pc_draw_rectangle(pc, FALSE, old_tx - border_space, old_ty - border_space, width + 2*border_space, height + 2*border_space); case GTK_PLOT_BORDER_NONE: default: break; } cairo_restore(cairo); return; } static void gtk_plot_cairo_draw_pixmap (GtkPlotPC *pc, GdkPixmap *pixmap, GdkBitmap *mask, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height, gdouble scale_x, gdouble scale_y) { if (!GTK_PLOT_CAIRO(pc)->cairo) return; cairo_surface_t *image_surface = NULL; cairo_surface_t *mask_surface = NULL; cairo_t *cr; /* TODO: USE MASK */ image_surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, (width-xsrc)*scale_x, (height-ysrc)*scale_y); cr = cairo_create(image_surface); cairo_scale(cr,scale_x,scale_y); gdk_cairo_set_source_pixmap(cr,pixmap,xsrc,ysrc); cairo_paint(cr); cairo_destroy(cr); /* mask_surface = cairo_image_surface_create(CAIRO_CONTENT_COLOR_ALPHA, (width-xsrc)*scale_x, (height-ysrc)*scale_y); cr = cairo_create(image_surface); cairo_scale(cr,scale_x,scale_y); gdk_cairo_set_source_pixmap(cr,mask,xsrc,ysrc); cairo_paint(cr); cairo_destroy(cr); */ if(mask){ mask_surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, (width-xsrc)*scale_x, (height-ysrc)*scale_y); cr = cairo_create(mask_surface); cairo_set_source_rgb(cr,0,0,0); cairo_scale(cr,scale_x,scale_y); gdk_cairo_set_source_pixmap(cr,pixmap,xsrc,ysrc); cairo_mask_surface(cr,mask_surface,0,0); cairo_fill(cr); cairo_destroy(cr); } cairo_save(GTK_PLOT_CAIRO(pc)->cairo); /* cairo_rectangle(GTK_PLOT_CAIRO(pc)->cairo,xdest,ydest,(width-xsrc)*scale_x,(height-ysrc)*scale_y); cairo_clip(GTK_PLOT_CAIRO(pc)->cairo); */ /* if(mask) cairo_mask_surface(GTK_PLOT_CAIRO(pc)->cairo,mask_surface,xdest,ydest); */ cairo_set_source_surface(GTK_PLOT_CAIRO(pc)->cairo,image_surface,xdest,ydest); cairo_paint(GTK_PLOT_CAIRO(pc)->cairo); cairo_restore(GTK_PLOT_CAIRO(pc)->cairo); cairo_surface_destroy(image_surface); cairo_surface_destroy(mask_surface); } gtkextra-3.2.0/gtkextra/gtkextraicons.h0000644000076400001440000003037512603754176015200 00000000000000/* gtkextraicons - icons for file selection dialog */ #ifndef __GTK_EXTRA_ICONS_H__ #define __GTK_EXTRA_ICONS_H__ /* XPM */ static char *home_xpm[]={ "24 24 220 2", "Qt c None", "bq c #1c1f1a", "bp c #1e1715", "a5 c #291b1a", "br c #293427", "bc c #2a1f1d", "ai c #2a2c2a", "aU c #2c1a17", "av c #312b29", "aH c #32211f", "bj c #3a4237", "bo c #3b2a28", "aj c #3b3e3b", "ab c #3d4140", "ah c #3f3e3d", "ay c #3f4141", "bu c #3f5a34", ".i c #40372f", ".K c #403a35", "am c #424544", "#s c #443f3b", "a8 c #444444", ".z c #45403b", "bv c #465b3f", "#d c #47433f", "#n c #493d31", ".Z c #494540", "a0 c #494949", "bn c #494c39", "aK c #4a4c4a", "#E c #4c4844", "aZ c #4c4c4c", "#G c #4d4036", "aO c #4e4e4e", "bt c #4e6247", ".9 c #4f4137", "#o c #4f4237", ".q c #4f4c4a", "ac c #4f5251", "ba c #513631", "bs c #515e4d", ".p c #524942", "#F c #53483f", "#T c #555555", "bd c #555854", "an c #555857", "aa c #555958", "b# c #57574f", "aN c #575757", "a2 c #5a5554", ".0 c #5a5957", "aC c #5a5a5a", "bi c #5a6356", ".S c #5b5047", "aQ c #5b5b5b", "a3 c #5d312d", "#. c #5f544c", "aY c #5f5f5e", "aB c #606060", "a1 c #656565", "aF c #662e29", "aV c #666766", "ap c #676766", "#5 c #676767", ".F c #6a5e54", "aI c #6a6b6a", ".8 c #6b6662", "ar c #6b6b6b", "bb c #6d4642", "#c c #6d645d", "bh c #6d7766", "aR c #6e6362", "b. c #6f746c", "aE c #706665", "aw c #707170", ".T c #716861", ".l c #716c68", "at c #724642", ".u c #726d6a", "aq c #727272", ".j c #736b65", ".G c #736c67", "aX c #737371", "#t c #757471", ".k c #766c64", "as c #776f6e", "#K c #777675", ".t c #786f67", ".B c #787877", "ad c #787978", ".E c #797470", ".L c #797877", "ao c #7a7a79", "aP c #7a7a7a", "#r c #7b746d", ".R c #7b7570", "aW c #7b7974", "az c #7b7c7c", "bw c #7b8479", ".Y c #7c746b", ".d c #7d6e65", "ae c #7d7d7d", "aS c #7e3b34", "aD c #7e7e7e", "ag c #7e7f7e", "#m c #7f7c7a", "a4 c #80443f", "a9 c #808280", "bg c #81897b", "bf c #828b7c", ".s c #837d76", ".A c #838281", "#e c #848482", "#f c #858584", "#L c #858685", ".c c #867b72", "af c #868686", "aT c #883f38", ".J c #888178", ".r c #888784", ".N c #888888", "bk c #898f87", "bm c #899283", "aL c #8a8c8c", "ak c #8b8c8c", "be c #8b9287", ".y c #8c8176", "#7 c #8c8c8c", "au c #8d645f", "#4 c #909090", ".h c #928a82", "#V c #938e8a", ".1 c #939493", ".Q c #949493", "bz c #94a489", "aG c #954c45", "ax c #959494", "#X c #969696", "#p c #97928f", ".M c #979796", ".e c #9b948f", "aJ c #9b9b9b", "a7 c #9c9d9c", ".o c #9d9286", "#u c #9d9e9c", ".2 c #a2a2a1", "#v c #a2a3a2", "aM c #a3a3a2", "#2 c #a3a4a4", "#U c #a4a2a0", "#1 c #a4a4a4", "## c #a6a4a3", ".D c #a6a5a4", ".6 c #a6a6a6", ".7 c #a7a6a5", "al c #a8a8a7", "bl c #acb2a8", "#l c #adadac", "#J c #aeaaa7", ".3 c #aeaeae", "a. c #aeafae", "aA c #afafaf", ".C c #b0b0b0", "a# c #b0b1b0", "#9 c #b1b2b1", "#3 c #b1b2b2", "#0 c #b2b2b2", "#W c #b3b3b3", "#8 c #b6b7b6", "#A c #b7b7b7", "bx c #b7bbb6", "a6 c #b8b8b8", "#D c #babab9", "#g c #bbbbba", ".P c #bbbbbb", "#j c #bcbcbc", "#C c #bdbdbd", "by c #bdc4b7", "#I c #bebab6", "#S c #c0c0c0", "#H c #c2c1c1", "#z c #c2c2c2", "#h c #c3c3c3", ".5 c #c4c4c4", ".a c #c5bfbb", ".O c #c5c5c5", "#q c #c6c1b9", "#B c #c6c6c6", ".x c #c8c2bc", "#R c #c8c8c8", ".U c #c9c8c7", ".H c #c9c8c8", "#y c #c9c9c9", ".f c #cac9c7", "#k c #cbcbcb", "#M c #cccccc", "#x c #cdcdcd", "#i c #cecece", "#b c #cfcac1", ".I c #cfcbc6", ".4 c #cfcfcf", "#Z c #d0d0d0", ".n c #d1cdc8", ".# c #d2cec8", "#w c #d2d2d2", ".v c #d3d3d2", "#Q c #d3d3d3", ".m c #d4d3d3", "#6 c #d4d4d4", ".b c #d5d3d1", "#N c #d5d5d5", ".g c #d6d2ce", "#Y c #d6d6d6", "#P c #dadada", "#O c #dcdcdc", ".X c #dfdad4", ".V c #dfdfdf", ".W c #e2e1df", ".w c #e3e3e2", "#a c #e8e7e5", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt.b.c.d.e.fQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQt.g.h.i.j.k.l.mQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt.n.o.p.q.r.s.t.u.vQtQtQtQtQtQtQt", "QtQtQtQtQtQt.w.x.y.z.A.B.C.D.E.F.G.HQtQtQtQtQtQt", "QtQtQtQtQtQt.I.J.K.L.M.N.O.P.Q.R.S.T.U.VQtQtQtQt", "QtQtQtQt.W.X.Y.Z.0.1.2.3.4.5.6.7.8.9#.##QtQtQtQt", "QtQtQt#a#b#c#d#e#f#g.5#h#i.O#j#k#l#m#n#o#pQtQtQt", "QtQtQt#q#r#s#t#u#v#w#x#h#y#z#A#B#C#D#E#F#G#HQtQt", "QtQtQt#I#J#K#L#M#N#O#P#N#Q.4#R#k#y#S#T#U#V.mQtQt", "QtQtQtQtQt#W#X#P#Y#Q#Z#i#y#0#1#2#3#4#5#6QtQtQtQt", "QtQtQtQtQtQt#7#B#8#9a..Pa#aaabacadaeafQtQtQtQtQt", "QtQtQtQtQtQtaeagahaiajakalamanaoapaq.NQtQtQtQtQt", "QtQtQtQtQtQtarasatauavawaxayazaAaBaCaDQtQtQtQtQt", "QtQtQtQtQtQt#5aEaFaGaHaIaJaKaLaMaNaOaPQtQtQtQtQt", "QtQtQtQtQtQtaQaRaSaTaUaV.DaWaXaYaZa0aPQtQtQtQtQt", "QtQtQtQtQtQta1a2a3a4a5aVa6#W.3a7aoa8a9QtQtQtQtQt", "QtQtQtQtQtQtb.b#babbbcbdbebfbgbhbibjbkQtQtQtQtQt", "QtQtQtQtQtQtblbmbnbobpbqbrbsbtbubvbwbxQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtbybzbyQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; /* XPM */ static char *up_xpm[]={ "24 24 67 2", "Qt c None", ".# c #000000", ".a c #2f2f2f", ".J c #3d4e39", ".u c #3e4f39", ".o c #3f5239", ".e c #41533c", "#a c #43543d", ".E c #4c6046", "## c #4d6146", ".D c #4d6246", "#. c #4d6247", ".9 c #5a7257", ".y c #5d7555", ".5 c #5e7656", ".Z c #5e7756", ".4 c #607857", ".R c #607858", ".N c #607958", ".t c #617959", ".Y c #617a59", ".I c #627b59", ".C c #637c5b", ".n c #637d5b", ".Q c #647d5b", ".x c #657e5c", ".s c #657f5c", ".i c #66815e", ".H c #67815e", ".m c #68835f", ".r c #6a8561", ".8 c #71916e", ".7 c #748a72", ".6 c #8db389", ".3 c #93b690", ".d c #96b892", ".X c #99bc97", ".U c #9cbf99", ".P c #9dc19b", ".h c #9fc49d", ".M c #a0c39d", ".G c #a1c69e", ".l c #a1c69f", ".q c #a2c7a0", ".b c #a5b4a4", ".2 c #aecbad", ".1 c #afccae", ".W c #b1ceb0", ".T c #b4d2b3", ".O c #b5d2b4", ".L c #b5d3b4", ".j c #b6d4b5", ".w c #b7d5b6", ".g c #b8d6b7", ".p c #b8d7b7", ".k c #b9d7b8", ".A c #bfd4bf", ".B c #c0d5c0", ".0 c #c0d9bf", ".V c #c5dfc4", ".S c #c6e0c5", ".F c #c7e1c6", ".K c #d0e7d0", ".z c #d6ead6", ".c c #e8f4e6", ".v c #f0feef", ".f c #f1fff0", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQt.a.b.#QtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQt.#.c.d.e.#QtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQt.#.f.g.h.i.e.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.f.j.k.l.m.n.o.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQt.#.f.p.j.k.q.r.s.t.u.#QtQtQtQtQtQtQt", "QtQtQtQtQt.#.v.p.k.w.k.l.r.x.t.y.u.#QtQtQtQtQtQt", "QtQtQtQt.#.z.A.B.k.p.p.l.m.C.D.E.E.E.#QtQtQtQtQt", "QtQtQt.#.#.#.#.#.F.j.j.G.H.I.J.#.#.#.#.#QtQtQtQt", "QtQtQtQtQtQtQt.#.K.j.L.M.s.N.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.F.j.O.P.Q.R.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.S.L.T.U.C.R.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.V.T.W.X.Y.Z.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.0.1.2.3.4.5.J.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.6.7.8.9#.###a.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.#.#.#.#.#.#.#.#QtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; /* XPM */ static char *refresh_xpm[]={ "24 24 126 2", "Qt c None", ".# c #000000", ".d c #0d110c", ".i c #172116", "#7 c #283926", ".y c #2b3a29", "#E c #3a4e37", "#5 c #4d6a49", ".V c #4f6b4c", ".X c #516d4c", ".2 c #51714e", ".Q c #526f4c", "#Q c #557451", ".G c #567453", "#h c #5b7b57", "#4 c #5d8059", "#F c #5e7f5a", "#Z c #5f815a", ".S c #60835b", ".x c #63865f", "#R c #63885e", "#s c #64885f", ".p c #689063", "#2 c #698f63", "#6 c #6a8f64", "#3 c #6b9166", ".6 c #6b9265", "#P c #6b9266", "#Y c #6c9367", ".1 c #6d9568", "#1 c #6e9467", "#X c #6e9668", ".K c #6f9669", ".L c #70976a", ".A c #70986a", "#0 c #70996b", ".B c #71986b", ".M c #71996b", "#W c #71996c", "#U c #72996b", ".C c #729a6b", ".e c #729c6c", "#V c #739a6d", ".N c #739b6d", "#g c #749e6d", "#T c #749e6f", ".D c #759c6d", "#S c #759c70", ".O c #759f6e", ".E c #759f6f", ".W c #769f70", "#D c #76a071", ".F c #76a170", ".P c #77a170", ".J c #78a472", "#a c #79a674", ".Z c #7ba574", "#r c #7ea778", ".I c #7eab77", ".o c #7fa879", "#. c #80a87a", ".4 c #81ab7c", "#O c #88af82", ".j c #88b583", "#i c #8cb087", ".z c #8cb887", "#G c #8faf8b", "## c #90b68b", "#C c #96b991", ".w c #9abc95", ".U c #9ac195", "#H c #9cbe97", ".T c #a5c9a0", "#t c #a6c1a3", ".f c #a6caa1", ".8 c #a7cca2", ".v c #aed5a9", ".H c #afcbac", "#f c #afccab", "#u c #b3d5ae", "#d c #b3d7ae", ".9 c #b5d2b1", "#B c #b5d2b2", ".3 c #b6d3b2", ".R c #b7d2b2", ".Y c #b9d5b4", "#e c #bbd9b8", "#j c #bbe1b6", "#q c #bcd6b9", "#A c #bddcba", "#N c #c2dbbf", ".5 c #c3dbbf", "#z c #c3e3bf", "#p c #c6e3c3", "#b c #c6eac1", ".0 c #c7e0c3", "#I c #c7e0c4", "#M c #c7e1c4", "#y c #c7e6c3", ".7 c #c8efc3", ".b c #cae3c6", "#x c #cae9c5", "#J c #cbe3c6", ".g c #cbe4c7", "#L c #cbe4c8", ".k c #cce5c8", "#K c #cde4c9", ".q c #cde5c9", ".l c #cde6c9", "#v c #cdeac9", ".r c #cfe7ca", ".m c #cfe7cb", "#o c #cfeccb", ".s c #d0e9cc", "#w c #d0ebcb", ".t c #d4ead0", ".u c #d5ecd1", "#n c #d7f0d3", "#k c #daf5d6", "#m c #dcf4d6", "#c c #def7d9", "#l c #e1f7dd", ".h c #effdee", ".a c #f0ffee", ".n c #f3fff2", ".c c #f5fff4", "QtQtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.#QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQt.#.a.#QtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQt.#.#.#.#.b.c.#QtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQt.d.e.f.b.b.g.g.h.#QtQtQtQtQt.#.#QtQtQtQtQt", "QtQt.i.j.b.b.g.g.k.l.m.n.#QtQtQt.#.o.p.#QtQtQtQt", "Qt.#.e.b.g.g.k.q.r.s.t.u.v.#QtQtQt.#.w.x.#QtQtQt", "Qt.y.f.b.z.A.B.C.D.E.F.G.#QtQtQtQtQt.#.H.#QtQtQt", ".#.I.b.J.K.L.M.N.O.P.Q.#QtQtQtQtQtQt.#.R.S.#QtQt", ".#.T.U.K.V.#.#.#.W.X.#QtQtQt.#QtQtQt.#.Y.Z.#QtQt", ".#.0.1.S.#QtQt.#.2.#QtQtQt.#.#QtQtQt.#.3.4.#QtQt", ".#.5.6.#QtQtQt.#.#QtQtQt.#.7.#QtQt.#.8.9#..#QtQt", ".####a.#QtQtQt.#QtQtQt.##b#c.#.#.##d#e#f#g.#QtQt", ".##h#i.#QtQtQtQtQtQt.##j#k#l#m#n#o#p#q#r#s.#QtQt", "Qt.##t.#QtQtQtQtQt.##u#v#w#x#y#z#A#B#C#D#EQtQtQt", "Qt.##F#G.#QtQtQt.##H#I#J.l#K#L#M#N#O#P#Q.#QtQtQt", "QtQt.##R#S.#QtQtQt.##T#U.N#V#W.A#X#Y#Z.#QtQtQtQt", "QtQtQt.#.#QtQtQtQtQt.##0#1#2.p#3#4#5.#QtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQt.#.1#6.#.#.#.#QtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQt#7#P.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQt.#.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt", "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"}; /* XPM */ static char *cancel_xpm[]={ "20 20 8 1", ". c None", "# c #000000", "e c #7b2d34", "f c #8c343c", "b c #9f3c44", "c c #b5444e", "d c #bd5a62", "a c #c46d74", "....................", "....................", "....................", "......##......#.....", ".....#ab#....#c#....", ".....#cc#...#dc#....", "......#cb#.#dce#....", "......#cc##dcf#.....", ".......#ccccb#......", ".......#cccc#.......", "......#dccc#........", ".....#dcccc#........", "....#dcf##cf#.......", "...#acf#.#bc#.......", "...#cf#...#cb#......", "....##....#bc#......", "...........##.......", "....................", "....................", "...................."}; /* XPM */ static char *ok_xpm[]={ "20 20 47 1", ". c None", "a c #000000", "R c #0e0f0d", "# c #10120f", "S c #383c34", "L c #393e35", "I c #3e4339", "D c #40453c", "A c #41473d", "x c #42483e", "M c #4c5247", "E c #4e5549", "P c #4f564a", "Q c #51574b", "K c #52594c", "H c #555d50", "p c #575e51", "q c #585f52", "C c #5b6255", "z c #606859", "m c #616a5b", "k c #636b5c", "r c #687161", "O c #6a7363", "n c #707a69", "w c #727c6a", "s c #798371", "j c #7b8572", "G c #7c8774", "h c #7e8875", "B c #818c79", "l c #838e7a", "y c #8a9580", "N c #8f9b85", "F c #909c87", "J c #929e88", "i c #94a08a", "e c #95a28b", "t c #97a48d", "v c #99a68e", "g c #9ca992", "d c #9eab93", "o c #aab89e", "c c #adbba1", "u c #b2c1a6", "b c #b6c6aa", "f c #d5e7c7", "....................", "...........#######..", "..........abbbcdde#.", "..........#bfgeeeh#.", "..........#bbeeeeh#.", "..........#beeieeh#.", "......#...#bedeeeh#.", ".....#j#..#beeeeeh#.", "....#bk####beeelmn#.", "...#bojpppqmkrstuq#.", "..#bteeeettttvewx#..", ".#bveeeeeeeeeyzA#...", "#bgteeeeeeeeBCD#....", ".#EFeeeeeeeGHI#.....", "..#EJeeeeiGKL#......", "...#MFNGjOPL#.......", "....#QPR####........", ".....#S#............", "......#.............", "...................."}; #endif /* __GTK_EXTRA_ICONS_H__ */ gtkextra-3.2.0/gtkextra/testgtkplot.c0000644000076400001440000004531712603754176014674 00000000000000#include #include #include #include #include "icons.h" #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotbar.h" #include "gtkplotcanvas.h" #include "gtkplotcanvastext.h" #include "gtkplotcanvasline.h" #include "gtkplotcanvasellipse.h" #include "gtkplotcanvasrectangle.h" #include "gtkplotcanvasplot.h" #include "gtkplotcanvaspixmap.h" #include "gtkplotps.h" #include "gtkplotprint.h" #include "gtkplotcairo.h" GdkPixmap *pixmap; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; GtkWidget *active_plot; static void put_child(GtkPlotCanvas *canvas, gdouble x, gdouble y); static void draw_page (GtkPrintOperation *operation, GtkPrintContext *context, gint page_nr, gpointer user_data) { cairo_t *cr; GdkPixmap *pixmap; GtkPlotCanvas *canvas = GTK_PLOT_CANVAS(user_data); cr = gtk_print_context_get_cairo_context (context); double width = gtk_print_context_get_width (context); double height = gtk_print_context_get_height (context); cairo_scale (cr, width/canvas->pixmap_width, height/canvas->pixmap_height); gtk_plot_canvas_export_cairo(canvas, cr); } void test_print(GtkPlotCanvas *canvas, GtkWidget *window) { GtkPrintOperation *operation; GError *error = NULL; operation = gtk_print_operation_new(); g_signal_connect (G_OBJECT (operation), "draw-page", G_CALLBACK (draw_page), canvas); gtk_print_operation_set_n_pages (operation, 1); gtk_print_operation_run (operation, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, GTK_WINDOW (window), &error); if (error) { GtkWidget *dialog; dialog = gtk_message_dialog_new (GTK_WINDOW (window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error->message); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_widget_show (dialog); g_error_free (error); } g_object_unref(operation); } void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gdouble gaussian(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = .65*exp(-.5*pow(x-.5,2)/.02); return y; } /* gint move_item(GtkWidget *widget, GtkPlotCanvasChild *item, gdouble x, gdouble y, gpointer data) { GtkPlotCanvas *canvas = NULL; canvas = GTK_PLOT_CANVAS(widget); if(GTK_IS_PLOT_CANVAS_PLOT(item) && GTK_PLOT_CANVAS_PLOT(item)->pos == GTK_PLOT_CANVAS_PLOT_IN_DATA){ gdouble *array_x = NULL; gdouble *array_y = NULL; gint n; array_x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(item)->data, &n); array_y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(item)->data, &n); printf("MOVING DATA\n"); printf("Active point: %d", GTK_PLOT_CANVAS_PLOT(item)->datapoint); } return TRUE; } */ gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *child, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; gint n = 0; gdouble *x = NULL, *y = NULL; if(GTK_IS_PLOT_CANVAS_TEXT(child)) printf("Item selected: TEXT\n"); if(GTK_IS_PLOT_CANVAS_PIXMAP(child)) printf("Item selected: PIXMAP\n"); if(GTK_IS_PLOT_CANVAS_RECTANGLE(child)) printf("Item selected: RECTANGLE\n"); if(GTK_IS_PLOT_CANVAS_ELLIPSE(child)) printf("Item selected: ELLIPSE\n"); if(GTK_IS_PLOT_CANVAS_LINE(child)) printf("Item selected: LINE\n"); if(GTK_IS_PLOT_CANVAS_PLOT(child)){ switch(GTK_PLOT_CANVAS_PLOT(child)->pos){ case GTK_PLOT_CANVAS_PLOT_IN_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_MARKER: printf("Item selected: MARKER\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_GRADIENT: printf("Item selected: GRADIENT\n"); break; case GTK_PLOT_CANVAS_PLOT_IN_DATA: x = gtk_plot_data_get_x(GTK_PLOT_CANVAS_PLOT(child)->data, &n); y = gtk_plot_data_get_y(GTK_PLOT_CANVAS_PLOT(child)->data, &n); n = GTK_PLOT_CANVAS_PLOT(child)->datapoint; printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS_PLOT(child)->datapoint, x[n], y[n]); break; default: break; } widget_list = plots; active_widget = GTK_WIDGET(GTK_PLOT_CANVAS_PLOT(child)->plot); } return TRUE; } gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); if(widget_list[n] == active_widget){ active_plot = plots[n]; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), G_CALLBACK(activate_plot), data); n++; } return FALSE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*size, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } gboolean my_tick_label(GtkPlotAxis *axis, gdouble *tick_value, gchar *label, gpointer data) { gboolean return_value = FALSE; if(*tick_value == 0.0){ g_snprintf(label, 100, "custom label at 0.0"); return_value = TRUE; } return return_value; } void build_example1(GtkWidget *plot) { GdkColor color; GtkPlotAxis *axis; static gdouble px1[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py1[]={.2, .4, .5, .35, .30, .40}; static gdouble dx1[]={.2, .2, .2, .2, .2, .2}; static gdouble dy1[]={.1, .1, .1, .1, .1, .1}; static gdouble px2[]={0., -0.2, -0.4, -0.6, -0.8, -1.0}; static gdouble py2[]={.2, .4, .5, .35, .30, .40}; static gdouble dx2[]={.2, .2, .2, .2, .2, .2}; static gdouble dy2[]={.1, .1, .1, .1, .1, .1}; /* CUSTOM TICK LABELS */ gtk_plot_axis_use_custom_tick_labels(gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_RIGHT), TRUE); axis = gtk_plot_get_axis(GTK_PLOT(plot), GTK_PLOT_AXIS_RIGHT); g_signal_connect(GTK_OBJECT(axis), "tick_label", G_CALLBACK(my_tick_label), NULL); dataset[0] = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_add_data(GTK_PLOT(plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px1, py1, dx1, dy1, 6); gtk_plot_data_add_marker(dataset[0], 3); /* gtk_plot_data_gradient_set_visible(dataset[0], TRUE); */ gdk_color_parse("red", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_DIAMOND, GTK_PLOT_SYMBOL_EMPTY, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, 0, 1, &color); gtk_plot_data_set_connector(dataset[0], GTK_PLOT_CONNECT_SPLINE); gtk_plot_data_show_yerrbars(dataset[0]); gtk_plot_data_set_legend(dataset[0], "Spline + EY"); dataset[3] = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_add_data(GTK_PLOT(plot), dataset[3]); gtk_widget_show(GTK_WIDGET(dataset[3])); gtk_plot_data_set_points(dataset[3], px2, py2, dx2, dy2, 6); gtk_plot_data_set_symbol(dataset[3], GTK_PLOT_SYMBOL_SQUARE, GTK_PLOT_SYMBOL_OPAQUE, 8, 2, >k_widget_get_style(plot)->black, >k_widget_get_style(plot)->black); gtk_plot_data_set_line_attributes(dataset[3], GTK_PLOT_LINE_SOLID, 0, 0, 4, &color); gtk_plot_data_set_connector(dataset[3], GTK_PLOT_CONNECT_STRAIGHT); gtk_plot_data_set_x_attributes(dataset[3], GTK_PLOT_LINE_SOLID, 0, 0, 0, >k_widget_get_style(plot)->black); gtk_plot_data_set_y_attributes(dataset[3], GTK_PLOT_LINE_SOLID, 0, 0, 0, >k_widget_get_style(plot)->black); gtk_plot_data_set_legend(dataset[3], "Line + Symbol"); gdk_color_parse("blue", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); dataset[1] = gtk_plot_add_function(GTK_PLOT(plot), (GtkPlotFunc)function); gtk_widget_show(GTK_WIDGET(dataset[1])); gtk_plot_data_set_line_attributes(dataset[1], GTK_PLOT_LINE_SOLID, 0, 0, 0, &color); gtk_plot_data_set_legend(dataset[1], "Function Plot"); } void build_example2(GtkWidget *plot) { GdkColor color; static double px2[] = {.1, .2, .3, .4, .5, .6, .7, .8}; static double py2[] = {.012, .067, .24, .5, .65, .5, .24, .067}; static double dx2[] = {.1, .1, .1, .1, .1, .1, .1, .1}; dataset[4] = gtk_plot_add_function(GTK_PLOT(plot), (GtkPlotFunc)gaussian); gtk_widget_show(GTK_WIDGET(dataset[4])); gdk_color_parse("dark green", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_plot_data_set_line_attributes(dataset[4], GTK_PLOT_LINE_DASHED, 0, 0, 2, &color); gtk_plot_data_set_legend(dataset[4], "Gaussian"); gdk_color_parse("blue", &color); gdk_color_alloc(gdk_colormap_get_system(), &color); /* GTK_PLOT(plot)->xscale = GTK_PLOT_SCALE_LOG10; */ dataset[2] = GTK_PLOT_DATA(gtk_plot_bar_new(GTK_ORIENTATION_VERTICAL)); gtk_plot_add_data(GTK_PLOT(plot), dataset[2]); gtk_widget_show(GTK_WIDGET(dataset[2])); gtk_plot_data_set_points(dataset[2], px2, py2, dx2, NULL, 8); gtk_plot_data_set_symbol(dataset[2], GTK_PLOT_SYMBOL_NONE, GTK_PLOT_SYMBOL_OPAQUE, 10, 2, &color, &color); gtk_plot_data_set_line_attributes(dataset[2], GTK_PLOT_LINE_NONE, 0, 0, 1, &color); gtk_plot_data_set_legend(dataset[2], "V Bars"); gtk_plot_set_break(GTK_PLOT(plot), GTK_PLOT_AXIS_Y, 0.7, 0.72, .05, 4, GTK_PLOT_SCALE_LINEAR, .6); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *canvas; GtkPlotCanvasChild *child; GdkColor color; gint page_width, page_height; gfloat scale = 1.; gchar *custom_labels[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; GtkPlotArray *array; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlot Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.0); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); /* gtk_plot_clip_data(GTK_PLOT(active_plot), TRUE); */ gtk_plot_set_range(GTK_PLOT(active_plot), -1., 1., -1., 1.4); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_BOTTOM), 15, 3); gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_X, 1., 1); gtk_plot_set_ticks(GTK_PLOT(active_plot), GTK_PLOT_AXIS_Y, 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_x0_set_visible(GTK_PLOT(active_plot), TRUE); gtk_plot_y0_set_visible(GTK_PLOT(active_plot), TRUE); gtk_plot_axis_set_labels_suffix(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_LEFT), "%"); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .65, .31); gtk_widget_show(active_plot); GTK_PLOT_CANVAS_PLOT(child)->flags |= GTK_PLOT_CANVAS_PLOT_SELECT_POINT; GTK_PLOT_CANVAS_PLOT(child)->flags |= GTK_PLOT_CANVAS_PLOT_DND_POINT; build_example1(active_plot); active_plot = new_layer(canvas); gdk_color_parse("light yellow", &color); gdk_color_alloc(gtk_widget_get_colormap(active_plot), &color); gtk_plot_set_background(GTK_PLOT(active_plot), &color); gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_legends_set_attributes(GTK_PLOT(active_plot), NULL, 0, NULL, &color); gtk_plot_set_range(GTK_PLOT(active_plot), 0. , 1., 0., .85); /* gtk_plot_set_range(GTK_PLOT(active_plot), 0.1 , 100., 0., .85); gtk_plot_set_xscale(GTK_PLOT(active_plot), GTK_PLOT_SCALE_LOG10); */ gtk_plot_axis_set_labels_numbers(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_LEFT), GTK_PLOT_LABEL_FLOAT, 2); gtk_plot_axis_set_labels_numbers(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), GTK_PLOT_LABEL_FLOAT, 2); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_grids_set_visible(GTK_PLOT(active_plot), TRUE, TRUE, TRUE, TRUE); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT)); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 2, 3); gtk_plot_legends_move(GTK_PLOT(active_plot), .58, .05); gtk_widget_show(active_plot); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .4, .65, .65); gtk_widget_show(active_plot); build_example2(active_plot); g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); /* g_signal_connect(GTK_OBJECT(canvas), "move_item", (void ) move_item, NULL); */ child = gtk_plot_canvas_text_new("Times-BoldItalic", 16, 0, NULL, NULL, TRUE, GTK_JUSTIFY_CENTER, "DnD titles, legends and plots"); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .40, .020, .0, .0); child = gtk_plot_canvas_text_new("Times-Roman", 16, 0, NULL, NULL, TRUE, GTK_JUSTIFY_CENTER, "You can use \\ssubscripts\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\N\\Ssuperscripts"); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .40, .720, .0, .0); child = gtk_plot_canvas_text_new("Times-Roman", 12, 0, NULL, NULL, TRUE, GTK_JUSTIFY_CENTER, "Format text mixing \\Bbold \\N\\i, italics, \\ggreek \\4\\N and \\+different fonts"); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .40, .765, .0, .0); gtk_plot_text_set_border(>K_PLOT_CANVAS_TEXT(child)->text, GTK_PLOT_BORDER_SHADOW, 2, 0, 2); array = GTK_PLOT_ARRAY(gtk_plot_array_new(NULL, custom_labels, 12, G_TYPE_STRING, FALSE)); gtk_plot_axis_set_tick_labels(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_BOTTOM), array); gtk_plot_axis_use_custom_tick_labels(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_BOTTOM), TRUE); put_child(GTK_PLOT_CANVAS(canvas), .5, .5); gtk_widget_show_all(window1); //test_print(GTK_PLOT_CANVAS(canvas),window1); /* gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demoplot.ps", GTK_PLOT_PORTRAIT, FALSE, GTK_PLOT_LETTER); */ /* gtk_plot_canvas_export_ps_with_size(GTK_PLOT_CANVAS(canvas), "demoplot.ps", GTK_PLOT_PORTRAIT, TRUE, GTK_PLOT_PSPOINTS, 300, 400); */ gtk_main(); return(0); } static void put_child(GtkPlotCanvas *canvas, gdouble x, gdouble y) { GdkColormap *colormap; GtkPlotCanvasChild *child; GdkBitmap *mask; colormap = gdk_colormap_get_system(); pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, colormap, &mask, NULL, plot_icon2); child = gtk_plot_canvas_pixmap_new(pixmap, mask); gtk_plot_canvas_put_child(canvas, child, x, y, x+.05, y+.05); gdk_pixmap_unref(pixmap); gdk_bitmap_unref(mask); } gtkextra-3.2.0/gtkextra/testboxes.c0000644000076400001440000002020012603754176014310 00000000000000 #include #include #include #include #include "gtkplot.h" #include "gtkplotdata.h" #include "gtkplotbox.h" #include "gtkplotcanvas.h" #include "gtkplotcanvasplot.h" #include "gtkplotps.h" #include "gtkplotprint.h" GdkPixmap *pixmap=NULL; GtkWidget **plots; GtkWidget **buttons; GtkPlotData *dataset[5]; gint nlayers = 0; void quit () { gtk_main_quit(); } gdouble function(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = (-.5+.3*sin(3.*x)*sin(50.*x)); /* y = 100*pow(x,2); y = 1./(10*x); */ return y; } gdouble gaussian(GtkPlot *plot, GtkPlotData *data, gdouble x, gboolean *err) { gdouble y; *err = FALSE; y = .65*exp(-.5*pow(x-.5,2)/.02); return y; } /* gint select_item(GtkWidget *widget, GdkEvent *event, GtkPlotCanvasChild *item, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; switch(item->type){ case GTK_PLOT_CANVAS_TEXT: printf("Item selected: TEXT\n"); break; case GTK_PLOT_CANVAS_TITLE: printf("Item selected: TITLE\n"); break; case GTK_PLOT_CANVAS_LEGENDS: printf("Item selected: LEGENDS\n"); break; case GTK_PLOT_CANVAS_PLOT: printf("Item selected: PLOT\n"); break; case GTK_PLOT_CANVAS_AXIS: printf("Item selected: AXIS\n"); break; case GTK_PLOT_CANVAS_DATA: printf("Item selected: DATA\n"); printf("Active point: %d -> %f %f\n", GTK_PLOT_CANVAS(widget)->active_point, GTK_PLOT_CANVAS(widget)->active_x, GTK_PLOT_CANVAS(widget)->active_y); break; case GTK_PLOT_CANVAS_NONE: printf("Item selected: NONE\n"); break; case GTK_PLOT_CANVAS_CUSTOM: printf("This is a custom child. Isn't it neat?\n"); break; default: ; } canvas = GTK_WIDGET(widget); widget_list = plots; active_widget = GTK_WIDGET(gtk_plot_canvas_get_active_plot(GTK_PLOT_CANVAS(widget))); return TRUE; } */ gint activate_plot(GtkWidget *widget, gpointer data) { GtkWidget **widget_list = NULL; GtkWidget *active_widget = NULL; GtkWidget *canvas = NULL; gint n = 0; canvas = GTK_WIDGET(data); widget_list = buttons; active_widget = widget; while(n < nlayers) { g_signal_handlers_block_by_func(GTK_OBJECT(buttons[n]), (void *)activate_plot, data); if(widget_list[n] == active_widget){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), TRUE); }else{ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[n]), FALSE); } g_signal_handlers_unblock_by_func(GTK_OBJECT(buttons[n]), (void *)activate_plot, data); n++; } return TRUE; } GtkWidget * new_layer(GtkWidget *canvas) { gchar label[10]; GtkRequisition req; gint size; nlayers++; buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *)); plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *)); sprintf(label, "%d", nlayers); buttons[nlayers-1] = gtk_toggle_button_new_with_label(label); /* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE); */ gtk_widget_size_request(buttons[nlayers-1], &req); size = MAX(req.width,req.height); gtk_widget_set_size_request(buttons[nlayers-1], size, size); gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0); gtk_widget_show(buttons[nlayers-1]); g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled", (void *) activate_plot, canvas); plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25); gtk_widget_show(plots[nlayers-1]); activate_plot(buttons[nlayers-1],canvas); return plots[nlayers-1]; } void build_example1(GtkWidget *active_plot) { GdkColor color1, color2; static gdouble px[]={0., 0.2, 0.4, 0.6, 0.8, 1.0}; static gdouble py[]={.243,.045,.075,.213,.05,.124}; static gdouble pz[]={.56, .12, .123, .5, .2, .21}; static gdouble dx[]={.10, .18, .17, .16, .082, .34}; static gdouble dy[]={.1,.1,.1,.1,.1,.1}; dataset[0] = GTK_PLOT_DATA(gtk_plot_box_new(GTK_ORIENTATION_VERTICAL)); /* dataset[0] = GTK_PLOT_DATA(gtk_plot_data_new()); gtk_plot_autoscale(GTK_PLOT(active_plot)); */ gtk_plot_add_data(GTK_PLOT(active_plot), dataset[0]); gtk_widget_show(GTK_WIDGET(dataset[0])); gtk_plot_data_set_points(dataset[0], px, py, dx, dy, 6); gtk_plot_data_set_z(dataset[0], pz); gtk_plot_data_show_zerrbars(dataset[0]); gdk_color_parse("red", &color1); gdk_color_alloc(gdk_colormap_get_system(), &color1); gdk_color_parse("yellow", &color2); gdk_color_alloc(gdk_colormap_get_system(), &color2); gtk_plot_data_set_symbol(dataset[0], GTK_PLOT_SYMBOL_CIRCLE, GTK_PLOT_SYMBOL_FILLED, 10, 2, &color2, &color1); gtk_plot_data_set_line_attributes(dataset[0], GTK_PLOT_LINE_NONE, 0, 0, 1, &color1); /* gtk_plot_data_set_x_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, &active_plot->style->black); gtk_plot_data_set_y_attributes(dataset[0], GTK_PLOT_LINE_SOLID, 0, &active_plot->style->black); */ gtk_plot_data_set_legend(dataset[0], "Boxes"); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *vbox1; GtkWidget *scrollw1; GtkWidget *active_plot; GtkWidget *canvas; GtkPlotCanvasChild *child; gint page_width, page_height; gfloat scale = 1.; page_width = GTK_PLOT_LETTER_W * scale; page_height = GTK_PLOT_LETTER_H * scale; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkPlotBox Demo"); gtk_widget_set_size_request(window1,550,650); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", (void *)quit, NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0); gtk_widget_show(scrollw1); canvas = gtk_plot_canvas_new(page_width, page_height, 1.); GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas), GTK_PLOT_CANVAS_DND_FLAGS); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas); /* gdk_color_parse("light blue", &color); gdk_color_alloc(gtk_widget_get_colormap(canvas), &color); gtk_plot_canvas_set_background(GTK_PLOT_CANVAS(canvas), &color); */ gtk_widget_show(canvas); active_plot = new_layer(canvas); gtk_plot_set_range(GTK_PLOT(active_plot), -1. ,1., -1., 1.4); gtk_plot_legends_move(GTK_PLOT(active_plot), .500, .05); gtk_plot_set_legends_border(GTK_PLOT(active_plot), 0, 0); gtk_plot_axis_hide_title(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP)); gtk_plot_axis_show_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 3), 15, 3); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 0), 1., 1); gtk_plot_axis_set_ticks(gtk_plot_get_axis(GTK_PLOT(active_plot), 1), 1., 1); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_TOP), TRUE); gtk_plot_axis_set_visible(gtk_plot_get_axis(GTK_PLOT(active_plot), GTK_PLOT_AXIS_RIGHT), TRUE); gtk_plot_x0_set_visible(GTK_PLOT(active_plot), TRUE); gtk_plot_y0_set_visible(GTK_PLOT(active_plot), TRUE); child = gtk_plot_canvas_plot_new(GTK_PLOT(active_plot)); gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), child, .15, .06, .65, .31); gtk_widget_show(active_plot); build_example1(active_plot); /* g_signal_connect(GTK_OBJECT(canvas), "select_item", (void *) select_item, NULL); */ gtk_widget_show(window1); gtk_plot_canvas_export_ps(GTK_PLOT_CANVAS(canvas), "demoboxes.ps", 0, 0, GTK_PLOT_LETTER); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkplotpixmap.c0000644000076400001440000003103012603754176015176 00000000000000/* gtkplotpixmap - pixmap plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /** * SECTION: gtkplotpixmap * @short_description: Pixmap plots widget. * * FIXME:: Need long description. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotpixmap.h" #include "gtkplotpc.h" #include "gtkplotps.h" #include "gtkpsfont.h" #define P_(string) string enum { ARG_0, ARG_PIXMAP, ARG_MASK, }; static void gtk_plot_pixmap_class_init (GtkPlotPixmapClass *klass); static void gtk_plot_pixmap_init (GtkPlotPixmap *data); static void gtk_plot_pixmap_destroy (GtkObject *object); static void gtk_plot_pixmap_draw_symbol (GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da); static void gtk_plot_pixmap_draw_legend (GtkPlotData *data, gint x, gint y); static void gtk_plot_pixmap_get_legend_size (GtkPlotData *data, gint *width, gint *height); static void gtk_plot_pixmap_clone (GtkPlotData *data, GtkPlotData *copy); static void gtk_plot_pixmap_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_pixmap_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); extern gint roundint (gdouble x); static GtkPlotDataClass *parent_class = NULL; GType gtk_plot_pixmap_get_type (void) { static GType data_type = 0; if (!data_type) { data_type = g_type_register_static_simple ( gtk_plot_data_get_type(), "GtkPlotPixmap", sizeof (GtkPlotPixmapClass), (GClassInitFunc) gtk_plot_pixmap_class_init, sizeof (GtkPlotPixmap), (GInstanceInitFunc) gtk_plot_pixmap_init, 0); } return data_type; } static void gtk_plot_pixmap_class_init (GtkPlotPixmapClass *klass) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkPlotDataClass *data_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); parent_class = g_type_class_ref (gtk_plot_data_get_type ()); object_class = (GtkObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; data_class = (GtkPlotDataClass *) klass; data_class->clone = gtk_plot_pixmap_clone; data_class->draw_legend = gtk_plot_pixmap_draw_legend; data_class->get_legend_size = gtk_plot_pixmap_get_legend_size; data_class->draw_symbol = gtk_plot_pixmap_draw_symbol; object_class->destroy = gtk_plot_pixmap_destroy; gobject_class->get_property = gtk_plot_pixmap_get_property; gobject_class->set_property = gtk_plot_pixmap_set_property; g_object_class_install_property (gobject_class, ARG_PIXMAP, g_param_spec_pointer ("pixmap", P_("Pixmap"), P_("Pixmap"), G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, ARG_MASK, g_param_spec_pointer ("mask_bitmap", P_("Mask"), P_("Mask"), G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_pixmap_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotPixmap *pixmap = GTK_PLOT_PIXMAP (object); switch(prop_id){ case ARG_PIXMAP: g_value_set_pointer(value, pixmap->pixmap); break; case ARG_MASK: g_value_set_pointer(value, pixmap->mask); break; } } static void gtk_plot_pixmap_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotPixmap *pixmap = GTK_PLOT_PIXMAP (object); switch(prop_id){ case ARG_PIXMAP: if(pixmap->pixmap) gdk_pixmap_unref(pixmap->pixmap); pixmap->pixmap = (GdkPixmap *)g_value_get_pointer(value); if(pixmap->pixmap) gdk_pixmap_ref(pixmap->pixmap); break; case ARG_MASK: if(pixmap->mask) gdk_bitmap_unref(pixmap->mask); pixmap->mask = (GdkBitmap *)g_value_get_pointer(value); if(pixmap->mask) gdk_bitmap_ref(pixmap->mask); break; } } static void gtk_plot_pixmap_init (GtkPlotPixmap *dataset) { dataset->pixmap = NULL; } /** * gtk_plot_pixmap_new: * @pixmap: a GdkPixmap. * @mask: * * Return value: a new GtkWidget. */ GtkWidget* gtk_plot_pixmap_new (GdkPixmap *pixmap, GdkBitmap *mask) { GtkWidget *widget; widget = gtk_widget_new (gtk_plot_pixmap_get_type (), NULL); gtk_plot_pixmap_construct(GTK_PLOT_PIXMAP(widget), pixmap, mask); return (widget); } /** * gtk_plot_pixmap_construct: * @data: * @pixmap: a GdkPixmap * @mask: * * */ void gtk_plot_pixmap_construct(GtkPlotPixmap *data, GdkPixmap *pixmap, GdkBitmap *mask) { data->pixmap = pixmap; data->mask = mask; if(pixmap) gdk_pixmap_ref(pixmap); if(mask) gdk_bitmap_ref(mask); } static void gtk_plot_pixmap_destroy(GtkObject *object) { GtkPlotPixmap *pixmap = GTK_PLOT_PIXMAP(object); if(pixmap->pixmap) gdk_pixmap_unref(pixmap->pixmap); if(pixmap->mask) gdk_bitmap_unref(pixmap->mask); pixmap->pixmap = NULL; pixmap->mask = NULL; } static void gtk_plot_pixmap_clone(GtkPlotData *data, GtkPlotData *copy) { GTK_PLOT_DATA_CLASS(parent_class)->clone(data, copy); GTK_PLOT_PIXMAP(copy)->pixmap = GTK_PLOT_PIXMAP(data)->pixmap; gdk_pixmap_ref(GTK_PLOT_PIXMAP(data)->pixmap); GTK_PLOT_PIXMAP(copy)->mask = GTK_PLOT_PIXMAP(data)->mask; gdk_bitmap_ref(GTK_PLOT_PIXMAP(data)->mask); } static void gtk_plot_pixmap_draw_symbol(GtkPlotData *data, gdouble x, gdouble y, gdouble z, gdouble a, gdouble dx, gdouble dy, gdouble dz, gdouble da) { GtkPlot *plot = NULL; GtkPlotPixmap *image; gdouble scale_x, scale_y; gdouble px, py, pz; gint width, height; image = GTK_PLOT_PIXMAP(data); if(!image->pixmap) return; plot = data->plot; scale_x = scale_y = data->plot->magnification;; gdk_window_get_size(image->pixmap, &width, &height); width = roundint(scale_x * width); height = roundint(scale_y * height); if(GTK_IS_PLOT3D(plot)) gtk_plot3d_get_pixel(GTK_PLOT3D(plot), x, y, z, &px, &py, &pz); else gtk_plot_get_pixel(plot, x, y, &px, &py); /* gtk_plot_pc_clip_mask(data->plot->pc, px - width / 2., py - height / 2., image->mask); */ gtk_plot_pc_draw_pixmap(data->plot->pc, image->pixmap, image->mask, 0, 0, px - width / 2., py - height / 2., width, height, scale_x, scale_y); /* gtk_plot_pc_clip_mask(data->plot->pc, px - width / 2., py - height / 2., NULL); */ } static void gtk_plot_pixmap_draw_legend(GtkPlotData *data, gint x, gint y) { GtkPlotPixmap *pixmap; GtkPlot *plot = NULL; GtkPlotText legend; GdkRectangle area; gint lascent, ldescent, lheight, lwidth; gdouble m; gint width, height; GtkAllocation allocation; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); pixmap = GTK_PLOT_PIXMAP(data); plot = data->plot; gtk_widget_get_allocation(GTK_WIDGET(plot), &allocation); area.x = allocation.x; area.y = allocation.y; area.width = allocation.width; area.height = allocation.height; m = plot->magnification; legend = plot->legends_attr; gdk_window_get_size(pixmap->pixmap, &width, &height); width = roundint(m * width); height = roundint(m * height); if(data->legend) legend.text = data->legend; else legend.text = ""; legend.x = (gdouble)(area.x + x); legend.y = (gdouble)(area.y + y); /* gtk_plot_pc_clip_mask(data->plot->pc, legend.x, legend.y, pixmap->mask); */ gtk_plot_pc_draw_pixmap(data->plot->pc, pixmap->pixmap, pixmap->mask, 0, 0, legend.x, legend.y, width, height, m, m); /* gtk_plot_pc_clip_mask(data->plot->pc, legend.x, legend.y, NULL); */ gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); legend.x = (gdouble)(area.x + x + width + roundint(4*m)) / (gdouble)area.width; legend.y = (gdouble)(area.y + y + MAX(lheight, height) - lascent / 2) / (gdouble)area.height; gtk_plot_draw_text(plot, legend); } static void gtk_plot_pixmap_get_legend_size(GtkPlotData *data, gint *width, gint *height) { GtkPlotPixmap *pixmap; GtkPlot *plot = NULL; GtkPlotText legend; gint lascent, ldescent, lheight, lwidth; gint pwidth, pheight; gdouble m; g_return_if_fail(data->plot != NULL); g_return_if_fail(GTK_IS_PLOT(data->plot)); pixmap = GTK_PLOT_PIXMAP(data); plot = data->plot; m = plot->magnification; legend = plot->legends_attr; if(data->legend) legend.text = data->legend; else legend.text = ""; gdk_window_get_size(pixmap->pixmap, &pwidth, &pheight); pwidth = roundint(m * pwidth); pheight = roundint(m * pheight); gtk_plot_text_get_size(legend.text, legend.angle, legend.font, roundint(legend.height * m), &lwidth, &lheight, &lascent, &ldescent); *width = lwidth + pwidth + roundint(12 * m); *height = MAX(lascent + ldescent, pheight); } /****************************************************** * Public methods ******************************************************/ /** * gtk_plot_pixmap_get_pixmap: * @pixmap: a #GdkPlotPixmap * * Get pixmap from #GtkPlotPixmap. * * Return value: (transfer none) the #GdkPixmap */ GdkPixmap * gtk_plot_pixmap_get_pixmap (GtkPlotPixmap *pixmap) { return(pixmap->pixmap); } /** * gtk_plot_pixmap_get_mask: * @pixmap: a #GdkPlotPixmap * * Get mask bitmap from #GtkPlotPixmap. * * Return value: (transfer none) the #GdkBitmap */ GdkBitmap * gtk_plot_pixmap_get_mask (GtkPlotPixmap *pixmap) { return(pixmap->mask); } gtkextra-3.2.0/gtkextra/testgtkiconlist.c0000644000076400001440000000635012603754176015534 00000000000000#include #include #include #include #include "gtkiconlist.h" #include "icons.h" void quit () { gtk_main_quit(); } void clear(GtkWidget *widget, gpointer data) { gtk_icon_list_clear(GTK_ICON_LIST(widget)); } int main(int argc, char *argv[]){ GtkWidget *window1; GtkWidget *notebook; GtkWidget *vbox1; GtkWidget *hbox1; GtkWidget *table; GtkWidget *label1; GtkWidget *label2; GtkWidget *scrollw1; GtkWidget *scrollw2; GtkWidget *iconlist1; GtkWidget *iconlist2; GdkColor color; GtkIconListItem *item; gchar label[10]; gint i; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkIconList Demo"); gtk_widget_set_size_request(window1,400,400); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); hbox1=gtk_hbox_new(FALSE,0); gtk_box_pack_start(GTK_BOX(vbox1), hbox1, TRUE, TRUE, 0); gtk_widget_show(hbox1); table = gtk_table_new(4, 2, FALSE); gtk_box_pack_start(GTK_BOX(hbox1), table, FALSE, FALSE, 0); gtk_widget_show(table); notebook = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(hbox1),notebook, TRUE, TRUE,0); gtk_widget_show(notebook); scrollw1=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw1),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1), GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC); label1 = gtk_label_new("Worksheets"); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrollw1, label1); gtk_widget_show(scrollw1); scrollw2=gtk_scrolled_window_new(NULL, NULL); gtk_container_border_width(GTK_CONTAINER(scrollw2),0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw2), GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC); label2 = gtk_label_new("Plots"); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), scrollw2, label2); gtk_widget_show(scrollw2); iconlist1 = gtk_icon_list_new(48, GTK_ICON_LIST_TEXT_BELOW); gtk_icon_list_set_selection_mode(GTK_ICON_LIST(iconlist1), GTK_SELECTION_SINGLE); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1),iconlist1); for(i=0; i<20; i++){ sprintf(label,"Data %d",i); gtk_icon_list_add_from_data(GTK_ICON_LIST(iconlist1), sheet_icon2, label, NULL); } iconlist2 = gtk_icon_list_new(48, GTK_ICON_LIST_TEXT_RIGHT); gtk_icon_list_set_selection_mode(GTK_ICON_LIST(iconlist2), GTK_SELECTION_MULTIPLE); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw2),iconlist2); for(i=0; i<20; i++){ GtkIconListItem *new_item; sprintf(label,"Plot %d",i); new_item = gtk_icon_list_add_from_data(GTK_ICON_LIST(iconlist2), plot_icon2, label, NULL); if(i==0) item = new_item; } gdk_color_parse("light blue",&color); gdk_color_alloc(gdk_colormap_get_system(), &color); gtk_icon_list_set_background(GTK_ICON_LIST(iconlist1), &color); gtk_widget_show(iconlist1); gtk_widget_show(iconlist2); gtk_icon_list_set_active_icon(GTK_ICON_LIST(iconlist2), item); gtk_widget_show(window1); /* g_signal_connect(GTK_OBJECT(iconlist),"button_press_event", clear, NULL); */ gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/testgtkfont.c0000644000076400001440000000410012603754176014645 00000000000000#include #include #include #include #include #include #include "gtkfontcombo.h" #define PREVIEW_TEXT "ABCDEFGHI abcdefghi 0123456789" void quit () { gtk_main_quit(); } void new_font(GtkFontCombo *font_combo, gpointer data) { GtkWidget *preview_entry; GtkStyle *style, *previous_style; const gchar *text; preview_entry = GTK_WIDGET(data); previous_style = gtk_widget_get_style(preview_entry); style = gtk_style_copy (previous_style); pango_font_description_free(style->font_desc); style->font_desc = gtk_font_combo_get_font_description(font_combo); gtk_widget_set_style(GTK_WIDGET(preview_entry), style); gtk_style_unref(style); printf("NEW FONT %s\n",pango_font_description_to_string(style->font_desc)); text = gtk_entry_get_text(GTK_ENTRY(preview_entry)); if (strlen(text) == 0) gtk_entry_set_text(GTK_ENTRY(preview_entry), PREVIEW_TEXT); gtk_entry_set_position(GTK_ENTRY(preview_entry), 0); } int main(int argc, char *argv[]) { GtkWidget *window1; GtkWidget *vbox1; GtkWidget *font_combo; GtkWidget *preview_entry; gtk_init(&argc,&argv); window1=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window1), "GtkFontCombo Demo"); gtk_container_border_width(GTK_CONTAINER(window1),0); g_signal_connect (GTK_OBJECT (window1), "destroy", G_CALLBACK (quit), NULL); vbox1=gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(window1),vbox1); gtk_widget_show(vbox1); font_combo = gtk_font_combo_new(); gtk_box_pack_start(GTK_BOX(vbox1),font_combo, FALSE, FALSE, 0); gtk_widget_show(font_combo); preview_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(vbox1),preview_entry, TRUE, TRUE,0); gtk_widget_show(preview_entry); gtk_entry_set_text(GTK_ENTRY(preview_entry), PREVIEW_TEXT); gtk_widget_show(window1); new_font(GTK_FONT_COMBO(font_combo), preview_entry); /*********** SIGNALS ************/ g_signal_connect(GTK_OBJECT(font_combo), "changed", G_CALLBACK(new_font), preview_entry); gtk_main(); return(0); } gtkextra-3.2.0/gtkextra/gtkplotarray.c0000644000076400001440000004346712603754176015037 00000000000000/* gtkplotarray - array plots widget for gtk+ * Copyright 1999-2001 Adrian E. Feiguin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gtkplot.h" #include "gtkplot3d.h" #include "gtkplotdata.h" #include "gtkplotarray.h" #include "gtkpsfont.h" #define P_(string) string static void gtk_plot_array_class_init (GtkPlotArrayClass *klass); static void gtk_plot_array_init (GtkPlotArray *array); static void gtk_plot_array_finalize (GObject *object); static void gtk_plot_array_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gtk_plot_array_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void gtk_plot_array_list_class_init (GtkPlotArrayListClass *klass); static void gtk_plot_array_list_init (GtkPlotArrayList *array_list); static void gtk_plot_array_list_finalize (GObject *object); static GObjectClass *array_parent_class = NULL; static GObjectClass *array_list_parent_class = NULL; enum { PROP_0, PROP_NAME, PROP_LABEL, PROP_DESCRIPTION, PROP_TYPE, PROP_SIZE, PROP_DATA, PROP_SCALE, PROP_REQUIRED, PROP_INDEPENDENT, PROP_OWN, }; GType gtk_plot_array_get_type (void) { static GType array_type = 0; if (!array_type) { static const GTypeInfo array_info = { sizeof (GtkPlotArrayClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) gtk_plot_array_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (GtkPlotArray), 0, /* n_preallocs */ (GInstanceInitFunc) gtk_plot_array_init, NULL, }; array_type = g_type_register_static (G_TYPE_OBJECT, "GtkPlotArray", &array_info, 0); } return array_type; } static void gtk_plot_array_class_init (GtkPlotArrayClass *klass) { GtkPlotArrayClass *array_class; GObjectClass *gobject_class = G_OBJECT_CLASS(klass); array_parent_class = g_type_class_peek_parent (klass); array_class = (GtkPlotArrayClass *) klass; gobject_class->finalize = gtk_plot_array_finalize; gobject_class->set_property = gtk_plot_array_set_property; gobject_class->get_property = gtk_plot_array_get_property; g_object_class_install_property (gobject_class, PROP_NAME, g_param_spec_string ("name", P_("Name"), P_("Name"), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_LABEL, g_param_spec_string ("label", P_("Label"), P_("Label"), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_DESCRIPTION, g_param_spec_string ("description", P_("Description"), P_("Description"), NULL, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_TYPE, g_param_spec_int ("type", P_("Type"), P_("Type"), 0,G_MAXINT, 0, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_SIZE, g_param_spec_int ("size", P_("Size"), P_("Size"), 0, G_MAXINT, 0, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_OWN, g_param_spec_boolean ("own_data", P_("Own Data"), P_("Specifies if data should be freed when the array is destroyed"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_REQUIRED, g_param_spec_boolean ("required", P_("Required"), P_("Required"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_INDEPENDENT, g_param_spec_boolean ("independent", P_("Independent"), P_("Independent"), FALSE, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_SCALE, g_param_spec_double ("scale", P_("Scale"), P_("Scale"), 0, G_MAXDOUBLE, 1.0, G_PARAM_READABLE|G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_DATA, g_param_spec_pointer ("array_data", P_("Data"), P_("Data"), G_PARAM_READABLE|G_PARAM_WRITABLE)); } static void gtk_plot_array_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkPlotArray *data; data = GTK_PLOT_ARRAY (object); switch (prop_id) { case PROP_NAME: if(data->name) g_free(data->name); data->name = g_strdup(g_value_get_string(value)); break; case PROP_LABEL: if(data->label) g_free(data->label); data->label = g_strdup(g_value_get_string(value)); break; case PROP_DESCRIPTION: if(data->description) g_free(data->description); data->description = g_strdup(g_value_get_string(value)); break; case PROP_TYPE: data->type = g_value_get_int(value); break; case PROP_SIZE: data->size = g_value_get_int(value); break; case PROP_OWN: data->own_data = g_value_get_boolean(value); break; case PROP_REQUIRED: data->required = g_value_get_boolean(value); break; case PROP_INDEPENDENT: data->independent = g_value_get_boolean(value); break; case PROP_SCALE: data->scale = g_value_get_double(value); break; case PROP_DATA: data->data = *((GtkPlotArrayArg *)g_value_get_pointer(value)); break; } } static void gtk_plot_array_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GtkPlotArray *data; data = GTK_PLOT_ARRAY (object); switch (prop_id) { case PROP_NAME: g_value_set_string(value, data->name); break; case PROP_LABEL: g_value_set_string(value, data->label); break; case PROP_DESCRIPTION: g_value_set_string(value, data->description); break; case PROP_TYPE: g_value_set_int(value, data->type); break; case PROP_SIZE: g_value_set_int(value, data->size); break; case PROP_OWN: g_value_set_boolean(value, data->own_data); break; case PROP_REQUIRED: g_value_set_boolean(value, data->required); break; case PROP_INDEPENDENT: g_value_set_boolean(value, data->independent); break; case PROP_SCALE: g_value_set_double(value, data->scale); break; case PROP_DATA: g_value_set_pointer(value, &data->data); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void gtk_plot_array_init (GtkPlotArray *array) { array->name = NULL; array->label = NULL; array->description = NULL; array->type = G_TYPE_DOUBLE; array->own_data = FALSE; array->required = FALSE; array->independent = FALSE; array->size = 0; array->scale = 1.; } GObject* gtk_plot_array_new (const gchar *name, gpointer data, gint size, GType type, gboolean own_data) { GObject *object; object = g_object_new (gtk_plot_array_get_type (), NULL); GTK_PLOT_ARRAY(object)->type = type; GTK_PLOT_ARRAY(object)->own_data = own_data; GTK_PLOT_ARRAY(object)->name = g_strdup(name); GTK_PLOT_ARRAY(object)->label = g_strdup(name); GTK_PLOT_ARRAY(object)->description = NULL; GTK_PLOT_ARRAY(object)->size = size; gtk_plot_array_set(GTK_PLOT_ARRAY(object), data, size, type); return (object); } static void gtk_plot_array_finalize(GObject *object) { GtkPlotArray *array = GTK_PLOT_ARRAY(object); if(array->name) g_free(array->name); array->name = NULL; if(array->label) g_free(array->label); array->label = NULL; if(array->description) g_free(array->description); array->description = NULL; if(array->own_data) gtk_plot_array_free(array); array->size = 0; } void gtk_plot_array_set_label(GtkPlotArray *array, const gchar *label) { if(array->label) g_free(array->label); array->label = NULL; if(label) array->label = g_strdup(label); } void gtk_plot_array_set_description(GtkPlotArray *array, const gchar *description) { if(array->description) g_free(array->description); array->description = NULL; if(description) array->description = g_strdup(description); } void gtk_plot_array_set_scale(GtkPlotArray *array, gdouble scale) { array->scale = scale; } void gtk_plot_array_set_independent(GtkPlotArray *array, gboolean independent) { array->independent = independent; } void gtk_plot_array_set_required(GtkPlotArray *array, gboolean required) { array->required = required; } void gtk_plot_array_set(GtkPlotArray *array, gpointer data, gint size, GType type) { if(array->own_data) gtk_plot_array_free(array); array->type = type; array->size = size; switch(type){ case G_TYPE_DOUBLE: array->data.data_double = (gdouble *)data; break; case G_TYPE_FLOAT: array->data.data_float = (gfloat *)data; break; case G_TYPE_INT: array->data.data_int = (gint *)data; break; case G_TYPE_BOOLEAN: array->data.data_bool = (gboolean *)data; break; case G_TYPE_STRING: array->data.data_string = (gchar **)data; break; default: break; } } void gtk_plot_array_free(GtkPlotArray *array) { gint i = 0; switch(array->type){ case G_TYPE_DOUBLE: g_free(array->data.data_double); array->data.data_double = NULL; break; case G_TYPE_FLOAT: g_free(array->data.data_float); array->data.data_float = NULL; break; case G_TYPE_INT: g_free(array->data.data_int); array->data.data_int = NULL; break; case G_TYPE_BOOLEAN: g_free(array->data.data_bool); array->data.data_bool = NULL; break; case G_TYPE_STRING: for(i = 0; i < array->size; i++) if(array->data.data_string && array->data.data_string[i]) g_free(array->data.data_string[i]); g_free(array->data.data_string); array->data.data_string = NULL; break; default: break; } } gint gtk_plot_array_get_size(GtkPlotArray *array) { return array->size; } gdouble gtk_plot_array_get_scale(GtkPlotArray *array) { return array->scale; } gboolean gtk_plot_array_required(GtkPlotArray *array) { return array->required; } gboolean gtk_plot_array_independent(GtkPlotArray *array) { return array->independent; } GType gtk_plot_array_get_data_type(GtkPlotArray *array) { return array->type; } const gchar * gtk_plot_array_get_name(GtkPlotArray *array) { return array->name; } const gchar * gtk_plot_array_get_label(GtkPlotArray *array) { return array->label; } const gchar * gtk_plot_array_get_description(GtkPlotArray *array) { return array->description; } gboolean * gtk_plot_array_get_bool(GtkPlotArray *array) { if(array->type != G_TYPE_BOOLEAN) return NULL; return array->data.data_bool; } gdouble * gtk_plot_array_get_double(GtkPlotArray *array) { if(array->type != G_TYPE_DOUBLE) return NULL; return array->data.data_double; } gfloat * gtk_plot_array_get_float(GtkPlotArray *array) { if(array->type != G_TYPE_FLOAT) return NULL; return array->data.data_float; } gint * gtk_plot_array_get_int(GtkPlotArray *array) { if(array->type != G_TYPE_INT) return NULL; return array->data.data_int; } /** * gtk_plot_array_get_string: * @array: the #GtkPlotArray * * Returns: (transfer none) the data string array */ gchar ** gtk_plot_array_get_string(GtkPlotArray *array) { if(array->type != G_TYPE_STRING) return NULL; return array->data.data_string; } /** * gtk_plot_array_get_pointer: * @array: the #GtkPlotArray * * Returns: (transfer none) the data pointer array */ gpointer * gtk_plot_array_get_pointer(GtkPlotArray *array) { if(array->type != G_TYPE_POINTER) return NULL; return array->data.data_pointer; } GType gtk_plot_array_list_get_type (void) { static GType array_list_type = 0; if (!array_list_type) { static const GTypeInfo data_info = { sizeof (GtkPlotArrayListClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) gtk_plot_array_list_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (GtkPlotArray), 0, /* n_preallocs */ (GInstanceInitFunc) gtk_plot_array_list_init, NULL }; array_list_type = g_type_register_static (G_TYPE_OBJECT, "GtkPlotArrayList", &data_info, 0); } return array_list_type; } static void gtk_plot_array_list_class_init (GtkPlotArrayListClass *klass) { GObjectClass *gobject_class; GtkPlotArrayListClass *array_list_class; array_list_parent_class = g_type_class_peek_parent (klass); gobject_class = (GObjectClass *) klass; array_list_class = (GtkPlotArrayListClass *) klass; gobject_class->finalize = gtk_plot_array_list_finalize; } static void gtk_plot_array_list_init (GtkPlotArrayList *array_list) { array_list->arrays = NULL; } GObject* gtk_plot_array_list_new (void) { GObject *object; object = g_object_new (gtk_plot_array_list_get_type (), NULL); return (object); } static void gtk_plot_array_list_finalize(GObject *object) { GtkPlotArrayList *array_list = GTK_PLOT_ARRAY_LIST(object); gtk_plot_array_list_clear(array_list); } GList * find_array(GtkPlotArrayList *array_list, const gchar *name) { GList *list; if(!array_list->arrays) return NULL; list = array_list->arrays; while(list){ if(list->data && GTK_IS_PLOT_ARRAY(list->data)) if(GTK_PLOT_ARRAY(list->data)->name && strcmp(GTK_PLOT_ARRAY(list->data)->name, name) == 0) return list; list = list->next; } return NULL; } void gtk_plot_array_list_add(GtkPlotArrayList *array_list, GtkPlotArray *array) { GList *list = NULL; list = find_array(array_list, array->name); if(list){ g_object_unref(G_OBJECT(list->data)); list->data = array; g_object_ref(G_OBJECT(array)); } else { array_list->arrays = g_list_append(array_list->arrays, array); g_object_ref(G_OBJECT(array)); } } void gtk_plot_array_list_remove(GtkPlotArrayList *array_list, GtkPlotArray *array) { GList *list; list = g_list_find(array_list->arrays, array); if(list){ g_object_unref(G_OBJECT(array)); array_list->arrays = g_list_remove_link(array_list->arrays, list); g_list_free_1(list); } } /** * gtk_plot_array_list_get: * @set: a #GtkPlotArrayList * @name: the name to be searched for * * Returns: (transfer none) the named #GtkPlotArray or NULL */ GtkPlotArray * gtk_plot_array_list_get(GtkPlotArrayList *set, const gchar *name) { GList *list = NULL;; list = find_array(set, name); if(list) return GTK_PLOT_ARRAY(list->data); return NULL; } void gtk_plot_array_list_clear(GtkPlotArrayList *array_list) { GList *list; list = array_list->arrays; while(list){ if(list->data && G_IS_OBJECT(list->data)) g_object_unref(G_OBJECT(list->data)); list->data = NULL; array_list->arrays = g_list_remove_link(array_list->arrays, list); g_list_free_1(list); list = array_list->arrays; } array_list->arrays = NULL; } gtkextra-3.2.0/gtkextra/sg_small.xpm0000644000076400001440000000621012603754176014460 00000000000000/* XPM */ static char * sg_small_xpm[] = { "18 18 152 2", " c None", ". c #00003A", "+ c #000074", "@ c #000000", "# c #010174", "$ c #020274", "% c #3333B9", "& c #003FAE", "* c #003F74", "= c #616100", "- c #C2C200", "; c #616174", "> c #007F74", ", c #008074", "' c #018174", ") c #028174", "! c #038274", "~ c #0B4BB0", "{ c #3636F4", "] c #919100", "^ c #D1D100", "/ c #B0B03A", "( c #7F7F74", "_ c #91913A", ": c #0303E8", "< c #0808E9", "[ c #0747AF", "} c #0F0FEB", "| c #0C0CEA", "1 c #068675", "2 c #3939F4", "3 c #61613A", "4 c #3F3FAE", "5 c #1010EB", "6 c #0000E8", "7 c #0909EA", "8 c #4040AE", "9 c #4444AE", "0 c #0D0DEA", "a c #0B0BEA", "b c #1111EB", "c c #098976", "d c #3C3CF5", "e c #A0A000", "f c #101077", "g c #090976", "h c #0F4FB1", "i c #1151B1", "j c #1352B2", "k c #0948AF", "l c #1453B2", "m c #0C8B76", "n c #3F3FF6", "o c #1212EB", "p c #1717ED", "q c #1353B2", "r c #1C1CED", "s c #0F8E77", "t c #4141F6", "u c #61A03A", "v c #717177", "w c #8F8F77", "x c #E0E000", "y c #0A8A76", "z c #01C03A", "A c #0D8D76", "B c #07C63B", "C c #108F77", "D c #119177", "E c #4444F7", "F c #99993B", "G c #0000AE", "H c #1515EC", "I c #030374", "J c #B6B63B", "K c #0D0D76", "L c #1616EC", "M c #2727F0", "N c #149478", "O c #4747F8", "P c #307074", "Q c #32323A", "R c #050575", "S c #3C3C76", "T c #707000", "U c #5151B5", "V c #179679", "W c #4A4AF8", "X c #3131AE", "Y c #77773B", "Z c #B9B93C", "` c #6060B5", " . c #2F2FF2", ".. c #6363B6", "+. c #BCBC3C", "@. c #599979", "#. c #4C4CF9", "$. c #0949AF", "%. c #69A83B", "&. c #78B83B", "*. c #87C73B", "=. c #0F4EB1", "-. c #2323EF", ";. c #2525F0", ">. c #2828F1", ",. c #2A2AF1", "'. c #5757B3", "). c #1C9C7A", "!. c #4F4FF9", "~. c #0606E8", "{. c #0E4DB1", "]. c #1414EC", "^. c #0C8C76", "/. c #1E1EEE", "(. c #969679", "_. c #474779", ":. c #5252FA", "<. c #0B4AB0", "[. c #2121EF", "}. c #989879", "|. c #898979", "1. c #5555FB", "2. c #058474", "3. c #078775", "4. c #078675", "5. c #0D8C76", "6. c #129177", "7. c #9D9D3C", "8. c #3232F3", "9. c #2B2BF1", "0. c #4040F6", "a. c #5757FB", "b. c #0D4CB0", "c. c #1B1BED", "d. c #0F8F77", "e. c #767678", "f. c #3E3E3D", "g. c #3E3EF5", "h. c #42423E", "i. c #A7A77C", "j. c #5A5AFC", "k. c #0D4DB0", "l. c #2C2CF1", "m. c #91D100", "n. c #C4C43E", "o. c #29A97D", "p. c #5D5DFD", "q. c #0544AE", "r. c #7D7D7A", "s. c #4282BD", "t. c #5F5FFD", "u. c #6363FE", ". + + + @ @ @ + + + + + + + # # $ % ", "+ & * = - - - ; > > > > , ' ) ! ~ { ", "+ * ] ^ / ( / ^ _ : : ! < [ } | 1 2 ", "+ 3 ^ 4 5 6 7 8 / 9 < ! 0 ~ a b c d ", "+ ] e f f f f f f g h ! i j k l m n ", "+ - - - - - - - - - o ! p q 5 r s t ", "+ u v w w w w w e x y z A B c C D E ", "+ > F G o < H I - J K = = = L M N O ", "+ P - ] Q R S - ^ T - ^ x ^ - U V W ", "+ > X - - - - x Y - Z ` ...+.^ @.#.", "+ > $.~ %.&.*.=.= x -.;.M >.,.'.).!.", "+ > ~.a {.].^./.- (._.= = = = = = :.", "+ , < 0 <.p A [.- }.|.x x x x ^ ^ 1.", "+ ' 2.3.4.5.B 6.- 7.8.9.d 0.E ] x a.", "# ) a 5 b.c.d.;.e.- f./.g.E h.- i.j.", "# ! | b k.r C M l.m.- = = = - n.o.p.", "$ q.1 c m s D N C C r.- ^ x i.o.s.t.", "% { 2 d n t E O W #.!.:.1.a.j.p.t.u."}; gtkextra-3.2.0/gtk-doc.make0000644000076400001440000001364412603754176012500 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = sh -c endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC all-local: html-build.stamp else all-local: endif docs: html-build.stamp $(REPORT_FILES): sgml-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true tmpl/*.sgml: @true #### xml #### sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(builddir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(srcdir)"; \ fi cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo 'gtk-doc: Fixing cross-references' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp ############## clean-local: rm -f *~ *.bak rm -rf .libs distclean-local: cd $(srcdir) && \ rm -rf xml $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ mv -f $${installdir}/$(DOC_MODULE).devhelp \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ fi uninstall-local: if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) ! which gtkdoc-rebase >/dev/null 2>&1 || \ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs gtkextra-3.2.0/depcomp0000755000076400001440000003677412603754176011677 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-02-09.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # 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, 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gtkextra-3.2.0/TODO0000644000076400001440000000015612603754176010773 00000000000000 - Deprecate widgets already implemented in Gtk 2.14.x - Convert all documentation from HTML to GtkDoc format gtkextra-3.2.0/configure.ac0000644000076400001440000002112312604172071012553 00000000000000# Process this file with autoconf to produce a configure script. # # Help for autoconf: # - http://www.linuxselfhelp.com/gnu/autoconf/html_chapter/autoconf_toc.html # Option Syntax: # - http://www.linuxselfhelp.com/gnu/autoconf/html_chapter/autoconf_12.html # Printing Messages: # - http://www.linuxselfhelp.com/gnu/autoconf/html_chapter/autoconf_7.html # AC_INIT([gtkextra], [3.2.0]) AC_LANG([C]) AC_CONFIG_MACRO_DIR([m4]) # Save this value here, since automake will set cflags later cflags_set=${CFLAGS:+set} CFLAGS=${CFLAGS:-""} AC_DIVERT_PUSH(NOTICE)dnl # GtkExtra versioning: before making releases, be sure to read # http://gtkextra.sourceforge.net/cms/index.php?option=com_content&view=article&id=44&Itemid=22 GTK_EXTRA_MAJOR_VERSION=3 GTK_EXTRA_MINOR_VERSION=2 GTK_EXTRA_MICRO_VERSION=0 GTK_EXTRA_VERSION=$GTK_EXTRA_MAJOR_VERSION.$GTK_EXTRA_MINOR_VERSION.$GTK_EXTRA_MICRO_VERSION GTK_EXTRA_VERSION_SHORT=$GTK_EXTRA_MAJOR_VERSION.$GTK_EXTRA_MINOR_VERSION AC_DIVERT_POP()dnl AC_SUBST(GTK_EXTRA_MAJOR_VERSION) AC_SUBST(GTK_EXTRA_MINOR_VERSION) AC_SUBST(GTK_EXTRA_MICRO_VERSION) AC_SUBST(GTK_EXTRA_VERSION) AC_SUBST(GTK_EXTRA_VERSION_SHORT) # libtool versioning LT_CURRENT=8 LT_REVISION=0 LT_AGE=0 AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) LIBGTKEXTRA_SO_VERSION=$LT_CURRENT:$LT_REVISION:$LT_AGE AC_SUBST(LIBGTKEXTRA_SO_VERSION) # For automake VERSION=$GTK_EXTRA_VERSION PACKAGE=gtk+extra AC_CONFIG_AUX_DIR([build-aux]) # Initialize automake stuff AM_INIT_AUTOMAKE([-Wall -Werror foreign]) #AM_SILENT_RULES([yes]) # Specify a configuration file AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_DEFINE([ENABLE_NLS],1, [NLS enabled]) AC_DEFINE([HAVE_GETTEXT],1, [have gettext]) # Build time sanity check... AM_SANITY_CHECK # Checks for programs. AC_PROG_CC AC_ISC_POSIX AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # Initialize libtool AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AM_MAINTAINER_MODE AC_MSG_CHECKING([for some Win32 platform]) case "$host" in *-*-mingw*|*-*-cygwin*) platform_win32=yes ;; *) platform_win32=no ;; esac AC_MSG_RESULT([$platform_win32]) AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) os_win32=yes ;; *) os_win32=no ;; esac AC_MSG_RESULT([$os_win32]) AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") if test "$os_win32" = "yes"; then AC_CHECK_PROG(ms_librarian, lib.exe, yes, no) fi AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes) # --enable-debug option AC_MSG_CHECKING([whether to enable debugging]) AC_ARG_ENABLE(debug, AC_HELP_STRING( [--enable-debug=[no/yes]], [turn on debugging [default=no]]), , enable_debug=no) if test "x$enable_debug" = "xyes"; then test "$cflags_set" = set || CFLAGS="$CFLAGS -g -DDEBUG" AC_MSG_RESULT(yes) else test "$cflags_set" = set || CFLAGS="$CFLAGS -O2" AC_MSG_RESULT(no) fi # --enable-tests option AC_MSG_CHECKING([whether to enable tests]) AC_ARG_ENABLE(tests, AC_HELP_STRING( [--enable-tests=[no/yes]], [turn on tests [default=yes]]), , enable_tests=yes) if test "x$enable_tests" = "xyes"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AM_CONDITIONAL(ENABLE_TESTS, test x$enable_tests = xyes) changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi changequote([,])dnl # Compiler and Lib Stuff # AC_PROG_CXX # Checks for header files. AC_HEADER_STDC # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl header file checks AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H, 1, [unistd.h found])) AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H, 1, [dirent.h found])) AC_CHECK_HEADERS([locale.h]) AC_CHECK_HEADERS([sys/time.h]) dnl Don't attempt to use fnmatch under win32 due to problems with creating DLLs. if test "$platform_win32" = "no"; then AC_CHECK_HEADERS(fnmatch.h, AC_DEFINE(HAVE_FNMATCH_H, 1, [fnmatch.h found])) fi # Checks for nonportable Functions AC_CHECK_FUNCS([floor getcwd gethostname gettimeofday]) AC_CHECK_FUNCS([pow setlocale strstr strtol sin]) AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STRTOD dnl NeXTStep cc seems to need this AC_MSG_CHECKING([for extra flags for POSIX compliance]) AC_TRY_COMPILE([#include ], [DIR *dir;], AC_MSG_RESULT(none needed), gtk_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -posix" AC_TRY_COMPILE([#include ], [DIR *dir;], AC_MSG_RESULT(-posix), AC_MSG_RESULT() CFLAGS=$gtk_save_CFLAGS AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)]))) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE ################################################## # Checks for gtk-doc and docbook-tools ################################################## # check for gtk-doc GTK_DOC_CHECK(1.8) AC_CHECK_PROG(DB2HTML, db2html, true, false) AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) # --enable-man option AC_MSG_CHECKING([whether to enable man pages]) AC_ARG_ENABLE(man, AC_HELP_STRING( [--enable-man], [regenerate man pages from Docbook [default=no]])], , enable_man=no) if test "${enable_man}" != no; then AC_MSG_RESULT(yes) AC_PATH_PROG([XSLTPROC], [xsltproc]) if test -z "$XSLTPROC"; then enable_man=no fi if test "$enable_man" = "no" ; then AC_MSG_WARN([xsltproc is missing - disabling man pages]) fi #check for DocBook DTD and stylesheets in the local catalog JH_CHECK_XML_CATALOG( [-//OASIS//DTD DocBook XML V4.1.2//EN], [DocBook XML DTD V4.1.2], , enable_man=no) if test "$enable_man" = "no" ; then AC_MSG_WARN([missing DocBook DTD - disabling man pages]) fi JH_CHECK_XML_CATALOG( [http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [DocBook XSL Stylesheets], , enable_man=no) if test "$enable_man" = "no" ; then AC_MSG_WARN([missing DocBook XML stylesheets - disabling man pages]) fi else AC_MSG_RESULT(no) fi AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno) ################################################## # Start of pkg-config checks ################################################## PKG_PROG_PKG_CONFIG # Find the GTK+ include and library directories. # 4.5.10/fp - fontconfig should be implicit to pango #PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0 fontconfig]) PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0]) AC_SUBST(GLIB_GENMARSHAL, `$PKG_CONFIG --variable=glib_genmarshal glib-2.0`) # --enable-glade option AC_MSG_CHECKING([whether to enable glade integration]) AC_ARG_ENABLE(glade, AC_HELP_STRING( [--enable-glade], [build glade integration files [default=no]]), , enable_glade=no) if test "x$enable_glade" != xno; then AC_MSG_RESULT(yes) PKG_CHECK_MODULES([GLADE], [gladeui-1.0 >= 3.6]) AC_SUBST(GLADE_CATALOG_DIR, `$PKG_CONFIG --variable=catalogdir gladeui-1.0`) AC_SUBST(GLADE_MODULE_DIR, `$PKG_CONFIG --variable=moduledir gladeui-1.0`) AC_SUBST(GLADE_PIXMAP_DIR, `$PKG_CONFIG --variable=pixmapdir gladeui-1.0`) #You must define GETTEXT_PACKAGE before including gi18n-lib.h GETTEXT_PACKAGE=AC_PACKAGE_NAME AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the gettext package.]) AM_GLIB_GNU_GETTEXT else AC_MSG_RESULT(no) fi AM_CONDITIONAL(ENABLE_GLADE, test x$enable_glade != xno) # --enable-introspection AC_MSG_CHECKING([whether to enable gobject-introspection]) AC_ARG_ENABLE(introspection, AC_HELP_STRING( [--enable-introspection], [build gobject-introspection [default=no]]), , enable_introspection=no) if test "x$enable_introspection" != xno; then AC_MSG_RESULT(yes) GOBJECT_INTROSPECTION_CHECK([0.6.14]) else AC_MSG_RESULT(no) AM_CONDITIONAL(HAVE_INTROSPECTION, test 1=0) fi AM_CONDITIONAL(ENABLE_INTROSPECTION, test x$enable_introspection != xno) if test "$platform_win32" = "yes"; then AC_SUBST(libgladegtkextra_soname, [libgladegtkextra.dll]) else AC_SUBST(libgladegtkextra_soname, [libgladegtkextra.so]) fi AC_SUBST(gdktarget, `$PKG_CONFIG --variable=target gtk+-2.0`) gtkextratargetlib=libgtkextra-$gdktarget-3.0.la AC_SUBST(gtkextratargetlib) AC_CHECK_LIB(m, sqrt) if test "x$gdktarget" = "xwin32"; then AM_CONDITIONAL(USE_WIN32, true) else AM_CONDITIONAL(USE_WIN32, false) fi # configure output definition AC_CONFIG_FILES( Makefile glade/Makefile glade/pixmaps/Makefile glade/gtk+extra-catalog.xml gtkextra/Makefile gtkextra/gtkextrafeatures.h docs/Makefile docs/reference/Makefile docs/tutorial/Makefile gtkextra-3.0.spec gtkextra-3.0.pc ) AC_OUTPUT gtkextra-3.2.0/config.h.in0000644000076400001440000000752512604172272012325 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Name of the gettext package. */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the header file. */ #undef HAVE_FNMATCH_H /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `sin' function. */ #undef HAVE_SIN /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* 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 version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc gtkextra-3.2.0/configure0000755000076400001440000220464712604172271012216 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for gtkextra 3.2.0. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # GtkExtra versioning: before making releases, be sure to read # http://gtkextra.sourceforge.net/cms/index.php?option=com_content&view=article&id=44&Itemid=22 GTK_EXTRA_MAJOR_VERSION=3 GTK_EXTRA_MINOR_VERSION=2 GTK_EXTRA_MICRO_VERSION=0 GTK_EXTRA_VERSION=$GTK_EXTRA_MAJOR_VERSION.$GTK_EXTRA_MINOR_VERSION.$GTK_EXTRA_MICRO_VERSION GTK_EXTRA_VERSION_SHORT=$GTK_EXTRA_MAJOR_VERSION.$GTK_EXTRA_MINOR_VERSION # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='gtkextra' PACKAGE_TARNAME='gtkextra' PACKAGE_VERSION='3.2.0' PACKAGE_STRING='gtkextra 3.2.0' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS USE_WIN32_FALSE USE_WIN32_TRUE gtkextratargetlib gdktarget libgladegtkextra_soname ENABLE_INTROSPECTION_FALSE ENABLE_INTROSPECTION_TRUE HAVE_INTROSPECTION_FALSE HAVE_INTROSPECTION_TRUE INTROSPECTION_MAKEFILE INTROSPECTION_LIBS INTROSPECTION_CFLAGS INTROSPECTION_TYPELIBDIR INTROSPECTION_GIRDIR INTROSPECTION_GENERATE INTROSPECTION_COMPILER INTROSPECTION_SCANNER ENABLE_GLADE_FALSE ENABLE_GLADE_TRUE MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS GETTEXT_PACKAGE GLADE_PIXMAP_DIR GLADE_MODULE_DIR GLADE_CATALOG_DIR GLADE_LIBS GLADE_CFLAGS GLIB_GENMARSHAL GTK_LIBS GTK_CFLAGS ENABLE_MAN_FALSE ENABLE_MAN_TRUE XMLCATALOG XML_CATALOG_FILE XSLTPROC HAVE_DOCBOOK_FALSE HAVE_DOCBOOK_TRUE DB2HTML GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_CHECK PKG_CONFIG HTML_DIR POW_LIB LIBOBJS ENABLE_TESTS_FALSE ENABLE_TESTS_TRUE MS_LIB_AVAILABLE_FALSE MS_LIB_AVAILABLE_TRUE ms_librarian OS_WIN32_FALSE OS_WIN32_TRUE PLATFORM_WIN32_FALSE PLATFORM_WIN32_TRUE MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL OBJDUMP DLLTOOL AS host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM LIBGTKEXTRA_SO_VERSION LT_AGE LT_REVISION LT_CURRENT GTK_EXTRA_VERSION_SHORT GTK_EXTRA_VERSION GTK_EXTRA_MICRO_VERSION GTK_EXTRA_MINOR_VERSION GTK_EXTRA_MAJOR_VERSION target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_debug enable_tests with_html_dir enable_gtk_doc enable_man with_xml_catalog enable_glade enable_introspection ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG GTK_CFLAGS GTK_LIBS GLADE_CFLAGS GLADE_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures gtkextra 3.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/gtkextra] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gtkextra 3.2.0:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-debug=no/yes turn on debugging default=no --enable-tests=no/yes turn on tests default=yes --enable-gtk-doc use gtk-doc to build documentation [default=no] --enable-man regenerate man pages from Docbook default=no] --enable-glade build glade integration files default=no --enable-introspection build gobject-introspection default=no --enable-introspection=[no/auto/yes] Enable introspection for this build Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-html-dir=PATH path to installed docs --with-xml-catalog=CATALOG path to xml catalog to use Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config GLADE_CFLAGS C compiler flags for GLADE, overriding pkg-config GLADE_LIBS linker flags for GLADE, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF gtkextra configure 3.2.0 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by gtkextra $as_me 3.2.0, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Save this value here, since automake will set cflags later cflags_set=${CFLAGS:+set} CFLAGS=${CFLAGS:-""} # libtool versioning LT_CURRENT=8 LT_REVISION=0 LT_AGE=0 LIBGTKEXTRA_SO_VERSION=$LT_CURRENT:$LT_REVISION:$LT_AGE # For automake VERSION=$GTK_EXTRA_VERSION PACKAGE=gtk+extra ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Initialize automake stuff am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='gtkextra' VERSION='3.2.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' #AM_SILENT_RULES([yes]) # Specify a configuration file ac_config_headers="$ac_config_headers config.h" cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Build time sanity check... { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:$LINENO: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_strerror=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Initialize libtool # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:$LINENO: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed $as_unset ac_script || ac_script= if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:5936: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:5939: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:5942: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 7144 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8999: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:9003: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9338: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:9342: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9443: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9447: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:9498: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:9502: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 12301 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 12397 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE { $as_echo "$as_me:$LINENO: checking for some Win32 platform" >&5 $as_echo_n "checking for some Win32 platform... " >&6; } case "$host" in *-*-mingw*|*-*-cygwin*) platform_win32=yes ;; *) platform_win32=no ;; esac { $as_echo "$as_me:$LINENO: result: $platform_win32" >&5 $as_echo "$platform_win32" >&6; } if test "$platform_win32" = "yes"; then PLATFORM_WIN32_TRUE= PLATFORM_WIN32_FALSE='#' else PLATFORM_WIN32_TRUE='#' PLATFORM_WIN32_FALSE= fi { $as_echo "$as_me:$LINENO: checking for native Win32" >&5 $as_echo_n "checking for native Win32... " >&6; } case "$host" in *-*-mingw*) os_win32=yes ;; *) os_win32=no ;; esac { $as_echo "$as_me:$LINENO: result: $os_win32" >&5 $as_echo "$os_win32" >&6; } if test "$os_win32" = "yes"; then OS_WIN32_TRUE= OS_WIN32_FALSE='#' else OS_WIN32_TRUE='#' OS_WIN32_FALSE= fi if test "$os_win32" = "yes"; then # Extract the first word of "lib.exe", so it can be a program name with args. set dummy lib.exe; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ms_librarian+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ms_librarian"; then ac_cv_prog_ms_librarian="$ms_librarian" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ms_librarian="yes" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_ms_librarian" && ac_cv_prog_ms_librarian="no" fi fi ms_librarian=$ac_cv_prog_ms_librarian if test -n "$ms_librarian"; then { $as_echo "$as_me:$LINENO: result: $ms_librarian" >&5 $as_echo "$ms_librarian" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test x$ms_librarian = xyes; then MS_LIB_AVAILABLE_TRUE= MS_LIB_AVAILABLE_FALSE='#' else MS_LIB_AVAILABLE_TRUE='#' MS_LIB_AVAILABLE_FALSE= fi # --enable-debug option { $as_echo "$as_me:$LINENO: checking whether to enable debugging" >&5 $as_echo_n "checking whether to enable debugging... " >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; else enable_debug=no fi if test "x$enable_debug" = "xyes"; then test "$cflags_set" = set || CFLAGS="$CFLAGS -g -DDEBUG" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else test "$cflags_set" = set || CFLAGS="$CFLAGS -O2" { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # --enable-tests option { $as_echo "$as_me:$LINENO: checking whether to enable tests" >&5 $as_echo_n "checking whether to enable tests... " >&6; } # Check whether --enable-tests was given. if test "${enable_tests+set}" = set; then enableval=$enable_tests; else enable_tests=yes fi if test "x$enable_tests" = "xyes"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$enable_tests = xyes; then ENABLE_TESTS_TRUE= ENABLE_TESTS_FALSE='#' else ENABLE_TESTS_TRUE='#' ENABLE_TESTS_FALSE= fi if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi # Compiler and Lib Stuff # AC_PROG_CXX # Checks for header files. { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi for ac_header in unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in dirent.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_DIRENT_H 1 _ACEOF fi done for ac_header in locale.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/time.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "$platform_win32" = "no"; then for ac_header in fnmatch.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_FNMATCH_H 1 _ACEOF fi done fi # Checks for nonportable Functions for ac_func in floor getcwd gethostname gettimeofday do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in pow setlocale strstr strtol sin do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 $as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 0 _ACEOF case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define realloc rpl_realloc _ACEOF fi { $as_echo "$as_me:$LINENO: checking for working strtod" >&5 $as_echo_n "checking for working strtod... " >&6; } if test "${ac_cv_func_strtod+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_strtod=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifndef strtod double strtod (); #endif int main() { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ char *string = " +69"; char *term; double value; value = strtod (string, &term); if (value != 69 || term != (string + 4)) return 1; } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_strtod=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_strtod=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 $as_echo "$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = no; then case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac { $as_echo "$as_me:$LINENO: checking for pow" >&5 $as_echo_n "checking for pow... " >&6; } if test "${ac_cv_func_pow+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define pow to an innocuous variant, in case declares pow. For example, HP-UX 11i declares gettimeofday. */ #define pow innocuous_pow /* System header to define __stub macros and hopefully few prototypes, which can conflict with char pow (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef pow /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_pow || defined __stub___pow choke me #endif int main () { return pow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_pow=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_pow=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 $as_echo "$ac_cv_func_pow" >&6; } if test $ac_cv_func_pow = no; then { $as_echo "$as_me:$LINENO: checking for pow in -lm" >&5 $as_echo_n "checking for pow in -lm... " >&6; } if test "${ac_cv_lib_m_pow+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); int main () { return pow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_pow=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_pow=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 $as_echo "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = x""yes; then POW_LIB=-lm else { $as_echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5 $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} fi fi fi { $as_echo "$as_me:$LINENO: checking for extra flags for POSIX compliance" >&5 $as_echo_n "checking for extra flags for POSIX compliance... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { DIR *dir; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gtk_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -posix" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { DIR *dir; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then { $as_echo "$as_me:$LINENO: result: -posix" >&5 $as_echo "-posix" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: " >&5 $as_echo "" >&6; } CFLAGS=$gtk_save_CFLAGS { $as_echo "$as_me:$LINENO: WARNING: Could not determine POSIX flag. (-posix didn't work.)" >&5 $as_echo "$as_me: WARNING: Could not determine POSIX flag. (-posix didn't work.)" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ################################################## # Checks for gtk-doc and docbook-tools ################################################## # check for gtk-doc if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.8\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.8") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : else { { $as_echo "$as_me:$LINENO: error: You need to have gtk-doc >= 1.8 installed to build gtk-doc" >&5 $as_echo "$as_me: error: You need to have gtk-doc >= 1.8 installed to build gtk-doc" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:$LINENO: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } for ac_prog in gtkdoc-check do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:$LINENO: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_CHECK" && break done if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi # Extract the first word of "db2html", so it can be a program name with args. set dummy db2html; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DB2HTML+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DB2HTML"; then ac_cv_prog_DB2HTML="$DB2HTML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DB2HTML="true" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_DB2HTML" && ac_cv_prog_DB2HTML="false" fi fi DB2HTML=$ac_cv_prog_DB2HTML if test -n "$DB2HTML"; then { $as_echo "$as_me:$LINENO: result: $DB2HTML" >&5 $as_echo "$DB2HTML" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if $DB2HTML; then HAVE_DOCBOOK_TRUE= HAVE_DOCBOOK_FALSE='#' else HAVE_DOCBOOK_TRUE='#' HAVE_DOCBOOK_FALSE= fi # --enable-man option { $as_echo "$as_me:$LINENO: checking whether to enable man pages" >&5 $as_echo_n "checking whether to enable man pages... " >&6; } # Check whether --enable-man was given. if test "${enable_man+set}" = set; then enableval=$enable_man; else enable_man=no fi if test "${enable_man}" != no; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XSLTPROC+set}" = set; then $as_echo_n "(cached) " >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5 $as_echo "$XSLTPROC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$XSLTPROC"; then enable_man=no fi if test "$enable_man" = "no" ; then { $as_echo "$as_me:$LINENO: WARNING: xsltproc is missing - disabling man pages" >&5 $as_echo "$as_me: WARNING: xsltproc is missing - disabling man pages" >&2;} fi #check for DocBook DTD and stylesheets in the local catalog # check for the presence of the XML catalog # Check whether --with-xml-catalog was given. if test "${with_xml_catalog+set}" = set; then withval=$with_xml_catalog; else with_xml_catalog=/etc/xml/catalog fi jh_found_xmlcatalog=true XML_CATALOG_FILE="$with_xml_catalog" { $as_echo "$as_me:$LINENO: checking for XML catalog ($XML_CATALOG_FILE)" >&5 $as_echo_n "checking for XML catalog ($XML_CATALOG_FILE)... " >&6; } if test -f "$XML_CATALOG_FILE"; then { $as_echo "$as_me:$LINENO: result: found" >&5 $as_echo "found" >&6; } else jh_found_xmlcatalog=false { $as_echo "$as_me:$LINENO: result: not found" >&5 $as_echo "not found" >&6; } fi # check for the xmlcatalog program # Extract the first word of "xmlcatalog", so it can be a program name with args. set dummy xmlcatalog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XMLCATALOG+set}" = set; then $as_echo_n "(cached) " >&6 else case $XMLCATALOG in [\\/]* | ?:[\\/]*) ac_cv_path_XMLCATALOG="$XMLCATALOG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XMLCATALOG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_XMLCATALOG" && ac_cv_path_XMLCATALOG="no" ;; esac fi XMLCATALOG=$ac_cv_path_XMLCATALOG if test -n "$XMLCATALOG"; then { $as_echo "$as_me:$LINENO: result: $XMLCATALOG" >&5 $as_echo "$XMLCATALOG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$XMLCATALOG" = xno; then jh_found_xmlcatalog=false fi if $jh_found_xmlcatalog; then : else : fi { $as_echo "$as_me:$LINENO: checking for DocBook XML DTD V4.1.2 in XML catalog" >&5 $as_echo_n "checking for DocBook XML DTD V4.1.2 in XML catalog... " >&6; } if $jh_found_xmlcatalog && \ { ($as_echo "$as_me:$LINENO: \$XMLCATALOG --noout \"\$XML_CATALOG_FILE\" \"-//OASIS//DTD DocBook XML V4.1.2//EN\" >&2") >&5 ($XMLCATALOG --noout "$XML_CATALOG_FILE" "-//OASIS//DTD DocBook XML V4.1.2//EN" >&2) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then { $as_echo "$as_me:$LINENO: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:$LINENO: result: not found" >&5 $as_echo "not found" >&6; } enable_man=no fi if test "$enable_man" = "no" ; then { $as_echo "$as_me:$LINENO: WARNING: missing DocBook DTD - disabling man pages" >&5 $as_echo "$as_me: WARNING: missing DocBook DTD - disabling man pages" >&2;} fi { $as_echo "$as_me:$LINENO: checking for DocBook XSL Stylesheets in XML catalog" >&5 $as_echo_n "checking for DocBook XSL Stylesheets in XML catalog... " >&6; } if $jh_found_xmlcatalog && \ { ($as_echo "$as_me:$LINENO: \$XMLCATALOG --noout \"\$XML_CATALOG_FILE\" \"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\" >&2") >&5 ($XMLCATALOG --noout "$XML_CATALOG_FILE" "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" >&2) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then { $as_echo "$as_me:$LINENO: result: found" >&5 $as_echo "found" >&6; } else { $as_echo "$as_me:$LINENO: result: not found" >&5 $as_echo "not found" >&6; } enable_man=no fi if test "$enable_man" = "no" ; then { $as_echo "$as_me:$LINENO: WARNING: missing DocBook XML stylesheets - disabling man pages" >&5 $as_echo "$as_me: WARNING: missing DocBook XML stylesheets - disabling man pages" >&2;} fi else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$enable_man != xno; then ENABLE_MAN_TRUE= ENABLE_MAN_FALSE='#' else ENABLE_MAN_TRUE='#' ENABLE_MAN_FALSE= fi ################################################## # Start of pkg-config checks ################################################## if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Find the GTK+ include and library directories. # 4.5.10/fp - fontconfig should be implicit to pango #PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0 fontconfig]) pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GTK" >&5 $as_echo_n "checking for GTK... " >&6; } if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.12.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.12.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.12.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.12.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0 >= 2.12.0" 2>&1` else GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0 >= 2.12.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (gtk+-2.0 >= 2.12.0) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (gtk+-2.0 >= 2.12.0) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` # --enable-glade option { $as_echo "$as_me:$LINENO: checking whether to enable glade integration" >&5 $as_echo_n "checking whether to enable glade integration... " >&6; } # Check whether --enable-glade was given. if test "${enable_glade+set}" = set; then enableval=$enable_glade; else enable_glade=no fi if test "x$enable_glade" != xno; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GLADE" >&5 $as_echo_n "checking for GLADE... " >&6; } if test -n "$GLADE_CFLAGS"; then pkg_cv_GLADE_CFLAGS="$GLADE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gladeui-1.0 >= 3.6\"") >&5 ($PKG_CONFIG --exists --print-errors "gladeui-1.0 >= 3.6") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLADE_CFLAGS=`$PKG_CONFIG --cflags "gladeui-1.0 >= 3.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLADE_LIBS"; then pkg_cv_GLADE_LIBS="$GLADE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gladeui-1.0 >= 3.6\"") >&5 ($PKG_CONFIG --exists --print-errors "gladeui-1.0 >= 3.6") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GLADE_LIBS=`$PKG_CONFIG --libs "gladeui-1.0 >= 3.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gladeui-1.0 >= 3.6" 2>&1` else GLADE_PKG_ERRORS=`$PKG_CONFIG --print-errors "gladeui-1.0 >= 3.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLADE_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (gladeui-1.0 >= 3.6) were not met: $GLADE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLADE_CFLAGS and GLADE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (gladeui-1.0 >= 3.6) were not met: $GLADE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLADE_CFLAGS and GLADE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLADE_CFLAGS and GLADE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLADE_CFLAGS and GLADE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GLADE_CFLAGS=$pkg_cv_GLADE_CFLAGS GLADE_LIBS=$pkg_cv_GLADE_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi GLADE_CATALOG_DIR=`$PKG_CONFIG --variable=catalogdir gladeui-1.0` GLADE_MODULE_DIR=`$PKG_CONFIG --variable=moduledir gladeui-1.0` GLADE_PIXMAP_DIR=`$PKG_CONFIG --variable=pixmapdir gladeui-1.0` #You must define GETTEXT_PACKAGE before including gi18n-lib.h GETTEXT_PACKAGE=gtkextra cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF for ac_header in locale.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_val_LC_MESSAGES=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= if test "${ac_cv_header_libintl_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5 $as_echo_n "checking for libintl.h... " >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 $as_echo "$ac_cv_header_libintl_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5 $as_echo_n "checking libintl.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5 $as_echo_n "checking libintl.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5 $as_echo_n "checking for libintl.h... " >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 $as_echo "$ac_cv_header_libintl_h" >&6; } fi if test "x$ac_cv_header_libintl_h" = x""yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:$LINENO: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gt_cv_func_ngettext_libc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_ngettext_libc=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gt_cv_func_dgettext_libc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_bindtextdomain=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_ngettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_dgettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = x""yes; then gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:$LINENO: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_ngettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_dcgettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { ($as_echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then CATOBJEXT=.gmo DATADIRNAME=share else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 $as_echo_n "checking for bind_textdomain_codeset... " >&6; } if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. For example, HP-UX 11i declares gettimeofday. */ #define bind_textdomain_codeset innocuous_bind_textdomain_codeset /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef bind_textdomain_codeset /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bind_textdomain_codeset (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset choke me #endif int main () { return bind_textdomain_codeset (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_bind_textdomain_codeset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 $as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; } if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$enable_glade != xno; then ENABLE_GLADE_TRUE= ENABLE_GLADE_FALSE='#' else ENABLE_GLADE_TRUE='#' ENABLE_GLADE_FALSE= fi # --enable-introspection { $as_echo "$as_me:$LINENO: checking whether to enable gobject-introspection" >&5 $as_echo_n "checking whether to enable gobject-introspection... " >&6; } # Check whether --enable-introspection was given. if test "${enable_introspection+set}" = set; then enableval=$enable_introspection; else enable_introspection=no fi if test "x$enable_introspection" != xno; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } # Check whether --enable-introspection was given. if test "${enable_introspection+set}" = set; then enableval=$enable_introspection; else enable_introspection=auto fi { $as_echo "$as_me:$LINENO: checking for gobject-introspection" >&5 $as_echo_n "checking for gobject-introspection... " >&6; } case $enable_introspection in no) found_introspection="no (disabled, use --enable-introspection to enable)" ;; yes) if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : else { { $as_echo "$as_me:$LINENO: error: gobject-introspection-1.0 is not installed" >&5 $as_echo "$as_me: error: gobject-introspection-1.0 is not installed" >&2;} { (exit 1); exit 1; }; } fi if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.6.14\"") >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.6.14") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then found_introspection=yes else { { $as_echo "$as_me:$LINENO: error: You need to have gobject-introspection >= 0.6.14 installed to build gtkextra" >&5 $as_echo "$as_me: error: You need to have gobject-introspection >= 0.6.14 installed to build gtkextra" >&2;} { (exit 1); exit 1; }; } fi ;; auto) if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.6.14\"") >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.6.14") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then found_introspection=yes else found_introspection=no fi enable_introspection=$found_introspection ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" >&5 $as_echo "$as_me: error: invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" >&2;} { (exit 1); exit 1; }; } ;; esac { $as_echo "$as_me:$LINENO: result: $found_introspection" >&5 $as_echo "$found_introspection" >&6; } INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi if test "x$found_introspection" = "xyes"; then HAVE_INTROSPECTION_TRUE= HAVE_INTROSPECTION_FALSE='#' else HAVE_INTROSPECTION_TRUE='#' HAVE_INTROSPECTION_FALSE= fi else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } if test 1=0; then HAVE_INTROSPECTION_TRUE= HAVE_INTROSPECTION_FALSE='#' else HAVE_INTROSPECTION_TRUE='#' HAVE_INTROSPECTION_FALSE= fi fi if test x$enable_introspection != xno; then ENABLE_INTROSPECTION_TRUE= ENABLE_INTROSPECTION_FALSE='#' else ENABLE_INTROSPECTION_TRUE='#' ENABLE_INTROSPECTION_FALSE= fi if test "$platform_win32" = "yes"; then libgladegtkextra_soname=libgladegtkextra.dll else libgladegtkextra_soname=libgladegtkextra.so fi gdktarget=`$PKG_CONFIG --variable=target gtk+-2.0` gtkextratargetlib=libgtkextra-$gdktarget-3.0.la { $as_echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if test "${ac_cv_lib_m_sqrt+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_sqrt=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sqrt=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi if test "x$gdktarget" = "xwin32"; then if true; then USE_WIN32_TRUE= USE_WIN32_FALSE='#' else USE_WIN32_TRUE='#' USE_WIN32_FALSE= fi else if false; then USE_WIN32_TRUE= USE_WIN32_FALSE='#' else USE_WIN32_TRUE='#' USE_WIN32_FALSE= fi fi # configure output definition ac_config_files="$ac_config_files Makefile glade/Makefile glade/pixmaps/Makefile glade/gtk+extra-catalog.xml gtkextra/Makefile gtkextra/gtkextrafeatures.h docs/Makefile docs/reference/Makefile docs/tutorial/Makefile gtkextra-3.0.spec gtkextra-3.0.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${PLATFORM_WIN32_TRUE}" && test -z "${PLATFORM_WIN32_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"PLATFORM_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"PLATFORM_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${MS_LIB_AVAILABLE_TRUE}" && test -z "${MS_LIB_AVAILABLE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MS_LIB_AVAILABLE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"MS_LIB_AVAILABLE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_TESTS_TRUE}" && test -z "${ENABLE_TESTS_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_DOCBOOK_TRUE}" && test -z "${HAVE_DOCBOOK_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DOCBOOK\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_DOCBOOK\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_MAN_TRUE}" && test -z "${ENABLE_MAN_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_MAN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_MAN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_GLADE_TRUE}" && test -z "${ENABLE_GLADE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GLADE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_GLADE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_INTROSPECTION_TRUE}" && test -z "${ENABLE_INTROSPECTION_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"ENABLE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_WIN32_TRUE}" && test -z "${USE_WIN32_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${USE_WIN32_TRUE}" && test -z "${USE_WIN32_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"USE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"USE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by gtkextra $as_me 3.2.0, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ gtkextra config.status 3.2.0 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "glade/Makefile") CONFIG_FILES="$CONFIG_FILES glade/Makefile" ;; "glade/pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES glade/pixmaps/Makefile" ;; "glade/gtk+extra-catalog.xml") CONFIG_FILES="$CONFIG_FILES glade/gtk+extra-catalog.xml" ;; "gtkextra/Makefile") CONFIG_FILES="$CONFIG_FILES gtkextra/Makefile" ;; "gtkextra/gtkextrafeatures.h") CONFIG_FILES="$CONFIG_FILES gtkextra/gtkextrafeatures.h" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;; "docs/tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES docs/tutorial/Makefile" ;; "gtkextra-3.0.spec") CONFIG_FILES="$CONFIG_FILES gtkextra-3.0.spec" ;; "gtkextra-3.0.pc") CONFIG_FILES="$CONFIG_FILES gtkextra-3.0.pc" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$AS # DLL creation program. DLLTOOL=$DLLTOOL # Object dumper program. OBJDUMP=$OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi