winstuff.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. /*
  2. * winstuff.h: Windows-specific inter-module stuff.
  3. */
  4. #ifndef PUTTY_WINSTUFF_H
  5. #define PUTTY_WINSTUFF_H
  6. #ifndef AUTO_WINSOCK
  7. #include <winsock2.h>
  8. #endif
  9. #include <windows.h>
  10. #include <stdio.h> /* for FILENAME_MAX */
  11. #include "tree234.h"
  12. #ifndef MPEXT
  13. #include "winhelp.h"
  14. #endif
  15. struct Filename {
  16. char *path;
  17. };
  18. #ifdef MPEXT
  19. FILE * mp_wfopen(const char *filename, const char *mode);
  20. #define f_open(filename, mode, isprivate) ( mp_wfopen((filename)->path, (mode)) )
  21. #else
  22. #define f_open(filename, mode, isprivate) ( fopen((filename)->path, (mode)) )
  23. #endif
  24. struct FontSpec {
  25. char *name;
  26. int isbold;
  27. int height;
  28. int charset;
  29. };
  30. struct FontSpec *fontspec_new(const char *name,
  31. int bold, int height, int charset);
  32. #ifndef CLEARTYPE_QUALITY
  33. #define CLEARTYPE_QUALITY 5
  34. #endif
  35. #define FONT_QUALITY(fq) ( \
  36. (fq) == FQ_DEFAULT ? DEFAULT_QUALITY : \
  37. (fq) == FQ_ANTIALIASED ? ANTIALIASED_QUALITY : \
  38. (fq) == FQ_NONANTIALIASED ? NONANTIALIASED_QUALITY : \
  39. CLEARTYPE_QUALITY)
  40. #define PLATFORM_IS_UTF16 /* enable UTF-16 processing when exchanging
  41. * wchar_t strings with environment */
  42. /*
  43. * Where we can, we use GetWindowLongPtr and friends because they're
  44. * more useful on 64-bit platforms, but they're a relatively recent
  45. * innovation, missing from VC++ 6 and older MinGW. Degrade nicely.
  46. * (NB that on some systems, some of these things are available but
  47. * not others...)
  48. */
  49. #ifndef GCLP_HCURSOR
  50. /* GetClassLongPtr and friends */
  51. #undef GetClassLongPtr
  52. #define GetClassLongPtr GetClassLong
  53. #undef SetClassLongPtr
  54. #define SetClassLongPtr SetClassLong
  55. #define GCLP_HCURSOR GCL_HCURSOR
  56. /* GetWindowLongPtr and friends */
  57. #undef GetWindowLongPtr
  58. #define GetWindowLongPtr GetWindowLong
  59. #undef SetWindowLongPtr
  60. #define SetWindowLongPtr SetWindowLong
  61. #undef GWLP_USERDATA
  62. #define GWLP_USERDATA GWL_USERDATA
  63. #undef DWLP_MSGRESULT
  64. #define DWLP_MSGRESULT DWL_MSGRESULT
  65. /* Since we've clobbered the above functions, we should clobber the
  66. * associated type regardless of whether it's defined. */
  67. #undef LONG_PTR
  68. #define LONG_PTR LONG
  69. #endif
  70. #define BOXFLAGS DLGWINDOWEXTRA
  71. #define BOXRESULT (DLGWINDOWEXTRA + sizeof(LONG_PTR))
  72. #define DF_END 0x0001
  73. #ifndef NO_SECUREZEROMEMORY
  74. #define PLATFORM_HAS_SMEMCLR /* inhibit cross-platform one in misc.c */
  75. #endif
  76. /*
  77. * Dynamically linked functions. These come in two flavours:
  78. *
  79. * - GET_WINDOWS_FUNCTION does not expose "name" to the preprocessor,
  80. * so will always dynamically link against exactly what is specified
  81. * in "name". If you're not sure, use this one.
  82. *
  83. * - GET_WINDOWS_FUNCTION_PP allows "name" to be redirected via
  84. * preprocessor definitions like "#define foo bar"; this is principally
  85. * intended for the ANSI/Unicode DoSomething/DoSomethingA/DoSomethingW.
  86. * If your function has an argument of type "LPTSTR" or similar, this
  87. * is the variant to use.
  88. * (However, it can't always be used, as it trips over more complicated
  89. * macro trickery such as the WspiapiGetAddrInfo wrapper for getaddrinfo.)
  90. *
  91. * (DECL_WINDOWS_FUNCTION works with both these variants.)
  92. */
  93. #define DECL_WINDOWS_FUNCTION(linkage, rettype, name, params) \
  94. typedef rettype (WINAPI *t_##name) params; \
  95. linkage t_##name p_##name
  96. #define STR1(x) #x
  97. #define STR(x) STR1(x)
  98. #define GET_WINDOWS_FUNCTION_PP(module, name) \
  99. (p_##name = module ? (t_##name) GetProcAddress(module, STR(name)) : NULL)
  100. #define GET_WINDOWS_FUNCTION(module, name) \
  101. (p_##name = module ? (t_##name) GetProcAddress(module, #name) : NULL)
  102. /*
  103. * Global variables. Most modules declare these `extern', but
  104. * window.c will do `#define PUTTY_DO_GLOBALS' before including this
  105. * module, and so will get them properly defined.
  106. */
  107. #ifndef GLOBAL
  108. #ifdef PUTTY_DO_GLOBALS
  109. #define GLOBAL
  110. #else
  111. #define GLOBAL extern
  112. #endif
  113. #endif
  114. #ifndef DONE_TYPEDEFS
  115. #define DONE_TYPEDEFS
  116. typedef struct conf_tag Conf;
  117. typedef struct backend_tag Backend;
  118. typedef struct terminal_tag Terminal;
  119. #endif
  120. #define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
  121. #define PUTTY_REG_PARENT "Software\\SimonTatham"
  122. #define PUTTY_REG_PARENT_CHILD "PuTTY"
  123. #define PUTTY_REG_GPARENT "Software"
  124. #define PUTTY_REG_GPARENT_CHILD "SimonTatham"
  125. /* Result values for the jumplist registry functions. */
  126. #define JUMPLISTREG_OK 0
  127. #define JUMPLISTREG_ERROR_INVALID_PARAMETER 1
  128. #define JUMPLISTREG_ERROR_KEYOPENCREATE_FAILURE 2
  129. #define JUMPLISTREG_ERROR_VALUEREAD_FAILURE 3
  130. #define JUMPLISTREG_ERROR_VALUEWRITE_FAILURE 4
  131. #define JUMPLISTREG_ERROR_INVALID_VALUE 5
  132. #define PUTTY_HELP_FILE "putty.hlp"
  133. #define PUTTY_CHM_FILE "putty.chm"
  134. #define PUTTY_HELP_CONTENTS "putty.cnt"
  135. #define GETTICKCOUNT GetTickCount
  136. #define CURSORBLINK GetCaretBlinkTime()
  137. #define TICKSPERSEC 1000 /* GetTickCount returns milliseconds */
  138. #define DEFAULT_CODEPAGE CP_ACP
  139. #define USES_VTLINE_HACK
  140. typedef HDC Context;
  141. typedef unsigned int uint32; /* int is 32-bits on Win32 and Win64. */
  142. #define PUTTY_UINT32_DEFINED
  143. #ifndef NO_GSSAPI
  144. /*
  145. * GSS-API stuff
  146. */
  147. #define GSS_CC CALLBACK
  148. /*
  149. typedef struct Ssh_gss_buf {
  150. size_t length;
  151. char *value;
  152. } Ssh_gss_buf;
  153. #define SSH_GSS_EMPTY_BUF (Ssh_gss_buf) {0,NULL}
  154. typedef void *Ssh_gss_name;
  155. */
  156. #endif
  157. /*
  158. * Window handles for the windows that can be running during a
  159. * PuTTY session.
  160. */
  161. GLOBAL HWND hwnd; /* the main terminal window */
  162. GLOBAL HWND logbox;
  163. /*
  164. * The all-important instance handle.
  165. */
  166. GLOBAL HINSTANCE hinst;
  167. /*
  168. * Help file stuff in winhelp.c.
  169. */
  170. void init_help(void);
  171. void shutdown_help(void);
  172. int has_help(void);
  173. void launch_help(HWND hwnd, const char *topic);
  174. void quit_help(HWND hwnd);
  175. /*
  176. * The terminal and logging context are notionally local to the
  177. * Windows front end, but they must be shared between window.c and
  178. * windlg.c. Likewise the saved-sessions list.
  179. */
  180. GLOBAL Terminal *term;
  181. GLOBAL void *logctx;
  182. #define WM_NETEVENT (WM_APP + 5)
  183. /*
  184. * On Windows, we send MA_2CLK as the only event marking the second
  185. * press of a mouse button. Compare unix.h.
  186. */
  187. #define MULTICLICK_ONLY_EVENT 1
  188. /*
  189. * On Windows, data written to the clipboard must be NUL-terminated.
  190. */
  191. #define SELECTION_NUL_TERMINATED 1
  192. /*
  193. * On Windows, copying to the clipboard terminates lines with CRLF.
  194. */
  195. #define SEL_NL { 13, 10 }
  196. /*
  197. * sk_getxdmdata() does not exist under Windows (not that I
  198. * couldn't write it if I wanted to, but I haven't bothered), so
  199. * it's a macro which always returns NULL. With any luck this will
  200. * cause the compiler to notice it can optimise away the
  201. * implementation of XDM-AUTHORIZATION-1 in x11fwd.c :-)
  202. */
  203. #define sk_getxdmdata(socket, lenp) (NULL)
  204. /*
  205. * File-selector filter strings used in the config box. On Windows,
  206. * these strings are of exactly the type needed to go in
  207. * `lpstrFilter' in an OPENFILENAME structure.
  208. */
  209. #define FILTER_KEY_FILES ("PuTTY Private Key Files (*.ppk)\0*.ppk\0" \
  210. "All Files (*.*)\0*\0\0\0")
  211. #define FILTER_WAVE_FILES ("Wave Files (*.wav)\0*.WAV\0" \
  212. "All Files (*.*)\0*\0\0\0")
  213. #define FILTER_DYNLIB_FILES ("Dynamic Library Files (*.dll)\0*.dll\0" \
  214. "All Files (*.*)\0*\0\0\0")
  215. /*
  216. * winnet.c dynamically loads WinSock 2 or WinSock 1 depending on
  217. * what it can get, which means any WinSock routines used outside
  218. * that module must be exported from it as function pointers. So
  219. * here they are.
  220. */
  221. DECL_WINDOWS_FUNCTION(GLOBAL, int, WSAAsyncSelect,
  222. (SOCKET, HWND, u_int, long));
  223. DECL_WINDOWS_FUNCTION(GLOBAL, int, WSAEventSelect,
  224. (SOCKET, WSAEVENT, long));
  225. DECL_WINDOWS_FUNCTION(GLOBAL, int, select,
  226. (int, fd_set FAR *, fd_set FAR *,
  227. fd_set FAR *, const struct timeval FAR *));
  228. DECL_WINDOWS_FUNCTION(GLOBAL, int, WSAGetLastError, (void));
  229. DECL_WINDOWS_FUNCTION(GLOBAL, int, WSAEnumNetworkEvents,
  230. (SOCKET, WSAEVENT, LPWSANETWORKEVENTS));
  231. extern int socket_writable(SOCKET skt);
  232. extern void socket_reselect_all(void);
  233. /*
  234. * Exports from winctrls.c.
  235. */
  236. struct ctlpos {
  237. HWND hwnd;
  238. WPARAM font;
  239. int dlu4inpix;
  240. int ypos, width;
  241. int xoff;
  242. int boxystart, boxid;
  243. char *boxtext;
  244. };
  245. /*
  246. * Exports from winutils.c.
  247. */
  248. typedef struct filereq_tag filereq; /* cwd for file requester */
  249. BOOL request_file(filereq *state, OPENFILENAME *of, int preserve, int save);
  250. filereq *filereq_new(void);
  251. void filereq_free(filereq *state);
  252. int message_box(LPCTSTR text, LPCTSTR caption, DWORD style, DWORD helpctxid);
  253. char *GetDlgItemText_alloc(HWND hwnd, int id);
  254. void split_into_argv(char *, int *, char ***, char ***);
  255. /*
  256. * Private structure for prefslist state. Only in the header file
  257. * so that we can delegate allocation to callers.
  258. */
  259. struct prefslist {
  260. int listid, upbid, dnbid;
  261. int srcitem;
  262. int dummyitem;
  263. int dragging;
  264. };
  265. /*
  266. * This structure is passed to event handler functions as the `dlg'
  267. * parameter, and hence is passed back to winctrls access functions.
  268. */
  269. struct dlgparam {
  270. HWND hwnd; /* the hwnd of the dialog box */
  271. struct winctrls *controltrees[8]; /* can have several of these */
  272. int nctrltrees;
  273. char *wintitle; /* title of actual window */
  274. char *errtitle; /* title of error sub-messageboxes */
  275. void *data; /* data to pass in refresh events */
  276. union control *focused, *lastfocused; /* which ctrl has focus now/before */
  277. char shortcuts[128]; /* track which shortcuts in use */
  278. int coloursel_wanted; /* has an event handler asked for
  279. * a colour selector? */
  280. struct { unsigned char r, g, b, ok; } coloursel_result; /* 0-255 */
  281. tree234 *privdata; /* stores per-control private data */
  282. int ended, endresult; /* has the dialog been ended? */
  283. int fixed_pitch_fonts; /* are we constrained to fixed fonts? */
  284. };
  285. /*
  286. * Exports from winctrls.c.
  287. */
  288. void ctlposinit(struct ctlpos *cp, HWND hwnd,
  289. int leftborder, int rightborder, int topborder);
  290. HWND doctl(struct ctlpos *cp, RECT r,
  291. char *wclass, int wstyle, int exstyle, char *wtext, int wid);
  292. void bartitle(struct ctlpos *cp, char *name, int id);
  293. void beginbox(struct ctlpos *cp, char *name, int idbox);
  294. void endbox(struct ctlpos *cp);
  295. void editboxfw(struct ctlpos *cp, int password, char *text,
  296. int staticid, int editid);
  297. void radioline(struct ctlpos *cp, char *text, int id, int nacross, ...);
  298. void bareradioline(struct ctlpos *cp, int nacross, ...);
  299. void radiobig(struct ctlpos *cp, char *text, int id, ...);
  300. void checkbox(struct ctlpos *cp, char *text, int id);
  301. void statictext(struct ctlpos *cp, char *text, int lines, int id);
  302. void staticbtn(struct ctlpos *cp, char *stext, int sid,
  303. char *btext, int bid);
  304. void static2btn(struct ctlpos *cp, char *stext, int sid,
  305. char *btext1, int bid1, char *btext2, int bid2);
  306. void staticedit(struct ctlpos *cp, char *stext,
  307. int sid, int eid, int percentedit);
  308. void staticddl(struct ctlpos *cp, char *stext,
  309. int sid, int lid, int percentlist);
  310. void combobox(struct ctlpos *cp, char *text, int staticid, int listid);
  311. void staticpassedit(struct ctlpos *cp, char *stext,
  312. int sid, int eid, int percentedit);
  313. void bigeditctrl(struct ctlpos *cp, char *stext,
  314. int sid, int eid, int lines);
  315. void ersatztab(struct ctlpos *cp, char *stext, int sid, int lid, int s2id);
  316. void editbutton(struct ctlpos *cp, char *stext, int sid,
  317. int eid, char *btext, int bid);
  318. void sesssaver(struct ctlpos *cp, char *text,
  319. int staticid, int editid, int listid, ...);
  320. void envsetter(struct ctlpos *cp, char *stext, int sid,
  321. char *e1stext, int e1sid, int e1id,
  322. char *e2stext, int e2sid, int e2id,
  323. int listid, char *b1text, int b1id, char *b2text, int b2id);
  324. void charclass(struct ctlpos *cp, char *stext, int sid, int listid,
  325. char *btext, int bid, int eid, char *s2text, int s2id);
  326. void colouredit(struct ctlpos *cp, char *stext, int sid, int listid,
  327. char *btext, int bid, ...);
  328. void prefslist(struct prefslist *hdl, struct ctlpos *cp, int lines,
  329. char *stext, int sid, int listid, int upbid, int dnbid);
  330. int handle_prefslist(struct prefslist *hdl,
  331. int *array, int maxmemb,
  332. int is_dlmsg, HWND hwnd,
  333. WPARAM wParam, LPARAM lParam);
  334. void progressbar(struct ctlpos *cp, int id);
  335. void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
  336. char *e1stext, int e1sid, int e1id,
  337. char *e2stext, int e2sid, int e2id,
  338. char *btext, int bid,
  339. char *r1text, int r1id, char *r2text, int r2id);
  340. void dlg_auto_set_fixed_pitch_flag(void *dlg);
  341. int dlg_get_fixed_pitch_flag(void *dlg);
  342. void dlg_set_fixed_pitch_flag(void *dlg, int flag);
  343. #define MAX_SHORTCUTS_PER_CTRL 16
  344. /*
  345. * This structure is what's stored for each `union control' in the
  346. * portable-dialog interface.
  347. */
  348. struct winctrl {
  349. union control *ctrl;
  350. /*
  351. * The control may have several components at the Windows
  352. * level, with different dialog IDs. To avoid needing N
  353. * separate platformsidectrl structures (which could be stored
  354. * separately in a tree234 so that lookup by ID worked), we
  355. * impose the constraint that those IDs must be in a contiguous
  356. * block.
  357. */
  358. int base_id;
  359. int num_ids;
  360. /*
  361. * Remember what keyboard shortcuts were used by this control,
  362. * so that when we remove it again we can take them out of the
  363. * list in the dlgparam.
  364. */
  365. char shortcuts[MAX_SHORTCUTS_PER_CTRL];
  366. /*
  367. * Some controls need a piece of allocated memory in which to
  368. * store temporary data about the control.
  369. */
  370. void *data;
  371. };
  372. /*
  373. * And this structure holds a set of the above, in two separate
  374. * tree234s so that it can find an item by `union control' or by
  375. * dialog ID.
  376. */
  377. struct winctrls {
  378. tree234 *byctrl, *byid;
  379. };
  380. struct controlset;
  381. struct controlbox;
  382. void winctrl_init(struct winctrls *);
  383. void winctrl_cleanup(struct winctrls *);
  384. void winctrl_add(struct winctrls *, struct winctrl *);
  385. void winctrl_remove(struct winctrls *, struct winctrl *);
  386. struct winctrl *winctrl_findbyctrl(struct winctrls *, union control *);
  387. struct winctrl *winctrl_findbyid(struct winctrls *, int);
  388. struct winctrl *winctrl_findbyindex(struct winctrls *, int);
  389. void winctrl_layout(struct dlgparam *dp, struct winctrls *wc,
  390. struct ctlpos *cp, struct controlset *s, int *id);
  391. int winctrl_handle_command(struct dlgparam *dp, UINT msg,
  392. WPARAM wParam, LPARAM lParam);
  393. void winctrl_rem_shortcuts(struct dlgparam *dp, struct winctrl *c);
  394. int winctrl_context_help(struct dlgparam *dp, HWND hwnd, int id);
  395. void dp_init(struct dlgparam *dp);
  396. void dp_add_tree(struct dlgparam *dp, struct winctrls *tree);
  397. void dp_cleanup(struct dlgparam *dp);
  398. /*
  399. * Exports from wincfg.c.
  400. */
  401. void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
  402. int midsession, int protocol);
  403. /*
  404. * Exports from windlg.c.
  405. */
  406. void defuse_showwindow(void);
  407. int do_config(void);
  408. int do_reconfig(HWND, int);
  409. void showeventlog(HWND);
  410. void showabout(HWND);
  411. void force_normal(HWND hwnd);
  412. void modal_about_box(HWND hwnd);
  413. void show_help(HWND hwnd);
  414. /*
  415. * Exports from winmisc.c.
  416. */
  417. extern OSVERSIONINFO osVersion;
  418. BOOL init_winver(void);
  419. HMODULE load_system32_dll(const char *libname);
  420. const char *win_strerror(int error);
  421. /*
  422. * Exports from sizetip.c.
  423. */
  424. void UpdateSizeTip(HWND src, int cx, int cy);
  425. void EnableSizeTip(int bEnable);
  426. /*
  427. * Exports from unicode.c.
  428. */
  429. struct unicode_data;
  430. void init_ucs(Conf *, struct unicode_data *);
  431. /*
  432. * Exports from winhandl.c.
  433. */
  434. #define HANDLE_FLAG_OVERLAPPED 1
  435. #define HANDLE_FLAG_IGNOREEOF 2
  436. #define HANDLE_FLAG_UNITBUFFER 4
  437. struct handle;
  438. typedef int (*handle_inputfn_t)(struct handle *h, void *data, int len);
  439. typedef void (*handle_outputfn_t)(struct handle *h, int new_backlog);
  440. struct handle *handle_input_new(HANDLE handle, handle_inputfn_t gotdata,
  441. void *privdata, int flags);
  442. struct handle *handle_output_new(HANDLE handle, handle_outputfn_t sentdata,
  443. void *privdata, int flags);
  444. int handle_write(struct handle *h, const void *data, int len);
  445. void handle_write_eof(struct handle *h);
  446. HANDLE *handle_get_events(int *nevents);
  447. void handle_free(struct handle *h);
  448. #ifdef MPEXT
  449. int handle_got_event(HANDLE event);
  450. #else
  451. void handle_got_event(HANDLE event);
  452. #endif
  453. void handle_unthrottle(struct handle *h, int backlog);
  454. int handle_backlog(struct handle *h);
  455. void *handle_get_privdata(struct handle *h);
  456. /*
  457. * winpgntc.c needs to schedule callbacks for asynchronous agent
  458. * requests. This has to be done differently in GUI and console, so
  459. * there's an exported function used for the purpose.
  460. *
  461. * Also, we supply FLAG_SYNCAGENT to force agent requests to be
  462. * synchronous in pscp and psftp.
  463. */
  464. void agent_schedule_callback(void (*callback)(void *, void *, int),
  465. void *callback_ctx, void *data, int len);
  466. #define FLAG_SYNCAGENT 0x1000
  467. /*
  468. * winpgntc.c also exports these two functions which are used by the
  469. * server side of Pageant as well, to get the user SID for comparing
  470. * with clients'.
  471. */
  472. int init_advapi(void); /* initialises everything needed by get_user_sid */
  473. PSID get_user_sid(void);
  474. /*
  475. * Exports from winser.c.
  476. */
  477. extern Backend serial_backend;
  478. /*
  479. * Exports from winjump.c.
  480. */
  481. #define JUMPLIST_SUPPORTED /* suppress #defines in putty.h */
  482. void add_session_to_jumplist(const char * const sessionname);
  483. void remove_session_from_jumplist(const char * const sessionname);
  484. void clear_jumplist(void);
  485. /*
  486. * Extra functions in winstore.c over and above the interface in
  487. * storage.h.
  488. *
  489. * These functions manipulate the Registry section which mirrors the
  490. * current Windows 7 jump list. (Because the real jump list storage is
  491. * write-only, we need to keep another copy of whatever we put in it,
  492. * so that we can put in a slightly modified version the next time.)
  493. */
  494. /* Adds a saved session to the registry jump list mirror. 'item' is a
  495. * string naming a saved session. */
  496. int add_to_jumplist_registry(const char *item);
  497. /* Removes an item from the registry jump list mirror. */
  498. int remove_from_jumplist_registry(const char *item);
  499. /* Returns the current jump list entries from the registry. Caller
  500. * must free the returned pointer, which points to a contiguous
  501. * sequence of NUL-terminated strings in memory, terminated with an
  502. * empty one. */
  503. char *get_jumplist_registry_entries(void);
  504. #endif