Cursor operations
[MiniGUI-Processes specific functions]

Defines

Functions


Define Documentation

#define IDC_ARROW   0

System arrow cursor index.

Definition at line 2710 of file minigui.h.

#define IDC_BUSY   12

System busy cursor index.

Definition at line 2734 of file minigui.h.

#define IDC_COLOMN   15

System colomn cursor index.

Definition at line 2740 of file minigui.h.

#define IDC_CROSS   3

System cross cursor index.

Definition at line 2716 of file minigui.h.

#define IDC_DRAG   17

System drag cursor index.

Definition at line 2744 of file minigui.h.

#define IDC_HAND_POINT   19

System hand point cursor index.

Definition at line 2748 of file minigui.h.

#define IDC_HAND_SELECT   20

System hand select cursor index.

Definition at line 2750 of file minigui.h.

#define IDC_HELP   11

System help cursor index.

Definition at line 2732 of file minigui.h.

#define IDC_IBEAM   1

System beam cursor index.

Definition at line 2712 of file minigui.h.

#define IDC_MOVE   4

System move cursor index.

Definition at line 2718 of file minigui.h.

#define IDC_NODROP   18

System nodrop cursor index.

Definition at line 2746 of file minigui.h.

#define IDC_NONE   10

System none cursor index.

Definition at line 2730 of file minigui.h.

#define IDC_PENCIL   2

System pencil cursor index.

Definition at line 2714 of file minigui.h.

#define IDC_RARROW   14

System right arrow cursor index.

Definition at line 2738 of file minigui.h.

#define IDC_ROW   16

System row cursor index.

Definition at line 2742 of file minigui.h.

#define IDC_SIZENESW   6

System size northeast to southwest cursor index.

Definition at line 2722 of file minigui.h.

#define IDC_SIZENS   8

System north to south cursor index.

Definition at line 2726 of file minigui.h.

#define IDC_SIZENWSE   5

System size northwest to southeast cursor index.

Definition at line 2720 of file minigui.h.

#define IDC_SIZEWE   7

System west to east cursor index.

Definition at line 2724 of file minigui.h.

#define IDC_SPLIT_HORZ   21

System horizontal split cursor index.

Definition at line 2752 of file minigui.h.

#define IDC_SPLIT_VERT   22

System vertical cursor index.

Definition at line 2754 of file minigui.h.

#define IDC_UPARROW   9

System up arrow cursor index.

Definition at line 2728 of file minigui.h.

#define IDC_WAIT   13

System wait cursor index.

Definition at line 2736 of file minigui.h.

#define SetCursor ( hcsr   )     SetCursorEx (hcsr, FALSE)

Changes the current cursor.

This function changes the current cursor to be hcsr.

Parameters:
hcsr The expected cursor handle.
Returns:
The old cursor handle.
Note:
This function defined as a macro calling SetCursorEx with passing set_def as FALSE.
See also:
SetCursorEx, SetDefaultCursor

Definition at line 2845 of file minigui.h.

#define SetDefaultCursor ( hcsr   )     SetCursorEx (hcsr, TRUE)

Changes the current cursor, and set it as the default cursor.

This function changes the current cursor to be hcsr, and set it as the default cursor.

Parameters:
hcsr The expected cursor handle.
Returns:
The old cursor handle.
Note:
This function defined as a macro calling SetCursorEx with passing set_def as TRUE.
See also:
SetCursorEx, SetCursor

Definition at line 2862 of file minigui.h.


Function Documentation

void GUIAPI ClipCursor ( const RECT prc  ) 

Clips the cursor range.

This function sets cursor's clipping rectangle. prc is the new clipping rectangle in screen coordinates. If prc is NULL, ClipCursor will disable cursor clipping.

Parameters:
prc The clipping rectangle.
Returns:
None.
HCURSOR GUIAPI CreateCursor ( int  xhotspot,
int  yhotspot,
int  w,
int  h,
const BYTE pANDBits,
const BYTE pXORBits,
int  colornum 
)

Creates a cursor from memory data.

This function creates a cursor from memory data rather than cursor file. xhotspot and yhotspot specify the hotpot of the cursor, w and h are the width and the height of the cursor respectively. pANDBits and pXORBits are AND bitmask and XOR bitmask of the cursor. MiniGUI currently support mono-color cursor and 16-color cursor, colornum specifies the cursor's color depth. For mono-color, it should be 1, and for 16-color cursor, it should be 4.

Parameters:
xhotspot The x-coordinate of the hotspot.
yhotspot The y-coordinate of the hotspot.
w The width of the cursor.
h The height of the cursor.
pANDBits The pointer to AND bits of the cursor.
pXORBits The pointer to XOR bits of the cursor.
colornum The bit-per-pixel of XOR bits.
Returns:
Handle to the cursor, zero on error.
Note:
MiniGUI only support 2-color or 16-color cursor.
BOOL GUIAPI DestroyCursor ( HCURSOR  hcsr  ) 

Destroys a cursor object.

This function destroys a cursor object specified by hcsr.

Parameters:
hcsr Handle to the cursor.
Returns:
TRUE on success, otherwise FALSE.
void GUIAPI GetClipCursor ( RECT prc  ) 

Gets the current cursor clipping rectangle.

This function copies the current clipping rectangle to a RECT pointed to by prc.

Parameters:
prc The clipping rectangle will be saved to this rectangle.
Returns:
None.
HCURSOR GUIAPI GetCurrentCursor ( void   ) 

Gets the handle to the current cursor.

This function retrives the current cursor and returns its handle.

Returns:
Handle to the current system cursor, zero means no current cursor.
void GUIAPI GetCursorPos ( POINT ppt  ) 

Gets position of the current cursor.

This function copies the current mouse cursor position to a POINT structure pointed to by ppt.

Parameters:
ppt The position will be saved in this buffer.
Returns:
None.
See also:
SetCursorPos, POINT
HCURSOR GUIAPI GetDefaultCursor ( void   ) 

Gets the default cursor.

This function gets the current default cursor.

Returns:
The current default cursor handle.
See also:
SetCursorEx, SetDefaultCursor
HCURSOR GUIAPI GetSystemCursor ( int  csrid  ) 

Gets the handle to a system cursor by its identifier.

MiniGUI creates (MAX_SYSCURSORINDEX + 1) system cursors for application. You can use GetSystemCursor to get the handle to these system cursors. The identifier can be one of the following:

  • IDC_ARROW
    Normal arrow cursor.
  • IDC_IBEAM
    'I' shaped beam cursor, indicate an input field.
  • IDC_PENCIL
    Pencil-shape cursor.
  • IDC_CROSS
    Cross cursor.
  • IDC_MOVE
    Moving cursor.
  • IDC_SIZENWSE
    Sizing cursor, along north-west and south-east.
  • IDC_SIZENESW
    Sizing cursor, along north-east and south-west.
  • IDC_SIZEWE
    Sizing cursor, along west and east.
  • IDC_SIZENS
    Sizing cursor, along north and south.
  • IDC_UPARROW
    Up arrow cursor.
  • IDC_NONE
    None cursor.
  • IDC_HELP
    Arrow with question.
  • IDC_BUSY
    Busy cursor.
  • IDC_WAIT
    Wait cursor.
  • IDC_RARROW
    Right arrow cursor.
  • IDC_COLOMN
    Cursor indicates column.
  • IDC_ROW
    Cursor indicates row.
  • IDC_DRAG
    Draging cursor.
  • IDC_NODROP
    No droping cursor.
  • IDC_HAND_POINT
    Hand point cursor.
  • IDC_HAND_SELECT
    Hand selection cursor.
  • IDC_SPLIT_HORZ
    Horizontal splitting cursor.
  • IDC_SPLIT_VERT
    Vertical splitting cursor.
Parameters:
csrid The identifier of the system cursor.
Returns:
Handle to the system cursor, otherwise zero.
HCURSOR GUIAPI LoadCursorFromFile ( const char *  filename  ) 

Loads a cursor from a M$ Windows cursor file.

This function loads a cursor from M$ Windows *.cur file named filename and returns the handle to loaded cursor. The returned handle can be used by SetCursor to set new mouse cursor.

Parameters:
filename The path name of the cursor file.
Returns:
Handle to the cursor, zero on error.
Note:
MiniGUI does not support 256-color or animation cursor.
See also:
SetCursor
HCURSOR GUIAPI LoadCursorFromMem ( const void *  area  ) 

Loads a cursor from a memory area.

This function loads a cursor from a memory area pointed to by area. The memory has the same layout as a M$ Windows CURSOR file. The returned handle can be used by SetCursor to set new mouse cursor.

Parameters:
area The pointer to the cursor data.
Returns:
Handle to the cursor, zero on error.
Note:
MiniGUI does not support 256-color or animation cursor.
See also:
SetCursor
HCURSOR GUIAPI SetCursorEx ( HCURSOR  hcsr,
BOOL  set_def 
)

Changes the current cursor.

This function changes the current cursor to be hcsr, and/or sets it to be the default cursor.

If you pass set_def as TRUE, the expected cursor will be the default cursor. The default cursor will be used when you move the cursor to the desktop.

Parameters:
hcsr The expected cursor handle.
set_def Indicates whether setting the cursor as the default cursor.
Returns:
The old cursor handle.
See also:
SetCursor, SetDefaultCursor, GetDefaultCursor
void GUIAPI SetCursorPos ( int  x,
int  y 
)

Sets position of the current cursor.

This function sets mouse cursor position with the given arguments: (x,y).

Parameters:
x The x-corrdinate of the expected poistion.
y The y-corrdinate of the expected poistion.
Returns:
None.
See also:
GetCursorPos
int GUIAPI ShowCursor ( BOOL  fShow  ) 

Shows or hides cursor.

This function shows or hides cursor according to the argument fShow. Show cursor when fShow is TRUE, and hide cursor when fShow is FALSE. MiniGUI maintains a showing count value. Calling ShowCursor once, the count will increase when fShow is TRUE, or decrease one when FALSE. When the count is less than 0, the cursor will disapear actually.

Parameters:
fShow Indicates show or hide the cursor.
Returns:
Cursor showing count value.
Generated on Thu Apr 7 15:58:39 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3