| 67 | void ClearCol(struct Window *w); |
| 68 | |
| 69 | void |
| 70 | EditColor(void) |
| 71 | { |
| 72 | const char *configfile = get_configfile(); |
| 73 | int i, done = 0, okay = 0; |
| 74 | long code, qual, class; |
| 75 | struct Gadget *gd, *dgad; |
| 76 | struct Window *nw; |
| 77 | struct IntuiMessage *imsg; |
| 78 | struct PropInfo *pip; |
| 79 | struct Screen *scrn; |
| 80 | long aidx; |
| 81 | int msx, msy; |
| 82 | int curcol = 0, drag = 0; |
| 83 | int bxorx, bxory, bxxlen, bxylen; |
| 84 | static UWORD colors[AMII_MAXCOLORS]; |
| 85 | static UWORD svcolors[AMII_MAXCOLORS]; |
| 86 | static int once = 0; |
| 87 | scrn = HackScreen; |
| 88 | |
| 89 | if (!once) { |
| 90 | if (WINVERS_AMIV) { |
| 91 | Col_NewWindowStructure1.Width += 300; |
| 92 | Col_NewWindowStructure1.Height += 20; |
| 93 | Col_NewWindowStructure1.LeftEdge -= 150; |
| 94 | Col_BluePen.Width += 300; |
| 95 | Col_RedPen.Width += 300; |
| 96 | Col_GreenPen.Width += 300; |
| 97 | Col_Cancel.LeftEdge += 300; |
| 98 | Col_Okay.LeftEdge += 150; |
| 99 | Col_Cancel.TopEdge += 20; |
| 100 | Col_Save.TopEdge += 20; |
| 101 | Col_Okay.TopEdge += 20; |
| 102 | } |
| 103 | SetBorder(&Col_Okay); |
| 104 | SetBorder(&Col_Cancel); |
| 105 | SetBorder(&Col_Save); |
| 106 | once = 1; |
| 107 | } |
| 108 | |
| 109 | bxylen = Col_NewWindowStructure1.Height |
| 110 | - (Col_BluePen.TopEdge + Col_BluePen.Height + 6); |
| 111 | bxxlen = Col_BluePen.Width; |
| 112 | bxorx = Col_BluePen.LeftEdge; |
| 113 | bxory = Col_BluePen.TopEdge + Col_BluePen.Height + 2; |
| 114 | |
| 115 | /* Save the current colors */ |
| 116 | for (i = 0; i < amii_numcolors; ++i) |
| 117 | svcolors[i] = colors[i] = GetRGB4(scrn->ViewPort.ColorMap, i); |
| 118 | |
| 119 | Col_NewWindowStructure1.Screen = scrn; |
| 120 | #ifdef INTUI_NEW_LOOK |
| 121 | if (IntuitionBase->LibNode.lib_Version >= 37) { |
| 122 | ((struct PropInfo *) Col_BluePen.SpecialInfo)->Flags |= PROPNEWLOOK; |
| 123 | ((struct PropInfo *) Col_RedPen.SpecialInfo)->Flags |= PROPNEWLOOK; |
| 124 | ((struct PropInfo *) Col_GreenPen.SpecialInfo)->Flags |= PROPNEWLOOK; |
| 125 | } |
| 126 | #endif |
no test coverage detected