Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Skin related routines
[Interfaces of the MiniGUI extension]

Data Structures

Defines

Typedefs

Functions


Define Documentation

#define create_skin_main_window skin,
hosting,
x,
y,
w,
h,
modal   )     create_skin_main_window_ex (skin, hosting, x, y, w, h, 0, modal);
 

See also:
create_skin_main_window_ex (skin, hosting, x, y, w, h, 0, modal)

Definition at line 735 of file skin.h.

#define CTRL_SKIN   "skin"
 

The class name of skin control.

Definition at line 259 of file skin.h.

#define MSG_CB_DEF_GOON   1
 

See also:
skin_msg_cb_t

Definition at line 554 of file skin.h.

#define MSG_CB_GOON   0
 

See also:
skin_msg_cb_t

Definition at line 548 of file skin.h.

#define MSG_CB_STOP   2
 

See also:
skin_msg_cb_t

Definition at line 560 of file skin.h.

#define SI_BTNSTATUS_CHECKED   SI_BTNSTATUS_CLICKED
 

See also:
skin_item_s

Definition at line 201 of file skin.h.

#define SI_BTNSTATUS_CLICKED   0x00000010
 

See also:
skin_item_s

Definition at line 195 of file skin.h.

#define SI_CMDBUTTON_2STATE   0x00000100
 

Style of command button item

Definition at line 207 of file skin.h.

#define SI_NRMSLIDER_HORZ   0x00000100
 

See also:
skin_item_s

Definition at line 215 of file skin.h.

#define SI_NRMSLIDER_STATIC   0x00000400
 

See also:
skin_item_s

Definition at line 227 of file skin.h.

#define SI_NRMSLIDER_VERT   0x00000200
 

See also:
skin_item_s

Definition at line 221 of file skin.h.

#define SI_ROTSLIDER_ANTICW   0x00000200
 

See also:
skin_item_s

Definition at line 243 of file skin.h.

#define SI_ROTSLIDER_CW   0x00000100
 

See also:
skin_item_s

Definition at line 237 of file skin.h.

#define SI_ROTSLIDER_STATIC   0x00000400
 

See also:
skin_item_s

Definition at line 249 of file skin.h.

#define SI_STATUS_DISABLED   0x00000004
 

See also:
skin_item_s

Definition at line 179 of file skin.h.

#define SI_STATUS_HILIGHTED   0x00000008
 

See also:
skin_item_s

Definition at line 185 of file skin.h.

#define SI_STATUS_OK   0x00000001
 

See also:
skin_item_s

Definition at line 167 of file skin.h.

#define SI_STATUS_VISIBLE   0x00000002
 

See also:
skin_item_s

Definition at line 173 of file skin.h.

#define SI_TEST_SHAPE_DTRIANGLE   0x07000000
 

See also:
skin_item_s

Definition at line 155 of file skin.h.

#define SI_TEST_SHAPE_ELLIPSE   0x02000000
 

See also:
skin_item_s

Definition at line 125 of file skin.h.

#define SI_TEST_SHAPE_LOZENGE   0x03000000
 

See also:
skin_item_s

Definition at line 131 of file skin.h.

#define SI_TEST_SHAPE_LTRIANGLE   0x04000000
 

See also:
skin_item_s

Definition at line 137 of file skin.h.

#define SI_TEST_SHAPE_RECT   0x01000000
 

See also:
skin_item_s

Definition at line 117 of file skin.h.

#define SI_TEST_SHAPE_RTRIANGLE   0x05000000
 

See also:
skin_item_s

Definition at line 143 of file skin.h.

#define SI_TEST_SHAPE_UTRIANGLE   0x06000000
 

See also:
skin_item_s

Definition at line 149 of file skin.h.

#define SI_TYPE_BMPLABEL   0x20000000
 

See also:
skin_item_s

Definition at line 71 of file skin.h.

#define SI_TYPE_CHKBUTTON   0x40000000
 

See also:
skin_item_s

Definition at line 83 of file skin.h.

#define SI_TYPE_CMDBUTTON   0x30000000
 

See also:
skin_item_s

Definition at line 77 of file skin.h.

#define SI_TYPE_CONTROL   0x70000000
 

The item is a control.

Definition at line 103 of file skin.h.

#define SI_TYPE_MASK   0xF0000000
 

The item type mask.

Definition at line 109 of file skin.h.

#define SI_TYPE_NRMLABEL   0x10000000
 

See also:
skin_item_s

Definition at line 65 of file skin.h.

#define SI_TYPE_NRMSLIDER   0x50000000
 

See also:
skin_item_s

Definition at line 89 of file skin.h.

#define SI_TYPE_ROTSLIDER   0x60000000
 

See also:
skin_item_s

Definition at line 96 of file skin.h.

#define SIE_BUTTON_CLICKED   0x00000001
 

See also:
skin_event_cb_t

Definition at line 505 of file skin.h.

#define SIE_GAIN_FOCUS   0x00010000
 

See also:
skin_event_cb_t

Definition at line 517 of file skin.h.

#define SIE_LOST_FOCUS   0x00020000
 

See also:
skin_event_cb_t

Definition at line 523 of file skin.h.

#define SIE_SLIDER_CHANGED   0x00000002
 

See also:
skin_event_cb_t

Definition at line 511 of file skin.h.

#define SKIN_STYLE_MODAL   0x00000002
 

The skin has modal window.

Definition at line 606 of file skin.h.

#define SKIN_STYLE_NONE   0x00000000
 

The style of the skin is none.

Definition at line 594 of file skin.h.

#define SKIN_STYLE_TOOLTIP   0x00000001
 

The skin has tooltip window.

Definition at line 600 of file skin.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

typedef struct si_nrmslider_s si_nrmslider_t
 

Normal slider item info structure

typedef struct si_rotslider_s si_rotslider_t
 

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 542 of file skin.h.

typedef struct skin_head_s skin_head_t
 

See also:
skin_head_s

Definition at line 271 of file skin.h.

typedef struct skin_item_ops_s skin_item_ops_t
 

See also:
skin_item_ops_s

Definition at line 265 of file skin.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 587 of file skin.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:
skin The pointer to the initialized skin object.
parent The handle to the parent window of the expected control.
id The identifier of the expected control.
x X-coordinate of the expected control in the parent window's client area.
y Y-coordinate of the expected control in the parent window's client area.
w The width of the expected control.
h The 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:
     CreateWindowEx (CTRL_SKIN, "", WS_VISIBLE | WS_CHILD, WS_EX_NONE, 
                     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  x,
int  y,
int  w,
int  h,
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:
skin The pointer to the initialized skin object.
hosting The the hosting main window.
x X-coordinate of the expected main window.
y Y-coordinate of the expected main window.
w The width of the expected main window.
h The height of the expected main window.
dwExStyle The extended style of the expected control.
modal Whether 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:
hwnd The 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:
hwnd The 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:
hwnd The 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:
hwnd The handle to the skin window.
new_skin The 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:
skin The 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:
skin The pointer to the skin.
id The identifier of the skin item.
enable TRUE for enable, FALSE for disable.
Returns:
The current common status of the skin items, zero when error.

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:
skin The pointer to the skin.
id The identifier of the skin item.
Returns:
TRUE for checked, FALSE for unchecked.
See also:
skin_item_s, skin_set_check_status

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:
skin The pointer to the skin.
id The identifier of the skin control item.
Returns:
The handle to the control.
See also:
skin_item_s

skin_item_t * skin_get_hilited_item skin_head_t skin  ) 
 

Gets the current highlighted skin item.

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

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:
skin The pointer to the skin.
id The identifier of the skin item.
Returns:
The pointer to the skin item, NULL on error.
See also:
skin_item_s

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:
skin The pointer to the skin.
id The 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

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:
skin The pointer to the skin.
id The 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

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:
skin The pointer to the skin.
id The identifier of the skin item.
sie The 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

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:
skin The pointer to the skin.
id The identifier of the skin item.
Returns:
The current thumb position.
See also:
skin_item_s, skin_set_thumb_pos

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:
skin The pointer to the skin object. The skin can be a object returned by a hard-coded skin_head_t structure.
event_cb The item event callback of the skin.
msg_cb The 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:
org The original sliding information, its range and current position value.
new_min The new minimal value.
new_max The new maximal value.
Returns:
The new position value.
See also:
sie_slider_t

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:
skin The pointer to the skin.
id The identifier of the skin item.
check Checks it or not.
Returns:
The current common status of the check button item.
See also:
skin_item_s, skin_get_check_status

skin_event_cb_t skin_set_event_cb skin_head_t skin,
skin_event_cb_t  event_cb
[inline, static]
 

Sets new event callback of a skin.

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

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

Definition at line 843 of file skin.h.

References skin_head_s::event_cb.

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:
skin The pointer to the skin.
id The identifier of the skin item.
Returns:
The pointer to the old highlighted skin item.
See also:
skin_item_s, skin_get_hilited_item

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:
skin The pointer to the skin.
id The identifier of the skin item.
label The pointer to the new label string.
Returns:
TRUE for success, FALSE on error.
See also:
skin_item_s, skin_get_item_label

skin_msg_cb_t skin_set_msg_cb skin_head_t skin,
skin_msg_cb_t  msg_cb
[inline, static]
 

Sets new message callback of a skin window.

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

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

Definition at line 865 of file skin.h.

References skin_head_s::msg_cb.

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:
skin The pointer to the skin.
id The identifier of the skin item.
sie The pointer to a sliding information structure.
Returns:
TRUE for success, FALSE on error.

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:
skin The pointer to the skin.
id The identifier of the skin item.
pos The new position value.
Returns:
TRUE for success, FALSE on error.
See also:
skin_item_s, skin_get_thumb_pos

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:
skin The pointer to the skin.
id The identifier of the skin item.
show TRUE 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


Generated on Mon Jun 26 13:54:35 2006 for MiniGUI V1.6.9 API Reference by  doxygen 1.4.2