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

Search list

[BREWBrew斗牛士

Description:

This is a source code of Brew game developed in VC++, It is useful to a freshmen who is beginning Brew Mobile deveoping.


Platform: | Size: 1739942 | Author: wangbenli | 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:

[BREWBREW Browser v2.0.0

Description: BREW开发的一个浏览器实例-A web browser sample by BREW
Platform: | Size: 365568 | Author: 张帆 | Hits:

[BREWMine(Brew)

Description: 一个很不错的韩国游戏源代码-A fine game source code by korean
Platform: | Size: 2104320 | Author: 赵文 | Hits:

[BREW封装了brew的最新多线程接口的类

Description: 封装了brew的最新多线程接口的类,对学习BREW程序的有很大帮助-Packaging, a brew the latest multi-threaded interface to the class, to learn the procedures BREW is very helpful
Platform: | Size: 287744 | Author: | Hits:

[BREWBREW_Browser_v2.0.0

Description: brew下完整的一个浏览器源代码,结构设计很好,可以参考。-brew a complete browser source code, the structural design is very good, may refer.
Platform: | Size: 502784 | Author: 江枫 | Hits:

[J2ME应用程序从BREW到J2ME移植指导

Description: 从BREW系统移植到J2ME系统的移植是用一定难度的,请大家参考.-from BREW system transplanted to the transplant system J2ME is a certain degree of difficulty, please reference.
Platform: | Size: 121856 | Author: 刘为 | Hits:

[BooksBREW_VSNET

Description: VC++编写 brew程序的简单制作!是初学者brew的好参考!-VC prepared brew a simple production process. Beginners brew is a good reference!
Platform: | Size: 111616 | Author: hixi | Hits:

[BREWpclock-for-brew

Description: 一个基于BREW上的电子时钟程序,通过太阳历计算当前时间,并有闹铃和日志功能.-a BREW-based electronic clock on the procedure for the adoption of solar reckoning the current time, and the alarm and log functions.
Platform: | Size: 386048 | Author: 易飞扬 | Hits:

[BREWbrewsocket

Description: brew平台一个关于socket运用的例子-brew a platform on the use of socket examples
Platform: | Size: 60416 | Author: | Hits:

[BREWhuaban

Description: brew应用程序,综合性的程序,实现画板的应用,具有实战性,适合有brew基础的人学习。-brew applications, the integration of procedures, the application of slate, with actual combat, brew a basis for the study.
Platform: | Size: 594944 | Author: yilin | Hits:

[BREWBrew

Description: Brew文档,对于新手来说是很好的东西.-Brew documents, for the novice is a good thing.
Platform: | Size: 624640 | Author: bobo | Hits:

[BREWpingbao

Description: 使用Brew,几个小球相撞的手机屏幕保护程序,brew开发环境下模拟运行-Use Brew, a few small ball collision cell phone screen saver, brew simulation development environment running
Platform: | Size: 1852416 | Author: 程希望 | Hits:

[BREWbrew

Description: 深入BREW开发 整个BREW系统由开发平台、运行平台和服务器三个要素组成。开发平台就是我们所使用的BREW SDK,用来在PC端开发可以在运行平台运行的程序。运行平台就是指可以运行BREW应用程序的移动通讯设备上的BREW运行环境,它的核心是BREW的Porting Kit。服务器是连接开发和运行平台的一个“连接器”,开发平台所开发出的BREW应用程序放在服务器上,以便于运行平台的用户通过无线通讯网络下载应用程序,其核心是ADS(Application Download Server)服务器,ADS和其他的辅助工具合起来统称为BDS(BREW Distribution System)系统。-BREW-depth development of the entire BREW system development platform, operating platform and server of three elements. Development platform that we are using BREW SDK, used in the PC-side development platform in running programs. Platform means that applications can run BREW mobile communications equipment on the BREW runtime environment, which is the core of BREW-Porting Kit. Server is connected to develop and run the platform of a connector, development platform developed by the BREW applications on the server in order to run the platform through a wireless communication network users to download applications, the core of which is ADS (Application Download Server ) server, ADS and other aids together collectively known as BDS (BREW Distribution System) system.
Platform: | Size: 572416 | Author: tao | Hits:

[BREWbff-1_0_2_0-vc++-6_0-brew-3_1_5

Description: FreeBREW is a collection of open source software for BREW. BREW Foundation Framework provides a multitasking-aware kernel which supports a layered, per-task and per-state event dispatching mechanism to enable robust, state-pattern programming in BREW
Platform: | Size: 409600 | Author: chengyu | Hits:

[BREWGameDemo

Description: brew的一个Demo 供大家参考和学习之用 很不错 -brew a Demo for your reference and study purposes is pretty good
Platform: | Size: 28672 | Author: 星空 | Hits:

[BREWhellothread

Description: 这个事一个关于brew 多线程的小例子 这个事一个关于brew 多线程的小例子-This matter on the brew a small example of multi-threaded on the matter brew a small example of multi-threaded
Platform: | Size: 57344 | Author: lihaorui | Hits:

[BREWisms-brew

Description: 这是一个关于brew ISIM的操作的一个小例子,这是一个关于brew ISIM的操作的一个小例子-This is a brew ISIM operation on a small example, this is a brew ISIM operation on a small example of
Platform: | Size: 25600 | Author: lihaorui | Hits:

[BREWrscpooldemo-brew

Description: 这是一个关于brew rscpooldemo操作的小例子-This is a brew rscpooldemo operate on a small example of
Platform: | Size: 65536 | Author: lihaorui | Hits:

[File Formatbrew-telephone-book

Description: BREW是在移动数据增值应用开发领域出现的新技术.阐述了BREW技术的特点和组成,介绍了手机电话薄的功能模块,分析了软件的结构及实现.然后详细阐述了在BREW平台下的手机电话薄的设计与开发过程,在VC++环境下基于BREW平台开发了手机应用程序,最后通过BREWSDK开发工具包中的Emulator在计算机上进行了手机仿真,最后通过编译器下载到手机上.实践表明,基于BREw的手机软件开发方便快捷,较好地满足了用户的个性化需求. -BREW is a value-added mobile data in the field of application and development of new technologies. BREW technology on the characteristics and composition of thin introduced the function of cellular telephone module, an analysis of the structure and implementation of software. And then described in detail in the BREW platform for mobile phones under the thin design and development process, in VC++ environment was developed based on the BREW platform for mobile applications, and finally through the development kit BREWSDK the Emulator in the computer simulation carried out on a mobile phone, and finally through compiler download to your phone. Practice shows that mobile phone-based software development BREw convenient and better meet the user' s individual requirements.
Platform: | Size: 199680 | Author: 毛义法 | Hits:
« 12 3 4 5 6 7 8 9 10 ... 20 »

CodeBus www.codebus.net