1 /*****
2 * history.h : public header for XmHTML history routines
3 *
4 * This file Version	$Revision: 1.1 $
5 *
6 * Creation date:		Sun Aug 30 21:39:34 CEST 1998
7 * Last modification: 	$Date$
8 * By:					$Author$
9 * Current State:		$State$
10 *
11 * Author:				XmHTML Developers Account
12 *
13 * Copyright (C) 1994-1998 by Ripley Software Development
14 * All Rights Reserved
15 *
16 * This file is part of the XmHTML Widget Library
17 *
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Library General Public
20 * License as published by the Free Software Foundation; either
21 * version 2 of the License, or (at your option) any later version.
22 *
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26 * Library General Public License for more details.
27 *
28 * You should have received a copy of the GNU Library General Public
29 * License along with this library; if not, write to the Free
30 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 *
32 *****/
33 /*****
34 * $Source$
35 *****/
36 /*****
37 * ChangeLog
38 * $Log$
39 *
40 *****/
41 
42 #ifndef _history_h_
43 #define _history_h_
44 
45 typedef struct{
46 	String file;
47 	int line_no;
48 	String location;
49 }HistoryData;
50 
51 /* Initialize the history routines. Level > 0 : debug mode */
52 extern void HistoryInitialize(int level);
53 
54 /* add an item to the history */
55 extern Boolean HistoryAdd(Widget w, String file, int line_no, String location);
56 
57 /* remove the history for the given widget */
58 extern void HistoryRemove(Widget w);
59 
60 /* remove all history items associated with the given file */
61 extern Boolean HistoryRemoveRefs(Widget w, String file);
62 
63 /*****
64 * History fetching routines.
65 * All these routines return pointers to static data, so do not free
66 * the returned data.
67 *****/
68 
69 /* get the previous item in the history list */
70 extern HistoryData *HistoryBack(Widget w);
71 
72 /* get the current item in the history list */
73 extern HistoryData *HistoryCurrent(Widget w);
74 
75 /* get the next item in the history list */
76 extern HistoryData *HistoryForward(Widget w);
77 
78 /* verify if a backward move in the history will return valid data */
79 extern Boolean HistoryVerifyBack(Widget w);
80 
81 /* verify if a forward move in the history will return valid data */
82 extern Boolean HistoryVerifyForward(Widget w);
83 
84 /* Don't add anything after this endif! */
85 #endif /* _history_h_ */
86 
87