Solaris compilation patches
dbtest now works a little git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
#endif
|
||||
#include "unistd.h"
|
||||
|
||||
#ifdef __SUN__
|
||||
// add more here if you run into problems
|
||||
#if defined(__SUN__) && !defined(__SunOs_5_6) && !defined(__SunOs_5_7)
|
||||
extern "C"
|
||||
{
|
||||
void usleep(unsigned long usec);
|
||||
|
@@ -329,7 +329,7 @@ bool wxScreenDC::StartDrawingOnTop( wxRect *rect )
|
||||
|
||||
if (sm_overlayWindow) gdk_window_show( sm_overlayWindow );
|
||||
|
||||
return (sm_overlayWindow);
|
||||
return (sm_overlayWindow != NULL);
|
||||
}
|
||||
|
||||
bool wxScreenDC::EndDrawingOnTop(void)
|
||||
|
@@ -108,8 +108,7 @@ wxFont::wxFont( char *xFontName )
|
||||
M_FONTDATA->m_font = gdk_font_load( xFontName );
|
||||
}
|
||||
|
||||
wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined = FALSE,
|
||||
const wxString& face = wxEmptyString )
|
||||
wxFont::wxFont( int pointSize, int family, int style, int weight, bool underlined, const wxString& face )
|
||||
{
|
||||
m_refData = new wxFontRefData();
|
||||
|
||||
@@ -442,12 +441,14 @@ static GdkFont *wxLoadQueryNearestFont( int point_size, int family, int style, i
|
||||
int max_size = point_size + 20 * (1 + (point_size/180));
|
||||
int min_size = point_size - 20 * (1 + (point_size/180));
|
||||
|
||||
int i;
|
||||
|
||||
/* Search for smaller size (approx.) */
|
||||
for (int i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10)
|
||||
for (i=point_size-10; !font && i >= 10 && i >= min_size; i -= 10)
|
||||
font = wxLoadQueryFont(i, family, style, weight, underlined, facename );
|
||||
|
||||
/* Search for larger size (approx.) */
|
||||
for (int i=point_size+10; !font && i <= max_size; i += 10)
|
||||
for (i=point_size+10; !font && i <= max_size; i += 10)
|
||||
font = wxLoadQueryFont( i, family, style, weight, underlined, facename );
|
||||
|
||||
/* Try default family */
|
||||
|
@@ -33,13 +33,13 @@ class wxPaletteRefData: public wxObjectRefData
|
||||
|
||||
wxPaletteRefData::wxPaletteRefData()
|
||||
{
|
||||
m_colormap = (GdkColormap *) NULL;
|
||||
};
|
||||
m_colormap = (GdkColormap *) NULL;
|
||||
}
|
||||
|
||||
wxPaletteRefData::~wxPaletteRefData()
|
||||
{
|
||||
if (m_colormap) gdk_colormap_unref( m_colormap );
|
||||
};
|
||||
if (m_colormap) gdk_colormap_unref( m_colormap );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -49,71 +49,71 @@ IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject)
|
||||
|
||||
wxPalette::wxPalette()
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
wxPalette::wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue )
|
||||
{
|
||||
m_refData = new wxPaletteRefData();
|
||||
Create( n, red, green, blue );
|
||||
};
|
||||
m_refData = new wxPaletteRefData();
|
||||
Create( n, red, green, blue );
|
||||
}
|
||||
|
||||
wxPalette::wxPalette( const wxPalette& palette )
|
||||
{
|
||||
Ref( palette );
|
||||
};
|
||||
Ref( palette );
|
||||
}
|
||||
|
||||
wxPalette::~wxPalette()
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
wxPalette& wxPalette::operator = ( const wxPalette& palette )
|
||||
{
|
||||
if (*this == palette) return (*this);
|
||||
Ref( palette );
|
||||
return *this;
|
||||
};
|
||||
if (*this == palette) return (*this);
|
||||
Ref( palette );
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool wxPalette::operator == ( const wxPalette& palette )
|
||||
{
|
||||
return m_refData == palette.m_refData;
|
||||
};
|
||||
return m_refData == palette.m_refData;
|
||||
}
|
||||
|
||||
bool wxPalette::operator != ( const wxPalette& palette )
|
||||
{
|
||||
return m_refData != palette.m_refData;
|
||||
};
|
||||
return m_refData != palette.m_refData;
|
||||
}
|
||||
|
||||
bool wxPalette::Ok(void) const
|
||||
{
|
||||
return (m_refData);
|
||||
};
|
||||
return (m_refData != NULL);
|
||||
}
|
||||
|
||||
bool wxPalette::Create( int WXUNUSED(n),
|
||||
const unsigned char *WXUNUSED(red),
|
||||
const unsigned char *WXUNUSED(green),
|
||||
const unsigned char *WXUNUSED(blue) )
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG("not implemented");
|
||||
|
||||
return FALSE;
|
||||
};
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int wxPalette::GetPixel( const unsigned char WXUNUSED(red),
|
||||
const unsigned char WXUNUSED(green),
|
||||
const unsigned char WXUNUSED(blue) ) const
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
wxFAIL_MSG("not implemented");
|
||||
|
||||
return 0;
|
||||
};
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool wxPalette::GetRGB( int WXUNUSED(pixel),
|
||||
unsigned char *WXUNUSED(red),
|
||||
unsigned char *WXUNUSED(green),
|
||||
unsigned char *WXUNUSED(blue) ) const
|
||||
{
|
||||
wxFAIL_MSG("not implemented");
|
||||
|
||||
return 0;
|
||||
};
|
||||
wxFAIL_MSG("not implemented");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -163,7 +163,7 @@ wxSize wxRadioBox::LayoutItems()
|
||||
|
||||
int max_len = 0;
|
||||
wxNode *node = m_boxes.Nth( j*num_per_major );
|
||||
for (int i = 0; i< num_per_major; i++)
|
||||
for (int i1 = 0; i1< num_per_major; i1++)
|
||||
{
|
||||
GtkWidget *button = GTK_WIDGET( node->Data() );
|
||||
GtkLabel *label = GTK_LABEL( GTK_BUTTON(button)->child );
|
||||
@@ -181,7 +181,7 @@ wxSize wxRadioBox::LayoutItems()
|
||||
// we don't know the max_len before
|
||||
|
||||
node = m_boxes.Nth( j*num_per_major );
|
||||
for (int i = 0; i< num_per_major; i++)
|
||||
for (int i2 = 0; i2< num_per_major; i2++)
|
||||
{
|
||||
GtkWidget *button = GTK_WIDGET( node->Data() );
|
||||
|
||||
|
Reference in New Issue
Block a user