2 ** $VER
: iconobject.i
41.6 (23 Jan
2008 21:30:36)
4 ** (C
) Copyright
1996-1999 ALiENDESiGN
5 ** (C
) Copyright
2000-2008 The Scalos Team
8 IFND DATATYPES_ICONOBJECT_I
9 DATATYPES_ICONOBJECT_I
SET 1
11 ;------------------------------------------------------------------------------
14 INCLUDE
"exec/types.i"
17 IFND INTUITION_IMAGECLASS_I
18 INCLUDE
"intuition/imageclass.i"
21 IFND DATATYPES_DATATYPESCLASS_I
22 INCLUDE
"datatypes/datatypesclass.i"
25 ;------------------------------------------------------------------------------
28 ;DTA_Dummy EQU $
80001000 ;TAGUSER
+$
1000
30 ;DTA_Name EQU DTA_Dummy
+100
35 IDTA_Type EQU DTA_Dummy
+901 ;(.SG
) Icon Type
36 IDTA_Text EQU DTA_Dummy
+902 ;(ISG
) Icon Text
37 IDTA_DefaultTool EQU DTA_Dummy
+903 ;(.SG
) DefaultTool
38 IDTA_WindowRect EQU DTA_Dummy
+904 ;(.SG
) WindowSize
39 IDTA_ToolTypes EQU DTA_Dummy
+905 ;(.SG
) Tooltype Array
40 IDTA_Stacksize EQU DTA_Dummy
+906 ;(.SG
) Stacksize
41 IDTA_InnerLeft EQU DTA_Dummy
+907 ;(ISG
)
42 IDTA_InnerTop EQU DTA_Dummy
+908 ;(ISG
)
43 IDTA_InnerRight EQU DTA_Dummy
+909 ;(ISG
)
44 IDTA_InnerBottom EQU DTA_Dummy
+910 ;(ISG
)
45 IDTA_FrameType EQU DTA_Dummy
+911 ;(ISG
) NormalFrame
46 IDTA_WinCurrentX EQU DTA_Dummy
+912 ;(.SG
)
47 IDTA_WinCurrentY EQU DTA_Dummy
+913 ;(.SG
)
48 IDTA_LayoutFlags EQU DTA_Dummy
+914 ;(..G
)
49 IDTA_Extention EQU DTA_Dummy
+915 ;(..G
) e.g.
".info"
50 IDTA_Mask_Normal EQU DTA_Dummy
+916 ;(.SG
) BlitMask
51 IDTA_Mask_Selected EQU DTA_Dummy
+917 ;(.SG
) BlitMask
52 IDTA_Flags EQU DTA_Dummy
+918 ;(.SG
) DrawerData Flags
53 IDTA_ViewModes EQU DTA_Dummy
+919 ;(.SG
) DrawerData ViewModes
54 IDTA_DefType EQU DTA_Dummy
+920 ;(I..
) DefIcon Type
55 IDTA_MaxDepth EQU DTA_Dummy
+921 ;(.S.
) of the bitmap
56 IDTA_TextPenOutline EQU DTA_Dummy
+922 ;(ISG
) textpen for outline text
57 IDTA_TextMode EQU DTA_Dummy
+923 ;(IS.
) textmode
58 IDTA_TextSkip EQU DTA_Dummy
+924 ;(IS.
) space between text and image
59 IDTA_FrameTypeSel EQU DTA_Dummy
+925 ;(ISG
) SelectedFrame
60 IDTA_HalfShadowPen EQU DTA_Dummy
+926 ;(IS.
) needed for some frames
61 IDTA_HalfShinePen EQU DTA_Dummy
+927 ;(IS.
) needed for some frames
62 IDTA_RenderHook
: EQU DTA_Dummy
+928 ;(IS.
) needed for animated AppIcons
+jl
+
63 IDTA_DoFreeDiskObject
: EQU DTA_Dummy
+929 ;(I..
) Free DiskObject delivered by AIDTA_Icon
+jl
+
64 IDTA_TextStyle
: EQU DTA_Dummy
+930 ;(ISG
) ULONG
+jl
+ 20011231 Text style for icon text
65 IDTA_Font
: EQU DTA_Dummy
+931 ;(ISG
) (struct TextFont
*) +jl
+ 20010818 font to render icon text in
*/
66 IDTA_SupportedIconTypes
: EQU DTA_Dummy
+932 ;(I..
) ULONG bits enable specific icon types
67 IDTA_TextPen
: EQU DTA_Dummy
+933 ;(ISG
) icon text pen
68 IDTA_TextPenSel
: EQU DTA_Dummy
+934 ;(ISG
) selected icon text pen
69 IDTA_TextPenShadow
: EQU DTA_Dummy
+935 ;(ISG
) icon text shadow pen
70 IDTA_MaskBM_Normal EQU DTA_Dummy
+936 ;(..G
) struct BitMap
* +jl
+ 20020201
71 IDTA_MaskBM_Selected EQU DTA_Dummy
+937 ;(..G
) struct BitMap
* +jl
+ 20020201
72 IDTA_UserFlags EQU DTA_Dummy
+938 ;(ISG
) ULONG
73 IDTA_Borderless EQU DTA_Dummy
+939 ;(ISG
) ULONG always draw icon without border
74 IDTA_AlphaChannel EQU DTA_Dummy
+940 ;(..G
) UBYTE
* byte array of alpha channel information
75 ; or
NULL if no alpha channel supported
76 IDTA_Fonthandle EQU DTA_Dummy
+942 ;(ISG
) (APTR
) opaque font handle to use with font function vector
77 IDTA_FontHook EQU DTA_Dummy
+943 ;(ISG
) (struct Hook
*) font function Hook
78 IDTA_MultiLineText EQU DTA_Dummy
+944 ;(ISG
) ULONG
- Flag
: allow splitting of icon text into multiple lines
79 IDTA_ARGBImageData EQU DTA_Dummy
+945 ;(..G
) struct ARGBHeader
* image data in ARGB format. Not available for all icon types
*/
80 IDTA_SizeConstraints EQU DTA_Dummy
+946 ;(I..
) struct Rectangle
* - set min
/max sizes for icon
81 IDTA_Width_Mask_Normal EQU DTA_Dummy
+947 ;(ISG
) ULONG
- Witdh of non-selected mask bitplane
82 IDTA_Height_Mask_Normal EQU DTA_Dummy
+948 ;(ISG
) UBYTE
* - Height of non-selected mask bitplane
83 IDTA_Width_Mask_Selected EQU DTA_Dummy
+949 ;(ISG
) UBYTE
* - Width of selected mask bitplane
84 IDTA_Height_Mask_Selected EQU DTA_Dummy
+950 ;(ISG
) UBYTE
* - Height of non-selected mask bitplane
85 IDTA_CopyARGBImageData EQU DTA_Dummy
+951 ;(ISG
) ULONG
- If
TRUE, copy IDTA_ARGBImageData
86 IDTA_IconType EQU DTA_Dummy
+952 ;(..G
) ULONG
- type of icon
*/
87 IDTA_NumberOfColorsSupported EQU DTA_Dummy
+953 ;(..G
) ULONG
- number of colors supported by icon type
(e.g.
256 by GlowIcons
+ NewIcons
) */
88 IDTA_OverlayType EQU DTA_Dummy
+954 ;(ISG
) ULONG
- type of overlay to draw over icon
- not used
, but only stored by datatype
*/
89 IDTA_Backfill EQU DTA_Dummy
+955 ; (ISG
) ULONG
- Pen number to use for unselected background fill
90 IDTA_BackfillSel EQU DTA_Dummy
+956 ; (ISG
) ULONG
- Pen number to use for selected background fill
91 IDTA_TextDrawMode EQU DTA_Dummy
+957 ; (ISG
) UBYTE
- draw mode for icon Text
(JAM1 or JAM2
)
92 IDTA_TextBackPen EQU DTA_Dummy
+958 ; (ISG
) UBYTE
- icon text background color for IDTA_TextDrawMode
= IDTA_TextDrawMode
93 IDTA_CopySelARGBImageData EQU DTA_Dummy
+959 ; (ISG
) ULONG
- If
TRUE, copy IDTA_SelARGBImageData
94 IDTA_SelARGBImageData EQU DTA_Dummy
+960 ; (..G
) struct ARGBHeader
* selected image data in ARGB format. Not available for all icon types
95 IDTA_SelAlphaChannel EQU DTA_Dummy
+961 ; (..G
) UBYTE
* - byte array of alpha channel information
96 IDTA_ToolWindow EQU DTA_Dummy
+962 ; (.SG
) STRPTR
- Tool Window
97 ; or
NULL if no alpha channel supported
98 IDTA_CloneIconObject EQU DTA_Dummy
+963 ; (I..
)
99 IDTA_TextPenBgSel EQU DTA_Dummy
+964 ; (ISG
) UWORD
- pen for rectangle around selected icon text
100 IDTA_SelectedTextRectangle EQU DTA_Dummy
+965 ; (I.G
) ULONG
- Flag
: draw rectangle around selected icon text
101 IDTA_SelTextRectBorderX EQU DTA_Dummy
+966 ; (ISG
) UWORD
- Additional horizontal border around selected icon text rectangle
102 IDTA_SelTextRectBorderY EQU DTA_Dummy
+967 ; (ISG
) UWORD
- Additional vertical border around selected icon text rectangle
103 IDTA_SelTextRectRadius EQU DTA_Dummy
+968 ; (ISG
) UWORD
- Radius for selected icon text rectangle corners
105 IDTA_UnscaledWidth EQU DTA_Dummy
+969 ; (ISG
) ULONG
- unscaled width of icon
106 IDTA_UnscaledHeight EQU DTA_Dummy
+970 ; (ISG
) ULONG
- unscaled width of icon
108 IDTA_ScalePercentage EQU DTA_Dummy
+971 ; (I..
) UWORD
- Scale factor in percent
110 ; allowed range for IDTA_ScalePercentage
111 IDTA_ScalePercentage_MIN EQU
25
112 IDTA_ScalePercentage_MAX EQU
400
115 AIDTA_Icon EQU DTA_Dummy
+1101 ;(I.G
) original Icon
118 IDTV_TextMode_Normal EQU
0
119 IDTV_TextMode_Outline EQU
1
120 IDTV_TextMode_Shadow EQU
2
123 IDTV_ViewModes_Default EQU
0
124 IDTV_ViewModes_Icon EQU
1
125 IDTV_ViewModes_Name EQU
2
126 IDTV_ViewModes_Size EQU
3
127 IDTV_ViewModes_Date EQU
4
128 IDTV_ViewModes_Time EQU
5
129 IDTV_ViewModes_Comment EQU
6
130 IDTV_ViewModes_Protection EQU
7
131 IDTV_ViewModes_Owner EQU
8
132 IDTV_ViewModes_Group EQU
9
133 IDTV_ViewModes_Type EQU
10
134 IDTV_ViewModes_Version EQU
11
135 IDTV_ViewModes_MiniIcon EQU
12
137 ; IDTA_SupportedIconTypes values
(bit mask
)
138 IDTV_IconType_NewIcon equ $
00000001
139 IDTV_IconType_ColorIcon equ $
00000002
141 ;/* IDTA_UserFlags flag bits
*/
142 ; this icon should be rendered in shadowed state
143 BITDEF ICONOBJ_USERFLAG
,DrawShadowed
,0
144 BITDEF ICONOBJ_USERFLAG
,DefaultIcon
,1
145 BITDEF ICONOBJ_USERFLAG
,DrawHighlite
,2
147 ;------------------------------------------------------------------------------
155 STRUCTURE ARGBHeader
,0
158 APTR argb_ImageData
; struct ARGB
*
159 LABEL ARGBHeader_SIZEOF
161 ;------------------------------------------------------------------------------
163 ; Icon types
- parameter for IDTA_IconType
165 ioICONTYPE_Standard EQU
0 ; standard icon
166 ioICONTYPE_NewIcon EQU
1
167 ioICONTYPE_GlowIcon EQU
2 ; OS3.5
+ GlowIcon
168 ioICONTYPE_PngIcon EQU
3
170 ;------------------------------------------------------------------------------
172 STRUCTURE ScalosBitMapAndColor
,0
176 APTR sac_BitMap
; struct BitMap
*
177 ULONG sac_TransparentColor
; number of pen for transparent color
178 ULONG sac_NumColors
; number of entries in sac_ColorTable
179 APTR sac_ColorTable
; ULONG
* -- color table
, 3 longwords per entry
180 LABEL ScalosBitMapAndColor_SIZEOF
182 ; set sac_TransparentColor to this value for no transparency
183 SAC_TRANSPARENT_NONE equ $ffffffff
185 ;------------------------------------------------------------------------------
187 ; parameter for IDTA_FontFunctions
189 iofMsg_DONERASTPORT equ
0
192 iofMsg_SETFONTSTYLE equ
3
193 iofMsg_TEXTEXTENT equ
4
195 iofMsg_GETFONTHEIGHT equ
6
196 iofMsg_GETFONTBASELINE equ
7
197 iofMsg_SETTRANSPARENCY equ
8
200 STRUCTURE ioFontMsg_DoneRastPort
,4
201 ; ULONG MsgID
; ; iofMsg_DONERASTPORT
203 APTR iofdr_FontHandle
206 STRUCTURE ioFontMsg_SetFont
,4
207 ; ULONG MsgID
; iofMsg_SETFONT
209 APTR iofsf_FontHandle
213 STRUCTURE ioFontMsg_Text
,4
214 ; ULONG MsgID
; iofMsg_TEXT
221 STRUCTURE ioFontMsg_SetFontStyle
,4
222 ; ULONG MsgID
; iofMsg_SETFONTSTYLE
224 APTR iofsfs_FontHandle
229 STRUCTURE ioFontMsg_TextExtent
,4
230 ; ULONG MsgID
; iofMsg_TEXTEXTENT
232 APTR iofte_FontHandle
235 APTR iofte_TextExtent
238 STRUCTURE ioFontMsg_TextFit
,4
239 ; ULONG MsgID
; iofMsg_TEXTFIT
241 APTR ioftf_FontHandle
244 APTR ioftf_TextExtent
245 APTR ioftf_ConstrainingTextExtent
246 WORD ioftf_StrDirection
247 UWORD ioftf_ConstrainingBitWidth
248 UWORD ioftf_ConstrainingBitHeight
251 STRUCTURE ioFontMsg_GetFontHeight
,4
252 ; ULONG MsgID
; iofMsg_GETFONTHEIGHT
254 APTR iofgfh_FontHandle
257 STRUCTURE ioFontMsg_GetFontBaseline
,4
258 ; ULONG MsgID
; iofMsg_GETFONTBASELINE
260 APTR iofgfb_FontHandle
263 STRUCTURE ioFontMsg_SetTransparency
,4
264 ; ULONG MsgID
; ; iofMsg_SETTRANSPARENCY
266 APTR iofst_FontHandle
267 ULONG iofst_Transparency
; 0=no transparency
(opaque
), 255=maximum transparency
270 ;------------------------------------------------------------------------------
273 IDTM_Layout EQU DTA_Dummy
+1001
274 IDTM_Draw EQU DTA_Dummy
+1002
275 IDTM_Write EQU DTA_Dummy
+1003 ;PutDiskObject
276 IDTM_FindToolType EQU DTA_Dummy
+1004
277 IDTM_GetToolTypeValue EQU DTA_Dummy
+1005
278 IDTM_FreeLayout EQU DTA_Dummy
+1006
279 IDTM_Erase EQU DTA_Dummy
+1007
280 ITDM_ScaleIcon EQU DTA_Dummy
+1008
281 IDTM_NewImage EQU DTA_Dummy
+1009
282 IDTM_CloneIconObject EQU DTA_Dummy
+1010
284 ;------------------------------------------------------------------------------
288 STRUCTURE iopLayout
, 4
298 BITDEF IOLAYOUT
,NormalImage
,0
299 BITDEF IOLAYOUT
,SelectedImage
,1
301 ;------------------------------------------------------------------------------
311 ;---- ULONG iopd_Flags
--- WRONG
+jl
+
317 ;IDTM_Draw draw flags
318 BITDEF IODRAW
,NoText
,0
319 BITDEF IODRAW
,AbsolutePos
,1 ; X/YOffset is absolute position
320 BITDEF IODRAW
,NoImage
,2
321 BITDEF IODRAW
,NoEraseBg
,4 ; Do not erase background
323 ;------------------------------------------------------------------------------
327 STRUCTURE iopErase
, 4
334 ULONG iope_EraseFlags
337 ;IDTM_Erase draw flags
339 ;----------------------------------------------------------------------------------
341 ;IDTM_FindToolType method
343 STRUCTURE iopFindToolType
,4
345 APTR ioftt_ToolTypeName
;Name of tooltype to search
346 APTR ioftt_ToolTypeValue
;On return
: Contents of tooltype or
NULL if not found.
347 ;on Call
: NULL to search from first tooltype
,
348 ;or result of last IDTM_FindToolType.
351 ;----------------------------------------------------------------------------------
353 ;IDTM_GetToolTypeValue method
355 STRUCTURE iopGetToolTypeValue
,4
357 APTR iotv_ToolTypeValue
; result from IDTM_FindToolType
358 APTR iotv_Value
; Pointer to
LONG for storing the result
361 ;------------------------------------------------------------------------------
368 APTR iopw_SourceObject
373 ICONA_NoNewImage EQU $
80000001
374 ICONA_NoPosition EQU $
80000002
375 ICONA_NoUsePosition EQU $
80000003
376 ICONA_NotifyWorkbench EQU $
80000004 ; ULONG
- Flag
: notify Scalos that the saved icon needs to be updated. Default is
FALSE.
378 ;----------------------------------------------------------------------------------
380 ;IDTM_FreeLayout method
382 STRUCTURE iopFreeLayout
,4
383 ;ULONG MethodID
; ; IDTM_FreeLayout
384 ULONG iopf_Flags
; ; Additional flags
388 BITDEF IOFREELAYOUT
,ScreenAvailable
,0
390 ;----------------------------------------------------------------------------------
392 ;ITDM_ScaleIcon method
394 STRUCTURE iopScaleIcon
,4
395 ;ULONG MethodID
; ; ITDM_ScaleIcon
396 ULONG iops_NewWidth
; ; Scaled icon width
(Gadget-
>Width
, BoundsWidth will be adjusted accordingly
)
397 ULONG iops_NewHeight
; ; Scaled icon height
(Gadget-
>Height
, BoundsHeight will be adjusted accordingly
)
398 ULONG iops_Flags
; ; flags
404 ;----------------------------------------------------------------------------------
406 ; IDTM_NewImage method
408 STRUCTURE iopNewImage
,4
409 ;ULONG MethodID
; IDTM_NewImage
410 APTR ioni_NormalImage
; struct ScalosBitMapAndColor
*
411 APTR ioni_SelectedImage
; struct ScalosBitMapAndColor
* -- may be
NULL
412 LABEL iopNewImage_SIZEOF
414 ;------------------------------------------------------------------------------
416 ; IDTM_CloneIconObject method
418 STRUCTURE iopCloneIconObject
,4
419 ;ULONG MethodID
; IDTM_CloneIconObject
420 APTR iocio_TagList
; ; struct TagItem
*
421 LABEL iopCloneIconObject_SIZEOF
423 ;------------------------------------------------------------------------------
425 ;texticon.datatype
(Scalos internal
)
427 ;TIDTA_ExAllData EQU DTA_Dummy
+1151 ;(IS.
) deprecated
428 ;TIDTA_ExAllType EQU DTA_Dummy
+1152 ;(IS.
) deprecated
429 TIDTA_WidthArray EQU DTA_Dummy
+1153 ;(ISG
)
430 ;TIDTA_ExNextData EQU DTA_Dummy
+1154 ;(IS.
) deprecated
431 TIDTA_FileType EQU DTA_Dummy
+1155 ;(..G
)
432 TIDTA_Size EQU DTA_Dummy
+1156 ;(..G
)
433 TIDTA_Days EQU DTA_Dummy
+1157 ;(..G
)
434 TIDTA_Mins EQU DTA_Dummy
+1158 ;(..G
)
435 TIDTA_Ticks EQU DTA_Dummy
+1159 ;(..G
)
436 TIDTA_Comment EQU DTA_Dummy
+1160 ;(..G
)
437 TIDTA_Owner_UID EQU DTA_Dummy
+1161 ;(..G
) UWORD
438 TIDTA_Owner_GID EQU DTA_Dummy
+1162 ;(..G
) UWORD
439 TIDTA_Protection EQU DTA_Dummy
+1163 ;(..G
)
440 TIDTA_IsLink equ DTA_Dummy
+1164 ;(ISG
) BOOL
441 TIDTA_Font equ DTA_Dummy
+1165 ;(ISG
) (struct TextFont
*) - font to render icon text in
+jl
+ 20010903
442 TIDTA_IconType equ DTA_Dummy
+1167 ;(ISG
) ULONG
- Workbench icon type
+jl
+ 20010906
443 TIDTA_TTFont equ DTA_Dummy
+1168 ;(ISG
) APTR
- ttEngine font to render icon text in
+jl
+ 20030110
444 TIDTA_WindowTask equ DTA_Dummy
+1169 ;(I..
) struct ScaWindowTask
* - parent WindowTask
445 TIDTA_IconObject equ DTA_Dummy
+1170 ;(ISG
) Object
*
446 TIDTA_SoloIcon equ DTA_Dummy
+1171 ;(ISG
) ULONG
(Boolean
) TRUE if this an icon w
/o object
447 TIDTA_ColumnWidthChangeHook equ DTA_Dummy
+1172 ;(ISG
) struct Hook
* - Hook is called when icon layout causes column width to change
448 TIDTA_SelectNameOnly equ DTA_Dummy
+1173 ;(ISG
) ULONG
- if
TRUE, icon can only be selected at name column
449 TIDTA_TypeNode equ DTA_Dummy
+1174 ;(ISG
) struct TypeNode
* - TypeNode Workbench icon type
450 TIDTA_TextPenDrawerNormal EQU DTA_Dummy
+1175 ;(ISG
) UWORD
- text window normal icon text pen for drawers
451 TIDTA_TextPenDrawerSelected EQU DTA_Dummy
+1176 ;(ISG
) UWORD
- text window selected icon text pen for drawers
452 TIDTA_TextPenFileNormal equ DTA_Dummy
+1177 ;(ISG
) UWORD
- text window normal icon text pen for files
453 TIDTA_TextPenFileSelected equ DTA_Dummy
+1178 ;(ISG
) UWORD
- text window selected icon text pen for files
454 TIDTA_ReadIconListData equ DTA_Dummy
+1180 ;(IS.
) struct ReadIconListData
*
456 ;------------------------------------------------------------------------------
458 ;FrameTags mcpgfx.library
459 ;IA_FrameType EQU $
8002001b
460 ;IA_Recessed EQU $
80020015
461 ;IA_ShadowPen EQU $
80020009
462 ;IA_ShinePen EQU $
8002000a
463 ;IA_HalfShadowPen EQU $
8002001c
; commented out
+jl
+ because of duplicate definition
464 ;IA_HalfShinePen EQU $
8002001d
; commented out
+jl
+ because of duplicate definition
465 ;IA_BGPen EQU $
80020006
466 ;IA_FGPen EQU $
80020005
467 ;IA_APattern EQU $
80020010
468 ;IA_APatSize EQU $
80020011
469 ;IA_Left EQU $
80020001
470 ;IA_Top EQU $
80020002
471 ;IA_Width EQU $
80020003
472 ;IA_Height EQU $
80020004
473 ;IA_Mode EQU $
80020012
474 ;IA_Data EQU $
80020007
475 ;IA_DrawInfo EQU $
80020018
477 ;------------------------------------------------------------------------------