Back to index

courier  0.68.2
newmsg.h
Go to the documentation of this file.
00001 /*
00002 */
00003 #ifndef       newmsg_h
00004 #define       newmsg_h
00005 
00006 #if    HAVE_CONFIG_H
00007 #undef PACKAGE
00008 #undef VERSION
00009 #include      "config.h"
00010 #endif
00011 #include      "unicode/unicode.h"
00012 /*
00013 ** Copyright 1998 - 2011 Double Precision, Inc.  See COPYING for
00014 ** distribution information.
00015 */
00016 
00017 
00018 #include      <stdlib.h>
00019 
00020 extern void newmsg_init(const char *, const char *);
00021 extern void newmsg_do(const char *);
00022 
00023 extern char *newmsg_createdraft_do(const char *, const char *, int);
00024 #define NEWMSG_SQISPELL     1
00025 #define NEWMSG_PCP   2
00026 
00027 
00028 struct wrap_info {
00029        const char *output_chset;
00030        void (*output_func)(const char *p, size_t l, void *arg);
00031        void *arg;
00032 
00033        const unicode_char *uc;
00034        size_t ucsize;
00035 
00036        size_t cur_index;
00037        size_t word_start;
00038        size_t word_width;
00039 
00040        size_t line_start;
00041        size_t line_width;
00042 };
00043 
00044 void wrap_text_init(struct wrap_info *uw,
00045                   const char *output_chset,
00046                   void (*output_func)(const char *p, size_t l, void *arg),
00047                   void *arg);
00048 
00049 void wrap_text(struct wrap_info *uw,
00050               const char *newmsg,
00051               size_t newmsg_size);
00052 
00053 
00054 /*
00055 ** Format flowed text format-encoded message for editing.
00056 */
00057 
00058 struct show_textarea_info {
00059 
00060        size_t (*handler)(struct show_textarea_info *, const char *, size_t);
00061        int seen_sig;
00062        size_t sig_index;
00063 
00064        int stop_at_sig;
00065 };
00066 
00067 void show_textarea_init(struct show_textarea_info *info,
00068                      int stop_at_sig);
00069 
00070 void show_textarea(struct show_textarea_info *info,
00071                  const char *ptr, size_t cnt);
00072 
00073 #endif