]> git.donarmstrong.com Git - xournal.git/blobdiff - src/xournal.h
don't attempt to link with libX11 under MinGW
[xournal.git] / src / xournal.h
index 8e2aff618342384bc35698e46f34a6ecf87d0379..605c8232e133af4c992857e0303b7a3751faae74 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ *  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 software 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 <http://www.gnu.org/licenses/>.
+ */
+
 #include <gtk/gtk.h>
 #include <libgnomecanvas/libgnomecanvas.h>
 #include <poppler/glib/poppler.h>
    and want to list the input events received by xournal. Caution, lots
    of output (redirect to a file). */
 
-#define ENABLE_XINPUT_BUGFIX
-/* comment out this line if you are experiencing calibration problems with
-   XInput and want to try things differently. This will probably break
-   on-the-fly display rotation after application startup, though. */
+// #define ENABLE_XINPUT_BUGFIX
+/* uncomment this line if you are experiencing calibration problems with
+   XInput and want to try things differently. Especially useful on older
+   distributions (up to around 2010). */
+
+#define FILE_DIALOG_SIZE_BUGFIX
+/* ugly, but should help users with versions of GTK+ that suffer from the
+   "tiny file dialog" syndrome, without hurting those with well-behaved
+   versions of GTK+. Comment out if you'd prefer not to include this fix. */
 
 // PREF FILES INFO
 
 #define MRU_SIZE 8 
 #define CONFIG_FILE "config"
 
+// version string for about box
+
+#ifdef WIN32
+#define VERSION_STRING VERSION "-win32"
+#else
+#define VERSION_STRING VERSION
+#endif
+
 // DATA STRUCTURES AND CONSTANTS
 
 #define PIXEL_MOTION_THRESHOLD 0.3
@@ -220,8 +248,10 @@ typedef struct UIData {
   struct Brush default_brushes[NUM_STROKE_TOOLS]; // the default ones
   int linked_brush[NUM_BUTTONS+1]; // whether brushes are linked across buttons
   int cur_mapping; // the current button number for mappings
+  gboolean button_switch_mapping; // button clicks switch button 1 mappings
   gboolean use_erasertip;
   int which_mouse_button; // the mouse button drawing the current path
+  int which_unswitch_button; // if button_switch_mapping, the mouse button that switched the mapping
   struct Page default_page;  // the model for the default page
   int layerbox_length;  // the number of entries registered in the layers combo-box
   struct Item *cur_item; // the item being drawn, or NULL
@@ -237,6 +267,8 @@ typedef struct UIData {
   gboolean pressure_sensitivity; // use pen pressure to control stroke width?
   double width_minimum_multiplier, width_maximum_multiplier; // calibration for pressure sensitivity
   gboolean is_corestroke; // this stroke is painted with core pointer
+  gboolean saved_is_corestroke;
+  GdkDevice *stroke_device; // who's painting this stroke
   int screen_width, screen_height; // initial screen size, for XInput events
   double hand_refpt[2];
   int hand_scrollto_cx, hand_scrollto_cy;
@@ -247,8 +279,7 @@ typedef struct UIData {
   gboolean in_update_page_stuff; // semaphore to avoid scrollbar retroaction
   struct Selection *selection;
   GdkCursor *cursor;
-  gboolean antialias_bg; // bilinear interpolation on bg pixmaps
-  gboolean progressive_bg; // rescale bg's one at a time
+  gboolean progressive_bg; // update PDF bg's one at a time
   char *mrufile, *configfile; // file names for MRU & config
   char *mru[MRU_SIZE]; // MRU data
   GtkWidget *mrumenu[MRU_SIZE];
@@ -260,6 +291,7 @@ typedef struct UIData {
   int zoom_step_increment; // the increment in the zoom dialog box
   double zoom_step_factor; // the multiplicative factor in zoom in/out
   double startup_zoom;
+  gboolean autoload_pdf_xoj;
 #if GLIB_CHECK_VERSION(2,6,0)
   GKeyFile *config_data;
 #endif
@@ -274,6 +306,11 @@ typedef struct UIData {
   gboolean shorten_menus; // shorten menus ?
   gchar *shorten_menu_items; // which items to hide
   gboolean is_sel_cursor; // displaying a selection-related cursor
+  gint pre_fullscreen_width, pre_fullscreen_height; // for win32 fullscreen
+#if GTK_CHECK_VERSION(2,10,0)
+  GtkPrintSettings *print_settings;
+#endif
+  gboolean poppler_force_cairo; // force poppler to use cairo
 } UIData;
 
 #define BRUSH_LINKED 0