wxMicroWindows port
===================
Julian Smart 2001-12-08
This is a port of wxWidgets to MicroWindows, under Linux.
Widgets are supplied by the wxUniversal project, while the
underlying port uses the Windows ports with small modifications
for the MicroWindows API.
=== NOTE: ===
Current efforts are being concentrated on a port to Nano-X,
which potentially offers greater flexibility than the WIN32
API of MicroWindows, such as the ability to run multiple
Nano-X processes simultaneously. Please see
../docs/x11/readme-nanox.txt for information.
There are many things missing from MicroWindows that will
make the port quite limited for the time being.
In particular, only one WIN32 app may be run at a time.
Note that you can gain confidence in the WIN32/wxUniversal
combination by compiling wxUniversal under Windows using VC++,
using src/wxUniv.dsp. You can compile the minimal
and widgets samples in wxUniversal mode using the
UnivDebug and UnivRelease targets. Most of the code is shared
between this combination, and the wxMicroWindows port.
Installation
============
MicroWindows:
- unarchive MicroWindows 0.89pre8
- change 'config' to use X11 and any other options you feel fit.
Suggestions for changes to the defaults:
ERASEMOVE=N (otherwise moving windows will look messy)
X11=Y
OPTIMIZE=N
DEBUG=Y
VERBOSE=Y
Note: these are already applied by the patch below.
- apply microwindows.patches (from wxWidgets:
docs/microwin/microwindows.patches) to fix PeekMessage
and other issues. If the patch doesn't apply automatically,
you may need to apply it by hand, and the relevant changed
functions are given at the end of this file for convenience.
Example patch command:
% cd microwindows-0.89pre8.orig
% patch -p0 < ~/wx2/docs/microwin/microwindows.patches
- compile by typing 'make' from within the MicroWindows src directory
wxMicroWindows:
- Download wxMSW 2.3.4 or greater, or get it from CVS
- Copy include/wx/msw/setup_microwin.h to include/wx/setup.h if
include/wx/setup.h doesn't exist
- EITHER:
o set the MICROWINDOWS environment variable, e.g.:
% export MICROWINDOWS=/home/julians/local/microwindows/microwindows-0.89pre8/src
OR:
o change the TOP variable at the top of src/msw/makefile.mic
to reflect where MicroWindows is installed
- type 'make -f makefile.mic all' from src/msw. To clean, use
cleanwx and NOT clean since that will clean MicroWindows itself
- to make the sample, cd into samples/minimal, edit the TOP variable
(or set MICROWINDOWS) as before, and type 'make -f makefile.mic all'
Running 'minimal' runs the virtual MicroWindows desktop
and the minimal sample, since in a MicroWindows WIN32 application
they are one and the same binary.
Status
======
The minimal sample is almost fully-functional, apart from some
presentation issues (no menu borders and status bar in the wrong
place.
The widgets sample is crashing in DeleteObject (see notes below).
Implementation Notes
====================
wxMicroWindows is essentially the wxMSW port + wxUniversal
widgets. Lots of things in include/wx/univ/setup.h are switched
off to allow the port to compile. There are also #ifdefs
switching off further functionality, such as most wxBitmap
functions, pending proper implementation.
There are some WIN32 API functions not implemented by MicroWindows
that are instead stubbed out in include/wx/msw/microwin.c,
and 'implemented' in src/msw/microwin.c. Some of these functions
are important, some less so. They will need to be implemented
in due course. But implementing missing functionality in this way
is preferably to proliferating many #ifdefs in the
wxMSW/wxMicroWindows port itself.
Errors/warnings
===============
In file ../../src/msw/window.cpp at line 1294: 'UpdateWindow' failed with error 0x00000000 (Success).
- caused because there are no paint messages pending. Presumed
harmless.
In file ../../src/msw/dc.cpp at line 1838: 'BitBlt' failed with error 0x00000000 (Success).
- caused because the window isn't mapped, and MwPrepareDC in wingdi.c
fails (hwnd->unmapcount is non-zero). Presumed harmless.
Recursive paint problem, e.g. when clicking the 'Press Me!'
button in the widgets sample a few times, until the text control
is full.
- possibly the scrollbar is causing the text control to be
updated, which somehow effects the scrollbar, which causes
a window update, etc.
Sluggish updates.
- probably because many image to bitmap conversions are being
done on update, and bitmaps should probably be cached.
Things missing from MicroWindows that need to be worked around
==============================================================
wxImage/inline XPM/::CreateBitmap support
-----------------------------------------
This is the main obstacle to getting a good range
of widgets working, since wxUniversal uses inline XPMs
to implement most of the widgets.
See src/engine/devimage.c for routines for loading JPEGs,
XPMs etc. Unfortunately the XPM routines are also #ifdefed
for FILE_IO, even though for inline XPMs we don't need file I/O.
(Embedded systems tend not to have file I/O, anyway.)
Now, wxWidgets has its own XPM decoder, src/common/xpmdecod.cpp,
so in theory we don't need to use MicroWindows' code there.
wxImage can load an inline XPM, _but_ we need to convert to
a wxBitmap since this is what the widgets need.
There is no ::CreateBitmap or BITMAPINFO. (BMPs can be converted
to C using convbmp, then need to use Gr... functions.)
So how can we convert from wxImage to wxBitmap in MicroWindows?
Well, a simple-minded way would be to use CreateCompatibleBitmap
which returns an HBITMAP, select it into an HDC, and draw
the pixels from the wxImage to the HDC one by one with SetPixel.
This is now implemented, but there are problems with masks.
(a) masks have to be created at screen depth because BitBlt/GrDraw
can't cope with differing depths, and (b) masked blitting
is still not working (try enabling mask creation in
wxBitmap::CreateFromImage by setting USE_MASKS to 1).
Other missing features
----------------------
No ::GetKeyState (see include/wx/msw/private.h). Should probably use
GdOpenKeyboard/GdCloseKeyboard/GdReadKeyboard. Could perhaps emulate
GetKeyState this way.
No ::DestroyIcon, ::DestroyCursor - use ::DestroyObject instead?
Also no LoadCursor, LoadImage. So how do we make cursors? No ::SetCursor.
wxDC: no ::GetTextColor, ::GetBkColor, ::IntersectClipRect,
::GetClipBox
No ::SetMenu, so no menus or menubars (now implemented by
wxUniversal).
No ::GetObject so we can't get LOGFONT from an HFONT
in wxSystemSettings (worked around by passing HFONT to
the wxFont constructor).
Applying patches by hand
========================
The full altered functions are given below in case you have
to apply them by hand.
src/mwin/winevent.c
-------------------
A second test has been added to this line:
if(hittest == HTCLIENT || hwnd == GetCapture()) {
in MwTranslateMouseMessage below. This corrects a mouse message
bug.
/*
* Translate and deliver hardware mouse message to proper window.
*/
void
MwTranslateMouseMessage(HWND hwnd,UINT msg,int hittest)
{
POINT pt;
DWORD tick;
static UINT lastmsg = 0;
static HWND lasthwnd;
static DWORD lasttick;
static int lastx, lasty;
/* determine double click eligibility*/
if(msg == WM_LBUTTONDOWN || msg == WM_RBUTTONDOWN) {
tick = GetTickCount();
if((hwnd->pClass->style & CS_DBLCLKS) &&
msg == lastmsg && hwnd == lasthwnd &&
tick - lasttick < DBLCLICKSPEED &&
abs(cursorx-lastx) < mwSYSMETRICS_CXDOUBLECLK &&
abs(cursory-lasty) < mwSYSMETRICS_CYDOUBLECLK)
msg += (WM_LBUTTONDBLCLK - WM_LBUTTONDOWN);
lastmsg = msg;
lasthwnd = hwnd;
lasttick = tick;
lastx = cursorx;
lasty = cursory;
}
/*
* We always send nc mouse message
* unlike Windows, for HTCLIENT default processing
*/
PostMessage(hwnd, msg + (WM_NCMOUSEMOVE-WM_MOUSEMOVE), hittest,
MAKELONG(cursorx, cursory));
没有合适的资源?快使用搜索试试~ 我知道了~
wxWidgets-2.8.8.tar.gz_wxWidgets_wxWidgets 2.8.
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 9 浏览量
2022-07-14
07:01:44
上传
评论
收藏 19.27MB GZ 举报
温馨提示
共2000个文件
h:1936个
cpp:1565个
tex:588个
wxWidgets GUI框桇,类似于MFC,它是一个开源的程序
资源详情
资源评论
资源推荐
收起资源包目录
wxWidgets-2.8.8.tar.gz_wxWidgets_wxWidgets 2.8. (2000个子文件)
pnggccrd.c 234KB
xmlparse.c 169KB
pngvcrd.c 143KB
pngrtran.c 139KB
xmcombo.c 133KB
tif_ojpeg.c 108KB
MoreFilesExtras.c 100KB
MoreFilesExtras.c 100KB
pngrutil.c 89KB
pngwutil.c 82KB
tif_fax3sm.c 78KB
fax3sm_winnt.c 78KB
MoreFilesX.c 76KB
tif_getimage.c 67KB
deflate.c 63KB
tclUniData.c 59KB
regcomp.c 58KB
tif_jpeg.c 48KB
inflate.c 48KB
jquant2.c 47KB
pngwrite.c 47KB
pngtest.c 46KB
pngread.c 45KB
pngpread.c 45KB
regc_locale.c 44KB
xmltok_impl.c 43KB
trees.c 43KB
tif_dir.c 43KB
tif_dirread.c 42KB
runtests.c 42KB
gsocket.c 42KB
tif_fax3.c 41KB
jdmarker.c 40KB
xmltok.c 40KB
jmemmgr.c 40KB
tif_luv.c 40KB
pngset.c 38KB
Search.c 37KB
Search.c 37KB
doslex.c 36KB
tif_pixarlog.c 36KB
regc_nfa.c 36KB
tif_dirwrite.c 34KB
win_gtk.c 33KB
MoreDesktopMgr.c 33KB
MoreDesktopMgr.c 33KB
xmlrole.c 32KB
jquant1.c 31KB
gzio.c 30KB
cwlex_yy.c 29KB
example.c 29KB
regexec.c 28KB
jchuff.c 28KB
FSpCompat.c 26KB
FSpCompat.c 26KB
pngget.c 25KB
jdcoefct.c 25KB
connect.c 25KB
jcphuff.c 25KB
regc_lex.c 24KB
png.c 23KB
ansi2knr.c 22KB
DirectoryCopy.c 22KB
DirectoryCopy.c 22KB
ansi2knr.c 22KB
infback.c 22KB
tif_write.c 21KB
win_gtk.c 21KB
jcparam.c 21KB
jdhuff.c 20KB
jdmainct.c 20KB
jdphuff.c 20KB
tif_lzw.c 20KB
xmlwf.c 20KB
pngtrans.c 20KB
tif_print.c 19KB
jcmaster.c 19KB
jdmaster.c 19KB
catalog.c 19KB
FileCopy.c 19KB
FileCopy.c 19KB
jmemdos.c 19KB
jcsample.c 18KB
assertdlg_gtk.c 18KB
tif_dirinfo.c 18KB
tif_read.c 18KB
rege_dfa.c 18KB
regc_color.c 17KB
eggtrayicon.c 17KB
jcmarker.c 17KB
MoreFiles.c 17KB
MoreFiles.c 17KB
pngwtran.c 17KB
pngmem.c 16KB
jccoefct.c 16KB
example.c 16KB
jdsample.c 16KB
hdbc.c 16KB
jpegtran.c 16KB
dosyacc.c 15KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
JaniceLu
- 粉丝: 78
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- yolo目标检测项目实验
- downloadFile-1.hc
- Centos7.9环境下离线安装开源版Nginx(亲测版)
- C++课程设计:基于Qt的航班信息管理系统
- ADS7822UVerilog驱动,前面传的有点问题
- 基于python的高性能爬虫程序,使用了多线程+缓存+xpath实现的,这里以彼-岸图库为例,实现,仅用于学习交流
- 中分辨率成像光谱仪(MODIS)烧毁面积产品信息MODIS-C6-BA-User-Guide-1.2.pdf
- Screenshot_20240427_172613_com.huawei.browser.jpg
- 关于学习Python的相关资源网站链接及相关介绍.docx
- (HAL库)基于STM32F103C8T6的温控PID系统[Dht11、ESP8266、无线透传、L298N……]
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0