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

📄 lighter.c

📁 A comprehensive code to regulate the LCD backlight of a BREW 3.1. mobile. Used to emulate a torchlig
💻 C
字号:
#include "Lighter.h"

#include "Lighter.bid"
/*===============================================================================
FUNCTION DEFINITIONS
=============================================================================== */

int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj)
{
	*ppObj = NULL;

	if( ClsId == AEECLSID_LIGHTER )
	{
		// Create the applet and make room for the applet structure
		if( AEEApplet_New(sizeof(Lighter),
                          ClsId,
                          pIShell,
                          po,
                          (IApplet**)ppObj,
                          (AEEHANDLER)Lighter_HandleEvent,
                          (PFNFREEAPPDATA)Lighter_FreeAppData) ) // the FreeAppData function is called after sending EVT_APP_STOP to the HandleEvent function
                          
		{
			//Initialize applet data, this is called before sending EVT_APP_START
            // to the HandleEvent function
			if(Lighter_InitAppData((Lighter*)*ppObj))
			{
				//Data initialized successfully
				return(AEE_SUCCESS);
			}
			else
			{
				//Release the applet. This will free the memory allocated for the applet when
				// AEEApplet_New was called.
				IAPPLET_Release((IApplet*)*ppObj);
				return EFAILED;
			}

        } // end AEEApplet_New
    }

	return(EFAILED);
}

static boolean Lighter_HandleEvent(Lighter* pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{  
    switch (eCode) 
	{
        case EVT_APP_START:   
            // 镱滹桉

⌨️ 快捷键说明

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