PIKApp/app/display/pikadisplayshell-scale.h

113 lines
6.8 KiB
C
Raw Normal View History

2023-09-26 00:35:21 +02:00
/* PIKA - Photo and Image Kooker Application
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
*
* Original copyright, applying to most contents (license remains unchanged):
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PIKA_DISPLAY_SHELL_SCALE_H__
#define __PIKA_DISPLAY_SHELL_SCALE_H__
gboolean pika_display_shell_scale_revert (PikaDisplayShell *shell);
gboolean pika_display_shell_scale_can_revert (PikaDisplayShell *shell);
void pika_display_shell_scale_save_revert_values (PikaDisplayShell *shell);
void pika_display_shell_scale_set_dot_for_dot (PikaDisplayShell *shell,
gboolean dot_for_dot);
void pika_display_shell_scale_get_image_size (PikaDisplayShell *shell,
gint *w,
gint *h);
void pika_display_shell_scale_get_image_bounds (PikaDisplayShell *shell,
gint *x,
gint *y,
gint *w,
gint *h);
void pika_display_shell_scale_get_image_unrotated_bounds
(PikaDisplayShell *shell,
gint *x,
gint *y,
gint *w,
gint *h);
void pika_display_shell_scale_get_image_bounding_box
(PikaDisplayShell *shell,
gint *x,
gint *y,
gint *w,
gint *h);
void pika_display_shell_scale_get_image_unrotated_bounding_box
(PikaDisplayShell *shell,
gint *x,
gint *y,
gint *w,
gint *h);
gboolean pika_display_shell_scale_image_is_within_viewport
(PikaDisplayShell *shell,
gboolean *horizontally,
gboolean *vertically);
void pika_display_shell_scale_update (PikaDisplayShell *shell);
void pika_display_shell_scale (PikaDisplayShell *shell,
PikaZoomType zoom_type,
gdouble scale,
PikaZoomFocus zoom_focus);
void pika_display_shell_scale_to_rectangle (PikaDisplayShell *shell,
PikaZoomType zoom_type,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
gboolean resize_window);
void pika_display_shell_scale_fit_in (PikaDisplayShell *shell);
void pika_display_shell_scale_fill (PikaDisplayShell *shell);
void pika_display_shell_scale_by_values (PikaDisplayShell *shell,
gdouble scale,
gint offset_x,
gint offset_y,
gboolean resize_window);
void pika_display_shell_scale_drag (PikaDisplayShell *shell,
gdouble start_x,
gdouble start_y,
gdouble delta_x,
gdouble delta_y);
void pika_display_shell_scale_shrink_wrap (PikaDisplayShell *shell,
gboolean grow_only);
void pika_display_shell_scale_resize (PikaDisplayShell *shell,
gboolean resize_window,
gboolean grow_only);
void pika_display_shell_set_initial_scale (PikaDisplayShell *shell,
gdouble scale,
gint *display_width,
gint *display_height);
void pika_display_shell_get_rotated_scale (PikaDisplayShell *shell,
gdouble *scale_x,
gdouble *scale_y);
/* debug API for testing */
void pika_display_shell_push_zoom_focus_pointer_pos (PikaDisplayShell *shell,
gint x,
gint y);
#endif /* __PIKA_DISPLAY_SHELL_SCALE_H__ */