Look and Feel Renderer management functions
[Functions]

Data Structures

Defines

Typedefs

Functions


Define Documentation

#define LEN_RENDERER_NAME   15

The maximum length of a renderer name.

Definition at line 3619 of file window.h.

#define SBS_DISABLED_BTDN   0x0200

right or bottom arrow is in disabled state

Definition at line 3544 of file window.h.

#define SBS_DISABLED_LTUP   0x0100

left or up arrow is in disabled state

Definition at line 3541 of file window.h.

#define SBS_HILITE_BTDN   0x0800

right or bottom arrow is in hilited state

Definition at line 3550 of file window.h.

#define SBS_HILITE_LTUP   0x0400

left or up arrow is in hilited state

Definition at line 3547 of file window.h.

#define SBS_HILITE_THUMB   0x0010

thumb is in hilite state as cursor is in the area of thumb

Definition at line 3553 of file window.h.

#define SBS_PRESSED_BTDN   0x0040

right or bottom arrow is in pressed state

Definition at line 3559 of file window.h.

#define SBS_PRESSED_LTUP   0x0020

left or up arrow is in pressed state

Definition at line 3556 of file window.h.

#define SBS_PRESSED_THUMB   0x0080

thumb is in pressed state as left button presses it

Definition at line 3562 of file window.h.

#define WE_ATTR_TYPE_RDR   0x5000

The specific type for LF renderer.

Definition at line 3421 of file window.h.

#define WE_COLORS_NUMBER   14

The number of window element color attributes.

Definition at line 3300 of file window.h.

#define WE_FONTS_NUMBER   4

The number of window element font attributes.

Definition at line 3288 of file window.h.

#define WE_METRICS_NUMBER   6

The number of window element metric attributes.

Definition at line 3294 of file window.h.


Typedef Documentation

The scrollbar information structure. Used by draw_scrollbar and get_scrollbar_rect renderer function.

The window style information structure. Used by calc_we_metrics renderer function.

The scrollbar information structure in look and feel.

typedef struct _SCROLLBARDATA SCROLLBARDATA

The scrollbar data construction for scrollbar control.

The window element attributes structure.

The window element renderer structure.

typedef struct _WINDOWINFO WINDOWINFO

The window information structure.


Function Documentation

BOOL GUIAPI AddWindowElementRenderer ( const char *  name,
const WINDOW_ELEMENT_RENDERER we_rdr 
)

Add a window element renderer to the system.

This function adds a new window renderer to MiniGUI system.

Parameters:
name The renderer name.
we_rdr The pointer to a new renderer.
Returns:
TRUE for success, FALSE for failure.
const WINDOW_ELEMENT_RENDERER *GUIAPI GetDefaultWindowElementRenderer ( void   ) 

Get the default window renderer.

This function gets the default window renderer in MiniGUI.

Returns:
the pointer to the default renderer.
DWORD GUIAPI GetWindowElementAttr ( HWND  hwnd,
int  we_attr_id 
)

Get a window element data.

This function gets a window element data which is identified by we_attr_id.

Parameters:
hwnd The handle to the window.
we_attr_id The window element id number, can be one of the following values:
  • WE_FONT_CAPTION
    The caption font.
  • WE_FONT_MENU
    The menu font. Used by menu and listbox.
  • WE_FONT_MESSAGEBOX
    The messagebox font. Resevered.
  • WE_FONT_TOOLTIP
    The tooltip font. Used by tooltip window.
  • WE_METRICS_CAPTION
    The caption size.
  • WE_METRICS_CAPTION_BUTTON
    The caption button size.
  • WE_METRICS_MENU
    The menu size.
  • WE_METRICS_WND_BORDER
    The border size.
  • WE_METRICS_SCROLLBAR
    The scrollbar size.
  • WE_FGC_ACTIVE_CAPTION
    The active caption foreground color.
  • WE_BGCA_ACTIVE_CAPTION
    The active caption background color A.
  • WE_BGCB_ACTIVE_CAPTION
    The active caption background color B.
  • WE_FGC_MENU
    The menu foreground color.
  • WE_BGC_MENU
    The menu background color.
  • WE_FGC_MESSAGEBOX
    The messagebox foreground color. Reserved.
  • WE_FGC_TOOLTIP
    The tooltip foreground color. Only used by tooltip window.
  • WE_BGC_TOOLTIP
    The tooltip background color. Only used by tooltip window.
  • WE_FGC_ACTIVE_WND_BORDER
    The active border foreground color.
  • WE_FGC_INACTIVE_WND_BORDER
    The inactive border foreground color.
  • WE_FGC_INACTIVE_CAPTION
    The inactive caption foreground color.
  • WE_BGCA_INACTIVE_CAPTION
    The inactive caption background color A.
  • WE_BGCB_INACTIVE_CAPTION
    The inactive caption background color B.
  • WE_FGC_WINDOW
    The window foreground color. Used by window and control.
  • WE_BGC_WINDOW
    The window background color. Used by window and control.
  • WE_FGC_THREED_BODY
    The 3dbox foreground color. Mainly used by drawing 3dbox object, such as dialog and button, etc.
  • WE_MAINC_THREED_BODY
    The 3dbox background color. Mainly used by drawing menubar, dialog, header and button, etc.
  • WE_FGC_SELECTED_ITEM
    The selected item foreground color. Used by menu and control.
  • WE_BGC_SELECTED_ITEM
    The selected item background color. Used by menu and control.
  • WE_BGC_SELECTED_LOSTFOCUS
    The lostfocus selected item background color. Only Used by mledit.
  • WE_FGC_DISABLED_ITEM
    The disabled item foreground color. Used by menu and control.
  • WE_BGC_DISABLED_ITEM
    The disabled item background color. Used by menu and control.
  • WE_FGC_HIGHLIGHT_ITEM
    The highlight item foreground color. Used by menu and control.
  • WE_BGC_HIGHLIGHT_ITEM
    The highlight item background color. Used by menu and control.
  • WE_FGC_SIGNIFICANT_ITEM
    The significant item foreground color. Used by listbox.
  • WE_BGC_SIGNIFICANT_ITEM
    The significant item background color. Used by listbox.
  • WE_BGC_DESKTOP
    The desktop background color. Only used by desktop.
Returns:
If succeed, return the window element data; otherwise return -1.
See also:
SetWindowElementAttr
gal_pixel GUIAPI GetWindowElementPixelEx ( HWND  hwnd,
HDC  hdc,
int  we_attr_id 
)

Get a window element gal_pixel color.

This function gets a window element gal_pixel color which is identified by we_attr_id and hdc.

Parameters:
hwnd The handle to the window.
hdc The device context. If -1, it will return pixel value according to window handle hwnd; otherwise return pixel value according to pixel format in hdc.
we_attr_id The window element id number.
Returns:
If succeed, return the window element pixel color data; otherwise return -1.
See also:
GetWindowElementAttr
const WINDOWINFO *GUIAPI GetWindowInfo ( HWND  hWnd  )  [inline, static]

Get the handle of window information.

This function gets the handle to the window information \ from the specified window handle hWnd.

Parameters:
hWnd The handle to the window.
Returns:
The handle to the window information.

Definition at line 4106 of file window.h.

const WINDOW_ELEMENT_RENDERER *GUIAPI GetWindowRendererFromName ( const char *  name  ) 

Get window renderer from name.

Parameters:
name The renderer name.

This function gets window renderer from the specified name name, which is case-insensitive.

Returns:
The handle to the window renderer for success, NULL for failure.
BOOL GUIAPI InitRendererSystemIcon ( const char *  rdr_name,
HICON large_icon,
HICON small_icon 
)

Initialize large and small system icons in the specified renderer rdr_name.

Parameters:
rdr_name The renderer name.
large_icon The pointer to large system icons.
small_icon The pointer to small system icons.
Returns:
TRUE for success, FALSE for failure.
BOOL GUIAPI InitWindowElementAttrs ( PWERENDERER  rdr  ) 

This function initializes window element attributes of the specified renderer rdr according to the appropriate section in configuration file.

Parameters:
rdr The pointer to the specified renderer.
Returns:
If succeed, return TRUE; otherwise return FALSE.
BOOL BOOL GUIAPI RemoveWindowElementRenderer ( const char *  name  ) 

Remove a window renderer from MiniGUI.

This function only removes a window renderer named by name.

Parameters:
name The renderer name.
Returns:
TRUE for success, FALSE for failure.
const char *GUIAPI SetDefaultWindowElementRenderer ( const char *  name  ) 

Set a window element renderer as the default system renderer.

This function sets a window element renderer as the default system renderer.

Parameters:
name The renderer name.
Returns:
the old renderer's name for success, NULL for failure.
DWORD GUIAPI SetWindowElementAttr ( HWND  hwnd,
int  we_attr_id,
DWORD  we_attr 
)

Set a new window element data specified by we_attr_id.

This function sets a new window element data we_attr to MiniGUI, which is identified by we_attr_id.

Parameters:
hwnd The handle to the window.
we_attr_id The window element id.
we_attr The new window element data.
Returns:
If succeed, return the old window element data; otherwise return -1.
See also:
GetWindowElementAttr
BOOL GUIAPI SetWindowElementRenderer ( HWND  hwnd,
const char *  werdr_name,
const WINDOW_ELEMENT_ATTR we_attrs 
)

Set a window element renderer and window element attributes for window specified by hwnd.

This function sets the window handled by hWnd to use a different window element renderer OR'ed window element attributes and updates window in time.

Parameters:
hwnd The handle to the window.
werdr_name The renderer name.
we_attrs The pointer to new window element attributes.
Returns:
TRUE for success, FALSE for failure.
void GUIAPI TermRendererSystemIcon ( HICON large_icon,
HICON small_icon 
)

Release large and small system icon resources.

Parameters:
large_icon The pointer to large system icons.
small_icon The pointer to small system icons.
See also:
InitRendererSystemIcon
Generated on Thu Apr 7 15:55:39 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3