comparison Xwnmo/xwnmo/spotlib.c @ 0:bbc77ca4def5

initial import
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Thu, 13 Dec 2007 04:30:14 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bbc77ca4def5
1 /*
2 * $Id: spotlib.c,v 1.2 2001/06/14 18:16:17 ura Exp $
3 */
4
5 /*
6 * FreeWnn is a network-extensible Kana-to-Kanji conversion system.
7 * This file is part of FreeWnn.
8 *
9 * Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
10 * Copyright 1991 by Massachusetts Institute of Technology
11 *
12 * Author: OMRON SOFTWARE Co., Ltd. <freewnn@rd.kyoto.omronsoft.co.jp>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
17 * any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with GNU Emacs; see the file COPYING. If not, write to the
26 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 *
28 * Commentary:
29 *
30 * Change log:
31 *
32 * Last modified date: 8,Feb.1999
33 *
34 * Code:
35 *
36 */
37
38 #include <X11/Xlib.h>
39 #include "Xi18nint.h"
40 #include "XIMlibint.h"
41 #include "SpotProto.h"
42
43 void
44 _XipChangeSpot (ic, x, y)
45 XIC ic;
46 short x, y;
47 {
48 XipIM im = ipIMofIC ((XipIC) ic);
49 ximChangeSpotReq req;
50 ximEventReply reply;
51
52 if (im->fd < 0)
53 {
54 return;
55 }
56 req.reqType = XIM_ChangeSpot;
57 req.length = sz_ximChangeSpotReq;
58 req.xic = ((XipIC) ic)->icid;
59 req.spot_x = x;
60 req.spot_y = y;
61 if ((_XipWriteToIM (im, (char *) &req, sz_ximChangeSpotReq) >= 0) && (_XipFlushToIM (im) >= 0))
62 {
63 reply.state = 0;
64 _XipReadFromIM (im, (char *) &reply, sz_ximEventReply);
65 }
66 return;
67 }