earlybrowserreborn - Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 roytam 1 /*
2  * catalog.h
3  *
4  * Personal URL Link Manager
5  *
6  */
7 /*
8  * Copyright 1993 O'Reilly & Associates. All rights reserved.
9  *
10  * Permission to use, copy, and/or distribute for any purpose and
11  * without fee is hereby granted, provided that both the above copyright
12  * notice and this permission notice appear in all copies and derived works.
13  * Fees for distribution or use of this software or derived works may only
14  * be charged with express written permission of the copyright holder.
15  * This software is provided ``as is'' without express or implied warranty.
16  */
17  
18 #ifndef _CATALOG_H_
19 #define _CATALOG_H_
20  
21 #include "vw.h"
22 #include "menu.h"
23  
24 #define MAX_SELECTIONS 100
25 #define ITEM_ALLOC_CHUNK 32
26  
27 /* For testing purposes ... to be removed later. */
28 #define DEFAULT_CATALOG_FILE "/usr/tmp/defaultSpiderCatalog"
29  
30 enum itemTypes {ITEM, FOLDER, LINK};
31 enum itemStates {NONE=0, SELECTED};
32  
33  
34 typedef struct itemStruct {
35     char type;
36     char state;
37  
38     Pixmap icon;
39     GC gc;
40     char *iconFile;
41     short x, y, w, h;
42  
43     char *name;
44     XmString nameXMS;
45     short nx, ny;
46  
47     char *commentURL;
48 } Item;
49  
50  
51 typedef struct folderStruct {
52     char type;
53     char state;
54  
55     Pixmap icon;
56     GC gc;
57     char *iconFile;
58     short x, y, w, h;
59  
60     char *name;
61     XmString nameXMS;
62     short nx, ny;
63  
64     char *commentURL;
65     Item **items;
66     short nItems;
67     short allocedItems;
68     short cw, ch;  /* size of folder canvas area (when open) */
69  
70     XmString nItemsXMS;
71     short numx, numy;
72 } Folder;
73  
74  
75 typedef struct linkStruct {
76     char type;
77     char state;
78  
79     Pixmap icon;
80     GC gc;
81     char *iconFile;
82     short x, y, w, h;
83  
84     char *name;
85     XmString nameXMS;
86     short nx, ny;
87  
88     char *commentURL;
89     char *url;
90     char *comment;
91     char *folderName;
92     Folder *folder;
93 } Link;
94  
95  
96 typedef struct catalogStruct {
97     Folder *topFolder;
98     Folder *currentFolder;
99     char *catalogFileName;
100  
101     char visible;
102  
103     GC gc;
104     Widget shell;
105     Widget canvas;
106     Widget helpLabel;
107     DocViewInfo *dvi;
108 } Catalog;
109  
110  
111 typedef union ItemStruct {
112     Item item;
113     Link link;
114     Folder folder;
115 } CatalogItem;
116  
117  
118 /* PROTOTYPES */
119 void showCatalogCB();
120 void closeCatalogCB();
121  
122 #endif _CATALOG_H_