mctrl : windows UI 控件库

//z 2014-10-10 11:12:28 L.82 '46052 BG57IV3@XCL T2758184198.K.F2002641828[T2,L74,R1,V25]
        一个捷克程序员(Martin Mitáš)用C语言实现的一套windows ui library。
目前提供了这些控件:

  • mCtrl/button.h - Enhanced button control
  • mCtrl/chart.h - Chart control
  • mCtrl/expand.h - Expand/collapse control
  • mCtrl/grid.h - Grid control
  • mCtrl/html.h - HTML control
  • mCtrl/imgview.h - Image view control
  • mCtrl/menubar.h - Menu bar control
  • mCtrl/mditab.h - MDI tab control
  • mCtrl/treelist.h - Tree-list view control


                      ====================================
                              mCtrl Project Readme
                         <http://mctrl.sourcefoget.net>
                      ====================================

//z 2014-10-10 11:12:28 L.82 '46052 BG57IV3@XCL T2758184198.K.F2002641828[T2,L74,R1,V25]
What is mCtrl
=============
mCtrl 是一个 C library,为MS WINDOWS 提供了一些UI控件。
mCtrl is C library providing set of additional user interface controls for
MS Windows, intended to be complementary to standard Win32API controls from
USER32.DLL and COMCTL32.DLL.

库的API类似于win32api。
API of the library is designed to be similar to the Win32API. I.e. after window
class of particular control is registered with corresponding initialization
function, the control can be normally created with the Win32API's CreateWindow()
or CreateWindowEx() functions and controlled with SendMessage().


License
=======

mCtrl itself is covered with the GNU Lesser General Public License 2.1 or
(at your option) any later version. See file COPYING.lib for more info.

In brief, this generally means that:

   * Any program or library, even commercial, covered with any proprietary
     license, is allowed to link against the mCtrl's import libraries and
     distribute MCTRL.DLL along with the program.

   * You can modify MCTRL.DLL (or its source code) and distribute such modified
     MCTRL.DLL only if the modifications are also licensed under the terms of
     the LGPL 2.1 (or any later version); or under the terms of GPL 2 (or any
     later version).

Source code of all examples, i.e. contents of the directory 'examples' within
the source package (see below), are in public domain.


Getting mCtrl
=============

You can always get the latest version and most actual information on project
webpages:

    * http://mctrl.sourceforge.net
    * http://sourceforge.net/projects/mctrl

There are usually two packages for each release version available:

    * mCtrl-x.y.z-bin.zip ... pre-built binary package
    * mCtrl-x.y.z-src.zip ... source package

The pre-built package contains 32-bit as well as 64-bit binaries of MCTRL.DLL
and examples, and also documentation for application developers. The source
package is direct export of source tree from version control system repository.

The current code (possibly untested and unstable) can also be cloned from git
repository hoested on github:

    * http://github.com/mity/mctrl


Using mCtrl
===========

If you have the pre-built package, using mCtrl is as easy as using any other
DLL.

Header files are located in 'include\mCtrl' directory. You should instruct
your C/C++ compiler to search for header files in the 'include' directory and
use the 'mCtrl' in your preprocessor #include directives, e.g.:

    #include <mCtrl/version.h>

Import libraries are located under the 'lib' (32-bit libs) and 'lib64' (64-bit)
subdirectory:

    * libmCtrl.a for gcc-based toolchains (e.g. mingw, mingw-w64)
    * mCtrl.lib for MSVC

And finally deploy your application with the MCTRL.DLL which is located
in the 'bin' (32-bit binaries) and 'bin64' (64-bit) subdirectories in
the prebuilt package.

Documentation for application developers is bundled within the pre-built
package, or you can also find the documentation online:

    http://mctrl.sourceforge.net/doc.php


Building mCtrl from Sources
===========================

Disclaimer: If you want to just use MCTRL.DLL you should probably stick with
the pre-built package.

Primary development platform for mCtrl project is mingw-w64 (I use the builds
made by mingw-builds projects) and MSYS. Assuming you have setup the environment,
and have the mCtrl sources then the build should be as easy as running 'make'
from the root directory:

    $ make

Or, especially in case your mingw-w64 is built as a cross-compiler, you may
find useful a script wrapping the Makefile. The following command shows its
options:

    $ scripts/build.sh --help

MS Visual Studio solution (usable with the free Express edition) can also be
found under the contrib subdirectory. However note this may be slightly out
of date and (especially if you get development sources) you may need to update
it to reflect latest changes to the Makefile, especially ensure the solution
includes all mCtrl sources.


Reporting Bugs
==============

If you encounter any bug, please be so kind and report it. Unheard bugs cannot
get fixed. You can submit bug reports here:

    * http://github.com/mity/mctrl/issues
//z 2014-10-10 11:12:28 L.82 '46052 BG57IV3@XCL T2758184198.K.F2002641828[T2,L74,R1,V25]

转载于:https://www.cnblogs.com/IS2120/p/6745628.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
`uart_set_mctrl()`是一个函数,用于设置UART(通用异步收发器)的控制信号。UART是一种串行通信协议,它使用单个数据线来传输数据。控制信号用于控制UART的操作,如启用/禁用UART,设置数据位数和校验位等。 该函数的语法如下: ```c void uart_set_mctrl(struct uart_port *port, unsigned int mctrl); ``` 其中,`port`是一个指向`uart_port`结构的指针,它包含了UART的配置信息,如波特率、数据位数、停止位数等。`mctrl`是一个无符号整数,用于设置UART的控制信号,如下表所示: | 位 | 名称 | 描述 | | --- | ------- | ---------------------------------------------------------------------------------------------- | | 0 | TIOCM_DTR | 数据终端就绪(DTR)控制线。 | | 1 | TIOCM_RTS | 请求发送(RTS)控制线。 | | 2 | TIOCM_CTS | 清除发送(CTS)控制线。 | | 3 | TIOCM_CAR | 检测到载波(DCD)控制线。 | | 4 | TIOCM_RNG | 检测到振铃(RI)控制线。 | | 5 | TIOCM_DSR | 数据集准备好(DSR)控制线。 | | 6 | TIOCM_CD | 与TIOCM_CAR相同。 | | 7 | TIOCM_RI | 与TIOCM_RNG相同。 | | 8 | TIOCM_OUT1| 用户定义的输出1(OUT1)控制线。可以使用`setserial`命令将其与某个串口事件关联。 | | 9 | TIOCM_OUT2| 用户定义的输出2(OUT2)控制线。可以使用`setserial`命令将其与某个串口事件关联。 | 例如,要设置DTR和RTS控制线,可以调用以下函数: ```c uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS); ``` 这将使DTR和RTS控制线处于高电平状态,启用UART发送数据。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值