/* snapeedit.pkg : editeur du plugin WMP - dec 99*/ typeof plugin=S;; typeof class=S;; typeof ed = PluginEditor;; typeof InitURL = ObjText;; typeof RegOnly = ObjCheck;; fun testinst(l,c)= if l==nil then 0 else let l->[a n] in if !strcmp a.classInst c then 1 else testinst n c;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun openedit(win,param)= let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in ( set ed = startPluginEditor _channel win 0 0 w h WN_CHILDINSIDE|WN_NOBORDER class; _CRtext _channel ed.PluginEditorEditWin 5 5 110 20 ET_ALIGN_LEFT "URL :"; set InitURL = _CReditLine _channel ed.PluginEditorEditWin 120 5 w-120 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL getInfo l "init"; set RegOnly = _SETcheck _CRcheck _channel ed.PluginEditorEditWin 5 35 w-20 20 0 "Send video to registered clients only" if !strcmpi getInfo l "registeredClientsOnly" "yes" then 1 else 0; 0 );; fun closeedit()= strbuild ("registeredClientsOnly"::(let _GETcheck RegOnly -> x in if x then "yes" else "no")::nil):: ("init"::(_GETtext InitURL)::nil)::nil;; /* strcat "InitURL " _GETtext InitURL;; */ fun savesuppdmi(l)= if l==nil then nil /* supplemental Dmi */ else let l->[a n] in ("actionC"::(strcat a.nameInst ".play")::nil):: ("action"::(strcat a.nameInst ".playAll")::nil):: ("actionC"::(strcat a.nameInst ".stop")::nil):: ("action"::(strcat a.nameInst ".stopAll")::nil):: ("actionC"::(strcat a.nameInst ".pause")::nil):: ("action"::(strcat a.nameInst ".pauseAll")::nil):: ("actionC"::(strcat a.nameInst ".mute")::nil):: ("actionC"::(strcat a.nameInst ".up")::nil):: ("actionC"::(strcat a.nameInst ".down")::nil):: ("actionC"::(strcat a.nameInst ".isseekable")::nil):: ("actionC"::(strcat a.nameInst ".seekfor")::nil):: ("actionC"::(strcat a.nameInst ".seekback")::nil):: ("actionC"::(strcat a.nameInst ".getposlength")::nil):: ("action"::(strcat a.nameInst ".register")::nil):: ("action"::(strcat a.nameInst ".unregister")::nil):: savesuppdmi n;; fun save(l)= if l==nil then [nil nil nil nil] else [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ savesuppdmi l /* supplemental Dmi */ ];; fun IniPlug(file)= set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit;;