1 /* -*- Mode: C; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3 -*- */ 2 3 /* 4 * GImageView 5 * Copyright (C) 2001 Takuro Ashie 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 * $Id: gimv_nav_win.h,v 1.2 2004/03/07 11:53:31 makeinu Exp $ 22 */ 23 24 /* 25 * These codes are mostly taken from gThumb. 26 * gThumb code Copyright (C) 2001 The Free Software Foundation, Inc. 27 * gThumb author: Paolo Bacchilega 28 */ 29 30 #ifndef __GIMV_NAV_WIN_H__ 31 #define __GIMV_NAV_WIN_H__ 32 33 #include "gimageview.h" 34 35 36 #define GIMV_TYPE_NAV_WIN (gimv_nav_win_get_type ()) 37 #define GIMV_NAV_WIN(obj) (GTK_CHECK_CAST (obj, gimv_nav_win_get_type (), GimvNavWin)) 38 #define GIMV_NAV_WIN_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, gimv_nav_win_get_type, GimvNavWinClass)) 39 #define GIMV_IS_NAV_WIN(obj) (GTK_CHECK_TYPE (obj, gimv_nav_win_get_type ())) 40 #define GIMV_IS_NAV_WIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMV_TYPE_NAV_WIN)) 41 42 43 #define GIMV_NAV_WIN_SIZE 128 /* Max size of the window. */ 44 45 46 typedef struct GimvNavWin_Tag GimvNavWin; 47 typedef struct GimvNavWinPriv_Tag GimvNavWinPriv; 48 typedef struct GimvNavWinClass_Tag GimvNavWinClass; 49 50 51 struct GimvNavWin_Tag 52 { 53 GtkWindow parent; 54 55 GtkWidget *out_frame; 56 GtkWidget *in_frame; 57 GtkWidget *preview; 58 59 GdkPixmap *pixmap; 60 GdkBitmap *mask; 61 62 GdkGC *gc; 63 64 gint x_root, y_root; 65 66 gint image_width, image_height; 67 68 gint view_width, view_height; 69 gint view_pos_x, view_pos_y; 70 71 gint popup_x, popup_y; 72 gint popup_width, popup_height; 73 74 gint sqr_x, sqr_y; 75 gint sqr_width, sqr_height; 76 77 gint fix_x_pos, fix_y_pos; 78 79 gdouble factor; 80 }; 81 82 83 struct GimvNavWinClass_Tag 84 { 85 GtkWindowClass parent_class; 86 87 /* signals */ 88 void (*move) (GimvNavWin *navwin, 89 gint x, 90 gint y); 91 }; 92 93 94 GtkType gimv_nav_win_get_type (void); 95 GtkWidget *gimv_nav_win_new (GdkPixmap *pixmap, 96 GdkBitmap *mask, 97 gint image_width, 98 gint image_height, 99 gint view_width, 100 gint view_height, 101 gint view_pos_x, 102 gint view_pos_y); 103 void gimv_nav_win_show (GimvNavWin *navwin, 104 gint x_root, 105 gint y_root); 106 void gimv_nav_win_hide (GimvNavWin *navwin); 107 void gimv_nav_win_set_pixmap (GimvNavWin *navwin, 108 GdkPixmap *pixmap, 109 GdkBitmap *mask, 110 gint image_width, 111 gint image_height); 112 void gimv_nav_win_set_orig_image_size (GimvNavWin *navwin, 113 gint width, 114 gint height); 115 void gimv_nav_win_set_view_size (GimvNavWin *navwin, 116 gint width, 117 gint height); 118 void gimv_nav_win_set_view_position (GimvNavWin *navwin, 119 gint x, 120 gint y); 121 122 #endif /* __GIMV_NAV_WIN_H__ */ 123