PhBitmapCursorDescription_t
![]() |
![]() |
![]() |
![]() |
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:
- hdr.type -- must be Ph_CURSOR_BITMAP.
- hdr.length -- the size of the PhCharacterCursorDescription_t structure. For example, if the structure is called curdef, hdr.length must be equal to:
curdef->bmp.images - (char*)curdef + curdef->bmp.bytesperline1 * curdef->bmp.size1.h + curdef->bmp.bytesperline2 * curdef->bmp.size2.h
- 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].
![]() |
Most graphics drivers don't support alpha in the cursor colors. |
Classification:
Photon
See also:
![]() |
![]() |
![]() |
![]() |
![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
