Use standard C99 (and Qt) types for 64-bit integers
[novacoin.git] / src / noui.h
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2011 The Bitcoin developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file license.txt or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_NOUI_H
6 #define BITCOIN_NOUI_H
7
8 #include <stdint.h>
9
10 #include <string>
11 #include <boost/function.hpp>
12 #include "wallet.h"
13
14 typedef void wxWindow;
15 #define wxYES                   0x00000002
16 #define wxOK                    0x00000004
17 #define wxNO                    0x00000008
18 #define wxYES_NO                (wxYES|wxNO)
19 #define wxCANCEL                0x00000010
20 #define wxAPPLY                 0x00000020
21 #define wxCLOSE                 0x00000040
22 #define wxOK_DEFAULT            0x00000000
23 #define wxYES_DEFAULT           0x00000000
24 #define wxNO_DEFAULT            0x00000080
25 #define wxCANCEL_DEFAULT        0x80000000
26 #define wxICON_EXCLAMATION      0x00000100
27 #define wxICON_HAND             0x00000200
28 #define wxICON_WARNING          wxICON_EXCLAMATION
29 #define wxICON_ERROR            wxICON_HAND
30 #define wxICON_QUESTION         0x00000400
31 #define wxICON_INFORMATION      0x00000800
32 #define wxICON_STOP             wxICON_HAND
33 #define wxICON_ASTERISK         wxICON_INFORMATION
34 #define wxICON_MASK             (0x00000100|0x00000200|0x00000400|0x00000800)
35 #define wxFORWARD               0x00001000
36 #define wxBACKWARD              0x00002000
37 #define wxRESET                 0x00004000
38 #define wxHELP                  0x00008000
39 #define wxMORE                  0x00010000
40 #define wxSETUP                 0x00020000
41
42 inline int MyMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
43 {
44     printf("%s: %s\n", caption.c_str(), message.c_str());
45     fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str());
46     return 4;
47 }
48 #define wxMessageBox  MyMessageBox
49
50 inline int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
51 {
52     return MyMessageBox(message, caption, style, parent, x, y);
53 }
54
55 inline bool ThreadSafeAskFee(int64_t nFeeRequired, const std::string& strCaption, wxWindow* parent)
56 {
57     return true;
58 }
59
60 inline void CalledSetStatusBar(const std::string& strText, int nField)
61 {
62 }
63
64 inline void UIThreadCall(boost::function0<void> fn)
65 {
66 }
67
68 inline void MainFrameRepaint()
69 {
70 }
71
72 inline void InitMessage(const std::string &message)
73 {
74 }
75
76 #endif