Complete.Org: Mailing Lists: Archives: freeciv-dev: March 1999:
Re: [Freeciv-Dev] PATCH: "Goto" mouse cursor
Home

Re: [Freeciv-Dev] PATCH: "Goto" mouse cursor

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Cc: Freeciv-dev mailing list <freeciv-dev@xxxxxxxxxxxx>
Subject: Re: [Freeciv-Dev] PATCH: "Goto" mouse cursor
From: Trent Piepho <xyzzy@xxxxxxxxxxxxxxxx>
Date: Thu, 18 Mar 1999 12:02:38 -0800 (PST)

On 18 Mar 1999, Falk Hueffner wrote:
>     Trent> You don't need to use globals to store the color values of
>     Trent> black and white, as XLib has macros, BlackPixel and
>     Trent> WhitePixel, which can be used to get them.
> 
> Sure, but the CreateCursor function insists on getting *colors*, not
> pixels. How do I get a color from BlackPixel?

Opps, didn't notice it wants XColors.  You can just make those yourself,

XColor white, black;
while.green = white.blue = white.red = 0xffff;  /* always 16-bit... */
black.green = black.blue = black.red = 0;

I don't think the pixel value matters, from the XRecolorCursor manpage:

       The XRecolorCursor function changes the color of the spec-
       ified cursor, and if the cursor is being displayed on a
       screen, the change is visible immediately.  The pixel mem-
       bers of the XColor structures are ignored; only the RGB
       values are used.

I assume the same applies to the colors used when making the cursor.

>     Trent> Why include the xbm files with the distribution?  They are
>     Trent> only needed when compiling the client, not when running it.
> 
> Uhm, I thought they were not installed. EXTRA_DIST only means it gets
> into the .tar.gz when doing "make dist". I haven't tested that,
> though.

You're right, my mistake.


[Prev in Thread] Current Thread [Next in Thread]