inkview.cpp revision af80de26fd5777ead589f500348b2b90672e8e71
#define __SPSVGVIEW_C__
/*
* Inkscape - an ambitious vector drawing program
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Frank Felfe <innerspace@iname.com>
* Davide Puricelli <evo@debian.org>
* Mitsuru Oka <oka326@parkcity.ne.jp>
* Masatake YAMATO <jet@gyve.org>
* F.J.Franklin <F.J.Franklin@sheffield.ac.uk>
* Michael Meeks <michael@helixcode.com>
* Chema Celorio <chema@celorio.com>
* Pawel Palucha
* ... and various people who have worked with various projects
*
* Copyright (C) 1999-2002 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Inkscape authors:
* Johan Ceuppens
*
* Copyright (C) 2004 Inkscape authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string.h>
#include <locale.h>
#include <libnr/nr-macros.h>
// #include <stropts.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkstock.h>
#include <gtk/gtkwindow.h>
#include <gtk/gtktable.h>
#include <gtk/gtkbutton.h>
#include "gc-core.h"
#include "preferences.h"
#include "document.h"
#include "svg-view.h"
#include "svg-view-widget.h"
#ifdef WITH_INKJAR
#endif
#include "inkscape-private.h"
#include <iostream>
#ifndef HAVE_BIND_TEXTDOMAIN_CODESET
#define bind_textdomain_codeset(p,c)
#endif
extern char *optarg;
struct SPSlideShow {
char **slides;
int size;
int length;
int current;
bool fullscreen;
int timer;
};
#ifdef WITH_INKJAR
#endif
static void usage();
/// Dummy functions to keep linker happy
int sp_main_gui (int, char const**) { return 0; }
int sp_main_console (int, char const**) { return 0; }
static int
{
gtk_main_quit ();
return FALSE;
}
static int
{
case GDK_Up:
break;
case GDK_Down:
break;
case GDK_F11:
#ifdef HAVE_GTK_WINDOW_FULLSCREEN
if (ss->fullscreen) {
ss->fullscreen = false;
} else {
ss->fullscreen = true;
}
#else
#endif
break;
case GDK_Return:
break;
case GDK_KP_Page_Down:
case GDK_Page_Down:
case GDK_Right:
case GDK_space:
break;
case GDK_KP_Page_Up:
case GDK_Page_Up:
case GDK_Left:
break;
case GDK_Escape:
case GDK_q:
case GDK_Q:
break;
default:
break;
}
return FALSE;
}
int
{
if (argc == 1) {
usage();
}
struct SPSlideShow ss;
int option,
num_parsed_options = 0;
// the list of arguments is in the net line
{
switch(option) {
case 't': // for timer
// fprintf(stderr, "set timer arg %s\n", optarg );
break;
case '?':
default:
usage();
}
}
GtkWidget *w;
int i;
#ifdef lalaWITH_MODULES
g_warning ("Have to autoinit modules (lauris)");
#endif /* WITH_MODULES */
/* We must set LC_NUMERIC to default, or otherwise */
/* we'll end with localised SVG files :-( */
ss.fullscreen = false;
// starting at where the commandline options stopped parsing because
// we want all the files to be in the list
} else {
#ifdef WITH_INKJAR
for (;;) {
char *c_ptr;
if (last_filename == NULL)
break;
if (*(++c_ptr) == '\0') {
continue;
}
}
//::write(1, gba->data, gba->len);
/* Append to list */
/* Expand */
}
TRUE);
}
} else
break;
}
} else {
#endif /* WITH_INKJAR */
/* Append to list */
/* Expand */
}
/* No loadable documents */
return 1;
}
#ifdef WITH_INKJAR
}
#endif
}
}
return 1; /* none of the slides loadable */
sp_svg_view_widget_set_resize (SP_SVG_VIEW_WIDGET (ss.view), FALSE, sp_document_width (ss.doc), sp_document_height (ss.doc));
gtk_widget_show (w);
gtk_main ();
return 0;
}
static int
{
return FALSE;
}
static GtkWidget *
{
if (!ctrlwin) {
GtkWidget *t, *b;
0, 0);
0, 0);
0, 0);
0, 0);
} else {
}
return NULL;
}
static int
{
return FALSE;
}
static int
{
return FALSE;
}
static int
{
return FALSE;
}
static int
{
return FALSE;
}
static void
{
int current;
}
if (doc) {
}
}
static void
{
int current;
}
if (doc) {
}
}
static void
{
int current = 0;
}
if (doc) {
}
}
static void
{
}
if (doc) {
}
}
#ifdef WITH_INKJAR
static bool
{
initial string "PK\003\004" in content should suffice. */
if (filename_len < 5) {
return false;
}
}
#endif /* WITH_INKJAR */
static void usage()
{
"Usage: inkview [OPTIONS...] [FILES ...]\n"
"\twhere FILES are SVG (.svg or .svgz)"
#ifdef WITH_INKJAR
" or archives of SVGs (.sxw, .jar)"
#endif
"\n\n"
"Available options:\n"
"\t-t\t\tTimer for automatically changing slides in seconds.\n"
"\n");
exit(1);
}
#ifdef XXX
/* TODO !!! make this temporary stub unnecessary */
void inkscape_ref (void) {}
void inkscape_unref (void) {}
Inkscape::XML::Node *inkscape_get_repr (Inkscape::Application *inkscape, const gchar *key) {return NULL;}
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :