Patch : 2.1 nopatch (linux)

Files :

Aggiunto il simbolo wxGTK per Linux


git-svn-id: svn://10.65.10.50/trunk@12157 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2004-06-07 09:06:14 +00:00
parent dbc82a780d
commit 4b78c47bc4
8 changed files with 38 additions and 52 deletions

View File

@ -12,11 +12,11 @@
#include "xi.h"
#include "xiutils.h"
#if XIWS != XIWS_MAC && XIWS != XIWS_XM
#if XIWS != XIWS_MAC && XIWS != XIWS_XM && XIWS != XIWS_WXGTK
#include <io.h>
#endif
#if XIWS == XIWS_XM
#if XIWS == XIWS_XM || XIWS == XIWS_WXGTK
#include <unistd.h>
#endif

View File

@ -10,11 +10,7 @@
#ifndef INCL_XIL
#define INCL_XIL
#if (XVT_CC == XVT_CC_CURL)
#include "xires.h"
#else
#include "xi.h"
#endif
#include "xvtcm.h"

View File

@ -1033,7 +1033,7 @@ do_scroll_bar( XI_LIST_DATA * listdata )
{
int percent1 = 0;
int percent2 = 100;
int prop;
int prop = 100;
if ( lmp->nbr_realized_rows > 1 )
{
@ -1041,8 +1041,17 @@ do_scroll_bar( XI_LIST_DATA * listdata )
0, NULL, &percent1, 0 );
do_lm_cb( listdata->lm, LM_CB_GET_PERCENT, lmp->last_fully_vis,
0, NULL, &percent2, 0 );
prop = min(100, max( 1, ( percent2 - percent1 ) ) );
#if XIWS == XIWS_WXGTK
const int act_pos = XinScrollBarPositionGet( listdata->sb_win, XinScrollBarTypeEither );
if (act_pos >= percent1 && act_pos <= percent2)
percent1 = -1;
#endif
}
prop = min( 100, max( 1, ( percent2 - percent1 ) ) );
#if XIWS != XIWS_WXGTK
else
prop = min(100, max( 1, ( percent2 - percent1 ) ) );
#endif
XinScrollBarSet( listdata->sb_win, XinScrollBarTypeEither, 0,
100, prop, percent1 );
}

View File

@ -1699,7 +1699,7 @@ TO OPTIMIZE BACKGROUND DRAWING, USE NEXT TWO LINES
lm_adj_v( lmp, row_rect.bottom );
rct.top = row_rect.top;
rct.bottom = row_rect.bottom;
#if XIWS == XIWS_MAC || XIWS == XIWS_XM
#if XIWS == XIWS_MAC || XIWS == XIWS_XM || XIWS == XIWS_WXGTK
if ( cell_data->xi_text )
xi_text_rect_get_adjusted( cell_data->xi_text, &rct );
#endif

View File

@ -28,7 +28,7 @@
#include <direct.h>
#endif
#if XIWS == XIWS_WM || XIWS == XIWS_XM
#if XIWS == XIWS_WM || XIWS == XIWS_XM || XIWS == XIWS_WXGTK
#define COALESCE_UPDATES
#endif
@ -1508,7 +1508,7 @@ XinWindowBrushSet( XinWindow win, XinBrush * brush )
xi_draw_rect( win, &rct );
}
#endif
#if XIWS == XIWS_XM
#if XIWS == XIWS_XM || XIWS == XIWS_WXGTK
if ( brush->fore_color == XI_COLOR_LTGRAY )
{
/* X GRAY SCALE HACK */
@ -1660,13 +1660,7 @@ non-xvt versions do not need to support this function
void
XinWindowCheckRadioButton( XinWindow Win, XinWindow * Wins, int NbrWindows )
{
/*
#if XIWS != XIWS_XM
*/
xvt_ctl_check_radio_button( ( WINDOW ) Win, ( WINDOW * ) Wins, NbrWindows );
/*
#endif
*/
}
/*START*/
@ -2063,7 +2057,7 @@ XinXvtEventHandler( WINDOW win, EVENT * ep )
}
/* Modal behavior */
#if XIWS == XIWS_MAC || XIWS == XIWS_XM || XIWS == XIWS_PM || XIWS == XIWS_WM
#if XIWS == XIWS_MAC || XIWS == XIWS_XM || XIWS == XIWS_PM || XIWS == XIWS_WM || XIWS == XIWS_WXGTK
#if XIWS == XIWS_MAC
if ( xin_modal_win == ( XinWindow ) win
&& ep->type == E_FOCUS && !ep->v.active )
@ -2242,7 +2236,7 @@ XinWindowCreate( XinWindowDef * Def )
Def->title, Def->menu_bar_rid == 0 ? NULL_MENU_RID
: Def->menu_bar_rid, parent, flags, EM_ALL,
( EVENT_HANDLER ) XinXvtEventHandler, Def->app_data );
#if XIWS != XIWS_XM
#if XIWS != XIWS_XM && XIWS != XIWS_WXGTK
#if XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50
if ( Def->mode != XinModalWait && win != XI_NULL_WINDOW &&
xvt_vobj_is_valid( ( WINDOW ) win ) )
@ -2864,7 +2858,7 @@ XinWindowIconDraw( XinWindow Win, int x, int y, int IconRid,
NOREF( fore_color );
NOREF( back_color );
#else
#if XIWS == XIWS_XM || XIWS == XIWS_MAC
#if XIWS == XIWS_XM || XIWS == XIWS_MAC || XIWS == XIWS_WXGTK
if ( fore_color )
xvt_dwin_set_fore_color( ( WINDOW ) Win, fore_color );
if ( back_color )
@ -2974,7 +2968,7 @@ XinWindowLineDraw( XinWindow Win, XinPoint * pnt )
mpnt.v--;
mtp.v--;
}
#elif XIWS == XIWS_XM
#elif XIWS == XIWS_XM || XIWS == XIWS_WXGTK
if ( mtp.v > mpnt.v )
{
mpnt.h--;
@ -2989,7 +2983,7 @@ XinWindowLineDraw( XinWindow Win, XinPoint * pnt )
}
else
{
#if XIWS == XIWS_MAC || XIWS == XIWS_XM || XIWS == XIWS_PM
#if XIWS == XIWS_MAC || XIWS == XIWS_XM || XIWS == XIWS_PM || XIWS == XIWS_WXGTK
if ( mtp.v == mpnt.v )
--mpnt.h;
if ( mtp.h == mpnt.h )
@ -3951,7 +3945,7 @@ convert_to_SCROLL_TYPE( XinScrollBarType type )
{
switch ( type )
{
case XinScrollBarTypeHorizontal:
case XinScrollBarTypeHorizontal:
return HSCROLL;
case XinScrollBarTypeVertical:
return VSCROLL;
@ -3961,7 +3955,6 @@ case XinScrollBarTypeHorizontal:
return HSCROLL;
}
/*START*/
/*
this function gets the current position of the scroll bar specified by
the argument 'Win'.
@ -3969,9 +3962,7 @@ the argument 'Win'.
int
XinScrollBarPositionGet( XinWindow Win, XinScrollBarType Type )
{
/*END*/
return xvt_sbar_get_pos( ( WINDOW ) Win, convert_to_SCROLL_TYPE( Type ) );
/*START*/
return xvt_sbar_get_pos( ( WINDOW ) Win, convert_to_SCROLL_TYPE( Type ) );
}
/*
@ -3981,11 +3972,9 @@ the argument 'Win'.
void
XinScrollBarPositionSet( XinWindow Win, XinScrollBarType Type, int Top )
{
/*END*/
if ( app_terminating )
return;
xvt_sbar_set_pos( ( WINDOW ) Win, convert_to_SCROLL_TYPE( Type ), Top );
/*START*/
}
/*
@ -3994,9 +3983,7 @@ this function gets the current proportion for a scrollbar
int
XinScrollBarProportionGet( XinWindow Win, XinScrollBarType Type )
{
/*END*/
return xvt_sbar_get_proportion( ( WINDOW ) Win, convert_to_SCROLL_TYPE( Type ) );
/*START*/
return xvt_sbar_get_proportion( ( WINDOW ) Win, convert_to_SCROLL_TYPE( Type ) );
}
/*
@ -4005,11 +3992,9 @@ this function gets the current range for a scrollbar
void
XinScrollBarRangeGet( XinWindow Win, XinScrollBarType Type, int *Rng1, int *Rng2 )
{
/*END*/
if ( app_terminating )
return;
xvt_sbar_get_range( ( WINDOW ) Win, convert_to_SCROLL_TYPE( Type ), Rng1, Rng2 );
/*START*/
}
/*
@ -4020,7 +4005,6 @@ void
XinScrollBarSet( XinWindow Win, XinScrollBarType Type, int min_val, int max_val,
int proportion, int pos )
{
/*END*/
WINDOW xvt_win = ( WINDOW ) Win;
SCROLL_TYPE scroll_type = convert_to_SCROLL_TYPE( Type );
@ -4034,9 +4018,12 @@ XinScrollBarSet( XinWindow Win, XinScrollBarType Type, int min_val, int max_val,
if ( pos == ( max_val - proportion ) )
pos = max_val - proportion - 1;
#endif
xvt_sbar_set_range( xvt_win, scroll_type, min_val, max_val );
xvt_sbar_set_range( xvt_win, scroll_type, min_val, max_val );
xvt_sbar_set_proportion( xvt_win, scroll_type, proportion );
xvt_sbar_set_pos( xvt_win, scroll_type, pos );
#if XIWS == XIWS_WXGTK
if (pos >= 0)
#endif
xvt_sbar_set_pos( xvt_win, scroll_type, pos );
#if XIWS == XIWS_XM
{
WINDOW focus_win = xvt_scr_get_focus_vobj();
@ -4045,7 +4032,6 @@ XinScrollBarSet( XinWindow Win, XinScrollBarType Type, int min_val, int max_val,
}
}
#endif
/*START*/
}
/*
@ -5450,11 +5436,7 @@ BOOLEAN
XinDirectoryCurrentGet( XinDirectory * dir )
{
/*END*/
#if XIWS == XIWS_MAC
return ( xvt_fsys_get_dir( ( DIRECTORY * ) dir ) );
#else
return ( getcwd( ( char * ) dir, sizeof( XinDirectory ) ) != NULL );
#endif
/*START*/
}
@ -5465,11 +5447,7 @@ BOOLEAN
XinDirectoryCurrentSet( XinDirectory * dir )
{
/*END*/
#if XIWS == XIWS_MAC
return ( xvt_fsys_set_dir( ( DIRECTORY * ) dir ) );
#else
return ( chdir( ( char * ) dir ) == 0 );
#endif
/*START*/
}

View File

@ -12,11 +12,16 @@
#define XIWS_MAC 103
#define XIWS_PM 104
#define XIWS_WM 105
#define XIWS_WXGTK 106
#if !defined(XI_USE_XVT) && !defined(XI_USE_XM) && !defined(XI_USE_WIN)
#define XI_USE_XVT
#endif
#ifdef LINUX
#define XVTWS WXGTKWS
#endif
#ifdef XI_USE_XVT
#include "xvt_env.h"
@ -33,10 +38,6 @@
#define XIWS_WM WMWS
#endif
#ifdef LINUX
#define XVTWS XOLWS
#endif
#if XVTWS == MACWS
#define XIWS XIWS_MAC
#elif XVTWS == PMWS
@ -47,6 +48,8 @@
#define XIWS XIWS_WM
#elif XVTWS == MTFWS || XVTWS == XOLWS
#define XIWS XIWS_XM
#elif XVTWS == WXGTKWS
#define XIWS XIWS_WXGTK
#endif
#endif

View File

@ -809,7 +809,7 @@ stx_event( STX stx, XinEvent * ep )
attrib = stxp->attrib & ( XI_ATR_ENABLED | XI_ATR_VISIBLE );
r = stxp->edit_rect;
#if XIWS == XIWS_MAC || XIWS == XIWS_XM
#if XIWS == XIWS_MAC || XIWS == XIWS_XM || XIWS == XIWS_WXGTK
if ( stxp->xi_text )
xi_text_rect_get_adjusted( stxp->xi_text, &r );
#endif

View File

@ -206,7 +206,7 @@ static long xi_preferences[XI_NBR_PREFERENCES] =
* put one. This means you have to put a comma after the old last entry when
* you add a new one. */
#elif XIWS == XIWS_XM
#elif XIWS == XIWS_XM || XIWS == XIWS_WXGTK
2, /* XI_PREF_COLUMN_OFFSET */
0, /* XI_PREF_SB_OFFSET */
16, /* XI_PREF_SB_WIDTH */