PhBitmapCursorDescription_t

Bitmap for the cursor

Synopsis:

typedef struct Ph_bitmap_cursor_descr {
        PhCursorDescription_t hdr;
        PhBitmapCursorData_t bmp;
} PhBitmapCursorDescription_t;

Description:

The PhBitmapCursorDescription_t structure defines a bitmap cursor. The members include at least:

The PhBitmapCursorDescription_t contains these members:

hdr
The structure header. This is a PhCursorDescription_t structure that is automatically filled in by the widget. You pass this instead of the PhBitmapCursorDescription_t in functions that have a cursor argument, such as PhInitDrag().

The hdr has these members:

bmp
A PhBitmapCursorData_t structure that describes the bitmap (see below).

The PhBitmapCursorData_t structure defines the bitmap used as a cursor defined by PhBitmapCursorDescription_t.

typedef struct Ph_bitmap_cursor_data {
        PhPoint_t                        size1;
        PhPoint_t                        offset1;
        PgColor_t                        color1;
        char                             bytesperline1;
        PhPoint_t                        size2;
        PhPoint_t                        offset2;
        PgColor_t                        color2;
        char                             bytesperline2;
        char                             Spare[14];
        char                             images[];
} PhBitmapCursorData_t;

The members are:

size1
The dimensions of the first bitmap plane, in pixels.
offset1
The position of the upper-left corner of the first plane of the bitmap, relative to the hot spot.
color1
The color of the first bitmap plane.
bytesperline1
The number of bytes per line for the first bitmap plane.
size2
The dimensions of the second bitmap plane, in pixels. If there's only one bitplane, set this to 0.
offset2
The position of the upper-left corner of the second plane of the bitmap, relative to the hot spot.
color2
The color of the second bitplane.
bytesperline2
The number of bytes per line for the second bitmap plane. If there's only one bitplane, set this to 0.
images
The bitmap image data, as a series of 1-bit-per-pixel planes. Typically, you need to allocate an appropriate amount of memory using malloc(), and then use memcpy() to copy the bitmaps into the memory starting at bmp.images[0].

Note: Most graphics drivers don't support alpha in the cursor colors.

Classification:

Photon

See also:

PhCursorDescription_t