'static not in the beginning of the decl' warnings fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-09-18 16:32:53 +00:00
parent 077968ca5e
commit 7d5af6fa6b
2 changed files with 518 additions and 518 deletions

View File

@@ -124,9 +124,9 @@ wxWindowDC::wxWindowDC( wxWindow *window )
if (!m_window) if (!m_window)
{ {
/* don't report problems */ /* don't report problems */
m_ok = TRUE; m_ok = TRUE;
return; return;
} }
if (window->m_wxwindow) if (window->m_wxwindow)
@@ -189,10 +189,10 @@ void wxWindowDC::DoCrossHair( long x, long y )
long xx = XLOG2DEV(x); long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y); long yy = YLOG2DEV(y);
if (m_window) if (m_window)
{ {
gdk_draw_line( m_window, m_penGC, 0, yy, XLOG2DEVREL(w), yy ); gdk_draw_line( m_window, m_penGC, 0, yy, XLOG2DEVREL(w), yy );
gdk_draw_line( m_window, m_penGC, xx, 0, xx, YLOG2DEVREL(h) ); gdk_draw_line( m_window, m_penGC, xx, 0, xx, YLOG2DEVREL(h) );
} }
} }
} }
@@ -305,7 +305,7 @@ void wxWindowDC::DoDrawLines( int n, wxPoint points[], long xoffset, long yoffse
long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste
long y2 = YLOG2DEV(points[i+1].y + yoffset); long y2 = YLOG2DEV(points[i+1].y + yoffset);
if (m_window) if (m_window)
gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 );
CalcBoundingBox( points[i+1].x + xoffset, points[i+1].y + yoffset ); CalcBoundingBox( points[i+1].x + xoffset, points[i+1].y + yoffset );
@@ -441,7 +441,7 @@ void wxWindowDC::DoDrawRoundedRectangle( long x, long y, long width, long height
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 );
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 );
gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 );
} }
} }
// this ignores the radius // this ignores the radius
@@ -880,10 +880,10 @@ void wxWindowDC::SetPen( const wxPen &pen )
width = (int)w; width = (int)w;
} }
const static char dotted[] = {1, 1}; static const char dotted[] = {1, 1};
const static char short_dashed[] = {2, 2}; static const char short_dashed[] = {2, 2};
const static char long_dashed[] = {2, 4}; static const char long_dashed[] = {2, 4};
const static char dotted_dashed[] = {3, 3, 1, 3}; static const char dotted_dashed[] = {3, 3, 1, 3};
// We express dash pattern in pen width unit, so we are // We express dash pattern in pen width unit, so we are
// independent of zoom factor and so on... // independent of zoom factor and so on...
@@ -894,52 +894,52 @@ void wxWindowDC::SetPen( const wxPen &pen )
switch (m_pen.GetStyle()) switch (m_pen.GetStyle())
{ {
case wxUSER_DASH: case wxUSER_DASH:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = m_pen.GetDashCount(); req_nb_dash = m_pen.GetDashCount();
req_dash = m_pen.GetDash(); req_dash = m_pen.GetDash();
break; break;
} }
case wxDOT: case wxDOT:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 2; req_nb_dash = 2;
req_dash = dotted; req_dash = dotted;
break; break;
} }
case wxLONG_DASH: case wxLONG_DASH:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 2; req_nb_dash = 2;
req_dash = long_dashed; req_dash = long_dashed;
break; break;
} }
case wxSHORT_DASH: case wxSHORT_DASH:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 2; req_nb_dash = 2;
req_dash = short_dashed; req_dash = short_dashed;
break; break;
} }
case wxDOT_DASH: case wxDOT_DASH:
{ {
// lineStyle = GDK_LINE_DOUBLE_DASH; // lineStyle = GDK_LINE_DOUBLE_DASH;
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 4; req_nb_dash = 4;
req_dash = dotted_dashed; req_dash = dotted_dashed;
break; break;
} }
case wxTRANSPARENT: case wxTRANSPARENT:
case wxSTIPPLE: case wxSTIPPLE:
case wxSOLID: case wxSOLID:
default: default:
{ {
lineStyle = GDK_LINE_SOLID; lineStyle = GDK_LINE_SOLID;
req_dash = (wxDash*)NULL; req_dash = (wxDash*)NULL;
req_nb_dash = 0; req_nb_dash = 0;
break; break;
} }
} }
#if (GTK_MINOR_VERSION > 0) #if (GTK_MINOR_VERSION > 0)
@@ -950,13 +950,13 @@ void wxWindowDC::SetPen( const wxPen &pen )
{ {
for (int i = 0; i < req_nb_dash; i++) for (int i = 0; i < req_nb_dash; i++)
real_req_dash[i] = req_dash[i] * width; real_req_dash[i] = req_dash[i] * width;
gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash ); gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
delete[] real_req_dash; delete[] real_req_dash;
} }
else else
{ {
// No Memory. We use non-scaled dash pattern... // No Memory. We use non-scaled dash pattern...
gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash ); gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
} }
} }
#endif #endif
@@ -1003,15 +1003,15 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok())) if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok()))
{ {
if (m_brush.GetStipple()->GetPixmap()) if (m_brush.GetStipple()->GetPixmap())
{ {
gdk_gc_set_fill( m_brushGC, GDK_TILED ); gdk_gc_set_fill( m_brushGC, GDK_TILED );
gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() ); gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() );
} }
else else
{ {
gdk_gc_set_fill( m_brushGC, GDK_STIPPLED ); gdk_gc_set_fill( m_brushGC, GDK_STIPPLED );
gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() ); gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() );
} }
} }
if (IS_HATCH(m_brush.GetStyle())) if (IS_HATCH(m_brush.GetStyle()))
@@ -1048,15 +1048,15 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok())) if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok()))
{ {
if (m_backgroundBrush.GetStipple()->GetPixmap()) if (m_backgroundBrush.GetStipple()->GetPixmap())
{ {
gdk_gc_set_fill( m_bgGC, GDK_TILED ); gdk_gc_set_fill( m_bgGC, GDK_TILED );
gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() ); gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() );
} }
else else
{ {
gdk_gc_set_fill( m_bgGC, GDK_STIPPLED ); gdk_gc_set_fill( m_bgGC, GDK_STIPPLED );
gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() ); gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() );
} }
} }
if (IS_HATCH(m_backgroundBrush.GetStyle())) if (IS_HATCH(m_backgroundBrush.GetStyle()))
@@ -1084,22 +1084,22 @@ void wxWindowDC::SetLogicalFunction( int function )
case wxCLEAR: mode = GDK_CLEAR; break; case wxCLEAR: mode = GDK_CLEAR; break;
case wxSET: mode = GDK_SET; break; case wxSET: mode = GDK_SET; break;
case wxOR_INVERT: mode = GDK_OR_INVERT; break; case wxOR_INVERT: mode = GDK_OR_INVERT; break;
case wxSRC_AND: case wxSRC_AND:
case wxAND: mode = GDK_AND; break; case wxAND: mode = GDK_AND; break;
case wxSRC_OR: case wxSRC_OR:
case wxOR: mode = GDK_OR; break; case wxOR: mode = GDK_OR; break;
case wxEQUIV: mode = GDK_EQUIV; break; case wxEQUIV: mode = GDK_EQUIV; break;
case wxNAND: mode = GDK_NAND; break; case wxNAND: mode = GDK_NAND; break;
case wxAND_INVERT: mode = GDK_AND_INVERT; break; case wxAND_INVERT: mode = GDK_AND_INVERT; break;
case wxCOPY: mode = GDK_COPY; break; case wxCOPY: mode = GDK_COPY; break;
case wxNO_OP: mode = GDK_NOOP; break; case wxNO_OP: mode = GDK_NOOP; break;
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break; case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
#endif #endif
default: default:
{ {
wxFAIL_MSG( _T("unsupported logical function") ); wxFAIL_MSG( _T("unsupported logical function") );
break; break;
} }
} }
m_logicalFunction = function; m_logicalFunction = function;

View File

@@ -124,9 +124,9 @@ wxWindowDC::wxWindowDC( wxWindow *window )
if (!m_window) if (!m_window)
{ {
/* don't report problems */ /* don't report problems */
m_ok = TRUE; m_ok = TRUE;
return; return;
} }
if (window->m_wxwindow) if (window->m_wxwindow)
@@ -189,10 +189,10 @@ void wxWindowDC::DoCrossHair( long x, long y )
long xx = XLOG2DEV(x); long xx = XLOG2DEV(x);
long yy = YLOG2DEV(y); long yy = YLOG2DEV(y);
if (m_window) if (m_window)
{ {
gdk_draw_line( m_window, m_penGC, 0, yy, XLOG2DEVREL(w), yy ); gdk_draw_line( m_window, m_penGC, 0, yy, XLOG2DEVREL(w), yy );
gdk_draw_line( m_window, m_penGC, xx, 0, xx, YLOG2DEVREL(h) ); gdk_draw_line( m_window, m_penGC, xx, 0, xx, YLOG2DEVREL(h) );
} }
} }
} }
@@ -305,7 +305,7 @@ void wxWindowDC::DoDrawLines( int n, wxPoint points[], long xoffset, long yoffse
long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste
long y2 = YLOG2DEV(points[i+1].y + yoffset); long y2 = YLOG2DEV(points[i+1].y + yoffset);
if (m_window) if (m_window)
gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 ); gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 );
CalcBoundingBox( points[i+1].x + xoffset, points[i+1].y + yoffset ); CalcBoundingBox( points[i+1].x + xoffset, points[i+1].y + yoffset );
@@ -441,7 +441,7 @@ void wxWindowDC::DoDrawRoundedRectangle( long x, long y, long width, long height
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 );
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 );
gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 );
} }
} }
// this ignores the radius // this ignores the radius
@@ -880,10 +880,10 @@ void wxWindowDC::SetPen( const wxPen &pen )
width = (int)w; width = (int)w;
} }
const static char dotted[] = {1, 1}; static const char dotted[] = {1, 1};
const static char short_dashed[] = {2, 2}; static const char short_dashed[] = {2, 2};
const static char long_dashed[] = {2, 4}; static const char long_dashed[] = {2, 4};
const static char dotted_dashed[] = {3, 3, 1, 3}; static const char dotted_dashed[] = {3, 3, 1, 3};
// We express dash pattern in pen width unit, so we are // We express dash pattern in pen width unit, so we are
// independent of zoom factor and so on... // independent of zoom factor and so on...
@@ -894,52 +894,52 @@ void wxWindowDC::SetPen( const wxPen &pen )
switch (m_pen.GetStyle()) switch (m_pen.GetStyle())
{ {
case wxUSER_DASH: case wxUSER_DASH:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = m_pen.GetDashCount(); req_nb_dash = m_pen.GetDashCount();
req_dash = m_pen.GetDash(); req_dash = m_pen.GetDash();
break; break;
} }
case wxDOT: case wxDOT:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 2; req_nb_dash = 2;
req_dash = dotted; req_dash = dotted;
break; break;
} }
case wxLONG_DASH: case wxLONG_DASH:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 2; req_nb_dash = 2;
req_dash = long_dashed; req_dash = long_dashed;
break; break;
} }
case wxSHORT_DASH: case wxSHORT_DASH:
{ {
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 2; req_nb_dash = 2;
req_dash = short_dashed; req_dash = short_dashed;
break; break;
} }
case wxDOT_DASH: case wxDOT_DASH:
{ {
// lineStyle = GDK_LINE_DOUBLE_DASH; // lineStyle = GDK_LINE_DOUBLE_DASH;
lineStyle = GDK_LINE_ON_OFF_DASH; lineStyle = GDK_LINE_ON_OFF_DASH;
req_nb_dash = 4; req_nb_dash = 4;
req_dash = dotted_dashed; req_dash = dotted_dashed;
break; break;
} }
case wxTRANSPARENT: case wxTRANSPARENT:
case wxSTIPPLE: case wxSTIPPLE:
case wxSOLID: case wxSOLID:
default: default:
{ {
lineStyle = GDK_LINE_SOLID; lineStyle = GDK_LINE_SOLID;
req_dash = (wxDash*)NULL; req_dash = (wxDash*)NULL;
req_nb_dash = 0; req_nb_dash = 0;
break; break;
} }
} }
#if (GTK_MINOR_VERSION > 0) #if (GTK_MINOR_VERSION > 0)
@@ -950,13 +950,13 @@ void wxWindowDC::SetPen( const wxPen &pen )
{ {
for (int i = 0; i < req_nb_dash; i++) for (int i = 0; i < req_nb_dash; i++)
real_req_dash[i] = req_dash[i] * width; real_req_dash[i] = req_dash[i] * width;
gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash ); gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
delete[] real_req_dash; delete[] real_req_dash;
} }
else else
{ {
// No Memory. We use non-scaled dash pattern... // No Memory. We use non-scaled dash pattern...
gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash ); gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
} }
} }
#endif #endif
@@ -1003,15 +1003,15 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok())) if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok()))
{ {
if (m_brush.GetStipple()->GetPixmap()) if (m_brush.GetStipple()->GetPixmap())
{ {
gdk_gc_set_fill( m_brushGC, GDK_TILED ); gdk_gc_set_fill( m_brushGC, GDK_TILED );
gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() ); gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() );
} }
else else
{ {
gdk_gc_set_fill( m_brushGC, GDK_STIPPLED ); gdk_gc_set_fill( m_brushGC, GDK_STIPPLED );
gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() ); gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() );
} }
} }
if (IS_HATCH(m_brush.GetStyle())) if (IS_HATCH(m_brush.GetStyle()))
@@ -1048,15 +1048,15 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok())) if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok()))
{ {
if (m_backgroundBrush.GetStipple()->GetPixmap()) if (m_backgroundBrush.GetStipple()->GetPixmap())
{ {
gdk_gc_set_fill( m_bgGC, GDK_TILED ); gdk_gc_set_fill( m_bgGC, GDK_TILED );
gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() ); gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() );
} }
else else
{ {
gdk_gc_set_fill( m_bgGC, GDK_STIPPLED ); gdk_gc_set_fill( m_bgGC, GDK_STIPPLED );
gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() ); gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() );
} }
} }
if (IS_HATCH(m_backgroundBrush.GetStyle())) if (IS_HATCH(m_backgroundBrush.GetStyle()))
@@ -1084,22 +1084,22 @@ void wxWindowDC::SetLogicalFunction( int function )
case wxCLEAR: mode = GDK_CLEAR; break; case wxCLEAR: mode = GDK_CLEAR; break;
case wxSET: mode = GDK_SET; break; case wxSET: mode = GDK_SET; break;
case wxOR_INVERT: mode = GDK_OR_INVERT; break; case wxOR_INVERT: mode = GDK_OR_INVERT; break;
case wxSRC_AND: case wxSRC_AND:
case wxAND: mode = GDK_AND; break; case wxAND: mode = GDK_AND; break;
case wxSRC_OR: case wxSRC_OR:
case wxOR: mode = GDK_OR; break; case wxOR: mode = GDK_OR; break;
case wxEQUIV: mode = GDK_EQUIV; break; case wxEQUIV: mode = GDK_EQUIV; break;
case wxNAND: mode = GDK_NAND; break; case wxNAND: mode = GDK_NAND; break;
case wxAND_INVERT: mode = GDK_AND_INVERT; break; case wxAND_INVERT: mode = GDK_AND_INVERT; break;
case wxCOPY: mode = GDK_COPY; break; case wxCOPY: mode = GDK_COPY; break;
case wxNO_OP: mode = GDK_NOOP; break; case wxNO_OP: mode = GDK_NOOP; break;
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break; case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
#endif #endif
default: default:
{ {
wxFAIL_MSG( _T("unsupported logical function") ); wxFAIL_MSG( _T("unsupported logical function") );
break; break;
} }
} }
m_logicalFunction = function; m_logicalFunction = function;