Patch level : 10.0

Files correlati     : xi.dll
Ricompilazione Demo : [ ]
Commento            :
Supporto per sfondo trasparente dei controlli nativi


git-svn-id: svn://10.65.10.50/trunk@17380 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-10-08 08:48:00 +00:00
parent fd7dd6bc96
commit b995405b2c

View File

@ -2159,7 +2159,7 @@ XinWindowCreate( XinWindowDef * Def )
( Def->maximized ? WSF_MAXIMIZED : 0 ) | ( Def->maximized ? WSF_MAXIMIZED : 0 ) |
( Def->iconizable ? WSF_ICONIZABLE : 0 ) | ( Def->iconizable ? WSF_ICONIZABLE : 0 ) |
( Def->iconized ? WSF_ICONIZED : 0 ); ( Def->iconized ? WSF_ICONIZED : 0 );
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
if ( Def->mode == XinModalWait ) if ( Def->mode == XinModalWait )
{ {
win_type = W_MODAL; win_type = W_MODAL;
@ -2201,7 +2201,7 @@ XinWindowCreate( XinWindowDef * Def )
case XinModalWait: case XinModalWait:
/* This is too clever. If we are in DSC45, then XinModalWait falls through /* This is too clever. If we are in DSC45, then XinModalWait falls through
to the XinModalReturn case. */ to the XinModalReturn case. */
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR < 50 #if XVT_CHECK_VERSION(4, 50, 0)
return XI_NULL_WINDOW; return XI_NULL_WINDOW;
#endif #endif
xin_finish_create_def = Def; xin_finish_create_def = Def;
@ -2237,7 +2237,7 @@ XinWindowCreate( XinWindowDef * Def )
: Def->menu_bar_rid, parent, flags, EM_ALL, : Def->menu_bar_rid, parent, flags, EM_ALL,
( EVENT_HANDLER ) XinXvtEventHandler, Def->app_data ); ( EVENT_HANDLER ) XinXvtEventHandler, Def->app_data );
#if XIWS != XIWS_XM && XIWS != XIWS_WXGTK #if XIWS != XIWS_XM && XIWS != XIWS_WXGTK
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
if ( Def->mode != XinModalWait && win != XI_NULL_WINDOW && if ( Def->mode != XinModalWait && win != XI_NULL_WINDOW &&
xvt_vobj_is_valid( ( WINDOW ) win ) ) xvt_vobj_is_valid( ( WINDOW ) win ) )
XinWindowFocusSet( win ); XinWindowFocusSet( win );
@ -2248,7 +2248,7 @@ XinWindowCreate( XinWindowDef * Def )
xvt_vobj_set_attr( NULL_WIN, ATTR_WIN_PM_CLASS_ICON, old_icon_rid ); xvt_vobj_set_attr( NULL_WIN, ATTR_WIN_PM_CLASS_ICON, old_icon_rid );
#endif #endif
assert4( win, "", 20090, "create_window returned NULL" ); assert4( win, "", 20090, "create_window returned NULL" );
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
if ( xvt_vobj_is_valid( ( WINDOW ) win ) ) if ( xvt_vobj_is_valid( ( WINDOW ) win ) )
{ /* We check because the window may have closed during its initial actions. */ { /* We check because the window may have closed during its initial actions. */
#endif #endif
@ -2304,7 +2304,7 @@ XinWindowCreate( XinWindowDef * Def )
default: default:
break; break;
} }
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
} }
#endif #endif
return win; return win;
@ -2316,7 +2316,7 @@ XinWindowCreate( XinWindowDef * Def )
{ {
WIN_DEF ctl_def; WIN_DEF ctl_def;
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
XVT_COLOR_COMPONENT colors[8]; XVT_COLOR_COMPONENT colors[8];
#endif #endif
@ -2350,7 +2350,7 @@ XinWindowCreate( XinWindowDef * Def )
ctl_def.text = Def->title; ctl_def.text = Def->title;
ctl_def.v.ctl.ctrl_id = Def->control_id; ctl_def.v.ctl.ctrl_id = Def->control_id;
ctl_def.v.ctl.flags = flags; ctl_def.v.ctl.flags = flags;
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
if ( Def->back_color ) if ( Def->back_color )
{ {
colors[0].type = XVT_COLOR_BLEND; colors[0].type = XVT_COLOR_BLEND;
@ -4277,19 +4277,9 @@ XinMetricGet( XinMetricType type )
case XinMetricSizableFrameWidth: case XinMetricSizableFrameWidth:
return xvt_vobj_get_attr( NULL_WIN, ATTR_DOCFRAME_WIDTH ); return xvt_vobj_get_attr( NULL_WIN, ATTR_DOCFRAME_WIDTH );
case XinMetricDoubleFrameHeight: case XinMetricDoubleFrameHeight:
#if XIWS == XIWS_WIN && XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50
/* DRE 10/3/96 The +1 is because XVT mis-reports the widths. */
return xvt_vobj_get_attr( NULL_WIN, ATTR_DBLFRAME_HEIGHT ) + 1;
#else
return xvt_vobj_get_attr( NULL_WIN, ATTR_DBLFRAME_HEIGHT ); return xvt_vobj_get_attr( NULL_WIN, ATTR_DBLFRAME_HEIGHT );
#endif
case XinMetricDoubleFrameWidth: case XinMetricDoubleFrameWidth:
#if XIWS == XIWS_WIN && XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50
/* DRE 10/3/96 The +1 is because XVT mis-reports the widths. */
return xvt_vobj_get_attr( NULL_WIN, ATTR_DBLFRAME_WIDTH ) + 1;
#else
return xvt_vobj_get_attr( NULL_WIN, ATTR_DBLFRAME_WIDTH ); return xvt_vobj_get_attr( NULL_WIN, ATTR_DBLFRAME_WIDTH );
#endif
case XinMetricFrameHeight: case XinMetricFrameHeight:
return xvt_vobj_get_attr( NULL_WIN, ATTR_FRAME_HEIGHT ); return xvt_vobj_get_attr( NULL_WIN, ATTR_FRAME_HEIGHT );
case XinMetricFrameWidth: case XinMetricFrameWidth:
@ -5721,7 +5711,7 @@ case WM_SYSKEYDOWN:
( *ehlt->event_handler ) ( ( XinWindow ) ehlt->win, &event ); ( *ehlt->event_handler ) ( ( XinWindow ) ehlt->win, &event );
cur_xvt_event = old_cur_event; cur_xvt_event = old_cur_event;
} }
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
return !event.v.character.consumed; return !event.v.character.consumed;
#else #else
return event.v.character.consumed; return event.v.character.consumed;
@ -5731,7 +5721,7 @@ case WM_SYSKEYDOWN:
break; break;
} }
} }
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50 #if XVT_CHECK_VERSION(4, 50, 0)
return TRUE; return TRUE;
#else #else
return FALSE; return FALSE;