init_notifier.m 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. /*---------------------------------------------------
  2. -----------------------------------------------------
  3. Filename: init_notifier.m
  4. Type: maki/attrib definitions
  5. Version: 1.1
  6. Date: 12. Jul. 2006 - 16:15
  7. Author: Martin Poehlmann aka Deimos
  8. E-Mail: [email protected]
  9. Internet: www.skinconsortium.com
  10. www.martin.deimos.de.vu
  11. -----------------------------------------------------
  12. Depending Files:
  13. wasabi/notifier/notifier.maki
  14. -----------------------------------------------------
  15. ---------------------------------------------------*/
  16. #ifndef included
  17. #error This script can only be compiled as a #include
  18. #endif
  19. #include "gen_pageguids.m"
  20. Function initAttribs_notifier();
  21. #define CUSTOM_PAGE_NOTIFIER "{1AB968B3-8687-4a35-BA70-FCF6D92FB57F}"
  22. #define CUSTOM_PAGE_NOTIFIER_AA "{7BF45B05-2B98-4de8-8778-E5CCC9639ED1}"
  23. #define CUSTOM_PAGE_NOTIFIER_LOC "{715B2C0D-1DF0-4bb2-9D74-0FACAE27CE97}"
  24. #define CUSTOM_PAGE_NOTIFIER_FDIN "{D9891A39-7A38-45d8-9D51-A08F7270C836}"
  25. #define CUSTOM_PAGE_NOTIFIER_FDOUT "{560EAE41-1379-4927-AC55-FB5F4D47C9B8}"
  26. Global ConfigAttribute notifier_minimized_attrib;
  27. Global ConfigAttribute notifier_always_attrib;
  28. Global ConfigAttribute notifier_never_attrib;
  29. Global ConfigAttribute notifier_fadeintime_attrib;
  30. Global ConfigAttribute notifier_fadeouttime_attrib;
  31. Global ConfigAttribute notifier_holdtime_attrib;
  32. Global ConfigAttribute notifier_hideinfullscreen_attrib;
  33. Global ConfigAttribute notifier_windowshade_attrib;
  34. //Global ConfigAttribute notifier_opennowplaying_attrib;
  35. Global ConfigAttribute notifier_artworkinnotification_attrib;
  36. Global ConfigAttribute notifier_fdout_alpha;
  37. Global ConfigAttribute notifier_fdout_hslide;
  38. Global ConfigAttribute notifier_fdout_vslide;
  39. Global ConfigAttribute notifier_fdin_alpha;
  40. Global ConfigAttribute notifier_fdin_hslide;
  41. Global ConfigAttribute notifier_fdin_vslide;
  42. Global ConfigAttribute notifier_loc_br_attrib;
  43. Global ConfigAttribute notifier_loc_bl_attrib;
  44. Global ConfigAttribute notifier_loc_tr_attrib;
  45. Global ConfigAttribute notifier_loc_tl_attrib;
  46. Global ConfigAttribute notifier_loc_bc_attrib;
  47. Global ConfigAttribute notifier_loc_tc_attrib;
  48. Global ConfigAttribute notifier_loc_vport_attrib;
  49. Global ConfigAttribute notifier_loc_monitor_attrib;
  50. initAttribs_notifier()
  51. {
  52. initPages();
  53. ConfigItem custom_page_notifier = addConfigSubMenu(optionsmenu_page, "Notifications", CUSTOM_PAGE_NOTIFIER);
  54. notifier_always_attrib = custom_page_notifier.newAttribute("Show always", "1");
  55. notifier_windowshade_attrib = custom_page_notifier.newAttribute("Show with windowshade and when minimized", "0");
  56. notifier_minimized_attrib = custom_page_notifier.newAttribute("Show only when minimized", "0");
  57. notifier_minimized_attrib = custom_page_notifier.newAttribute("Show only when minimized", "0");
  58. notifier_never_attrib = custom_page_notifier.newAttribute("Never show", "0");
  59. addMenuSeparator(custom_page_notifier);
  60. ConfigItem custom_page_notifier_loc = addConfigSubMenu(custom_page_notifier, "Location", CUSTOM_PAGE_NOTIFIER_LOC);
  61. ConfigItem custom_page_notifier_fdin = addConfigSubMenu(custom_page_notifier, "Fade In Effect", CUSTOM_PAGE_NOTIFIER_FDIN);
  62. ConfigItem custom_page_notifier_fdout = addConfigSubMenu(custom_page_notifier, "Fade Out Effect", CUSTOM_PAGE_NOTIFIER_FDOUT);
  63. addMenuSeparator(custom_page_notifier);
  64. notifier_hideinfullscreen_attrib = custom_page_notifier.newAttribute("Disable in fullscreen", "1");
  65. addMenuSeparator(custom_page_notifier);
  66. //notifier_opennowplaying_attrib = custom_page_notifier.newAttribute("Open Now Playing on Click", "1");
  67. sep = custom_page_notifier.newAttribute("sep333", ""); sep.setData("-");
  68. notifier_artworkinnotification_attrib = custom_page_notifier.newAttribute("Show Now Playing Artwork", "1");
  69. notifier_fadeintime_attrib = custom_page_nonexposed.newAttribute("Notifications fade in time", "1000");
  70. notifier_fadeouttime_attrib = custom_page_nonexposed.newAttribute("Notifications fade out time", "5000");
  71. notifier_holdtime_attrib = custom_page_nonexposed.newAttribute("Notifications display time", "2000");
  72. // Notifications > Location
  73. notifier_loc_bl_attrib = custom_page_notifier_loc.newAttribute("Bottom Left", "0");
  74. notifier_loc_bc_attrib = custom_page_notifier_loc.newAttribute("Bottom Center", "0");
  75. notifier_loc_br_attrib = custom_page_notifier_loc.newAttribute("Bottom Right", "1");
  76. notifier_loc_tl_attrib = custom_page_notifier_loc.newAttribute("Top Left", "0");
  77. notifier_loc_tc_attrib = custom_page_notifier_loc.newAttribute("Top Center", "0");
  78. notifier_loc_tr_attrib = custom_page_notifier_loc.newAttribute("Top Right", "0");
  79. addMenuSeparator(custom_page_notifier_loc);
  80. notifier_loc_vport_attrib = custom_page_notifier_loc.newAttribute("Relative to Viewport", "1");
  81. notifier_loc_monitor_attrib = custom_page_notifier_loc.newAttribute("Relative to Monitor", "0");
  82. // Notifications > Fade...
  83. notifier_fdout_alpha = custom_page_notifier_fdout.newAttribute("Alpha Fade ", "1");
  84. notifier_fdout_vslide = custom_page_notifier_fdout.newAttribute("Vertical Slide ", "0");
  85. notifier_fdout_hslide = custom_page_notifier_fdout.newAttribute("Horizontal Slide ", "0");
  86. // Martin> We need a additional spacer for the last 3 attribs, so we won't cross withe the 3 below in studio.xnf
  87. notifier_fdin_alpha = custom_page_notifier_fdin.newAttribute("Alpha Fade", "1");
  88. notifier_fdin_vslide = custom_page_notifier_fdin.newAttribute("Vertical Slide", "0");
  89. notifier_fdin_hslide = custom_page_notifier_fdin.newAttribute("Horizontal Slide", "0");
  90. }
  91. #ifdef MAIN_ATTRIBS_MGR
  92. notifier_always_attrib.onDataChanged()
  93. {
  94. if (attribs_mychange) return;
  95. NOOFF
  96. attribs_mychange = 1;
  97. notifier_never_attrib.setData("0");
  98. notifier_minimized_attrib.setData("0");
  99. notifier_windowshade_attrib.setData("0");
  100. attribs_mychange = 0;
  101. }
  102. notifier_never_attrib.onDataChanged()
  103. {
  104. if (attribs_mychange) return;
  105. NOOFF
  106. attribs_mychange = 1;
  107. notifier_always_attrib.setData("0");
  108. notifier_minimized_attrib.setData("0");
  109. notifier_windowshade_attrib.setData("0");
  110. attribs_mychange = 0;
  111. }
  112. notifier_minimized_attrib.onDataChanged()
  113. {
  114. if (attribs_mychange) return;
  115. NOOFF
  116. attribs_mychange = 1;
  117. notifier_never_attrib.setData("0");
  118. notifier_always_attrib.setData("0");
  119. notifier_windowshade_attrib.setData("0");
  120. attribs_mychange = 0;
  121. }
  122. notifier_windowshade_attrib.onDataChanged()
  123. {
  124. if (attribs_mychange) return;
  125. NOOFF
  126. attribs_mychange = 1;
  127. notifier_never_attrib.setData("0");
  128. notifier_always_attrib.setData("0");
  129. notifier_minimized_attrib.setData("0");
  130. attribs_mychange = 0;
  131. }
  132. notifier_fdout_alpha.onDataChanged()
  133. {
  134. if (attribs_mychange) return;
  135. NOOFF
  136. attribs_mychange = 1;
  137. notifier_fdout_hslide.setData("0");
  138. notifier_fdout_vslide.setData("0");
  139. attribs_mychange = 0;
  140. }
  141. notifier_fdout_hslide.onDataChanged()
  142. {
  143. if (attribs_mychange) return;
  144. NOOFF
  145. attribs_mychange = 1;
  146. notifier_fdout_alpha.setData("0");
  147. notifier_fdout_vslide.setData("0");
  148. attribs_mychange = 0;
  149. }
  150. notifier_fdout_vslide.onDataChanged()
  151. {
  152. if (attribs_mychange) return;
  153. NOOFF
  154. attribs_mychange = 1;
  155. notifier_fdout_hslide.setData("0");
  156. notifier_fdout_alpha.setData("0");
  157. attribs_mychange = 0;
  158. }
  159. notifier_fdin_alpha.onDataChanged()
  160. {
  161. if (attribs_mychange) return;
  162. NOOFF
  163. attribs_mychange = 1;
  164. notifier_fdin_hslide.setData("0");
  165. notifier_fdin_vslide.setData("0");
  166. attribs_mychange = 0;
  167. }
  168. notifier_fdin_hslide.onDataChanged()
  169. {
  170. if (attribs_mychange) return;
  171. NOOFF
  172. attribs_mychange = 1;
  173. notifier_fdin_alpha.setData("0");
  174. notifier_fdin_vslide.setData("0");
  175. attribs_mychange = 0;
  176. }
  177. notifier_fdin_vslide.onDataChanged()
  178. {
  179. if (attribs_mychange) return;
  180. NOOFF
  181. attribs_mychange = 1;
  182. notifier_fdin_hslide.setData("0");
  183. notifier_fdin_alpha.setData("0");
  184. attribs_mychange = 0;
  185. }
  186. notifier_loc_br_attrib.onDataChanged()
  187. {
  188. if (attribs_mychange) return;
  189. NOOFF
  190. attribs_mychange = 1;
  191. notifier_loc_bl_attrib.setData("0");
  192. notifier_loc_tr_attrib.setData("0");
  193. notifier_loc_tl_attrib.setData("0");
  194. notifier_loc_tc_attrib.setData("0");
  195. notifier_loc_bc_attrib.setData("0");
  196. attribs_mychange = 0;
  197. }
  198. notifier_loc_bl_attrib.onDataChanged()
  199. {
  200. if (attribs_mychange) return;
  201. NOOFF
  202. attribs_mychange = 1;
  203. notifier_loc_br_attrib.setData("0");
  204. notifier_loc_tr_attrib.setData("0");
  205. notifier_loc_tl_attrib.setData("0");
  206. notifier_loc_tc_attrib.setData("0");
  207. notifier_loc_bc_attrib.setData("0");
  208. attribs_mychange = 0;
  209. }
  210. notifier_loc_tl_attrib.onDataChanged()
  211. {
  212. if (attribs_mychange) return;
  213. NOOFF
  214. attribs_mychange = 1;
  215. notifier_loc_bl_attrib.setData("0");
  216. notifier_loc_tr_attrib.setData("0");
  217. notifier_loc_br_attrib.setData("0");
  218. notifier_loc_tc_attrib.setData("0");
  219. notifier_loc_bc_attrib.setData("0");
  220. attribs_mychange = 0;
  221. }
  222. notifier_loc_tr_attrib.onDataChanged()
  223. {
  224. if (attribs_mychange) return;
  225. NOOFF
  226. attribs_mychange = 1;
  227. notifier_loc_bl_attrib.setData("0");
  228. notifier_loc_br_attrib.setData("0");
  229. notifier_loc_tl_attrib.setData("0");
  230. notifier_loc_tc_attrib.setData("0");
  231. notifier_loc_bc_attrib.setData("0");
  232. attribs_mychange = 0;
  233. }
  234. notifier_loc_tc_attrib.onDataChanged()
  235. {
  236. if (attribs_mychange) return;
  237. NOOFF
  238. attribs_mychange = 1;
  239. notifier_loc_bl_attrib.setData("0");
  240. notifier_loc_br_attrib.setData("0");
  241. notifier_loc_tl_attrib.setData("0");
  242. notifier_loc_tr_attrib.setData("0");
  243. notifier_loc_bc_attrib.setData("0");
  244. attribs_mychange = 0;
  245. }
  246. notifier_loc_bc_attrib.onDataChanged()
  247. {
  248. if (attribs_mychange) return;
  249. NOOFF
  250. attribs_mychange = 1;
  251. notifier_loc_bl_attrib.setData("0");
  252. notifier_loc_br_attrib.setData("0");
  253. notifier_loc_tl_attrib.setData("0");
  254. notifier_loc_tc_attrib.setData("0");
  255. notifier_loc_tr_attrib.setData("0");
  256. attribs_mychange = 0;
  257. }
  258. notifier_loc_vport_attrib.onDataChanged()
  259. {
  260. if (attribs_mychange) return;
  261. NOOFF
  262. attribs_mychange = 1;
  263. notifier_loc_monitor_attrib.setData("0");
  264. attribs_mychange = 0;
  265. }
  266. notifier_loc_monitor_attrib.onDataChanged()
  267. {
  268. if (attribs_mychange) return;
  269. NOOFF
  270. attribs_mychange = 1;
  271. notifier_loc_vport_attrib.setData("0");
  272. attribs_mychange = 0;
  273. }
  274. #endif