Lisp HUG Maillist Archive

What's happened to system colors like win32:color_highlight in LWW5.0?

Hello lispworkers,

In LWW4.4 I can easily use system colors win32:color_windowtext and the
like. In the listener, I see

CL-USER 2 > (color:get-color-alias-translation 'win32:color_highlight)
WIN32:COLOR_HIGHLIGHT

CL-USER 3 > (color:get-color-translation 'win32:color_highlight)
#S(COLOR:COLOR-ALIAS :COLOR #(:RGB 0.0 0.5019607843137255
0.5019607843137255))

On the contrary, I do not see such aliases in LWW5.0 Personal:

CL-USER 2 > (color:get-color-alias-translation :color_highlight)
NIL

CL-USER 3 > (color:get-color-translation 'win32:color_highlight)

And I cannot refer to such aliases in CAPI panes.

In readme-5-0.pdf, Section 12.5.3 mentions the following:

You can supply :background :color_highlight and :foreground
  :color_highlighttext...

But these :color_highlight and :color_highlighttext are missing from
color:*color-database* at all.

What is wrong with them?
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Re: What's happened to system colors like win32:color_highlight in LWW5.0?

I wrote:

| In LWW4.4 I can easily use system colors win32:color_windowtext and the
| like. In the listener, I see
|
| CL-USER 2 > (color:get-color-alias-translation 'win32:color_highlight)
| WIN32:COLOR_HIGHLIGHT
|
| CL-USER 3 > (color:get-color-translation 'win32:color_highlight)
| #S(COLOR:COLOR-ALIAS :COLOR #(:RGB 0.0 0.5019607843137255
| 0.5019607843137255))
|
| On the contrary, I do not see such aliases in LWW5.0 Personal:
|
| CL-USER 2 > (color:get-color-alias-translation :color_highlight)
| NIL
|
| CL-USER 3 > (color:get-color-translation 'win32:color_highlight)
|
| And I cannot refer to such aliases in CAPI panes.
|
| In readme-5-0.pdf, Section 12.5.3 mentions the following:
|
| You can supply :background :color_highlight and :foreground
|   :color_highlighttext...
|
| But these :color_highlight and :color_highlighttext are missing from
| color:*color-database* at all.
|
| What is wrong with them?

Just answering myself, the following hack does the trick:

(dolist (color CAPI-WIN32-LIB::*SYSTEM-COLORS*)
  (color:define-color-alias (find-symbol (slot-value color 'keyword) :win32)
                            (slot-value color 'CAPI-WIN32-LIB::COLOR)))

Sorry for the noise.
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Updated at: 2020-12-10 08:45 UTC