How to define my own software cursor

I am working on Neutrino, I want to define my own software cursor, how can I
begin with it?

jigang <jigang@jinglun.com.cn> wrote:

I am working on Neutrino, I want to define my own software cursor, how can I
begin with it?

You need to set the widget’s Pt_ARG_CURSOR_TYPE to Ph_CURSOR_BITMAP. In addition
you need to set Pt_ARG_BITMAP_CURSOR to specify the bitmap for the actual cursor.

The resource Pt_ARG_BITMAP_CURSOR takes a variable-length PhCursorDef_t struct as
an argument. Fill this struct in appropriately, with the bitmap data tacked on the
end (starting at the images member)

If you want to enforce this cursor for all children (for instance in the case of a
PtWindow) then also set Pt_ARG_CURSOR_OVERRIDE to Pt_TRUE.

David LeBlanc <dleblanc@qnx.com> wrote:
: jigang <jigang@jinglun.com.cn> wrote:
:> I am working on Neutrino, I want to define my own software cursor, how can I
:> begin with it?

: You need to set the widget’s Pt_ARG_CURSOR_TYPE to Ph_CURSOR_BITMAP. In addition
: you need to set Pt_ARG_BITMAP_CURSOR to specify the bitmap for the actual cursor.

: The resource Pt_ARG_BITMAP_CURSOR takes a variable-length PhCursorDef_t struct as
: an argument. Fill this struct in appropriately, with the bitmap data tacked on the
: end (starting at the images member)

See the documentation for Pt_ARG_BITMAP_CURSOR in the entry for PtWidget in
the Widget Reference. It describes the members of thePhCursorDef_t
structure.

: If you want to enforce this cursor for all children (for instance in the case of a
: PtWindow) then also set Pt_ARG_CURSOR_OVERRIDE to Pt_TRUE.

Pt_ARG_CURSOR_OVERRIDE is a resource defined by PtContainer.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems