/******************************************************************
Copyright 1990, 1991, 1992,1993, 1994 by FUJITSU LIMITED
Copyright 1994 by Sony Corporation
Permission to use, copy, modify, distribute, and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation, and that the name of FUJITSU LIMITED
and Sony Corporation not be used in advertising or publicity
pertaining to distribution of the software without specific,
written prior permission. FUJITSU LIMITED and Sony Corporation make
no representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
FUJITSU LIMITED AND SONY CORPORATION DISCLAIM ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJITSU LIMITED AND
SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
Author: Takashi Fujiwara FUJITSU LIMITED
fujiwara@a80.tech.yk.fujitsu.co.jp
Modifier: Makoto Wakamatsu Sony Corporation
makoto@sm.sony.co.jp
******************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <X11/Xlib.h>
#include "Xlibint.h"
#include "Xlcint.h"
#include "Ximint.h"
#include "Xresource.h"
#define GET_NAME(x) name_table + x.name_offset
typedef struct _XimValueOffsetInfo {
unsigned short name_offset;
XrmQuark quark;
unsigned int offset;
Bool (*defaults)(
struct _XimValueOffsetInfo *, XPointer, XPointer, unsigned long
);
Bool (*encode)(
struct _XimValueOffsetInfo *, XPointer, XPointer
);
Bool (*decode)(
struct _XimValueOffsetInfo *, XPointer, XPointer
);
} XimValueOffsetInfoRec, *XimValueOffsetInfo;
#ifdef XIM_CONNECTABLE
static Bool
_XimCheckBool(str)
char *str;
{
if(!strcmp(str, "True") || !strcmp(str, "true") ||
!strcmp(str, "Yes") || !strcmp(str, "yes") ||
!strcmp(str, "ON") || !strcmp(str, "on"))
return True;
return False;
}
void
_XimSetProtoResource(im)
Xim im;
{
char res_name_buf[256];
char* res_name;
size_t res_name_len;
char res_class_buf[256];
char* res_class;
size_t res_class_len;
char* str_type;
XrmValue value;
XIMStyle preedit_style = 0;
XIMStyle status_style = 0;
XIMStyles* imstyles;
char* dotximdot = ".xim.";
char* ximdot = "xim.";
char* dotXimdot = ".Xim.";
char* Ximdot = "Xim.";
if (!im->core.rdb)
return;
res_name_len = strlen (im->core.res_name);
if (res_name_len < 200) {
res_name = res_name_buf;
res_name_len = sizeof(res_name_buf);
}
else {
res_name_len += 50;
res_name = Xmalloc (res_name_len);
}
res_class_len = strlen (im->core.res_class);
if (res_class_len < 200) {
res_class = res_class_buf;
res_class_len = sizeof(res_class_buf);
}
else {
res_class_len += 50;
res_class = Xmalloc (res_class_len);
}
/* pretend malloc always works */
(void) snprintf (res_name, res_name_len, "%s%s%s",
im->core.res_name != NULL ? im->core.res_name : "*",
im->core.res_name != NULL ? dotximdot : ximdot,
"useAuth");
(void) snprintf (res_class, res_class_len, "%s%s%s",
im->core.res_class != NULL ? im->core.res_class : "*",
im->core.res_class != NULL ? dotXimdot : Ximdot,
"UseAuth");
bzero(&value, sizeof(XrmValue));
if(XrmGetResource(im->core.rdb, res_name, res_class, &str_type, &value)) {
if(_XimCheckBool(value.addr)) {
MARK_USE_AUTHORIZATION_FUNC(im);
}
}
(void) snprintf (res_name, res_name_len, "%s%s%s",
im->core.res_name != NULL ? im->core.res_name : "*",
im->core.res_name != NULL ? dotximdot : ximdot,
"delaybinding");
(void) snprintf (res_class, res_class_len, "%s%s%s",
im->core.res_class != NULL ? im->core.res_class : "*",
im->core.res_class != NULL ? dotXimdot : Ximdot,
"Delaybinding");
bzero(&value, sizeof(XrmValue));
if(XrmGetResource(im->core.rdb, res_name, res_class, &str_type, &value)) {
if(_XimCheckBool(value.addr)) {
MARK_DELAYBINDABLE(im);
}
}
(void) snprintf (res_name, res_name_len, "%s%s%s",
im->core.res_name != NULL ? im->core.res_name : "*",
im->core.res_name != NULL ? dotximdot : ximdot,
"reconnect");
(void) snprintf (res_class, res_class_len, "%s%s%s",
im->core.res_class != NULL ? im->core.res_class : "*",
im->core.res_class != NULL ? dotXimdot : Ximdot,
"Reconnect");
bzero(&value, sizeof(XrmValue));
if(XrmGetResource(im->core.rdb, res_name, res_class, &str_type, &value)) {
if(_XimCheckBool(value.addr)) {
MARK_RECONNECTABLE(im);
}
}
if(!IS_CONNECTABLE(im)) {
if (res_name != res_name_buf) Xfree (res_name);
if (res_class != res_class_buf) Xfree (res_class);
return;
}
(void) snprintf (res_name, res_name_len, "%s%s%s",
im->core.res_name != NULL ? im->core.res_name : "*",
im->core.res_name != NULL ? dotximdot : ximdot,
"preeditDefaultStyle");
(void) snprintf (res_class, res_class_len, "%s%s%s",
im->core.res_class != NULL ? im->core.res_class : "*",
im->core.res_class != NULL ? dotXimdot : Ximdot,
"PreeditDefaultStyle");
if(XrmGetResource(im->core.rdb, res_name, res_class, &str_type, &value)) {
if(!strcmp(value.addr, "XIMPreeditArea"))
preedit_style = XIMPreeditArea;
else if(!strcmp(value.addr, "XIMPreeditCallbacks"))
preedit_style = XIMPreeditCallbacks;
else if(!strcmp(value.addr, "XIMPreeditPosition"))
preedit_style = XIMPreeditPosition;
else if(!strcmp(value.addr, "XIMPreeditNothing"))
preedit_style = XIMPreeditNothing;
else if(!strcmp(value.addr, "XIMPreeditNone"))
preedit_style = XIMPreeditNone;
}
if(!preedit_style)
preedit_style = XIMPreeditNothing;
(void) snprintf (res_name, res_name_len, "%s%s%s",
im->core.res_name != NULL ? im->core.res_name : "*",
im->core.res_name != NULL ? dotximdot : ximdot,
"statusDefaultStyle");
(void) snprintf (res_class, res_class_len, "%s%s%s",
im->core.res_class != NULL ? im->core.res_class : "*",
im->core.res_class != NULL ? dotXimdot : Ximdot,
"StatusDefaultStyle");
if(XrmGetResource(im->core.rdb, res_name, res_class, &str_type, &value)) {
if(!strcmp(value.addr, "XIMStatusArea"))
status_style = XIMStatusArea;
else if(!strcmp(value.addr, "XIMStatusCallbacks"))
status_style = XIMStatusCallbacks;
else if(!strcmp(value.addr, "XIMStatusNothing"))
status_style = XIMStatusNothing;
else if(!strcmp(value.addr, "XIMStatusNone"))
status_style = XIMStatusNone;
}
if(!status_style)
status_style = XIMStatusNothing;
if(!(imstyles = Xmalloc(sizeof(XIMStyles) + sizeof(XIMStyle)))){
if (res_name != res_name_buf) Xfree (res_name);
if (res_class != res_class_buf) Xfree (res_class);
return;
}
imstyles->count_styles = 1;
imstyles->supported_styles =
(XIMStyle *)((char *)imstyles + sizeof(XIMStyles));
imstyles->supported_styles[0] = preedit_style | status_style;
im->private.proto.default_styles = imstyles;
if (res_name != res_name_buf) Xfree (res_name);
if (res_class != res_class_buf) Xfree (res_class);
}
#endif /* XIM_CONNECTABLE */
static const char name_table[] =
/* 0 */ XNQueryInputStyle"\0"
/* 16 */ XNClientWindow"\0"
/* 29 */ XNInputStyle"\0"
/* 40 */ XNFocusWindow"\0"
/* 52 */ XNResourceName"\0"
/* 65 */ XNResourceClass"\0"
/* 79 */ XNGeometryCallback"\0"
/* 96 */ XNDestroyCallback"\0"
/* 112 */ XNFilterEvents"\0"
/* 125 */ XNPreeditStartCallback"\0"
/* 146 */ XNPreed
没有合适的资源?快使用搜索试试~ 我知道了~
libX11生成libX11-xcb.so.1
共1676个文件
man:818个
c:419个
pre:123个
1星 需积分: 50 147 下载量 176 浏览量
2018-11-13
16:05:22
上传
评论
收藏 3.82MB RAR 举报
温馨提示
解决部分Linux操作系统在安装Qt时候,缺少libX11-xcb.so.1文件的问题! 详细步骤可以查看CSDN IT1995博客
资源推荐
资源详情
资源评论
收起资源包目录
libX11生成libX11-xcb.so.1 (1676个子文件)
configure.ac 16KB
Makefile.am 34KB
Makefile.am 11KB
Makefile.am 9KB
docbook-nl.am 4KB
docbook.am 3KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 2KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1013B
Makefile.am 933B
Makefile.am 796B
Makefile.am 682B
Makefile.am 648B
Makefile.am 635B
Makefile.am 634B
Makefile.am 620B
Makefile.am 620B
Makefile.am 530B
Makefile.am 490B
Makefile.am 488B
Makefile.am 388B
Makefile.am 322B
Makefile.am 316B
Makefile.am 314B
Makefile.am 29B
Makefile.am 17B
Makefile.am 16B
Makefile.am 14B
AUTHORS 1KB
imRm.c 78KB
lcGenConv.c 70KB
Xrm.c 68KB
lcUTF8.c 56KB
omGeneric.c 54KB
XlibInt.c 53KB
imDefIm.c 48KB
LRGB.c 47KB
imThaiFlt.c 44KB
Region.c 41KB
imDefIc.c 41KB
lcCT.c 40KB
lcSjis.c 37KB
lcEuc.c 35KB
XKBMisc.c 35KB
XKBMAlloc.c 35KB
KeyBind.c 35KB
imRmAttr.c 34KB
PutImage.c 30KB
cjk_tab_to_h.c 30KB
XKBUse.c 30KB
imEvToWire.c 30KB
lcGeneric.c 30KB
XDefaultOMIF.c 29KB
XKBGAlloc.c 29KB
ImUtil.c 29KB
lcDB.c 28KB
XKBNames.c 27KB
XKBGetMap.c 27KB
XKBBind.c 27KB
imDefLkup.c 27KB
XKBExtDev.c 26KB
CvCols.c 26KB
cmsColNm.c 24KB
XKB.c 23KB
XKBGeom.c 23KB
xcb_io.c 22KB
imKStoUCS.c 21KB
Font.c 21KB
imLcIm.c 20KB
imCallbk.c 20KB
lcJis.c 19KB
OpenDis.c 19KB
XKBSetMap.c 19KB
PolyReg.c 18KB
imLcPrs.c 17KB
lcFile.c 17KB
8bit_tab_to_h.c 16KB
lcDefConv.c 16KB
locking.c 16KB
HVC.c 16KB
imTrX.c 15KB
XlcDL.c 15KB
cmsTrig.c 15KB
XKBSetGeom.c 15KB
XKBAlloc.c 15KB
imExten.c 14KB
os2Stubs.c 14KB
EvToWire.c 14KB
lcWrap.c 13KB
cmsCmap.c 12KB
XDefaultIMIF.c 12KB
XKBCtrls.c 12KB
InitExt.c 11KB
imLcLkup.c 11KB
XKBleds.c 11KB
Lab.c 11KB
共 1676 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
- juxijue40142020-07-06垃圾 别信 不管用
IT1995
- 粉丝: 1w+
- 资源: 57
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功