Code formatting

This commit is contained in:
Raymond Penners 2003-10-22 18:25:50 +00:00
parent 5bf43ccbb8
commit bce3094486
4 changed files with 64 additions and 59 deletions

View File

@ -1,12 +1,14 @@
2003-10-22 Raymond Penners <raymond@dotsphinx.com>
* src/*.[ch]: Code formatting & XP constants renaming.
2003-10-21 Dom Lachowicz <cinamod@hotmail.com> 2003-10-21 Dom Lachowicz <cinamod@hotmail.com>
* src/wimp_style.c: Use theme colors * src/wimp_style.c: Use theme colors, use theme metrics
Use theme metrics (disabled), use theme fonts, theme menu items, menu separators,
(disabled) Use theme fonts draw status bar resize grips.
Theme menu items, menu separators
Draw status bar resize grips
* src/xp_theme.c: Ditto * src/xp_theme.c: Ditto.
2003-10-20 Raymond Penners <raymond@dotsphinx.com> 2003-10-20 Raymond Penners <raymond@dotsphinx.com>

View File

@ -1044,7 +1044,7 @@ draw_arrow (GtkStyle *style,
/* draw the toolbar chevrons - waiting for GTK 2.4 */ /* draw the toolbar chevrons - waiting for GTK 2.4 */
if (name && !strcmp (name, "gtk-toolbar-arrow")) if (name && !strcmp (name, "gtk-toolbar-arrow"))
{ {
if (xp_theme_draw(window, XP_THEME_ELEMENT_CHEVRON, style, x, y, width, height, state, area)) if (xp_theme_draw(window, XP_THEME_ELEMENT_REBAR_CHEVRON, style, x, y, width, height, state, area))
return; return;
} }
@ -1164,8 +1164,8 @@ draw_box (GtkStyle *style,
{ {
xp_theme_draw(window, xp_theme_draw(window,
is_v is_v
? XP_THEME_ELEMENT_GRIP_V ? XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_V
: XP_THEME_ELEMENT_GRIP_H, : XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_H,
style, x, y, width, height, state_type, area); style, x, y, width, height, state_type, area);
return; return;
} }
@ -1569,9 +1569,9 @@ draw_handle (GtkStyle *style,
sanitize_size (window, &width, &height); sanitize_size (window, &width, &height);
if (orientation == GTK_ORIENTATION_VERTICAL) if (orientation == GTK_ORIENTATION_VERTICAL)
hndl = XP_THEME_ELEMENT_GRIPPER_V; hndl = XP_THEME_ELEMENT_REBAR_GRIPPER_V;
else else
hndl = XP_THEME_ELEMENT_GRIPPER_H; hndl = XP_THEME_ELEMENT_REBAR_GRIPPER_H;
if (xp_theme_draw (window, hndl, style, x, y, width, height, if (xp_theme_draw (window, hndl, style, x, y, width, height,
state_type, area)) state_type, area))

View File

@ -229,9 +229,9 @@ xp_theme_get_handle_by_element (XpThemeElement element)
break; break;
case XP_THEME_ELEMENT_REBAR: case XP_THEME_ELEMENT_REBAR:
case XP_THEME_ELEMENT_GRIPPER_H: case XP_THEME_ELEMENT_REBAR_GRIPPER_H:
case XP_THEME_ELEMENT_GRIPPER_V: case XP_THEME_ELEMENT_REBAR_GRIPPER_V:
case XP_THEME_ELEMENT_CHEVRON: case XP_THEME_ELEMENT_REBAR_CHEVRON:
klazz = XP_THEME_CLASS_REBAR; klazz = XP_THEME_CLASS_REBAR;
break; break;
@ -284,8 +284,8 @@ xp_theme_get_handle_by_element (XpThemeElement element)
case XP_THEME_ELEMENT_ARROW_DOWN: case XP_THEME_ELEMENT_ARROW_DOWN:
case XP_THEME_ELEMENT_ARROW_LEFT: case XP_THEME_ELEMENT_ARROW_LEFT:
case XP_THEME_ELEMENT_ARROW_RIGHT: case XP_THEME_ELEMENT_ARROW_RIGHT:
case XP_THEME_ELEMENT_GRIP_V: case XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_V:
case XP_THEME_ELEMENT_GRIP_H: case XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_H:
case XP_THEME_ELEMENT_TROUGH_V: case XP_THEME_ELEMENT_TROUGH_V:
case XP_THEME_ELEMENT_TROUGH_H: case XP_THEME_ELEMENT_TROUGH_H:
klazz = XP_THEME_CLASS_SCROLLBAR; klazz = XP_THEME_CLASS_SCROLLBAR;
@ -332,8 +332,8 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
break; break;
case XP_THEME_ELEMENT_REBAR: case XP_THEME_ELEMENT_REBAR:
case XP_THEME_ELEMENT_GRIPPER_H: case XP_THEME_ELEMENT_REBAR_GRIPPER_H:
case XP_THEME_ELEMENT_GRIPPER_V: case XP_THEME_ELEMENT_REBAR_GRIPPER_V:
ret = CHEVS_NORMAL; ret = CHEVS_NORMAL;
break; break;
@ -342,7 +342,7 @@ xp_theme_map_gtk_state (XpThemeElement element, GtkStateType state)
ret = 1; ret = 1;
break; break;
case XP_THEME_ELEMENT_CHEVRON: case XP_THEME_ELEMENT_REBAR_CHEVRON:
switch (state) switch (state)
{ {
case GTK_STATE_PRELIGHT: case GTK_STATE_PRELIGHT:
@ -713,8 +713,8 @@ xp_theme_draw (GdkWindow *win, XpThemeElement element, GtkStyle *style,
part_state = xp_theme_map_gtk_state(element, state_type); part_state = xp_theme_map_gtk_state(element, state_type);
#ifdef GNATS_HACK #ifdef GNATS_HACK
if (element == XP_THEME_ELEMENT_GRIPPER_V if (element == XP_THEME_ELEMENT_REBAR_GRIPPER_V
|| element == XP_THEME_ELEMENT_GRIPPER_H) || element == XP_THEME_ELEMENT_REBAR_GRIPPER_H)
{ {
/* Hack alert: when XP draws a gripper, it does not seem to fill /* Hack alert: when XP draws a gripper, it does not seem to fill
up the whole rectangle. It only fills the gripper line up the whole rectangle. It only fills the gripper line
@ -768,7 +768,8 @@ xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf)
if (!theme) if (!theme)
return FALSE; return FALSE;
switch (fontId){ switch (fontId)
{
case XP_THEME_FONT_CAPTION: case XP_THEME_FONT_CAPTION:
themeFont = TMT_CAPTIONFONT; break; themeFont = TMT_CAPTIONFONT; break;
case XP_THEME_FONT_MENU: case XP_THEME_FONT_MENU:
@ -785,7 +786,8 @@ xp_theme_get_system_font (XpThemeClass klazz, XpThemeFont fontId, LOGFONT *lf)
return FALSE; return FALSE;
} }
gboolean xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor) gboolean
xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pColor)
{ {
if (get_theme_sys_color_func != NULL) if (get_theme_sys_color_func != NULL)
{ {
@ -798,7 +800,8 @@ gboolean xp_theme_get_system_color (XpThemeClass klazz, int colorId, DWORD * pCo
return FALSE; return FALSE;
} }
gboolean xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal) gboolean
xp_theme_get_system_metric (XpThemeClass klazz, int metricId, int * pVal)
{ {
if (get_theme_sys_metric_func != NULL) if (get_theme_sys_metric_func != NULL)
{ {

View File

@ -62,8 +62,8 @@ typedef enum
XP_THEME_ELEMENT_ARROW_DOWN, XP_THEME_ELEMENT_ARROW_DOWN,
XP_THEME_ELEMENT_ARROW_LEFT, XP_THEME_ELEMENT_ARROW_LEFT,
XP_THEME_ELEMENT_ARROW_RIGHT, XP_THEME_ELEMENT_ARROW_RIGHT,
XP_THEME_ELEMENT_GRIP_H, XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_H,
XP_THEME_ELEMENT_GRIP_V, XP_THEME_ELEMENT_SCROLLBAR_GRIPPER_V,
XP_THEME_ELEMENT_TROUGH_H, XP_THEME_ELEMENT_TROUGH_H,
XP_THEME_ELEMENT_TROUGH_V, XP_THEME_ELEMENT_TROUGH_V,
XP_THEME_ELEMENT_EDIT_TEXT, XP_THEME_ELEMENT_EDIT_TEXT,
@ -80,9 +80,9 @@ typedef enum
XP_THEME_ELEMENT_PROGRESS_TROUGH_V, XP_THEME_ELEMENT_PROGRESS_TROUGH_V,
XP_THEME_ELEMENT_TOOLTIP, XP_THEME_ELEMENT_TOOLTIP,
XP_THEME_ELEMENT_REBAR, XP_THEME_ELEMENT_REBAR,
XP_THEME_ELEMENT_GRIPPER_H, XP_THEME_ELEMENT_REBAR_GRIPPER_H,
XP_THEME_ELEMENT_GRIPPER_V, XP_THEME_ELEMENT_REBAR_GRIPPER_V,
XP_THEME_ELEMENT_CHEVRON, XP_THEME_ELEMENT_REBAR_CHEVRON,
XP_THEME_ELEMENT_TOOLBAR, XP_THEME_ELEMENT_TOOLBAR,
XP_THEME_ELEMENT_MENUITEM, XP_THEME_ELEMENT_MENUITEM,
XP_THEME_ELEMENT_MENU_SEPARATOR, XP_THEME_ELEMENT_MENU_SEPARATOR,