gboolean pixbuf_to_file_as_png(GdkPixbuf *pixbuf, const gchar *filename)
{
GError *error = NULL;
- gint ret;
+ gboolean ret;
if (!pixbuf || !filename) return FALSE;
return TRUE;
}
-gint pixbuf_scale_aspect(gint req_w, gint req_h, gint old_w, gint old_h,
- gint *new_w, gint *new_h)
+gboolean pixbuf_scale_aspect(gint req_w, gint req_h,
+ gint old_w, gint old_h,
+ gint *new_w, gint *new_h)
{
if (((gdouble)req_w / old_w) < ((gdouble)req_h / old_h))
{
*-----------------------------------------------------------------------------
*/
-gint util_clip_region(gint x, gint y, gint w, gint h,
- gint clip_x, gint clip_y, gint clip_w, gint clip_h,
- gint *rx, gint *ry, gint *rw, gint *rh)
+gboolean util_clip_region(gint x, gint y, gint w, gint h,
+ gint clip_x, gint clip_y, gint clip_w, gint clip_h,
+ gint *rx, gint *ry, gint *rw, gint *rh)
{
if (clip_x + clip_w <= x ||
clip_x >= x + w ||
static void pixbuf_copy_block_rotate(guchar *src, gint src_row_stride, gint x, gint y,
guchar *dest, gint dest_row_stride, gint w, gint h,
- gint bytes_per_pixel, gint counter_clockwise)
+ gint bytes_per_pixel, gboolean counter_clockwise)
{
gint i, j;
guchar *sp;
* Returns a copy of pixbuf src rotated 90 degrees clockwise or 90 counterclockwise
*
*/
-GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gint counter_clockwise)
+GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gboolean counter_clockwise)
{
GdkPixbuf *dest;
- gint has_alpha;
+ gboolean has_alpha;
gint sw, sh, srs;
gint dw, dh, drs;
guchar *s_pix;
* TO do a 180 degree rotations set both mirror and flipped TRUE
* if mirror and flip are FALSE, result is a simple copy.
*/
-GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gint mirror, gint flip)
+GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gboolean mirror, gboolean flip)
{
GdkPixbuf *dest;
- gint has_alpha;
+ gboolean has_alpha;
gint w, h, srs;
gint drs;
guchar *s_pix;
gint x, gint y, gint w, gint h,
gint r, gint g, gint b, gint a)
{
- gint p_alpha;
+ gboolean has_alpha;
gint pw, ph, prs;
guchar *p_pix;
guchar *pp;
if (x < 0 || x + w > pw) return;
if (y < 0 || y + h > ph) return;
- p_alpha = gdk_pixbuf_get_has_alpha(pb);
+ has_alpha = gdk_pixbuf_get_has_alpha(pb);
prs = gdk_pixbuf_get_rowstride(pb);
p_pix = gdk_pixbuf_get_pixels(pb);
for (i = 0; i < h; i++)
{
- pp = p_pix + (y + i) * prs + (x * (p_alpha ? 4 : 3));
+ pp = p_pix + (y + i) * prs + (x * (has_alpha ? 4 : 3));
for (j = 0; j < w; j++)
{
*pp = (r * a + *pp * (256-a)) >> 8;
pp++;
*pp = (b * a + *pp * (256-a)) >> 8;
pp++;
- if (p_alpha) pp++;
+ if (has_alpha) pp++;
}
}
}
gint x, gint y, gint w, gint h,
gint r, gint g, gint b, gint a)
{
- gint p_alpha;
+ gboolean has_alpha;
gint pw, ph, prs;
guchar *p_pix;
guchar *pp;
if (x < 0 || x + w > pw) return;
if (y < 0 || y + h > ph) return;
- p_alpha = gdk_pixbuf_get_has_alpha(pb);
+ has_alpha = gdk_pixbuf_get_has_alpha(pb);
prs = gdk_pixbuf_get_rowstride(pb);
p_pix = gdk_pixbuf_get_pixels(pb);
for (i = 0; i < h; i++)
{
- pp = p_pix + (y + i) * prs + (x * (p_alpha ? 4 : 3));
+ pp = p_pix + (y + i) * prs + (x * (has_alpha ? 4 : 3));
for (j = 0; j < w; j++)
{
*pp = r; pp++;
*pp = g; pp++;
*pp = b; pp++;
- if (p_alpha) { *pp = a; pp++; }
+ if (has_alpha) { *pp = a; pp++; }
}
}
}
void pixbuf_pixel_set(GdkPixbuf *pb, gint x, gint y, gint r, gint g, gint b, gint a)
{
guchar *buf;
- gint has_alpha;
+ gboolean has_alpha;
gint rowstride;
guchar *p;
guint8 r, guint8 g, guint8 b, guint8 a)
{
gint sw, sh, srs;
- gint s_alpha;
+ gboolean s_alpha;
gint s_step;
guchar *s_pix;
gint dw, dh, drs;
- gint d_alpha;
+ gboolean d_alpha;
gint d_step;
guchar *d_pix;
gint x1, gint y1, gint x2, gint y2, gint x3, gint y3,
guint8 r, guint8 g, guint8 b, guint8 a)
{
- gint p_alpha;
+ gboolean has_alpha;
gint pw, ph, prs;
gint rx, ry, rw, rh;
gint tx, ty, tw, th;
fx2 = fx1 + fw;
fy2 = fy1 + fh;
- p_alpha = gdk_pixbuf_get_has_alpha(pb);
+ has_alpha = gdk_pixbuf_get_has_alpha(pb);
prs = gdk_pixbuf_get_rowstride(pb);
p_pix = gdk_pixbuf_get_pixels(pb);
- p_step = (p_alpha) ? 4 : 3;
+ p_step = (has_alpha) ? 4 : 3;
if (y1 > y2)
{
pp++;
*pp = (b * a + *pp * (256-a)) >> 8;
pp++;
- if (p_alpha) pp++;
+ if (has_alpha) pp++;
xa++;
}
*-----------------------------------------------------------------------------
*/
-static gint util_clip_line(gdouble clip_x, gdouble clip_y, gdouble clip_w, gdouble clip_h,
- gdouble x1, gdouble y1, gdouble x2, gdouble y2,
- gdouble *rx1, gdouble *ry1, gdouble *rx2, gdouble *ry2)
+static gboolean util_clip_line(gdouble clip_x, gdouble clip_y, gdouble clip_w, gdouble clip_h,
+ gdouble x1, gdouble y1, gdouble x2, gdouble y2,
+ gdouble *rx1, gdouble *ry1, gdouble *rx2, gdouble *ry2)
{
gboolean flip = FALSE;
gdouble d;
gint x1, gint y1, gint x2, gint y2,
guint8 r, guint8 g, guint8 b, guint8 a)
{
- gint p_alpha;
+ gboolean has_alpha;
gint pw, ph, prs;
gint rx, ry, rw, rh;
gdouble rx1, ry1, rx2, ry2;
cx2 = rx + rw;
cy2 = ry + rh;
- p_alpha = gdk_pixbuf_get_has_alpha(pb);
+ has_alpha = gdk_pixbuf_get_has_alpha(pb);
prs = gdk_pixbuf_get_rowstride(pb);
p_pix = gdk_pixbuf_get_pixels(pb);
- p_step = (p_alpha) ? 4 : 3;
+ p_step = (has_alpha) ? 4 : 3;
if (fabs(rx2 - rx1) > fabs(ry2 - ry1))
{
*-----------------------------------------------------------------------------
*/
-static void pixbuf_draw_fade_linear(guchar *p_pix, gint prs, gint p_alpha,
- gint s, gint vertical, gint border,
+static void pixbuf_draw_fade_linear(guchar *p_pix, gint prs, gboolean has_alpha,
+ gint s, gboolean vertical, gint border,
gint x1, gint y1, gint x2, gint y2,
guint8 r, guint8 g, guint8 b, guint8 a)
{
guint8 n = a;
gint i, j;
- p_step = (p_alpha) ? 4 : 3;
+ p_step = (has_alpha) ? 4 : 3;
for (j = y1; j < y2; j++)
{
pp = p_pix + j * prs + x1 * p_step;
pp++;
*pp = (b * n + *pp * (256-n)) >> 8;
pp++;
- if (p_alpha) pp++;
+ if (has_alpha) pp++;
}
}
}
-static void pixbuf_draw_fade_radius(guchar *p_pix, gint prs, gint p_alpha,
+static void pixbuf_draw_fade_radius(guchar *p_pix, gint prs, gboolean has_alpha,
gint sx, gint sy, gint border,
gint x1, gint y1, gint x2, gint y2,
guint8 r, guint8 g, guint8 b, guint8 a)
gint p_step;
gint i, j;
- p_step = (p_alpha) ? 4 : 3;
+ p_step = (has_alpha) ? 4 : 3;
for (j = y1; j < y2; j++)
{
pp = p_pix + j * prs + x1 * p_step;
pp++;
*pp = (b * n + *pp * (256-n)) >> 8;
pp++;
- if (p_alpha) pp++;
+ if (has_alpha) pp++;
}
}
}
gint x, gint y, gint w, gint h, gint border,
guint8 r, guint8 g, guint8 b, guint8 a)
{
- gint p_alpha;
+ gint has_alpha;
gint pw, ph, prs;
gint rx, ry, rw, rh;
gint fx, fy, fw, fh;
clip_x, clip_y, clip_w, clip_h,
&rx, &ry, &rw, &rh)) return;
- p_alpha = gdk_pixbuf_get_has_alpha(pb);
+ has_alpha = gdk_pixbuf_get_has_alpha(pb);
prs = gdk_pixbuf_get_rowstride(pb);
p_pix = gdk_pixbuf_get_pixels(pb);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_linear(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_linear(p_pix, prs, has_alpha,
x + border, TRUE, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_linear(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_linear(p_pix, prs, has_alpha,
x + w - border, TRUE, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_linear(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_linear(p_pix, prs, has_alpha,
y + border, FALSE, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_linear(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_linear(p_pix, prs, has_alpha,
y + h - border, FALSE, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_radius(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_radius(p_pix, prs, has_alpha,
x + border, y + border, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_radius(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_radius(p_pix, prs, has_alpha,
x + w - border, y + border, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_radius(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_radius(p_pix, prs, has_alpha,
x + border, y + h - border, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
rx, ry, rw, rh,
&fx, &fy, &fw, &fh))
{
- pixbuf_draw_fade_radius(p_pix, prs, p_alpha,
+ pixbuf_draw_fade_radius(p_pix, prs, has_alpha,
x + w - border, y + h - border, border,
fx, fy, fx + fw, fy + fh,
r, g, b, a);
void pixbuf_desaturate_rect(GdkPixbuf *pb,
gint x, gint y, gint w, gint h)
{
- gint p_alpha;
+ gboolean has_alpha;
gint pw, ph, prs;
guchar *p_pix;
guchar *pp;
if (x < 0 || x + w > pw) return;
if (y < 0 || y + h > ph) return;
- p_alpha = gdk_pixbuf_get_has_alpha(pb);
+ has_alpha = gdk_pixbuf_get_has_alpha(pb);
prs = gdk_pixbuf_get_rowstride(pb);
p_pix = gdk_pixbuf_get_pixels(pb);
for (i = 0; i < h; i++)
{
- pp = p_pix + (y + i) * prs + (x * (p_alpha ? 4 : 3));
+ pp = p_pix + (y + i) * prs + (x * (has_alpha ? 4 : 3));
for (j = 0; j < w; j++)
{
guint8 grey;
pp++;
*pp = grey;
pp++;
- if (p_alpha) pp++;
+ if (has_alpha) pp++;
}
}
}
GdkPixbuf *pixbuf_inline(const gchar *key);
GdkPixbuf *pixbuf_fallback(FileData *fd, gint requested_width, gint requested_height);
-gint pixbuf_scale_aspect(gint req_w, gint req_h, gint old_w, gint old_h, gint *new_w, gint *new_h);
+gboolean pixbuf_scale_aspect(gint req_w, gint req_h, gint old_w, gint old_h, gint *new_w, gint *new_h);
#define PIXBUF_INLINE_FOLDER_CLOSED "folder_closed"
#define PIXBUF_INLINE_FOLDER_LOCKED "folder_locked"
#define PIXBUF_INLINE_ICON_VIEW "icon_view"
-GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gint counter_clockwise);
-GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gint mirror, gint flip);
+GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gboolean counter_clockwise);
+GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gboolean mirror, gboolean flip);
GdkPixbuf* pixbuf_apply_orientation(GdkPixbuf *pixbuf, gint orientation);
void pixbuf_draw_rect_fill(GdkPixbuf *pb,
/* clipping utils */
-gint util_clip_region(gint x, gint y, gint w, gint h,
- gint clip_x, gint clip_y, gint clip_w, gint clip_h,
- gint *rx, gint *ry, gint *rw, gint *rh);
+gboolean util_clip_region(gint x, gint y, gint w, gint h,
+ gint clip_x, gint clip_y, gint clip_w, gint clip_h,
+ gint *rx, gint *ry, gint *rw, gint *rh);
void util_clip_triangle(gint x1, gint y1, gint x2, gint y2, gint x3, gint y3,
gint *rx, gint *ry, gint *rw, gint *rh);
filter_store = NULL;
}
-static gint config_window_delete(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gboolean config_window_delete(GtkWidget *widget, GdkEventAny *event, gpointer data)
{
config_window_close_cb(NULL, NULL);
return TRUE;
}
static void filter_store_class_edit_cb(GtkCellRendererText *cell, gchar *path_str,
- gchar *new_text, gpointer data)
+ gchar *new_text, gpointer data)
{
-
GtkWidget *model = data;
FilterEntry *fe = data;
GtkTreePath *tpath;
GtkTreeIter iter;
gint i;
- if (!new_text || strlen(new_text) < 1) return;
+ if (!new_text || !new_text[0]) return;
tpath = gtk_tree_path_new_from_string(path_str);
gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath);
GtkTreePath *tpath;
GtkTreeIter iter;
- if (!new_text || strlen(new_text) < 1) return;
+ if (!new_text || !new_text[0]) return;
tpath = gtk_tree_path_new_from_string(path_str);
gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, tpath);
}
static void filter_store_writable_cb(GtkCellRendererToggle *renderer,
- gchar *path_str, gpointer data)
+ gchar *path_str, gpointer data)
{
GtkWidget *model = data;
FilterEntry *fe;
}
static void filter_store_sidecar_cb(GtkCellRendererToggle *renderer,
- gchar *path_str, gpointer data)
+ gchar *path_str, gpointer data)
{
GtkWidget *model = data;
FilterEntry *fe;
static GtkWidget *about = NULL;
-static gint about_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+static gboolean about_delete_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
{
gtk_widget_destroy(about);
about = NULL;
/* misc utils */
-static gint clip_region(gdouble x1, gdouble y1, gdouble w1, gdouble h1,
- gdouble x2, gdouble y2, gdouble w2, gdouble h2,
- gdouble *rx, gdouble *ry, gdouble *rw, gdouble *rh)
+static gboolean clip_region(gdouble x1, gdouble y1, gdouble w1, gdouble h1,
+ gdouble x2, gdouble y2, gdouble w2, gdouble h2,
+ gdouble *rx, gdouble *ry, gdouble *rw, gdouble *rh)
{
if (x2 + w2 <= x1 || x2 >= x1 + w1 ||
y2 + h2 <= y1 || y2 >= y1 + h1)
g_free(pe);
}
-static gint pipe_handler_check(PipeError *pe)
+static gboolean pipe_handler_check(PipeError *pe)
{
if (!pe) return FALSE;
- return *pe->error;
+ return !!(*pe->error);
}
static FILE *print_job_ps_fd(PrintWindow *pw)
return NULL;
}
-static gint print_job_ps_init(PrintWindow *pw)
+static gboolean print_job_ps_init(PrintWindow *pw)
{
FILE *f;
PipeError *pe;
const gchar *cmd = NULL;
const gchar *path = NULL;
gchar *lc_pointer;
- gint ret;
+ gboolean ret;
if (pw->job_file != NULL || pw->job_pipe != NULL) return FALSE;
return ret;
}
-static gint print_job_ps_page_new(PrintWindow *pw, gint page)
+static gboolean print_job_ps_page_new(PrintWindow *pw, gint page)
{
FILE *f;
PipeError *pe;
gchar *lc_pointer;
- gint ret;
+ gboolean ret;
f= print_job_ps_fd(pw);
if (!f) return FALSE;
return ret;
}
-static gint print_job_ps_page_done(PrintWindow *pw)
+static gboolean print_job_ps_page_done(PrintWindow *pw)
{
FILE *f;
PipeError *pe;
gchar *lc_pointer;
- gint ret;
+ gboolean ret;
f = print_job_ps_fd(pw);
if (!f) return FALSE;
g_fprintf(f, "%s", text);
}
-static gint print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
- gdouble x, gdouble y, gdouble w, gdouble h,
- gdouble offx, gdouble offy)
+static gboolean print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
+ gdouble x, gdouble y, gdouble w, gdouble h,
+ gdouble offx, gdouble offy)
{
FILE *f;
PipeError *pe;
gint c;
guchar *p;
guchar bps_buf[3];
- gint ret;
+ gboolean ret;
if (!pixbuf) return TRUE;
g_fprintf(f, "closepath\n");
}
-static gint print_job_ps_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
- gdouble x, gdouble y, gdouble width,
- guint8 r, guint8 g, guint8 b)
+static gboolean print_job_ps_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
+ gdouble x, gdouble y, gdouble width,
+ guint8 r, guint8 g, guint8 b)
{
FILE *f;
PipeError *pe;
gchar *lc_pointer;
- gint ret;
+ gboolean ret;
if (!text) return TRUE;
return ret;
}
-static gint print_job_ps_end(PrintWindow *pw)
+static gboolean print_job_ps_end(PrintWindow *pw)
{
FILE *f;
PipeError *pe;
gchar *lc_pointer;
- gint ret;
+ gboolean ret;
f = print_job_ps_fd(pw);
if (!f) return FALSE;
*-----------------------------------------------------------------------------
*/
-static gint print_job_rgb_page_new(PrintWindow *pw, gint page)
+static gboolean print_job_rgb_page_new(PrintWindow *pw, gint page)
{
gint total;
return (pw->job_path != NULL);
}
-static gint print_job_rgb_page_done(PrintWindow *pw)
+static gboolean print_job_rgb_page_done(PrintWindow *pw)
{
gchar *pathl;
gboolean ret = FALSE;
return ret;
}
-static gint print_job_rgb_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
- gdouble x, gdouble y, gdouble w, gdouble h,
- gdouble offx, gdouble offy)
+static gboolean print_job_rgb_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
+ gdouble x, gdouble y, gdouble w, gdouble h,
+ gdouble offx, gdouble offy)
{
gdouble sw, sh;
gdouble dw, dh;
return points * 72.0 / dpi;
}
-static gint print_job_rgb_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
- gdouble x, gdouble y, gdouble width,
- guint8 r, guint8 g, guint8 b)
+static gboolean print_job_rgb_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
+ gdouble x, gdouble y, gdouble width,
+ guint8 r, guint8 g, guint8 b)
{
PangoLayout *layout;
PangoFontDescription *desc;
return TRUE;
}
-static gint print_job_rgb_init(PrintWindow *pw)
+static gboolean print_job_rgb_init(PrintWindow *pw)
{
if (pw->job_pixbuf) g_object_unref(pw->job_pixbuf);
pw->job_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
*-----------------------------------------------------------------------------
*/
-static gint print_job_preview_page_new(PrintWindow *pw, gint page)
+static gboolean print_job_preview_page_new(PrintWindow *pw, gint page)
{
GdkPixbuf *pixbuf;
gint w, h;
return TRUE;
}
-static gint print_job_preview_page_done(PrintWindow *pw)
+static gboolean print_job_preview_page_done(PrintWindow *pw)
{
return TRUE;
}
-static gint print_job_preview_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
- gdouble x, gdouble y, gdouble w, gdouble h,
- gdouble offx, gdouble offy)
+static gboolean print_job_preview_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
+ gdouble x, gdouble y, gdouble w, gdouble h,
+ gdouble offx, gdouble offy)
{
gdouble sw, sh;
gdouble dw, dh;
return TRUE;
}
-static gint print_job_preview_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
- gdouble x, gdouble y, gdouble width,
- guint8 r, guint8 g, guint8 b)
+static gboolean print_job_preview_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
+ gdouble x, gdouble y, gdouble width,
+ guint8 r, guint8 g, guint8 b)
{
PangoLayout *layout;
PangoFontDescription *desc;
return TRUE;
}
-static gint print_job_preview_init(PrintWindow *pw)
+static gboolean print_job_preview_init(PrintWindow *pw)
{
if (pw->job_pixbuf) g_object_unref(pw->job_pixbuf);
pw->job_pixbuf = image_get_pixbuf(pw->layout_image);
*-----------------------------------------------------------------------------
*/
-static gint print_job_page_new(PrintWindow *pw)
+static gboolean print_job_page_new(PrintWindow *pw)
{
switch (pw->job_format)
{
return FALSE;
}
-static gint print_job_page_done(PrintWindow *pw)
+static gboolean print_job_page_done(PrintWindow *pw)
{
switch (pw->job_format)
{
return FALSE;
}
-static gint print_job_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
- gdouble x, gdouble y, gdouble w, gdouble h,
- gdouble offx, gdouble offy)
+static gboolean print_job_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
+ gdouble x, gdouble y, gdouble w, gdouble h,
+ gdouble offx, gdouble offy)
{
gboolean success = FALSE;
return success;
}
-static gint print_job_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
- gdouble x, gdouble y, gdouble width,
- guint8 r, guint8 g, guint8 b)
+static gboolean print_job_page_text(PrintWindow *pw, const gchar *text, gdouble point_size,
+ gdouble x, gdouble y, gdouble width,
+ guint8 r, guint8 g, guint8 b)
{
gboolean success = TRUE;
*-----------------------------------------------------------------------------
*/
-static gint print_job_render_image(PrintWindow *pw);
-static gint print_job_render_proof(PrintWindow *pw);
+static gboolean print_job_render_image(PrintWindow *pw);
+static gboolean print_job_render_proof(PrintWindow *pw);
static void print_job_status(PrintWindow *pw)
print_job_close(pw, FALSE);
}
-static gint print_job_text_image(PrintWindow *pw, const gchar *path,
- gdouble x, gdouble y, gdouble width,
- gint sw, gint sh, gint proof)
+static gboolean print_job_text_image(PrintWindow *pw, const gchar *path,
+ gdouble x, gdouble y, gdouble width,
+ gint sw, gint sh, gint proof)
{
GString *string;
gboolean space = FALSE;
gboolean newline = FALSE;
- gint ret;
+ gboolean ret;
if (pw->text_fields == 0) return TRUE;
}
}
-static gint print_job_render_image(PrintWindow *pw)
+static gboolean print_job_render_image(PrintWindow *pw)
{
FileData *fd = NULL;
}
}
-static gint print_job_render_proof(PrintWindow *pw)
+static gboolean print_job_render_proof(PrintWindow *pw)
{
FileData *fd = NULL;
static void print_job_render(PrintWindow *pw)
{
gdouble proof_w, proof_h;
- gint finished;
+ gboolean finished;
pw->proof_position = 0;
if (finished) print_job_done(pw);
}
-static gint print_job_init(PrintWindow *pw)
+static gboolean print_job_init(PrintWindow *pw)
{
gboolean success = FALSE;
return success;
}
-static gint print_job_finish(PrintWindow *pw)
+static gboolean print_job_finish(PrintWindow *pw)
{
gboolean success = FALSE;
pref_list_double_set(PRINT_PREF_GROUP, PRINT_PREF_IMAGE_SCALE, pw->image_scale);
}
-static gint print_job_start(PrintWindow *pw, RenderFormat format, PrintOutput output)
+static gboolean print_job_start(PrintWindow *pw, RenderFormat format, PrintOutput output)
{
GtkWidget *hbox;
GtkWidget *spinner;
*/
static GtkWidget *print_paper_menu(GtkWidget *table, gint column, gint row,
- gint preferred, GCallback func, gpointer data)
+ PaperOrientation preferred, GCallback func, gpointer data)
{
GtkWidget *combo;
gint i;
pw->max_dpi = (gdouble)n;
}
-static void print_text_field_set(PrintWindow *pw, TextInfo field, gint active)
+static void print_text_field_set(PrintWindow *pw, TextInfo field, gboolean active)
{
if (active)
{
static void print_text_cb_name(GtkWidget *widget, gpointer data)
{
PrintWindow *pw = data;
- gint active;
+ gboolean active;
active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
print_text_field_set(pw, TEXT_INFO_FILENAME, active);
static void print_text_cb_path(GtkWidget *widget, gpointer data)
{
PrintWindow *pw = data;
- gint active;
+ gboolean active;
active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
print_text_field_set(pw, TEXT_INFO_FILEPATH, active);
static void print_text_cb_date(GtkWidget *widget, gpointer data)
{
PrintWindow *pw = data;
- gint active;
+ gboolean active;
active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
print_text_field_set(pw, TEXT_INFO_FILEDATE, active);
static void print_text_cb_size(GtkWidget *widget, gpointer data)
{
PrintWindow *pw = data;
- gint active;
+ gboolean active;
active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
print_text_field_set(pw, TEXT_INFO_FILESIZE, active);
static void print_text_cb_dims(GtkWidget *widget, gpointer data)
{
PrintWindow *pw = data;
- gint active;
+ gboolean active;
active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
print_text_field_set(pw, TEXT_INFO_DIMENSIONS, active);