remove unused/unneeded stuff from gtk/private.h

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-11-25 03:33:26 +00:00
parent 7f6b7a5a6c
commit 19abd352e8
6 changed files with 10 additions and 86 deletions

View File

@@ -14,15 +14,8 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "wx/event.h"
#include "wx/gtk/private/string.h" #include "wx/gtk/private/string.h"
// fail all version tests if the GTK+ version is so ancient that it doesn't
// even have GTK_CHECK_VERSION
#ifndef GTK_CHECK_VERSION
#define GTK_CHECK_VERSION(a, b, c) 0
#endif
// pango_version_check symbol is quite recent ATM (4/2007)... so we // pango_version_check symbol is quite recent ATM (4/2007)... so we
// use our own wrapper which implements a smart trick. // use our own wrapper which implements a smart trick.
// Use this function as you'd use pango_version_check: // Use this function as you'd use pango_version_check:
@@ -95,12 +88,7 @@ extern const gchar *wx_pango_version_check(int major, int minor, int micro);
// Some deprecated GTK+ prototypes we still use often // Some deprecated GTK+ prototypes we still use often
// FIXME: Don't use them if possible. // FIXME: Don't use them if possible.
G_BEGIN_DECLS extern "C" {
// Should use gtk_image_new, but the mask seems to be handled different,
// and we need to migrate
GtkWidget* gtk_pixmap_new (GdkPixmap *pixmap,
GdkBitmap *mask);
// Deprecated since GTK+-1.3.7: // Deprecated since GTK+-1.3.7:
// Trivial wrapper around gtk_window_move, with some side effects we seem to rely on // Trivial wrapper around gtk_window_move, with some side effects we seem to rely on
@@ -114,25 +102,7 @@ void gtk_window_set_policy (GtkWindow *window,
gint allow_grow, gint allow_grow,
gint auto_shrink); gint auto_shrink);
G_END_DECLS } // extern "C"
//-----------------------------------------------------------------------------
// Misc. functions
//-----------------------------------------------------------------------------
// Needed for implementing e.g. combobox on wxGTK within a modal dialog.
void wxAddGrab(wxWindow* window);
void wxRemoveGrab(wxWindow* window);
// Escapes string so that it is valid Pango markup XML string:
WXDLLIMPEXP_CORE wxString wxEscapeStringForPangoMarkup(const wxString& str);
#ifdef __WXGTK20__
#include <gdk/gdktypes.h>
// Returns stock accelerator modifier and key code for the given ID
WXDLLEXPORT bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key);
#endif
#endif // _WX_GTK_PRIVATE_H_ #endif // _WX_GTK_PRIVATE_H_

View File

@@ -219,7 +219,7 @@ END_EVENT_TABLE()
#else #else
// __WXGTK20__ // __WXGTK20__
#include "wx/gtk/private.h" #include <gtk/gtk.h>
static void static void
gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) ) gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) )

View File

@@ -304,7 +304,7 @@ wxArtProvider::~wxArtProvider()
} }
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/private.h" #include <gtk/gtk.h>
extern GtkIconSize wxArtClientToIconSize(const wxArtClient& client); extern GtkIconSize wxArtClientToIconSize(const wxArtClient& client);
#endif // defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #endif // defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)

View File

@@ -46,11 +46,8 @@ extern "C"
static void gtk_menu_clicked_callback(GtkWidget *widget, wxMenu *menu); static void gtk_menu_clicked_callback(GtkWidget *widget, wxMenu *menu);
} }
//-----------------------------------------------------------------------------
// idle system
//-----------------------------------------------------------------------------
#if wxUSE_ACCEL #if wxUSE_ACCEL
static bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key);
static wxString GetGtkHotKey( const wxMenuItem& item ); static wxString GetGtkHotKey( const wxMenuItem& item );
#endif #endif
@@ -844,7 +841,7 @@ void wxMenuItem::SetItemLabel( const wxString& str )
accel_key, accel_key,
accel_mods ); accel_mods );
} }
#endif // wxUSE_FILECTRL #endif // wxUSE_ACCEL
} }
// NOTE: this function is different from the similar functions GTKProcessMnemonics() // NOTE: this function is different from the similar functions GTKProcessMnemonics()
@@ -1176,7 +1173,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
accel_mods, accel_mods,
GTK_ACCEL_VISIBLE); GTK_ACCEL_VISIBLE);
} }
#endif // wxUSE_FILECTRL #endif // wxUSE_ACCEL
if (pos == -1) if (pos == -1)
gtk_menu_shell_append(GTK_MENU_SHELL(m_menu), menuItem); gtk_menu_shell_append(GTK_MENU_SHELL(m_menu), menuItem);
@@ -1762,6 +1759,8 @@ const char *wxGetStockGtkID(wxWindowID id)
return NULL; return NULL;
} }
#if wxUSE_ACCEL
static
bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key) bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key)
{ {
if (!id) if (!id)
@@ -1781,5 +1780,6 @@ bool wxGetStockGtkAccelerator(const char *id, GdkModifierType *mod, guint *key)
return false; return false;
} }
#endif // wxUSE_ACCEL
#endif // wxUSE_MENUS #endif // wxUSE_MENUS

View File

@@ -96,41 +96,6 @@ bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
} }
#endif #endif
// Escapes string so that it is valid Pango markup XML string:
wxString wxEscapeStringForPangoMarkup(const wxString& str)
{
size_t len = str.length();
wxString out;
out.Alloc(len);
for (size_t i = 0; i < len; i++)
{
wxChar c = str[i];
switch (c)
{
case _T('&'):
out << _T("&amp;");
break;
case _T('<'):
out << _T("&lt;");
break;
case _T('>'):
out << _T("&gt;");
break;
case _T('\''):
out << _T("&apos;");
break;
case _T('"'):
out << _T("&quot;");
break;
default:
out << c;
break;
}
}
return out;
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// display characterstics // display characterstics
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -4271,17 +4271,6 @@ wxPoint wxGetMousePosition()
} }
// Needed for implementing e.g. combobox on wxGTK within a modal dialog.
void wxAddGrab(wxWindow* window)
{
gtk_grab_add( (GtkWidget*) window->GetHandle() );
}
void wxRemoveGrab(wxWindow* window)
{
gtk_grab_remove( (GtkWidget*) window->GetHandle() );
}
GdkWindow* wxWindowGTK::GTKGetDrawingWindow() const GdkWindow* wxWindowGTK::GTKGetDrawingWindow() const
{ {
GdkWindow* window = NULL; GdkWindow* window = NULL;