Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / reqtools / rtscreenmoderequesta.c
blobbc4f53bd67b7079f42b15e4b46e7416e077afdb2
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <exec/types.h>
10 #include <proto/exec.h>
11 #include <proto/reqtools.h>
12 #include <proto/intuition.h>
13 #include <exec/libraries.h>
14 #include <exec/memory.h>
15 #include <aros/libcall.h>
17 #include "reqtools_intern.h"
19 /*****************************************************************************
21 NAME */
23 AROS_LH3(ULONG, rtScreenModeRequestA,
25 /* SYNOPSIS */
27 AROS_LHA(struct rtScreenModeRequester *, screenmodereq, A1),
28 AROS_LHA(char *, title, A3),
29 AROS_LHA(struct TagItem *, taglist, A0),
31 /* LOCATION */
33 struct ReqToolsBase *, ReqToolsBase, 24, ReqTools)
35 /* FUNCTION
36 *IMPORTANT* THIS REQUESTER IS ONLY AVAILABLE FROM KICKSTART 2.0
37 ONWARDS! The 1.3 version of ReqTools also contains the
38 screenmode requester, but unless you are running 2.0 or higher
39 it will not come up. So what you essentially have to do is NOT
40 call rtScreenModeRequestA() if your program is running on a
41 machine with Kickstart 1.2/1.3. You can safely call
42 rtScreenModeRequestA() if you are running on a 2.0 machine,
43 even if the user has installed the 1.3 version of ReqTools.
45 Get a screen mode from the user.
47 The user will be able to pick a screen mode by name, enter the size
48 and the number of colors (bitplane depth).
50 rtScreenModeRequestA() will call the appropriate 2.0 functions to
51 get all the mode's information. If no name has been assigned to the
52 mode one will be constructed automatically.
54 INPUTS
55 screenmodereq - pointer to a struct rtScreenModeRequester allocated
56 with rtAllocRequestA().
57 title - pointer to requester window title (null terminated).
58 taglist - pointer to a TagItem array.
60 TAGS
61 RT_Window - see rtEZRequestA()
63 RT_ReqPos - see rtEZRequestA()
65 RT_LeftOffset - see rtEZRequestA()
67 RT_TopOffset - see rtEZRequestA()
69 RT_PubScrName - see rtEZRequestA()
71 RT_Screen - see rtEZRequestA()
73 RT_ReqHandler - see rtEZRequestA()
75 RT_WaitPointer - see rtEZRequestA()
77 RT_LockWindow - see rtEZRequestA()
79 RT_ScreenToFront - see rtEZRequestA()
81 RT_ShareIDCMP - see rtEZRequestA()
83 RT_Locale - see rtEZRequestA()
85 RT_IntuiMsgFunc - (struct Hook *) [V38] The requester will call
86 this hook for each IDCMP message it gets that doesn't belong to
87 its window. Only applies if you used the RT_ShareIDCMP tag to
88 share the IDCMP port with the parent window. Parameters are as
89 follows:
91 A0 - (struct Hook *) your hook
92 A2 - (struct rtScreenModeRequester *) your req
93 A1 - (struct IntuiMessage *) the message
95 After you have finished examining the message and your hook
96 returns, ReqTools will reply the message. So do not reply the
97 message yourself!
99 RT_Underscore - (char) [V38] Indicates the symbol that precedes the
100 character in a gadget's label to be underscored. This will also
101 define the keyboard shortcut for this gadget. Currently only
102 needed for RTSC_OkText. Usually set to '_'.
104 RT_DefaultFont - (struct TextFont *) This tag allows you to specify
105 the font to be used in the requester when the screen font is
106 proportional. Default is GfxBase->DefaultFont. This tag is
107 obsolete in ReqTools 2.2 and higher.
109 RT_TextAttr - [V38] see rtFileRequestA()
111 RTSC_Flags - (ULONG) Several flags:
113 SCREQF_OVERSCANGAD - Add an overscan cycle gadget to the
114 requester. After the requester returns you may read the
115 overscan type in 'rq->OverscanType' If this is 0 no
116 overscan is selected (Regular Size), if non-zero it holds
117 one of the OSCAN_... values defined in the include file
118 'intuition/screens.[h|i]'.
120 SCREQF_AUTOSCROLLGAD - Add an autoscroll checkbox gadget to the
121 requester. After the requester returns read
122 'smreq->AutoScroll' to see if the user prefers autoscroll
123 to be on or off.
125 SCREQF_SIZEGADS - Add width and height gadgets to the
126 requester. If you do not add these gadgets the width and
127 height returned will be the default width and height for
128 the selected overscan type.
130 SCREQF_DEPTHGAD - Add a depth slider gadget to the requester.
131 If you do not add a depth gadget, the depth returned will
132 be the maximum depth this mode can be opened in.
134 SCREQF_NONSTDMODES - Include all modes. Unless this flag is set
135 rtScreenModeRequestA() will exclude nonstandard modes.
136 Nonstandard modes are presently HAM and EHB
137 (ExtraHalfBrite). So unless you are picking a mode to do
138 some rendering in leave this flag unset. Without this flag
139 set the mode returned will be a normal bitplaned mode.
141 SCREQF_GUIMODES - Set this flag if you are getting a screen
142 mode to open a user interface screen in. The modes shown
143 will be standard modes with a high enough resolution
144 (minumum 640 pixels). If this flag is set the
145 SCREQF_NONSTDMODES flag is ignored.
147 RTSC_Height - (ULONG) Suggested height of screenmode requester
148 window.
150 RTSC_OkText - (char *) Replacement text for "Ok" gadget, max 6
151 chars long.
153 RTSC_MinWidth - (UWORD) The minimum display width allowed.
155 RTSC_MaxWidth - (UWORD) The maximum display width allowed.
157 RTSC_MinHeight - (UWORD) The minimum display height allowed.
159 RTSC_MaxHeight - (UWORD) The maximum display height allowed.
161 RTSC_MinDepth - (UWORD) The minimum display depth allowed. Modes
162 with a minimum display depth lower than this value will not be
163 included in the list.
165 RTSC_MaxDepth - (UWORD) The maximum display depth allowed.
167 RTSC_PropertyFlags - (ULONG) A mode must have these property flags
168 to be included. Only bits set in RTSC_PropertyMask are
169 considered.
171 RTSC_PropertyMask - (ULONG) Mask to apply to RTSC_PropertyFlags to
172 determine which bits to consider. See use of 'newsignals' and
173 'signalmask' in exec.library/SetSignal(). Default is to
174 consider all bits in RTSC_PropertyFlags as significant.
176 RTSC_FilterFunc - (struct Hook *) Call this hook for each display
177 mode id in the system's list. Parameters are as follows:
179 A0 - (struct Hook *) your hook
180 A2 - (struct rtScreenModeRequester *) your req
181 A1 - (ULONG) 32-bit extended mode id
183 If your hook returns TRUE the mode will be accepted. If it
184 returns FALSE the mode will be skipped and will not appear in
185 the requester.
187 RESULT
188 ret - FALSE if the requester was canceled or TRUE if the user
189 selected a screen mode (check 'smreq->DisplayID' for the 32-bit
190 extended display mode, 'smreq->DisplayWidth' and
191 'smreq->DisplayHeight' for the display size,
192 'smreq->DisplayDepth' for the screen's depth).
194 NOTES
195 Automatically adjusts the requester to the screen font.
197 If the requester got too big for the screen because of a very large
198 font, the topaz.font will be used.
200 rtScreenModeRequest() checks the pr_WindowPtr of your process to
201 find the screen to put the requester on.
203 EXAMPLE
205 BUGS
206 none known
208 SEE ALSO
209 graphics.library/GetDisplayInfoData(), graphics/displayinfo.h,
210 exec.library/SetSignal(), Intuition/SA_DisplayID screen tag
212 INTERNALS
214 HISTORY
216 ******************************************************************************/
218 AROS_LIBFUNC_INIT
220 return (ULONG)FileRequestA((struct RealFileRequester *)screenmodereq, NULL, title, taglist); /* in filereq.c */
222 AROS_LIBFUNC_EXIT
224 } /* rtScreenModeRequestA */