Skip to content

Commit 959b2ae

Browse files
committed
If we're always requesting hyperlinks then we don't have to track it
1 parent f4e28ee commit 959b2ae

File tree

3 files changed

+13
-36
lines changed

3 files changed

+13
-36
lines changed

inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ be used by |glk_select|. It also handles a few event maintenance tasks.
479479
evtype_MouseInput:
480480
win_obj.requesting_mouse = false;
481481
evtype_Hyperlink:
482-
win_obj.requesting_hyperlink = false;
482+
glk_request_hyperlink_event(win_obj.glk_ref);
483483
}
484484
return ev;
485485
];
@@ -633,16 +633,6 @@ requested.
633633
return 0;
634634
];
635635

636-
[ glk_cancel_hyperlink_event win win_obj;
637-
@push win;
638-
@glk 259 1 0;
639-
win_obj = FindGlkWindowFromRefNum(win);
640-
if (win_obj) {
641-
win_obj.requesting_hyperlink = false;
642-
}
643-
return 0;
644-
];
645-
646636
[ glk_cancel_line_event win event_struct win_obj;
647637
if (event_struct == 0) {
648638
event_struct = gg_arguments;
@@ -688,16 +678,6 @@ requested.
688678
return 0;
689679
];
690680

691-
[ glk_request_hyperlink_event win win_obj;
692-
@push win;
693-
@glk 258 1 0;
694-
win_obj = FindGlkWindowFromRefNum(win);
695-
if (win_obj) {
696-
win_obj.requesting_hyperlink = true;
697-
}
698-
return 0;
699-
];
700-
701681
[ glk_request_line_event win buf maxlen initlen win_obj;
702682
@push initlen;
703683
@push maxlen;
@@ -810,7 +790,6 @@ back to 32 bits.
810790
[ HANDLE_HYPERLINK_R val;
811791
if (current_glk_event-->GLK_EVENT_TYPE_SF == evtype_Hyperlink) {
812792
val = current_glk_event-->GLK_EVENT_VALUE1_SF;
813-
glk_request_hyperlink_event((current_glk_event-->GLK_EVENT_WINDOW_SF).glk_ref);
814793
hyperlink_value = val & hyperlink_payload_mask;
815794
if (hyperlink_value < 0) {
816795
hyperlink_value = hyperlink_value | hyperlink_tag_mask;

inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/InfGlk.i6t

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -690,17 +690,17 @@ Constant wintype_TextGrid = 4;
690690
return 0;
691691
];
692692

693-
![ glk_request_hyperlink_event _vararg_count;
694-
! ! glk_request_hyperlink_event(window)
695-
! @glk 258 _vararg_count 0;
696-
! return 0;
697-
!];
693+
[ glk_request_hyperlink_event _vararg_count;
694+
! glk_request_hyperlink_event(window)
695+
@glk 258 _vararg_count 0;
696+
return 0;
697+
];
698698

699-
![ glk_cancel_hyperlink_event _vararg_count;
700-
! ! glk_cancel_hyperlink_event(window)
701-
! @glk 259 _vararg_count 0;
702-
! return 0;
703-
!];
699+
[ glk_cancel_hyperlink_event _vararg_count;
700+
! glk_cancel_hyperlink_event(window)
701+
@glk 259 _vararg_count 0;
702+
return 0;
703+
];
704704

705705
[ glk_buffer_to_lower_case_uni _vararg_count ret;
706706
! glk_buffer_to_lower_case_uni(uintarray, arraylen, uint) => uint
@@ -921,4 +921,4 @@ Constant zcolor_Current = -2;
921921
! garglk_set_reversevideo_stream(str, reverse)
922922
@glk $1103 _vararg_count 0;
923923
return 0;
924-
];
924+
];

inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ The handle hyperlinks rule is defined by Inter as "HANDLE_HYPERLINK_R".
212212
To say link (T - hyperlink tag):
213213
(- MakeTaggedHyperlink({T}); -).
214214

215-
To say link (T - hyperlink tag) of (V - value of kind K):
215+
To say link (T - hyperlink tag) for/of/with (V - value of kind K):
216216
(- MakeTaggedHyperlink({T}, {-by-reference:V}, {-strong-kind:K}); -).
217217

218218
To say end link:
@@ -252,8 +252,6 @@ Chapter - Suspending and resuming input
252252

253253
A glk window has a text input status.
254254
The text input status property translates into Inter as "text_input_status".
255-
A glk window can be requesting hyperlink input.
256-
The requesting hyperlink input property translates into Inter as "requesting_hyperlink".
257255
A glk window can be requesting mouse input.
258256
The requesting mouse input property translates into Inter as "requesting_mouse".
259257

0 commit comments

Comments
 (0)