1 // data manipulation misc functions
3 struct Page
*new_page(struct Page
*template);
4 struct Page
*new_page_with_bg(struct Background
*bg
, double width
, double height
);
5 void realloc_cur_path(int n
);
6 void realloc_cur_widths(int n
);
7 void clear_redo_stack(void);
8 void clear_undo_stack(void);
9 void prepare_new_undo(void);
10 void delete_journal(struct Journal
*j
);
11 void delete_page(struct Page
*pg
);
12 void delete_layer(struct Layer
*l
);
16 struct Refstring
*new_refstring(const char *s
);
17 struct Refstring
*refstring_ref(struct Refstring
*rs
);
18 void refstring_unref(struct Refstring
*rs
);
22 void get_pointer_coords(GdkEvent
*event
, double *ret
);
23 double get_pressure_multiplier(GdkEvent
*event
);
24 void fix_xinput_coords(GdkEvent
*event
);
25 void update_item_bbox(struct Item
*item
);
26 void make_page_clipbox(struct Page
*pg
);
27 void make_canvas_items(void);
28 void make_canvas_item_one(GnomeCanvasGroup
*group
, struct Item
*item
);
29 void update_canvas_bg(struct Page
*pg
);
30 gboolean
is_visible(struct Page
*pg
);
31 void rescale_bg_pixmaps(void);
33 gboolean
have_intersect(struct BBox
*a
, struct BBox
*b
);
34 void lower_canvas_item_to(GnomeCanvasGroup
*g
, GnomeCanvasItem
*item
, GnomeCanvasItem
*after
);
36 void rgb_to_gdkcolor(guint rgba
, GdkColor
*color
);
37 guint32
gdkcolor_to_rgba(GdkColor gdkcolor
, guint16 alpha
);
39 // interface misc functions
41 void update_thickness_buttons(void);
42 void update_color_buttons(void);
43 void update_tool_buttons(void);
44 void update_tool_menu(void);
45 void update_ruler_indicator(void);
46 void update_color_menu(void);
47 void update_pen_props_menu(void);
48 void update_eraser_props_menu(void);
49 void update_highlighter_props_menu(void);
50 void update_mappings_menu_linkings(void);
51 void update_mappings_menu(void);
52 void update_page_stuff(void);
53 void update_toolbar_and_menu(void);
54 void update_file_name(char *filename
);
55 void update_undo_redo_enabled(void);
56 void update_copy_paste_enabled(void);
57 void update_vbox_order(int *order
);
59 gchar
*make_cur_font_name(void);
60 void update_font_button(void);
62 void update_mapping_linkings(int toolno
);
63 void do_switch_page(int pg
, gboolean rescroll
, gboolean refresh_all
);
64 void set_cur_color(int color_no
, guint color_rgba
);
65 void recolor_temp_text(int color_no
, guint color_rgba
);
66 void process_color_activate(GtkMenuItem
*menuitem
, int color_no
, guint color_rgba
);
67 void process_thickness_activate(GtkMenuItem
*menuitem
, int tool
, int val
);
68 void process_papercolor_activate(GtkMenuItem
*menuitem
, int color
, guint rgba
);
69 void process_paperstyle_activate(GtkMenuItem
*menuitem
, int style
);
71 gboolean
ok_to_close(void);
73 void reset_focus(void);
75 // selection / clipboard stuff
77 void reset_selection(void);
78 void move_journal_items_by(GList
*itemlist
, double dx
, double dy
,
79 struct Layer
*l1
, struct Layer
*l2
, GList
*depths
);
80 void resize_journal_items_by(GList
*itemlist
, double scaling_x
, double scaling_y
,
81 double offset_x
, double offset_y
);
84 // switch between mappings
86 void switch_mapping(int m
);
87 void process_mapping_activate(GtkMenuItem
*menuitem
, int m
, int tool
);
89 // always allow accels
90 void allow_all_accels(void);
91 gboolean
can_accel(GtkWidget
*widget
, guint id
, gpointer data
);
92 void add_scroll_bindings(void);
94 gboolean
is_event_within_textview(GdkEventButton
*event
);
96 void hide_unimplemented(void);
98 void do_fullscreen(gboolean active
);
100 // fix GTK+ 2.16/2.17 issues with XInput events
101 gboolean
filter_extended_events(GtkWidget
*widget
, GdkEvent
*event
, gpointer user_data
);
102 // gboolean fix_extended_events(GtkWidget *widget, GdkEvent *event, gpointer user_data);
105 gboolean
handle_activate_signal(GtkWidget
*widget
, gpointer user_data
);
106 void unset_flags(GtkWidget
*w
, gpointer flag
);
107 gboolean
intercept_activate_events(GtkWidget
*w
, GdkEvent
*ev
, gpointer data
);
108 void install_focus_hooks(GtkWidget
*w
, gpointer data
);
110 // wrapper for a function no longer provided by poppler 0.17+
112 wrapper_poppler_page_render_to_pixbuf (PopplerPage
*page
,
113 int src_x
, int src_y
,
114 int src_width
, int src_height
,
119 // defines for paper rulings
121 #define RULING_MARGIN_COLOR 0xff0080ff
122 #define RULING_COLOR 0x40a0ffff
123 #define RULING_THICKNESS 0.5
124 #define RULING_LEFTMARGIN 72.0
125 #define RULING_TOPMARGIN 80.0
126 #define RULING_SPACING 24.0
127 #define RULING_BOTTOMMARGIN RULING_SPACING
128 #define RULING_GRAPHSPACING 14.17