コード例 #1
0
ファイル: GDD_Screens.c プロジェクト: 12019/smartcard_spy
/***************************************************
* Function 	:    CreatecurrentlyRecordingScreen
* Parameters 	:    none
* Return 	:    none
* Description	:    Creates GOL widgets used in screen - currentlyRecordingScreen
***************************************************/
void CreatecurrentlyRecordingScreen(void)
{
    GOLFree();
    SetColor(50712);
    ClearDevice();

    if(defscheme != NULL) free(defscheme);

    defscheme = GOLCreateScheme();
    defscheme->Color0 = RGBConvert(72, 140, 248);
    defscheme->Color1 = RGBConvert(248, 184, 72);
    defscheme->TextColor0 = RGBConvert(248, 184, 72);
    defscheme->TextColor1 = RGBConvert(0, 0, 248);
    defscheme->EmbossDkColor = RGBConvert(24, 0, 224);
    defscheme->EmbossLtColor = RGBConvert(168, 216, 232);
    defscheme->TextColorDisabled = RGBConvert(184, 184, 184);
    defscheme->ColorDisabled = RGBConvert(208, 224, 240);
    defscheme->CommonBkColor = RGBConvert(208, 236, 240);
    defscheme->pFont = (void*)&Gentium_Plain_0_0_22;


    if(cardSpyScheme != NULL) free(cardSpyScheme);

    cardSpyScheme = GOLCreateScheme();
    cardSpyScheme->Color0 = RGBConvert(48, 48, 48);
    cardSpyScheme->Color1 = RGBConvert(152, 152, 152);
    cardSpyScheme->TextColor0 = RGBConvert(200, 204, 200);
    cardSpyScheme->TextColor1 = RGBConvert(96, 100, 96);
    cardSpyScheme->EmbossDkColor = RGBConvert(200, 204, 200);
    cardSpyScheme->EmbossLtColor = RGBConvert(200, 204, 200);
    cardSpyScheme->TextColorDisabled = RGBConvert(184, 184, 184);
    cardSpyScheme->ColorDisabled = RGBConvert(200, 204, 248);
    cardSpyScheme->CommonBkColor = RGBConvert(248, 252, 248);
    cardSpyScheme->pFont = (void*)&Ubuntu_Bold_0_0_18;

    WINDOW *pcurrentlyRecordingScreen_currentlyRecordingScreen;
    pcurrentlyRecordingScreen_currentlyRecordingScreen=WndCreate(currentlyRecordingScreen_currentlyRecordingScreen,0,0,319,239,24576,NULL, (XCHAR*)currentlyRecordingScreen_currentlyRecordingScreentext,cardSpyScheme);
    if(pcurrentlyRecordingScreen_currentlyRecordingScreen==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

    BUTTON *pcurrentlyRecordingScreen_BTN_2;
    pcurrentlyRecordingScreen_BTN_2=BtnCreate(currentlyRecordingScreen_BTN_2,0,195,110,235,0,16386 , NULL , (XCHAR*)currentlyRecordingScreen_BTN_2text,cardSpyScheme);
    if(pcurrentlyRecordingScreen_BTN_2==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

    BUTTON *pcurrentlyRecordingScreen_BTN_3;
    pcurrentlyRecordingScreen_BTN_3=BtnCreate(currentlyRecordingScreen_BTN_3,205,195,315,235,0,16386 , NULL , (XCHAR*)currentlyRecordingScreen_BTN_3text,cardSpyScheme);
    if(pcurrentlyRecordingScreen_BTN_3==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

}
コード例 #2
0
ファイル: GDD_Screens.c プロジェクト: 12019/smartcard_spy
/***************************************************
* Function 	:    CreaterecordScreen
* Parameters 	:    none
* Return 	:    none
* Description	:    Creates GOL widgets used in screen - recordScreen
***************************************************/
void CreaterecordScreen(void)
{
    GOLFree();
    SetColor(50712);
    ClearDevice();

    if(defscheme != NULL) free(defscheme);

    defscheme = GOLCreateScheme();
    defscheme->Color0 = RGBConvert(72, 140, 248);
    defscheme->Color1 = RGBConvert(248, 184, 72);
    defscheme->TextColor0 = RGBConvert(248, 184, 72);
    defscheme->TextColor1 = RGBConvert(0, 0, 248);
    defscheme->EmbossDkColor = RGBConvert(24, 0, 224);
    defscheme->EmbossLtColor = RGBConvert(168, 216, 232);
    defscheme->TextColorDisabled = RGBConvert(184, 184, 184);
    defscheme->ColorDisabled = RGBConvert(208, 224, 240);
    defscheme->CommonBkColor = RGBConvert(208, 236, 240);
    defscheme->pFont = (void*)&Gentium_Plain_0_0_22;


    if(cardSpyScheme != NULL) free(cardSpyScheme);

    cardSpyScheme = GOLCreateScheme();
    cardSpyScheme->Color0 = RGBConvert(48, 48, 48);
    cardSpyScheme->Color1 = RGBConvert(152, 152, 152);
    cardSpyScheme->TextColor0 = RGBConvert(200, 204, 200);
    cardSpyScheme->TextColor1 = RGBConvert(96, 100, 96);
    cardSpyScheme->EmbossDkColor = RGBConvert(200, 204, 200);
    cardSpyScheme->EmbossLtColor = RGBConvert(200, 204, 200);
    cardSpyScheme->TextColorDisabled = RGBConvert(184, 184, 184);
    cardSpyScheme->ColorDisabled = RGBConvert(200, 204, 248);
    cardSpyScheme->CommonBkColor = RGBConvert(248, 252, 248);
    cardSpyScheme->pFont = (void*)&Ubuntu_Bold_0_0_18;

    WINDOW *precordScreen_recordWindows;
    precordScreen_recordWindows=WndCreate(recordScreen_recordWindows,0,0,319,239,24576,NULL, (XCHAR*)recordScreen_recordWindowstext,cardSpyScheme);
    if(precordScreen_recordWindows==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

    BUTTON *precordScreen_backToHomeButton;
    precordScreen_backToHomeButton=BtnCreate(recordScreen_backToHomeButton,207,197,319,239,0,16384 , NULL , (XCHAR*)recordScreen_backToHomeButtontext,cardSpyScheme);
    if(precordScreen_backToHomeButton==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

    BUTTON *precordScreen_viewLastTraceButton;
    precordScreen_viewLastTraceButton=BtnCreate(recordScreen_viewLastTracedButton,0,197,112,239,0,16384 , NULL , (XCHAR*)recordScreen_viewLastTraceButtontext,cardSpyScheme);
    if(precordScreen_viewLastTraceButton==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

}
コード例 #3
0
ファイル: window4.c プロジェクト: Ukusbobra/open-watcom-v2
extern a_window *W4Open()
{
    a_window    *wnd;

    wnd = WndCreate( "", &W4Info, 0, NULL );
    if( wnd ) WndSetKey( wnd, 1 );
    return( wnd );
}
コード例 #4
0
void AboutOpen( void )
/********************/
{
    if( aboutWindow == NULL ) {
        aboutWindow = WndCreate( LIT( WPROF_TITLE ), &AboutInfo, WND_NO_CLASS, NULL );
    }
    if( aboutWindow != NULL ) {
        WndShowWindow( aboutWindow );
    }
}
コード例 #5
0
ファイル: window5.c プロジェクト: Ukusbobra/open-watcom-v2
extern a_window *W5Open()
{
    a_window    *wnd;
    wnd = WndCreate( "Just some more text", &W5Info, 0, NULL );
    WndRepaint( wnd );
    WndScrollAbs( wnd, 0 );
    WndScrollAbs( wnd, NUM_ROWS );
    WndScrollAbs( wnd, NUM_ROWS/2 );
    return( wnd );
}
コード例 #6
0
ファイル: window5.c プロジェクト: ideafarm/open-watcom-v2
a_window W5Open( void )
{
    a_window    wnd;

    wnd = WndCreate( "Just some more text", &W5Info, 0, NULL );
    WndSetRepaint( wnd );
    WndScrollAbs( wnd, 0 );
    WndScrollAbs( wnd, NUM_ROWS );
    WndScrollAbs( wnd, NUM_ROWS / 2 );
    return( wnd );
}
コード例 #7
0
ファイル: MainDemo.c プロジェクト: Athuli7/Microchip
/*****************************************
 * void CreateMainPage(void)
 *****************************************/
void CreateMainDemoPage(void)
{
	WndCreate
	(
	    ID_WINDOW1,                 // ID
	    0,
	    0,
	    GetMaxX(),
	    GetMaxY(),                  // dimension
	    WND_DRAW,                   // will be dislayed after creation
	    NULL,                       // icon
	    NULL,                       // set text
	    NULL                        // default GOL scheme
	);                              
	
	BtnCreate
	(
	    ID_BUTTON_BACK,             // button ID
	    0,
	    40,                         // left, top corner	
	    NAV_BTN_WIDTH,
	    GetMaxY(),
	    0,                          // right, bottom corner (with radius = 0)
	    BTN_DRAW,                   // will be dislayed after creation
	    NULL,                       // no bitmap	
	    (XCHAR *)"<",               // LEFT arrow as text
	    NULL                        // default GOL scheme
	);                              
	
	BtnCreate
	(
	    ID_BUTTON_NEXT,             // button ID
	    GetMaxX() - NAV_BTN_WIDTH,
	    40,
	    GetMaxX(),
	    GetMaxY(),
	    0,                          // dimension (with radius = 0)
	    BTN_DRAW,                   // will be dislayed and disabled after creation
	    NULL,                       // no bitmap
	    (XCHAR *)">",               // RIGHT arrow as text
	    NULL                        // default GOL scheme
	);                          	 
	 
} 
コード例 #8
0
ファイル: GDD_Screens.c プロジェクト: 12019/smartcard_spy
/***************************************************
* Function 	:    CreateanalysisScreen
* Parameters 	:    none
* Return 	:    none
* Description	:    Creates GOL widgets used in screen - analysisScreen
***************************************************/
void CreateanalysisScreen(void)
{
    GOLFree();
    SetColor(50712);
    ClearDevice();

    if(defscheme != NULL) free(defscheme);

    defscheme = GOLCreateScheme();
    defscheme->Color0 = RGBConvert(72, 140, 248);
    defscheme->Color1 = RGBConvert(248, 184, 72);
    defscheme->TextColor0 = RGBConvert(248, 184, 72);
    defscheme->TextColor1 = RGBConvert(0, 0, 248);
    defscheme->EmbossDkColor = RGBConvert(24, 0, 224);
    defscheme->EmbossLtColor = RGBConvert(168, 216, 232);
    defscheme->TextColorDisabled = RGBConvert(184, 184, 184);
    defscheme->ColorDisabled = RGBConvert(208, 224, 240);
    defscheme->CommonBkColor = RGBConvert(208, 236, 240);
    defscheme->pFont = (void*)&Gentium_Plain_0_0_22;


    if(cardSpyScheme != NULL) free(cardSpyScheme);

    cardSpyScheme = GOLCreateScheme();
    cardSpyScheme->Color0 = RGBConvert(48, 48, 48);
    cardSpyScheme->Color1 = RGBConvert(152, 152, 152);
    cardSpyScheme->TextColor0 = RGBConvert(200, 204, 200);
    cardSpyScheme->TextColor1 = RGBConvert(96, 100, 96);
    cardSpyScheme->EmbossDkColor = RGBConvert(200, 204, 200);
    cardSpyScheme->EmbossLtColor = RGBConvert(200, 204, 200);
    cardSpyScheme->TextColorDisabled = RGBConvert(184, 184, 184);
    cardSpyScheme->ColorDisabled = RGBConvert(200, 204, 248);
    cardSpyScheme->CommonBkColor = RGBConvert(248, 252, 248);
    cardSpyScheme->pFont = (void*)&Ubuntu_Bold_0_0_18;

    WINDOW *panalysisScreen_analysisScreen;
    panalysisScreen_analysisScreen=WndCreate(analysisScreen_analysisScreen,0,0,319,239,24576,NULL, (XCHAR*)analysisScreen_analysisScreentext,cardSpyScheme);
    if(panalysisScreen_analysisScreen==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

    LISTBOX *plistTracesScreen_tracesList;
    plistTracesScreen_tracesList=LbCreate(listTracesScreen_tracesList,0,0,319,200,16392,(XCHAR*)listTracesScreen_tracesListtext,cardSpyScheme);
    if(plistTracesScreen_tracesList==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

    BUTTON *panalysisScreen_changeLevelButton;
    panalysisScreen_changeLevelButton=BtnCreate(analysisScreen_changeLevelButton,207,197,319,239,0,16386 , NULL , (XCHAR*)analysisScreen_changeLevelButtontext,cardSpyScheme);
    if(panalysisScreen_changeLevelButton==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

    BUTTON *panalysisScreen_replaceWithListTracesButton;
    panalysisScreen_replaceWithListTracesButton=BtnCreate(recordScreen_backToHomeButton,0,197,112,239,0,16384 , NULL , (XCHAR*)recordScreen_backToHomeButtontext,cardSpyScheme);
    if(panalysisScreen_replaceWithListTracesButton==NULL)
    {
        CreateError(0);
        while(1); //Fatal Error, Check for memory leak or heap size
    }

}
コード例 #9
0
ファイル: main.c プロジェクト: Tonio5978/stm32-codes
// *****************************************************************************
// Function Name  : main
// Description    : Main program.
// Input          : None
// Output         : None
// Return         : None
// *****************************************************************************
int main(void)
{
#ifdef DEBUG
	debug();
#endif
	int i,j;
		WINDOW * wnd;
		BUTTON * btn;
		GOL_SCHEME *pScheme;


    //  System clock configuration
    RCC_Configuration();  
		  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);  
    // Nested Vector Interrupt Controller configuration
    NVIC_Configuration();   

		LCD_GPIO_Configuration();
		FSMC_LCD_Init();
		USART1_Init();
		ILI9325_Init();
		ILI9325_VerticalScreen();
		ILI9325_GRAMOperation();  //Tell ILI9325 that I'm now starting to write GRAM.
    for(i=0;i<240;i++)
    {
       for(j=0;j<320;j++)
       {
          unsigned int n=i*320+j;
          if(n<25600)
          { 
            ILI9325_WriteWDR(n);
          }   
    
          else if(n<51200)
          { 
            ILI9325_WriteWDR(n);
          }
    
          else if(n<76800)
          { 
            ILI9325_WriteWDR(0xf800);
          }
      } 
		}
			

		ILI9325_FillWindowArea(10,10,100,100,0x001f);

		pScheme = GOLCreateScheme();


		wnd=WndCreate(0,                // ID
                         0,0,GetMaxX(),GetMaxY(),   // whole screen dimension
                         WND_DRAW,                  // set state to draw all
                         NULL,             // icon
                         "Place Title Here.",       // text
                         pScheme);                     // use default GOL scheme
		WndDraw(wnd);

		btn=BtnCreate(1,20,64,50,118,0, BTN_DRAW, NULL, "ON", pScheme);
		BtnDraw(btn);



						    
    while(1)
    {

		}
		

		    
}