~ubuntu-branches/ubuntu/intrepid/gucharmap/intrepid

« back to all changes in this revision

Viewing changes to gucharmap/gucharmap-private.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-23 16:06:03 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20080723160603-v1bhy95d83nushuz
Tags: 1:2.23.4-0ubuntu1
* New Upstream Release (LP: #251505)
* Added python bindings
* updated 01_lpi.dpatch, and 02_autoconf.patch for
  new upstream version
* updated control file for new soname gucharmap7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2004 Noah Levitt
 
3
 * Copyright © 2007 Christian Persch
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify it
 
6
 * under the terms of the GNU General Public License as published by the
 
7
 * Free Software Foundation; either version 2 of the License, or (at your
 
8
 * option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
 * General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along
 
16
 * with this program; if not, write to the Free Software Foundation, Inc.,
 
17
 * 59 Temple Place, Suite 330, Boston, MA 02110-1301  USA
 
18
 */
 
19
 
 
20
#include <gtk/gtk.h>
 
21
 
 
22
#define I_(string) g_intern_static_string (string)
 
23
 
 
24
/* The last unicode character we support */
 
25
#define UNICHAR_MAX (0x0010FFFFUL)
 
26
 
 
27
G_GNUC_INTERNAL void _gucharmap_intl_ensure_initialized (void);
 
28
 
 
29
G_GNUC_INTERNAL gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
 
30
 
 
31
 
 
32
struct _GucharmapChaptersModelPrivate {
 
33
  GucharmapCodepointList *book_list;
 
34
};
 
35
 
 
36
struct _GucharmapChartablePrivate {
 
37
  /* scrollable implementation */
 
38
  GtkAdjustment *vadjustment;
 
39
  gulong vadjustment_changed_handler_id;
 
40
 
 
41
  /* Font */
 
42
  PangoFontDescription *font_desc;
 
43
  int drag_font_size;
 
44
 
 
45
  /* Geometry */
 
46
  int bare_minimal_column_width; /* depends only on font_desc */
 
47
  int bare_minimal_row_height;   /* depends only on font_desc */
 
48
  int minimal_column_width;      /* depends on font_desc and size allocation */
 
49
  int minimal_row_height;        /* depends on font_desc and size allocation */
 
50
  int n_padded_columns;          /* columns 0..n-1 will be 1px wider than minimal_column_width */
 
51
  int n_padded_rows;             /* rows 0..n-1 will be 1px taller than minimal_row_height */
 
52
  int rows;
 
53
  int cols;
 
54
  int page_size;       /* rows * cols */
 
55
 
 
56
  int page_first_cell; /* the cell index of the top left corner */
 
57
  int active_cell;     /* the active cell index */
 
58
  int old_page_first_cell;
 
59
  int old_active_cell;
 
60
 
 
61
  /* Drawing */
 
62
  GdkPixmap *pixmap;
 
63
  PangoLayout *pango_layout;
 
64
 
 
65
  /* Zoom popup */
 
66
  GtkWidget *zoom_window;
 
67
  GtkWidget *zoom_image;
 
68
 
 
69
  /* for dragging (#114534) */
 
70
  gdouble click_x, click_y; 
 
71
 
 
72
  GtkTargetList *target_list;
 
73
 
 
74
  GucharmapCodepointList *codepoint_list;
 
75
  int last_cell; /* from gucharmap_codepoint_list_get_last_index */
 
76
  gboolean codepoint_list_changed;
 
77
 
 
78
  /* Settings */
 
79
  guint snap_pow2_enabled : 1;
 
80
  guint zoom_mode_enabled : 1;
 
81
};
 
82
 
 
83
gint _gucharmap_chartable_cell_column   (GucharmapChartable *chartable,
 
84
                                         guint cell);
 
85
gint _gucharmap_chartable_column_width  (GucharmapChartable *chartable,
 
86
                                         gint col);
 
87
gint _gucharmap_chartable_x_offset      (GucharmapChartable *chartable,
 
88
                                         gint col);
 
89
gint _gucharmap_chartable_row_height    (GucharmapChartable *chartable,
 
90
                                         gint row);
 
91
gint _gucharmap_chartable_y_offset      (GucharmapChartable *chartable,
 
92
                                         gint row);
 
93
void _gucharmap_chartable_redraw        (GucharmapChartable *chartable,
 
94
                                         gboolean move_zoom);