NetSurf
history.c
Go to the documentation of this file.
1/*
2 * Copyright 2017-2025 Chris Young <chris@unsatisfactorysoftware.co.uk>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file
21 * Implementation of Amiga global history viewer using core windows.
22 */
23
24#include <stdint.h>
25#include <stdlib.h>
26#include <stdbool.h>
27#include <string.h>
28
29#include <proto/asl.h>
30#include <proto/dos.h>
31#include <proto/intuition.h>
32
33#include <classes/window.h>
34#include <gadgets/layout.h>
35#include <gadgets/space.h>
36
37#include <reaction/reaction_macros.h>
38
41#include "netsurf/keypress.h"
42#include "netsurf/plotters.h"
43#include "utils/log.h"
44#include "utils/messages.h"
45#include "utils/nsoption.h"
46
47#include "amiga/corewindow.h"
48#include "amiga/drag.h"
49#include "amiga/file.h"
50#include "amiga/history.h"
51#include "amiga/libs.h"
52#include "amiga/menu.h"
53#include "amiga/theme.h"
54#include "amiga/utf8.h"
55
56enum {
57 /* Project menu */
71 /* Edit menu */
78};
79
80/**
81 * Amiga history viewer window context
82 */
84 /** Amiga core window context */
86
88 struct Menu *imenu; /* Intuition menu */
89};
90
92
93
94static void
96{
97 SetAttrs(history_win->core.objects[GID_CW_WIN],
98 WINDOW_MenuStrip, NULL,
99 TAG_DONE);
100
101 ami_menu_free_menu(history_win->menu_data, AMI_HISTORY_M_LAST, history_win->imenu);
102}
103
104/**
105 * destroy a previously created history view
106 */
107static void
109{
110 nserror res;
111
112 if(history_window == NULL)
113 return;
114
115 res = global_history_fini();
116 if (res == NSERROR_OK) {
118 res = ami_corewindow_fini(&history_window->core); /* closes the window for us, frees history_win */
119 history_window = NULL;
120 }
121}
122
123
124/**
125 * callback for mouse action for history viewer on core window
126 *
127 * \param ami_cw The Amiga core window structure.
128 * \param mouse_state netsurf mouse state on event
129 * \param x location of event
130 * \param y location of event
131 * \return NSERROR_OK on success otherwise apropriate error code
132 */
133static nserror
135 browser_mouse_state mouse_state,
136 int x, int y)
137{
138 global_history_mouse_action(mouse_state, x, y);
139
140 return NSERROR_OK;
141}
142
143/**
144 * callback for keypress for history viewer on core window
145 *
146 * \param ami_cw The Amiga core window structure.
147 * \param nskey The netsurf key code
148 * \return NSERROR_OK on success otherwise apropriate error code
149 */
150static nserror
151ami_history_global_key(struct ami_corewindow *ami_cw, uint32_t nskey)
152{
153 if (global_history_keypress(nskey)) {
154 return NSERROR_OK;
155 }
157}
158
159/**
160 * callback on draw event for history viewer on core window
161 *
162 * \param ami_cw The Amiga core window structure.
163 * \param x The x coordinate of global history area to redraw
164 * \param y The y coordinate of global history area to redraw
165 * \param r The rectangle of the window that needs updating.
166 * \param ctx The drawing context
167 * \return NSERROR_OK on success otherwise apropriate error code
168 */
169static nserror
171 int x, int y, struct rect *r,
172 struct redraw_context *ctx)
173{
174 global_history_redraw(x, y, r, ctx);
175
176 return NSERROR_OK;
177}
178
179/**
180 * callback on drag end for history viewer
181 *
182 * \param ami_cw The Amiga core window structure.
183 * \param x mouse x co-ordinate
184 * \param y mouse y co-ordinate
185 * \return NSERROR_OK on success otherwise apropriate error code
186 */
187static nserror
188ami_history_global_drag_end(struct ami_corewindow *ami_cw, int x, int y)
189{
190 struct nsurl *url = NULL;
191 const char *title = NULL;
192 bool ok = false;
193 struct gui_window_2 *gwin;
194 struct ami_corewindow *cw;
195
197 ok = global_history_get_selection(&url, &title);
198 }
199
200 if((ok == false) || (url == NULL)) {
201 ami_gui_beep();
202 } else if(url) {
203 if((gwin = ami_window_at_pointer(AMINS_WINDOW))) {
205 url,
206 NULL,
208 NULL,
209 NULL,
210 NULL);
211 } else if((cw = (struct ami_corewindow *)ami_window_at_pointer(AMINS_COREWINDOW)) &&
212 (ami_cw->icon_drop != NULL)) {
213 cw->icon_drop(cw, url, title, x, y);
214 }
215 }
216 return NSERROR_OK;
217}
218
219/**
220 * menu stuff
221 */
222
223 /* menu hook functions */
224HOOKF(void, ami_history_global_menu_item_project_export, APTR, window, struct IntuiMessage *)
225{
226 char fname[1024];
227 struct ami_corewindow *ami_cw;
228 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
229
230 if(AslRequestTags(savereq,
231 ASLFR_Window, ami_cw->win,
232 ASLFR_SleepWindow, TRUE,
233 ASLFR_TitleText, messages_get("NetSurf"),
234 ASLFR_Screen, ami_gui_get_screen(),
235 ASLFR_InitialFile, "history.html",
236 TAG_DONE)) {
237 strlcpy(fname, savereq->fr_Drawer, 1024);
238 AddPart(fname, savereq->fr_File, 1024);
240 global_history_export(fname, NULL);
242 }
243}
244
245HOOKF(void, ami_history_global_menu_item_project_expand_all, APTR, window, struct IntuiMessage *)
246{
248}
249
250HOOKF(void, ami_history_global_menu_item_project_expand_folders, APTR, window, struct IntuiMessage *)
251{
253}
254
255HOOKF(void, ami_history_global_menu_item_project_expand_links, APTR, window, struct IntuiMessage *)
256{
258}
259
260HOOKF(void, ami_history_global_menu_item_project_collapse_all, APTR, window, struct IntuiMessage *)
261{
263}
264
265HOOKF(void, ami_history_global_menu_item_project_collapse_folders, APTR, window, struct IntuiMessage *)
266{
268}
269
270HOOKF(void, ami_history_global_menu_item_project_collapse_links, APTR, window, struct IntuiMessage *)
271{
273}
274
275HOOKF(void, ami_history_global_menu_item_project_close, APTR, window, struct IntuiMessage *)
276{
277 struct ami_corewindow *ami_cw;
278 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
279
280 ami_cw->close_window = true;
281}
282
283HOOKF(void, ami_history_global_menu_item_edit_select_all, APTR, window, struct IntuiMessage *)
284{
286}
287
288HOOKF(void, ami_history_global_menu_item_edit_clear, APTR, window, struct IntuiMessage *)
289{
291}
292
293HOOKF(void, ami_history_global_menu_item_edit_delete, APTR, window, struct IntuiMessage *)
294{
296}
297
298
299/* menu setup */
300
302{
303 ami_menu_alloc_item(md, AMI_HISTORY_M_PROJECT, NM_TITLE, "Tree", NULL, NULL, NULL, NULL, 0);
304 ami_menu_alloc_item(md, AMI_HISTORY_M_EXPORT, NM_ITEM, "TreeExport", "S", "TBImages:list_save",
305 ami_history_global_menu_item_project_export, NULL, 0);
306 ami_menu_alloc_item(md, AMI_HISTORY_M_BAR_P1, NM_ITEM, NM_BARLABEL, NULL, NULL, NULL, NULL, 0);
307 ami_menu_alloc_item(md, AMI_HISTORY_M_EXPAND, NM_ITEM, "Expand", NULL, "TBImages:list_folderunfold", NULL, NULL, 0);
308 ami_menu_alloc_item(md, AMI_HISTORY_M_EXPAND_ALL, NM_SUB, "All", "+", NULL,
309 ami_history_global_menu_item_project_expand_all, NULL, 0);
310 ami_menu_alloc_item(md, AMI_HISTORY_M_EXPAND_FOLDERS, NM_SUB, "Folders", NULL, NULL,
311 ami_history_global_menu_item_project_expand_folders, NULL, 0);
312 ami_menu_alloc_item(md, AMI_HISTORY_M_EXPAND_LINKS, NM_SUB, "Links", NULL, NULL,
313 ami_history_global_menu_item_project_expand_links, NULL, 0);
314 ami_menu_alloc_item(md, AMI_HISTORY_M_COLLAPSE, NM_ITEM, "Collapse", NULL, "TBImages:list_folderfold", NULL, NULL, 0);
315 ami_menu_alloc_item(md, AMI_HISTORY_M_COLLAPSE_ALL, NM_SUB, "All", "-", NULL,
316 ami_history_global_menu_item_project_collapse_all, NULL, 0);
317 ami_menu_alloc_item(md, AMI_HISTORY_M_COLLAPSE_FOLDERS, NM_SUB, "Folders", NULL, NULL,
318 ami_history_global_menu_item_project_collapse_folders, NULL, 0);
319 ami_menu_alloc_item(md, AMI_HISTORY_M_COLLAPSE_LINKS, NM_SUB, "Links", NULL, NULL,
320 ami_history_global_menu_item_project_collapse_links, NULL, 0);
321 ami_menu_alloc_item(md, AMI_HISTORY_M_BAR_P2, NM_ITEM, NM_BARLABEL, NULL, NULL, NULL, NULL, 0);
322 ami_menu_alloc_item(md, AMI_HISTORY_M_CLOSE, NM_ITEM, "CloseWindow", "K", "TBImages:list_cancel",
323 ami_history_global_menu_item_project_close, NULL, 0);
324
325 ami_menu_alloc_item(md, AMI_HISTORY_M_EDIT, NM_TITLE, "Edit", NULL, NULL, NULL, NULL, 0);
326 ami_menu_alloc_item(md, AMI_HISTORY_M_SELECTALL, NM_ITEM, "SelectAllNS", "A", NSA_SPACE,
327 ami_history_global_menu_item_edit_select_all, NULL, 0);
328 ami_menu_alloc_item(md, AMI_HISTORY_M_CLEAR, NM_ITEM, "ClearNS", NULL, NSA_SPACE,
329 ami_history_global_menu_item_edit_clear, NULL, 0);
330 ami_menu_alloc_item(md, AMI_HISTORY_M_BAR_E1, NM_ITEM, NM_BARLABEL, NULL, NULL, NULL, NULL, 0);
331 ami_menu_alloc_item(md, AMI_HISTORY_M_DELETE, NM_ITEM, "TreeDelete", "Del", "TBImages:list_delete",
332 ami_history_global_menu_item_edit_delete, NULL, 0);
333
334 ami_menu_alloc_item(md, AMI_HISTORY_M_LAST, NM_END, NULL, NULL, NULL, NULL, NULL, 0);
335}
336
337static struct Menu *
339{
341 history_win->imenu = ami_menu_layout(history_win->menu_data, AMI_HISTORY_M_LAST);
342 if(history_win->imenu == NULL) return NULL;
343
344 return history_win->imenu;
345}
346
347
348static nserror
350{
351 struct ami_corewindow *ami_cw = (struct ami_corewindow *)&history_win->core;
352 ULONG refresh_mode = WA_SmartRefresh;
353
354 if(nsoption_bool(window_simple_refresh) == true) {
355 refresh_mode = WA_SimpleRefresh;
356 }
357
358 ami_cw->objects[GID_CW_WIN] = WindowObj,
359 WA_ScreenTitle, ami_gui_get_screen_title(),
360 WA_Title, ami_cw->wintitle,
361 WA_Activate, TRUE,
362 WA_DepthGadget, TRUE,
363 WA_DragBar, TRUE,
364 WA_CloseGadget, TRUE,
365 WA_SizeGadget, TRUE,
366 WA_SizeBRight, TRUE,
367 WA_Width, 150,
368 WA_Height, 200,
369 WA_PubScreen, ami_gui_get_screen(),
370 WA_ReportMouse, TRUE,
371 refresh_mode, TRUE,
372 WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
373 IDCMP_RAWKEY | IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
374 IDCMP_EXTENDEDMOUSE | IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
375 WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
376 WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
377 IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
378 WINDOW_SharedPort, ami_gui_get_shared_msgport(),
379 WINDOW_HorizProp, 1,
380 WINDOW_VertProp, 1,
381 WINDOW_UserData, history_win,
382 WINDOW_MenuStrip, ami_history_global_menu_create(history_win),
383 WINDOW_MenuUserData, WGUD_HOOK,
384 WINDOW_IconifyGadget, FALSE,
385#ifdef __amigaos4__
386 WINDOW_UniqueID, "NS_HISTORY_GLOBAL_WIN",
387 WINDOW_PopupGadget, TRUE,
388#endif
389 WINDOW_Position, WPOS_CENTERSCREEN,
390 WINDOW_ParentGroup, ami_cw->objects[GID_CW_MAIN] = LayoutVObj,
391 LAYOUT_AddChild, ami_cw->objects[GID_CW_DRAW] = SpaceObj,
392 GA_ID, GID_CW_DRAW,
393 SPACE_Transparent, TRUE,
394 SPACE_BevelStyle, BVS_DISPLAY,
395 SPACE_MinWidth, 50,
396 SPACE_MinHeight, 16,
397 GA_RelVerify, TRUE,
398 SpaceEnd,
399 EndGroup,
400 EndWindow;
401
402 if(ami_cw->objects[GID_CW_WIN] == NULL) {
403 return NSERROR_NOMEM;
404 }
405
406 return NSERROR_OK;
407}
408
409/* exported interface documented in amiga/cookies.h */
411{
412 struct ami_history_global_window *ncwin;
413 nserror res;
414
415 if(history_window != NULL) {
416 //windowtofront()
417 return NSERROR_OK;
418 }
419
420 ncwin = calloc(1, sizeof(struct ami_history_global_window));
421 if (ncwin == NULL) {
422 return NSERROR_NOMEM;
423 }
424
425 ncwin->core.wintitle = ami_utf8_easy((char *)messages_get("GlobalHistory"));
426
428 if (res != NSERROR_OK) {
429 NSLOG(netsurf, INFO, "SSL UI builder init failed");
431 free(ncwin);
432 return res;
433 }
434
435 /* initialise Amiga core window */
440 ncwin->core.event = NULL;
442 ncwin->core.icon_drop = NULL;
443
444 res = ami_corewindow_init(&ncwin->core);
445 if (res != NSERROR_OK) {
447 DisposeObject(ncwin->core.objects[GID_CW_WIN]);
448 free(ncwin);
449 return res;
450 }
451
452 res = global_history_init((struct core_window *)ncwin);
453 if (res != NSERROR_OK) {
455 DisposeObject(ncwin->core.objects[GID_CW_WIN]);
456 free(ncwin);
457 return res;
458 }
459
460 history_window = ncwin;
461
462 return NSERROR_OK;
463}
464
nserror ami_corewindow_fini(struct ami_corewindow *ami_cw)
finalise elements of Amiga core window.
Definition: corewindow.c:987
nserror ami_corewindow_init(struct ami_corewindow *ami_cw)
initialise elements of Amiga core window.
Definition: corewindow.c:928
@ GID_CW_MAIN
Definition: corewindow.h:35
@ GID_CW_WIN
Definition: corewindow.h:34
@ GID_CW_DRAW
Definition: corewindow.h:36
struct Screen * ami_gui_get_screen(void)
Get a pointer to the screen NetSurf is running on.
Definition: gui.c:404
void * ami_window_at_pointer(int type)
undocumented, or internal, or documented elsewhere
Definition: gui.c:683
struct browser_window * ami_gui2_get_browser_window(struct gui_window_2 *gwin)
Get browser window from gui_window_2.
Definition: gui.c:426
STRPTR ami_gui_get_screen_title(void)
Get the string for NetSurf's screen titlebar.
Definition: gui.c:1018
void ami_gui_beep(void)
Beep.
Definition: gui.c:415
struct MsgPort * ami_gui_get_shared_msgport(void)
Get shared message port.
static void ami_history_global_menulabs(struct ami_menu_data **md)
Definition: history.c:301
static nserror ami_history_global_key(struct ami_corewindow *ami_cw, uint32_t nskey)
callback for keypress for history viewer on core window
Definition: history.c:151
static struct ami_history_global_window * history_window
Definition: history.c:91
static void ami_history_global_destroy(struct ami_corewindow *ami_cw)
destroy a previously created history view
Definition: history.c:108
@ AMI_HISTORY_M_CLOSE
Definition: history.c:70
@ AMI_HISTORY_M_EXPAND_LINKS
Definition: history.c:64
@ AMI_HISTORY_M_BAR_P1
Definition: history.c:60
@ AMI_HISTORY_M_CLEAR
Definition: history.c:74
@ AMI_HISTORY_M_COLLAPSE
Definition: history.c:65
@ AMI_HISTORY_M_BAR_P2
Definition: history.c:69
@ AMI_HISTORY_M_EXPAND_ALL
Definition: history.c:62
@ AMI_HISTORY_M_LAST
Definition: history.c:77
@ AMI_HISTORY_M_EXPAND_FOLDERS
Definition: history.c:63
@ AMI_HISTORY_M_EDIT
Definition: history.c:72
@ AMI_HISTORY_M_EXPORT
Definition: history.c:59
@ AMI_HISTORY_M_COLLAPSE_FOLDERS
Definition: history.c:67
@ AMI_HISTORY_M_SELECTALL
Definition: history.c:73
@ AMI_HISTORY_M_PROJECT
Definition: history.c:58
@ AMI_HISTORY_M_BAR_E1
Definition: history.c:75
@ AMI_HISTORY_M_COLLAPSE_ALL
Definition: history.c:66
@ AMI_HISTORY_M_EXPAND
Definition: history.c:61
@ AMI_HISTORY_M_DELETE
Definition: history.c:76
@ AMI_HISTORY_M_COLLAPSE_LINKS
Definition: history.c:68
nserror ami_history_global_present(void)
Open the global history viewer.
Definition: history.c:410
HOOKF(void, ami_history_global_menu_item_project_export, APTR, window, struct IntuiMessage *)
menu stuff
Definition: history.c:224
static nserror ami_history_global_create_window(struct ami_history_global_window *history_win)
Definition: history.c:349
static struct Menu * ami_history_global_menu_create(struct ami_history_global_window *history_win)
Definition: history.c:338
static nserror ami_history_global_draw(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
callback on draw event for history viewer on core window
Definition: history.c:170
static nserror ami_history_global_drag_end(struct ami_corewindow *ami_cw, int x, int y)
callback on drag end for history viewer
Definition: history.c:188
static void ami_history_global_menu_free(struct ami_history_global_window *history_win)
Definition: history.c:95
static nserror ami_history_global_mouse(struct ami_corewindow *ami_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse action for history viewer on core window
Definition: history.c:134
struct Menu * ami_menu_layout(struct ami_menu_data **md, int max)
Definition: menu.c:419
void ami_menu_free_menu(struct ami_menu_data **md, int max, struct Menu *imenu)
Definition: menu.c:430
void ami_menu_alloc_item(struct ami_menu_data **md, int num, UBYTE type, const char *restrict label, const char *restrict key, const char *restrict icon, void *restrict func, void *restrict hookdata, UWORD flags)
Definition: menu.c:115
#define NSA_SPACE
empty space
Definition: menu.h:37
void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
Definition: theme.c:221
Browser window creation and manipulation interface.
nserror browser_window_navigate(struct browser_window *bw, struct nsurl *url, struct nsurl *referrer, enum browser_window_nav_flags flags, char *post_urlenc, struct fetch_multipart_data *post_multipart, struct hlcache_handle *parent)
Start fetching a page in a browser window.
@ BW_NAVIGATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
nserror global_history_init(void *core_window_handle)
Initialise the global history.
nserror global_history_expand(bool only_folders)
Expand the treeview's nodes.
nserror global_history_fini(void)
Finalise the global history.
void global_history_redraw(int x, int y, struct rect *clip, const struct redraw_context *ctx)
Redraw the global history.
bool global_history_has_selection(void)
Determine whether there is a selection.
bool global_history_get_selection(nsurl **url, const char **title)
Get the first selected node.
nserror global_history_export(const char *path, const char *title)
Save global history to file (html)
nserror global_history_contract(bool all)
Contract the treeview's nodes.
bool global_history_keypress(uint32_t key)
Key press handling.
void global_history_mouse_action(browser_mouse_state mouse, int x, int y)
Handles all kinds of mouse action.
nserror
Enumeration of error codes.
Definition: errors.h:29
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
Definition: errors.h:61
@ NSERROR_NOMEM
Memory exhaustion.
Definition: errors.h:32
@ NSERROR_OK
No error.
Definition: errors.h:30
struct FileRequester * savereq
Definition: file.c:53
@ AMINS_WINDOW
Definition: object.h:28
@ AMINS_COREWINDOW
Definition: object.h:36
void ami_utf8_free(char *ptr)
Definition: utf8.c:104
char * ami_utf8_easy(const char *string)
Definition: utf8.c:109
browser_mouse_state
Mouse state: 1 is primary mouse button.
Definition: mouse.h:52
@ GUI_POINTER_WAIT
Definition: mouse.h:127
@ GUI_POINTER_DEFAULT
Definition: mouse.h:113
Target independent plotting interface.
Interface to key press operations.
@ NS_KEY_SELECT_ALL
Definition: keypress.h:32
@ NS_KEY_CLEAR_SELECTION
Definition: keypress.h:45
@ NS_KEY_DELETE_LEFT
Definition: keypress.h:35
#define WindowObj
Definition: libs.h:77
#define LayoutVObj
Definition: libs.h:65
#define SpaceObj
Definition: libs.h:74
#define NSLOG(catname, level, logmsg, args...)
Definition: log.h:116
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Definition: messages.c:256
Localised message support (interface).
struct nsurl nsurl
NetSurf URL object.
Definition: nsurl.h:31
#define IDCMP_EXTENDEDMOUSE
Definition: os3support.h:121
#define BVS_DISPLAY
Definition: os3support.h:120
Interface to utility string handling.
Amiga core window state.
Definition: corewindow.h:47
void(* close)(struct ami_corewindow *ami_cw)
callback to close an Amiga core window
Definition: corewindow.h:164
Object * objects[GID_CW_LAST]
Definition: corewindow.h:54
nserror(* icon_drop)(struct ami_corewindow *ami_cw, struct nsurl *url, const char *title, int x, int y)
callback for icon drop on Amiga core window ie.
Definition: corewindow.h:157
bool close_window
Definition: corewindow.h:67
nserror(* mouse)(struct ami_corewindow *ami_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on Amiga core window
Definition: corewindow.h:120
nserror(* draw)(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
callback to draw on drawable area of Amiga core window
Definition: corewindow.h:97
nserror(* key)(struct ami_corewindow *ami_cw, uint32_t nskey)
callback for keypress on Amiga core window
Definition: corewindow.h:109
struct Window * win
Definition: corewindow.h:53
BOOL(* event)(struct ami_corewindow *ami_cw, ULONG result)
callback for unknown events on Amiga core window eg.
Definition: corewindow.h:132
nserror(* drag_end)(struct ami_corewindow *ami_cw, int x, int y)
callback for drag end on Amiga core window ie.
Definition: corewindow.h:143
struct Hook idcmp_hook
Definition: corewindow.h:56
char * wintitle
window title, must be allocated wth ami_utf8 function
Definition: corewindow.h:78
Amiga history viewer window context.
Definition: history.c:83
struct ami_menu_data * menu_data[AMI_HISTORY_M_LAST+1]
Definition: history.c:87
struct Menu * imenu
Definition: history.c:88
struct ami_corewindow core
Amiga core window context.
Definition: history.c:85
Rectangle coordinates.
Definition: types.h:40
Redraw context.
Definition: plotters.h:51
Option reading and saving interface.
#define nsoption_bool(OPTION)
Get the value of a boolean option.
Definition: nsoption.h:308