🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Takashi KODERA Mon, 14 Dec 1992 15:09
Question about Mouse events
#248
Author: Takashi KODERA
Date: Mon, 14 Dec 1992 15:09
196 lines
7002 bytes
$@$O$8$a$^$7$F(J. $@>.;{!wK-665;=Q2J3XBg$H?=$7$^$9(J. 
X-Window$@$N%^%&(J$@%9%$%Y%s%H$K$D$$$F<ALd$5$;$F2<$5$$(J. 

$@8=:_(J, X-Window$@>e$G(JMotif$@$r;HMQ$7$F%"%W%j%1!<%7%g%s$r:n@.$7$F$$$k(J$@$N$G$9(J
$@$,(J, $@%^%&%9%$%Y%s%H$K4X$9$k=hM}$GLdBj$,H/@8$7$^$7$?(J.

$@6qBNE*$K$O(J, 

(1)   PointerMotionMask$@$r;H(J$@MQ$7$F(J, $@%^%&%9$N(J(x,y)$@:BI8$rI=<($7$F$$$k(J.
(2)   ButtonPressMask, Button1MotionMask, ButtonReleaseMask$@$r(J$@MQ$$$F(J, 
    $@2hLL>e$KI=<($5$l$?%0%i%U%#%C%/%9$N0\F0$r9T$J$&(J. 

$@$H$$$C$?=hM}$r9T$J$&$N$G$9$,(J, Button1$@$K(J$@$h$k%I%i%C%0$r9T$J$C$F$$$J$$$K$b(J
$@4X$o$i$:(J, Button1MotionMask$@$G;XDj$7$?4X?t$,8F$P$l$F$7$^$9$&$N$G$9(J. 

$@$=$3$G(J, $@4JC1$J%W%m%0%i%`$r5-=R$7$F$_$?$H$3$m(J, Xaw$@$rMQ$$$?$b$N$G$O$3$N(J
$@8=>]$O8+<u$1$i$l$:(J, Motif$@$rMQ$$(J$@$?$b$N$G$3$N8=>]$,H/@8$7$^$7$?(J. 

$@$3$l$O2?$,860x$J$N$G$7$g$&$+(J? $@0J2<$K$3$l$r:F8=$9$k4JC1$J%W%m%0%i%`$r(J$@<((J
$@$7$^$9(J. $@F0:n4D6-$O(JSparcStation2, SunOS-4.1.2 JLE1.1.2, X11R5-pl15(?)$@$G(J,
Xaw$@$rMQ$$$k$b$N$OF0:n$7$^$9(J$@$,(J, ASCIIopenware/Motif$@$rMQ$$$k$b$N$O@5>o$K(J
$@F0:n$7$^$;$s(J. $@%3%s%Q%$%i$OI8=`$N(Jcc$@$G$9(J. 

$@0J2<$O(JXaw$@$rMQ$$(J$@$?%W%m%0%i%`$N=PNO$G$9(J. 

pointer:event->type = 6		-> PointerMotionMask$@$K$h$k8F$S$@$7(J
pointer:event->type = 6		-> PointerMotionMask
press:event->type = 4		-> ButtonPressMask
pointer:event->type = 6		-> PointerMotionMask
button:event->type = 6		-> Button1MotionMask
pointer:event->type = 6		-> PointerMotionMask
button:event->type = 6		-> Button1MotionMask
press:event->type = 5		-> ButtonReleaseMask
pointer:event->type = 6		-> PointerMotionMask
pointer:event->type = 6		-> PointerMotionMask

$@$3$l$,(JMotif$@$r(J$@MQ$$$k$b$N$G$O(J, 

pointer:event->type = 6		-> PointerMotionMask$@$K$h$k8F$S$@$7(J
button:event->type = 6		-> Button1MotionMask
pointer:event->type = 6		-> PointerMotionMask
button:event->type = 6		-> Button1MotionMask
press:event->type = 4		-> ButtonPressMask
pointer:event->type = 6		-> PointerMotionMask
button:event->type = 6		-> Button1MotionMask
pointer:event->type = 6		-> PointerMotionMask
button:event->type = 6		-> Button1MotionMask
press:event->type = 5		-> ButtonReleaseMask
pointer:event->type = 6		-> PointerMotionMask
button:event->type = 6		-> Button1MotionMask
pointer:event->type = 6		-> PointerMotionMask
button:event->type = 6		-> Button1MotionMask

$@$H$$$&$h$&$K$J$j(J, $@C1$J$k(JPointerMotion$@$H(JButton1Motion$@$N6hJL$,$G$-$F$$$^(J
$@$;$s(J.

$@$3$l$r2sHr$9$k$K$O$I$&$9$l$P$h$$$N$G$7$g$&$+(J?
$@$I$&$+NI$$%"%I%P%$%9(J$@$r$*4j$$$7$^$9(J. (_o_)

$@0J2<$K(JXaw$@$rMQ$$$?%5%s%W%k%W%m%0%i%`$r<($7$^$9(J. 

--cut here----Xaw------cut here----Xaw------cut here----Xaw----
#include <stdio.h>

#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>

#include <X11/Xaw/Cardinals.h>
#include <X11/Xaw/Simple.h>

void buttonMotionEvent(widget, client_data, event)
     Widget widget;
     XtPointer client_data;
     XEvent *event;
{
  printf("button:event->type = %d\n", event->type);
}

void pointerMotionEvent(widget, client_data, event)
     Widget widget;
     XtPointer client_data;
     XEvent *event;
{
  printf("pointer:event->type = %d\n", event->type);
}

void buttonPressEvent(widget, client_data, event)
     Widget widget;
     XtPointer client_data;
     XEvent *event;
{
  printf("press:event->type = %d\n", event->type);
}

void main(argc, argv)
     int argc;
     char **argv;
{
  Widget toplevel, frame;

  Cardinal n;
  Arg args[10];

  XtAppContext app_con;

  toplevel = XtAppInitialize(&app_con, "Test", NULL, ZERO, &argc, argv,
			     NULL, NULL, ZERO);

  n = 0;
  XtSetArg(args[n], XtNwidth, 100); n++;
  XtSetArg(args[n], XtNheight, 100); n++;
  frame = XtCreateManagedWidget("testSimple", simpleWidgetClass, toplevel, 
				args, n);

  XtAddEventHandler(frame, PointerMotionMask, FALSE, pointerMotionEvent, NULL);
  XtAddEventHandler(frame, ButtonPressMask, FALSE, buttonPressEvent, NULL);
  XtAddEventHandler(frame, Button1MotionMask, FALSE, buttonMotionEvent, NULL);
  XtAddEventHandler(frame, ButtonReleaseMask, FALSE, buttonPressEvent, NULL);

  XtRealizeWidget(toplevel);
  XtAppMainLoop(app_con);
}
--cut here----Xaw------cut here----Xaw------cut here----Xaw----

$@0J2<$K(JMotif$@$rMQ$$$?%5%s%W%k%W%m%0%i%`(J$@$r<($7$^$9(J. 

--cut here--Motif----cut here--Motif----cut here--Motif----cut-here--
#include <stdio.h>

#include <Xm/Xm.h>
#include <Xm/DrawingA.h>

void buttonMotionEvent(widget, client_data, event)
     Widget widget;
     XtPointer client_data;
     XEvent *event;
{
  printf("button:event->type = %d\n", event->type);
}

void pointerMotionEvent(widget, client_data, event)
     Widget widget;
     XtPointer client_data;
     XEvent *event;
{
  printf("pointer:event->type = %d\n", event->type);
}

void buttonPressEvent(widget, client_data, event)
     Widget widget;
     XtPointer client_data;
     XEvent *event;
{
  printf("press:event->type = %d\n", event->type);
}

void main(argc, argv)
     int argc;
     char **argv;
{
  Widget toplevel, frame;

  Cardinal n;
  Arg args[10];

  XtAppContext app_con;

  toplevel = XtAppInitialize(&app_con, "Test", NULL, 0, &argc, argv,
			     NULL, NULL, 0);

  n = 0;
  XtSetArg(args[n], XmNwidth, 100); n++;
  XtSetArg(args[n], XmNheight, 100); n++;
  frame = XtCreateManagedWidget("testDrawing", xmDrawingAreaWidgetClass,
				toplevel, args, n);

  XtAddEventHandler(frame, PointerMotionMask, FALSE, pointerMotionEvent, NULL);
  XtAddEventHandler(frame, ButtonPressMask, FALSE, buttonPressEvent, NULL);
  XtAddEventHandler(frame, Button1MotionMask, FALSE, buttonMotionEvent, NULL);
  XtAddEventHandler(frame, ButtonReleaseMask, FALSE, buttonPressEvent, NULL);

  XtRealizeWidget(toplevel);
  XtAppMainLoop(app_con);
}
--cut here--Motif----cut here--Motif----cut here--Motif----cut-here--

$@$J$K$H$>$*4j$$$7$^$9(J. 

--
----------------------------------------------------------------------------
   $@>.;{(J  $@5.(J ( Takashi Kodera )                                              
                     $@K-665;=Q2J3XBg3X(J $@>pJs9)3X@l96(J $@>pJs=hM}Bg9V:B(J $@110f8&5f<<(J
              TEL 0532(47)0111 ext.496,497 E-mail kode@bpel.tutics.tut.ac.jp
----------------------------------------------------------------------------
Re: Question about Mouse events
#250
Author: Aoyama Hisao
Date: Tue, 15 Dec 1992 06:58
58 lines
2920 bytes
In article <KODE.92Dec15000825@ss1.bpel.tutics.tut.ac.jp> 
	kode@bpel.tutics.tut.ac.jp (Takashi KODERA) writes:



}  $B$O$8$a$^$7$F(B. $B>.;{!wK-665;=Q2J3XBg$H?=$7$^$9(B. 

$B$O$8$a$^$7$F!%(B

}  X-Window$B$N%^%&%9%$%Y%s%H$K$D$$$F<ALd$5$;$F2<$5$$(B. 

}  (1)   PointerMotionMask$B$r;HMQ$7$F(B, $B%^%&%9$N(B(x,y)$B:BI8$rI=<($7$F$$$k(B.
}  (2)   ButtonPressMask, Button1MotionMask, ButtonReleaseMask$B$rMQ$$$F(B, 
}      $B2hLL>e$KI=<($5$l$?%0%i%U%#%C%/%9$N0\F0$r9T$J$&(B. 

}  $B$H$$$C$?=hM}$r9T$J$&$N$G$9$,(B, Button1$B$K$h$k%I%i%C%0$r9T$J$C$F$$$J$$$K$b(B
}  $B4X$o$i$:(B, Button1MotionMask$B$G;XDj$7$?4X?t$,8F$P$l$F$7$^$9$&$N$G$9(B. 

}  $B$=$3$G(B, $B4JC1$J%W%m%0%i%`$r5-=R$7$F$_$?$H$3$m(B, Xaw$B$rMQ$$$?$b$N$G$O$3$N(B
}  $B8=>]$O8+<u$1$i$l$:(B, Motif$B$rMQ$$$?$b$N$G$3$N8=>]$,H/@8$7$^$7$?(B. 

}  $B$3$l$O2?$,860x$J$N$G$7$g$&$+(B? $B0J2<$K$3$l$r:F8=$9$k4JC1$J%W%m%0%i%`$r<((B
}  $B$7$^$9(B. $BF0:n4D6-$O(BSparcStation2, SunOS-4.1.2 JLE1.1.2, X11R5-pl15(?)$B$G(B,
}  Xaw$B$rMQ$$$k$b$N$OF0:n$7$^$9$,(B, ASCIIopenware/Motif$B$rMQ$$$k$b$N$O@5>o$K(B
}  $BF0:n$7$^$;$s(B. $B%3%s%Q%$%i$OI8=`$N(Bcc$B$G$9(B. 

$B3NG'$7$?Lu$G$O$"$j$^$;$s$,!$(BOpenWare Motif $B$r;H$&$H%j%s%/$9(B
$B$k$3$H$K$J$k(B R4 $B%Y!<%9$N(B Xt $B%i%$%V%i%j$H!$(BXaw $B$N$H$-$D$+$&(B 
R5 $B$N(B Xt $B$N0c$$$G$7$g$&!%(B($BB?J,(B OpenWare Motif $B$K$D$$$F$/$k(B 
R4 $B%i%$%V%i%j$@$1$NLdBj$G$O$J$/!$(BR4 $B0lHL$NLdBj$G$"$m$&$H;W$$(B
$B$^$9$,!$$3$l$b$b$A$m$sL$3NG'(B)

$B2sHrJ}K!$G$9$,!$%5%s%W%k$N$h$&$K>o$K(B PointerMotionMask $B$,$+(B
$B$+$C$F$$$k%&%#%s%I%&$G$O!$(BButton1MotionMask $B$KBP1~$7$?%$%Y%s(B
$B%H%O%s%I%i!<$r@_Dj$;$:!$(BPointerMotionMask $B$KBP1~$7$?%$%Y%s%H(B
$B%O%s%I%i!<$G!$(B

}  void pointerMotionEvent(widget, client_data, event)
}       Widget widget;
}       XtPointer client_data;
}       XEvent *event;
}  {

	if(event.xmotion.state & Button1MotionMask){
		Button1MotionMask $B$KBP1~$7$?=hM}(B
	}
	PointerMotionMask $B$KBP1~$7$?=hM}(B
}  }

$B$H$9$l$P$h$$$N$G$O$J$$$G$9$+(B?

PointerMotionMask $B$b(B Button1MotionMask $B$bJV$C$F$/$k%$%Y%s%H(B
$B$OF1$8(B MotionNotify $B$G$9$+$i!%(B
-- 
----
Hisao Aoyama						 $@@D;3(B $@>0IW(B
ASTEC, Inc.					  $@!J3t!K%"%9%F%C%/(B
aoyama@astec.co.jp
Re: Question about Mouse events
#260
Author: Yoshinobu Oota
Date: Wed, 16 Dec 1992 06:22
20 lines
1391 bytes
$@LdBj2r7h$K$O$J$i$J$$$N$+$bCN$l$^$;$s!#(J

In article <KODE.92Dec15000825@ss1.bpel.tutics.tut.ac.jp>
	kode@bpel.tutics.tut.ac.jp (Takashi KODERA) writes:
>  $@$H$$$&(J$@$h$&$K$J$j(J, $@C1$J$k(JPointerMotion$@$H(JButton1Motion$@$N6hJL$,$G$-$F$$$^(J
>  $@$;$s(J.

  X Toolkit Intrinsics Programming Manual OSF/Motif Edition
  by Adrian Nye and Tim O'Reilly

$@$N(J Event Handlers $@$N9`$r8+$k$H!"%$(J$@%Y%s%H%^%9%/$H%$%Y%s%H%?%$%W$O(J
$@0lBP0l$K$OBP1~$7$J$$$H=q$$$F$"$j$^$9!#$=$l$G!"(J*MotionMask $@$O3'(J
MotionNotify $@$KBP1~$7$F$$$^$9!#$3$3$@$1FI$`$H!"(JMotif $@$NJ}$NF0$-$,(J
$@@5$7$$$h$&$J5$$,$7$^$9$,!"$I$s$J$b$s$G$7$g(J$@$&!#(J

$@!t30$7$F$$$k$+$J!)(J

translation table $@$r;H$&$N$G$OBLL\$G$7$g$&$+!#(J

$@!J$*!K(J
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads