Welcome![Sign In][Sign Up]
Location:
Search - Brew code

Search list

[BREWMine(Brew)

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

[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:

[Industry researchQualcomm BREW Docs

Description: 文档,软件代码,高通, BREW,无线
Platform: | Size: 2846263 | Author: wwwekb | Hits:

[SourceCodebrew-web-source-code

Description: brew 平台 web浏览器源码,绝对是学习浏览器开发的好资料。
Platform: | Size: 1343517 | Author: kinghy | Hits:

[BREWtextwin

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

[BREWgufuyangsound

Description: BREW 实现多种声音的播放,停止,并且获取播放的音量,设置音量等功能,是BREW 初学者的经典代码!-BREW realize a variety of voices to play, stop, and to obtain the volume of the broadcast, set the volume and other functions, is a classic beginner BREW code!
Platform: | Size: 314368 | Author: 富洋 | Hits:

[BREWbrew-app-Russian

Description: brew应用-俄罗斯方块原码,学习如何使用brew进行编程,动态应用的实现方式-brew app- Russian source code
Platform: | Size: 14336 | Author: 庄华中 | Hits:

[BREWbrew-app-Motor

Description: brew应用-摩托车原码,学习如何使用brew进行编程,动态应用的实现方式-brew app- Motor Source code
Platform: | Size: 910336 | Author: 庄华中 | Hits:

[BREWbrew-app-Snake

Description: brew应用-贪吃蛇原码,学习如何使用brew进行编程,动态应用的实现方式-brew app- snake source code
Platform: | Size: 47104 | Author: 庄华中 | Hits:

[BREWbrew-app-Box

Description: brew应用-推箱子原码,学习如何使用brew进行编程,动态应用的实现方式 -brew app- boxer source code
Platform: | Size: 22528 | Author: 庄华中 | Hits:

[BREWtetris

Description: Tetris Game for Brew
Platform: | Size: 28672 | Author: Charles | Hits:

[BREWcode

Description: 高通 BREW 培训 实用例子,BREW入门 -Qualcomm BREW training cases
Platform: | Size: 561152 | Author: haixin.yip | Hits:

[BREWbrew-Demos

Description: brew 开发的小程序例子,源码包括图片下载、按键控制、小游戏、声音、地图等-brew developed examples of small programs, source code, including picture downloads, key control, small game, sound, maps, etc.
Platform: | Size: 400384 | Author: 毛义法 | Hits:

[BREWBREW-GAMES

Description: 该光盘是书中的全部源代码,按照章节的顺序编排。所有的程序可以在Windows操作系统中的Visual C++ 6.0下编译通过,并可以运行。-The CD is a book all the source code is organized in the order in accordance with the chapter. Procedures for all Windows operating systems in the Visual C++ 6.0 under the compiler is passed, and can run.
Platform: | Size: 1574912 | Author: 毛义法 | Hits:

[File FormatBREW-IMAP4-mail

Description: 为了实现支持IMAP4协议的移动邮件客户端在智能手机上的应用,在VC++6.0环境下,采用了高通推出的专门为无线设备设计的BREW平台。提出了原子流程的概念,以降低程序间的耦合度,提高代码复用率。经在仿真环境下测试实验,实现了与Internet上多台常用邮件服务器的交互,并且运行稳定,可作为智能手机的一个组件应用于3G网络。-In order to achieve agreement in support of IMAP4 mail client for mobile phones in the smart application, in VC++6.0 environment, used to launch Qualcomm' s wireless devices designed specifically for the BREW platform. Put forward the concept of atomic processes in order to reduce the coupling between the procedure and improve the rate of code reuse. As in the simulation environment to test the experiment, realized with more than the commonly used Internet mail server interaction, and stable operation, can be used as a component of smart phones used in 3G networks.
Platform: | Size: 195584 | Author: 毛义法 | Hits:

[Program docBREW-racing-car-game

Description: 描述了在手机上表现滞钝的传统实现思路,并在此基础上,使用了不同于传统思路的新方法实现赛道弯曲和地图映射,并给出程序伪代码,最后提供了一些提高效率的优化措施. -Describes the lag in the performance of mobile phones to achieve the traditional idea of a blunt, and on this basis, the use of a new line of thought is different from the traditional method of mapping and map circuit bending, and gives procedures for pseudo-code, and finally provides some efficiency optimization measures.
Platform: | Size: 198656 | Author: 毛义法 | Hits:

[BREWbrew

Description: brew游戏,本程序只有基本的核心代码,仅供参考。-brew game, only the basic core of this program code for reference only.
Platform: | Size: 6474752 | Author: 王启夏 | Hits:
« 12 3 4 5 6 7 8 9 10 »

CodeBus www.codebus.net