wasabicfg.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. #ifndef __WASABI_CFG_H
  2. #define __WASABI_CFG_H
  3. #define GEN_FF
  4. #define WA5
  5. //#define _WASABIRUNTIME
  6. // Uncomment this to have an old-style global api pointer
  7. //#define WA3COMPATIBILITY
  8. #ifndef _WASABIRUNTIME
  9. #ifndef WA3COMPATIBILITY
  10. #define WASABINOMAINAPI
  11. #endif
  12. /*
  13. Comment or uncomment the following directives according to the needs of your application :
  14. */
  15. /* note to the team:
  16. the WANT_WASABI_API_* directives will go away once we're done splitting the api, their only purpose
  17. is to split the api one bit at a time while the rest remains working. when it's done, all that will remain
  18. will be the WASABI_COMPILE_* directives
  19. */
  20. // This allows component (external plugins)
  21. //#define WASABI_COMPILE_COMPONENTS
  22. // This enables the layered UI
  23. #define WASABI_COMPILE_WND
  24. // This enables multiplexed timers
  25. #define WASABI_COMPILE_TIMERS
  26. // This enables xml group loading within the window api
  27. #define WASABI_COMPILE_SKIN
  28. #define WASABI_SCRIPT_SYSTEMOBJECT_WA3COMPATIBLE
  29. // This enables internationalizaiton
  30. // #define WASABI_COMPILE_UTF
  31. // This enables action handling in UI objects (clicks and keypresses)
  32. //#define WASABI_COMPILE_ACTIONS // CUT!!!
  33. // This enables UI scripting
  34. #define WASABI_COMPILE_SCRIPT
  35. // This enables keyboard locales in UI
  36. #define WASABI_COMPILE_LOCALES
  37. // This enables bitmap and truetype font rendering
  38. #define WASABI_COMPILE_FONTS
  39. //#define WASABI_FONT_RENDERER_USE_WIN32
  40. #define WASABI_FONT_RENDERER_USE_FREETYPE
  41. // This sets the static font renderer. If you are compiling with api_config, the attribute to set is { 0x280876cf, 0x48c0, 0x40bc, { 0x8e, 0x86, 0x73, 0xce, 0x6b, 0xb4, 0x62, 0xe5 } }, "Font Renderer"
  42. #if defined(WASABI_FONT_RENDERER_USE_WIN32)
  43. #define WASABI_FONT_RENDERER "" // "" is Win32
  44. #elif defined(WASABI_FONT_RENDERER_USE_FREETYPE)
  45. #define WASABI_FONT_RENDERER "Freetype" // Freetype lib
  46. #else
  47. #define WASABI_FONT_RENDERER "" // "" default for OS
  48. #endif
  49. // This lets you override all bitmapfonts using TTF fonts (for internationalization). define to a function call or a global value to change this value dynamically.
  50. // If you are compiling with api_config, the attribute to set is { 0x280876cf, 0x48c0, 0x40bc, { 0x8e, 0x86, 0x73, 0xce, 0x6b, 0xb4, 0x62, 0xe5 } }, "Use bitmap fonts (no international support)"
  51. #define WASABI_FONT_TTFOVERRIDE 0 // 1 does all rendering with TTF
  52. #define WASABI_WNDMGR_ANIMATEDRECTS 0 // if api_config is compiled, the item controlling this is {280876CF-48C0-40bc-8E86-73CE6BB462E5};"Animated rects"
  53. #define WASABI_WNDMGR_FINDOPENRECT 0 // if api_config is compiled, the item controlling this is {280876CF-48C0-40bc-8E86-73CE6BB462E5};"Find open rect"
  54. #define WASABI_WNDMGR_LINKLAYOUTSCALES 0 // if api_config is compiled, the item controlling this is {9149C445-3C30-4e04-8433-5A518ED0FDDE};"Link layouts scale"
  55. #define WASABI_WNDMGR_LINKLAYOUTSALPHA 0 // if api_config is compiled, the item controlling this is {9149C445-3C30-4e04-8433-5A518ED0FDDE};"Link layouts alpha"
  56. #define WASABI_WNDMGR_DESKTOPALPHA 1 // if api_config is compiled, the item controlling this is {9149C445-3C30-4e04-8433-5A518ED0FDDE};"Enable desktop alpha"
  57. // This enables loading for pngs, jpgs (you need to add the necessary image loader services)
  58. #define WASABI_COMPILE_IMGLDR
  59. #define WASABI_COMPILE_IMGLDR_PNGREAD
  60. #define WASABI_COMPILE_IMGLDR_JPGREAD
  61. // This enables metadb support
  62. //#define WASABI_COMPILE_METADB
  63. // This enables config file support
  64. #define WASABI_COMPILE_CONFIG
  65. // This enables the filereader pipeline
  66. #define WASABI_COMPILE_FILEREADER
  67. // This enables the zip filereader
  68. //#define WASABI_COMPILE_ZIPREADER
  69. // This enables the xml parser for config and group loading
  70. #define WASABI_COMPILE_XMLPARSER
  71. // This enables system callback management
  72. #define WASABI_COMPILE_SYSCB
  73. // This enables centralized memory allocation/deallocation
  74. #define WASABI_COMPILE_MEMMGR
  75. #define WASABI_DIRS_FROMEXEPATH // otherwise, if the lib is running from a dll in another path, undefining that means the path are relative to the DLL path
  76. #define WASABI_SKINS_SUBDIRECTORY "skins"
  77. #define WASABI_RESOURCES_SUBDIRECTORY "plugins/freeform"
  78. #define WASABI_COMPILE_MEDIACORE
  79. #define WASABI_COMPILE_WNDMGR
  80. #define WASABI_COMPILE_PAINTSETS
  81. #define WASABI_COMPILE_MAKIDEBUG
  82. #define WASABI_CUSTOMIMPL_MEDIACORE
  83. #define WASABI_WIDGETS_MEDIASLIDERS
  84. #define WASABI_CUSTOM_CONTEXTMENUS
  85. #define WASABI_CUSTOM_QUIT
  86. #define WASABI_CUSTOM_QUITFN { extern void appQuit(); appQuit(); }
  87. #define WASABI_CUSTOM_ONTOP
  88. #else // not _WASABIRUNTIME
  89. // this section should define the entire set of wasabi parts since this is a full runtime build
  90. #define WASABI_COMPILE_COMPONENTS
  91. #define WASABI_COMPILE_SKIN
  92. #define WASABI_COMPILE_ACTIONS
  93. #define WASABI_COMPILE_SCRIPT
  94. #define WASABI_COMPILE_FONTS
  95. #define WASABI_COMPILE_LOCALES
  96. #define WASABI_COMPILE_IMGLDR
  97. #define WASABI_COMPILE_IMGLDR_PNGREAD
  98. #define WASABI_COMPILE_IMGLDR_JPGREAD
  99. #define WASABI_COMPILE_METADB
  100. #define WASABI_COMPILE_CONFIG
  101. #define WASABI_COMPILE_FILEREADER
  102. #define WASABI_COMPILE_XMLPARSER
  103. #define WASABI_COMPILE_SYSCB
  104. #define WASABI_COMPILE_MEMMGR
  105. #define WASABI_COMPILE_SKIN_WA2
  106. #define WASABI_COMPILE_PAINTSETS
  107. #define WASABI_COMPILE_WNDMGR
  108. #define WASABI_COMPILE_MEDIACORE
  109. #define WASABI_COMPILE_TIMERS
  110. #define WASABI_COMPILE_WND
  111. #define WASABI_COMPILE_UTF
  112. #define WASABI_SKINS_SUBDIRECTORY "skins"
  113. #define WASABI_FONT_RENDERER "" // "" is Win32
  114. #define WASABI_WNDMGR_ANIMATEDRECTS 0 // if api_config is compiled, the item controlling this is {280876CF-48C0-40bc-8E86-73CE6BB462E5};"Animated rects"
  115. #define WASABI_WNDMGR_FINDOPENRECT 0 // if api_config is compiled, the item controlling this is {280876CF-48C0-40bc-8E86-73CE6BB462E5};"Find open rect"
  116. #define WASABI_COMPILE_MAKIDEBUG
  117. #endif // not _WASABIRUNTIME
  118. #ifdef _WASABIRUNTIME
  119. #define WASABI_API_SYSTEM api
  120. #define WASABI_API_APP api
  121. #define WASABI_API_COMPONENT api
  122. #define WASABI_API_SVC api
  123. #define WASABI_API_SYSCB api
  124. #define WASABI_API_MAKI api
  125. #define WASABI_API_UTF api
  126. #define WASABI_API_WND api
  127. #define WASABI_API_IMGLDR api
  128. #define WASABI_API_FILE api
  129. #define WASABI_API_TIMER api
  130. #define WASABI_API_WNDMGR api
  131. #define WASABI_API_SKIN api
  132. #define WASABI_API_METADB api
  133. #define WASABI_API_LOCALE api
  134. #define WASABI_API_CONFIG api
  135. #define WASABI_API_FONT api
  136. #define WASABI_API_MEMMGR api
  137. #define WASABI_API_XML api
  138. #define WASABI_API_MEDIACORE api
  139. #define WASABI_API_MAKIDEBUG debugApi
  140. #else // _WASABIRUNTIME
  141. #define WASABI_API_SYSTEM systemApi
  142. #define WASABI_API_APP applicationApi
  143. #define WASABI_API_SVC serviceApi
  144. #define WASABI_API_SYSCB sysCallbackApi
  145. #ifdef WASABI_COMPILE_COMPONENTS
  146. #define WASABI_API_COMPONENT componentApi
  147. #endif
  148. #ifdef WASABI_COMPILE_SCRIPT
  149. #define WASABI_API_MAKI makiApi
  150. #endif
  151. #ifdef WASABI_COMPILE_UTF
  152. #define WASABI_API_UTF utfApi
  153. #endif
  154. #ifdef WASABI_COMPILE_WND
  155. #define WASABI_API_WND wndApi
  156. #endif
  157. #ifdef WASABI_COMPILE_IMGLDR
  158. #define WASABI_API_IMGLDR imgLoaderApi
  159. #endif
  160. #ifdef WASABI_COMPILE_FILEREADER
  161. #define WASABI_API_FILE fileApi
  162. #endif
  163. #ifdef WASABI_COMPILE_TIMERS
  164. #define WASABI_API_TIMER timerApi
  165. #endif
  166. #ifdef WASABI_COMPILE_WNDMGR
  167. #define WASABI_API_WNDMGR wndManagerApi
  168. #endif
  169. #ifdef WASABI_COMPILE_SKIN
  170. #define WASABI_API_SKIN skinApi
  171. #endif
  172. #ifdef WASABI_COMPILE_METADB
  173. #define WASABI_API_METADB metadbApi
  174. #endif
  175. #ifdef WASABI_COMPILE_LOCALES
  176. #define WASABI_API_LOCALE localesApi
  177. #endif
  178. #ifdef WASABI_COMPILE_CONFIG
  179. #define WASABI_API_CONFIG configApi
  180. #endif
  181. #ifdef WASABI_COMPILE_FONTS
  182. #define WASABI_API_FONT fontApi
  183. #endif
  184. #ifdef WASABI_COMPILE_MEMMGR
  185. #define WASABI_API_MEMMGR memmgrApi
  186. #endif
  187. #ifdef WASABI_COMPILE_XMLPARSER
  188. #define WASABI_API_XML xmlApi
  189. #endif
  190. #ifdef WASABI_COMPILE_MEDIACORE
  191. #define WASABI_API_MEDIACORE coreApi
  192. #endif
  193. #ifdef WASABI_COMPILE_MAKIDEBUG
  194. #define WASABI_API_MAKIDEBUG debugApi
  195. #endif
  196. #endif // _WASABIRUNTIME
  197. // #define WASABI_EXTERNAL_GUIOBJECTS
  198. #define WASABI_WIDGETS_GUIOBJECT
  199. #define WASABI_WIDGETS_LAYER
  200. #define WASABI_WIDGETS_TEXT
  201. #define WASABI_WIDGETS_BUTTON
  202. #define WASABI_WIDGETS_TGBUTTON
  203. #define WASABI_WIDGETS_ANIMLAYER
  204. #define WASABI_WIDGETS_GROUPLIST
  205. #define WASABI_WIDGETS_MOUSEREDIR
  206. #define WASABI_WIDGETS_SLIDER
  207. #define WASABI_WIDGETS_MEDIAVIS
  208. #define WASABI_WIDGETS_MEDIAEQCURVE
  209. #define WASABI_WIDGETS_MEDIASTATUS
  210. //#define WASABI_WIDGETS_SVCWND
  211. #define WASABI_WIDGETS_EDIT
  212. #define WASABI_WIDGETS_TITLEBAR
  213. #define WASABI_WIDGETS_COMPBUCK
  214. #define WASABI_WIDGETS_BROWSER
  215. #define WASABI_WIDGETS_FRAME
  216. #define WASABI_WIDGETS_GRID
  217. //#define WASABI_WIDGETS_QUERYDRAG
  218. //#define WASABI_WIDGETS_QUERYLIST
  219. //#define WASABI_WIDGETS_FILTERLIST
  220. //#define WASABI_WIDGETS_QUERYLINE
  221. #define WASABI_WIDGETS_TABSHEET
  222. #define WASABI_WIDGETS_CHECKBOX
  223. #define WASABI_WIDGETS_TITLEBOX
  224. #define WASABI_WIDGETS_CUSTOMOBJECT
  225. #define WASABI_WIDGETS_OSWNDHOST
  226. #define WASABI_WIDGETS_RADIOGROUP
  227. #define WASABI_WIDGETS_LIST
  228. #define WASABI_WIDGETS_TREE
  229. #define WASABI_WIDGETS_DROPDOWNLIST
  230. #define WASABI_WIDGETS_COMBOBOX
  231. #define WASABI_WIDGETS_HISTORYEDITBOX
  232. #define WASABI_WIDGETS_OBJECTDIRECTORY
  233. #define WASABI_WIDGETS_RECTANGLE
  234. #define WASABI_WIDGETS_PATHPICKER
  235. #define WASABI_WIDGETS_GRADIENT
  236. #define WASABI_WIDGETS_MENUBUTTON
  237. #define WASABI_WIDGETS_MENU
  238. #define WASABI_WIDGETS_WNDHOLDER
  239. #define WASABI_WIDGETS_LAYOUTSTATUS
  240. #define WASABI_WIDGETS_TOOLTIPS
  241. #if defined(_DEBUG) | defined(WASABI_DEBUG)
  242. #define WASABI_COMPILE_STATSWND
  243. #ifndef WASABI_DEBUG
  244. #define WASABI_DEBUG
  245. #endif
  246. #endif
  247. #define WASABI_TOOLOBJECT_HIDEOBJECT
  248. #define WASABI_TOOLOBJECT_SENDPARAMS
  249. #define WASABI_TOOLOBJECT_ADDPARAMS
  250. // #endif // WASABI_EXTERNAL_GUIOBJECTS
  251. #define WASABI_COMPILE_COLORTHEMES
  252. #define WASABI_SCRIPTOBJECTS_POPUP
  253. #define WASABI_SCRIPTOBJECTS_LIST
  254. #define WASABI_SCRIPTOBJECTS_BITLIST
  255. #define WASABI_SCRIPTOBJECTS_REGION
  256. #define WASABI_SCRIPTOBJECTS_TIMER
  257. #define WASABI_SCRIPTOBJECTS_MAP
  258. #define WASABI_SCRIPTOBJECTS_EMBEDDEDXUI // needed by 3rd+ level objects
  259. #ifndef WASABI_EXTERNAL_GUIOBJECTS
  260. #define WASABI_SCRIPTOBJECTS_WAC
  261. #endif // WASABI_EXTERNAL_GUIOBJECTS
  262. // lone is super dirty but wants to get stuff working. we need to clean that up
  263. #ifdef WASABI_CUSTOMIMPL_MEDIACORE
  264. class api_core;
  265. extern api_core *createCustomCoreApi();
  266. extern void destroyCustomCoreApi(api_core *core);
  267. #endif
  268. #define WASABI_WNDMGR_ALLCONTAINERSDYNAMIC 0
  269. #define WASABI_WNDMGR_NORESPAWN
  270. #define WASABI_WNDMGR_OSMSGBOX
  271. #define WASABI_STATICVARMGR
  272. #define WASABI_CUSTOM_MODULE_SVCMGR
  273. #define ON_LAYOUT_CHANGED { extern void onLayoutChanged(); onLayoutChanged(); }
  274. #define ON_FATAL_SKIN_ERROR { extern void onFatalSkinError(); onFatalSkinError(); }
  275. #define ON_CREATE_EXTERNAL_WINDOW_GUID(x, y) { extern int onCreateExternalWindowGuid(GUID g); y = onCreateExternalWindowGuid(x); }
  276. #define ON_TOGGLE_DESKTOPALPHA(v) { extern void onToggleDesktopAlpha(int v); onToggleDesktopAlpha(v); }
  277. #define ON_TWEAK_RENDER_RATIO(x) { extern float onTweakRenderRatio(float v); x = onTweakRenderRatio(x); }
  278. #define ON_CUSTOM_ALTF4 { extern void onCustomAltF4(); onCustomAltF4(); }
  279. #define WASABI_DEFAULT_STDCONTAINER "resizable_status"
  280. #define SWITCH_SKIN(x) { extern void switchSkin(const char *name); switchSkin(x); }
  281. #define IS_SKIN_STILL_LOADING(x) { extern int isSkinStillLoading(); x = isSkinStillLoading(); }
  282. #define ON_LOAD_EXTRA_COLORTHEMES() { extern void loadExtraColorThemes(); loadExtraColorThemes(); }
  283. #define LOCALES_CUSTOM_LOAD(x) { extern const char *localesCustomGetFile(); x = localesCustomGetFile(); }
  284. #define DEFAULT_CROSSFADE_ENABLED FALSE
  285. #define CUSTOM_VARS(x, y) { extern const char *getCustomVar(const char *var); y = getCustomVar(x); }
  286. #define WASABI_NO_RELEASEMODE_DEBUGSTRINGS
  287. #define WASABI_CUSTOM_MINIDB(field, buf, len) { extern void getCustomMetaData(const char *f, char *b, int l); getCustomMetaData(field, buf, len); }
  288. #define GET_SONG_INFO_TEXT(ret) { extern const char *getSongInfoText(); ret = getSongInfoText(); }
  289. #define GET_KBDFORWARD_WND(g, wnd) { extern OSWINDOWHANDLE getKeyboardForwardWnd(GUID g); wnd = getKeyboardForwardWnd(g); }
  290. #define WASABI_EDITWND_LISTCOLORS // editwnds use list foreground & background rather than their own colors
  291. #define WASABI_APPBAR_ONDOCKCHANGED(wnd) { extern void onAppBarDockChanged(api_window *w); onAppBarDockChanged(wnd); }
  292. #define WASABI_GET_VERSION(cs, n) { extern const char *getVersion(); STRNCPY(cs, getVersion(), n); cs[n] = 0; }
  293. #define WASABI_ON_MAIN_MOVE(hwnd) { extern void onMainLayoutMove(HWND w); onMainLayoutMove(hwnd); }
  294. #define WASABI_ON_REPARENT(hwnd) { extern void onReParent(HWND w); onReParent(hwnd); }
  295. #define WASABI_ON_REINIT( hwnd) { extern void onReInit(HWND w); onReInit(hwnd); }
  296. // config defaults
  297. #define DEFAULT_DESKTOPALPHA FALSE
  298. #define DEFAULT_LINKLAYOUTSCALE TRUE
  299. #define DEFAULT_LINKLAYOUTSALPHA FALSE
  300. #define DEFAULT_LINKALLALPHA TRUE
  301. #define DEFAULT_LINKALLRATIO FALSE
  302. #define DEFAULT_LINKEDALPHA 255
  303. #define DEFAULT_AUTOOPACITYTIME 2000
  304. #define DEFAULT_AUTOOPACITYFADEIN 250
  305. #define DEFAULT_AUTOOPACITYFADEOUT 1000
  306. #define DEFAULT_AUTOOPACITYTYPE 0
  307. #define DEFAULT_EXTENDAUTOOPACITY 25
  308. #define DEFAULT_USERATIOLOCKS FALSE
  309. #define DEFAULT_TIMERRESOLUTION 33
  310. #define DEFAULT_TOOLTIPS TRUE
  311. #define DEFAULT_TEXTSPEED 1.0f/3.0f
  312. #define UTF8 0
  313. #define WANT_UTF8_WARNINGS
  314. //#define DROP_BITMAP_ON_IDLE
  315. //#include "../../bfc/api/api_system.h"
  316. #include <api/application/api_application.h>
  317. #include <api/service/api_service.h>
  318. #include <api/syscb/api_syscb.h>
  319. #ifdef WASABI_COMPILE_MEMMGR
  320. # include <api/memmgr/api_memmgr.h>
  321. #endif
  322. #ifdef WASABI_COMPILE_SCRIPT
  323. # include <api/script/api_maki.h>
  324. #endif
  325. #ifdef WASABI_COMPILE_FONTS
  326. # include <api/font/api_font.h>
  327. #endif
  328. #ifdef WASABI_COMPILE_WND
  329. # include <api/wnd/api_wnd.h>
  330. #endif
  331. #ifdef WASABI_COMPILE_IMGLDR
  332. # include <api/imgldr/api_imgldr.h>
  333. #endif
  334. #ifdef WASABI_COMPILE_FILEREADER
  335. # include <api/filereader/api_filereader.h>
  336. #endif
  337. #ifdef WASABI_COMPILE_TIMERS
  338. # include <api/timer/api_timer.h>
  339. #endif
  340. #ifdef WASABI_COMPILE_WNDMGR
  341. # include <api/wndmgr/api_wndmgr.h>
  342. #endif
  343. #ifdef WASABI_COMPILE_LOCALES
  344. # include <api/locales/api_locales.h>
  345. #endif
  346. #ifdef WASABI_COMPILE_CONFIG
  347. # include <api/config/api_config.h>
  348. #endif
  349. #ifdef WASABI_COMPILE_SKIN
  350. # include <api/skin/api_skin.h>
  351. #endif
  352. #ifdef WASABI_COMPILE_MAKIDEBUG
  353. # include <api/script/debugger/api_makidebug.h>
  354. #endif
  355. #endif