35#include "OCPN_Sound.h"
42#define OCPN_ACTION_FOLLOW 0x1000
43#define OCPN_ACTION_ROUTE 0x1001
44#define OCPN_ACTION_RMD 0x1002
45#define OCPN_ACTION_SETTINGS_BASIC 0x1003
46#define OCPN_ACTION_SETTINGS_EXPERT 0x1004
47#define OCPN_ACTION_TRACK_TOGGLE 0x1005
48#define OCPN_ACTION_MOB 0x1006
49#define OCPN_ACTION_TIDES_TOGGLE 0x1007
50#define OCPN_ACTION_CURRENTS_TOGGLE 0x1008
51#define OCPN_ACTION_ENCTEXT_TOGGLE 0x1009
52#define OCPN_ACTION_TRACK_ON 0x100a
53#define OCPN_ACTION_TRACK_OFF 0x100b
54#define OCPN_ACTION_ENCSOUNDINGS_TOGGLE 0x100c
55#define OCPN_ACTION_ENCLIGHTS_TOGGLE 0x100d
56#define OCPN_ACTION_DOWNLOAD_VALID 0x100e
60#define GPS_PROVIDER_AVAILABLE 2
61#define GPS_SHOWPREFERENCES 3
63extern bool androidUtilInit(
void);
65extern wxString androidGetDeviceInfo();
66extern void CheckMigrateCharts();
68extern bool androidGetMemoryStatus(
int *mem_total,
int *mem_used);
70extern double GetAndroidDisplaySize();
71extern double getAndroidDPmm();
72extern wxSize getAndroidDisplayDimensions(
void);
73extern double getAndroidDisplayDensity();
74extern int getAndroidActionBarHeight();
75extern void androidConfirmSizeCorrection();
76extern void androidForceFullRepaint(
bool bskipConfirm =
false);
77extern int androidGetVersionCode();
78extern wxString androidGetVersionName();
80extern bool LoadQtStyleSheet(wxString &sheet_file);
81extern QString getQtStyleSheet(
void);
83extern void androidShowBusyIcon();
84extern void androidHideBusyIcon();
85extern void androidEnableBackButton(
bool benable);
86extern void androidEnableBackButtonCheck(
bool benable);
87extern void androidEnableOptionItems(
bool benable);
89extern wxString androidGetSupplementalLicense(
void);
91extern bool androidStartNMEA(wxEvtHandler *consumer);
92extern bool androidStopNMEA();
93extern wxString androidGPSService(
int parm);
94extern bool androidDeviceHasGPS();
96extern bool androidDeviceHasBlueTooth();
97extern bool androidStartBluetoothScan();
98extern bool androidStopBluetoothScan();
99extern wxArrayString androidGetBluetoothScanResults();
100extern bool androidStartBT(wxEvtHandler *consumer, wxString mac_address);
101extern bool androidStopBT();
102extern bool androidSendBTMessage(wxString &payload);
104extern wxArrayString *androidGetSerialPortsArray(
void);
105extern bool androidStartUSBSerial(wxString &portname, wxString baudRate,
106 wxEvtHandler *consumer);
107extern bool androidStopUSBSerial(wxString &portname);
108extern bool androidWriteSerial(wxString &portname, wxString &message);
110extern bool DoAndroidPreferences(
void);
111extern int androidFileChooser(wxString *result,
const wxString &initDir,
112 const wxString &title,
const wxString &suggestion,
113 const wxString &wildcard,
bool dirOnly =
false,
114 bool addFiles =
false);
116extern void androidSetChartTypeMaskSel(
int mask, wxString &indicator);
117extern void androidSetRouteAnnunciator(
bool viz);
118extern void androidSetFollowTool(
int state,
bool forceUpdate =
false);
119extern void androidSetTrackTool(
bool bactive);
121extern wxString androidGetHomeDir();
123androidGetPrivateDir();
125androidGetSharedDir();
128extern wxString androidGetExtStorageDir();
129extern wxString androidGetDownloadDirectory();
131extern int startAndroidFileDownload(
const wxString &url,
132 const wxString &destination,
133 wxEvtHandler *evh,
long *dl_ID);
134extern int queryAndroidFileDownload(
long dl_ID, wxString *result);
135extern void finishAndroidFileDownload();
136extern void cancelAndroidFileDownload(
long dl_ID);
137extern int validateAndroidWriteLocation(
const wxString &destination);
139extern wxString doAndroidPOST(
const wxString &url, wxString &parms,
142extern wxString getFontQtStylesheet(wxFont *font);
143extern wxSize getAndroidConfigSize();
144void resizeAndroidPersistents();
145bool AndroidSecureCopyFile(wxString in, wxString out);
148bool androidPlaySound(
const wxString soundfile, AndroidSound* sound);
150bool androidGetFullscreen();
151bool androidSetFullscreen(
bool bFull);
152void androidDisableFullScreen();
153void androidRestoreFullScreen();
155void androidLaunchHelpView();
156void androidTerminate();
158void androidTestCPP();
159int androidGetTZOffsetMins();
161int androidApplySettingsString(wxString settings, ArrayOfCDI *pACDI);
163bool androidShowDisclaimer(wxString title, wxString msg);
164bool androidShowSimpleOKDialog(wxString title, wxString msg);
165bool androidShowSimpleYesNoDialog(wxString title, wxString msg);
166bool androidInstallPlaystoreHelp();
168void androidLaunchBrowser(wxString URL);
169bool androidCheckOnline();
171unsigned int androidColorPicker(
unsigned int initialColor);
173wxArrayString androidTraverseDir(wxString dir, wxString filespec);
174void androidEnableOptionsMenu(
bool bEnable);
176void prepareAndroidStyleSheets();
177QString getAdjustedDialogStyleSheet();
178QString getListBookStyleSheet();
179QString getScrollBarsStyleSheet();
180void setChoiceStyleSheet(wxChoice *win,
int refDim);
181void setMenuStyleSheet(wxMenu *win,
const wxFont &font);
182QString prepareAndroidSliderStyleSheet(
int sliderWidth);
184void androidDisplayTimedToast(wxString message,
int timeMillisec);
185void androidCancelTimedToast();
186void androidDisplayToast(wxString message);
188void androidEnableRotation(
void);
189void androidDisableRotation(
void);
190int androidGetScreenOrientation();
192void androidEnableMulticast(
bool benable);
193void androidLastCall();
196wxBitmap loadAndroidSVG(
const wxString filename,
unsigned int width,
197 unsigned int height);
199wxString androidGetAndroidSystemLocale();
200bool androidIsDirWritable( wxString dir );
201wxArrayString GetConfigChartDirectories();
205 DECLARE_EVENT_TABLE()
210 const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
211 long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name =
"inprogress");
215 void OnTimer(wxTimerEvent &evt);
229#define ID_MIGRATE_OK 8791
230#define ID_MIGRATE_CANCEL 8792
231#define ID_MIGRATE_START 8793
232#define ID_MIGRATE_CONTINUE 8794
233#define MIGRATION_STATUS_TIMER 8795
239 wxWindowID
id = wxID_ANY,
240 const wxString &caption = wxEmptyString,
241 const wxPoint &pos = wxDefaultPosition,
242 const wxSize &size = wxDefaultSize,
long style = 0);
245 void CreateControls(
void);
246 void OnMigrateCancelClick(wxCommandEvent &event);
247 void OnMigrateOKClick(wxCommandEvent &event);
248 void OnMigrateClick(wxCommandEvent &event);
249 void OnMigrate1Click(wxCommandEvent &event);
250 void OnCtlUpdated(wxCommandEvent &event);
251 void onPermissionGranted(wxString);
252 void setStatus( wxString s ){ m_statusText->SetLabel(s); }
253 void onTimerEvent(wxTimerEvent &event);
254 void FinishMigration();
256 wxButton *m_CancelButton, *m_OKButton;
257 wxButton *m_migrateButton, *m_migrateButton1;
258 wxStaticText *m_infoText, *m_infoDirs, *m_migrateStep1, *m_statusText;;
259 wxRadioButton *m_radioSDCard, *m_radioInternal;
261 wxStaticBoxSizer *statusSizer;
263 wxArrayString m_migrateDirs;
265 wxString m_permissionResult;
266 wxTimer m_statusTimer;
267 wxString m_migrateSourceFolder;
268 wxString m_migrateDestinationFolder;
275 DECLARE_EVENT_TABLE()