Applied fixes for AIX (GTK 1.0 compilation).

Removed ostream from property classes.
  Removed Lisp output from wxExpr.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-06-28 13:22:00 +00:00
parent 64be695894
commit c693edf3bc
21 changed files with 377 additions and 253 deletions

View File

@@ -69,19 +69,28 @@ static void gtk_dialog_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation
// "configure_event"
//-----------------------------------------------------------------------------
static gint gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDialog *win )
static gint
#if (GTK_MINOR_VERSON > 0)
gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDialog *win )
#else
gtk_dialog_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxDialog *win )
#endif
{
if (g_isIdle)
wxapp_install_idle_handler();
if (!win->m_hasVMT) return FALSE;
#if (GTK_MINOR_VERSON > 0)
int x = 0;
int y = 0;
gdk_window_get_root_origin( win->m_widget->window, &x, &y );
win->m_x = x;
win->m_y = y;
#else
win->m_x = event->x;
win->m_y = event->y;
#endif
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
mevent.SetEventObject( win );

View File

@@ -152,19 +152,28 @@ static void gtk_toolbar_detached_callback( GtkWidget *widget, GtkWidget *WXUNUSE
// "configure_event"
//-----------------------------------------------------------------------------
static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win )
static gint
#if (GTK_MINOR_VERSON > 0)
gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxFrame *win )
#else
gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxFrame *win )
#endif
{
if (g_isIdle)
if (g_isIdle)
wxapp_install_idle_handler();
if (!win->m_hasVMT) return FALSE;
#if (GTK_MINOR_VERSON > 0)
int x = 0;
int y = 0;
gdk_window_get_root_origin( win->m_widget->window, &x, &y );
win->m_x = x;
win->m_y = y;
#else
win->m_x = event->x;
win->m_y = event->y;
#endif
wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
mevent.SetEventObject( win );

View File

@@ -520,7 +520,7 @@ bool wxNotebook::InsertPage( int position, wxWindow* win, const wxString& text,
else
gtk_notebook_insert_page( notebook, win->m_widget, page->m_box, position );
page->m_page = GTK_NOTEBOOK_PAGE( g_list_last(notebook->children)->data );
page->m_page = (GtkNotebookPage*) g_list_last(notebook->children)->data;
gtk_signal_connect( GTK_OBJECT(win->m_widget), "size_allocate",
GTK_SIGNAL_FUNC(gtk_page_size_callback), (gpointer)win );

View File

@@ -80,8 +80,8 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
wxToolBar *tb = tool->m_owner;
/* we grey-out the tip text of disabled tool */
#if 0
#if (GTK_MINOR_VERSION == 0)
/* we grey-out the tip text of disabled tool in GTK 1.0 */
if (tool->m_enabled)
{
if (tb->m_fg->red != 0)
@@ -91,17 +91,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tb->m_fg->blue = 0;
gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg );
#if (GTK_MINOR_VERSION > 0)
GtkStyle *g_style =
gtk_style_copy(
gtk_widget_get_style(
GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window ) );
g_style->fg[GTK_STATE_NORMAL] = *tb->m_fg;
gtk_widget_set_style( GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window, g_style );
#else
gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg );
#endif
}
}
else
@@ -112,17 +102,7 @@ static gint gtk_toolbar_enter_callback( GtkWidget *WXUNUSED(widget),
tb->m_fg->green = 33000;
tb->m_fg->blue = 33000;
gdk_color_alloc( gtk_widget_get_colormap( GTK_WIDGET(tb->m_toolbar) ), tb->m_fg );
#if (GTK_MINOR_VERSION > 0)
GtkStyle *g_style =
gtk_style_copy(
gtk_widget_get_style(
GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window ) );
g_style->fg[GTK_STATE_NORMAL] = *tb->m_fg;
gtk_widget_set_style( GTK_TOOLBAR(tb->m_toolbar)->tooltips->tip_window, g_style );
#else
gtk_tooltips_set_colors( GTK_TOOLBAR(tb->m_toolbar)->tooltips, tb->m_bg, tb->m_fg );
#endif
}
}
#endif
@@ -294,7 +274,9 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
mask = bitmap.GetMask()->GetBitmap();
tool_pixmap = gtk_pixmap_new( pixmap, mask );
#if (GTK_MINOR_VERSION > 0)
gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE );
#endif
gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 );
@@ -376,11 +358,12 @@ void wxToolBar::EnableTool(int toolIndex, bool enable)
{
tool->m_enabled = enable;
/* we don't disable the tools for now as the bitmaps don't get
greyed anyway and this also disables tooltips */
#if (GTK_MINOR_VERSION > 0)
/* we don't disable the tools for GTK 1.0 as the bitmaps don't get
greyed anyway and this also disables tooltips */
if (tool->m_item)
gtk_widget_set_sensitive( tool->m_item, enable );
#endif
return;
}

View File

@@ -15,13 +15,14 @@
#include "wx/utils.h"
#include "wx/string.h"
#include "wx/list.h"
#include "wx/log.h"
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#ifdef __SVR4__
#include <sys/systeminfo.h>
#endif
//#ifdef __SVR4__
//#include <sys/systeminfo.h>
//#endif
#include "gdk/gdkx.h" // GDK_DISPLAY
#include "gdk/gdkprivate.h" // gdk_progclass
@@ -30,7 +31,6 @@
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include "wx/log.h"
//-----------------------------------------------------------------------------
// constants

View File

@@ -215,6 +215,134 @@ extern bool g_isIdle;
//-----------------------------------------------------------------------------
#if (GTK_MINOR_VERSION == 0)
/* these functions are copied verbatim from GTK 1.2 */
static void
gdkx_XConvertCase (KeySym symbol,
KeySym *lower,
KeySym *upper)
{
register KeySym sym = symbol;
g_return_if_fail (lower != NULL);
g_return_if_fail (upper != NULL);
*lower = sym;
*upper = sym;
switch (sym >> 8)
{
#if defined (GDK_A) && defined (GDK_Ooblique)
case 0: /* Latin 1 */
if ((sym >= GDK_A) && (sym <= GDK_Z))
*lower += (GDK_a - GDK_A);
else if ((sym >= GDK_a) && (sym <= GDK_z))
*upper -= (GDK_a - GDK_A);
else if ((sym >= GDK_Agrave) && (sym <= GDK_Odiaeresis))
*lower += (GDK_agrave - GDK_Agrave);
else if ((sym >= GDK_agrave) && (sym <= GDK_odiaeresis))
*upper -= (GDK_agrave - GDK_Agrave);
else if ((sym >= GDK_Ooblique) && (sym <= GDK_Thorn))
*lower += (GDK_oslash - GDK_Ooblique);
else if ((sym >= GDK_oslash) && (sym <= GDK_thorn))
*upper -= (GDK_oslash - GDK_Ooblique);
break;
#endif /* LATIN1 */
#if defined (GDK_Aogonek) && defined (GDK_tcedilla)
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym == GDK_Aogonek)
*lower = GDK_aogonek;
else if (sym >= GDK_Lstroke && sym <= GDK_Sacute)
*lower += (GDK_lstroke - GDK_Lstroke);
else if (sym >= GDK_Scaron && sym <= GDK_Zacute)
*lower += (GDK_scaron - GDK_Scaron);
else if (sym >= GDK_Zcaron && sym <= GDK_Zabovedot)
*lower += (GDK_zcaron - GDK_Zcaron);
else if (sym == GDK_aogonek)
*upper = GDK_Aogonek;
else if (sym >= GDK_lstroke && sym <= GDK_sacute)
*upper -= (GDK_lstroke - GDK_Lstroke);
else if (sym >= GDK_scaron && sym <= GDK_zacute)
*upper -= (GDK_scaron - GDK_Scaron);
else if (sym >= GDK_zcaron && sym <= GDK_zabovedot)
*upper -= (GDK_zcaron - GDK_Zcaron);
else if (sym >= GDK_Racute && sym <= GDK_Tcedilla)
*lower += (GDK_racute - GDK_Racute);
else if (sym >= GDK_racute && sym <= GDK_tcedilla)
*upper -= (GDK_racute - GDK_Racute);
break;
#endif /* LATIN2 */
#if defined (GDK_Hstroke) && defined (GDK_Cabovedot)
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Hstroke && sym <= GDK_Hcircumflex)
*lower += (GDK_hstroke - GDK_Hstroke);
else if (sym >= GDK_Gbreve && sym <= GDK_Jcircumflex)
*lower += (GDK_gbreve - GDK_Gbreve);
else if (sym >= GDK_hstroke && sym <= GDK_hcircumflex)
*upper -= (GDK_hstroke - GDK_Hstroke);
else if (sym >= GDK_gbreve && sym <= GDK_jcircumflex)
*upper -= (GDK_gbreve - GDK_Gbreve);
else if (sym >= GDK_Cabovedot && sym <= GDK_Scircumflex)
*lower += (GDK_cabovedot - GDK_Cabovedot);
else if (sym >= GDK_cabovedot && sym <= GDK_scircumflex)
*upper -= (GDK_cabovedot - GDK_Cabovedot);
break;
#endif /* LATIN3 */
#if defined (GDK_Rcedilla) && defined (GDK_Amacron)
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Rcedilla && sym <= GDK_Tslash)
*lower += (GDK_rcedilla - GDK_Rcedilla);
else if (sym >= GDK_rcedilla && sym <= GDK_tslash)
*upper -= (GDK_rcedilla - GDK_Rcedilla);
else if (sym == GDK_ENG)
*lower = GDK_eng;
else if (sym == GDK_eng)
*upper = GDK_ENG;
else if (sym >= GDK_Amacron && sym <= GDK_Umacron)
*lower += (GDK_amacron - GDK_Amacron);
else if (sym >= GDK_amacron && sym <= GDK_umacron)
*upper -= (GDK_amacron - GDK_Amacron);
break;
#endif /* LATIN4 */
#if defined (GDK_Serbian_DJE) && defined (GDK_Cyrillic_yu)
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Serbian_DJE && sym <= GDK_Serbian_DZE)
*lower -= (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (sym >= GDK_Serbian_dje && sym <= GDK_Serbian_dze)
*upper += (GDK_Serbian_DJE - GDK_Serbian_dje);
else if (sym >= GDK_Cyrillic_YU && sym <= GDK_Cyrillic_HARDSIGN)
*lower -= (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
else if (sym >= GDK_Cyrillic_yu && sym <= GDK_Cyrillic_hardsign)
*upper += (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
break;
#endif /* CYRILLIC */
#if defined (GDK_Greek_ALPHAaccent) && defined (GDK_Greek_finalsmallsigma)
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (sym >= GDK_Greek_ALPHAaccent && sym <= GDK_Greek_OMEGAaccent)
*lower += (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (sym >= GDK_Greek_alphaaccent && sym <= GDK_Greek_omegaaccent &&
sym != GDK_Greek_iotaaccentdieresis &&
sym != GDK_Greek_upsilonaccentdieresis)
*upper -= (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
else if (sym >= GDK_Greek_ALPHA && sym <= GDK_Greek_OMEGA)
*lower += (GDK_Greek_alpha - GDK_Greek_ALPHA);
else if (sym >= GDK_Greek_alpha && sym <= GDK_Greek_omega &&
sym != GDK_Greek_finalsmallsigma)
*upper -= (GDK_Greek_alpha - GDK_Greek_ALPHA);
break;
#endif /* GREEK */
}
}
static guint
gdk_keyval_to_upper (guint keyval)
{
@@ -223,7 +351,7 @@ gdk_keyval_to_upper (guint keyval)
KeySym lower_val = 0;
KeySym upper_val = 0;
XConvertCase (keyval, &lower_val, &upper_val);
gdkx_XConvertCase (keyval, &lower_val, &upper_val);
return upper_val;
}
return 0;
@@ -2384,7 +2512,7 @@ bool wxWindow::AcceptsFocus() const
bool wxWindow::Reparent( wxWindow *newParent )
{
wxCHECK_MSG( (m_widget != NULL), (wxWindow*) NULL, _T("invalid window") );
wxCHECK_MSG( (m_widget != NULL), FALSE, _T("invalid window") );
wxWindow *oldParent = m_parent;