added gpiv_logo.xpm
[gpiv.git] / src / utils.h
bloba7521c9650dc7b6783e382e00856f0875c1017a0
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
3 /*
4 libgpiv - library for Particle Image Velocimetry
6 Copyright (C) 2002 Gerber van der Graaf
8 This file is part of libgpiv.
10 Libgpiv is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software Foundation,
22 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 ----------------------------------------------------------------------*/
27 * $Log: utils.h,v $
28 * Revision 1.13 2007-12-19 08:42:35 gerber
29 * debugged
31 * Revision 1.12 2007-11-23 16:24:08 gerber
32 * release 0.5.0: Kafka
34 * Revision 1.11 2007-06-06 17:00:48 gerber
35 * Retreives images/data from URI using Gnome Virtual File System.
37 * Revision 1.10 2007-01-29 11:27:44 gerber
38 * added image formats png, gif, tif png, bmp, improved buffer display
40 * Revision 1.9 2006/01/31 14:28:13 gerber
41 * version 0.3.0
43 * Revision 1.8 2005/01/19 15:53:43 gerber
44 * Initiation of Data Acquisition (DAC); trigerring of lasers and camera
45 * by using RTAI and Realtime Linux, recording images from IEEE1394
46 * (Firewire) IIDC compliant camera's
48 * Revision 1.7 2004/10/15 19:24:05 gerber
49 * GPIV_ and Gpiv prefix to defines and structure names of libgpiv
51 * Revision 1.6 2004/06/14 21:19:23 gerber
52 * Image depth up to 16 bits.
53 * Improvement "single int" and "drag int" in Eval tab.
54 * Viewer's pop-up menu.
55 * Adaption for gpiv_matrix_* and gpiv_vector_*.
56 * Resizing console.
57 * See Changelog for further info.
59 * Revision 1.5 2003/09/04 13:31:55 gerber
60 * init of printing (unfinished)
62 * Revision 1.4 2003/09/01 11:17:15 gerber
63 * improved monitoring of interrogation process
65 * Revision 1.3 2003/08/22 15:24:53 gerber
66 * interactive spatial scaling
68 * Revision 1.2 2003/06/27 13:47:26 gerber
69 * display ruler, line/point evaluation
71 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
72 * Imported gpiv
77 #ifndef UTILS_H
78 #define UTILS_H
81 void
82 update_imgh_entries (GpivConsole *gpiv,
83 GpivImagePar *image_par);
84 void
85 update_eval_entries (GpivConsole *gpiv,
86 GpivImagePar *image_par);
88 gchar *
89 month_name(GDateMonth month);
90 /*--------------------------------------------------------------------
91 * returns the month name
94 void
95 free_all_mems(void);
97 void
98 push_list_lastfnames(gchar *fname);
100 guint
101 get_row_from_id (GpivConsole *gpiv,
102 Display *disp);
104 void
105 point_to_existbuffer (GpivConsole *gpiv);
107 void
108 close_buffer__check_saved (GpivConsole *gpiv,
109 Display *disp);
111 void
112 close_buffer (GpivConsole *gpiv,
113 Display *disp);
116 gfloat
117 image_mean (guint16 **img,
118 gint ncols,
119 gint nrows);
122 * mem allocation functions
125 /*--------------------------------------------------------------------
126 Allocates 2-dimensional array for GnomeCanvasItem */
127 GnomeCanvasItem
128 **alloc_gci_matrix (long nr,
129 long nc);
131 /*--------------------------------------------------------------------
132 Frees 2-dimensional array for GnomeCanvasItem */
133 void
134 free_gci_matrix (GnomeCanvasItem **item,
135 long nr,
136 long nc);
138 void
139 free_all_bufmems (Display *disp);
141 void
142 free_img_bufmems (Display *disp);
144 void
145 free_eval_bufmems (Display *disp);
147 void
148 free_valid_bufmems (Display *disp);
150 void
151 free_post_bufmems (Display *disp);
154 * general gtk functions
156 void
157 on_widget_leave (GtkContainer *container,
158 GtkDirectionType direction,
159 gpointer user_data);
161 void
162 sensitive (GpivConsole *gpiv,
163 enum WidgetSet wi_set,
164 gboolean sense);
166 gint
167 on_my_popup_handler (GtkWidget *widget,
168 GdkEvent *event);
170 gchar *
171 replace_home_dir_with_tilde (const gchar *uri);
173 gchar *
174 replace_tilde_with_home_dir (const gchar *uri);
176 void
177 destroy (GtkWidget *widget,
178 gpointer data);
180 void
181 message_gpiv (gchar *msg, ...);
183 void
184 warning_gpiv (gchar *msg, ...);
186 void
187 error_gpiv (gchar *msg, ...);
191 #endif /* UTILS_H */