Welcome![Sign In][Sign Up]
Location:
Search - brew text

Search list

[BREWBREW_ITextdemo

Description: 一个BREW入门的文本输入程序,可以很好的理解BREW程序的机制.-BREW entry of a text input program can be well understood BREW process.
Platform: | Size: 55081 | Author: 徐权 | Hits:

[GUI Developbrew window manager

Description:

 

Objective
This topic describes how to create a windowed application that will share the display with other applications.
Brew® MP windowed applications need to be written differently than traditional Brew MP applications. Traditional Brew MP applications, when running in the foreground, occupy full screen space and can modify the display at any time. In the windowing framework, multiple applications share the display at the same time and are not allowed to modify the display arbitrarily. A windowed application also needs to create one or more widgets to be used to create the windows.
A windowed application needs to:
·                  Create and initialize one or more widgets to be passed to IWindowMgr_CreateWindow().
The application can implement its own IWidget, or it can make use of an existing IWidget.
·                  Handle the EVT_APP_START_WINDOW event (and create a window).
·                  Implement handlers for visibility changes, focus changes, and extent changes. The implementation of these handlers is dependent on the details of the application.
·                  Draw in two stages:
·                                  Tell the container that drawing is necessary (ICONTAINER_Invalidate()).
·                                  Draw only when told to draw by the container (IWIDGET_Draw()).
Note: A windowed application should not call any functions that modify IDisplay directly. This includes explicit IDisplay function calls or implicit updates, such as calls to IIMAGE_Draw() or ICONTROL_Redraw(). Drawing should happen only on demand, for example, when IWIDGET_Draw() is called for the widget used to create the window. Existing Widget based applications follow these guidelines and, with minor modifications, can be ported to the windowing framework.
Event handling
A windowed application must respond to these events:
EVT_APP_START_WINDOW and EVT_APP_START
A window-based application receives EVT_APP_START_WINDOW first. If the application returns TRUE for this event, the application does not receive EVT_APP_START. If an application needs to support both the environments (window based and non-window based), it should handle both events.
When the application receives EVT_APP_START_WINDOW, it should create one or more windows.
If creation of IWindowMgr0 fails while handling EVT_APP_START_WINDOW, the application should assume that the platform does not support window-based applications. In this case, the application should return FALSE and continue the application logic in the code for EVT_APP_START.
EVT_APP_SUSPEND and EVT_APP_RESUME
After an application returns TRUE for EVT_APP_START_WINDOW, it will not receive EVT_APP_SUSPEND and EVT_APP_RESUME as non-windowed Brew MP applications do. Instead, the application must check for window status events that are sent to the widget through EVT_WDG_SETPROPERTY events. For EVT_WDG_SETPROPERTY events, wParam indicates which property was set, and dwParam specifies the value of the property. When the AEEWindowMgrExt_PROPEX_STATE property has a value of AEEWindowMgrExt_STATE_VISIBLE, the window is visible.
EVT_WDG_WINDOWSTATUS
The EVT_WDG_WINDOWSTATUS event is sent to a widget to notify it about various window related status messages. AEEWindowStatus.h contains information on the meaning of various status messages.
Sample code location

ZIP filename
Location
Run app
hellowindowapp
Brew MP Library
·                       Download and extract the ZIP file.
·                       Compile the app.
·                       Run it on the Brew MP Simulator.

Example of a windowed application
In the hellowindowapp sample, HelloWindowApp_HandleEvent handles the EVT_APP_START_WINDOW event and creates soft key and pop-up windows:
   case EVT_APP_START_WINDOW:   
      DBGPRINTF("EVT_APP_START_WINDOW");
 
      // Create the softkey and popup windows
      HelloWindowApp_CreateSoftkey(pMe);
      HelloWindowApp_CreateOrActivatePopup(pMe);
 
      // Handling this event tells Brew that we are a windowing
      // application.
      return TRUE;  
HelloWindowApp_CreateSoftkey() creates the soft key widget, sets the color text of the widget, then calls HelloWindowApp_CreateWindow() to create the window.
   WidgetWindow *pWindow = &pMe->softkeyWindow;
  
   if (pWindow->piWindowWidget != NULL) return;
   pWindow->pszDbgName = "Softkey";
   pWindow->pMe = pMe;
  
   (void) ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SoftkeyWidget,
            (void **) &pWindow->piWindowWidget);
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WidgetExtent extent = {0, HWA_SOFTKEY_HEIGHT};
      IWidget_SetExtent(pWindow->piWindowWidget, &extent);
   }
  
   (void) IWidget_SetBGColor(pWindow->piWindowWidget, MAKE_RGBA(200,200,200,255));
  
   // Now set the softkeys text
   {
      IWidget *piTextWidget = NULL;
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY1, &piTextWidget);
     
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Hover", TRUE);
      }
      RELEASEIF(piTextWidget);
 
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY2, &piTextWidget);
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Close", TRUE);
      }
      RELEASEIF(piTextWidget);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Softkey);  
HelloWindowApp_CreateWindow() creates the soft key window, as follows:
   int result;
   uint32 winId;
   AEEWindowProp propList[1];
  
   // Set custom window handler
   HANDLERDESC_Init(&pWindow->hdHandler, HelloWindowApp_WindowHandler, pWindow, NULL);
   IWIDGET_SetHandler(pWindow->piWindowWidget, &pWindow->hdHandler);
        
   propList[0].id = AEEWindowMgrExtProp_CLASS;
   propList[0].pbyLen = sizeof(winClass);
   propList[0].pby = (void *) &winClass;
     
   result = IWindowMgr_CreateWindow(pMe->piWindowMgr, (IQI*) (void *) pWindow->piWindowWidget,
      propList, ARR_SIZE(propList), &winId);
 
   if (result != SUCCESS) {
      DBGPRINTF("Window creation failed for %s: %d", pWindow->pszDbgName, result);
      HelloWindowApp_DestroyWindow(pWindow);
   } else {
      DBGPRINTF("Window %s created: id=%d", pWindow->pszDbgName, winId);
   }
HelloWindowApp_CreateOrActivatePopup() creates the widget for the pop-up window, then calls HelloWindowApp_CreateWindow() to create the pop-up window.
   pWindow->piWindowWidget = HelloWindowApp_CreateAndInitImageWidget(
                                pMe,
                                "popups.main" // Image as defined in appinfo.ini
                             );
 
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WExtent extent = {HWA_POPUP_WIDTH, HWA_POPUP_HEIGHT};
      IWIDGET_SetExtent(pWindow->piWindowWidget, &extent);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Popup);
Related information
·                  See Brew MP Widgets Technology Guide: Creating a Widgets application
·                  See Brew MP API Reference

Base version:
Brew MP 1.0
Tested version:
Brew MP 1.0
Phone tested:
No

 

Platform: | Size: 439828 | Author: bluecrest | Hits:

[BREWtextwin

Description: 一个输出文本的brew例子源码--An output text brew example source code
Platform: | Size: 18432 | Author: 站长 | Hits:

[BREWBREW_ITextdemo

Description: 一个BREW入门的文本输入程序,可以很好的理解BREW程序的机制.-BREW entry of a text input program can be well understood BREW process.
Platform: | Size: 55296 | Author: 徐权 | Hits:

[BREWBREWsendMessage

Description: 用BREW发送普通短信的使用方法代码片段讲解-BREW send ordinary text messages with the use of code fragments on the
Platform: | Size: 7168 | Author: 献增 | Hits:

[BREWTextControl_BREW

Description: BREW Text Control in SKYMobile handsets-A presentation in Korean on the implementation of OEMText control in BREW in SKYMobile handsets.
Platform: | Size: 233472 | Author: Kraze | Hits:

[SMSRealization_of_sms_based_on_brew_platform

Description: 通过对BREW平台体系结构的研究,探讨在BREW开放式平台上开发BREW体系的功能应用。特别对发送短信的功能做了开发性地研究,并做出一套切实可行的方案。为达到由BREW应用程序向导来管理各项目的设置,确保BREW能够找到应用程序的.Dll文件!制定出为BREW_Emulator.exe提供路径的有效步骤。在windows XP下利用Visual C++和BREW SDK搭建应用程序开发环境,给出利用BREW的ITAPI_SendSMS()函数来发送中/英文短消息的一种方法,以一个发送短信的范例作为结论。-Through the BREW platform architecture, explore the open-end BREW platform BREW application system functions. In particular, the function of sending an SMS to do a developmental study, and make a practical proposal. In order to achieve by the BREW Application Wizard to manage the various settings, to ensure that BREW applications can be found. Dll document! BREW_Emulator.exe developed for effective steps to provide the path. In windows XP using Visual C++ and BREW SDK to build applications development environment, given the use of BREW-ITAPI_SendSMS () function to send Chinese/English short message as a way to send text messages to a conclusion as an example.
Platform: | Size: 141312 | Author: 刘文文 | Hits:

[BREWTextWrap

Description: brew tutorial for text wrapping
Platform: | Size: 60416 | Author: zanchan | Hits:

[BREWText

Description: 这是有关brew的编程,主要是实现TEXT的应用。有text的输入和清除功能。可以了解到如何使用brew开发TEXT功能。-It is the program about brew .it is a sample about how to use TEXT. you can know how to use text in brew after look at this program.
Platform: | Size: 604160 | Author: 吕江 | Hits:

[Disk Toolshelloworld

Description: 实现brew下的文本绘制 实现brew下的文本绘制 实现brew下的文本绘制-draw text in the brew,draw draw draw draw draw draw draw draw draw draw draw draw draw draw draw draw draw draw draw
Platform: | Size: 4096 | Author: hulda | Hits:

[BREWmytext

Description: 一个简单的brew平台的text例子,比较适合初学者。-A simple example of brew platform text more suitable for beginners.
Platform: | Size: 94208 | Author: asd | Hits:

[BREWmystatic

Description: Brew开发ISTATIC接口实例。ISTATIC接口用于静态文本或图形的显示。-Brew Developer ISTATIC interface instance. ISTATIC interface for static text or graphics display
Platform: | Size: 86016 | Author: 超新星 | Hits:

[BREWmyitapi

Description: Brew接受发送短消息,通过notify软注册接受短消息,使用ITAPI_SendSMS发送消息-Brew receiving text messages sent through the acceptance of short message notify soft registration, send a message using the ITAPI_SendSMS
Platform: | Size: 531456 | Author: liull | Hits:

[BREWbasicapp

Description: basicapp 应用演示了基本BREW UI控件的使用,如菜单,静态文本,文本输入控件等,本文重点说明UI框架设计思路-basicapp application demonstrates the use of basic BREW UI controls such as menus, static text, text input control, etc., this paper highlights the UI framework for design ideas
Platform: | Size: 157696 | Author: Maron | Hits:

[BREWtext

Description: 在vs2005 与Brew环境开始的小程序,可以用来学习-Brew in the vs2005 environment began with a small program that can be used to study
Platform: | Size: 1645568 | Author: zenghua | Hits:

[BREWstatictext

Description: brew 的静态文本 很好的 可以去看看 brew 初学者很好的选择-good brew of static text to see the brew can be a good choice for beginners
Platform: | Size: 374784 | Author: 高航 | Hits:

[BREWwejianwenben

Description: 在brew下的文本绘制的一个源代码,通过测试。-Drawn under the text in the brew, a source code, pass the test.
Platform: | Size: 2740224 | Author: | Hits:

[BREWDevelopment-of-BREW

Description: BREW学习的资料,第一章BREW程序,第二章 文本画面 第三章 按键 第四章 计时器 第五章 资源编辑 第六章 菜单 第七章 对话框 第八章 控件 第九章 图形与图像 第十章 网络通信-BREW study data, BREW application Chapter II Chapter III Chapter text screen timer button Chapter IV Chapter V Chapter VI Resource Editor dialog menu Chapter VII Chapter VIII Chapter IX graphics and image control Chapter Network Communications
Platform: | Size: 330752 | Author: 梅武钊 | Hits:

[BREWT9zzz

Description: brew平台用的T9输入法代码,代测试用-the text input ofT9
Platform: | Size: 23552 | Author: klts | Hits:

[BREWsms_filter-Brew-MP

Description: SMS Filter source code, application groups the incoming messages (text) based on the user defined rules.
Platform: | Size: 2412544 | Author: ork tork | Hits:

CodeBus www.codebus.net