⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 splashscreen.c

📁 a mobile application for brew plateforms for sharing photos among different users globally.
💻 C
字号:
#include "splashscreen.h"
#define RGB_ITEMBACKCOLOR MAKE_RGBA(255,255,206,255)
int spm_CreateSplashScreen(IForm **pIForm,IShell *pIShell,IRootForm *pIRootForm,IDisplay *pIDisplay)
{
	splashscreen *pMe=(splashscreen *)MALLOC(sizeof(splashscreen));

	int nErr=0;
	WidgetPos dwpos;
	WExtent we;
	WExtent lodwe;
	AECHAR *title1=NULL;
	AECHAR *title2=NULL;
	AECHAR *title3=NULL;
	AECHAR *title4=NULL;
	IWidget *qWidget=NULL;
	IWidget *pIWTitle=NULL;
	IWidget *pIWSoft=NULL;
	pMe->pIRootForm=pIRootForm;
	pMe->pIShell=pIShell;
	pMe->pIDisplay=pIDisplay;
	
	
	title1=(AECHAR*)MALLOC(50);
	title2=(AECHAR*)MALLOC(80);
	title3=(AECHAR*)MALLOC(50);
	title4=(AECHAR*)MALLOC(80);
	
	STRTOWSTR("Send Photo Mobile",title1,40);
	STRTOWSTR("Transfering images and video!",title2,80);
	STRTOWSTR("Loading ",title3,40);
	STRTOWSTR("Copyright:Kleward Consulting Pvt.Ltd",title4,80);
	
	dwpos.x=0;
	dwpos.y=0;
	nErr=ISHELL_CreateInstance(pMe->pIShell,AEECLSID_FORM,(void**)&pMe->pIForm);
	*pIForm=pMe->pIForm;

	nErr=ISHELL_CreateInstance(pMe->pIShell,AEECLSID_XYCONTAINER,(void**)&pMe->pIxy);
	IXYCONTAINER_QueryInterface(pMe->pIxy,AEEIID_WIDGET,(void**)&qWidget);
	IFORM_SetWidget(pMe->pIForm,WID_FORM,qWidget);

	IWIDGET_SetBGColor(qWidget,MAKE_RGB(166,166,255));
	IWIDGET_SetBorderWidth(qWidget,5);
	IWIDGET_SetBorderColor(qWidget,RGB_ITEMBACKCOLOR);





	//Form TitleWidget setting
	IFORM_GetWidget(IROOTFORM_TO_IFORM(pMe->pIRootForm),WID_TITLE,&pIWTitle);
	IWIDGET_SetBGColor(pIWTitle,RGB_ITEMBACKCOLOR);
	//IWIDGET_SetFGColor(pIWTitle,RGB_FORECOLOR);
	//IWIDGET_SetBorderWidth(pIWTitle,1);
	//IWIDGET_SetBorderColor(pIWTitle,RGB_BORDERCOLOR);
	//IFORM_SetResText(pMe->pIForm,FID_TITLE,RES_FILE,TITLE_TEXT);
	//IFORM_SetTitleImage(pMe->pIForm,pITitleImage);
	
	//Form SoftKey Widget Setting
	IFORM_GetWidget(IROOTFORM_TO_IFORM(pMe->pIRootForm),WID_SOFTKEYS,&pIWSoft);
	IWIDGET_SetBGColor(pIWSoft,RGB_ITEMBACKCOLOR);
	//IWIDGET_SetFGColor(pIWSoft,RGB_FORECOLOR);
	//IWIDGET_SetBorderWidth(pIWSoft,1);
	//IWIDGET_SetBorderColor(pIWSoft,RGB_BORDERCOLOR);
	//IFORM_SetResText(pMe->pIForm,FID_SOFTKEY1,RES_FILE,SOFT_KEY1);
	//IFORM_SetResText(pMe->pIForm,FID_SOFTKEY2,RES_FILE,SOFT_KEY2);


	

	// Creating static widget title1
   if(SUCCESS == nErr) {
	   nErr = ISHELL_CreateInstance(pMe->pIShell, AEECLSID_STATICWIDGET, (void**)&pMe->pIWStaticText1);
   }
   if(SUCCESS == nErr) {
      WidgetPos wpos;
      WExtent wex;
	  IWidget *piwQ = pMe->pIWStaticText1;
      IWIDGET_SetText(piwQ,title1, FALSE);
      IWIDGET_SetFontClass(piwQ, AEECLSID_FONTSYSBOLD);
      IWIDGET_SetFlags(piwQ, IDF_ALIGN_LEFT|IDF_ALIGN_MIDDLE);
      IWIDGET_SetPadding(piwQ, 4);
      IWIDGET_SetFGColor(piwQ, MAKE_RGB(255,255,255));
      IWIDGET_GetPreferredExtent(piwQ, &wex);
      IWIDGET_SetExtent(piwQ, &wex);
      wpos.x = 35;
      wpos.y = 50;
      wpos.bVisible = TRUE;
	  IXYCONTAINER_Insert(pMe->pIxy, piwQ, NULL, &wpos);
      
   }

	// Creating static widget title2
   if(SUCCESS == nErr) {
	   nErr = ISHELL_CreateInstance(pMe->pIShell, AEECLSID_STATICWIDGET, (void**)&pMe->pIWStaticText2);
   }
   if(SUCCESS == nErr) {
      WidgetPos wpos;
      WExtent wex;
	  IWidget *piwQ = pMe->pIWStaticText2;
      IWIDGET_SetText(piwQ,title2, FALSE);
      IWIDGET_SetFlags(piwQ, IDF_ALIGN_LEFT|IDF_ALIGN_MIDDLE);
      IWIDGET_SetFGColor(piwQ, MAKE_RGB(255,255,255));
      IWIDGET_GetPreferredExtent(piwQ, &wex);
      IWIDGET_SetExtent(piwQ, &wex);
      wpos.x = 18;
      wpos.y = 95;
      wpos.bVisible = TRUE;
	  IXYCONTAINER_Insert(pMe->pIxy, piwQ, NULL, &wpos);
      
   }

	// Creating static widget title3 loading
   if(SUCCESS == nErr) {
	   nErr = ISHELL_CreateInstance(pMe->pIShell, AEECLSID_STATICWIDGET, (void**)&pMe->pIWStaticText3);
   }
   if(SUCCESS == nErr) {
      WidgetPos wpos;
      WExtent wex;
	  IWidget *piwQ = pMe->pIWStaticText3;
      (void)IWIDGET_SetText(piwQ,title3, FALSE);
      
      (void)IWIDGET_SetFlags(piwQ, IDF_ALIGN_LEFT|IDF_ALIGN_MIDDLE);
      
      (void)IWIDGET_SetFGColor(piwQ, MAKE_RGB(255,255,255));
      IWIDGET_GetPreferredExtent(piwQ, &wex);
      IWIDGET_SetExtent(piwQ, &wex);
      wpos.x = 55;
      wpos.y = 110;
      wpos.bVisible = TRUE;
	  (void)IXYCONTAINER_Insert(pMe->pIxy, piwQ, NULL, &wpos);
      
   }

   // Creating static widget title3 copywrite
   if(SUCCESS == nErr) {
	   nErr = ISHELL_CreateInstance(pMe->pIShell, AEECLSID_STATICWIDGET, (void**)&pMe->pIWStaticText4);
   }
   if(SUCCESS == nErr) {
      WidgetPos wpos;
      WExtent wex;
	  IWidget *piwQ = pMe->pIWStaticText4;
	  (void)IWIDGET_SetText(piwQ,title4, FALSE);
      
      (void)IWIDGET_SetFlags(piwQ, IDF_ALIGN_LEFT|IDF_ALIGN_MIDDLE);
      
      (void)IWIDGET_SetFGColor(piwQ, MAKE_RGB(255,255,255));
      IWIDGET_GetPreferredExtent(piwQ, &wex);
      IWIDGET_SetExtent(piwQ, &wex);
      wpos.x = 2;
      wpos.y = 170;
      wpos.bVisible = TRUE;
	  (void)IXYCONTAINER_Insert(pMe->pIxy, piwQ, NULL, &wpos);
      
   }

   // Loading animation ...
   if(SUCCESS == nErr) {
	   nErr = ISHELL_CreateInstance(pMe->pIShell, AEECLSID_IMAGEWIDGET, (void**)&pMe->pIWImageWidget2);
   }
   if(SUCCESS == nErr) {
		IImage *pIImage=ISHELL_LoadResImage(pMe->pIShell,RES_FILE,LOAD_IMAGE);
      WidgetPos wpos;
      WExtent wex;
	  IWidget *piwQ = pMe->pIWImageWidget2;

	  IWIDGET_SetImage(piwQ,pIImage);
	  IWIDGET_Animate(piwQ,TRUE);
      IWIDGET_GetPreferredExtent(piwQ, &wex);
      IWIDGET_SetExtent(piwQ, &wex);
      wpos.x =90 ;
      wpos.y = 110;
      wpos.bVisible = TRUE;
	  (void)IXYCONTAINER_Insert(pMe->pIxy, piwQ, NULL, &wpos);
      
   }



   // Loading application Icon
   if(SUCCESS == nErr) {
	   nErr = ISHELL_CreateInstance(pMe->pIShell, AEECLSID_IMAGEWIDGET, (void**)&pMe->pIWImageWidget1);
   }
   if(SUCCESS == nErr) {
		IImage *pIImage=ISHELL_LoadResImage(pMe->pIShell,RES_FILE,LOAD_ICON);
      WidgetPos wpos;
      WExtent wex;
	  IWidget *piwQ = pMe->pIWImageWidget1;

	  IWIDGET_SetImage(piwQ,pIImage);
      IWIDGET_GetPreferredExtent(piwQ, &wex);
      IWIDGET_SetExtent(piwQ, &wex);
      wpos.x =75 ;
      wpos.y = 70;
      wpos.bVisible = TRUE;
	  (void)IXYCONTAINER_Insert(pMe->pIxy, piwQ, NULL, &wpos);
      
   }


	return nErr;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -