]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/private/messagetype.h
removing outdated code
[wxWidgets.git] / include / wx / gtk / private / messagetype.h
CommitLineData
ce668f29 1///////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/gtk/private/messagetype.h
ce668f29
VZ
3// Purpose: translate between wx and GtkMessageType
4// Author: Vadim Zeitlin
5// Created: 2009-09-27
b1153ed6 6// RCS-ID: $Id$
ce668f29
VZ
7// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _GTK_PRIVATE_MSGTYPE_H_
12#define _GTK_PRIVATE_MSGTYPE_H_
13
adc62081 14#include <gtk/gtk.h>
ce668f29
VZ
15
16namespace wxGTKImpl
17{
18
19// Convert the given wx style to GtkMessageType, return true if succeeded or
20// false if failed.
21inline bool ConvertMessageTypeFromWX(int style, GtkMessageType *type)
22{
23#ifdef __WXGTK210__
24 if ( gtk_check_version(2, 10, 0) == NULL && (style & wxICON_NONE))
25 *type = GTK_MESSAGE_OTHER;
26 else
27#endif // __WXGTK210__
28 if (style & wxICON_EXCLAMATION)
29 *type = GTK_MESSAGE_WARNING;
30 else if (style & wxICON_ERROR)
31 *type = GTK_MESSAGE_ERROR;
32 else if (style & wxICON_INFORMATION)
33 *type = GTK_MESSAGE_INFO;
34 else if (style & wxICON_QUESTION)
35 *type = GTK_MESSAGE_QUESTION;
36 else
37 return false;
38
39 return true;
40}
41
42} // namespace wxGTKImpl
43
44#endif // _GTK_PRIVATE_MSGTYPE_H_
45