2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/utility.h>
8 #include "intuition_intern.h"
9 #include <utility/tagitem.h>
10 #include <proto/exec.h>
12 /*****************************************************************************
15 #include <proto/intuition.h>
17 AROS_LH2(struct Window
*, OpenWindowTagList
,
20 AROS_LHA(struct NewWindow
*, newWindow
, A0
),
21 AROS_LHA(struct TagItem
*, tagList
, A1
),
24 struct IntuitionBase
*, IntuitionBase
, 101, Intuition
)
30 NewWindow - structure with window specification. This is for
31 compatibility with OpenWindow() and usually set to NULL
32 tagList - tags which specify appearance and behaviour of the window
35 WA_Left - Left edge of the window
36 WA_Top - Top edge of the window
37 WA_Width - Width of the window
38 WA_Height - Height of the window
39 WA_DetailPen - Pen number for window details (obsolete)
40 WA_BlockPen - Pen number for filled blocks (obsolete)
41 WA_IDCMP - Define what events should send messages to your task
44 Initial values for various boolean window properties. Can be
45 overwritten by WA_... tags.
47 WA_Gadgets (struct Gadget *)
48 Pointer to a linked list of gadgets
50 WA_Title (STRPTR) - Window title string
52 WA_CustomScreen (struct Screen *)
53 Open window on the given screen
55 WA_SuperBitMap (struct BitMap *)
56 Create window with superbitmap refreshing
58 WA_MinWidth - Minimum width of the window
59 WA_MinHeight - Minimum height of the window
60 WA_MaxWidth - Maximum width of the window
61 WA_MaxHeight - Maximum height of the window
62 Use 0 to keep the current size as limit. The maximums can be
63 set to -1 or ~0 to limit size only to screen dimension.
65 WA_SizeGadget (BOOL) - Make window resizeable
66 WA_DragBar (BOOL) - Make window dragable
67 WA_DepthGadget (BOOL) - Add a depth gadget
68 WA_CloseGadget (BOOL) - Add a close gadget
71 Create a window which is placed behind other windows
73 WA_ReportMouse (BOOL) - Store mouse position in struct Window
75 WA_NoCareRefresh (BOOL)
76 Use this if you don't want to be responsible for calling
77 BeginRefresh()/EndRefresh().
79 WA_Borderless (BOOL) - Create borderless window
82 Make this window the active one, i.e. it
83 receives the input from mouse and keyboard.
86 Set to TRUE if you want to get button events
87 events for the right mouse button.
89 WA_SimpleRefresh (BOOL)
90 Enable simplerefresh mode. Only specify if TRUE.
92 WA_SmartRefresh (BOOL)
93 Enable smartrefresh mode. Only specify if TRUE.
95 WA_SizeBRight (BOOL) - Place size gadget in right window border
96 WA_SizeBBottom (BOOL) - Place size gadget in bottom window border
98 WA_GimmeZeroZero (BOOL)
99 Create a GimmeZeroZero window. The window borders have their own
100 layer, so you can't overdraw it. The coordinate 0,0 is related to
101 the inner area of the window. This makes handling of windows
102 easier, but it slows down the system.
104 WA_NewLookMenus (BOOL)
105 Use DrawInfo colors for rendering the menu bar.
107 WA_ScreenTitle (STRPTR)
108 Screen title which is shown when window is active.
111 TRUE means that Intuition can move or shrink the window
112 to fit on the screen, within the limits given with
113 WA_MinWidth and WA_MinHeight. This attribute defaults
114 to TRUE when you call OpenWindowTags() with a NULL pointer
119 Dimensions of the interior region of the window.
121 Note that this restricts border gadgets:
122 - GACT_LEFTBORDER gadgets can't be GFLG_RELWIDTH if
123 WA_InnerWidth is used.
124 - GACT_RIGHTBORDER gadgets must be GFLG_RELRIGHT if
125 WA_InnerWidth is used.
126 - GACT_TOPBORDER gadgets can't be GFLG_RELHEIGHT if
127 WA_InnerHeight is used.
128 - GACT_BOTTOMBORDER gadgets must be GFLG_RELBOTTOM if
129 WA_InnerHeight is used.
131 WA_PubScreen (struct Screen *)
132 Open the window on the public screen with the given address.
133 An address of NULL means default public screen. You're
134 responsible that the screen stays open until OpenWindowTags()
136 you're the owner of the screen,
137 you have already a window open on the screen
138 or you use LockPubScreen()
140 WA_PubScreenName (STRPTR)
141 Open the window on the public screen with the given name.
143 WA_PubScreenFallBack (BOOL)
144 TRUE means that the default public screen can be used if
145 the specified named public screen is not available.
148 4 WORD's define the initial Left/Top/Width/Height of the
149 alternative zoom position/dimension. This adds a zoom
150 gadget to the window. If both left and top are set to ~0
151 the window will only be resized.
154 Limits the number of possible mousemove messages. Can
155 be changed with SetMouseQueue().
158 Limits the number of possible repeated IDCMP_RAWKEY,
159 IDCMP_VANILLAKEY and IDCMP_IDCMPUPDATE messages.
161 WA_BackFill (struct Hook *)
162 Function to be called for backfilling
165 Enables menuhelp. Pressing the help key during menu handling
166 sends IDCMP_MENUHELP messages.
168 WA_NotifyDepth (BOOL)
169 If TRUE send IDCMP_CHANGEWINDOW events when window is
170 depth arranged. Code field will be CWCODE_DEPTH.
172 WA_Checkmark (struct Image *)
173 Image to use as a checkmark in menus.
175 WA_AmigaKey (struct Image *)
176 Image to use as the Amiga-key symbol in menus.
179 The pointer to associate with the window. Use NULL
180 for the Preferences default pointer. You can create
181 custom pointers with NewObject() on "pointerclass".
184 WA_BusyPointer (BOOL)
185 Enable the Preferences busy-pointer.
188 WA_PointerDelay (BOOL)
189 Set this to TRUE to delay change of the pointer image.
190 This avoids flickering of the mouse pointer when it's
191 changed for short times.
194 Get IDCMP_GADGETHELP messages not only from the active
195 window, but from all its windows.
196 You have to get a help ID with utility.library/GetUniqueID()
197 and use it as data for WA_HelpGroup for all windows.
199 WA_HelpGroupWindow (struct Window *)
200 Alternative for WA_HelpGroup. Use the helpgroup of
203 WA_TabletMessages (BOOL)
204 Request extended tablet data.
208 Make this window a toolbox window
210 WA_Parent (struct Window *)
211 Make the window a child of the given window.
217 WA_ShapeRegion (struct Region *)
219 WA_ShapeHook (struct Hook *)
222 A pointer to the new window or NULL if it couldn't be
223 opened. Reasons for this might be lack of memory or illegal
236 *****************************************************************************/
240 struct ExtNewWindow nw
=
242 0, 0, /* Left, Top */
243 ~0, ~0, /* Width, Height */
244 0xFF, 0xFF, /* DetailPen, BlockPen */
247 NULL
, /* FirstGadget */
248 NULL
, /* CheckMark */
252 0, 0, /* MinWidth, MinHeight */
253 0, 0, /* MaxWidth, MaxHeight */
254 WBENCHSCREEN
, /* Type */
255 NULL
/* Extension (taglist) */
257 struct TagItem tags
[2] =
259 {WA_AutoAdjust
, TRUE
},
262 struct Window
*window
;
264 DEBUG_OPENWINDOWTAGLIST(dprintf("OpenWindowTagList: NewWindow 0x%lx TagList 0x%lx\n",
265 newWindow
, tagList
));
269 ASSERT_VALID_PTR_ROMOK(newWindow
);
271 CopyMem (newWindow
, &nw
, (newWindow
->Flags
& WFLG_NW_EXTENDED
) ? sizeof (struct ExtNewWindow
) :
272 sizeof (struct NewWindow
));
276 ASSERT_VALID_PTR_ROMOK(tagList
);
278 nw
.Extension
= tagList
;
279 nw
.Flags
|= WFLG_NW_EXTENDED
;
285 nw
.Flags
|= WFLG_NW_EXTENDED
;
289 ASSERT_VALID_PTR_ROMOK(tagList
);
291 tags
[1].ti_Tag
= TAG_MORE
;
292 tags
[1].ti_Data
= (IPTR
)tagList
;
297 window
= OpenWindow ((struct NewWindow
*)&nw
);
303 } /* OpenWindowTagList */