cleanup: convert tab to spaces and trim tail spaces

This commit is contained in:
Vincent Wei
2020-02-02 10:53:31 +08:00
parent 8dbe2c63f1
commit 14d020cccf
831 changed files with 468564 additions and 468554 deletions
+50793 -50793
View File
File diff suppressed because it is too large Load Diff
+196 -196
View File
@@ -1,89 +1,89 @@
/*
* Copyright (C) 2000-2007 Beijing Komoxo Inc.
* All rights reserved.
*/
#include "se_minigui.h"
/*
* Copyright (C) 2000-2007 Beijing Komoxo Inc.
* All rights reserved.
*/
#include "se_minigui.h"
#include "stdio.h"
#include "string.h"
#include "kmx_latin1_ttf.h"
#include "kmx_latin1_ttf.h"
#include "fzxh_gb2312_ttf.h"
#include "fzxh_gb18030_1_ttf_stub.h"
#include "fzxh_gb18030_2_ttf_stub.h"
#define ASSERT(a)
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
#define MAX_PATH 256
#define MAX_LOGICAL_FONT_SIZE 16 /* Physical font count per logical font */
#endif
#define MAX_LOGICAL_TABLE_SIZE 256
/* Script Easy font description data definition */
static void* font_table[] =
{
(void*) &kmx_latin1_ttf, 0,
(void*) &fzxh_gb2312_ttf, 0,
#define ASSERT(a)
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
#define MAX_PATH 256
#define MAX_LOGICAL_FONT_SIZE 16 /* Physical font count per logical font */
#endif
#define MAX_LOGICAL_TABLE_SIZE 256
/* Script Easy font description data definition */
static void* font_table[] =
{
(void*) &kmx_latin1_ttf, 0,
(void*) &fzxh_gb2312_ttf, 0,
(void*) &fzxh_gb18030_1_ttf, 0,
(void*) &fzxh_gb18030_2_ttf, 0,
0
};
#define FONT_TABLE_SIZE ((sizeof(font_table) / sizeof(void*) - 1) / 2)
static unsigned char logical_font_table_config[][MAX_LOGICAL_FONT_SIZE] =
{
{4, 0, 1, 2, 3}
};
#define LOGICAL_FONT_TABLE_SIZE (sizeof(logical_font_table_config) / (MAX_LOGICAL_FONT_SIZE * sizeof(unsigned char)))
#define DEFAULT_LOGICAL_FONT_INDEX 0
static unsigned char logical_font_table[MAX_LOGICAL_TABLE_SIZE];
0
};
#define FONT_TABLE_SIZE ((sizeof(font_table) / sizeof(void*) - 1) / 2)
static unsigned char logical_font_table_config[][MAX_LOGICAL_FONT_SIZE] =
{
{4, 0, 1, 2, 3}
};
#define LOGICAL_FONT_TABLE_SIZE (sizeof(logical_font_table_config) / (MAX_LOGICAL_FONT_SIZE * sizeof(unsigned char)))
#define DEFAULT_LOGICAL_FONT_INDEX 0
static unsigned char logical_font_table[MAX_LOGICAL_TABLE_SIZE];
static unsigned int logical_font_table_index_map[LOGICAL_FONT_TABLE_SIZE];
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const
struct {
const char *font_name;
int logical_font_index;
}
font_name_config[] =
{
{0, 0},
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const
struct {
const char *font_name;
int logical_font_index;
}
font_name_config[] =
{
{0, 0},
{0, 0},
{"fzxh_gb18030_1_ttf.le", 0},
{"fzxh_gb18030_2_ttf.le", 0},
};
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
{"fzxh_gb18030_2_ttf.le", 0},
};
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
static const se_font_name_map font_name_map[] = {
/* iso8859-1 */
{"ttf-fzxh-rrncnn-0-0-iso8859-1", 0},
{"ttf-fzxh-rrncnn-0-0-iso8859-1", 0},
/* GB2312 */
{"ttf-fzxh-rrncnn-0-0-GB2312", 0},
/* utf-8 */
{"ttf-fzxh-rrncnn-0-0-utf-8", 0},
};
{"ttf-fzxh-rrncnn-0-0-utf-8", 0},
};
#define FONT_NAME_MAP_SIZE (sizeof(font_name_map) / sizeof(se_font_name_map))
const se_font_description se_font_desc = {
const se_font_description se_font_desc = {
FONT_TABLE_SIZE,
FONT_NAME_MAP_SIZE,
(const se_font_name_map*)font_name_map,
(const void **)font_table,
logical_font_table
FONT_NAME_MAP_SIZE,
(const se_font_name_map*)font_name_map,
(const void **)font_table,
logical_font_table
};
/* The following is the scripteasy mem pool definition */
#define SE_MEM_POOL_SIZE (64 * 1024)
#define SE_MEM_POOL_SIZE (64 * 1024)
#define SE_CACHE_MEM_POOL_SIZE (256 * 1024)
int se_minigui_mem_pool[SE_MEM_POOL_SIZE];
@@ -92,139 +92,139 @@ int se_minigui_cache_mem_pool[SE_CACHE_MEM_POOL_SIZE];
int se_minigui_cache_mem_pool_size = SE_CACHE_MEM_POOL_SIZE * sizeof(int);
/* The Following is for initializing font */
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const char * se_minigui_get_font_dir(void)
{
/* TO BE CUSTOMIZED */
static char font_dir[MAX_PATH + 1] = "/usr/minigui/se_new/minigui/src/fonts/";
return font_dir;
}
static FILE* se_minigui_open_font_file(const char *name)
{
static char path[MAX_PATH + 1];
const char *font_dir;
FILE *handle = 0;
font_dir = se_minigui_get_font_dir();
if(!font_dir)
{
return 0;
}
strcpy(path, font_dir);
strcat(path, name);
handle = fopen(path, "rb");
return handle;
}
unsigned int se_minigui_read_font(
void* name,
void* buffer,
unsigned int offset,
unsigned int size)
{
FILE* handle = (FILE*) name;
unsigned int read = 0;
int result = 0;
if(!handle)
return 0;
fseek(handle, offset, SEEK_SET);
printf("In se_minigui_read_font...\n");
return fread(buffer, 1, size, handle);
}
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
static int append_logical_font(int pos, const unsigned char *logical_font)
{
memcpy (logical_font_table + pos, logical_font, logical_font[0] + 1);
return logical_font[0] + 1;
}
static void build_logical_font_table (void)
{
unsigned int i = 0;
int pos = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
pos += append_logical_font (pos, logical_font_table_config[logical_font_table_index_map[i]]);
}
logical_font_table[pos] = (unsigned char) 0;
}
static void init_logical_font_map(void)
{
unsigned int i = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
logical_font_table_index_map[i] = i;
}
}
void se_minigui_destroy_fonts(void)
{
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
int i = 0;
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_table[i * 2 + 1])
{
fclose((FILE*) font_table[i * 2 + 1]);
font_table[i * 2 + 1] = 0;
}
}
#endif
}
void se_minigui_init_fonts(void)
{
int i = 0;
int pos = 0;
ASSERT (DEFAULT_LOGICAL_FONT_INDEX >= 0 &&
DEFAULT_LOGICAL_FONT_INDEX < LOGICAL_FONT_TABLE_SIZE);
se_minigui_destroy_fonts();
init_logical_font_map();
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_name_config[i].font_name)
{
FILE* handle;
handle = se_minigui_open_font_file(font_name_config[i].font_name);
ASSERT (font_table[i * 2 + 1] == 0);
if (handle)
{
font_table[i * 2 + 1] = (void*)handle;
}
else
{
ASSERT (font_name_config[i].logical_font_index >= 0 &&
font_name_config[i].logical_font_index < LOGICAL_FONT_TABLE_SIZE);
ASSERT (logical_font_table_index_map[font_name_config[i].logical_font_index] == font_name_config[i].logical_font_index);
logical_font_table_index_map[font_name_config[i].logical_font_index] = DEFAULT_LOGICAL_FONT_INDEX;
}
}
}
#endif
build_logical_font_table();
}
/* The Following is for initializing font */
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const char * se_minigui_get_font_dir(void)
{
/* TO BE CUSTOMIZED */
static char font_dir[MAX_PATH + 1] = "/usr/minigui/se_new/minigui/src/fonts/";
return font_dir;
}
static FILE* se_minigui_open_font_file(const char *name)
{
static char path[MAX_PATH + 1];
const char *font_dir;
FILE *handle = 0;
font_dir = se_minigui_get_font_dir();
if(!font_dir)
{
return 0;
}
strcpy(path, font_dir);
strcat(path, name);
handle = fopen(path, "rb");
return handle;
}
unsigned int se_minigui_read_font(
void* name,
void* buffer,
unsigned int offset,
unsigned int size)
{
FILE* handle = (FILE*) name;
unsigned int read = 0;
int result = 0;
if(!handle)
return 0;
fseek(handle, offset, SEEK_SET);
printf("In se_minigui_read_font...\n");
return fread(buffer, 1, size, handle);
}
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
static int append_logical_font(int pos, const unsigned char *logical_font)
{
memcpy (logical_font_table + pos, logical_font, logical_font[0] + 1);
return logical_font[0] + 1;
}
static void build_logical_font_table (void)
{
unsigned int i = 0;
int pos = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
pos += append_logical_font (pos, logical_font_table_config[logical_font_table_index_map[i]]);
}
logical_font_table[pos] = (unsigned char) 0;
}
static void init_logical_font_map(void)
{
unsigned int i = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
logical_font_table_index_map[i] = i;
}
}
void se_minigui_destroy_fonts(void)
{
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
int i = 0;
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_table[i * 2 + 1])
{
fclose((FILE*) font_table[i * 2 + 1]);
font_table[i * 2 + 1] = 0;
}
}
#endif
}
void se_minigui_init_fonts(void)
{
int i = 0;
int pos = 0;
ASSERT (DEFAULT_LOGICAL_FONT_INDEX >= 0 &&
DEFAULT_LOGICAL_FONT_INDEX < LOGICAL_FONT_TABLE_SIZE);
se_minigui_destroy_fonts();
init_logical_font_map();
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_name_config[i].font_name)
{
FILE* handle;
handle = se_minigui_open_font_file(font_name_config[i].font_name);
ASSERT (font_table[i * 2 + 1] == 0);
if (handle)
{
font_table[i * 2 + 1] = (void*)handle;
}
else
{
ASSERT (font_name_config[i].logical_font_index >= 0 &&
font_name_config[i].logical_font_index < LOGICAL_FONT_TABLE_SIZE);
ASSERT (logical_font_table_index_map[font_name_config[i].logical_font_index] == font_name_config[i].logical_font_index);
logical_font_table_index_map[font_name_config[i].logical_font_index] = DEFAULT_LOGICAL_FONT_INDEX;
}
}
}
#endif
build_logical_font_table();
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+99451 -99451
View File
File diff suppressed because it is too large Load Diff
+99017 -99017
View File
File diff suppressed because it is too large Load Diff
+10509 -10509
View File
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -1,4 +1,4 @@
/*
/*
** $Id: sample.c,v 1.38 2009-01-15 07:56:45 houhuihua Exp $
**
** sample.c: Sample program for komoxo scripteasy font.
@@ -35,7 +35,7 @@ static void make_welcome_text (void)
SetRect (&welcome_rc, 10, 20, g_rcScr.right - 10, g_rcScr.bottom / 1.5 - 10);
SetRect (&msg_rc, 10, welcome_rc.bottom + 10, g_rcScr.right - 10, g_rcScr.bottom - 20);
if (strcmp (sys_charset, FONT_CHARSET_GB2312_0) == 0
if (strcmp (sys_charset, FONT_CHARSET_GB2312_0) == 0
|| strcmp (sys_charset, FONT_CHARSET_GBK) == 0) {
format = "昨天,市工商局局长张志宽在市工商局工作会上透露,本市工商系统今年将推出一系列促进经济发展、保护消费者权益的监管措施。其中,将会把B2B交易平台中的网店、专业门户网站和综合门户网站中的经营主体纳入监控,重点监控网上传销、无照经营、售假和网上欺诈等4种行为。张志宽说,2008年网上违法情况主要表现在虚假宣传、网上欺诈、销售假冒产品等。针对这些违法行为,今年本市将把B2B交易平台上的网店、专业门户网站和综合门户网站中的经营主体信息,全部纳入监控。其中,网上传销、无照经营、销售假冒伪劣商品和网上欺诈等4种行为,将成为打击的重点,工商将研究推出新的监管手段。据了解,目前国务院已经将网上交易监管交由国家工重点打击无照经营商总局负责,工商总局正在研究监管意见。本市工商局将根据工商总局的监管意见,相应地完善监管制度。\
\nA proprietary protocol VOIP system built using Peer-to-peer (P2P) techniques.Free for non commercial use when using softphones (PC to PC).Offers toll access to PSTN via SkypeOut and SkypeIn.\nFrom the company that created KaZaA Licenses the Global IP Sound VoiceEngine suite of codecs and related software including their wideband codecs (double the width of regular pstn.) If you find yourself asking, 'why does Skype sound so good?', the answer is primarily this wideband ability.";
@@ -88,12 +88,12 @@ static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
break;
case MSG_TIMER:
sprintf (msg_text, "Timer expired, current tick count: %ul.",
sprintf (msg_text, "Timer expired, current tick count: %ul.",
GetTickCount ());
//InvalidateRect (hWnd, &msg_rc, TRUE);
InvalidateRect (hWnd, NULL, TRUE);
break;
case MSG_LBUTTONDOWN:
strcpy (msg_text, "The left button pressed.");
InvalidateRect (hWnd, &msg_rc, TRUE);
@@ -119,23 +119,23 @@ static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
PLOGFONT logfont;
PLOGFONT bklogfont;
#ifdef UTF_8
logfont = CreateLogFont("sef",
"fzxhgb_yh",
"UTF-8",
logfont = CreateLogFont("sef",
"fzxhgb_yh",
"UTF-8",
FONT_WEIGHT_BOOK,
FONT_SLANT_ROMAN,
0,
FONT_SLANT_ROMAN,
0,
0,
FONT_UNDERLINE_NONE,
FONT_STRUCKOUT_NONE,
16, 0);
#else
logfont = CreateLogFont("sef",
"fzxhgb_yh",
logfont = CreateLogFont("sef",
"fzxhgb_yh",
"GB2312",
FONT_WEIGHT_BOOK,
FONT_SLANT_ROMAN,
0,
FONT_SLANT_ROMAN,
0,
0,
FONT_UNDERLINE_NONE,
FONT_STRUCKOUT_NONE,
@@ -166,7 +166,7 @@ static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
last_key = wParam;
last_key_count = 1;
}
sprintf (msg_text, "The %d %skey pressed %d times",
sprintf (msg_text, "The %d %skey pressed %d times",
wParam, syskey, last_key_count);
InvalidateRect (hWnd, &msg_rc, TRUE);
return 0;
@@ -210,9 +210,9 @@ int MiniGUIMain (int argc, const char* argv[])
CreateInfo.iBkColor = COLOR_lightwhite;
CreateInfo.dwAddData = 0;
CreateInfo.hHosting = HWND_DESKTOP;
hMainWnd = CreateMainWindow (&CreateInfo);
if (hMainWnd == HWND_INVALID)
return -1;
+341 -341
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -130,9 +130,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+3 -3
View File
@@ -130,9 +130,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+3 -3
View File
@@ -130,9 +130,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+1 -1
View File
@@ -366,7 +366,7 @@
/* #undef _MGINCOREFONT_VGAS */
/* Define if include in-core font: 12x12 RBF for GB2312 */
#define _MGINCORERBF_GB12 1
#define _MGINCORERBF_GB12 1
/* Define if include in-core font: 16x16 RBF for GB2312 */
/* #undef _MGINCORERBF_GB16 */
+1 -1
View File
@@ -269,7 +269,7 @@
/*#define _MGHAVE_MOUSECALIBRATE 1*/
/* Define if include skin support */
#define _EXT_SKIN 1
#define _EXT_SKIN 1
/* Define if include 16BPP FB subdriver */
/* #undef _MGFONT_FBLIN16 */
+1 -1
View File
@@ -377,7 +377,7 @@
/* #undef _MGINCOREFONT_VGAS */
/* Define if include in-core font: 12x12 RBF for GB2312 */
#define _MGINCORERBF_GB12 1
#define _MGINCORERBF_GB12 1
/* Define if include in-core font: 16x16 RBF for GB2312 */
#define _MGINCORERBF_GB16 1
+1 -1
View File
@@ -377,7 +377,7 @@
/* #undef _MGINCOREFONT_VGAS */
/* Define if include in-core font: 12x12 RBF for GB2312 */
#define _MGINCORERBF_GB12 1
#define _MGINCORERBF_GB12 1
/* Define if include in-core font: 16x16 RBF for GB2312 */
#define _MGINCORERBF_GB16 1
+3 -3
View File
@@ -156,7 +156,7 @@
/* Define if include the automatic IAL engine */
//#define _MGIAL_AUTO 1
/* Define if include the COMM input engine */
#define _MGIAL_COMM 1
#define _MGIAL_COMM 1
/* Define if support BIG5 charset */
/* #undef _MGCHARSET_BIG5 */
@@ -259,11 +259,11 @@
/* Define if include full gif support */
#define _MGHAVE_MOUSECALIBRATE 1
#define _EXT_FULLGIF 1
#define _EXT_FULLGIF 1
#define _MGCTRL_GRIDVIEW 1
#define _MGCTRL_ICONVIEW 1
/* Define if include skin support */
#define _EXT_SKIN 1
#define _EXT_SKIN 1
/* Define if include 16BPP FB subdriver */
/* #undef _MGFONT_FBLIN16 */
+4 -4
View File
@@ -156,7 +156,7 @@
/* Define if include the automatic IAL engine */
#define _MGIAL_AUTO 1
/* Define if include the COMM input engine */
#define _MGIAL_COMM 1
#define _MGIAL_COMM 1
/* Define if support BIG5 charset */
/* #undef _MGCHARSET_BIG5 */
@@ -259,11 +259,11 @@
/* Define if include full gif support */
#define _MGHAVE_MOUSECALIBRATE 1
#define _EXT_FULLGIF 1
#define _EXT_FULLGIF 1
#define _MGCTRL_GRIDVIEW 1
#define _MGCTRL_ICONVIEW 1
/* Define if include skin support */
#define _EXT_SKIN 1
#define _EXT_SKIN 1
/* Define if include 16BPP FB subdriver */
/* #undef _MGFONT_FBLIN16 */
@@ -573,7 +573,7 @@
/* #define _MGIAL_UCOSII 1 */
/* Define if support UNICODE */
#define _MGCHARSET_UNICODE 1
#define _MGCHARSET_UNICODE 1
/* Define if use own implementation of malloc functions */
/* #define _MGUSE_OWN_MALLOC 1 */
+5 -5
View File
@@ -91,12 +91,12 @@
/* Define to 1 if you have the `tmpfile' function. */
#define HAVE_TMPFILE 1
/*#define HAVE_MODE_T 1*/
/*#define HAVE_MODE_T 1*/
/* Define to 1 if you have the `mktime' function. */
#define HAVE_MKTIME 1
/* Define to 1 if you have the `time' function. */
#define HAVE_TIME 1
#define HAVE_TIME 1
/* Define to 1 if you have the `localtime' function. */
#define HAVE_LOCALTIME 1
@@ -140,9 +140,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+1 -1
View File
@@ -24,5 +24,5 @@
#pragma warning(disable:4101) /* unreferenced local variable */
#pragma warning(error:4150)
#pragma warning(disable:4244) /* No possible loss of data warnings */
#pragma warning(disable:4244) /* No possible loss of data warnings */
#pragma warning(disable:4305) /* No truncation from int to char warnings */
+10
View File
@@ -1,5 +1,13 @@
#!/bin/bash
tab2space() {
sed -i 's/\t/ /g' `find . -name '*.c'`
sed -i 's/\t/ /g' `find . -name '*.h'`
sed -i 's/\s\+$//g' `find . -name '*.c'`
sed -i 's/\s\+$//g' `find . -name '*.h'`
}
# templates
# sed -i 's/\<AAA\>/__AAA/g' `grep AAA -rl include/ src/`
# sed -i 's/\<AAA\>/__mgAAA/g' `grep AAA -rl include/ src/`
@@ -41,4 +49,6 @@
# sed -i 's/\<sysres_init_inner_resource\>/__sysres_init_inner_resource/g' `grep sysres_init_inner_resource -rl include/ src/`
# sed -i 's/\<sysres_get_system_res_path\>/__sysres_get_system_res_path/g' `grep sysres_get_system_res_path -rl include/ src/`
tab2space
exit 0
+4 -4
View File
@@ -5,11 +5,11 @@
*/
case MSG_ACTIVEMENU:
if (wParam == 2) {
CheckMenuRadioItem ((HMENU)lParam,
IDM_40X15, IDM_CUSTOMIZE,
CheckMenuRadioItem ((HMENU)lParam,
IDM_40X15, IDM_CUSTOMIZE,
pConInfo->termType, MF_BYCOMMAND);
CheckMenuRadioItem ((HMENU)lParam,
IDM_DEFAULT, IDM_BIG5,
CheckMenuRadioItem ((HMENU)lParam,
IDM_DEFAULT, IDM_BIG5,
pConInfo->termCharset, MF_BYCOMMAND);
}
break;
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* This example trys to handle the event when the user presses
* This example trys to handle the event when the user presses
* left button and right button of the mouse at the same time.
*/
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+1 -1
View File
@@ -16,6 +16,6 @@ void DrawMyCircle (HDC hdc, int x, int y, int r, gal_pixel pixel)
old_bursh = SetBrushColor (hdc, pixle);
CircleGenerator ((void*)hdc, x, y, r, draw_circle_pixel);
SetBrushColor (hdc, old_brush);
}
+1 -1
View File
@@ -1,4 +1,4 @@
/*
/*
* This program tries to create a new layer named "vcongui" if
* there is no such layer. If there is already a layer named "vcongui",
* this program brings the layer to be the topmost one.
+6 -6
View File
@@ -1,14 +1,14 @@
static LOGFONT *logfont, *logfontgb12, *logfontbig24;
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
FONT_OTHER_NIL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
16, 0);
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
12, 0);
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
24, 0);
+4 -4
View File
@@ -1,14 +1,14 @@
static LOGFONT *logfont, *logfontgb12, *logfontttf;
logfont = CreateLogFontEx (NULL, "SansSerif", "ISO8859-1",
logfont = CreateLogFontEx (NULL, "SansSerif", "ISO8859-1",
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
16, 0);
logfontgb12 = CreateLogFontEx (NULL, "song", "GB2312",
logfontgb12 = CreateLogFontEx (NULL, "song", "GB2312",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
12, 0);
logfontttf = CreateLogFontEx ("ttf", "Courier", "UTF-8",
logfontttf = CreateLogFontEx ("ttf", "Courier", "UTF-8",
FONT_WEIGHT_BLACK, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FS_OTHER_LCDPORTRAIT, FONT_DECORATE_NONE, FONT_RENDER_SUBPIXEL,
24, 0);
+18 -18
View File
@@ -15,35 +15,35 @@ LRESULT ControlTestWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
switch (message) {
case MSG_CREATE:
{
hStaticWnd1 = CreateWindow (CTRL_STATIC,
"This is a static control",
hStaticWnd1 = CreateWindow (CTRL_STATIC,
"This is a static control",
WS_CHILD | SS_NOTIFY | SS_SIMPLE | WS_VISIBLE | WS_BORDER,
IDC_STATIC1,
IDC_STATIC1,
10, 10, 180, 300, hWnd, 0);
hButton1 = CreateWindow (CTRL_BUTTON,
"Button1",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON1,
"Button1",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON1,
20, 20, 80, 20, hStaticWnd1, 0);
hButton2 = CreateWindow (CTRL_BUTTON,
"Button2",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON2,
"Button2",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON2,
20, 50, 80, 20, hStaticWnd1, 0);
hEdit1 = CreateWindow (CTRL_EDIT,
"Edit Box 1",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT1,
"Edit Box 1",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT1,
20, 80, 100, 24, hStaticWnd1, 0);
hStaticWnd2 = CreateWindow (CTRL_STATIC,
"This is child static control",
hStaticWnd2 = CreateWindow (CTRL_STATIC,
"This is child static control",
WS_CHILD | SS_NOTIFY | SS_SIMPLE | WS_VISIBLE | WS_BORDER,
IDC_STATIC1,
IDC_STATIC1,
20, 110, 100, 50, hStaticWnd1, 0);
hEdit2 = CreateWindow (CTRL_EDIT,
"Edit Box 2",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT2,
"Edit Box 2",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT2,
0, 20, 100, 24, hStaticWnd2, 0);
break;
}
+14 -14
View File
@@ -2,19 +2,19 @@
* The following code destroies all resource used by the main window
* and then destroies the main window itself.
*/
case MSG_CLOSE:
/* Destroy the resource used by the main window. */
DestroyLogFont (logfont1);
DestroyLogFont (logfont2);
DestroyLogFont (logfont3);
/* Destroy the child windows. */
DestroyWindow(hWndButton);
DestroyWindow(hWndEdit);
case MSG_CLOSE:
/* Destroy the resource used by the main window. */
DestroyLogFont (logfont1);
DestroyLogFont (logfont2);
DestroyLogFont (logfont3);
/* Destroy the main window. */
DestroyMainWindow (hWnd);
/* Destroy the child windows. */
DestroyWindow(hWndButton);
DestroyWindow(hWndEdit);
/* Send a MSG_QUIT message to quit the message loop. */
PostQuitMessage(hWnd);
return 0;
/* Destroy the main window. */
DestroyMainWindow (hWnd);
/* Send a MSG_QUIT message to quit the message loop. */
PostQuitMessage(hWnd);
return 0;
+4 -4
View File
@@ -7,7 +7,7 @@ static LRESULT InitDialogBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM
switch (message) {
case MSG_INITDIALOG:
return 1;
case MSG_COMMAND:
switch (wParam) {
case IDOK:
@@ -16,16 +16,16 @@ static LRESULT InitDialogBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM
break;
}
break;
}
return DefaultDialogProc (hDlg, message, wParam, lParam);
}
static void InitDialogBox (HWND hWnd)
{
/* Assoiciate the dialog with the controls */
DlgInitProgress.controls = CtrlInitProgress;
/* Display the dialog box and wait */
DialogBoxIndirectParam (&DlgInitProgress, hWnd, InitDialogBoxProc, 0L);
}
+7 -7
View File
@@ -1,8 +1,8 @@
static DLGTEMPLATE DlgInitProgress =
{
WS_BORDER | WS_CAPTION,
WS_BORDER | WS_CAPTION,
WS_EX_NONE,
120, 150, 400, 130,
120, 150, 400, 130,
"VAM-CNC is initializing",
0, 0,
3, NULL,
@@ -10,12 +10,12 @@ static DLGTEMPLATE DlgInitProgress =
};
static CTRLDATA CtrlInitProgress [] =
{
{
{
"static",
WS_VISIBLE | SS_SIMPLE,
10, 10, 380, 16,
IDC_PROMPTINFO,
10, 10, 380, 16,
IDC_PROMPTINFO,
"Initialize...",
0
},
@@ -29,9 +29,9 @@ static CTRLDATA CtrlInitProgress [] =
},
{
"button",
WS_TABSTOP | WS_VISIBLE | BS_DEFPUSHBUTTON,
WS_TABSTOP | WS_VISIBLE | BS_DEFPUSHBUTTON,
170, 70, 60, 25,
IDOK,
IDOK,
"OK",
0
}
+2 -2
View File
@@ -1,4 +1,4 @@
/**
/**
* Selecting a logical font to the DC and output text in GB2312 charset
* by using DrawText.
*/
@@ -10,7 +10,7 @@ void OnModeDrawText (HDC hdc)
const char* szBuff2 = "This is a good day. \n"
"This text is drawn by calling DrawText.";
const char* szBuff3 = "Single line text, center.";
const char* szBuff4 =
const char* szBuff4 =
"This text is drawn by calling DrawText.";
rc1.left = 1; rc1.top = 1; rc1.right = 401; rc1.bottom = 101;
+3 -3
View File
@@ -40,11 +40,11 @@ static void InitCreateInfo (PMAINWINCREATE pCreateInfo)
pCreateInfo->hCursor = GetSystemCursor (0);
pCreateInfo->hIcon = 0;
pCreateInfo->MainWindowProc = HelloWinProc;
pCreateInfo->lx = 0;
pCreateInfo->ty = 0;
pCreateInfo->lx = 0;
pCreateInfo->ty = 0;
pCreateInfo->rx = 320;
pCreateInfo->by = 240;
pCreateInfo->iBkColor = PIXEL_lightwhite;
pCreateInfo->iBkColor = PIXEL_lightwhite;
pCreateInfo->dwAddData = 0;
pCreateInfo->hHosting = HWND_DESKTOP;
}
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* This program parses the command line arguments.
* If the user specified a layer name by using "-layer <layer_name",
* If the user specified a layer name by using "-layer <layer_name",
* the program will try to join the layer, otherwise create a new layer.
*/
int MiniGUIMain (int args, const char* arg[])
+4 -4
View File
@@ -1,11 +1,11 @@
static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
struct _DepInfo *info;
switch(message) {
case MSG_INITDIALOG:
{
/*
/*
* Get the lParam passed to this dialog box, and assign it
* to the second private additional data assoiciated
* with the dialog box.
@@ -17,7 +17,7 @@ static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
case MSG_COMMAND:
{
/*
/*
* Get the parameter from the second private data assoiciated
* with the dialog box.
*/
@@ -34,6 +34,6 @@ static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
}
}
}
return DefaultDialogProc (hDlg, message, wParam, lParam);
}
+7 -7
View File
@@ -2,10 +2,10 @@
* The handler makes sure that the client area always
* is _WIDTH wide and _HEIGHT high.
*/
case MSG_SIZECHANGED:
{
RECT* rcClient = (RECT*)lParam;
rcClient->right = rcClient->left + _WIDTH;
rcClient->bottom = rcClient->top + _HEIGHT;
return 1;
}
case MSG_SIZECHANGED:
{
RECT* rcClient = (RECT*)lParam;
rcClient->right = rcClient->left + _WIDTH;
rcClient->bottom = rcClient->top + _HEIGHT;
return 1;
}
+10 -10
View File
@@ -2,14 +2,14 @@
* The handler set the actual size of the window always
* to be _WIDTH wide and _HEIGHT high.
*/
case MSG_SIZECHANGING:
{
const RECT* rcExpect = (const RECT*)wParam;
RECT* rcResult = (RECT*)lParam;
case MSG_SIZECHANGING:
{
const RECT* rcExpect = (const RECT*)wParam;
RECT* rcResult = (RECT*)lParam;
rcResult->left = rcExpect->left;
rcResult->top = rcExpect->top;
rcResult->right = rcExpect->left + _WIDTH;
rcResult->bottom = rcExpect->top + _HEIGHT;
return 0;
}
rcResult->left = rcExpect->left;
rcResult->top = rcExpect->top;
rcResult->right = rcExpect->left + _WIDTH;
rcResult->bottom = rcExpect->top + _HEIGHT;
return 0;
}
+8 -8
View File
@@ -3,14 +3,14 @@
*/
case MSG_PAINT:
{
HDC hdc = BeginPaint (hWnd);
HDC hdc = BeginPaint (hWnd);
for (j = 0; j < 10; j ++) {
if (RectVisible (hdc, rcs + j)) {
FillBox (hdc, rcs[j].left, rcs[j].top, rcs [j].right, rcs [j].bottom);
}
}
for (j = 0; j < 10; j ++) {
if (RectVisible (hdc, rcs + j)) {
FillBox (hdc, rcs[j].left, rcs[j].top, rcs [j].right, rcs [j].bottom);
}
}
EndPaint (hWnd, hdc);
return 0;
EndPaint (hWnd, hdc);
return 0;
}
+4 -4
View File
@@ -53,15 +53,15 @@ static void GDIDemo_Region (HWND hWnd, HDC hdc)
FillBox (hdc, 400, 0, 180, 200);
/*
* Empty two clipping region to free the clipping rectangles used
/*
* Empty two clipping region to free the clipping rectangles used
* by them.
*/
EmptyClipRgn (&my_cliprgn1);
EmptyClipRgn (&my_cliprgn2);
/*
* You should not forget to destroy the FreeClipRectList in your
/*
* You should not forget to destroy the FreeClipRectList in your
* applications.
* Here we do not destroy the heap because we will use it in next call.
*
+1 -1
View File
@@ -7,7 +7,7 @@ static LRESULT StepControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l
{
HDC hdc;
HELPWININFO* info;
switch (message) {
case MSG_PAINT:
hdc = BeginPaint (hwnd);
+2 -2
View File
@@ -3,7 +3,7 @@ typedef struct TEST_REQ
int a, b;
} TEST_REQ;
/*
/*
* In the server, we define the request handler
* and register it.
*/
@@ -11,7 +11,7 @@ static int ServerSendReply (int clifd, void* reply, int len)
{
MSG reply_msg = {HWND_INVALID, 0};
/*
/*
* Sending a null message to client in order to indicate this is
* a reply of a request.
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* This program which should be named "mginit" calls "ServerStartup"
* This program which should be named "mginit" calls "ServerStartup"
* to start the server of MiniGUI-Processes.
*/
int MiniGUIMain (int args, const char* arg[])
+8 -8
View File
@@ -9,7 +9,7 @@ BOOL listen_socket (HWND hwnd)
return RegisterListenFD (fd, POLL_IN, hwnd, NULL);
}
/*
/*
* When the server receives the request to connect from a client,
* the window hwnd will receive a MSG_FDEVENT message.
* Now the server can accept the request.
@@ -17,11 +17,11 @@ BOOL listen_socket (HWND hwnd)
LRESULT MyWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
...
case MSG_FDEVENT:
if (LOWORD (wParam) == listen_fd) {
if (LOWORD (wParam) == listen_fd) {
/* This message comes from the listen socket fd. */
pid_t pid;
uid_t uid;
@@ -31,7 +31,7 @@ LRESULT MyWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
RegisterListenFD (conn_fd, POLL_IN, hwnd, NULL);
}
}
else {
else {
/* Client send a request. */
int fd = LOWORD(wParam);
/* Handle the request from client. */
@@ -39,9 +39,9 @@ LRESULT MyWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
sock_write_t (fd, ....);
}
break;
...
}
}
@@ -50,7 +50,7 @@ LRESULT MyWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
*/
int conn_fd;
if ((conn_fd = cli_conn (LISTEN_SOCKET, 'b')) >= 0) {
/* Send a request to the server. */
sock_write_t (fd, ....);
+7 -7
View File
@@ -35,20 +35,20 @@ static LRESULT ControlTestWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARA
{
HWND hWnd1, hWnd2, hWnd3;
CreateWindow (CTRL_STATIC, "Digit-only box:", WS_CHILD | WS_VISIBLE | SS_RIGHT, 0,
CreateWindow (CTRL_STATIC, "Digit-only box:", WS_CHILD | WS_VISIBLE | SS_RIGHT, 0,
10, 10, 180, 24, hWnd, 0);
hWnd1 = CreateWindow (CTRL_EDIT, "", WS_CHILD | WS_VISIBLE | WS_BORDER, IDC_CTRL1,
hWnd1 = CreateWindow (CTRL_EDIT, "", WS_CHILD | WS_VISIBLE | WS_BORDER, IDC_CTRL1,
200, 10, 180, 24, hWnd, MY_ES_DIGIT_ONLY);
CreateWindow (CTRL_STATIC, "Alpha-only box:", WS_CHILD | WS_VISIBLE | SS_RIGHT, 0,
CreateWindow (CTRL_STATIC, "Alpha-only box:", WS_CHILD | WS_VISIBLE | SS_RIGHT, 0,
10, 40, 180, 24, hWnd, 0);
hWnd2 = CreateWindow (CTRL_EDIT, "", WS_CHILD | WS_BORDER | WS_VISIBLE, IDC_CTRL2,
hWnd2 = CreateWindow (CTRL_EDIT, "", WS_CHILD | WS_BORDER | WS_VISIBLE, IDC_CTRL2,
200, 40, 180, 24, hWnd, MY_ES_ALPHA_ONLY);
CreateWindow (CTRL_STATIC, "Normal edit box:", WS_CHILD | WS_VISIBLE | SS_RIGHT, 0,
CreateWindow (CTRL_STATIC, "Normal edit box:", WS_CHILD | WS_VISIBLE | SS_RIGHT, 0,
10, 70, 180, 24, hWnd, 0);
hWnd3 = CreateWindow (CTRL_EDIT, "", WS_CHILD | WS_BORDER | WS_VISIBLE, IDC_CTRL2,
hWnd3 = CreateWindow (CTRL_EDIT, "", WS_CHILD | WS_BORDER | WS_VISIBLE, IDC_CTRL2,
200, 70, 180, 24, hWnd, MY_ES_ALPHA_ONLY);
CreateWindow ("button", "Close", WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE, IDC_CTRL4,
CreateWindow ("button", "Close", WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE, IDC_CTRL4,
100, 100, 60, 24, hWnd, 0);
/* Set new window procedure and save the old procedure. */
+3 -3
View File
@@ -39,11 +39,11 @@ static void InitCreateInfo (PMAINWINCREATE pCreateInfo)
pCreateInfo->hCursor = GetSystemCursor (0);
pCreateInfo->hIcon = 0;
pCreateInfo->MainWindowProc = HelloWinProc;
pCreateInfo->lx = 0;
pCreateInfo->ty = 0;
pCreateInfo->lx = 0;
pCreateInfo->ty = 0;
pCreateInfo->rx = 320;
pCreateInfo->by = 240;
pCreateInfo->iBkColor = PIXEL_lightwhite;
pCreateInfo->iBkColor = PIXEL_lightwhite;
pCreateInfo->dwAddData = 0;
pCreateInfo->hHosting = HWND_DESKTOP;
}
+1 -1
View File
@@ -235,7 +235,7 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
/* Here we provide MG_GNUC_EXTENSION as an alias for __extension__,
* where this is valid. This allows for warningless compilation of
* "long long" types even in the presence of '-ansi -pedantic'.
* "long long" types even in the presence of '-ansi -pedantic'.
*/
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
#define MG_GNUC_EXTENSION __extension__
+8 -8
View File
@@ -14,10 +14,10 @@
* \file animation.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2002/01/06
*
*
\verbatim
This file is part of MiniGUI, a mature cross-platform windowing
This file is part of MiniGUI, a mature cross-platform windowing
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
@@ -55,7 +55,7 @@
/*
* $Id: animation.h 10865 2008-08-27 06:52:22Z wangjian $
*
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* pSOS, ThreadX, NuCleus, OSE, and Win32.
*/
@@ -83,10 +83,10 @@ typedef struct _ANIMATIONFRAME
/** The disposal method (from GIF89a specification):
* Indicates the way in which the graphic is to be treated after being displayed.
* - 0\n No disposal specified. The decoder is not required to take any action.
* - 1\n Do not dispose. The graphic is to be left in place.
* - 2\n Restore to background color. The area used by the frame must be restored to
* - 1\n Do not dispose. The graphic is to be left in place.
* - 2\n Restore to background color. The area used by the frame must be restored to
* the background color.
* - 3\n Restore to previous. The decoder is required to restore the area overwritten by
* - 3\n Restore to previous. The decoder is required to restore the area overwritten by
* the frmae with what was there prior to rendering the frame.
*/
int disposal;
@@ -251,7 +251,7 @@ MG_EXPORT void DestroyAnimation (ANIMATION* anim, BOOL free_it);
#define ANS_FITTOANI 0x0004L
/**
* \def ANS_WINBGC
* \def ANS_WINBGC
* \brief Use the background color of the window.
*/
#define ANS_WINBGC 0x0010L
@@ -302,7 +302,7 @@ MG_EXPORT void DestroyAnimation (ANIMATION* anim, BOOL free_it);
* \def ANM_STARTPLAY
* \brief Indicates the control to start playing the animation.
*
* The animation will not be played when create the control,
* The animation will not be played when create the control,
* an application should send ANM_STARTPLAY to an animation control
* to start playing the animation.
*
+54 -54
View File
@@ -14,10 +14,10 @@
* \file button.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2001/12/29
*
*
\verbatim
This file is part of MiniGUI, a mature cross-platform windowing
This file is part of MiniGUI, a mature cross-platform windowing
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
@@ -55,13 +55,13 @@
/*
* $Id: button.h 10690 2008-08-18 09:32:47Z weiym $
*
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* pSOS, ThreadX, NuCleus, OSE, and Win32.
*/
#ifndef _MGUI_CTRL_BUTTON_H
#define _MGUI_CTRL_BUTTON_H
#ifdef __cplusplus
extern "C" {
@@ -105,24 +105,24 @@ extern "C" {
/**
* \def BS_DEFPUSHBUTTON
* \brief Creates a push button that behaves like a BS_PUSHBUTTON style button.
* Creates a push button that behaves like a BS_PUSHBUTTON style button,
* but also has a heavy black border. If the button is in a dialog box,
* the user can select the button by pressing the enter key,
* even when the button does not have the input focus.
* This style is useful for enabling the user to quickly select
* Creates a push button that behaves like a BS_PUSHBUTTON style button,
* but also has a heavy black border. If the button is in a dialog box,
* the user can select the button by pressing the enter key,
* even when the button does not have the input focus.
* This style is useful for enabling the user to quickly select
* the most likely (default) option.
*/
#define BS_DEFPUSHBUTTON 0x00000001L
/**
* \def BS_CHECKBOX
* \brief Creates a check button is a button that can be either selected
* or deselected, and its selection is independent of the selections of
* \brief Creates a check button is a button that can be either selected
* or deselected, and its selection is independent of the selections of
* any other buttons.
*
* By default, the text is displayed to the right of the check box.
* To display the text to the left of the check box, combine this flag
* By default, the text is displayed to the right of the check box.
* To display the text to the left of the check box, combine this flag
* with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style).
*/
#define BS_CHECKBOX 0x00000002L
@@ -131,8 +131,8 @@ extern "C" {
* \def BS_AUTOCHECKBOX
* \brief Creates a button that is almost the same as a check box.
*
* Creates a button that is the same as a check box,
* except that the check state automatically toggles between
* Creates a button that is the same as a check box,
* except that the check state automatically toggles between
* checked and unchecked each time the user selects the check box.
*/
#define BS_AUTOCHECKBOX 0x00000003L
@@ -140,12 +140,12 @@ extern "C" {
/**
* \def BS_RADIOBUTTON
* \brief Creates a radio button that can be either selected
* or deselected, but when selecting it any other buttons in
* its group will be cleared.
* or deselected, but when selecting it any other buttons in
* its group will be cleared.
*
* By default, the text is displayed to the right of the circle.
* To display the text to the left of the circle, combine this flag
* with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style).
* By default, the text is displayed to the right of the circle.
* To display the text to the left of the circle, combine this flag
* with the BS_LEFTTEXT style (or with the equivalent BS_RIGHTBUTTON style).
* Use radio buttons for groups of related, but mutually exclusive choices.
*/
#define BS_RADIOBUTTON 0x00000004L
@@ -153,11 +153,11 @@ extern "C" {
/**
* \def BS_AUTORADIOBUTTON
* \brief Creates a button that is almost the same as a radio button.
*
* Creates a button that is the same as a radio button,
* except that when the user selects it, The system automatically
*
* Creates a button that is the same as a radio button,
* except that when the user selects it, The system automatically
* sets the button's check state to checked
* and automatically sets the check state for all other buttons
* and automatically sets the check state for all other buttons
* in the same group to unchecked.
*/
#define BS_AUTORADIOBUTTON 0x00000005L
@@ -165,10 +165,10 @@ extern "C" {
/**
* \def BS_3STATE
* \brief Creates a button that is almost the same as a check box.
*
* Creates a button that is the same as a check box, except
*
* Creates a button that is the same as a check box, except
* that the box can be grayed as well as checked or unchecked.
* Use the grayed state to show that the state of the check box
* Use the grayed state to show that the state of the check box
* is not determined.
*/
#define BS_3STATE 0x00000006L
@@ -177,7 +177,7 @@ extern "C" {
* \def BS_AUTO3STATE
* \brief Creates a button that is almost the same as a three-state check box.
*
* Creates a button that is the same as a three-state check box,
* Creates a button that is the same as a three-state check box,
* except that the box changes its state when the user selects it.
* The state cycles through checked, grayed, and unchecked.
*/
@@ -212,7 +212,7 @@ extern "C" {
* \def BS_LEFTTEXT
* \brief Places text on the left side.
*
* Places text on the left side of the radio button
* Places text on the left side of the radio button
* or check box when combined with a radio button or check box style.
*/
#define BS_LEFTTEXT 0x00000020L
@@ -238,8 +238,8 @@ extern "C" {
* \def BS_LEFT
* \brief Left-justifies the text in the button rectangle.
*
* However, if the button is a check box or radio button that
* does not have the BS_RIGHTBUTTON style, the text is left
* However, if the button is a check box or radio button that
* does not have the BS_RIGHTBUTTON style, the text is left
* justified on the right side of the check box or radio button.
*/
#define BS_LEFT 0x00000100L
@@ -247,9 +247,9 @@ extern "C" {
/**
* \def BS_RIGHT
* \brief Right-justifies text in the button rectangle.
*
* However, if the button is a check box or radio button that
* does not have the BS_RIGHTBUTTON style, the text is
*
* However, if the button is a check box or radio button that
* does not have the BS_RIGHTBUTTON style, the text is
* right justified on the right side of the check box or radio button.
*/
#define BS_RIGHT 0x00000200L
@@ -294,8 +294,8 @@ extern "C" {
* \def BS_PUSHLIKE
* \brief Makes a button look and act like a push button.
*
* Makes a button (such as a check box, three-state check box, or radio button)
* look and act like a push button. The button looks raised when it isn't
* Makes a button (such as a check box, three-state check box, or radio button)
* look and act like a push button. The button looks raised when it isn't
* pushed or checked, and sunken when it is pushed or checked.
*/
#define BS_PUSHLIKE 0x00001000L
@@ -304,7 +304,7 @@ extern "C" {
* \def BS_MULTLINE
* \brief Wraps the button text to multiple lines.
*
* Wraps the button text to multiple lines if the text string is
* Wraps the button text to multiple lines if the text string is
* too long to fit on a single line in the button rectangle.
*/
#define BS_MULTLINE 0x00002000L
@@ -329,7 +329,7 @@ extern "C" {
/**
* \def BS_NOBORDER
* \brief The no border style of button.
* \brief The no border style of button.
*/
#define BS_NOBORDER 0x00010000L
@@ -349,7 +349,7 @@ extern "C" {
/**
* \def BST_POSE_MASK
* \brief The pose(normal, hilite, pushed and disable) mask of
* \brief The pose(normal, hilite, pushed and disable) mask of
* status of button.
*/
#define BST_POSE_MASK 0x0003
@@ -381,7 +381,7 @@ extern "C" {
/**
* \def BST_CHECK_MASK
* \brief The check(unchecked, checked and indeterminate) mask of
* \brief The check(unchecked, checked and indeterminate) mask of
* status of button.
*/
#define BST_CHECK_MASK 0x000c
@@ -400,7 +400,7 @@ extern "C" {
/**
* \def BST_INDETERMINATE
* \brief Indicates the button is grayed because
* \brief Indicates the button is grayed because
* the state of the button is indeterminate.
*/
#define BST_INDETERMINATE 0x0008
@@ -422,7 +422,7 @@ extern "C" {
* \def BM_GETCHECK
* \brief Retrieves the check state of a radio button or check box.
*
* An application sends a BM_GETCHECK message to retrieve
* An application sends a BM_GETCHECK message to retrieve
* the check state of a radio button or check box.
*
* \code
@@ -445,7 +445,7 @@ extern "C" {
* \def BM_SETCHECK
* \brief Sets the check state of a radio button or check box.
*
* An application sends a BM_SETCHECK message to set
* An application sends a BM_SETCHECK message to set
* the check state of a radio button or check box.
*
* \code
@@ -471,7 +471,7 @@ extern "C" {
* \def BM_GETSTATE
* \brief Gets the state of a button or check box.
*
* An application sends a BM_GETSTATE message to
* An application sends a BM_GETSTATE message to
* determine the state of a button or check box.
*
* \code
@@ -490,7 +490,7 @@ extern "C" {
* \def BM_SETSTATE
* \brief Sets the state of a button.
*
* An application sends a BM_SETSTATE message to set the state of a
* An application sends a BM_SETSTATE message to set the state of a
* button.
*
* \code
@@ -551,8 +551,8 @@ extern "C" {
/**
* \def BM_ENABLE
* \brief enable or disable the button.
*If it is disabled, it can receive mouse and key messages
* \brief enable or disable the button.
*If it is disabled, it can receive mouse and key messages
*but don't response them
*
* \code
@@ -571,7 +571,7 @@ extern "C" {
* \def BM_GETIMAGE
* \brief Retrieves the handle to the image.
*
* An application sends a BM_GETIMAGE message to
* An application sends a BM_GETIMAGE message to
* retrieve a handle to the image (icon or bitmap) associated with the button.
*
* \code
@@ -595,15 +595,15 @@ extern "C" {
#define BM_IMAGE_BITMAP 1
#define BM_IMAGE_ICON 2
/**
* \def BM_SETIMAGE
* \brief Associates a new image (icon or bitmap) with the button.
*
* An application sends a BM_SETIMAGE message to
* An application sends a BM_SETIMAGE message to
* associate a new image (icon or bitmap) with the button.
*
* Please use BM_IMAGE_BITMAP or BM_IMAGE_ICON as the first parameter of the message
* Please use BM_IMAGE_BITMAP or BM_IMAGE_ICON as the first parameter of the message
* to indicate the type of button control image:
* - BM_IMAGE_BITMAP\n
* Specifies the type of image to associate with the button to be a bitmap.
@@ -615,7 +615,7 @@ extern "C" {
#define BM_MSGMAX 0xF100
/** @} end of ctrl_button_msgs */
/**
* \defgroup ctrl_button_ncs Notification codes of button control
* @{
@@ -642,7 +642,7 @@ extern "C" {
/**
* \def BN_UNHILITE
* \brief The BN_UNHILITE notification message is sent when the user unhilite a button,
* \brief The BN_UNHILITE notification message is sent when the user unhilite a button,
* (the user moves the mouse leaving it)
*/
#define BN_UNHILITE 3
+43 -43
View File
@@ -14,10 +14,10 @@
* \file combobox.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2001/12/29
*
*
\verbatim
This file is part of MiniGUI, a mature cross-platform windowing
This file is part of MiniGUI, a mature cross-platform windowing
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
@@ -55,13 +55,13 @@
/*
* $Id: combobox.h 10690 2008-08-18 09:32:47Z weiym $
*
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* pSOS, ThreadX, NuCleus, OSE, and Win32.
*/
#ifndef _MGUI_CTRL_COMBOBOX_H
#define _MGUI_CTRL_COMBOBOX_H
#ifdef __cplusplus
extern "C" {
@@ -150,7 +150,7 @@ extern "C" {
* \def CBS_NOTIFY
* \brief Notifies the parent window.
*
* Causes the combo box to notify the parent window
* Causes the combo box to notify the parent window
* with a notification message.
*/
#define CBS_NOTIFY 0x0008L
@@ -169,14 +169,14 @@ extern "C" {
/**
* \def CBS_AUTOHSCROLL
* \brief This style is reserved.
* \brief This style is reserved.
*/
#define CBS_AUTOHSCROLL 0x0040L
/**
* \def CBS_DISABLENOSCROLL
* \brief This style is reserved.
* \brief This style is reserved.
*/
#define CBS_DISABLENOSCROLL 0x0080L
@@ -238,10 +238,10 @@ extern "C" {
/**
* \def CB_GETEDITSEL
* \brief Gets the starting and ending character positions of the current
* \brief Gets the starting and ending character positions of the current
* selection.
*
* An application sends a CB_GETEDITSEL message to get the starting and ending
* An application sends a CB_GETEDITSEL message to get the starting and ending
* character positions of the current selection in the edit control of a combo box.
*
* \code
@@ -267,7 +267,7 @@ extern "C" {
* \brief Limits the length of text in the edit control.
*
* An application sends a CB_LIMITTEXT message to limit the length of the text
* the user may type into the edit control of a combo box.
* the user may type into the edit control of a combo box.
*
* \code
* CB_LIMITTEXT
@@ -285,10 +285,10 @@ extern "C" {
/**
* \def CB_SETEDITSEL
* \brief Sets the starting and ending character positions of the current
* \brief Sets the starting and ending character positions of the current
* selection.
*
* An application sends a CB_SETEDITSEL message to set the starting and ending
* An application sends a CB_SETEDITSEL message to set the starting and ending
* character positions of the current selection in the edit control of a combo box.
*
* \code
@@ -312,7 +312,7 @@ extern "C" {
* \brief Adds a string to the list box of a combo box.
*
* An application sends a CB_ADDSTRING message to add a string to the list box
* of a combo box.
* of a combo box.
*
* \code
* CB_ADDSTRING
@@ -337,7 +337,7 @@ extern "C" {
* \brief Deletes a string in the list box of a combo box.
*
* An application sends a CB_DELETESTRING message to delete a string in the list box
* of a combo box.
* of a combo box.
*
* \code
* CB_DELETESTRING
@@ -359,8 +359,8 @@ extern "C" {
* \def CB_GETCOUNT
* \brief Retreives the number of items in the list box of a combo box.
*
* An application sends a CB_GETCOUNT message to retreive the number of items
* in the list box of a combo box.
* An application sends a CB_GETCOUNT message to retreive the number of items
* in the list box of a combo box.
*
* \code
* CB_GETCOUNT
@@ -377,8 +377,8 @@ extern "C" {
* \def CB_GETCURSEL
* \brief Retreives the index of the currently selected item in the list box.
*
* An application sends a CB_GETCURSEL message to retreive the index of the
* currently selected item in the list box of a combo box.
* An application sends a CB_GETCURSEL message to retreive the index of the
* currently selected item in the list box of a combo box.
*
* \code
* CB_GETCURSEL
@@ -396,8 +396,8 @@ extern "C" {
* \def CB_GETLBTEXT
* \brief Retreives the string of an item in the list box.
*
* An application sends a CB_GETLBTEXT message to retreive the string of
* a specified item in the list box of a combo box.
* An application sends a CB_GETLBTEXT message to retreive the string of
* a specified item in the list box of a combo box.
*
* \code
* CB_GETLBTEXT
@@ -422,7 +422,7 @@ extern "C" {
* \brief Gets the string length of an item in the list box.
*
* An application sends a CB_GETLBTEXTLEN message to get the string length
* of a specified item in the list box of a combo box.
* of a specified item in the list box of a combo box.
*
* \code
* CB_GETLBTEXTLEN
@@ -442,7 +442,7 @@ extern "C" {
* \def CB_INSERTSTRING
* \brief Inserts a string to the list box of a combo box.
*
* An application sends a CB_INSERTSTRING message to insert a string to the list
* An application sends a CB_INSERTSTRING message to insert a string to the list
* box of a combo box. Unlike the CB_ADDSTRING message, the CB_INSERTSTRING message
* do not cause a list to be sorted.
*
@@ -471,7 +471,7 @@ extern "C" {
* \brief Removes all items from the list box and edit control.
*
* An application sends a CB_RESETCONTENT message remove all items from the list
* box and edit control of a combo box.
* box and edit control of a combo box.
*
* \code
* CB_RESETCONTENT
@@ -486,10 +486,10 @@ extern "C" {
/**
* \def CB_FINDSTRING
* \brief Searchs the list box for an item beginning with the characters in a
* \brief Searchs the list box for an item beginning with the characters in a
* specified string.
*
* An application sends a CB_FINDSTRING message to search the list box for an
* An application sends a CB_FINDSTRING message to search the list box for an
* item beginning with the characters in a specified string.
*
* \code
@@ -523,7 +523,7 @@ extern "C" {
* lParam = 0;
* \endcode
*
* \param index The index of the string to select.
* \param index The index of the string to select.
*
* \return CB_OKAY on success; otherwise CB_ERR to indicate an invalid index.
*/
@@ -533,10 +533,10 @@ extern "C" {
/**
* \def CB_GETITEMADDDATA
* \brief Retreives the application-supplied 32-bit value associated with the
* \brief Retreives the application-supplied 32-bit value associated with the
* specified item.
*
* An application sends an CB_GETITEMADDDATA message to retrive the 32-bit data
* An application sends an CB_GETITEMADDDATA message to retrive the 32-bit data
* value associated with with an item in the list box of the combo box.
*
* \code
@@ -557,9 +557,9 @@ extern "C" {
/**
* \def CB_SETITEMADDDATA
* \brief Sets a 32-bit data value with the specified item.
*
* An application sends an CB_SETITEMADDDATA message to associate a 32-bit data
* value specified in the lParam parameter with an item in the list box that
*
* An application sends an CB_SETITEMADDDATA message to associate a 32-bit data
* value specified in the lParam parameter with an item in the list box that
* is specified in the wParam parameter.
*
* \code
@@ -582,7 +582,7 @@ extern "C" {
/**
* \def CB_GETDROPPEDCONTROLRECT
* \brief Retreives the screen coordinates of the dropdown list box of a combo box.
* \brief Retreives the screen coordinates of the dropdown list box of a combo box.
*
* \code
* CB_GETDROPPEDCONTROLRECT
@@ -599,8 +599,8 @@ extern "C" {
/**
* \def CB_SETITEMHEIGHT
* \brief Sets the height of all items of the list box in a combo box.
*
* An application sends an CB_SETITEMHEIGHT message to set the height of
*
* An application sends an CB_SETITEMHEIGHT message to set the height of
* all items of the list box in a combo box.
*
* \code
@@ -646,16 +646,16 @@ extern "C" {
* lParam = 0;
* \endcode
*
* \return If the list box is visible, the return value is TRUE;
* \return If the list box is visible, the return value is TRUE;
* otherwise, it is FALSE.
*/
#define CB_GETDROPPEDSTATE 0xF157
/**
* \def CB_FINDSTRINGEXACT
* \brief Searchs the list box for an item that matches the specified string.
* \brief Searchs the list box for an item that matches the specified string.
*
* An application sends a CB_FINDSTRINGEXACT message to search the list box for an
* An application sends a CB_FINDSTRINGEXACT message to search the list box for an
* item that matches a specified string.
*
* \code
@@ -858,10 +858,10 @@ extern "C" {
* \def CB_SETSTRCMPFUNC
* \brief Sets the STRCMP function used to sort items.
*
* An application sends a CB_SETSTRCMPFUNC message to set a
* An application sends a CB_SETSTRCMPFUNC message to set a
* new STRCMP function to sort items in the combo-box.
*
* Note that you should send this message before adding
* Note that you should send this message before adding
* any item to the combo-box control.
*
* \code
@@ -891,7 +891,7 @@ extern "C" {
* \def CB_GETCHILDREN
* \brief Gets the handles to the children of a ComboBox control.
*
* An application sends a CB_GETCHILDREN message to get the handles
* An application sends a CB_GETCHILDREN message to get the handles
* to the children of a ComboBox control.
*
* \code
@@ -942,7 +942,7 @@ extern "C" {
* \def CBN_DBLCLK
* \brief Notifies the user has double clicked an item.
*
* A combo box created with the CBS_NOTIFY style sends an CBN_DBLCLK notification
* A combo box created with the CBS_NOTIFY style sends an CBN_DBLCLK notification
* message to its parent window when the user double-clicks a string in its listbox.
*/
#define CBN_DBLCLK 2
@@ -986,7 +986,7 @@ extern "C" {
* \def CBN_SELECTOK
* \brief Notifies the selection of a list item.
*
* The CBN_SELECTOK notification code is sent when the user has
* The CBN_SELECTOK notification code is sent when the user has
* selected a list item.
*/
#define CBN_SELECTOK 9
@@ -1007,7 +1007,7 @@ extern "C" {
* The CBN_CLICKED notification code is sent when the user has clicked combo box.
*/
#define CBN_CLICKED 11
/** @} end of ctrl_combobox_ncs */
/** @} end of ctrl_combobox */
+5 -5
View File
@@ -14,10 +14,10 @@
* \file coolbar.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2002/01/06
*
*
\verbatim
This file is part of MiniGUI, a mature cross-platform windowing
This file is part of MiniGUI, a mature cross-platform windowing
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
@@ -55,7 +55,7 @@
/*
* $Id: coolbar.h 10690 2008-08-18 09:32:47Z weiym $
*
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* pSOS, ThreadX, NuCleus, OSE, and Win32.
*/
@@ -158,7 +158,7 @@ typedef COOLBARITEMINFO *PCOOLBARITEMINFO;
* \brief The item bitmap has customized size.
*
* \note For the control with this style, you should pass
* the width and the height of the item bitmap by
* the width and the height of the item bitmap by
* the argument \a dwAddData of \a CreateWindowEx function.
*
* \code
@@ -204,7 +204,7 @@ typedef COOLBARITEMINFO *PCOOLBARITEMINFO;
* lParam = (LPARAM)newIteminfo;
* \endcode
*
* \param newIteminfo Pointer to the item info structure of the new item
* \param newIteminfo Pointer to the item info structure of the new item
* to be added.
*
* \return Zero when success, otherwise less than 0;

Some files were not shown because too many files have changed in this diff Show More