bugrepair VFS, update autotools files
[gpiv.git] / src / utils.h
blob308158bc145ba31486c8cdb24c96a1c039affc95
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, 2003, 2004, 2005, 2006, 2007, 2008
7 Gerber van der Graaf <gerber_graaf@users.sourceforge.net>
9 This file is part of libgpiv.
11 Libgpiv is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2, or (at your option)
14 any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software Foundation,
23 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 ----------------------------------------------------------------------*/
28 * $Log: utils.h,v $
29 * Revision 1.13 2007-12-19 08:42:35 gerber
30 * debugged
32 * Revision 1.12 2007-11-23 16:24:08 gerber
33 * release 0.5.0: Kafka
35 * Revision 1.11 2007-06-06 17:00:48 gerber
36 * Retreives images/data from URI using Gnome Virtual File System.
38 * Revision 1.10 2007-01-29 11:27:44 gerber
39 * added image formats png, gif, tif png, bmp, improved buffer display
41 * Revision 1.9 2006/01/31 14:28:13 gerber
42 * version 0.3.0
44 * Revision 1.8 2005/01/19 15:53:43 gerber
45 * Initiation of Data Acquisition (DAC); trigerring of lasers and camera
46 * by using RTAI and Realtime Linux, recording images from IEEE1394
47 * (Firewire) IIDC compliant camera's
49 * Revision 1.7 2004/10/15 19:24:05 gerber
50 * GPIV_ and Gpiv prefix to defines and structure names of libgpiv
52 * Revision 1.6 2004/06/14 21:19:23 gerber
53 * Image depth up to 16 bits.
54 * Improvement "single int" and "drag int" in Eval tab.
55 * Viewer's pop-up menu.
56 * Adaption for gpiv_matrix_* and gpiv_vector_*.
57 * Resizing console.
58 * See Changelog for further info.
60 * Revision 1.5 2003/09/04 13:31:55 gerber
61 * init of printing (unfinished)
63 * Revision 1.4 2003/09/01 11:17:15 gerber
64 * improved monitoring of interrogation process
66 * Revision 1.3 2003/08/22 15:24:53 gerber
67 * interactive spatial scaling
69 * Revision 1.2 2003/06/27 13:47:26 gerber
70 * display ruler, line/point evaluation
72 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
73 * Imported gpiv
78 #ifndef UTILS_H
79 #define UTILS_H
82 void
83 update_imgh_entries (GpivConsole *gpiv,
84 GpivImagePar *image_par);
85 void
86 update_eval_entries (GpivConsole *gpiv,
87 GpivImagePar *image_par);
89 gchar *
90 month_name(GDateMonth month);
91 /*--------------------------------------------------------------------
92 * returns the month name
95 void
96 free_all_mems(void);
98 void
99 push_list_lastfnames(gchar *fname);
101 guint
102 get_row_from_id (GpivConsole *gpiv,
103 Display *disp);
105 void
106 point_to_existbuffer (GpivConsole *gpiv);
108 void
109 close_buffer__check_saved (GpivConsole *gpiv,
110 Display *disp);
112 void
113 close_buffer (GpivConsole *gpiv,
114 Display *disp);
117 gfloat
118 image_mean (guint16 **img,
119 gint ncols,
120 gint nrows);
123 * mem allocation functions
126 /*--------------------------------------------------------------------
127 Allocates 2-dimensional array for GnomeCanvasItem */
128 GnomeCanvasItem
129 **alloc_gci_matrix (long nr,
130 long nc);
132 /*--------------------------------------------------------------------
133 Frees 2-dimensional array for GnomeCanvasItem */
134 void
135 free_gci_matrix (GnomeCanvasItem **item,
136 long nr,
137 long nc);
139 void
140 free_all_bufmems (Display *disp);
142 void
143 free_img_bufmems (Display *disp);
145 void
146 free_eval_bufmems (Display *disp);
148 void
149 free_valid_bufmems (Display *disp);
151 void
152 free_post_bufmems (Display *disp);
155 * general gtk functions
157 void
158 on_widget_leave (GtkContainer *container,
159 GtkDirectionType direction,
160 gpointer user_data);
162 void
163 sensitive (GpivConsole *gpiv,
164 enum WidgetSet wi_set,
165 gboolean sense);
167 gint
168 on_my_popup_handler (GtkWidget *widget,
169 GdkEvent *event);
171 gchar *
172 replace_home_dir_with_tilde (const gchar *uri);
174 gchar *
175 replace_tilde_with_home_dir (const gchar *uri);
177 void
178 destroy (GtkWidget *widget,
179 gpointer data);
181 void
182 message_gpiv (gchar *msg, ...);
184 void
185 warning_gpiv (gchar *msg, ...);
187 void
188 error_gpiv (gchar *msg, ...);
192 #endif /* UTILS_H */