Annotation of libwww/Library/src/HTHist.html, revision 2.3
2.1 frystyk 1: <HTML>
2: <HEAD>
3: <TITLE>History module for libwww</TITLE>
4: <!-- Changed by: , 28-Nov-1994 -->
5: </HEAD>
6: <BODY>
7:
8: <H1>HTHistory</H1>
9:
10: <PRE>
11: /*
2.3 ! frystyk 12: ** (c) COPYRIGHT MIT 1995.
2.1 frystyk 13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
16:
17: This is a simple history module for a WWW client. It keeps a linear
18: history, with destructive backtrack, and list sequencing (previous,
19: next) operations.<P>
20:
21: If you are building a client, you don't have to use this: just don't
22: call it. This module is not used by any other modules in the libwww,
23: so if you don't refer to it you don't get it in your linked
24: application. <P>
25:
2.2 frystyk 26: This module is implemented by <A HREF="HTHist.c">HTHist.c</A>, and it
27: is a part of the <A
28: HREF="http://www.w3.org/hypertext/WWW/Library/User/Guide/Guide.html">
2.1 frystyk 29: Library of Common Code</A>.
30:
31:
32: <PRE>
33: #ifndef HTHISTORY_H
34: #define HTHISTORY_H
35:
36: #include "HTFormat.h"
37: #include "HTAnchor.h"
38:
39: /* Navigation
40: ** ==========
41: */
42:
43: /* Record the jump to an anchor
44: ** ----------------------------
45: */
46:
47: extern void HTHistory_record
48: PARAMS(
49: (HTAnchor * destination)
50: );
51:
52: /* Go back in history (find the last visited node)
53: ** ------------------
54: */
55:
56: extern HTAnchor * HTHistory_back PARAMS((HTAnchor * cur_anch));
57:
58: extern HTAnchor * HTHistory_forward PARAMS((HTAnchor * cur_anch));
59:
60: /* FIXME: Should we add a `sticky' option ? */
61: extern HTAnchor * HTHistory_backtrack NOPARAMS;
62:
63: extern BOOL HTHistory_canBacktrack NOPARAMS;
64:
65: /* Browse through references in the same parent node
66: ** -------------------------------------------------
67: **
68: ** Take the n-th child's link after or before the one we took to get here.
69: ** Positive offset means go towards most recently added children.
70: */
71:
72: extern HTAnchor * HTHistory_moveBy
73: PARAMS(
74: (int offset)
75: );
76:
77: extern BOOL HTHistory_canMoveBy
78: PARAMS(
79: (int offset)
80: );
81:
82: #define HTHistory_next (HTHistory_moveBy (+1))
83: #define HTHistory_canNext (HTHistory_canMoveBy (+1))
84: #define HTHistory_previous (HTHistory_moveBy (-1))
85: #define HTHistory_canPrevious (HTHistory_canMoveBy (-1))
86:
87:
88: /* Retrieval
89: ** =========
90: */
91:
92: /* Read numbered visited anchor (1 is the oldest)
93: ** ----------------------------
94: */
95:
96: extern HTAnchor * HTHistory_read
97: PARAMS(
98: (int number)
99: );
100:
101: /* Recall numbered visited anchor (1 is the oldest)
102: ** ------------------------------
103: ** This reads the anchor and stores it again in the list, except if last.
104: */
105:
106: extern HTAnchor * HTHistory_recall
107: PARAMS(
108: (int number)
109: );
110:
111: /* Number of Anchors stored
112: ** ------------------------
113: **
114: ** This is needed in order to check the validity of certain commands
115: ** for menus, etc.
116: (not needed for now. Use canBacktrack, etc.)
117: extern int HTHistory_count NOPARAMS;
118: */
119:
120: /* Change last history entry
121: ** -------------------------
122: **
123: ** Sometimes we load a node by one anchor but leave by a different
124: ** one, and it is the one we left from which we want to remember.
125: */
126: extern void HTHistory_leavingFrom
127: PARAMS(
128: (HTAnchor * anchor)
129: );
130:
131: #endif /* HTHISTORY_H */
132:
133: </PRE></BODY>
134: </HTML>
Webmaster