Minigui Programming Guide

Total Page:16

File Type:pdf, Size:1020Kb

Minigui Programming Guide MiniGUI Programming Guide Version 2.0 (revised edition 4) For MiniGUI Version 2.0.4/1.6.10 Beijing Feynman Software Technology Co. Ltd. August, 2007 MiniGUI Programming Guide V2.0-4 Introduction MiniGUI, developed by Beijing Feynman Software Technology Co. Ltd., originates from a world famous free software project, which is initiated by Wei Yongming. MiniGUI aims to provide a fast, stable and lightweight graphics user interface (GUI) support system for real-time embedded systems. MiniGUI is “a cross-operating-system graphics user interface support system for embedded devices”, and “an embedded graphics middleware”; it can run on Linux/uClinux, eCos, VxWorks, pSOS, ThreadX, Nucleus, OSE, and even uC/OS-II, also on Win32 platform. Currently, the latest freely downloadable stable releases (GPL releases) of MiniGUI are MiniGUI-STR V1.6.2 and MiniGUI V1.3.3. The source code, development documents and sample programs are available from the download area (http://www.minigui.com/download/index.shtml) of the website of Beijing Feynman software Technology Co. Ltd. It should be noted that the freely downloadable MiniGUI could be only used for developing GPL or other application software with open source code. If you are using MiniGUI for developing commercial, proprietary, or other software not covered by the terms listed in GPL, you must have a commercial license for MiniGUI. Beijing Feynman software Technology Co. Ltd. will provide the latest value-added release and related porting and development technology support service for the users who have buy the MiniGUI commercial licenses. This guide describes in detail the foundation knowledge of MiniGUI V2.0.4/1.6.10 on developing embedded application software, technical documents and development skills, the content of which involves various aspects of MiniGUI programming, include message looping, window procedure, dialog box, controls, graphics interfaces, and so on. Please refer to MiniGUI API Reference for complete description of MiniGUI APIs (Application Programming Interfaces). I MiniGUI Programming Guide V2.0-4 Copyright Claim MiniGUI Programming Guide Version 2.0 (revised edition 4) for MiniGUI Ver 2.0.4/1.6.10. Copyright © 2003~2007, Beijing Feynman Software Technology Co., Ltd. All rights reserved. By whatever means you get the entire or partial text or photograph data in this guide, no matter mechanical or electronic, you are only authorized by Beijing Feynman Software Technology Co., Ltd. the reading right. Any format conversion, redistribution, dissemination, and copying its entire or partial content, or using text or photograph therein for commercial purpose without written permission will be regarded as tortuous, and may result in severe civil or criminal punishment. I I MiniGUI Programming Guide V2.0-4 Contents Introduction .................................................................................... I Copyright Claim ..............................................................................II 1 Preface....................................................................................... 1 1.1 Relevant Documents.............................................................................1 1.2 Organization of this Guide .....................................................................2 1.3 Obtaining Samples of the Guide .............................................................3 1.4 Compiling and Running Environment of Samples........................................4 1.5 Copyright and Licensing ........................................................................5 I Foundation of MiniGUI Programming ....................................... 7 2 Beginning MiniGUI Programming ..................................................... 9 2.1 Basic Programming Concepts .................................................................9 2.1.1 Event Driven Programming................................................ 9 2.1.2 Three Runtime Modes of MiniGUI......................................... 10 2.2 A Simple MiniGUI Program................................................................... 12 2.2.1 Header Files........................................................... 14 2.2.2 Entrance of the Program................................................ 15 2.2.3 Join a Layer in MiniGUI-Processes ..................................... 15 2.2.4 Creating and Showing Main Window ...................................... 16 2.2.5 Entering Message Loop.................................................. 18 2.2.6 Window Procedure Function.............................................. 20 2.2.7 Screen Output.......................................................... 21 2.2.8 Exit of the Program.................................................... 21 2.3 Compiling, Linking and Running............................................................ 22 2.3.1 Compiling MiniGUI Program.............................................. 22 2.3.2 Function Libraries of MiniGUI.......................................... 23 2.4 Writing Automake/Autoconf Scripts for MiniGUI Application ....................... 23 3 Window and Message ...................................................................31 3.1 Window System and Window................................................................ 31 3.1.1 What Is Window System.................................................. 31 3.1.2 Concept of Window...................................................... 32 3.2 Window of MiniGUI............................................................................. 33 3.2.1 Window Type............................................................ 33 III MiniGUI Programming Guide V2.0-4 3.2.2 Main Window............................................................ 35 3.2.3 Window Style........................................................... 36 3.2.4 Destroying Main Window................................................. 37 3.2.5 Dialog Box............................................................. 38 3.2.6 Control and Control Class.............................................. 38 3.2.7 Input Method Window.................................................... 41 3.3 Message and Message Handling ............................................................ 43 3.3.1 Message................................................................ 43 3.3.2 Message Type........................................................... 45 3.3.3 Message Queue.......................................................... 45 3.3.4 Message Handling....................................................... 47 3.3.5 Sending and Posting Message............................................ 49 3.3.6 Message Handling Function Specific to MiniGUI-Processes ............... 51 3.4 Several Important Messages and Corresponding Handling ......................... 52 3.4.1 MSG_NCCREATE........................................................... 53 3.4.2 MSG_SIZECHANGING....................................................... 53 3.4.3 MSG_SIZECHANGED and MSG_CSIZECHANGED .................................. 54 3.4.4 MSG_CREATE............................................................. 54 3.4.5 MSG_FONTCHANGING....................................................... 55 3.4.6 MSG_FONTCHANGED........................................................ 55 3.4.7 MSG_ERASEBKGND......................................................... 56 3.4.8 MSG_PAINT.............................................................. 57 3.4.9 MSG_CLOSE.............................................................. 58 3.4.10 MSG_DESTROY........................................................... 58 3.5 Common Window Operation Functions ................................................... 59 4 Foundation of Dialog Box Programming ...........................................63 4.1 Main Window and Dialog Box ............................................................... 63 4.2 Dialog Box Template........................................................................... 63 4.3 Dialog Box Callback Function ............................................................... 65 4.4 MSG_INITDIALOG Message.................................................................. 66 4.5 Modal and Modeless Dialog Box ............................................................ 68 4.6 Control Styles and Operations Relevant to Dialog Box............................... 69 5 Foundation of Control Programming................................................73 5.1 Control and Control Class .................................................................... 73 5.2 Creating Control Instance by Using Predefined Control Class ..................... 75 IV MiniGUI Programming Guide V2.0-4 5.3 Topics Involved in Control Programming................................................. 77 5.4 Operations Specific to Control .............................................................. 81 6 Advanced Programming of Control..................................................83 6.1 User-Defined Control .......................................................................... 83 6.2 Subclassing of Control ........................................................................ 83 6.3 Combined Use of Controls ................................................................... 84 7 Menu.........................................................................................89 7.1 Concept of Menu................................................................................ 89 7.2 Creating and Handling Menu ...............................................................
Recommended publications
  • Minigui 编程指南 V2.0-4
    MiniGUI 编 程 指 南 版本 2.0 修订号 4 适用于 MiniGUI Ver 2.0.4/1.6.10 北京飞漫软件技术有限公司 2007 年 8 月 MiniGUI 编程指南 V2.0-4 简 介 由北京飞漫软件技术有限公司开发的 MiniGUI(http://www.minigui.com),是国内为数 不多的几大国际知名自由软件之一。其目标是为实时嵌入式操作系统建立一个跨操作系统的、 快速、稳定和轻量级的图形用户界面支持系统。我们将 MiniGUI 定义为“针对嵌入式设备的、 跨操作系统的图形界面支持系统”,属于一种“嵌入式图形中间件”软件产品。目前,MiniGUI 已成为跨操作系统的图形用户界面支持系统,可在 Linux/uClinux、eCos、VxWorks、pSOS、 ThreadX、Nucleus、uC/OS-II、OSE 等操作系统,以及 Win32 平台上运行。 目前,MiniGUI 可免费下载的稳定版本(遵循 GPL)是 MiniGUI-STR V1.6.2 和 MiniGUI V1.3.3 。你可以从北京飞漫软件技术有限公司网站的“下载”区 (http://www.minigui.com/download/cindex.shtml)下载上述 GPL 版本的源代码、开发文 档及示例程序。需要注意的是:免费下载的 MiniGUI 只能用于开发 GPL 或其它公开源码 的应用软件,如果你要利用 MiniGUI 开发专有或商业软件,则必须从北京飞漫软件技术有 限公司购买商业授权。飞漫软件将为购买 MiniGUI 商业授权的用户提供最新的 MiniGUI 增 值版产品,并提供相关的移植及开发技术支持服务。 本指南详细讲述了利用 MiniGUI 开发嵌入式应用软件的基础知识、技术资料和开发技 巧,内容涉及到 MiniGUI 编程的各个方面,包括消息循环和窗口过程、对话框和控件、图 形接口等。有关 MiniGUI 应用编程接口的详细描述,敬请参考《MiniGUI API Reference Manual》。 I MiniGUI 编程指南 V2.0-4 版权声明 《MiniGUI 编程指南》版本 2.0 修订号 4,适用于 MiniGUI Version 2.0.4/1.6.10。 版权所有 (C) 2003~2007,北京飞漫软件技术有限公司,保留所有权利。 无论您以何种方式获得该手册的全部或部分文字或图片资料,无论是普通印刷品 还是电子文档,北京飞漫软件技术有限公司仅仅授权您阅读的权利,任何形式的 格式转换、再次发布、传播以及复制其内容的全部或部分,或将其中的文字和图 片未经书面许可而用于商业目的,均被视为侵权行为,并可能导致严重的民事或 刑事处罚。 II MiniGUI 编程指南 V2.0-4 目 录 简 介................................................................................................................... I 版权声明.................................................................................................................. II 1 前言..................................................................................................................... 1 1.1 相关的文档
    [Show full text]
  • Minigui Technology White Paper
    MiniGUI Technology White Paper Version 2.0 (revised edition 4) for MiniGUI V2.0.4/1.6.10 Copyright © 2002~2007, Beijing Feynman Software Technology Co., Ltd. Latest revision: 2007/07/10 You are permitted to copy and redistribute this document, provided that the document and this announcement are clean and complete. MiniGUI Technology White Paper V2.0-4 Contents 0 Foreword................................................................................... 1 1 Introduction .............................................................................. 2 1.1 What Is MiniGUI............................................................................... 2 1.2 The Origin and Evolution of MiniGUI .................................................... 2 1.3 Typical Application Fields of MiniGUI.................................................... 3 2 Features and Advantages of MiniGUI ............................................. 5 2.1 Technical Features of MiniGUI............................................................. 5 2.2 Advantages of MiniGUI...................................................................... 7 3 System Requirements to Run MiniGUI ........................................... 9 3.1 Operating Systems Supported by MiniGUI............................................ 9 3.2 Hardware Platforms Running MiniGUI .................................................. 9 3.3 Footprint of MiniGUI.......................................................................... 9 4 Software Architecture of MiniGUI ...............................................
    [Show full text]
  • Minigui Technology White Paper
    MiniGUI Technology White Paper Version 3.0 (revised edition 2) for MiniGUI V3.0 Copyright © 2002~2017, Beijing FMSoft Technology Co., Ltd. Latest revision: 2017/11/07 You are permitted to copy and redistribute this document, provided that the document and this announcement are clean and complete. MiniGUI Technology White Paper V3.0 Contents 1 Introduction ............................................................................................................. 1 1.1 What Is MiniGUI ........................................................................................................ 1 1.2 The Origin and Evolution of MiniGUI ........................................................................ 1 1.3 Typical Application Fields of MiniGUI ....................................................................... 4 Hand-held devices ...................................................................................................................................... 4 Digital-media devices and STBs .................................................................................................................. 4 Industry instruments and control systems ................................................................................................. 5 2 Features and Advantages of MiniGUI ...................................................................... 5 2.1 Technical Features of MiniGUI .................................................................................. 5 Hardware support .....................................................................................................................................
    [Show full text]
  • Embedded Linux System Design and Development
    Au0586 half title page 11/17/05 2:05 PM Page 1 EMBEDDED LINUX SYSTEM DESIGN AND DEVELOPMENT Au0586 title page 11/17/05 2:04 PM Page 1 EMBEDDED LINUX SYSTEM DESIGN AND DEVELOPMENT P. Raghavan • Amol Lad • Sriram Neelakandan Boca Raton New York Published in 2006 by Auerbach Publications Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2006 by Taylor & Francis Group, LLC Auerbach is an imprint of Taylor & Francis Group No claim to original U.S. Government works Printed in the United States of America on acid-free paper 10987654321 International Standard Book Number-10: 0-8493-4058-6 (Hardcover) International Standard Book Number-13: 978-0-8493-4058-1 (Hardcover) Library of Congress Card Number 2005048179 This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. No part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
    [Show full text]
  • Harbour Minigui User Manual V2.0 4E
    MiniGUI User Manual Version 2.0 (revised edition 4) For MiniGUI Version 2.0.4/1.6.10 Beijing Feynman Software Technology Co. Ltd. August, 2007 MiniGUI User Manual V2.0-4 Copyright Claim MiniGUI User Manual Version 2.0 (revised edition 4) for MiniGUI Ver 2.0.4/1.6.10. Copyright © 2003~2007, Beijing Feynman Software Technology Co., Ltd. All rights reserved. By whatever means you get the entire or partial text or photograph data in this guide, no matter mechanical or electronic, you are only authorized by Beijing Feynman Software Technology Co., Ltd. the reading right. Any format conversion, redistribution, dissemination, and copying its entire or partial content, or using text or photograph therein for commercial purpose without written permission will be regarded as tortuous, and may result in severe civil or criminal punishment. MiniGUI User Manual V2.0-4 Contents Copyright Claim ................................................................................. I 1 Introduction to MiniGUI Value-added Release ......................................1 1.1 A Brief Introduction................................................................................ 1 1.2 Documents for MiniGUI-VAR .................................................................... 2 1.3 MiniGUI Source Code and Samples........................................................... 3 1.4 Other Resources in the Product CD-ROM ................................................... 5 1.5 Optional Components of MiniGUI-VAR ....................................................... 5
    [Show full text]
  • Embedded Linux System Design and Development
    Au0586 half title page 11/17/05 2:05 PM Page 1 EMBEDDED LINUX SYSTEM DESIGN AND DEVELOPMENT Au0586 title page 11/17/05 2:04 PM Page 1 EMBEDDED LINUX SYSTEM DESIGN AND DEVELOPMENT TEAM FLY P. Raghavan • Amol Lad • Sriram Neelakandan Boca Raton New York Published in 2006 by Auerbach Publications Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2006 by Taylor & Francis Group, LLC Auerbach is an imprint of Taylor & Francis Group No claim to original U.S. Government works Printed in the United States of America on acid-free paper 10987654321 International Standard Book Number-10: 0-8493-4058-6 (Hardcover) International Standard Book Number-13: 978-0-8493-4058-1 (Hardcover) Library of Congress Card Number 2005048179 This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. No part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
    [Show full text]
  • Monitor System for Protection Device Based on Embedded RTOS
    J. Electromagnetic Analysis & Applications, 2009, 1: 245-248 245 doi:10.4236/jemaa.2009.14037 Published Online December 2009 (http://www.SciRP.org/journal/jemaa) Monitor System for Protection Device Based on Embedded RTOS Yang WANG, Xianggen YIN, Zhe ZHANG Electric Power Security and High Efficiency Lab, Huazhong University of Science and Technology, Wuhan, China. Email: [email protected] Received September 8th, 2009; revised September 26th, 2009; accepted September 29th, 2009. ABSTRACT For the purpose of the monitor system in digital protection, the embedded real-time operating system (RTOS) and the embedded GUI (Graphical User Interface) is introduced to design the monitor system. Combining the necessity and the application value of the operation system, the choice of embedded Linux and Qt/Embedded is completely viable for the monitor system in digital protection for generator-transformer sets. The design with embedded Linux and embedded GUI enriches system information, increases developing efficiency and improve the generality. Keywords: Real-Time, Operating System, Embedded Linux, Protection, Monitor System 1. Introduction gineering at present. Restricted by factors like cost, en- ergy consumption and chip size, embedded systems are After the development of digital protection for over 20 closely linked with their application and market. It is years in our country, The rapid development of DSP critical to design and develop embedded system products (Digital Signal Processor) and high performance embed- with the proper cost, function and performance. ded microprocessor not only make the digital protection Embedded system is used in power system for a long function more perfect and reliable, but also can gather time, including data collection, automatic equipment, and deal with more abundant data [1,2].
    [Show full text]
  • Minigui User Manual
    MiniGUI User Manual Version 2.0 (revised edition 4) For MiniGUI Version 2.0.4/1.6.10 Beijing Feynman Software Technology Co. Ltd. August, 2007 MiniGUI User Manual V2.0-4 Copyright Claim MiniGUI User Manual Version 2.0 (revised edition 4) for MiniGUI Ver 2.0.4/1.6.10. Copyright © 2003~2007, Beijing Feynman Software Technology Co., Ltd. All rights reserved. By whatever means you get the entire or partial text or photograph data in this guide, no matter mechanical or electronic, you are only authorized by Beijing Feynman Software Technology Co., Ltd. the reading right. Any format conversion, redistribution, dissemination, and copying its entire or partial content, or using text or photograph therein for commercial purpose without written permission will be regarded as tortuous, and may result in severe civil or criminal punishment. MiniGUI User Manual V2.0-4 Contents Copyright Claim ................................................................................. I 1 Introduction to MiniGUI Value-added Release ......................................1 1.1 A Brief Introduction................................................................................ 1 1.2 Documents for MiniGUI-VAR .................................................................... 2 1.3 MiniGUI Source Code and Samples........................................................... 3 1.4 Other Resources in the Product CD-ROM ................................................... 5 1.5 Optional Components of MiniGUI-VAR ....................................................... 5
    [Show full text]
  • Minigui 用户手册 V2.0-4
    MiniGUI 用 户 手 册 版本 2.0 修订号 4 适用于 MiniGUI Ver 2.0.4/1.6.10 北京飞漫软件技术有限公司 2007 年 8 月 MiniGUI 用户手册 V2.0-4 版权声明 《MiniGUI 用户手册》 版本 2.0 修订号 4,适用于 MiniGUI 版本 2.0.4/1.6.10。 版权所有 (C) 2003~2007,北京飞漫软件技术有限公司,保留所有权利。 无论您以何种方式获得该手册的全部或部分文字或图片资料,无论是普通印刷品还是电 子文档,北京飞漫软件技术有限公司仅仅授权您阅读的权利,任何形式的格式转换、再 次发布、传播以及复制其内容的全部或部分,或将其中的文字和图片未经书面许可而用 于商业目的,均被视为侵权行为,并可能导致严重的民事或刑事处罚。 MiniGUI 用户手册 V2.0-4 目 录 版权声明 .........................................................................................................................I 1 MiniGUI 增值版介绍 ....................................................................................................1 1.1 MiniGUI 增值版简介..............................................................................................................1 1.2 MiniGUI 增值版产品文档 ......................................................................................................2 1.3 MiniGUI 源代码以及示例程序 ...............................................................................................2 1.4 产品光盘中的其他资源..........................................................................................................3 1.5 可选组件产品........................................................................................................................4 1.6 关于本手册............................................................................................................................5 2 MiniGUI 的配置、编译和安装......................................................................................7 2.1 编译时配置选项的生成..........................................................................................................7
    [Show full text]
  • Embedded-Linux-120203.Pdf
    Embedded Linux Delivered and/or Customized by: These slides are made available to you under a Creative Commons Share-Alike 3.0 license. The full terms of this license are here: https://creativecommons.org/licenses/by-sa/3.0/ Attribution requirements and misc., PLEASE READ: ● This slide must remain as-is in this specific location (slide #2), everything else you are free to change; including the logo :-) ● Use of figures in other documents must feature the below “Originals at” URL immediately under that figure and the below copyright notice where appropriate. ● You are free to fill in the “Delivered and/or customized by” space on the right as you see fit. ● You are FORBIDEN from using the default “About the instructor” slide as-is or any of its contents. (C) Copyright 2003-2012, Opersys inc. These slides created by: Karim Yaghmour Originals at: www.opersys.com/training/embedded-linux 2 Course Structure and Presentation 1.About the instructor 2.Goals 3.Presentation format 4.Expected knowledge 5.Knowledge fields 6.Day-by-day outline 7.Courseware 8.Hardware 3 1. About the instructor ● Author of: ● Introduced Linux Trace Toolkit in 1999 ● Originated Adeos and relayfs (kernel/relay.c) 4 2. Goals ● To provide an in-depth understanding of an embedded Linux system©s architecture. ● To enable you to put together an embedded Linux system with as little 3rd party dependencies as possible in an architecture-independent fashion. ● To give you a hands-on experience of putting together and programming embedded Linux systems. ● To teach you how open source and free software packages are developed and how to take advantage of that development model.
    [Show full text]
  • MINIGUI-USER-MANUAL-V3.0-5E.Pdf
    MiniGUI User Manual Version 3.0 (revised edition 5) For MiniGUI Version 3.0. Beijing FMSoft Technologies Co. Ltd. Feb, 2018 Copyright Claim MiniGUI User Manual Version 3.0 (revised edition 5) for MiniGUI Ver 3.0.x. Copyright © 2003~2018, Beijing FMSoft Technologies Co., Ltd. All rights reserved. By whatever means you get the entire or partial text or photograph data in this guide, no matter mechanical or electronic, you are only authorized by Beijing FMSoft Technologies Co., Ltd. the reading right. Any format conversion, redistribution, dissemination, and copying its entire or partial content, or using text or photograph there in for commercial purpose without written permission will be regarded as tortuous, and may result in severe civil or criminal punishment. MiniGUI User Manual V3.0-5 Contents Copyright Claim .................................................................................1 1 Introduction to MiniGUI ....................................................................1 1.1 A Brief Introduction ................................................................................1 1.2 Documents for MiniGUI ...........................................................................2 1.3 MiniGUI Source Code and Samples ...........................................................2 1.4 Optional Components of MiniGUI ..............................................................3 1.5 miniStudio development tools .................................................................4 1.6 About this Manual ...................................................................................5
    [Show full text]
  • Minigui Technology White Paper
    MiniGUI Technology White Paper Version 3.2 Copyright © 2002~2018, Beijing FMSoft Technology Co., Ltd. Latest revision: 2018/02/28 You are permitted to copy and redistribute this document, provided that the document and this announcement are clean and complete. MiniGUI Technology White Paper Contents 1. Introduction ................................................................................................................................ 1 What Is MiniGUI .................................................................................................................................... 1 Goals of MiniGUI ................................................................................................................................... 1 The Origin and Evolution of MiniGUI .................................................................................................... 2 Typical Application Fields of MiniGUI.................................................................................................... 4 Smart IoT devices ........................................................................................................................................................... 4 Hand-held devices .......................................................................................................................................................... 4 Digital-media devices and STBs ...................................................................................................................................... 5 Industry instruments
    [Show full text]