亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mginit.c

?? minigui1.6.9增值板復雜應用的示例程序,看了這個用minigui就沒問題了
?? C
字號:
/*** $Id: mginit.c,v 1.34.6.4 2006/06/16 01:15:49 xwyan Exp $**** The mginit program of MiniGUI Demostration Envirionment.**** Copyright (C) 2001, 2002 Wei Yongming.** Copyright (C) 2003 ~ 2006 Feynman Software.**** Create date: 2001/09/05*//***  This source is free software; you can redistribute it and/or**  modify it under the terms of the GNU General Public**  License as published by the Free Software Foundation; either**  version 2 of the License, or (at your option) any later version.****  This software is distributed in the hope that it will be useful,**  but WITHOUT ANY WARRANTY; without even the implied warranty of**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU**  General Public License for more details.****  You should have received a copy of the GNU General Public**  License along with this library; if not, write to the Free**  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,**  MA 02111-1307, USA*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <signal.h>#include <time.h>#include <sys/types.h>#include <sys/wait.h>#include <minigui/common.h>#include <minigui/minigui.h>#include <minigui/gdi.h>#include <minigui/window.h>#include <minigui/control.h>#include <minigui/mgext.h>#include <minigui/fixedmath.h>#ifndef _LITE_VERSION    #error "*******************************************************************"    #error "**** Your MiniGUI is configured as MiniGUI-Threads.            ****"    #error "**** This program is a server of MiniGUI-Lite,                 ****"    #error "****   it can only run on MiniGUI-Lite,                        ****"    #error "****   not on MiniGUI-Threads.                                 ****"    #error "**** If you want to configure MiniGUI as MiniGUI-Lite,         ****"    #error "****   please run `./configure --enable-lite'                  ****"    #error "****   when configuring MiniGUI                                ****"    #error "****   and build and reinstall MiniGUI.                        ****"    #error "**** Note that this is not a fatal error.                      ****"    #error "*******************************************************************"#else#include "taskbar.h"static HWND hTaskBar;static void AboutMiniGUI (void){    char buff [1024];    sprintf (buff,             "MiniGUI version %d.%d.%d.\n"            "Copyright (C) 2002 ~ 2006 Feynman Software.\n"            "Copyright (C) 1998 ~ 2002 Wei Yongming.\n"            "All right reserved.\n\n"            "MiniGUI is \"a cross-operating-system graphics user interface "            "support system for embedded devices\", and is \"an embedded "            "graphics middleware\". It aims to provide a compact, fast, "            "stable, lightweight, and cross-OS GUI support system, which "            "is especially fit for real-time embedded systems based-on "            "Linux/uClinux, eCos, uC/OS-II, and other traditional RTOSes, "            "such as VxWorks, ThreadX, and Nucleus.\n\n"            "Please visit\n\n"            "http://www.minigui.org\n"            "http://www.minigui.com\n\n"            "for more information.",            MINIGUI_MAJOR_VERSION,             MINIGUI_MINOR_VERSION,             MINIGUI_MICRO_VERSION);    MessageBox (HWND_DESKTOP, buff,             "About MiniGUI!", MB_OK | MB_ICONINFORMATION);}static void AboutMDE (void){    char buff [1024];    sprintf (buff,             "MDE version %d.%d.%d.\n"            "Copyright (C) 2002 ~ 2006 Feynman Software.\n"            "Copyright (C) 2001 ~ 2002 Wei Yongming.\n\n"            "MDE (MiniGUI Demostration Envirionment) is a "            "comprehensive demo system for MiniGUI Ver %d.%d.%d. \n\n"            "It creates a task bar for you, and you can launch applications "            "from the bar, and switch among different layers by click "            "the layer-box on the bar.\n\n"            "MDE is free software, covered by the GNU General Public License, "            "and you are welcome to change it and/or distribute copies of it "            "under certain conditions. Please see the file COPYING to know "            "the details.\n\n"            "There is absolutely no warranty for MDE.",            MINIGUI_MAJOR_VERSION,             MINIGUI_MINOR_VERSION,             MINIGUI_MICRO_VERSION,            MINIGUI_MAJOR_VERSION,             MINIGUI_MINOR_VERSION,             MINIGUI_MICRO_VERSION);    MessageBox (HWND_DESKTOP, buff,            "About MDE!", MB_OK | MB_ICONINFORMATION);}static void Usage (void){    MessageBox (HWND_DESKTOP,             "Please start 'mginit' from the directory in which it located! "            "Do not change to other directory to run it.\n\n"            "Thanks a lot.",            "Usage of MDE!",            MB_OK | MB_ICONEXCLAMATION);}static const char* new_del_client_info [] ={    NULL,    "New comming in client: %s\n",    "Disconnecting client: %s\n"};static void on_child_exit(int signal){    wait(NULL);}static void on_new_del_client (int op, int cli){    static int nr_clients = 0;    MG_Client* client = mgClients + cli;    if (op > 0 && op <= LCO_DEL_CLIENT)        printf (new_del_client_info [op], client?client->name:"NULL");    if (op == LCO_NEW_CLIENT) {        nr_clients ++;    }    else if (op == LCO_DEL_CLIENT) {        nr_clients --;        if (nr_clients == 0) {#if 0            SendMessage (hTaskBar, MSG_CLOSE, 0, 0);#else            printf ("There is no any client.\n");#endif        }        else if (nr_clients < 0) {            printf ("Serious error: nr_clients less than zero.\n");        }    }    else        printf ("Serious error: incorrect operations.\n");}static const char* change_layer_info [] ={        NULL,        "New layer created: %s; client: %s\n",        "Layer deleted: %s; client: %s\n",        "New client joined layer: (%s, %s)\n",        "Remove client from layer: (%s, %s)\n",        "Change topmost layer to %s; client: %s\n",        "Change active client: (%s, %s)\n",};static void adjust_boxes (int width, MG_Layer* layer){    int left = _LEFT_BOXES;    MG_Layer* cur_layer = mgLayers;    while (cur_layer) {        if (cur_layer != layer) {            MoveWindow ((HWND)cur_layer->dwAddData, left, _MARGIN,                            width, _HEIGHT_CTRL, TRUE);            left += width;        }        cur_layer = cur_layer->next;    }}static void on_change_topmost (MG_Layer* layer){    MG_Layer* cur_layer = mgLayers;    if (layer)        SendMessage ((HWND)layer->dwAddData, BM_SETCHECK, BST_CHECKED, 0);    while (cur_layer) {        if (cur_layer != layer) {            SendMessage ((HWND)cur_layer->dwAddData, BM_SETCHECK, 0, 0);        }        cur_layer = cur_layer->next;    }}static void on_change_layer (int op, MG_Layer* layer, MG_Client* client){    static int nr_boxes = 0;    static int box_width = _MAX_WIDTH_LAYER_BOX;    int new_width;    if (op > 0 && op <= LCO_ACTIVE_CHANGED)        printf (change_layer_info [op], layer?layer->name:"NULL",                         client?client->name:"NULL");    switch (op) {    case LCO_NEW_LAYER:        nr_boxes ++;        if (box_width * nr_boxes > _WIDTH_BOXES) {            new_width = _WIDTH_BOXES / nr_boxes;            if (new_width < _MIN_WIDTH_LAYER_BOX) {                new_width = _MIN_WIDTH_LAYER_BOX;            }            if (new_width != box_width) {                adjust_boxes (new_width, layer);                box_width = new_width;            }        }        layer->dwAddData = (DWORD)CreateWindow (CTRL_BUTTON, layer->name,                  WS_CHILD | WS_VISIBLE | BS_CHECKBOX | BS_PUSHLIKE | BS_CENTER,                  _ID_LAYER_BOX,                  _LEFT_BOXES + box_width * (nr_boxes - 1), _MARGIN,                  box_width, _HEIGHT_CTRL, hTaskBar, (DWORD)layer);        break;    case LCO_DEL_LAYER:        DestroyWindow ((HWND)(layer->dwAddData));        layer->dwAddData = 0;        nr_boxes --;         if (box_width * nr_boxes < _WIDTH_BOXES) {            if (nr_boxes != 0)                new_width = _WIDTH_BOXES / nr_boxes;            else                new_width = _MAX_WIDTH_LAYER_BOX;            if (new_width > _MAX_WIDTH_LAYER_BOX)                new_width = _MAX_WIDTH_LAYER_BOX;            adjust_boxes (new_width, layer);            box_width = new_width;        }        break;    case LCO_JOIN_CLIENT:        break;    case LCO_REMOVE_CLIENT:        break;    case LCO_TOPMOST_CHANGED:        on_change_topmost (layer);        break;    case LCO_ACTIVE_CHANGED:        break;    default:        printf ("Serious error: incorrect operations.\n");    }}static void child_wait (int sig){    int pid;    int status;    while ((pid = waitpid (-1, &status, WNOHANG)) > 0) {        if (WIFEXITED (status))            printf ("--pid=%d--status=%x--rc=%d---\n",                             pid, status, WEXITSTATUS(status));        else if (WIFSIGNALED(status))            printf ("--pid=%d--signal=%d--\n", pid, WTERMSIG (status));    }}int MiniGUIMain (int args, const char* arg[]){    pid_t pid_desktop;    struct sigaction siga;    int status;    MSG msg;    siga.sa_handler = child_wait;    siga.sa_flags  = 0;    memset (&siga.sa_mask, 0, sizeof(sigset_t));    signal(SIGCHLD, on_child_exit);    OnNewDelClient = on_new_del_client;    OnChangeLayer = on_change_layer;#if _MINIGUI_VERSION_CODE < _VERSION_CODE (1, 3, 0)    if (!ServerStartup ()) {        fprintf (stderr,                  "Can not start the server of MiniGUI-Lite: mginit.\n");        return 1;    }#endif    if (SetDesktopRect (0, g_rcScr.bottom - HEIGHT_TASKBAR - HEIGHT_IMEWIN,                            g_rcScr.right, g_rcScr.bottom) == 0) {        fprintf (stderr, "Empty desktop rect.\n");        return 1;    }    if (!InitMiniGUIExt ()) {        fprintf (stderr, "Can not init mgext library.\n");        return 1;    }    AboutMiniGUI ();    AboutMDE ();    if ((hTaskBar = create_task_bar ()) == HWND_INVALID) {        fprintf (stderr, "Can not create task bar.\n");        return 2;    }    pid_desktop = exec_app (app_info.autostart);    if (pid_desktop == 0 || waitpid (pid_desktop, &status, WNOHANG) > 0) {        fprintf (stderr, "Desktop already have terminated.\n");        Usage ();        return 1;    }    sigaction (SIGCHLD, &siga, NULL);    while (GetMessage (&msg, hTaskBar)) {        DispatchMessage (&msg);    }    MiniGUIExtCleanUp ();    return 0;}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久影院老司| 成人18视频日本| 国产福利一区在线| 欧美日韩免费一区二区三区视频| 精品国产一区二区三区久久影院| 亚洲午夜电影在线| av在线播放一区二区三区| 欧美一区二区不卡视频| 一区二区三区久久久| 高潮精品一区videoshd| 日韩一级免费观看| 亚洲va韩国va欧美va| 91在线视频播放| 欧美激情一区二区三区| 激情国产一区二区| 欧美一区二区三区视频免费| 艳妇臀荡乳欲伦亚洲一区| 国产成人高清在线| 久久久噜噜噜久久中文字幕色伊伊| 一区二区三区四区乱视频| 成人激情黄色小说| 国产亚洲污的网站| 国产成人av电影在线播放| 精品日韩99亚洲| 美女视频一区二区| 这里只有精品免费| 蜜桃精品在线观看| 欧美一区二区三区公司| 免费国产亚洲视频| 日韩欧美中文一区| 成人午夜视频免费看| 日韩精品专区在线| 精品一区二区三区欧美| 精品国产免费人成电影在线观看四季 | 国产成人精品1024| 日本一区二区三区电影| 成人一区二区三区在线观看 | 国产经典欧美精品| 久久精品欧美一区二区三区不卡 | 国产精品狼人久久影院观看方式| 成人性生交大片免费看视频在线| 日本一区二区三区免费乱视频| 成人免费观看av| 伊人夜夜躁av伊人久久| 色欧美88888久久久久久影院| 一区二区三区国产精华| 欧美三级乱人伦电影| 日本不卡一二三| 精品国产一区二区在线观看| 国产成人免费视| 自拍偷拍亚洲激情| 欧美日韩一区二区在线观看视频 | voyeur盗摄精品| 一区二区三区精品在线| 欧美一区二区在线播放| 国产精品综合二区| 怡红院av一区二区三区| 日韩一级片在线观看| 成人免费视频免费观看| 亚洲国产成人porn| 久久久久久久综合| xfplay精品久久| 91麻豆免费看| 蜜臀av性久久久久蜜臀aⅴ| 亚洲国产高清在线观看视频| 欧美怡红院视频| 国产精品影视网| 亚洲午夜精品网| 国产欧美日韩精品一区| 欧美日本精品一区二区三区| 国产精品一卡二卡| 午夜精品福利一区二区蜜股av| 国产亚洲成av人在线观看导航| 欧美最猛性xxxxx直播| 国产精品一二二区| 日韩精品乱码免费| 国产精品久久久久一区二区三区共| 欧美老女人第四色| 99久久婷婷国产| 精品一区二区精品| 亚洲成a人在线观看| 国产精品传媒在线| 亚洲精品在线免费播放| 欧美日韩在线直播| 99精品黄色片免费大全| 国内成+人亚洲+欧美+综合在线 | 国产精品九色蝌蚪自拍| 欧美一级二级三级蜜桃| 91女厕偷拍女厕偷拍高清| 黑人巨大精品欧美一区| 午夜精品福利视频网站 | 久久美女高清视频| 88在线观看91蜜桃国自产| 99精品桃花视频在线观看| 国产在线国偷精品产拍免费yy| 日一区二区三区| 亚洲一区二区四区蜜桃| 中文字幕一区二区视频| 国产欧美日韩综合| 久久综合久久综合亚洲| 欧美一区二区在线免费观看| 欧美日韩国产另类一区| 在线观看国产日韩| 色婷婷国产精品| 色综合久久久久久久| 91麻豆高清视频| 99国内精品久久| av一二三不卡影片| 99re热这里只有精品免费视频| 国产1区2区3区精品美女| 国产成a人无v码亚洲福利| 国产精品综合二区| 成人国产精品免费| aa级大片欧美| 91福利精品视频| 欧美日韩国产中文| 欧美日本在线观看| 91精品国产色综合久久不卡蜜臀| 欧美精品色一区二区三区| 这里只有精品99re| 欧美videos中文字幕| 精品成人佐山爱一区二区| 久久综合九色综合97婷婷| 欧美精品一区二区三区很污很色的| 精品国产亚洲一区二区三区在线观看| 欧美成人在线直播| 五月天网站亚洲| 日本一不卡视频| 国产在线精品一区二区 | 国产综合成人久久大片91| 激情综合网av| 不卡的av电影| 精品视频999| 久久亚洲一区二区三区四区| 国产亚洲一二三区| 一二三四社区欧美黄| 欧美aaaaa成人免费观看视频| 国产在线国偷精品产拍免费yy| 成人午夜视频在线观看| 欧美曰成人黄网| 日韩免费电影网站| 日韩码欧中文字| 日本欧洲一区二区| 成人妖精视频yjsp地址| 色天天综合色天天久久| 欧美电视剧免费观看| 亚洲欧美自拍偷拍| 老司机精品视频导航| fc2成人免费人成在线观看播放| 欧美色大人视频| 久久精品一区二区三区不卡牛牛| 亚洲最快最全在线视频| 国模套图日韩精品一区二区| 色香蕉成人二区免费| 日韩午夜av一区| 亚洲精品免费一二三区| 美女高潮久久久| 一本一本大道香蕉久在线精品| 精品美女在线观看| 亚洲第一狼人社区| 成人app网站| 26uuu欧美日本| 日韩在线a电影| 91一区二区三区在线播放| 精品91自产拍在线观看一区| 亚洲综合丁香婷婷六月香| 国产精品一二二区| 日韩欧美中文一区| 天天av天天翘天天综合网| 91伊人久久大香线蕉| 国产拍欧美日韩视频二区| 免费观看91视频大全| 欧美亚洲动漫另类| 中文字幕在线免费不卡| 国产精品一线二线三线精华| 这里只有精品免费| 亚洲va国产天堂va久久en| 91在线国产福利| 欧美激情一区二区在线| 韩国av一区二区三区在线观看| 91精品国产综合久久福利| 一区2区3区在线看| 一本一本大道香蕉久在线精品 | 国产亚洲欧美日韩日本| 热久久一区二区| 欧美午夜免费电影| 一区二区三区视频在线看| 97aⅴ精品视频一二三区| 欧美激情一区三区| 国产91丝袜在线18| 国产欧美日韩一区二区三区在线观看 | 欧美一区午夜精品| 三级久久三级久久| 欧美片在线播放| 日韩国产精品久久久| 欧美精品在欧美一区二区少妇| 亚洲va在线va天堂| 欧美一级在线视频| 国内精品伊人久久久久影院对白| 欧美成人a∨高清免费观看|