2004-08-31 06:10:26 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimppreview.h
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
2004-08-31 06:10:26 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-18 06:28:01 +08:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2004-08-31 06:10:26 +08:00
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-18 06:28:01 +08:00
|
|
|
* License along with this library. If not, see
|
2018-07-12 05:27:07 +08:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
2004-08-31 06:10:26 +08:00
|
|
|
*/
|
|
|
|
|
2011-04-28 20:30:41 +08:00
|
|
|
#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
|
|
|
|
#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2004-08-31 06:10:26 +08:00
|
|
|
#ifndef __GIMP_PREVIEW_H__
|
|
|
|
#define __GIMP_PREVIEW_H__
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2004-08-31 06:49:06 +08:00
|
|
|
|
2004-08-31 06:10:26 +08:00
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
2004-08-31 06:49:06 +08:00
|
|
|
|
2024-08-02 22:02:30 +08:00
|
|
|
#define GIMP_TYPE_PREVIEW (gimp_preview_get_type ())
|
|
|
|
G_DECLARE_DERIVABLE_TYPE (GimpPreview, gimp_preview, GIMP, PREVIEW, GtkBox)
|
2004-09-29 07:23:09 +08:00
|
|
|
|
2004-08-31 06:10:26 +08:00
|
|
|
struct _GimpPreviewClass
|
|
|
|
{
|
2011-07-28 01:53:34 +08:00
|
|
|
GtkBoxClass parent_class;
|
2004-08-31 06:10:26 +08:00
|
|
|
|
2007-01-12 07:41:45 +08:00
|
|
|
/* virtual methods */
|
2004-09-10 05:36:52 +08:00
|
|
|
void (* draw) (GimpPreview *preview);
|
2004-09-29 21:39:23 +08:00
|
|
|
void (* draw_thumb) (GimpPreview *preview,
|
|
|
|
GimpPreviewArea *area,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2004-09-29 23:33:02 +08:00
|
|
|
void (* draw_buffer) (GimpPreview *preview,
|
|
|
|
const guchar *buffer,
|
|
|
|
gint rowstride);
|
2004-09-29 07:23:09 +08:00
|
|
|
void (* set_cursor) (GimpPreview *preview);
|
2004-08-31 06:10:26 +08:00
|
|
|
|
2007-01-12 07:41:45 +08:00
|
|
|
void (* transform) (GimpPreview *preview,
|
|
|
|
gint src_x,
|
|
|
|
gint src_y,
|
|
|
|
gint *dest_x,
|
|
|
|
gint *dest_y);
|
|
|
|
void (* untransform) (GimpPreview *preview,
|
|
|
|
gint src_x,
|
|
|
|
gint src_y,
|
|
|
|
gint *dest_x,
|
|
|
|
gint *dest_y);
|
2004-10-24 03:59:18 +08:00
|
|
|
|
2018-05-03 18:51:36 +08:00
|
|
|
/* signal */
|
|
|
|
void (* invalidated) (GimpPreview *preview);
|
|
|
|
|
2004-10-24 03:59:18 +08:00
|
|
|
/* Padding for future expansion */
|
2018-05-03 18:51:36 +08:00
|
|
|
void (* _gimp_reserved1) (void);
|
|
|
|
void (* _gimp_reserved2) (void);
|
2004-10-24 03:59:18 +08:00
|
|
|
void (* _gimp_reserved3) (void);
|
|
|
|
void (* _gimp_reserved4) (void);
|
2018-05-03 18:51:36 +08:00
|
|
|
void (* _gimp_reserved5) (void);
|
|
|
|
void (* _gimp_reserved6) (void);
|
|
|
|
void (* _gimp_reserved7) (void);
|
|
|
|
void (* _gimp_reserved8) (void);
|
2004-08-31 06:10:26 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2005-07-21 22:02:29 +08:00
|
|
|
void gimp_preview_set_update (GimpPreview *preview,
|
|
|
|
gboolean update);
|
|
|
|
gboolean gimp_preview_get_update (GimpPreview *preview);
|
|
|
|
|
|
|
|
void gimp_preview_set_bounds (GimpPreview *preview,
|
|
|
|
gint xmin,
|
|
|
|
gint ymin,
|
|
|
|
gint xmax,
|
|
|
|
gint ymax);
|
2018-05-04 15:46:37 +08:00
|
|
|
void gimp_preview_get_bounds (GimpPreview *preview,
|
|
|
|
gint *xmin,
|
|
|
|
gint *ymin,
|
|
|
|
gint *xmax,
|
|
|
|
gint *ymax);
|
|
|
|
|
|
|
|
void gimp_preview_set_size (GimpPreview *preview,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
void gimp_preview_get_size (GimpPreview *preview,
|
|
|
|
gint *width,
|
|
|
|
gint *height);
|
|
|
|
|
|
|
|
void gimp_preview_set_offsets (GimpPreview *preview,
|
|
|
|
gint xoff,
|
|
|
|
gint yoff);
|
|
|
|
void gimp_preview_get_offsets (GimpPreview *preview,
|
|
|
|
gint *xoff,
|
|
|
|
gint *yoff);
|
2005-07-21 22:02:29 +08:00
|
|
|
|
|
|
|
void gimp_preview_get_position (GimpPreview *preview,
|
|
|
|
gint *x,
|
|
|
|
gint *y);
|
|
|
|
|
2007-01-12 07:41:45 +08:00
|
|
|
void gimp_preview_transform (GimpPreview *preview,
|
|
|
|
gint src_x,
|
|
|
|
gint src_y,
|
|
|
|
gint *dest_x,
|
|
|
|
gint *dest_y);
|
|
|
|
void gimp_preview_untransform (GimpPreview *preview,
|
|
|
|
gint src_x,
|
|
|
|
gint src_y,
|
|
|
|
gint *dest_x,
|
|
|
|
gint *dest_y);
|
|
|
|
|
2018-05-04 15:46:37 +08:00
|
|
|
GtkWidget * gimp_preview_get_frame (GimpPreview *preview);
|
2018-05-08 18:29:01 +08:00
|
|
|
GtkWidget * gimp_preview_get_grid (GimpPreview *preview);
|
2005-07-21 22:02:29 +08:00
|
|
|
GtkWidget * gimp_preview_get_area (GimpPreview *preview);
|
|
|
|
|
|
|
|
void gimp_preview_draw (GimpPreview *preview);
|
|
|
|
void gimp_preview_draw_buffer (GimpPreview *preview,
|
|
|
|
const guchar *buffer,
|
|
|
|
gint rowstride);
|
|
|
|
|
|
|
|
void gimp_preview_invalidate (GimpPreview *preview);
|
|
|
|
|
2005-09-28 19:02:02 +08:00
|
|
|
void gimp_preview_set_default_cursor (GimpPreview *preview,
|
|
|
|
GdkCursor *cursor);
|
2018-05-04 15:46:37 +08:00
|
|
|
GdkCursor * gimp_preview_get_default_cursor (GimpPreview *preview);
|
2004-08-31 06:10:26 +08:00
|
|
|
|
2005-09-28 19:02:02 +08:00
|
|
|
GtkWidget * gimp_preview_get_controls (GimpPreview *preview);
|
2005-09-28 10:46:06 +08:00
|
|
|
|
2004-08-31 22:29:25 +08:00
|
|
|
|
2004-08-31 06:10:26 +08:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GIMP_PREVIEW_H__ */
|