📄 helloworld.c
字号:
/*===========================================================================
FILE: Helloworld.c
SERVICES: Sample applet using AEE
DESCRIPTION
This file contains a very simple sample application that displays the
"Hello World" on the display.
PUBLIC CLASSES:
N/A
INITIALIZATION AND SEQUENCING REQUIREMENTS:
The following explanation applies to this sample containing one applet which serves
as a base for app developers to create their own applets using AEE Services:
In the applet source file (like this one), include AEEAppGen.h.
Mandatory Sections in Applet Source (this file):
-----------------------------------------------
Following Mandatory Sections are required for each applet source file.
(Search for "Mandatory" to identify these sections)
Includes:
Copy this section as-is from the sample applet. It contains:
AEEAppGen.h: For AEEApplet declaration
Type Declarations:
A data structure is usually defined to hold the app specific data. In this structure,
the first element must be of type AEEApplet. Note that this simple example does
not require any additional data, so this step has been removed.
Functions: (For more details, see corresponding function description in this applet)
App_HandleEvent(): This function is the Event Handler for the applet.
Copy the function outline from the sample applet and add app
specific code.
AEEClsCreateInstance(): This function is called to create an instance of the applet.
It is called by AEEModGen when applet is being created.
Important Notes:
---------------
1. DO NOT use any "static data" in the applet. Always use the functions exported by
AEEStdlib or by IHeap services to dynamically allocate data and make it a member of
the applet structure.
2. DO NOT include and link "standard C library". Use AEE Memory Services (in AEEHeap.h) and Standard Library macros(in AEEStdLib.h).
For example, use MALLOC() to allocate memory, WSTRCPY() to make a copy of Unicode (wide) string.
3. BREW is Unicode(wide string) compliant ONLY (no ISOLATIN1/ANSI) except for file names which are ISOLATIN1/ANSI.
ALWAYS USE AECHAR instead of "char". Use string services provided in AEEStdLib.h for string manipulation.
4. It is always a good idea to DEFINE RESOURCES using BREW ResourceEditor. Make Strings, Bitmaps, Dialogs, etc.
as resources. ResourceEditor saves resources as .bri file, generates resource header file
and compiles .bri into a .bar binary file, which can be used by the applet.
Miscellanoeus Notes:
-------------------
1. Make sure that the class ID used for the app is the same as that defined corresponding in .MIF file
2. Always make sure that compiled resource (.bar) file and corresponding
resource header (a) reside in app directory and (b) are included in the applet code.
Define a constant APP_RES_FILE containing the name of the compiled resource file (with .bar extension).
More than one applet:
--------------------
If more than one applet needs to be defined, then do the following
(1) Follow the above description for each applet
Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -