21 |
#ifndef GPGOE_H |
#ifndef GPGOE_H |
22 |
#define GPGOE_H |
#define GPGOE_H |
23 |
|
|
24 |
/* dummy until gettext support is finished. */ |
/* gettext support. */ |
25 |
#define _(X) (X) |
const char *gettext (const char *msgid); |
26 |
|
#define _(X) gettext ((X)) |
27 |
|
|
28 |
|
|
29 |
#include <malloc.h> |
#include <malloc.h> |
30 |
/* wrapper around free. */ |
/* wrapper around free. */ |
45 |
|
|
46 |
#define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len) |
#define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len) |
47 |
|
|
48 |
/* OE5 V5.x/V6 command id's. */ |
/* Dialog IDs for clipboard operations. */ |
49 |
#define ID_OE5_SELECTALL 40125 |
#define ID_OE_SELECTALL 40125 |
50 |
#define ID_OE5_COPY 40484 |
#define ID_OE_COPY 40484 |
51 |
#define ID_OE5_PASTE 40231 |
#define ID_OE_PASTE 40231 |
52 |
#define ID_OE5_ENCRYPT 40260 |
#define ID_OE_SAVE_ATT 40104 |
53 |
#define ID_OE5_SIGN 40299 |
|
54 |
#define ID_OE5_SEND 40411 |
/* Common dialogs (Get{Open,Save}FileName) */ |
55 |
#define ID_OE5_PREVMSG 40145 |
#define ID_OF_OK 1 |
56 |
#define ID_OE5_NEXTMSG 40146 |
#define ID_OF_CANCEL 2 |
57 |
|
#define ID_OF_OPEN_FILE 1152 |
58 |
/* Common dialogs (GetOpenFileName) */ |
#define ID_OF_SAVE_FILE 1148 |
|
#define OF_IDOK 1 |
|
|
#define OF_IDFILE 1152 |
|
59 |
|
|
60 |
|
|
61 |
/* Context for the recipient list. */ |
/* Context for the recipient list. */ |
70 |
struct plugin_ctx_s { |
struct plugin_ctx_s { |
71 |
HWND msg_wnd, main_wnd, addr_wnd; |
HWND msg_wnd, main_wnd, addr_wnd; |
72 |
HWND to_wnd, cc_wnd, bcc_wnd; |
HWND to_wnd, cc_wnd, bcc_wnd; |
73 |
|
HWND attach; |
74 |
char *to; |
char *to; |
75 |
char *cc; |
char *cc; |
76 |
char *bcc; |
char *bcc; |
79 |
recip_list_t rset; |
recip_list_t rset; |
80 |
char errbuf[256]; |
char errbuf[256]; |
81 |
char *orig_text; |
char *orig_text; |
82 |
|
int use_utf8; |
83 |
}; |
}; |
84 |
typedef struct plugin_ctx_s *plugin_ctx_t; |
typedef struct plugin_ctx_s *plugin_ctx_t; |
85 |
|
|
97 |
/*-- OEProc.c --*/ |
/*-- OEProc.c --*/ |
98 |
extern HINSTANCE mod_hinst_dll; |
extern HINSTANCE mod_hinst_dll; |
99 |
extern WNDPROC oe_proc_old; |
extern WNDPROC oe_proc_old; |
100 |
|
extern WNDPROC of_proc_old; |
101 |
|
extern HANDLE plugin_active; |
102 |
LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); |
LRESULT CALLBACK oe_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); |
103 |
|
LRESULT CALLBACK of_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); |
104 |
|
|
105 |
/*-- OECrypto.c --*/ |
/*-- OECrypto.c --*/ |
106 |
gpgme_error_t oe_handle_mail (plugin_ctx_t ctx); |
gpgme_error_t oe_handle_mail (plugin_ctx_t ctx); |
107 |
|
|
108 |
/*-- OEMisc.c --*/ |
/*-- OEMisc.c --*/ |
109 |
char* utf8_to_native (const char *string); |
char* utf8_to_native (const char *string); |
110 |
|
char* native_to_utf8 (const char *string); |
111 |
char* get_clip_text (HWND hwnd); |
char* get_clip_text (HWND hwnd); |
112 |
int set_clip_text (HWND hwnd, const char *text, int nbytes); |
int set_clip_text (HWND hwnd, const char *text, int nbytes); |
113 |
void show_error (HWND hwnd, const char *caption, |
void show_error (HWND hwnd, const char *caption, |
114 |
UINT type, const char *fmt, ...); |
UINT type, const char *fmt, ...); |
115 |
void* xcalloc (size_t n, size_t m); |
void* xcalloc (size_t n, size_t m); |
116 |
char* xstrdup (const char *s); |
char* xstrdup (const char *s); |
117 |
|
void xfree (void *p); |
118 |
|
|
119 |
/*-- dialogs --*/ |
/*-- dialogs --*/ |
120 |
BOOL CALLBACK encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, |
BOOL CALLBACK encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, |
135 |
void free_pass_cb (pass_cb_t cb); |
void free_pass_cb (pass_cb_t cb); |
136 |
pass_cb_t new_pass_cb (HWND main); |
pass_cb_t new_pass_cb (HWND main); |
137 |
|
|
138 |
|
/*-- OENLS.c --*/ |
139 |
|
int setup_gettext (void); |
140 |
|
|
141 |
#endif /* GPGOE_H */ |
#endif /* GPGOE_H */ |