mGUtils API Reference  v1.2.0
A component of MiniGUI providing users with a number of common dialog templates
Data Structures | Macros | Typedefs | Functions
Skin related routines

Data Structures

struct  skin_item_s
 
struct  skin_item_ops_s
 
struct  sie_slider_s
 
struct  si_nrmlabel_s
 
struct  si_bmplabel_s
 
struct  si_nrmslider_s
 
struct  si_rotslider_s
 
struct  skin_head_s
 

Macros

#define SI_TYPE_NRMLABEL   0x10000000
 
#define SI_TYPE_BMPLABEL   0x20000000
 
#define SI_TYPE_CMDBUTTON   0x30000000
 
#define SI_TYPE_CHKBUTTON   0x40000000
 
#define SI_TYPE_NRMSLIDER   0x50000000
 
#define SI_TYPE_ROTSLIDER   0x60000000
 
#define SI_TYPE_CONTROL   0x70000000
 The item is a control. More...
 
#define SI_TYPE_MASK   0xF0000000
 The item type mask. More...
 
#define SI_TEST_SHAPE_RECT   0x01000000
 
#define SI_TEST_SHAPE_ELLIPSE   0x02000000
 
#define SI_TEST_SHAPE_LOZENGE   0x03000000
 
#define SI_TEST_SHAPE_LTRIANGLE   0x04000000
 
#define SI_TEST_SHAPE_RTRIANGLE   0x05000000
 
#define SI_TEST_SHAPE_UTRIANGLE   0x06000000
 
#define SI_TEST_SHAPE_DTRIANGLE   0x07000000
 
#define SI_STATUS_OK   0x00000001
 
#define SI_STATUS_VISIBLE   0x00000002
 
#define SI_STATUS_DISABLED   0x00000004
 
#define SI_STATUS_HILIGHTED   0x00000008
 
#define SI_BTNSTATUS_CLICKED   0x00000010
 
#define SI_BTNSTATUS_CHECKED   SI_BTNSTATUS_CLICKED
 
#define SI_CMDBUTTON_2STATE   0x00000100
 
#define SI_NRMSLIDER_HORZ   0x00000100
 
#define SI_NRMSLIDER_VERT   0x00000200
 
#define SI_NRMSLIDER_STATIC   0x00000400
 
#define SI_ROTSLIDER_CW   0x00000100
 
#define SI_ROTSLIDER_ANTICW   0x00000200
 
#define SI_ROTSLIDER_STATIC   0x00000400
 
#define CTRL_SKIN   "skin"
 The class name of skin control. More...
 
#define SIE_BUTTON_CLICKED   0x00000001
 
#define SIE_SLIDER_CHANGED   0x00000002
 
#define SIE_GAIN_FOCUS   0x00010000
 
#define SIE_LOST_FOCUS   0x00020000
 
#define MSG_CB_GOON   0
 
#define MSG_CB_DEF_GOON   1
 
#define MSG_CB_STOP   2
 
#define SKIN_STYLE_NONE   0x00000000
 The style of the skin is none. More...
 
#define SKIN_STYLE_TOOLTIP   0x00000001
 
#define SKIN_STYLE_MODAL   0x00000002
 The skin has modal window. More...
 
#define create_skin_main_window(skin, hosting, lx, ty, rx, by, modal)   create_skin_main_window_ex (skin, hosting, lx, ty, rx, by, 0, modal)
 

Typedefs

typedef struct skin_item_ops_s skin_item_ops_t
 
typedef struct skin_head_s skin_head_t
 
typedef struct skin_item_s skin_item_t
 
typedef struct sie_slider_s sie_slider_t
 
typedef struct si_nrmlabel_s si_nrmlabel_t
 
typedef struct si_bmplabel_s si_bmplabel_t
 
typedef struct si_nrmslider_s si_nrmslider_t
 
typedef struct si_rotslider_s si_rotslider_t
 
typedef int(* skin_event_cb_t) (HWND hwnd, skin_item_t *item, int event, void *data)
 
typedef int(* skin_msg_cb_t) (HWND hwnd, int message, WPARAM wparam, LPARAM lparam, int *result)
 

Functions

MGUTILS_EXPORT BOOL skin_init (skin_head_t *skin, skin_event_cb_t event_cb, skin_msg_cb_t msg_cb)
 Initializes a skin. More...
 
MGUTILS_EXPORT void skin_deinit (skin_head_t *skin)
 Deinitializes an initialized skin. More...
 
MGUTILS_EXPORT HWND create_skin_main_window_ex (skin_head_t *skin, HWND hosting, int lx, int ty, int rx, int by, DWORD dwExStyle, BOOL modal)
 Creates a main window for a skin. More...
 
MGUTILS_EXPORT HWND create_skin_control (skin_head_t *skin, HWND parent, int id, int x, int y, int w, int h)
 Creates a control for a skin. More...
 
MGUTILS_EXPORT BOOL is_skin_main_window (HWND hwnd)
 Determines whether a window is a skin main window or not. More...
 
MGUTILS_EXPORT void destroy_skin_window (HWND hwnd)
 Destroys a skin window. More...
 
MGUTILS_EXPORT skin_head_tset_window_skin (HWND hwnd, skin_head_t *new_skin)
 Sets new skin. More...
 
MGUTILS_EXPORT skin_head_tget_window_skin (HWND hwnd)
 Gets new skin. More...
 
static skin_event_cb_t skin_set_event_cb (skin_head_t *skin, skin_event_cb_t event_cb)
 Sets new event callback of a skin. More...
 
static skin_msg_cb_t skin_set_msg_cb (skin_head_t *skin, skin_msg_cb_t msg_cb)
 Sets new message callback of a skin window. More...
 
MGUTILS_EXPORT skin_item_tskin_get_item (skin_head_t *skin, int id)
 Retrives a skin item through its identifier. More...
 
MGUTILS_EXPORT DWORD skin_get_item_status (skin_head_t *skin, int id)
 Retrives the common status of a skin item. More...
 
MGUTILS_EXPORT DWORD skin_set_item_status (skin_head_t *skin, int id, DWORD status)
 Set the common status of a skin item. More...
 
MGUTILS_EXPORT skin_item_tskin_get_hilited_item (skin_head_t *skin)
 Gets the current highlighted skin item. More...
 
MGUTILS_EXPORT DWORD skin_show_item (skin_head_t *skin, int id, BOOL show)
 Showes or hides a skin item. More...
 
MGUTILS_EXPORT DWORD skin_enable_item (skin_head_t *skin, int id, BOOL enable)
 Enables or disables a skin item. More...
 
MGUTILS_EXPORT skin_item_tskin_set_hilited_item (skin_head_t *skin, int id)
 Sets the current highlighted skin item. More...
 
MGUTILS_EXPORT BOOL skin_get_check_status (skin_head_t *skin, int id)
 Gets the check status of a check button item. More...
 
MGUTILS_EXPORT DWORD skin_set_check_status (skin_head_t *skin, int id, BOOL check)
 Sets the check status of a check button item. More...
 
MGUTILS_EXPORT const char * skin_get_item_label (skin_head_t *skin, int id)
 Gets the label string of a label item. More...
 
MGUTILS_EXPORT BOOL skin_set_item_label (skin_head_t *skin, int id, const char *label)
 Sets the label string of a label item. More...
 
MGUTILS_EXPORT HWND skin_get_control_hwnd (skin_head_t *skin, int id)
 Gets the handle to a skin control item in the skin. More...
 
MGUTILS_EXPORT int skin_get_thumb_pos (skin_head_t *skin, int id)
 Gets the thumb position of a slider item. More...
 
MGUTILS_EXPORT BOOL skin_set_thumb_pos (skin_head_t *skin, int id, int pos)
 Sets the thumb position of a slider item. More...
 
MGUTILS_EXPORT BOOL skin_get_slider_info (skin_head_t *skin, int id, sie_slider_t *sie)
 Retrives the sliding information of a slider item. More...
 
MGUTILS_EXPORT BOOL skin_set_slider_info (skin_head_t *skin, int id, const sie_slider_t *sie)
 Sets the sliding information of a slider item. More...
 
MGUTILS_EXPORT int skin_scale_slider_pos (const sie_slider_t *org, int new_min, int new_max)
 Scales the sliding position. More...
 

Detailed Description

Macro Definition Documentation

#define create_skin_main_window (   skin,
  hosting,
  lx,
  ty,
  rx,
  by,
  modal 
)    create_skin_main_window_ex (skin, hosting, lx, ty, rx, by, 0, modal)
See also
create_skin_main_window_ex (skin, hosting, lx, ty, rx, by, 0, modal)

Definition at line 1771 of file mgutils.h.

#define CTRL_SKIN   "skin"

The class name of skin control.

Definition at line 1290 of file mgutils.h.

#define MSG_CB_DEF_GOON   1
See also
skin_msg_cb_t

Definition at line 1590 of file mgutils.h.

#define MSG_CB_GOON   0
See also
skin_msg_cb_t

Definition at line 1584 of file mgutils.h.

#define MSG_CB_STOP   2
See also
skin_msg_cb_t

Definition at line 1596 of file mgutils.h.

#define SI_BTNSTATUS_CHECKED   SI_BTNSTATUS_CLICKED
See also
skin_item_s

Definition at line 1231 of file mgutils.h.

#define SI_BTNSTATUS_CLICKED   0x00000010
See also
skin_item_s

Definition at line 1225 of file mgutils.h.

#define SI_CMDBUTTON_2STATE   0x00000100

Style of command button item

Definition at line 1238 of file mgutils.h.

#define SI_NRMSLIDER_HORZ   0x00000100
See also
skin_item_s

Definition at line 1246 of file mgutils.h.

#define SI_NRMSLIDER_STATIC   0x00000400
See also
skin_item_s

Definition at line 1258 of file mgutils.h.

#define SI_NRMSLIDER_VERT   0x00000200
See also
skin_item_s

Definition at line 1252 of file mgutils.h.

#define SI_ROTSLIDER_ANTICW   0x00000200
See also
skin_item_s

Definition at line 1274 of file mgutils.h.

#define SI_ROTSLIDER_CW   0x00000100
See also
skin_item_s

Definition at line 1268 of file mgutils.h.

#define SI_ROTSLIDER_STATIC   0x00000400
See also
skin_item_s

Definition at line 1280 of file mgutils.h.

#define SI_STATUS_DISABLED   0x00000004
See also
skin_item_s

Definition at line 1209 of file mgutils.h.

#define SI_STATUS_HILIGHTED   0x00000008
See also
skin_item_s

Definition at line 1215 of file mgutils.h.

#define SI_STATUS_OK   0x00000001
See also
skin_item_s

Definition at line 1197 of file mgutils.h.

#define SI_STATUS_VISIBLE   0x00000002
See also
skin_item_s

Definition at line 1203 of file mgutils.h.

#define SI_TEST_SHAPE_DTRIANGLE   0x07000000
See also
skin_item_s

Definition at line 1187 of file mgutils.h.

#define SI_TEST_SHAPE_ELLIPSE   0x02000000
See also
skin_item_s

Definition at line 1157 of file mgutils.h.

#define SI_TEST_SHAPE_LOZENGE   0x03000000
See also
skin_item_s

Definition at line 1163 of file mgutils.h.

#define SI_TEST_SHAPE_LTRIANGLE   0x04000000
See also
skin_item_s

Definition at line 1169 of file mgutils.h.

#define SI_TEST_SHAPE_RECT   0x01000000
See also
skin_item_s

Definition at line 1151 of file mgutils.h.

#define SI_TEST_SHAPE_RTRIANGLE   0x05000000
See also
skin_item_s

Definition at line 1175 of file mgutils.h.

#define SI_TEST_SHAPE_UTRIANGLE   0x06000000
See also
skin_item_s

Definition at line 1181 of file mgutils.h.

#define SI_TYPE_BMPLABEL   0x20000000
See also
skin_item_s

Definition at line 1105 of file mgutils.h.

#define SI_TYPE_CHKBUTTON   0x40000000
See also
skin_item_s

Definition at line 1117 of file mgutils.h.

#define SI_TYPE_CMDBUTTON   0x30000000
See also
skin_item_s

Definition at line 1111 of file mgutils.h.

#define SI_TYPE_CONTROL   0x70000000

The item is a control.

Definition at line 1137 of file mgutils.h.

#define SI_TYPE_MASK   0xF0000000

The item type mask.

Definition at line 1143 of file mgutils.h.

#define SI_TYPE_NRMLABEL   0x10000000
See also
skin_item_s

Definition at line 1099 of file mgutils.h.

#define SI_TYPE_NRMSLIDER   0x50000000
See also
skin_item_s

Definition at line 1123 of file mgutils.h.

#define SI_TYPE_ROTSLIDER   0x60000000
See also
skin_item_s

Definition at line 1130 of file mgutils.h.

#define SIE_BUTTON_CLICKED   0x00000001
See also
skin_event_cb_t

Definition at line 1541 of file mgutils.h.

#define SIE_GAIN_FOCUS   0x00010000
See also
skin_event_cb_t

Definition at line 1553 of file mgutils.h.

#define SIE_LOST_FOCUS   0x00020000
See also
skin_event_cb_t

Definition at line 1559 of file mgutils.h.

#define SIE_SLIDER_CHANGED   0x00000002
See also
skin_event_cb_t

Definition at line 1547 of file mgutils.h.

#define SKIN_STYLE_MODAL   0x00000002

The skin has modal window.

Definition at line 1642 of file mgutils.h.

#define SKIN_STYLE_NONE   0x00000000

The style of the skin is none.

Definition at line 1630 of file mgutils.h.

#define SKIN_STYLE_TOOLTIP   0x00000001

The skin has tooltip window.

Definition at line 1636 of file mgutils.h.

Typedef Documentation

typedef struct si_bmplabel_s si_bmplabel_t

Bitmap label item info structure

typedef struct si_nrmlabel_s si_nrmlabel_t

Normal label item info structure

Normal slider item info structure

Rotation slider item info structure

typedef struct sie_slider_s sie_slider_t

Slider information structure

int(* skin_event_cb_t)(HWND hwnd, skin_item_t *item, int event, void *data)

Event callback of skin item.

The event can be one of the following values:

  • SIE_GAIN_FOCUS
    The item gained the focus.
  • SIE_LOST_FOCUS
    The item losted the focus.
  • SIE_BUTTON_CLICKED
    The button item has been clicked.
  • SIE_SLIDER_CHANGED
    The position of the slider item has changed.

Definition at line 1578 of file mgutils.h.

typedef struct skin_head_s skin_head_t
See also
skin_head_s

Definition at line 1302 of file mgutils.h.

See also
skin_item_ops_s

Definition at line 1296 of file mgutils.h.

typedef struct skin_item_s skin_item_t

Skin item information structure

int(* skin_msg_cb_t)(HWND hwnd, int message, WPARAM wparam, LPARAM lparam, int *result)

This is the type of message callback function of a skin window.

Before a skin window processes a message, it will call the message callback function if the application defined it.

The application defined message callback function can process the message as a normal window procedure and return the result through the parameter result. However, the return value of a message callback function can be used to control the behavior of the skin window's message handling procedure. It can be one of the following values:

  • MSG_CB_GOON The message should be processed by skin window procedure, and the result of the callback will be ignored.
  • MSG_CB_DEF_GOON The message should be processed by the default window procedure, and the result of the callback will be ignored.
  • MSG_CB_STOP The message should not be processed, and the result is valid.

Definition at line 1623 of file mgutils.h.

Function Documentation

HWND create_skin_control ( skin_head_t skin,
HWND  parent,
int  id,
int  x,
int  y,
int  w,
int  h 
)

Creates a control for a skin.

This function creates a control for the skin pointed to by skin.

Parameters
skinThe pointer to the initialized skin object.
parentThe handle to the parent window of the expected control.
idThe identifier of the expected control.
xX-coordinate of the expected control in the parent window's client area.
yY-coordinate of the expected control in the parent window's client area.
wThe width of the expected control.
hThe height of the expected control.
Returns
The handle to the control.
Note
The skin will store itself as the control's additional data, so application should not call SetWindowAdditionalData to store other value.

You can also create a skin control by calling CreateWindowEx in the following manner:

1 CreateWindowEx (CTRL_SKIN, "", WS_VISIBLE | WS_CHILD, WS_EX_NONE,
2  id, x, y, w, h, parent, (DWORD) skin);
See also
create_skin_main_window
HWND create_skin_main_window_ex ( skin_head_t skin,
HWND  hosting,
int  lx,
int  ty,
int  rx,
int  by,
DWORD  dwExStyle,
BOOL  modal 
)

Creates a main window for a skin.

This function creates a main window for the skin pointed to by skin. The main window will have no caption, no menu, and no frame. However, the window's caption string will be the name of the skin object.

Parameters
skinThe pointer to the initialized skin object.
hostingThe the hosting main window.
lxX-coordinate of the upper-left corner of the expected main window.
tyY-coordinate of the upper-left corner of the expected main window.
rxX-coordinate of the lower-right corner of the expected main window.
byY-coordinate of the lower-right corner of the expected main window.
dwExStyleThe extended style of the expected control.
modalWhether to be a modal or modeless main window.
Returns
The handle to the main window.
Note
The skin will store itself as the main window's additional data, so application should not call SetWindowAdditionalData to store other value.
See also
create_skin_control
void destroy_skin_window ( HWND  hwnd)

Destroys a skin window.

The function destroys the skin main window or control.

Parameters
hwndThe handle to the skin window.
See also
create_skin_main_window, create_skin_control
skin_head_t * get_window_skin ( HWND  hwnd)

Gets new skin.

The function gets the skin of skin window hwnd.

Parameters
hwndThe handle to the skin window.
Returns
The pointer to the skin object.
See also
skin_set_event_cb, skin_set_msg_cb
BOOL is_skin_main_window ( HWND  hwnd)

Determines whether a window is a skin main window or not.

The function determines whether a window specified by hwnd is a main window created by skin_main_window or not.

Parameters
hwndThe handle to the skin window.
Returns
TRUE if it is , and FALSE if it isn't.
See also
create_skin_main_window
skin_head_t * set_window_skin ( HWND  hwnd,
skin_head_t new_skin 
)

Sets new skin.

The function sets a new skin pointed to by new_skin for the skin window hwnd.

Parameters
hwndThe handle to the skin window.
new_skinThe pointer to the new skin object.
Returns
The pointer to the old skin object.
See also
skin_set_event_cb, skin_set_msg_cb
void skin_deinit ( skin_head_t skin)

Deinitializes an initialized skin.

This function deinitializes a skin, opposed to skin_init.

Parameters
skinThe pointer to the skin object.
See also
skin_init
BOOL skin_enable_item ( skin_head_t skin,
int  id,
BOOL  enable 
)

Enables or disables a skin item.

This function enables or disables a skin item whose identifier is id.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
enableTRUE for enable, FALSE for disable.
Returns
The current common status of the skin items, zero when error.

Referenced by skin_set_msg_cb().

BOOL skin_get_check_status ( skin_head_t skin,
int  id 
)

Gets the check status of a check button item.

This function gets the check status of a check button item, checked or unchecked.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
Returns
TRUE for checked, FALSE for unchecked.
See also
skin_item_s, skin_set_check_status

Referenced by skin_set_msg_cb().

HWND skin_get_control_hwnd ( skin_head_t skin,
int  id 
)

Gets the handle to a skin control item in the skin.

This function returns the handle to a skin control item whose identifier is id.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin control item.
Returns
The handle to the control.
See also
skin_item_s

Referenced by skin_set_msg_cb().

skin_item_t * skin_get_hilited_item ( skin_head_t skin)

Gets the current highlighted skin item.

Parameters
skinThe pointer to the skin.
Returns
The pointer to the current highlighted skin item.
See also
skin_item_s, skin_set_hilited_item

Referenced by skin_set_msg_cb().

skin_item_t * skin_get_item ( skin_head_t skin,
int  id 
)

Retrives a skin item through its identifier.

This function retrives the pointer to a skin item by its identifier.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
Returns
The pointer to the skin item, NULL on error.
See also
skin_item_s

Referenced by skin_set_msg_cb().

const char * skin_get_item_label ( skin_head_t skin,
int  id 
)

Gets the label string of a label item.

This function returns the label string of a label item whose identifier is id.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
Returns
The pointer to the label string. You should not modify the content of the string directly.
See also
skin_item_s, skin_set_item_label

Referenced by skin_set_msg_cb().

DWORD skin_get_item_status ( skin_head_t skin,
int  id 
)

Retrives the common status of a skin item.

This function retrives the common status of a skin item by its identifier.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
Returns
The common status of the skin items, zero on error.
See also
skin_item_s, skin_show_item, skin_enable_item, skin_set_hilited_item, skin_get_item_status

Referenced by skin_set_msg_cb().

BOOL skin_get_slider_info ( skin_head_t skin,
int  id,
sie_slider_t sie 
)

Retrives the sliding information of a slider item.

This function retrives the sliding information of a slider item whose identifier is id.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
sieThe pointer to a buffer which will be used to return the sliding information.
Returns
TRUE for success, FALSE on error.
See also
skin_item_s, skin_set_slider_info

Referenced by skin_set_msg_cb().

int skin_get_thumb_pos ( skin_head_t skin,
int  id 
)

Gets the thumb position of a slider item.

This function gets the thumb position of a slider item.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
Returns
The current thumb position.
See also
skin_item_s, skin_set_thumb_pos

Referenced by skin_set_msg_cb().

BOOL skin_init ( skin_head_t skin,
skin_event_cb_t  event_cb,
skin_msg_cb_t  msg_cb 
)

Initializes a skin.

This function initializes a skin skin before it can be used. The initialization of a skin includes skin items initialization, etc, such as creating the hit-test region, allocating space for label, and so on.

Parameters
skinThe pointer to the skin object. The skin can be a object returned by a hard-coded skin_head_t structure.
event_cbThe item event callback of the skin.
msg_cbThe window message callback of the skin window.
Returns
TRUE for success, otherwise FALSE.
int skin_scale_slider_pos ( const sie_slider_t org,
int  new_min,
int  new_max 
)

Scales the sliding position.

This function is a helper function, it calculates and returns the new position value of a sliding information in the new sliding range defined by new_max and new_min.

Parameters
orgThe original sliding information, its range and current position value.
new_minThe new minimal value.
new_maxThe new maximal value.
Returns
The new position value.
See also
sie_slider_t

Referenced by skin_set_msg_cb().

DWORD skin_set_check_status ( skin_head_t skin,
int  id,
BOOL  check 
)

Sets the check status of a check button item.

This function sets the check status of a check button item.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
checkChecks it or not.
Returns
The current common status of the check button item.
See also
skin_item_s, skin_get_check_status

Referenced by skin_set_msg_cb().

skin_event_cb_t skin_set_event_cb ( skin_head_t skin,
skin_event_cb_t  event_cb 
)
inlinestatic

Sets new event callback of a skin.

This function sets event_cb as the event callback of the skin skin.

Parameters
skinThe pointer to the skin object.
event_cbThe new event callback.
Returns
The old event callback.
See also
skin_set_msg_cb

Definition at line 1879 of file mgutils.h.

skin_item_t * skin_set_hilited_item ( skin_head_t skin,
int  id 
)

Sets the current highlighted skin item.

This function sets the current highlighted skin item.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
Returns
The pointer to the old highlighted skin item.
See also
skin_item_s, skin_get_hilited_item

Referenced by skin_set_msg_cb().

BOOL skin_set_item_label ( skin_head_t skin,
int  id,
const char *  label 
)

Sets the label string of a label item.

This function sets the label string of a label item and reflects the appearance of the item if it is visible.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
labelThe pointer to the new label string.
Returns
TRUE for success, FALSE on error.
See also
skin_item_s, skin_get_item_label

Referenced by skin_set_msg_cb().

DWORD skin_set_item_status ( skin_head_t skin,
int  id,
DWORD  status 
)

Set the common status of a skin item.

This function set the common status of a skin item by its identifier.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
statusThe common status of the skin item.
Returns
The old common status of the skin items.
See also
skin_get_item_status

Referenced by skin_set_msg_cb().

skin_msg_cb_t skin_set_msg_cb ( skin_head_t skin,
skin_msg_cb_t  msg_cb 
)
inlinestatic

Sets new message callback of a skin window.

This function sets msg_cb as the message callback of the skin skin.

Parameters
skinThe pointer to the skin object.
msg_cbThe new message callback.
Returns
The old message callback.
See also
skin_set_event_cb

Definition at line 1901 of file mgutils.h.

References skin_enable_item(), skin_get_check_status(), skin_get_control_hwnd(), skin_get_hilited_item(), skin_get_item(), skin_get_item_label(), skin_get_item_status(), skin_get_slider_info(), skin_get_thumb_pos(), skin_scale_slider_pos(), skin_set_check_status(), skin_set_hilited_item(), skin_set_item_label(), skin_set_item_status(), skin_set_slider_info(), skin_set_thumb_pos(), and skin_show_item().

BOOL skin_set_slider_info ( skin_head_t skin,
int  id,
const sie_slider_t sie 
)

Sets the sliding information of a slider item.

This function sets the sliding information of a slider item whose identifier is id.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
sieThe pointer to a sliding information structure.
Returns
TRUE for success, FALSE on error.

Referenced by skin_set_msg_cb().

BOOL skin_set_thumb_pos ( skin_head_t skin,
int  id,
int  pos 
)

Sets the thumb position of a slider item.

This function sets the thumb position of a slider item whose identifier is id to the value of pos. It will redraw the item if the position changed.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
posThe new position value.
Returns
TRUE for success, FALSE on error.
See also
skin_item_s, skin_get_thumb_pos

Referenced by skin_set_msg_cb().

DWORD skin_show_item ( skin_head_t skin,
int  id,
BOOL  show 
)

Showes or hides a skin item.

This function showes or hides a skin item whose identifier is id.

Parameters
skinThe pointer to the skin.
idThe identifier of the skin item.
showTRUE for show, FALSE for hide.
Returns
The current common status of the skin items, zero when error.
See also
skin_item_s, skin_get_item_status

Referenced by skin_set_msg_cb().