static void image_click_cb(PixbufRenderer *UNUSED(pr), GdkEventButton *event, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
if (!options->image_lm_click_nav && event->button == MOUSE_BUTTON_MIDDLE)
{
imd->mouse_wheel_mode = !imd->mouse_wheel_mode;
static void image_press_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
LayoutWindow *lw;
gint x_pixel, y_pixel;
static void image_drag_cb(PixbufRenderer *pr, GdkEventMotion *event, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
gint width, height;
gint rect_width;
gint rect_height;
static void image_scroll_notify_cb(PixbufRenderer *pr, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
if (imd->func_scroll_notify && pr->scale)
{
static void image_render_complete_cb(PixbufRenderer *UNUSED(pr), gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
image_complete_util(imd, FALSE);
}
}
else
{
- imd->state |= state;
+ imd->state = static_cast<ImageState>(imd->state | state);
}
if (imd->func_state) imd->func_state(imd, state, imd->data_state);
}
static void image_state_unset(ImageWindow *imd, ImageState state)
{
- imd->state &= ~state;
+ imd->state = static_cast<ImageState>(imd->state & ~state);
if (imd->func_state) imd->func_state(imd, state, imd->data_state);
}
static void image_zoom_cb(PixbufRenderer *UNUSED(pr), gdouble UNUSED(zoom), gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
if (imd->title_show_zoom) image_update_title(imd);
image_state_set(imd, IMAGE_STATE_IMAGE);
else if (imd->color_profile_input >= COLOR_PROFILE_SRGB &&
imd->color_profile_input < COLOR_PROFILE_FILE)
{
- input_type = imd->color_profile_input;
+ input_type = static_cast<ColorManProfileType>(imd->color_profile_input);
input_file = NULL;
}
else
if (imd->color_profile_use_image && imd->color_profile_from_image != COLOR_PROFILE_NONE)
{
- input_type = imd->color_profile_from_image;
+ input_type = static_cast<ColorManProfileType>(imd->color_profile_from_image);
input_file = NULL;
}
}
static void image_post_process_tile_color_cb(PixbufRenderer *UNUSED(pr), GdkPixbuf **pixbuf, gint x, gint y, gint w, gint h, gpointer data)
{
ImageWindow *imd = (ImageWindow *)data;
- if (imd->cm) color_man_correct_region(imd->cm, *pixbuf, x, y, w, h);
+ if (imd->cm) color_man_correct_region(static_cast<ColorMan *>(imd->cm), *pixbuf, x, y, w, h);
if (imd->desaturate) pixbuf_desaturate_rect(*pixbuf, x, y, w, h);
if (imd->overunderexposed) pixbuf_highlight_overunderexposed(*pixbuf, x, y, w, h);
}
static void image_read_ahead_done_cb(ImageLoader *UNUSED(il), gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
if (!imd->read_ahead_fd || !imd->read_ahead_il) return;
static void image_load_area_cb(ImageLoader *il, guint x, guint y, guint w, guint h, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
PixbufRenderer *pr;
pr = (PixbufRenderer *)imd->pr;
static void image_load_done_cb(ImageLoader *UNUSED(il), gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
DEBUG_1("%s image done", get_exec_time());
if (options->image.enable_read_ahead && imd->image_fd && !imd->image_fd->pixbuf && image_loader_get_pixbuf(imd->il))
{
- imd->image_fd->pixbuf = g_object_ref(image_loader_get_pixbuf(imd->il));
+ imd->image_fd->pixbuf = (GdkPixbuf*)g_object_ref(image_loader_get_pixbuf(imd->il));
image_cache_set(imd, imd->image_fd);
}
/* call the callback triggered by image_state after fd->pixbuf is set */
static void image_load_size_cb(ImageLoader *UNUSED(il), guint width, guint height, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
DEBUG_1("image_load_size_cb: %dx%d", width, height);
pixbuf_renderer_set_size_early((PixbufRenderer *)imd->pr, width, height);
image_reset(imd);
imd->unknown = TRUE;
+ /** @FIXME Might be improved when the wepb animation changes happen */
+ g_object_set(G_OBJECT(imd->pr), "zoom_2pass", options->image.zoom_2pass, NULL);
+ g_object_set(G_OBJECT(imd->pr), "zoom_quality", options->image.zoom_quality, NULL);
+
if (!imd->image_fd)
{
image_change_pixbuf(imd, NULL, zoom, FALSE);
static gboolean image_focus_in_cb(GtkWidget *UNUSED(widget), GdkEventFocus *UNUSED(event), gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
if (imd->func_focus_in)
{
static gboolean image_scroll_cb(GtkWidget *UNUSED(widget), GdkEventScroll *event, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
gboolean in_lw = FALSE;
gint i = 0;
LayoutWindow *lw = NULL;
if (pixbuf)
{
- stereo_data = imd->user_stereo;
+ stereo_data = static_cast<StereoPixbufData>(imd->user_stereo);
if (stereo_data == STEREO_PIXBUF_DEFAULT)
{
- stereo_data = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(pixbuf), "stereo_data"));
+ stereo_data = static_cast<StereoPixbufData>(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(pixbuf), "stereo_data")));
}
}
pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, NULL, NULL, FALSE);
if (imd->cm)
{
- color_man_free(imd->cm);
+ color_man_free(static_cast<ColorMan *>(imd->cm));
imd->cm = NULL;
}
gdouble r = 1.0;
gint pl = 0;
gint pr = 0;
- gchar *approx = " ";
+ const gchar *approx = " ";
zoom = image_zoom_get(imd);
scale = image_zoom_get_real(imd);
StereoPixbufData image_stereo_pixbuf_get(ImageWindow *imd)
{
- return imd->user_stereo;
+ return static_cast<StereoPixbufData>(imd->user_stereo);
}
void image_stereo_pixbuf_set(ImageWindow *imd, StereoPixbufData stereo_mode)
static void image_notify_cb(FileData *fd, NotifyType type, gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
if (!imd || !image_get_pixbuf(imd) ||
/* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */
ColorMan *cm;
if (!imd) return FALSE;
- cm = imd->cm;
+ cm = static_cast<ColorMan *>(imd->cm);
if (!cm) return FALSE;
return color_man_get_status(cm, image_profile, screen_profile);
{
ImageWindow *imd;
- imd = work->data;
+ imd = static_cast<ImageWindow *>(work->data);
work = work->next;
image_options_set(imd);
static void image_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
{
- ImageWindow *imd = data;
+ ImageWindow *imd = static_cast<ImageWindow *>(data);
image_free(imd);
}