13 July 2024, 18:18 | #1 |
Registered User
Join Date: Sep 2022
Location: Fjellhamar/Norway
Posts: 10
|
ReAction RequestScreenMode
I'm trying to read the result of Reaction's RequestScreenMode
Reaction_Guide.pdf suggest (get file example) I should use the GetAttrs function, which I found defined in the file clib/reaction_lib_protos.h But the linker doesn't know what GetAttrs is. Code:
if(RequestScreenMode(obj[WIN_GSM], window)) { ULONG display_id = 0L; GetAttrs(obj[WIN_GSM], GETSCREENMODE_DisplayID, &display_id, TAG_DONE); |
13 July 2024, 22:03 | #2 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,703
|
To use any of the reaction.lib functions, you have to link reaction.lib, the same way as you would link amiga.lib or small.lib. Something like:
slink FROM LIB:c.o foo.o LIBRARY LIB:small.lib LIB:reaction.lib TO foo Or you can use the GetAttr() function instead which is just an intuition.library function. |
14 July 2024, 13:18 | #3 |
Registered User
Join Date: Sep 2022
Location: Fjellhamar/Norway
Posts: 10
|
Thanks a lot!
I could not find reaction.lib anywhere, but your second suggestion works out just fine. For the curious, in case somebody else comes across this problem, here's my code with an extra check to make sure it works as expected. Code:
if(RequestScreenMode(obj[WIN_GSM], window)) { ULONG display_id = 0L; struct NameInfo name_info; GetAttr(GETSCREENMODE_DisplayID, obj[WIN_GSM], &display_id); GetDisplayInfoData( NULL, &name_info, sizeof(struct NameInfo), DTAG_NAME, display_id); printf("Selected display: %s\n", name_info.Name); } |
14 July 2024, 13:28 | #4 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,703
|
reaction.lib is in the OS3.9 NDK at https://os.amigaworld.de/index.php?lang=en&page=12
Works fine on OS3.2 etc. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ReAction] How to change content of LIST_BROWSER gadget. | mateusz_s | Coders. System | 5 | 17 November 2023 17:14 |
Converting to Reaction: Shared UserPort? | Warty | Coders. C/C++ | 12 | 10 July 2021 07:38 |
installing Classact and Reaction on 3.1.4 | dschallock | support.Other | 8 | 06 February 2020 19:19 |
Update ReAction classes | mritter0 | Coders. General | 2 | 30 July 2014 01:55 |
Proper ReAction coding | mritter0 | Coders. C/C++ | 3 | 24 April 2014 07:34 |
|
|