~ubuntu-branches/debian/jessie/gpaint/jessie

« back to all changes in this revision

Viewing changes to src/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Goedson Teixeira Paixao
  • Date: 2002-03-17 12:27:19 UTC
  • Revision ID: james.westby@ubuntu.com-20020317122719-a6mowwhvvtbmcxow
Tags: upstream-0.2.2
ImportĀ upstreamĀ versionĀ 0.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
    Copyright 2000  Li-Cheng (Andy) Tai
 
4
 
 
5
    This program is free software; you can redistribute it and/or modify
 
6
    it under the terms of the GNU General Public License as published by
 
7
    the Free Software Foundation; either version 2 of the License, or
 
8
    (at your option) any later version.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU General Public License
 
16
    along with this program; if not, write to the Free Software
 
17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
*/
 
19
 
 
20
#ifndef __UTIL_H__
 
21
#define __UTIL_H__
 
22
 
 
23
#include <gtk/gtk.h>
 
24
#include "image_buf.h"
 
25
#include "fileio.h"
 
26
 
 
27
#define DEFAULT_WIDTH 640
 
28
#define DEFAULT_HEIGHT 480
 
29
 
 
30
extern GdkCursor *busy_cursor, *arrow_cursor; 
 
31
 
 
32
#define PROCESSING_GTK_EVENTS    while (gtk_events_pending()) gtk_main_iteration();
 
33
 
 
34
GtkWidget *widget_get_toplevel_parent(GtkWidget *widget);
 
35
 
 
36
image_buf *widget_get_image(GtkWidget *widget);
 
37
 
 
38
void new_canvas();
 
39
 
 
40
GtkWidget *create_scroll_frame_widget(void);
 
41
GtkWidget *create_scroll_frame_widget_content(GtkWidget *, GtkWidget *);
 
42
 
 
43
void open_canvas(image_buf *ibuf);
 
44
 
 
45
void save_canvas(image_buf *ibuf, int saveas);
 
46
 
 
47
 
 
48
void set_button_pixmap(GtkButton *button, unsigned char **pixmap);
 
49
 
 
50
void set_drawing_tool(image_buf *, DRAWING_TOOL);
 
51
 
 
52
void select_toolbar_toggle_button(GtkToggleButton *selected, int setmode);
 
53
 
 
54
void StateTimeStep();
 
55
 
 
56
 
 
57
void handle_button_press(image_buf *, int x, int y);
 
58
void handle_button_move(image_buf *, int x, int y);
 
59
void handle_button_release(image_buf *, int x, int y);
 
60
 
 
61
void handle_key_release(image_buf *, GdkEventKey *);
 
62
 
 
63
int handle_timeout(image_buf * );
 
64
 
 
65
void image_buf_set_tool(image_buf *ibuf, DRAWING_TOOL tool);
 
66
 
 
67
void image_buf_set_fill(image_buf *ibuf, int filled);
 
68
 
 
69
void image_buf_clear_flash(image_buf *ibuf);
 
70
 
 
71
void image_buf_select_all(image_buf *ibuf);
 
72
 
 
73
void spreadimage(image_buf * input, image_buf *output);
 
74
 
 
75
void GdkColor_to_rgb(const GdkColor *color, unsigned char *r, unsigned char *g, unsigned char *b);
 
76
 
 
77
void image_buf_clear(image_buf *ibuf);
 
78
 
 
79
void draw_rectangle(GdkDrawable *d, GdkGC *gc, gint filled, gint x1, gint y1, gint x2, gint y2);
 
80
 
 
81
void draw_palette_entry(image_buf *ibuf, GtkWidget *palette_entry);
 
82
 
 
83
 
 
84
void image_buf_save_tool(image_buf *);
 
85
void image_buf_restore_tool(image_buf *);
 
86
 
 
87
void image_buf_enter_paste_mode(image_buf *);
 
88
void image_buf_leave_paste_mode(image_buf *);
 
89
 
 
90
void image_buf_put_region_image(image_buf *, int, int);
 
91
 
 
92
void image_buf_draw_dynamic_image(image_buf *, GdkPixbuf *, int, int);
 
93
void image_buf_erase_dynamic_image(image_buf *, GdkPixbuf *, int, int);
 
94
 
 
95
void image_buf_flip_x_region(image_buf *);
 
96
void image_buf_flip_y_region(image_buf *);
 
97
void image_buf_rotate_region(image_buf *, double rad);
 
98
 
 
99
GdkRectangle compute_cover_rect(GdkPoint *pts, int num_pts);
 
100
 
 
101
void image_buf_adjust_according_to_points(image_buf *ibuf, int *, int *);
 
102
 
 
103
void image_buf_get_desktop(image_buf *);
 
104
 
 
105
void image_buf_set_desktop_background(image_buf*, int);
 
106
 
 
107
void pts_flip_x(GdkPoint *, int);
 
108
void pts_flip_y(GdkPoint *, int);
 
109
void pixbuf_flip_x(GdkPixbuf**);
 
110
void pixbuf_flip_y(GdkPixbuf**);
 
111
void pixbuf_apply_matrix22(GdkPixbuf **pixbuf, double matrix[2][2]);
 
112
void pts_apply_matrix22(GdkPoint *pts, int num_pts, double matrix[2][2]);
 
113
 
 
114
void image_buf_force_select_region(image_buf *ibuf);
 
115
 
 
116
void image_buf_paint_interpolate(image_buf *ibuf, int x, int y);
 
117
 
 
118
 
 
119
#endif