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
)
195 dc
->BarPreGadget_o
= 0;
196 dc
->BarPreGadget_s
= 0;
199 dc
->BarLGadgetFill_o
= 0;
200 dc
->BarLGadgetFill_s
= 0;
207 dc
->BarTitleFill_o
= 0;
208 dc
->BarTitleFill_s
= 0;
213 dc
->BarRGadgetFill_o
= 0;
214 dc
->BarRGadgetFill_s
= 0;
215 dc
->BarPostGadget_o
= 0;
216 dc
->BarPostGadget_s
= 0;
219 dc
->ContainerTop_o
= 0;
220 dc
->ContainerTop_s
= 0;
221 dc
->ContainerVertTile_o
= 0;
222 dc
->ContainerVertTile_s
= 0;
223 dc
->ContainerBottom_o
= 0;
224 dc
->ContainerBottom_s
= 0;
227 dc
->KnobTileTop_o
= 0;
228 dc
->KnobTileTop_s
= 0;
229 dc
->KnobVertGripper_o
= 0;
230 dc
->KnobVertGripper_s
= 0;
231 dc
->KnobTileBottom_o
= 0;
232 dc
->KnobTileBottom_s
= 0;
233 dc
->KnobBottom_o
= 0;
234 dc
->KnobBottom_s
= 0;
235 dc
->ContainerLeft_o
= 0;
236 dc
->ContainerLeft_s
= 0;
237 dc
->ContainerHorTile_o
= 0;
238 dc
->ContainerHorTile_s
= 0;
239 dc
->ContainerRight_o
= 0;
240 dc
->ContainerRight_s
= 0;
243 dc
->KnobTileLeft_o
= 0;
244 dc
->KnobTileLeft_s
= 0;
245 dc
->KnobHorGripper_o
= 0;
246 dc
->KnobHorGripper_s
= 0;
247 dc
->KnobTileRight_o
= 0;
248 dc
->KnobTileRight_s
= 0;
251 dc
->GadgetsThreeState
= FALSE
;
252 dc
->BarRounded
= FALSE
;
253 dc
->TitleOutline
= FALSE
;
254 dc
->TitleShadow
= FALSE
;
255 dc
->FillTitleBar
= FALSE
;
256 dc
->BarMasking
= FALSE
;
257 dc
->CloseGadgetOnRight
= FALSE
;
258 dc
->UseGradients
= FALSE
;
259 dc
->BarVertical
= FALSE
;
260 dc
->RightBorderGadgets
= 0;
261 dc
->HorizScrollerHeight
= 0;
262 dc
->ScrollerInnerSpacing
= 0;
263 dc
->BottomBorderGadgets
= 0;
264 dc
->RightBorderNoGadgets
= 0;
265 dc
->BottomBorderNoGadgets
= 0;
271 dc
->LeftRightAddX
= 0;
272 dc
->LeftRightAddY
= 0;
273 dc
->ActivatedGradientColor_s
= 0xAAAAAAAA;
274 dc
->ActivatedGradientColor_e
= 0xEEEEEEFF;
275 dc
->ActivatedGradientColor_a
= 0;
276 dc
->DeactivatedGradientColor_s
= 0x66666666;
277 dc
->DeactivatedGradientColor_e
= 0xAAAAAABB;
278 dc
->DeactivatedGradientColor_a
= 0;
279 dc
->ShadeValues_l
= 320;
280 dc
->ShadeValues_m
= 240;
281 dc
->ShadeValues_d
= 128;
282 dc
->BaseColors_a
= 0;
283 dc
->BaseColors_d
= 0;
284 dc
->TitleColorText
= 0x00CCCCCC;
285 dc
->TitleColorShadow
= 0x00444444;
288 dc
->BottomBorder
= 4;
290 dc
->STitleOffset
= 0;
292 dc
->SBarChildPre_o
= 0;
293 dc
->SBarChildPre_s
= 0;
294 dc
->SBarChildFill_o
= 0;
295 dc
->SBarChildFill_s
= 0;
296 dc
->SBarChildPost_o
= 0;
297 dc
->SBarChildPost_s
= 0;
298 dc
->SBarGadPre_o
= 0;
299 dc
->SBarGadPre_s
= 0;
300 dc
->SBarGadFill_o
= 0;
301 dc
->SBarGadFill_s
= 0;
302 dc
->SBarGadPost_o
= 0;
303 dc
->SBarGadPost_s
= 0;
304 dc
->STitleOutline
= FALSE
;
305 dc
->STitleShadow
= FALSE
;
306 dc
->LUTBaseColors_a
= 0x00CCCCCC;
307 dc
->LUTBaseColors_d
= 0x00888888;
308 dc
->STitleColorText
= 0x00CCCCCC;
309 dc
->STitleColorShadow
= 0x00444444;
311 D(bug("Decoration/LoadSystemConfig: dc initialized\n"));
313 lock
= Lock(path
, ACCESS_READ
);
316 olddir
= CurrentDir(lock
);
320 D(bug("Decoration/LoadSystemConfig: directory locked\n"));
322 file
= Open("System/Config", MODE_OLDFILE
);
323 D(bug("Decoration/LoadSystemConfig: file=%p\n", (void *)file
));
328 line
= FGets(file
, buffer
, 256);
331 D(bug("Decoration/ReadSystemConfig: Parsing line '%s'\n", line
));
332 if ((v
= strstr(line
, "NoInactiveSelected ")) == line
) {
333 dc
->GadgetsThreeState
= GetBool(v
, "Yes");
334 } else if ((v
= strstr(line
, "BarRounded ")) == line
) {
335 dc
->BarRounded
= GetBool(v
, "Yes");
336 } else if ((v
= strstr(line
, "WindowTitleMode ")) == line
) {
337 dc
->TitleOutline
= GetBool(v
, "Outline");
338 dc
->TitleShadow
= GetBool(v
, "Shadow");
339 } else if ((v
= strstr(line
, "FillTitleBar ")) == line
) {
340 dc
->FillTitleBar
= GetBool(v
, "Yes");
341 } else if ((v
= strstr(line
, "BarMasking ")) == line
) {
342 dc
->BarMasking
= GetBool(v
, "Yes");
343 } else if ((v
= strstr(line
, "CloseRight ")) == line
) {
344 dc
->CloseGadgetOnRight
= GetBool(v
, "Yes");
345 } else if ((v
= strstr(line
, "UseGradients ")) == line
) {
346 dc
->UseGradients
= GetBool(v
, "Yes");
347 } else if ((v
= strstr(line
, "BarLayout ")) == line
) {
348 dc
->BarVertical
= GetBool(v
, "Vertical");
349 } else if ((v
= strstr(line
, "RightBorderGads ")) == line
) {
350 dc
->RightBorderGadgets
= GetInt(v
);
351 } else if ((v
= strstr(line
, "HorScrollerHeight ")) == line
) {
352 dc
->HorizScrollerHeight
= GetInt(v
);
353 } else if ((v
= strstr(line
, "ScrollerInnerSpacing ")) == line
) {
354 dc
->ScrollerInnerSpacing
= GetInt(v
);
355 } else if ((v
= strstr(line
, "BottomBorderGads ")) == line
) {
356 dc
->BottomBorderGadgets
= GetInt(v
);
357 } else if ((v
= strstr(line
, "RightBorderNoGads ")) == line
) {
358 dc
->RightBorderNoGadgets
= GetInt(v
);
359 } else if ((v
= strstr(line
, "BottomBorderNoGads ")) == line
) {
360 dc
->BottomBorderNoGadgets
= GetInt(v
);
361 } else if ((v
= strstr(line
, "BarHeight ")) == line
) {
362 dc
->BarHeight
= GetInt(v
); //screen, window
363 } else if ((v
= strstr(line
, "BarJoinTB ")) == line
) {
364 GetIntegers(v
, &dc
->BarJoinTB_o
, &dc
->BarJoinTB_s
);
365 } else if ((v
= strstr(line
, "BarPreGadget ")) == line
) {
366 GetIntegers(v
, &dc
->BarPreGadget_o
, &dc
->BarPreGadget_s
);
367 } else if ((v
= strstr(line
, "BarPre ")) == line
) {
368 GetIntegers(v
, &dc
->BarPre_o
, &dc
->BarPre_s
);
369 } else if ((v
= strstr(line
, "BarLGadgetFill ")) == line
) {
370 GetIntegers(v
, &dc
->BarLGadgetFill_o
, &dc
->BarLGadgetFill_s
);
371 } else if ((v
= strstr(line
, "BarJoinGB ")) == line
) {
372 GetIntegers(v
, &dc
->BarJoinGB_o
, &dc
->BarJoinGB_s
);
373 } else if ((v
= strstr(line
, "BarLFill ")) == line
) {
374 GetIntegers(v
, &dc
->BarLFill_o
, &dc
->BarLFill_s
);
375 } else if ((v
= strstr(line
, "BarJoinBT ")) == line
) {
376 GetIntegers(v
, &dc
->BarJoinBT_o
, &dc
->BarJoinBT_s
);
377 } else if ((v
= strstr(line
, "BarTitleFill ")) == line
) {
378 GetIntegers(v
, &dc
->BarTitleFill_o
, &dc
->BarTitleFill_s
);
379 } else if ((v
= strstr(line
, "BarRFill ")) == line
) {
380 GetIntegers(v
, &dc
->BarRFill_o
, &dc
->BarRFill_s
);
381 } else if ((v
= strstr(line
, "BarJoinBG ")) == line
) {
382 GetIntegers(v
, &dc
->BarJoinBG_o
, &dc
->BarJoinBG_s
);
383 } else if ((v
= strstr(line
, "BarRGadgetFill ")) == line
) {
384 GetIntegers(v
, &dc
->BarRGadgetFill_o
, &dc
->BarRGadgetFill_s
);
385 } else if ((v
= strstr(line
, "BarPostGadget ")) == line
) {
386 GetIntegers(v
, &dc
->BarPostGadget_o
, &dc
->BarPostGadget_s
);
387 } else if ((v
= strstr(line
, "BarPost ")) == line
) {
388 GetIntegers(v
, &dc
->BarPost_o
, &dc
->BarPost_s
);
389 } else if ((v
= strstr(line
, "ContainerTop ")) == line
) {
390 GetIntegers(v
, &dc
->ContainerTop_o
, &dc
->ContainerTop_s
);
391 } else if ((v
= strstr(line
, "ContainerVertTile ")) == line
) {
392 GetIntegers(v
, &dc
->ContainerVertTile_o
, &dc
->ContainerVertTile_s
);
393 } else if ((v
= strstr(line
, "KnobTop ")) == line
) {
394 GetIntegers(v
, &dc
->KnobTop_o
, &dc
->KnobTop_s
);
395 } else if ((v
= strstr(line
, "KnobTileTop ")) == line
) {
396 GetIntegers(v
, &dc
->KnobTileTop_o
, &dc
->KnobTileTop_s
);
397 } else if ((v
= strstr(line
, "KnobVertGripper ")) == line
) {
398 GetIntegers(v
, &dc
->KnobVertGripper_o
, &dc
->KnobVertGripper_s
);
399 } else if ((v
= strstr(line
, "KnobTileBottom ")) == line
) {
400 GetIntegers(v
, &dc
->KnobTileBottom_o
, &dc
->KnobTileBottom_s
);
401 } else if ((v
= strstr(line
, "KnobBottom ")) == line
) {
402 GetIntegers(v
, &dc
->KnobBottom_o
, &dc
->KnobBottom_s
);
403 } else if ((v
= strstr(line
, "ContainerBottom ")) == line
) {
404 GetIntegers(v
, &dc
->ContainerBottom_o
, &dc
->ContainerBottom_s
);
405 } else if ((v
= strstr(line
, "ContainerLeft ")) == line
) {
406 GetIntegers(v
, &dc
->ContainerLeft_o
, &dc
->ContainerLeft_s
);
407 } else if ((v
= strstr(line
, "ContainerHorTile ")) == line
) {
408 GetIntegers(v
, &dc
->ContainerHorTile_o
, &dc
->ContainerHorTile_s
);
409 } else if ((v
= strstr(line
, "KnobLeft ")) == line
) {
410 GetIntegers(v
, &dc
->KnobLeft_o
, &dc
->KnobLeft_s
);
411 } else if ((v
= strstr(line
, "KnobTileLeft ")) == line
) {
412 GetIntegers(v
, &dc
->KnobTileLeft_o
, &dc
->KnobTileLeft_s
);
413 } else if ((v
= strstr(line
, "KnobHorGripper ")) == line
) {
414 GetIntegers(v
, &dc
->KnobHorGripper_o
, &dc
->KnobHorGripper_s
);
415 } else if ((v
= strstr(line
, "KnobTileRight ")) == line
) {
416 GetIntegers(v
, &dc
->KnobTileRight_o
, &dc
->KnobTileRight_s
);
417 } else if ((v
= strstr(line
, "KnobRight ")) == line
) {
418 GetIntegers(v
, &dc
->KnobRight_o
, &dc
->KnobRight_s
);
419 } else if ((v
= strstr(line
, "ContainerRight ")) == line
) {
420 GetIntegers(v
, &dc
->ContainerRight_o
, &dc
->ContainerRight_s
);
421 } else if ((v
= strstr(line
, "AddSize ")) == line
) {
422 GetIntegers(v
, &dc
->SizeAddX
, &dc
->SizeAddY
);
423 } else if ((v
= strstr(line
, "AddUpDown ")) == line
) {
424 GetIntegers(v
, &dc
->UpDownAddX
, &dc
->UpDownAddY
);
425 } else if ((v
= strstr(line
, "AddLeftRight ")) == line
) {
426 GetIntegers(v
, &dc
->LeftRightAddX
, &dc
->LeftRightAddY
);
427 } else if ((v
= strstr(line
, "ActivatedGradient ")) == line
) {
428 GetTripleIntegers(v
, &dc
->ActivatedGradientColor_s
, &dc
->ActivatedGradientColor_e
, &dc
->ActivatedGradientColor_a
);
429 } else if ((v
= strstr(line
, "DeactivatedGradient ")) == line
) {
430 GetTripleIntegers(v
, &dc
->DeactivatedGradientColor_s
, &dc
->DeactivatedGradientColor_e
, &dc
->DeactivatedGradientColor_a
);
431 } else if ((v
= strstr(line
, "ShadeValues ")) == line
) {
432 GetTripleIntegers(v
, &dc
->ShadeValues_l
, &dc
->ShadeValues_m
, &dc
->ShadeValues_d
);
433 } else if ((v
= strstr(line
, "BaseColors ")) == line
) {
434 GetColors(v
, &dc
->BaseColors_a
, &dc
->BaseColors_d
);
435 } else if ((v
= strstr(line
, "WindowTitleColors ")) == line
) {
436 GetColors(v
, &dc
->TitleColorText
, &dc
->TitleColorShadow
);
437 } else if ((v
= strstr(line
, "LeftBorder ")) == line
) {
438 dc
->LeftBorder
= GetInt(v
);
439 } else if ((v
= strstr(line
, "RightBorder ")) == line
) {
440 dc
->RightBorder
= GetInt(v
);
441 } else if ((v
= strstr(line
, "BottomBorder ")) == line
) {
442 dc
->BottomBorder
= GetInt(v
);
443 } else if ((v
= strstr(line
, "LogoOffset ")) == line
) {
444 dc
->SLogoOffset
= GetInt(v
);
445 } else if ((v
= strstr(line
, "TitleOffset ")) == line
) {
446 dc
->STitleOffset
= GetInt(v
);
447 } else if ((v
= strstr(line
, "SBarHeight ")) == line
) {
448 dc
->SBarHeight
= GetInt(v
);
449 } else if ((v
= strstr(line
, "SBarChildPre ")) == line
) {
450 GetIntegers(v
, &dc
->SBarChildPre_o
, &dc
->SBarChildPre_s
);
451 } else if ((v
= strstr(line
, "SBarChildFill ")) == line
) {
452 GetIntegers(v
, &dc
->SBarChildFill_o
, &dc
->SBarChildFill_s
);
453 } else if ((v
= strstr(line
, "SBarChildPost ")) == line
) {
454 GetIntegers(v
, &dc
->SBarChildPost_o
, &dc
->SBarChildPost_s
);
455 } else if ((v
= strstr(line
, "SBarGadPre ")) == line
) {
456 GetIntegers(v
, &dc
->SBarGadPre_o
, &dc
->SBarGadPre_s
);
457 } else if ((v
= strstr(line
, "SBarGadFill ")) == line
) {
458 GetIntegers(v
, &dc
->SBarGadFill_o
, &dc
->SBarGadFill_s
);
459 } else if ((v
= strstr(line
, "SBarGadPost ")) == line
) {
460 GetIntegers(v
, &dc
->SBarGadPost_o
, &dc
->SBarGadPost_s
);
461 } else if ((v
= strstr(line
, "LUTBaseColors ")) == line
) {
462 GetColors(v
, &dc
->LUTBaseColors_a
, &dc
->LUTBaseColors_d
);
463 } else if ((v
= strstr(line
, "ScreenTitleColors ")) == line
) {
464 GetColors(v
, &dc
->STitleColorText
, &dc
->STitleColorShadow
);
465 } else if ((v
= strstr(line
, "ScreenTitleMode ")) == line
) {
466 dc
->STitleOutline
= GetBool(v
, "Outline");
467 dc
->STitleShadow
= GetBool(v
, "Shadow");
472 D(bug("Decoration/LoadSystemConfig: file has been read\n"));
476 if (olddir
) CurrentDir(olddir
);
479 D(bug("Decoration/LoadSystemConfig: directory unlocked\n"));
482 struct DecorConfig
* LoadConfig(STRPTR path
)
484 struct DecorConfig
* dc
= AllocVec(sizeof(struct DecorConfig
), MEMF_ANY
| MEMF_CLEAR
);
486 D(bug("LoadConfig: dc=%p\n", dc
));
488 dc
->ThemePath
= AllocVec(strlen(path
) + 1, MEMF_ANY
| MEMF_CLEAR
);
489 strcpy(dc
->ThemePath
, path
);
491 D(bug("Decoration/LoadConfig: dc->ThemePath=%p('%s')\n", dc
->ThemePath
, dc
->ThemePath
));
493 LoadMenuConfig(path
, dc
);
495 D(bug("Decoration/LoadConfig: menu config loaded\n"));
497 LoadSystemConfig(path
, dc
);
499 D(bug("Decoration/LoadConfig: system config loaded\n"));
504 void FreeConfig(struct DecorConfig
* dc
)
507 FreeVec(dc
->ThemePath
);
512 struct DecorImages
* NewImages()
514 return AllocVec(sizeof(struct DecorImages
), MEMF_ANY
| MEMF_CLEAR
);
517 struct DecorImages
* LoadImages(struct DecorConfig
* dc
)
519 ULONG wgsubimagecols
= 4; /* Default value of subimage cols in window gadget */
520 STRPTR path
= dc
->ThemePath
;
522 struct DecorImages
* di
= NewImages();
527 if (dc
->GadgetsThreeState
) wgsubimagecols
= 3;
529 di
->img_sdepth
= GetImageFromFile(path
, "System/SDepth/Default", 2, 1);
530 di
->img_stitlebar
= GetImageFromFile(path
, "System/STitlebar/Default", 1, 1);
531 di
->img_sbarlogo
= GetImageFromFile(path
, "System/SBarLogo/Default", 1, 1);
533 di
->img_size
= GetImageFromFile(path
, "System/Size/Default", wgsubimagecols
, 1);
534 di
->img_close
= GetImageFromFile(path
, "System/Close/Default", wgsubimagecols
, 1);
535 di
->img_depth
= GetImageFromFile(path
, "System/Depth/Default", wgsubimagecols
, 1);
536 di
->img_zoom
= GetImageFromFile(path
, "System/Zoom/Default", wgsubimagecols
, 1);
537 di
->img_mui
= GetImageFromFile(path
, "System/MUI/Default", wgsubimagecols
, 1);
538 di
->img_popup
= GetImageFromFile(path
, "System/PopUp/Default", wgsubimagecols
, 1);
539 di
->img_snapshot
= GetImageFromFile(path
, "System/Snapshot/Default", wgsubimagecols
, 1);
540 di
->img_iconify
= GetImageFromFile(path
, "System/Iconify/Default", wgsubimagecols
, 1);
541 di
->img_lock
= GetImageFromFile(path
, "System/Lock/Default", wgsubimagecols
, 1);
542 di
->img_up
= GetImageFromFile(path
, "System/ArrowUp/Default", wgsubimagecols
, 1);
543 di
->img_down
= GetImageFromFile(path
, "System/ArrowDown/Default", wgsubimagecols
, 1);
544 di
->img_left
= GetImageFromFile(path
, "System/ArrowLeft/Default", wgsubimagecols
, 1);
545 di
->img_right
= GetImageFromFile(path
, "System/ArrowRight/Default", wgsubimagecols
, 1);
546 di
->img_winbar_normal
= GetImageFromFile(path
, "System/Titlebar/Default", 1, 2);
547 di
->img_border_normal
= GetImageFromFile(path
, "System/Borders/Default", 1, 1);
548 di
->img_border_deactivated
= GetImageFromFile(path
, "System/Borders/Default_Deactivated", 1, 1);
549 di
->img_verticalcontainer
= GetImageFromFile(path
, "System/Container/Vertical", 2, 1);
550 di
->img_verticalknob
= GetImageFromFile(path
, "System/Knob/Vertical", 3, 1);
551 di
->img_horizontalcontainer
= GetImageFromFile(path
, "System/Container/Horizontal", 1, 2);
552 di
->img_horizontalknob
= GetImageFromFile(path
, "System/Knob/Horizontal", 1, 3);
554 di
->img_menu
= GetImageFromFile(path
, "Menu/Background/Default", 1, 1);
555 di
->img_amigakey
= GetImageFromFile(path
, "Menu/AmigaKey/Default", 1, 1);
556 di
->img_menucheck
= GetImageFromFile(path
, "Menu/Checkmark/Default", 1, 1);
557 di
->img_submenu
= GetImageFromFile(path
, "Menu/SubMenu/Default", 1, 1);
562 void FreeImages(struct DecorImages
* di
)
564 DisposeImageContainer(di
->img_sdepth
);
565 DisposeImageContainer(di
->img_sbarlogo
);
566 DisposeImageContainer(di
->img_stitlebar
);
568 DisposeImageContainer(di
->img_size
);
569 DisposeImageContainer(di
->img_close
);
570 DisposeImageContainer(di
->img_depth
);
571 DisposeImageContainer(di
->img_zoom
);
572 DisposeImageContainer(di
->img_up
);
573 DisposeImageContainer(di
->img_down
);
574 DisposeImageContainer(di
->img_left
);
575 DisposeImageContainer(di
->img_right
);
576 DisposeImageContainer(di
->img_mui
);
577 DisposeImageContainer(di
->img_popup
);
578 DisposeImageContainer(di
->img_snapshot
);
579 DisposeImageContainer(di
->img_iconify
);
580 DisposeImageContainer(di
->img_lock
);
581 DisposeImageContainer(di
->img_winbar_normal
);
582 DisposeImageContainer(di
->img_border_normal
);
583 DisposeImageContainer(di
->img_border_deactivated
);
584 DisposeImageContainer(di
->img_verticalcontainer
);
585 DisposeImageContainer(di
->img_verticalknob
);
586 DisposeImageContainer(di
->img_horizontalcontainer
);
587 DisposeImageContainer(di
->img_horizontalknob
);
589 DisposeImageContainer(di
->img_menu
);
590 DisposeImageContainer(di
->img_amigakey
);
591 DisposeImageContainer(di
->img_menucheck
);
592 DisposeImageContainer(di
->img_submenu
);