gimpdisplayshell-scale.h 5.12 KB
Newer Older
1
/* GIMP - The GNU Image Manipulation Program
Elliot Lee's avatar
Elliot Lee committed
2 3
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
4
 * This program is free software: you can redistribute it and/or modify
Elliot Lee's avatar
Elliot Lee committed
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 3 of the License, or
Elliot Lee's avatar
Elliot Lee committed
7 8 9 10 11 12 13 14
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
Elliot Lee's avatar
Elliot Lee committed
16
 */
17

Michael Natterer's avatar
Michael Natterer committed
18 19
#ifndef __GIMP_DISPLAY_SHELL_SCALE_H__
#define __GIMP_DISPLAY_SHELL_SCALE_H__
Elliot Lee's avatar
Elliot Lee committed
20 21


22 23 24
gboolean gimp_display_shell_scale_revert             (GimpDisplayShell *shell);
gboolean gimp_display_shell_scale_can_revert         (GimpDisplayShell *shell);
void     gimp_display_shell_scale_save_revert_values (GimpDisplayShell *shell);
25

26 27
void     gimp_display_shell_scale_set_dot_for_dot    (GimpDisplayShell *shell,
                                                      gboolean          dot_for_dot);
28

29 30 31
void     gimp_display_shell_scale_get_image_size     (GimpDisplayShell *shell,
                                                      gint             *w,
                                                      gint             *h);
32 33 34 35 36
void     gimp_display_shell_scale_get_image_bounds   (GimpDisplayShell *shell,
                                                      gint             *x,
                                                      gint             *y,
                                                      gint             *w,
                                                      gint             *h);
37 38 39 40
gboolean gimp_display_shell_scale_image_is_within_viewport
                                                     (GimpDisplayShell *shell,
                                                      gboolean         *horizontally,
                                                      gboolean         *vertically);
41

42
void     gimp_display_shell_scale_update             (GimpDisplayShell *shell);
43

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
void     gimp_display_shell_scale                    (GimpDisplayShell *shell,
                                                      GimpZoomType      zoom_type,
                                                      gdouble           scale,
                                                      GimpZoomFocus     zoom_focus);
void     gimp_display_shell_scale_to_rectangle       (GimpDisplayShell *shell,
                                                      GimpZoomType      zoom_type,
                                                      gdouble           x,
                                                      gdouble           y,
                                                      gdouble           width,
                                                      gdouble           height,
                                                      gboolean          resize_window);
void     gimp_display_shell_scale_fit_in             (GimpDisplayShell *shell);
void     gimp_display_shell_scale_fill               (GimpDisplayShell *shell);
void     gimp_display_shell_scale_by_values          (GimpDisplayShell *shell,
                                                      gdouble           scale,
                                                      gint              offset_x,
                                                      gint              offset_y,
                                                      gboolean          resize_window);
62

63 64 65 66
void     gimp_display_shell_scale_drag               (GimpDisplayShell *shell,
                                                      gdouble           delta_x,
                                                      gdouble           delta_y);

67 68 69 70 71 72 73 74 75 76
void     gimp_display_shell_scale_shrink_wrap        (GimpDisplayShell *shell,
                                                      gboolean          grow_only);
void     gimp_display_shell_scale_resize             (GimpDisplayShell *shell,
                                                      gboolean          resize_window,
                                                      gboolean          grow_only);
void     gimp_display_shell_set_initial_scale        (GimpDisplayShell *shell,
                                                      gdouble           scale,
                                                      gint             *display_width,
                                                      gint             *display_height);

Ell's avatar
Ell committed
77 78 79
void     gimp_display_shell_get_rotated_scale        (GimpDisplayShell *shell,
                                                      gdouble          *scale_x,
                                                      gdouble          *scale_y);
80 81 82 83 84 85

/*  debug API for testing  */

void  gimp_display_shell_push_zoom_focus_pointer_pos (GimpDisplayShell *shell,
                                                      gint              x,
                                                      gint              y);
Martin Nordholts's avatar
Martin Nordholts committed
86

Michael Natterer's avatar
Michael Natterer committed
87 88

#endif  /*  __GIMP_DISPLAY_SHELL_SCALE_H__  */