Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->系统管理 ->正文

GDK Reference Manual

来源:Linux-cn.com 作者:Webmaster 时间:2007-05-05 点击: [收藏] [投稿]

typedef enum/*< flags >*/
{
GDK_IM_PREEDIT_AREA = 0x0001, 
GDK_IM_PREEDIT_CALLBACKS = 0x0002, 
GDK_IM_PREEDIT_POSITION= 0x0004,
GDK_IM_PREEDIT_NOTHING = 0x0008,
GDK_IM_PREEDIT_NONE = 0x0010,
GDK_IM_PREEDIT_MASK= 0x001f,
GDK_IM_STATUS_AREA = 0x0100, 
GDK_IM_STATUS_CALLBACKS= 0x0200,
GDK_IM_STATUS_NOTHING = 0x0400,
GDK_IM_STATUS_NONE = 0x0800,
GDK_IM_STATUS_MASK = 0x0f00 
} GdkIMStyle; 

  A set of bit-flags used to specify the input method styles which are supported or which are currently in use. The flags can be divided into 2 groups, the pre-edit flags and the status flags.

  The pre-edit flags specify how pre-editing data is displayed. For example, this could display the text being typed in the phonetic alphabet before it is composed and inserted as an ideograph.

  The status flags specify how status information is displayed. The status information can be thought of as an extension of the standard keyboard mode indicators, such as the Caps Lock indicator.

  Note: The GDK_IM_PREEDIT_CALLBACKS and GDK_IM_STATUS_CALLBACKS styles are not currently supported in GTK+.

  GDK_IM_PREEDIT_AREA The application provides the input method with an area in which to perform off-the-spot pre-editing.

  GDK_IM_PREEDIT_CALLBACKS The application registers a number of callback functions which are used to display pre-editing data.

  GDK_IM_PREEDIT_POSITION The application provides the input method with the position of the insertion cursor, for over-the-spot pre-editing. The input method creates its own window over the widget to display the pre-editing data.

  GDK_IM_PREEDIT_NOTHING The input method uses the root X window to perform pre-editing, so the application does not need to do anything.

  GDK_IM_PREEDIT_NONE No pre-editing is done by the input method, or no pre-editing data needs to be displayed.

  GDK_IM_PREEDIT_MASK A bit-mask containing all the pre-edit flags.

  GDK_IM_STATUS_AREA The application provides the input method with an area in which to display status information.

  GDK_IM_STATUS_CALLBACKS The applications registers a number of callback functions which are used to display status information.

  GDK_IM_STATUS_NOTHING The input method uses the root X window to display status information, so the application does not need to do anything.

  GDK_IM_STATUS_NONE The input method does not display status information.

  GDK_IM_STATUS_MASK A bit-mask containing all the status flags.


gdk_im_ready ()
gintgdk_im_ready(void); 

  Checks if an input method is to be used for the current locale. If GTK+ has been compiled without support for input methods, or the current locale doesn't need an input method, then this will return FALSE.

  Returns : TRUE if an input method is available and should be used.


gdk_im_decide_style ()
GdkIMStylegdk_im_decide_style (GdkIMStyle supported_style); 

  Decides which input method style should be used, by comparing the styles given in supported_style with those of the available input method.

  supported_style : styles which are supported by the widget.

  Returns : the best style in supported_style that is also supported by the available input method.


gdk_im_set_best_style ()
GdkIMStylegdk_im_set_best_style (GdkIMStyle best_allowed_style); 

  Sets the best pre-edit and/or status style which should be used. This will affect the style chosen in gdk_im_decide_style().

  The order of the pre-edit styles is (from worst to best): GDK_IM_PREEDIT_NONE, GDK_IM_PREEDIT_NOTHING, GDK_IM_PREEDIT_AREA, GDK_IM_PREEDIT_POSITION, GDK_IM_PREEDIT_CALLBACKS. The order of the status styles is: GDK_IM_STATUS_NONE, GDK_IM_STATUS_NOTHING, GDK_IM_STATUS_AREA, GDK_IM_STATUS_CALLBACKS.

  So, for example, to set the best allowed pre-edit style to GDK_IM_PREEDIT_AREA you would do this:


gdk_im_set_best_style (GDK_IM_PREEDIT_AREA); 

  Or to set the best allowed pre-edit style to GDK_IM_PREEDIT_POSITION and the best allowed status style to GDK_IM_STATUS_NOTHING you can do this:


gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NOTHING); 

  best_allowed_style : a bit-mask with the best pre-edit style and/or the best status style to use. If 0 is used, then the current bit-mask of all allowed styles is returned.

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<

上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 5556 57 58 下一页


上一篇:GTK v1.2 Tutorial(英文)   下一篇:Java入门(12) 事件与错误处理

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
·Motorola微处理器bootloader分析与应用
·Fedora Core5 NFS服务器搭建过程介绍
·Linux系统:让内存不再泄漏的实用技巧
·新手看招 手把手教你安装VMware虚拟机
·“侵权事件” 红帽称微软企图干扰用户
·删除Linux后 如何找回Windows启动菜单
·菜鸟乐园 Linux中常见文件系统格式介绍
·Linux操作系统下IPTables配置方法详解
·实用技巧 Linux系统的经典使用技巧八则
·Linux系统文件优化及磁盘检查方法介绍
推荐文章
·什么时候应该使用Web Service
·如何监视某个tty?
·出错也不怕—Linux系统紧急情况处理
·Linux 指令篇:档案目录管理--ls
·开放源代码时代即将到来
·用PHP+MySQL构建一个招聘网站(10)
·理解和使用Oracle 8i分析工具-LogM
·JSP的环境引擎--websphere
精彩文章
·xfs文件系统(原创)
·Linux 指令篇:工作行程资讯与管理--
·用户界面原型开发:技巧和技术
·PHP的XML分析函数(一)
·编写Linux实用程序的艺术
·基于heartbeat的NFS HA实现
·如何阅读源代码
·一个网上理财站点的设计(二)
·Linux 指令篇:起始管理--reboot
·LInux 应用程序如何处理当前运行环
·mount使用指南
·用php生成excel文件
·Linux 常用命令(磁盘管理)
·架设 DHCP Server
·简易防火墙建置与流量统计
·J2EE概述
·[术语]GPL通用公共许可证
·内核空间SMP编程
·认识X-Window窗口管理器
·Linux内核网络参数的意义及应用
·Linux下硬盘分区的最佳方案
·JavaBean使用技巧
·基于DNS的多机均衡负载的实现
·python入门1
·Linux 网管 123 --- 第10章. 升级 L
·Oracle安装(linux)小结
Power by linux-cn.com 粤ICP备05006655号