Beispiel #1
0
Extension::Extension(RUNDATA * _rdPtr, EDITDATA * edPtr, CreateObjectInfo * cobPtr)
    : rdPtr(_rdPtr), rhPtr(_rdPtr->rHo.AdRunHeader), Runtime(_rdPtr)
{
    /*
        Link all your action/condition/expression functions to their IDs to match the
        IDs in the JSON here
    */

    LinkAction(0, ActionExample);
    LinkAction(1, SecondActionExample);

    LinkCondition(0, AreTwoNumbersEqual);

    LinkExpression(0, Add);
    LinkExpression(1, HelloWorld);



    /*
        This is where you'd do anything you'd do in CreateRunObject in the original SDK

        It's the only place you'll get access to edPtr at runtime, so you should transfer
        anything from edPtr to the extension class here.
    
    */


    
}
Beispiel #2
0
Extension::Extension(LPRDATA _rdPtr, LPEDATA edPtr, fpcob cobPtr)
    : rdPtr(_rdPtr), rhPtr(_rdPtr->rHo.hoAdRunHeader), Runtime(_rdPtr)
{
    /*
        Link all your action/condition/expression functions to their IDs to match the
        IDs in the JSON here
    */

    LinkAction(0, ChangeTempo);
    LinkAction(1, ChangePitch);
	LinkAction(2, ChangePlayBackRate);

    LinkCondition(0, OnError);

    LinkExpression(0, GetVersion);
	LinkExpression(1, LastError);
	

    /*
        This is where you'd do anything you'd do in CreateRunObject in the original SDK

        It's the only place you'll get access to edPtr at runtime, so you should transfer
        anything from edPtr to the extension class here.
    
    */
	sndVersion = soundtouch_getVersionId();
	_snwprintf_s(lastError, _countof(lastError),ERRORSIZE,ErrorS[noError]);
	_snwprintf_s(errorTemp, _countof(errorTemp),ERRORSIZE,ErrorS[noError]);
	sampleRate=0;
	channels=0;
	speechEnabled=edPtr->speechEnabled;
}
Extension::Extension(LPRDATA _rdPtr, LPEDATA edPtr, fpcob cobPtr)
    : rdPtr(_rdPtr), rhPtr(_rdPtr->rHo.hoAdRunHeader), Runtime(_rdPtr)
{
    /*
        Link all your action/condition/expression functions to their IDs to match the
        IDs in the JSON here
    */

	LinkAction(0, AddNewMacro);
	LinkAction(1, ClearMacros);

	LinkExpression(0, AutoReplace);
	LinkExpression(1, ReplaceThisCall);


    /*
        This is where you'd do anything you'd do in CreateRunObject in the original SDK

        It's the only place you'll get access to edPtr at runtime, so you should transfer
        anything from edPtr to the extension class here.
    
    */


    
}
Beispiel #4
0
Extension::Extension(RUNDATA * _rdPtr, EDITDATA * edPtr, CreateObjectInfo * cobPtr)
    : rdPtr(_rdPtr), rhPtr(_rdPtr->rHo.AdRunHeader), Runtime(_rdPtr)
{
    /*
        Link all your action/condition/expression functions to their IDs to match the
        IDs in the JSON here
    */

    LinkExpression(0, UTF16CharToUTF16Int);
	LinkExpression(1, UTF16IntToUTF16Char);
	LinkExpression(2, UTF16StrFromUTF16Mem);
	LinkExpression(3, UTF16StrFromUTF8Mem);
#if 0==1
	LinkExpression(2, UTF16CharToUTF8Int );
	LinkExpression(3, UTF8IntToUTF16Char);
#endif

	LinkAction(0, UTF16StrToUTF8Mem);


    /*
        This is where you'd do anything you'd do in CreateRunObject in the original SDK

        It's the only place you'll get access to edPtr at runtime, so you should transfer
        anything from edPtr to the extension class here.
    
    */


    
}
Beispiel #5
0
/******************************************************************************
  ParseConfig - Parse the configuration file fvwm to us to use
    Based on part of main() from FvwmIdent:
      Copyright 1994, Robert Nation and Nobutaka Suzuki.
******************************************************************************/
void ParseConfig(void)
{
    char *tline;

    GetConfigLine(Fvwm_fd,&tline);
    while(tline != (char *)0)
    {
        if(strlen(tline)>1)
        {
            if(strncasecmp(tline, CatString3(Module, "Font",""),Clength+4)==0)
                CopyString(&font_string,&tline[Clength+4]);
            else if(strncasecmp(tline,CatString3(Module,"Fore",""), Clength+4)==0)
                CopyString(&ForeColor[0],&tline[Clength+4]);
            else if(strncasecmp(tline,CatString3(Module,"IconFore",""), Clength+8)==0)
                CopyString(&ForeColor[1],&tline[Clength+8]);
            else if(strncasecmp(tline,CatString3(Module,"FocusFore",""), Clength+9)==0)
            {
                CopyString(&ForeColor[2],&tline[Clength+9]);
                CopyString(&ForeColor[3],&tline[Clength+9]);
            }
            else if(strncasecmp(tline,CatString3(Module, "Geometry",""), Clength+8)==0)
                CopyString(&geometry,&tline[Clength+8]);
            else if(strncasecmp(tline,CatString3(Module, "Back",""), Clength+4)==0)
                CopyString(&BackColor[0],&tline[Clength+4]);
            else if(strncasecmp(tline,CatString3(Module,"IconBack",""), Clength+8)==0)
                CopyString(&BackColor[1],&tline[Clength+8]);
            else if(strncasecmp(tline,CatString3(Module,"FocusBack",""), Clength+9)==0)
            {
                CopyString(&BackColor[2],&tline[Clength+9]);
                CopyString(&BackColor[3],&tline[Clength+9]);
            }
            else if(strncasecmp(tline,CatString3(Module, "NoAnchor",""),
                                Clength+8)==0) Anchor=0;
            else if(strncasecmp(tline,CatString3(Module, "Action",""), Clength+6)==0)
                LinkAction(&tline[Clength+6]);
            else if(strncasecmp(tline,CatString3(Module, "UseSkipList",""),
                                Clength+11)==0) UseSkipList=1;
            else if(strncasecmp(tline,CatString3(Module, "UseIconNames",""),
                                Clength+12)==0) UseIconNames=1;
            else if(strncasecmp(tline,CatString3(Module, "ShowCurrentDesk",""),
                                Clength+15)==0) ShowCurrentDesk=1;
            else if(strncasecmp(tline,CatString3(Module, "LeftJustify",""),
                                Clength+11)==0) LeftJustify=1;
            else if(strncasecmp(tline,CatString3(Module, "TruncateLeft",""),
                                Clength+12)==0) TruncateLeft=1;
            else if(strncasecmp(tline,CatString3(Module, "MinWidth",""),
                                Clength+8)==0) MinWidth=atoi(&tline[Clength+8]);
            else if(strncasecmp(tline,CatString3(Module, "MaxWidth",""),
                                Clength+8)==0) MaxWidth=atoi(&tline[Clength+8]);
            else if(strncasecmp(tline,CatString3(Module, "DontDepressFocus",""),
                                Clength+16)==0) ShowFocus=0;
        }
        GetConfigLine(Fvwm_fd,&tline);
    }
}
Extension::Extension(LPRDATA _rdPtr, LPEDATA edPtr, fpcob cobPtr)
	: rdPtr(_rdPtr), rhPtr(_rdPtr->rHo.hoAdRunHeader), Runtime(_rdPtr)
{
	LinkAction(0, ReturnToRoot);
	LinkAction(1, EnterSubnode);
	LinkAction(2, GotoNodeByID);
	LinkAction(3, AddNodeByID);
	LinkAction(4, SetInt);
	LinkAction(5, SetFloat);
	LinkAction(6, SetString);
	LinkAction(7, RemoveSubnode);
	LinkAction(8, RemoveNodeByID);
	LinkAction(9, RemoveInt);
	LinkAction(10,RemoveFloat);
	LinkAction(11,RemoveString);
	LinkAction(12,CreateSubnode);
	LinkAction(13,IterateNodes);
	LinkAction(14,IterateSubnodes);
	LinkAction(15,IterateInts);
	LinkAction(16,IterateFloats);
	LinkAction(17,IterateStrings);
	LinkAction(18,ClearAll);

	LinkCondition(0,			NodeExists);
	LinkCondition(1,			NodeExistsByID);
	LinkCondition(2,			IntExists);
	LinkCondition(3,			FloatExists);
	LinkCondition(4,			StringExists);
	LinkCondition(TOnNode,		OnNode);
	LinkCondition(TOnSubnode,	OnSubnode);
	LinkCondition(TOnInt,		OnInt);
	LinkCondition(TOnFloat,		OnFloat);
	LinkCondition(TOnString,	OnString);

	LinkExpression(0, NodeID);
	LinkExpression(1, Int);
	LinkExpression(2, Float);
	LinkExpression(3, String);
	LinkExpression(4, SubnodeName);
	LinkExpression(5, IntName);
	LinkExpression(6, FloatName);
	LinkExpression(7, StringName);

	root = new SDNode();
	cur = root;
	Nit = 0;
}