2 Copyright 2011-2012, The AROS Development Team.
7 #include <proto/exec.h>
17 #include <aros/debug.h>
19 static STRPTR
SkipChars(STRPTR v
)
26 static LONG
GetInt(STRPTR v
)
30 return (LONG
) atol(c
);
33 static void GetIntegers(STRPTR v
, LONG
*v1
, LONG
*v2
)
36 TEXT va1
[32], va2
[32];
38 D(bug("Decoration/GetIntegers: v='%s', v1=%p, v2=%p\n", v
, v1
, v2
));
40 D(bug("Decoration/GetIntegers: c='%s'\n", c
));
43 cnt
= sscanf(c
, "%31s %31s", va1
, va2
);
44 D(bug("Decoration/GetIntegers: va1='%s', va2='%s'\n", va1
, va2
));
58 static void GetTripleIntegers(STRPTR v
, LONG
*v1
, LONG
*v2
, LONG
*v3
)
67 cnt
= sscanf(ch
, "%x %x %d", &a
, &b
, &c
);
77 static void GetColors(STRPTR v
, LONG
*v1
, LONG
*v2
)
85 cnt
= sscanf(ch
, "%x %x", &a
, &b
);
97 static BOOL
GetBool(STRPTR v
, STRPTR id
)
99 if (strstr(v
, id
)) return TRUE
; else return FALSE
;
102 static void LoadMenuConfig(STRPTR path
, struct DecorConfig
* dc
)
110 dc
->MenuIsTiled
= FALSE
;
111 dc
->MenuTileLeft
= 0;
113 dc
->MenuTileRight
= 0;
114 dc
->MenuTileBottom
= 0;
115 dc
->MenuInnerLeft
= 0;
116 dc
->MenuInnerTop
= 0;
117 dc
->MenuInnerRight
= 0;
118 dc
->MenuInnerBottom
= 0;
119 dc
->MenuHighlightTint
= 0x770044dd;
121 lock
= Lock(path
, ACCESS_READ
);
123 olddir
= CurrentDir(lock
);
127 file
= Open("Menu/Config", MODE_OLDFILE
);
132 line
= FGets(file
, buffer
, 256);
135 if ((v
= strstr(line
, "TileLeft ")) == line
)
137 dc
->MenuTileLeft
= GetInt(v
);
138 dc
->MenuIsTiled
= TRUE
;
140 else if ((v
= strstr(line
, "TileTop ")) == line
)
142 dc
->MenuTileTop
= GetInt(v
);
143 dc
->MenuIsTiled
= TRUE
;
145 else if ((v
= strstr(line
, "TileRight ")) == line
)
147 dc
->MenuTileRight
= GetInt(v
);
148 dc
->MenuIsTiled
= TRUE
;
150 else if ((v
= strstr(line
, "TileBottom ")) == line
)
152 dc
->MenuTileBottom
= GetInt(v
);
153 dc
->MenuIsTiled
= TRUE
;
155 else if ((v
= strstr(line
, "InnerLeft ")) == line
)
157 dc
->MenuInnerLeft
= GetInt(v
);
159 else if ((v
= strstr(line
, "InnerTop ")) == line
)
161 dc
->MenuInnerTop
= GetInt(v
);
163 else if ((v
= strstr(line
, "InnerRight ")) == line
)
165 dc
->MenuInnerRight
= GetInt(v
);
167 else if ((v
= strstr(line
, "InnerBottom ")) == line
)
169 dc
->MenuInnerBottom
= GetInt(v
);
171 else if ((v
= strstr(line
, "HighlightTint ")) == line
)
173 GetColors(v
, &dc
->MenuHighlightTint
, NULL
);
181 if (olddir
) CurrentDir(olddir
);
185 static void LoadSystemConfig(STRPTR path
, struct DecorConfig
* dc
)
193 dc
->WinFrameStyle
= 1;
196 dc
->BarPreGadget_o
= 0;
197 dc
->BarPreGadget_s
= 0;
200 dc
->BarLGadgetFill_o
= 0;
201 dc
->BarLGadgetFill_s
= 0;
208 dc
->BarTitleFill_o
= 0;
209 dc
->BarTitleFill_s
= 0;
214 dc
->BarRGadgetFill_o
= 0;
215 dc
->BarRGadgetFill_s
= 0;
216 dc
->BarPostGadget_o
= 0;
217 dc
->BarPostGadget_s
= 0;
220 dc
->ContainerTop_o
= 0;
221 dc
->ContainerTop_s
= 0;
222 dc
->ContainerVertTile_o
= 0;
223 dc
->ContainerVertTile_s
= 0;
224 dc
->ContainerBottom_o
= 0;
225 dc
->ContainerBottom_s
= 0;
228 dc
->KnobTileTop_o
= 0;
229 dc
->KnobTileTop_s
= 0;
230 dc
->KnobVertGripper_o
= 0;
231 dc
->KnobVertGripper_s
= 0;
232 dc
->KnobTileBottom_o
= 0;
233 dc
->KnobTileBottom_s
= 0;
234 dc
->KnobBottom_o
= 0;
235 dc
->KnobBottom_s
= 0;
236 dc
->ContainerLeft_o
= 0;
237 dc
->ContainerLeft_s
= 0;
238 dc
->ContainerHorTile_o
= 0;
239 dc
->ContainerHorTile_s
= 0;
240 dc
->ContainerRight_o
= 0;
241 dc
->ContainerRight_s
= 0;
244 dc
->KnobTileLeft_o
= 0;
245 dc
->KnobTileLeft_s
= 0;
246 dc
->KnobHorGripper_o
= 0;
247 dc
->KnobHorGripper_s
= 0;
248 dc
->KnobTileRight_o
= 0;
249 dc
->KnobTileRight_s
= 0;
252 dc
->GadgetsThreeState
= FALSE
;
253 dc
->BarRounded
= FALSE
;
254 dc
->TitleOutline
= FALSE
;
255 dc
->TitleShadow
= FALSE
;
256 dc
->FillTitleBar
= FALSE
;
257 dc
->BarMasking
= FALSE
;
258 dc
->CloseGadgetOnRight
= FALSE
;
259 dc
->UseGradients
= FALSE
;
260 dc
->BarVertical
= FALSE
;
261 dc
->RightBorderGadgets
= 0;
262 dc
->HorizScrollerHeight
= 0;
263 dc
->ScrollerInnerSpacing
= 0;
264 dc
->BottomBorderGadgets
= 0;
265 dc
->RightBorderNoGadgets
= 0;
266 dc
->BottomBorderNoGadgets
= 0;
272 dc
->LeftRightAddX
= 0;
273 dc
->LeftRightAddY
= 0;
274 dc
->ActivatedGradientColor_s
= 0xAAAAAAAA;
275 dc
->ActivatedGradientColor_e
= 0xEEEEEEFF;
276 dc
->ActivatedGradientColor_a
= 0;
277 dc
->DeactivatedGradientColor_s
= 0x66666666;
278 dc
->DeactivatedGradientColor_e
= 0xAAAAAABB;
279 dc
->DeactivatedGradientColor_a
= 0;
280 dc
->ShadeValues_l
= 320;
281 dc
->ShadeValues_m
= 240;
282 dc
->ShadeValues_d
= 128;
283 dc
->BaseColors_a
= 0;
284 dc
->BaseColors_d
= 0;
285 dc
->TitleColorText
= 0x00CCCCCC;
286 dc
->TitleColorShadow
= 0x00444444;
289 dc
->BottomBorder
= 4;
291 dc
->STitleOffset
= 0;
293 dc
->SBarChildPre_o
= 0;
294 dc
->SBarChildPre_s
= 0;
295 dc
->SBarChildFill_o
= 0;
296 dc
->SBarChildFill_s
= 0;
297 dc
->SBarChildPost_o
= 0;
298 dc
->SBarChildPost_s
= 0;
299 dc
->SBarGadPre_o
= 0;
300 dc
->SBarGadPre_s
= 0;
301 dc
->SBarGadFill_o
= 0;
302 dc
->SBarGadFill_s
= 0;
303 dc
->SBarGadPost_o
= 0;
304 dc
->SBarGadPost_s
= 0;
305 dc
->STitleOutline
= FALSE
;
306 dc
->STitleShadow
= FALSE
;
307 dc
->LUTBaseColors_a
= 0x00CCCCCC;
308 dc
->LUTBaseColors_d
= 0x00888888;
309 dc
->STitleColorText
= 0x00CCCCCC;
310 dc
->STitleColorShadow
= 0x00444444;
312 D(bug("Decoration/LoadSystemConfig: dc initialized\n"));
314 lock
= Lock(path
, ACCESS_READ
);
317 olddir
= CurrentDir(lock
);
321 D(bug("Decoration/LoadSystemConfig: directory locked\n"));
323 file
= Open("System/Config", MODE_OLDFILE
);
324 D(bug("Decoration/LoadSystemConfig: file=%p\n", (void *)file
));
329 line
= FGets(file
, buffer
, 256);
332 D(bug("Decoration/ReadSystemConfig: Parsing line '%s'\n", line
));
333 if ((v
= strstr(line
, "NoInactiveSelected ")) == line
) {
334 dc
->GadgetsThreeState
= GetBool(v
, "Yes");
335 } else if ((v
= strstr(line
, "FrameStyle ")) == line
) {
336 dc
->WinFrameStyle
= GetInt(v
);
337 } else if ((v
= strstr(line
, "BarRounded ")) == line
) {
338 dc
->BarRounded
= GetBool(v
, "Yes");
339 } else if ((v
= strstr(line
, "WindowTitleMode ")) == line
) {
340 dc
->TitleOutline
= GetBool(v
, "Outline");
341 dc
->TitleShadow
= GetBool(v
, "Shadow");
342 } else if ((v
= strstr(line
, "FillTitleBar ")) == line
) {
343 dc
->FillTitleBar
= GetBool(v
, "Yes");
344 } else if ((v
= strstr(line
, "BarMasking ")) == line
) {
345 dc
->BarMasking
= GetBool(v
, "Yes");
346 } else if ((v
= strstr(line
, "CloseRight ")) == line
) {
347 dc
->CloseGadgetOnRight
= GetBool(v
, "Yes");
348 } else if ((v
= strstr(line
, "UseGradients ")) == line
) {
349 dc
->UseGradients
= GetBool(v
, "Yes");
350 } else if ((v
= strstr(line
, "BarLayout ")) == line
) {
351 dc
->BarVertical
= GetBool(v
, "Vertical");
352 } else if ((v
= strstr(line
, "RightBorderGads ")) == line
) {
353 dc
->RightBorderGadgets
= GetInt(v
);
354 } else if ((v
= strstr(line
, "HorScrollerHeight ")) == line
) {
355 dc
->HorizScrollerHeight
= GetInt(v
);
356 } else if ((v
= strstr(line
, "ScrollerInnerSpacing ")) == line
) {
357 dc
->ScrollerInnerSpacing
= GetInt(v
);
358 } else if ((v
= strstr(line
, "BottomBorderGads ")) == line
) {
359 dc
->BottomBorderGadgets
= GetInt(v
);
360 } else if ((v
= strstr(line
, "RightBorderNoGads ")) == line
) {
361 dc
->RightBorderNoGadgets
= GetInt(v
);
362 } else if ((v
= strstr(line
, "BottomBorderNoGads ")) == line
) {
363 dc
->BottomBorderNoGadgets
= GetInt(v
);
364 } else if ((v
= strstr(line
, "BarHeight ")) == line
) {
365 dc
->BarHeight
= GetInt(v
); //screen, window
366 } else if ((v
= strstr(line
, "BarJoinTB ")) == line
) {
367 GetIntegers(v
, &dc
->BarJoinTB_o
, &dc
->BarJoinTB_s
);
368 } else if ((v
= strstr(line
, "BarPreGadget ")) == line
) {
369 GetIntegers(v
, &dc
->BarPreGadget_o
, &dc
->BarPreGadget_s
);
370 } else if ((v
= strstr(line
, "BarPre ")) == line
) {
371 GetIntegers(v
, &dc
->BarPre_o
, &dc
->BarPre_s
);
372 } else if ((v
= strstr(line
, "BarLGadgetFill ")) == line
) {
373 GetIntegers(v
, &dc
->BarLGadgetFill_o
, &dc
->BarLGadgetFill_s
);
374 } else if ((v
= strstr(line
, "BarJoinGB ")) == line
) {
375 GetIntegers(v
, &dc
->BarJoinGB_o
, &dc
->BarJoinGB_s
);
376 } else if ((v
= strstr(line
, "BarLFill ")) == line
) {
377 GetIntegers(v
, &dc
->BarLFill_o
, &dc
->BarLFill_s
);
378 } else if ((v
= strstr(line
, "BarJoinBT ")) == line
) {
379 GetIntegers(v
, &dc
->BarJoinBT_o
, &dc
->BarJoinBT_s
);
380 } else if ((v
= strstr(line
, "BarTitleFill ")) == line
) {
381 GetIntegers(v
, &dc
->BarTitleFill_o
, &dc
->BarTitleFill_s
);
382 } else if ((v
= strstr(line
, "BarRFill ")) == line
) {
383 GetIntegers(v
, &dc
->BarRFill_o
, &dc
->BarRFill_s
);
384 } else if ((v
= strstr(line
, "BarJoinBG ")) == line
) {
385 GetIntegers(v
, &dc
->BarJoinBG_o
, &dc
->BarJoinBG_s
);
386 } else if ((v
= strstr(line
, "BarRGadgetFill ")) == line
) {
387 GetIntegers(v
, &dc
->BarRGadgetFill_o
, &dc
->BarRGadgetFill_s
);
388 } else if ((v
= strstr(line
, "BarPostGadget ")) == line
) {
389 GetIntegers(v
, &dc
->BarPostGadget_o
, &dc
->BarPostGadget_s
);
390 } else if ((v
= strstr(line
, "BarPost ")) == line
) {
391 GetIntegers(v
, &dc
->BarPost_o
, &dc
->BarPost_s
);
392 } else if ((v
= strstr(line
, "ContainerTop ")) == line
) {
393 GetIntegers(v
, &dc
->ContainerTop_o
, &dc
->ContainerTop_s
);
394 } else if ((v
= strstr(line
, "ContainerVertTile ")) == line
) {
395 GetIntegers(v
, &dc
->ContainerVertTile_o
, &dc
->ContainerVertTile_s
);
396 } else if ((v
= strstr(line
, "KnobTop ")) == line
) {
397 GetIntegers(v
, &dc
->KnobTop_o
, &dc
->KnobTop_s
);
398 } else if ((v
= strstr(line
, "KnobTileTop ")) == line
) {
399 GetIntegers(v
, &dc
->KnobTileTop_o
, &dc
->KnobTileTop_s
);
400 } else if ((v
= strstr(line
, "KnobVertGripper ")) == line
) {
401 GetIntegers(v
, &dc
->KnobVertGripper_o
, &dc
->KnobVertGripper_s
);
402 } else if ((v
= strstr(line
, "KnobTileBottom ")) == line
) {
403 GetIntegers(v
, &dc
->KnobTileBottom_o
, &dc
->KnobTileBottom_s
);
404 } else if ((v
= strstr(line
, "KnobBottom ")) == line
) {
405 GetIntegers(v
, &dc
->KnobBottom_o
, &dc
->KnobBottom_s
);
406 } else if ((v
= strstr(line
, "ContainerBottom ")) == line
) {
407 GetIntegers(v
, &dc
->ContainerBottom_o
, &dc
->ContainerBottom_s
);
408 } else if ((v
= strstr(line
, "ContainerLeft ")) == line
) {
409 GetIntegers(v
, &dc
->ContainerLeft_o
, &dc
->ContainerLeft_s
);
410 } else if ((v
= strstr(line
, "ContainerHorTile ")) == line
) {
411 GetIntegers(v
, &dc
->ContainerHorTile_o
, &dc
->ContainerHorTile_s
);
412 } else if ((v
= strstr(line
, "KnobLeft ")) == line
) {
413 GetIntegers(v
, &dc
->KnobLeft_o
, &dc
->KnobLeft_s
);
414 } else if ((v
= strstr(line
, "KnobTileLeft ")) == line
) {
415 GetIntegers(v
, &dc
->KnobTileLeft_o
, &dc
->KnobTileLeft_s
);
416 } else if ((v
= strstr(line
, "KnobHorGripper ")) == line
) {
417 GetIntegers(v
, &dc
->KnobHorGripper_o
, &dc
->KnobHorGripper_s
);
418 } else if ((v
= strstr(line
, "KnobTileRight ")) == line
) {
419 GetIntegers(v
, &dc
->KnobTileRight_o
, &dc
->KnobTileRight_s
);
420 } else if ((v
= strstr(line
, "KnobRight ")) == line
) {
421 GetIntegers(v
, &dc
->KnobRight_o
, &dc
->KnobRight_s
);
422 } else if ((v
= strstr(line
, "ContainerRight ")) == line
) {
423 GetIntegers(v
, &dc
->ContainerRight_o
, &dc
->ContainerRight_s
);
424 } else if ((v
= strstr(line
, "AddSize ")) == line
) {
425 GetIntegers(v
, &dc
->SizeAddX
, &dc
->SizeAddY
);
426 } else if ((v
= strstr(line
, "AddUpDown ")) == line
) {
427 GetIntegers(v
, &dc
->UpDownAddX
, &dc
->UpDownAddY
);
428 } else if ((v
= strstr(line
, "AddLeftRight ")) == line
) {
429 GetIntegers(v
, &dc
->LeftRightAddX
, &dc
->LeftRightAddY
);
430 } else if ((v
= strstr(line
, "ActivatedGradient ")) == line
) {
431 GetTripleIntegers(v
, &dc
->ActivatedGradientColor_s
, &dc
->ActivatedGradientColor_e
, &dc
->ActivatedGradientColor_a
);
432 } else if ((v
= strstr(line
, "DeactivatedGradient ")) == line
) {
433 GetTripleIntegers(v
, &dc
->DeactivatedGradientColor_s
, &dc
->DeactivatedGradientColor_e
, &dc
->DeactivatedGradientColor_a
);
434 } else if ((v
= strstr(line
, "ShadeValues ")) == line
) {
435 GetTripleIntegers(v
, &dc
->ShadeValues_l
, &dc
->ShadeValues_m
, &dc
->ShadeValues_d
);
436 } else if ((v
= strstr(line
, "BaseColors ")) == line
) {
437 GetColors(v
, &dc
->BaseColors_a
, &dc
->BaseColors_d
);
438 } else if ((v
= strstr(line
, "WindowTitleColors ")) == line
) {
439 GetColors(v
, &dc
->TitleColorText
, &dc
->TitleColorShadow
);
440 } else if ((v
= strstr(line
, "LeftBorder ")) == line
) {
441 dc
->LeftBorder
= GetInt(v
);
442 } else if ((v
= strstr(line
, "RightBorder ")) == line
) {
443 dc
->RightBorder
= GetInt(v
);
444 } else if ((v
= strstr(line
, "BottomBorder ")) == line
) {
445 dc
->BottomBorder
= GetInt(v
);
446 } else if ((v
= strstr(line
, "LogoOffset ")) == line
) {
447 dc
->SLogoOffset
= GetInt(v
);
448 } else if ((v
= strstr(line
, "TitleOffset ")) == line
) {
449 dc
->STitleOffset
= GetInt(v
);
450 } else if ((v
= strstr(line
, "SBarHeight ")) == line
) {
451 dc
->SBarHeight
= GetInt(v
);
452 } else if ((v
= strstr(line
, "SBarChildPre ")) == line
) {
453 GetIntegers(v
, &dc
->SBarChildPre_o
, &dc
->SBarChildPre_s
);
454 } else if ((v
= strstr(line
, "SBarChildFill ")) == line
) {
455 GetIntegers(v
, &dc
->SBarChildFill_o
, &dc
->SBarChildFill_s
);
456 } else if ((v
= strstr(line
, "SBarChildPost ")) == line
) {
457 GetIntegers(v
, &dc
->SBarChildPost_o
, &dc
->SBarChildPost_s
);
458 } else if ((v
= strstr(line
, "SBarGadPre ")) == line
) {
459 GetIntegers(v
, &dc
->SBarGadPre_o
, &dc
->SBarGadPre_s
);
460 } else if ((v
= strstr(line
, "SBarGadFill ")) == line
) {
461 GetIntegers(v
, &dc
->SBarGadFill_o
, &dc
->SBarGadFill_s
);
462 } else if ((v
= strstr(line
, "SBarGadPost ")) == line
) {
463 GetIntegers(v
, &dc
->SBarGadPost_o
, &dc
->SBarGadPost_s
);
464 } else if ((v
= strstr(line
, "LUTBaseColors ")) == line
) {
465 GetColors(v
, &dc
->LUTBaseColors_a
, &dc
->LUTBaseColors_d
);
466 } else if ((v
= strstr(line
, "ScreenTitleColors ")) == line
) {
467 GetColors(v
, &dc
->STitleColorText
, &dc
->STitleColorShadow
);
468 } else if ((v
= strstr(line
, "ScreenTitleMode ")) == line
) {
469 dc
->STitleOutline
= GetBool(v
, "Outline");
470 dc
->STitleShadow
= GetBool(v
, "Shadow");
475 D(bug("Decoration/LoadSystemConfig: file has been read\n"));
479 if (olddir
) CurrentDir(olddir
);
482 D(bug("Decoration/LoadSystemConfig: directory unlocked\n"));
485 struct DecorConfig
* LoadConfig(STRPTR path
)
487 struct DecorConfig
* dc
= AllocVec(sizeof(struct DecorConfig
), MEMF_ANY
| MEMF_CLEAR
);
489 D(bug("LoadConfig: dc=%p\n", dc
));
491 dc
->ThemePath
= AllocVec(strlen(path
) + 1, MEMF_ANY
| MEMF_CLEAR
);
492 strcpy(dc
->ThemePath
, path
);
494 D(bug("Decoration/LoadConfig: dc->ThemePath=%p('%s')\n", dc
->ThemePath
, dc
->ThemePath
));
496 LoadMenuConfig(path
, dc
);
498 D(bug("Decoration/LoadConfig: menu config loaded\n"));
500 LoadSystemConfig(path
, dc
);
502 D(bug("Decoration/LoadConfig: system config loaded\n"));
507 void FreeConfig(struct DecorConfig
* dc
)
510 FreeVec(dc
->ThemePath
);
515 struct DecorImages
* NewImages()
517 return AllocVec(sizeof(struct DecorImages
), MEMF_ANY
| MEMF_CLEAR
);
520 struct DecorImages
* LoadImages(struct DecorConfig
* dc
)
522 ULONG wgsubimagecols
= 4; /* Default value of subimage cols in window gadget */
523 STRPTR path
= dc
->ThemePath
;
525 struct DecorImages
* di
= NewImages();
530 if (dc
->GadgetsThreeState
) wgsubimagecols
= 3;
532 di
->img_sdepth
= GetImageFromFile(path
, "System/SDepth/Default", 2, 1);
533 di
->img_stitlebar
= GetImageFromFile(path
, "System/STitlebar/Default", 1, 1);
534 di
->img_sbarlogo
= GetImageFromFile(path
, "System/SBarLogo/Default", 1, 1);
536 di
->img_size
= GetImageFromFile(path
, "System/Size/Default", wgsubimagecols
, 1);
537 di
->img_close
= GetImageFromFile(path
, "System/Close/Default", wgsubimagecols
, 1);
538 di
->img_depth
= GetImageFromFile(path
, "System/Depth/Default", wgsubimagecols
, 1);
539 di
->img_zoom
= GetImageFromFile(path
, "System/Zoom/Default", wgsubimagecols
, 1);
540 di
->img_mui
= GetImageFromFile(path
, "System/MUI/Default", wgsubimagecols
, 1);
541 di
->img_popup
= GetImageFromFile(path
, "System/PopUp/Default", wgsubimagecols
, 1);
542 di
->img_snapshot
= GetImageFromFile(path
, "System/Snapshot/Default", wgsubimagecols
, 1);
543 di
->img_iconify
= GetImageFromFile(path
, "System/Iconify/Default", wgsubimagecols
, 1);
544 di
->img_lock
= GetImageFromFile(path
, "System/Lock/Default", wgsubimagecols
, 1);
545 di
->img_up
= GetImageFromFile(path
, "System/ArrowUp/Default", wgsubimagecols
, 1);
546 di
->img_down
= GetImageFromFile(path
, "System/ArrowDown/Default", wgsubimagecols
, 1);
547 di
->img_left
= GetImageFromFile(path
, "System/ArrowLeft/Default", wgsubimagecols
, 1);
548 di
->img_right
= GetImageFromFile(path
, "System/ArrowRight/Default", wgsubimagecols
, 1);
549 di
->img_winbar_normal
= GetImageFromFile(path
, "System/Titlebar/Default", 1, 2);
550 di
->img_border_normal
= GetImageFromFile(path
, "System/Borders/Default", 1, 1);
551 di
->img_border_deactivated
= GetImageFromFile(path
, "System/Borders/Default_Deactivated", 1, 1);
552 di
->img_verticalcontainer
= GetImageFromFile(path
, "System/Container/Vertical", 2, 1);
553 di
->img_verticalknob
= GetImageFromFile(path
, "System/Knob/Vertical", 3, 1);
554 di
->img_horizontalcontainer
= GetImageFromFile(path
, "System/Container/Horizontal", 1, 2);
555 di
->img_horizontalknob
= GetImageFromFile(path
, "System/Knob/Horizontal", 1, 3);
557 di
->img_menu
= GetImageFromFile(path
, "Menu/Background/Default", 1, 1);
558 di
->img_amigakey
= GetImageFromFile(path
, "Menu/AmigaKey/Default", 1, 1);
559 di
->img_menucheck
= GetImageFromFile(path
, "Menu/Checkmark/Default", 1, 1);
560 di
->img_submenu
= GetImageFromFile(path
, "Menu/SubMenu/Default", 1, 1);
565 void FreeImages(struct DecorImages
* di
)
567 DisposeImageContainer(di
->img_sdepth
);
568 DisposeImageContainer(di
->img_sbarlogo
);
569 DisposeImageContainer(di
->img_stitlebar
);
571 DisposeImageContainer(di
->img_size
);
572 DisposeImageContainer(di
->img_close
);
573 DisposeImageContainer(di
->img_depth
);
574 DisposeImageContainer(di
->img_zoom
);
575 DisposeImageContainer(di
->img_up
);
576 DisposeImageContainer(di
->img_down
);
577 DisposeImageContainer(di
->img_left
);
578 DisposeImageContainer(di
->img_right
);
579 DisposeImageContainer(di
->img_mui
);
580 DisposeImageContainer(di
->img_popup
);
581 DisposeImageContainer(di
->img_snapshot
);
582 DisposeImageContainer(di
->img_iconify
);
583 DisposeImageContainer(di
->img_lock
);
584 DisposeImageContainer(di
->img_winbar_normal
);
585 DisposeImageContainer(di
->img_border_normal
);
586 DisposeImageContainer(di
->img_border_deactivated
);
587 DisposeImageContainer(di
->img_verticalcontainer
);
588 DisposeImageContainer(di
->img_verticalknob
);
589 DisposeImageContainer(di
->img_horizontalcontainer
);
590 DisposeImageContainer(di
->img_horizontalknob
);
592 DisposeImageContainer(di
->img_menu
);
593 DisposeImageContainer(di
->img_amigakey
);
594 DisposeImageContainer(di
->img_menucheck
);
595 DisposeImageContainer(di
->img_submenu
);