1 /*$ 2 Copyright (C) 2016-2020 Azel. 3 4 This file is part of AzPainterB. 5 6 AzPainterB is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 AzPainterB is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 $*/ 19 20 #ifndef MLIB_GUI_H 21 #define MLIB_GUI_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 int mAppInit(int *argc,char **argv); 28 void mAppEnd(void); 29 void mAppQuit(void); 30 31 void mAppSetClassName(const char *appname,const char *classname); 32 mBool mAppInitPenTablet(void); 33 34 void mAppSync(void); 35 void mAppWakeUpEvent(void); 36 void mAppMutexLock(void); 37 void mAppMutexUnlock(void); 38 void mAppBlockUserAction(mBool on); 39 40 void mAppRun(void); 41 void mAppRunModal(mWindow *modal); 42 void mAppRunPopup(mWindow *popup); 43 44 mWindow *mAppGetCurrentModalWindow(void); 45 46 char *mAppGetFilePath(const char *path); 47 void mAppSetDataPath(const char *path); 48 void mAppGetDataPath(mStr *str,const char *pathadd); 49 void mAppSetConfigPath(const char *path,mBool bHome); 50 void mAppGetConfigPath(mStr *str,const char *pathadd); 51 int mAppCreateConfigDir(const char *pathadd); 52 void mAppCopyFile_dataToConfig(const char *path); 53 54 mBool mAppSetDefaultFont(const char *format); 55 mBool mAppLoadThemeFile(const char *filename); 56 57 void mAppSetTranslationDefault(const void *defdat); 58 void mAppLoadTranslation(const void *defdat,const char *lang,const char *pathadd); 59 60 void mGuiCalcHintSize(void); 61 void mGuiDraw(void); 62 mBool mGuiUpdate(void); 63 void mGuiUpdateAllWindows(void); 64 65 void *mGetFreeTypeLib(void); 66 67 void mGetDesktopWorkBox(mBox *box); 68 void mGetDesktopBox(mBox *box); 69 70 uint32_t mKeyRawToCode(uint32_t key); 71 int mKeyCodeToName(uint32_t c,char *buf,int bufsize); 72 int mRawKeyCodeToName(int key,char *buf,int bufsize); 73 74 #ifdef __cplusplus 75 } 76 #endif 77 78 #endif 79