1 /* -*- mode: C; mode: fold; -*- */
2 /*
3  This file is part of SLRN.
4  Copyright (c) 2001 Robin Sommer <rsommer@uni-paderborn.de>
5  Copyright (c) 2001-2006 Thomas Schultz <tststs@gmx.de>
6 
7  This program is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the Free
9  Software Foundation; either version 2 of the License, or (at your option)
10  any later version.
11 
12  This program is distributed in the hope that it will be useful, but WITHOUT
13  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
15  more details.
16 
17  You should have received a copy of the GNU General Public License along
18  with this program; if not, write to the Free Software Foundation, Inc.,
19  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 */
21 
22 #define HOOK_ARTICLE_MODE           0
23 #define HOOK_ARTICLE_MODE_QUIT      1
24 #define HOOK_ARTICLE_MODE_STARTUP   2
25 #define HOOK_CC                     3
26 #define HOOK_FOLLOWUP               4
27 #define HOOK_FORWARD                5
28 #define HOOK_GROUP_MODE             6
29 #define HOOK_GROUP_MODE_STARTUP     7
30 #define HOOK_HEADER_NUMBER          8
31 #define HOOK_MAKE_FROM_STRING       9
32 #define HOOK_MAKE_SAVE_FILENAME    10
33 #define HOOK_POST_FILE             11
34 #define HOOK_POST_FILTER           12
35 #define HOOK_POST                  13
36 #define HOOK_PRE_ARTICLE_MODE      14
37 #define HOOK_QUIT		   15
38 #define HOOK_RESIZE_SCREEN         16
39 #define HOOK_READ_ARTICLE          17
40 #define HOOK_REPLY		   18
41 #define HOOK_STARTUP               19
42 #define HOOK_SUBJECT_COMPARE       20
43 #define HOOK_SUPERSEDE             21
44 /* Number of different hooks */
45 #define HOOK_NUMBER                22
46 
47 /* return -1 upon error, or number of hook functions called */
48 extern int slrn_run_hooks( unsigned int hook, unsigned int num_args, ... );
49 extern int slrn_is_hook_defined( unsigned int hook );
50 extern int slrn_register_hook (char *name, SLang_Name_Type *nt);
51 extern int slrn_unregister_hook (char *name, SLang_Name_Type *nt);
52