27 |
|
|
28 |
|
|
29 |
#include <malloc.h> |
#include <malloc.h> |
30 |
/* wrapper around free. */ |
/* safe wrapper around free. */ |
31 |
#define free_if_alloc(ptr) \ |
#define free_if_alloc(ptr) \ |
32 |
do { \ |
do { \ |
33 |
if (ptr) free (ptr); \ |
if (ptr) free (ptr); \ |
45 |
|
|
46 |
#define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len) |
#define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len) |
47 |
|
|
48 |
/* Dialog IDs for clipboard operations. */ |
/* Dialog IDs for the various operations. */ |
49 |
#define ID_OE_SELECTALL 40125 |
#define ID_OE_SELECTALL 40125 |
50 |
#define ID_OE_COPY 40484 |
#define ID_OE_COPY 40484 |
51 |
#define ID_OE_PASTE 40231 |
#define ID_OE_PASTE 40231 |
85 |
|
|
86 |
/* Viewer context. */ |
/* Viewer context. */ |
87 |
struct viewer_ctx_s { |
struct viewer_ctx_s { |
88 |
|
HWND main_wnd; |
89 |
const char *msg; |
const char *msg; |
90 |
}; |
}; |
91 |
typedef struct viewer_ctx_s *viewer_ctx_t; |
typedef struct viewer_ctx_s *viewer_ctx_t; |
96 |
/*EXPORT*/ int gpgoe_remove (void); |
/*EXPORT*/ int gpgoe_remove (void); |
97 |
|
|
98 |
/*-- OEProc.c --*/ |
/*-- OEProc.c --*/ |
99 |
|
extern plugin_ctx_t oe_plug; |
100 |
extern HINSTANCE mod_hinst_dll; |
extern HINSTANCE mod_hinst_dll; |
101 |
|
extern HANDLE plugin_active; |
102 |
|
|
103 |
|
/* support for the mailer window. */ |
104 |
extern WNDPROC oe_proc_old; |
extern WNDPROC oe_proc_old; |
105 |
|
LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, |
106 |
|
WPARAM wparam, LPARAM lparam); |
107 |
|
|
108 |
|
/* support for the common dialogs. */ |
109 |
extern WNDPROC of_proc_old; |
extern WNDPROC of_proc_old; |
110 |
extern HANDLE plugin_active; |
LRESULT CALLBACK of_proc (HWND hwnd, UINT msg, |
111 |
LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); |
WPARAM wparam, LPARAM lparam); |
112 |
LRESULT CALLBACK of_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); |
|
113 |
|
/* support for the main window. */ |
114 |
|
extern WNDPROC oe_main_proc_old; |
115 |
|
LRESULT CALLBACK oe_main_proc (HWND hwnd, UINT msg, |
116 |
|
WPARAM wparam, LPARAM lparam); |
117 |
|
|
118 |
|
|
119 |
/*-- OECrypto.c --*/ |
/*-- OECrypto.c --*/ |
120 |
gpgme_error_t oe_handle_mail (plugin_ctx_t ctx); |
gpgme_error_t oe_handle_mail (plugin_ctx_t ctx); |
121 |
|
gpgme_error_t oe_decrypt_msg (HWND main_wnd, char **r_msg); |
122 |
|
|
123 |
/*-- OEMisc.c --*/ |
/*-- OEMisc.c --*/ |
124 |
|
void center_window (HWND hwndChild, HWND parent); |
125 |
char* utf8_to_native (const char *string); |
char* utf8_to_native (const char *string); |
126 |
char* native_to_utf8 (const char *string); |
char* native_to_utf8 (const char *string); |
127 |
char* get_clip_text (HWND hwnd); |
char* get_clip_text (HWND hwnd); |
131 |
void* xcalloc (size_t n, size_t m); |
void* xcalloc (size_t n, size_t m); |
132 |
char* xstrdup (const char *s); |
char* xstrdup (const char *s); |
133 |
void xfree (void *p); |
void xfree (void *p); |
134 |
|
void quote_msg_text (const char *inp, char **r_outp); |
135 |
|
|
136 |
/*-- dialogs --*/ |
/*-- dialogs --*/ |
137 |
BOOL CALLBACK encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, |
BOOL CALLBACK encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, |
151 |
int prev_was_bad, int fd); |
int prev_was_bad, int fd); |
152 |
void free_pass_cb (pass_cb_t cb); |
void free_pass_cb (pass_cb_t cb); |
153 |
pass_cb_t new_pass_cb (HWND main); |
pass_cb_t new_pass_cb (HWND main); |
154 |
|
int pass_cb_cancelled (pass_cb_t cb); |
155 |
|
void free_pass_cache (void); |
156 |
|
|
157 |
/*-- OENLS.c --*/ |
/*-- OENLS.c --*/ |
158 |
int setup_gettext (void); |
int setup_gettext (void); |