Skip to content

Commit 28d9ba5

Browse files
committed
If we're always requesting hyperlinks then we don't have to track it
1 parent e9b3d83 commit 28d9ba5

File tree

4 files changed

+14
-39
lines changed

4 files changed

+14
-39
lines changed

inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7x

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

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

18641864
To say end link:
@@ -1888,8 +1888,6 @@ Chapter - Suspending and resuming input
18881888

18891889
A glk window has a text input status.
18901890
The text input status property translates into Inter as "text_input_status".
1891-
A glk window can be requesting hyperlink input.
1892-
The requesting hyperlink input property translates into Inter as "requesting_hyperlink".
18931891
A glk window can be requesting mouse input.
18941892
The requesting mouse input property translates into Inter as "requesting_mouse".
18951893

inform7/Internal/Inter/Architecture32Kit/Sections/Glk.i6t

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ be used by |glk_select|. It also handles a few event maintenance tasks.
467467
evtype_MouseInput:
468468
win_obj.requesting_mouse = false;
469469
evtype_Hyperlink:
470-
win_obj.requesting_hyperlink = false;
470+
glk_request_hyperlink_event(win_obj.glk_ref);
471471
}
472472
return ev;
473473
];
@@ -610,16 +610,6 @@ requested.
610610
return 0;
611611
];
612612

613-
[ glk_cancel_hyperlink_event win win_obj;
614-
@push win;
615-
@glk 259 1 0;
616-
win_obj = FindGlkWindowFromRefNum(win);
617-
if (win_obj) {
618-
win_obj.requesting_hyperlink = false;
619-
}
620-
return 0;
621-
];
622-
623613
[ glk_cancel_line_event win event_struct win_obj;
624614
if (event_struct == 0) {
625615
event_struct = gg_arguments;
@@ -665,16 +655,6 @@ requested.
665655
return 0;
666656
];
667657

668-
[ glk_request_hyperlink_event win win_obj;
669-
@push win;
670-
@glk 258 1 0;
671-
win_obj = FindGlkWindowFromRefNum(win);
672-
if (win_obj) {
673-
win_obj.requesting_hyperlink = true;
674-
}
675-
return 0;
676-
];
677-
678658
[ glk_request_line_event win buf maxlen initlen win_obj;
679659
@push initlen;
680660
@push maxlen;
@@ -787,7 +767,6 @@ back to 32 bits.
787767
[ HANDLE_HYPERLINK_R val;
788768
if (current_glk_event-->GLK_EVENT_TYPE_SF == evtype_Hyperlink) {
789769
val = current_glk_event-->GLK_EVENT_VALUE1_SF;
790-
glk_request_hyperlink_event((current_glk_event-->GLK_EVENT_WINDOW_SF).glk_ref);
791770
hyperlink_value = val & hyperlink_payload_mask;
792771
if (hyperlink_value < 0) {
793772
hyperlink_value = hyperlink_value | hyperlink_tag_mask;

inform7/Internal/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/extensions/basic_inform/Sections/Glulx and Glk.w

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

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

206206
To say end link:
@@ -240,8 +240,6 @@ Chapter - Suspending and resuming input
240240

241241
A glk window has a text input status.
242242
The text input status property translates into Inter as "text_input_status".
243-
A glk window can be requesting hyperlink input.
244-
The requesting hyperlink input property translates into Inter as "requesting_hyperlink".
245243
A glk window can be requesting mouse input.
246244
The requesting mouse input property translates into Inter as "requesting_mouse".
247245

0 commit comments

Comments
 (0)