diff lib/Xrubylib/callbacks.txt @ 16:598fcbe482b5

imported patch 19_kinput2-v3.1-ruby.patch
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 08 Mar 2010 20:38:17 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/Xrubylib/callbacks.txt	Mon Mar 08 20:38:17 2010 +0900
@@ -0,0 +1,134 @@
+:342:
+    /* $B%F%-%9%H$NJQ2=$r%A%'%C%/$9$k(B */
+    if (obj->ruby.textchanged) {
+	XtCallCallbackList(w, obj->inputConv.textchangecallback,
+			   (XtPointer)NULL);
+	obj->ruby.textchanged = False;
+    }
+
+:351:
+    /* $BF~NO%b!<%I$r%A%'%C%/$9$k(B */
+    if (ks->info & KanjiModeInfo) {
+      XtCallCallbackList(w, obj->inputConv.modechangecallback,
+			 (XtPointer)NULL);
+    }
+
+:357:
+    if (ks->info & KanjiGLineInfo) { /* $B0lMw9T$,$"$k>l9g(B */
+      ICAuxControlArg arg;
+
+      switch (obj->ruby.ibuf->candstat) {
+      case RUBY_GLINE_Start:
+	arg.command = ICAuxStart;
+	XtCallCallbackList((Widget)obj, obj->inputConv.auxcallback,
+			   (XtPointer)&arg);
+	break;
+      case RUBY_GLINE_End:
+	arg.command = ICAuxEnd;
+	XtCallCallbackList((Widget)obj, obj->inputConv.auxcallback,
+			   (XtPointer)&arg);
+	break;
+      case RUBY_GLINE_Change:
+	arg.command = ICAuxChange;
+	XtCallCallbackList((Widget)obj, obj->inputConv.auxcallback,
+			   (XtPointer)&arg);
+	break;
+      }
+    }
+
+:831:
+    /* $B3NDj$N=hM}(B */
+    XtCallCallbackList((Widget)obj, obj->inputConv.fixcallback,
+		       (XtPointer)NULL);	/* $B!)!)!)(B */
+
+:837:
+static void
+convend(obj)
+RubyObject obj;
+{
+    XtCallCallbackList((Widget)obj, obj->inputConv.endcallback,
+		       (XtPointer)NULL);
+}
+
+:1442:
+static void
+moveSelection(obj, dir)
+RubyObject obj;
+int dir;
+{
+    ICSelectionControlArg arg;
+
+    arg.command = ICSelectionMove;
+    arg.u.dir = dir;
+    XtCallCallbackList((Widget)obj, obj->inputConv.selectioncallback,
+		       (XtPointer)&arg);
+}
+
+:1466:
+static void
+endSelection(obj, abort)
+RubyObject obj;
+int abort;
+{
+    ICSelectionControlArg arg;
+    int selected;
+
+    if (ignoreListfunc) return; /* SelectItem $B$G=hM}$5$l$k$N$G$3$3$OITMW(B */
+    arg.command = ICSelectionEnd;
+    arg.u.current_item = -1;
+    XtCallCallbackList((Widget)obj, obj->inputConv.selectioncallback,
+		       (XtPointer)&arg);
+
+    if (!abort && (selected = arg.u.current_item) >= 0) {
+        insertSelection(obj, selected);
+    }
+}
+
+:1486:
+static void
+querySelection(obj)
+RubyObject obj;
+{
+  ICSelectionControlArg arg;
+  int selected;
+
+  if (ignoreListfunc) return; /* SelectItem $B$G=hM}$5$l$k$N$G$3$3$OITMW(B */
+  arg.command = ICSelectionGet;
+  arg.u.current_item = -1;
+  XtCallCallbackList((Widget)obj, obj->inputConv.selectioncallback,
+		     (XtPointer)&arg);
+
+  if ((selected = arg.u.current_item) >= 0) {
+    insertSelection(obj, selected);
+  }
+}
+
+:1505:
+static void
+openSelection(obj, func, curitem)
+RubyObject obj;
+int func; /* $B0lHV>e$r8+$h(B */
+int curitem;
+{
+  ICSelectionControlArg arg;
+  static int current = 0;
+  static int doit = 0;
+
+  if (func == SELECTION_SET) {
+    current = curitem;
+    doit = 1;
+  }
+  else if (func == SELECTION_DO && doit) {
+    doit = 0;
+    arg.command = ICSelectionStart;
+    arg.u.selection_kind = ICSelectionCandidates;
+    XtCallCallbackList((Widget)obj, obj->inputConv.selectioncallback,
+		       (XtPointer)&arg);
+
+    /* set current item */
+    arg.command = ICSelectionSet;
+    arg.u.current_item = current;
+    XtCallCallbackList((Widget)obj, obj->inputConv.selectioncallback,
+		       (XtPointer)&arg);
+  }
+}