XtAppNextEvent(3Xt) | XT FUNCTIONS | XtAppNextEvent(3Xt) |
̾Á°¶
XtAppNextEvent, XtAppPending, XtAppPeekEvent, XtAppProcessEvent, XtDispatchEvent, XtAppMainLoop - ¥¤¥Ù¥ó¥È¤ÈÆþÎϤÎÌ䤤¹ç¤ï¤»¤ä½èÍý¤ò¹Ô¤¦
½ñ¼°¶
void XtAppNextEvent(app_context, event_return)
XtAppContext app_context;
XEvent *event_return;
Boolean XtAppPeekEvent(app_context, event_return)
XtAppContext app_context;
XEvent *event_return;
XtInputMask XtAppPending(app_context)
XtAppContext app_context;
void XtAppProcessEvent(app_context, mask)
XtAppContext app_context;
XtInputMask mask;
Boolean XtDispatchEvent(event)
XEvent *event;
void XtAppMainLoop(app_context)
XtAppContext app_context;
°ú¤¿ô¶
- app_context
- ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¼±Ê̤¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥³¥ó¥Æ¥¯¥¹¥È¤ò»ØÄꤹ¤ë¡£
- event
- ¥¤¥Ù¥ó¥È¹½Â¤ÂΤò»ØÄꤹ¤ë¡£ ¤³¤Î¹½Â¤ÂΤÏŬÀڤʥ¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤ËÇÛÁ÷¤µ¤ì¤ë¡£
- event_return
- »ØÄꤷ¤¿¥¤¥Ù¥ó¥È¹½Â¤ÂΤ˥¤¥Ù¥ó¥È¾ðÊó¤¬ÊÖ¤µ¤ì¤ë¡£
- mask
- ½èÍý¤¹¤ë¥¤¥Ù¥ó¥È¤Î·¿¤ò»ØÄꤹ¤ë¡£ ¤³¤Î¥Þ¥¹¥¯¤Ï¡¢ XtIMXEvent, XtIMTimer, XtIMAlternateInput, XtIMSignal ¤ÎǤ°Õ¤ÎÁȤ߹ç¤ï¤»¤Ë¤Ä¤¤¤Æ¥Ó¥Ã¥È¤´¤È¤ÎÏÀÍýϤò¼è¤Ã¤¿¤â¤Î¤Ç¤¢¤ë¡£ µ½Ò¤òÍưפˤ¹¤ë¤¿¤á¤Ë¡¢X ¥Ä¡¼¥ë¥¥Ã¥È¤Ç¤ÏÁ´¤Æ¤Î¥¤¥Ù¥ó¥È·¿¤ÎÏÀÍýÏ ¤Ç¤¢¤ë¥·¥ó¥Ü¥ë̾ XtIMAll ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
ÀâÌÀ¶
X ¤Î¥¤¥Ù¥ó¥È¥¥å¡¼¤¬¶õ¤Î¾ì¹ç¡¢ XtAppNextEvent ¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥³¥ó¥Æ¥¯¥¹¥ÈÆâ¤Ç»ØÄꤵ¤ì¤¿³Æ¥Ç¥£¥¹¥×¥ì¥¤¤Î½ÐÎϥХåե¡ ¤ò¥Õ¥é¥Ã¥·¥å¤·¡¢¥¤¥Ù¥ó¥È¤ÎȯÀ¸¤òÂԤġ£¤½¤Î´Ö¡¢Â¾¤ÎÆþÎϤΥ½¡¼¥¹¡¢¥¿¥¤¥à ¥¢¥¦¥È¤Î¥¿¥¤¥à¥¢¥¦¥ÈÃÍ¡¢¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Î¾õÂÖ¤òÄ´¤Ù¤Æ¡¢¤½¤ì¤é¤Ë¤è¤Ã¤Æ °ú¤µ¯¤³¤µ¤ì¤ë¥³¡¼¥ë¥Ð¥Ã¥¯¼ê³¤¤ò¸Æ¤Ó½Ð¤¹¡£¤³¤ÎÂÔ¤Á»þ´Ö¤Î´Ö¤Ë¥Ð¥Ã¥¯¥° ¥é¥¦¥ó¥É½èÍý¤¬¹Ô¤Ê¤ï¤ì¤ë(7.8 Àá¤ò»²¾È)¡£
¥¤¥Ù¥ó¥È¥¥å¡¼¤Ë¥¤¥Ù¥ó¥È¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢ XtAppPeekEvent event_return ¾ðÊó¹½Â¤ÂΤ˥¤¥Ù¥ó¥È¤Î¾ðÊó¤òÀßÄꤷ¡¢0 ¤Ç¤Ê¤¤ÃͤòÊÖ¤¹¡£¥¥å¡¼¤Ë X¤«¤é¤ÎÆþÎϤ¬Æþ¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢ XtAppPeekEvent ¤Ï½ÐÎϥХåե¡¤ò¥Õ¥é¥Ã¥·¥å¤·¡¢ÆþÎϤ¬²Äǽ¤Ë¤Ê¤ë¤Þ¤Ç½èÍý¤ò¥Ö¥í¥Ã¥¯¤¹¤ë (¤³¤Î½èÍý¤Î´Ö¡¢¥¿¥¤¥à¥¢¥¦¥È¤Î¥³¡¼¥ë¥Ð¥Ã¥¯¤¬¸Æ¤Ð¤ì¤ë¾ì¹ç¤¬¤¢¤ë)¡£ ÆþÎϤ¬¥¤¥Ù¥ó¥È¤Î¾ì¹ç¡¢ XtAppPeekEvent ¤Ï¤³¤Î event ¾ðÊó¹½Â¤ÂΤ˾ðÊó¤ò¥»¥Ã¥È¤·¡¢0 ¤Ç¤Ê¤¤ÃͤòÊÖ¤¹¡£ ¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¡¢ÆþÎϤϾ¤ÎÆþÎÏ¥½¡¼¥¹¤«¤é¤Î¤â¤Î¤Ç¤¢¤ê¡¢ XtAppPeekEvent ¤Ï 0 ¤òÊÖ¤¹¡£
´Ø¿ô XtAppPending ¤Ï¡¢¤Þ¤À½èÍý¤µ¤ì¤Æ¤¤¤Ê¤¤ X ¥µ¡¼¥Ð¤«¤é¤Î¥¤¥Ù¥ó¥È¡¢½èÍý¤µ¤ì¤Æ¤¤¤Ê¤¤¥¿¥¤ ¥Þ½èÍý¡¢½èÍý¤µ¤ì¤Æ¤¤¤Ê¤¤Â¾¤«¤é¤ÎÆþÎÏ¥½¡¼¥¹¤¬¤¢¤ë¾ì¹ç¤Ë 0 ¤Ç¤Ê¤¤ÃͤòÊÖ ¤¹¡£ ÊÖ¤µ¤ì¤ëÃÍ¤Ï XtIMXEvent, XtIMTimer, XtIMAlternateInput, XtIMSignal ¤Î¥Ó¥Ã¥È¤´¤È¤ÎÏÀÍýϤǤ¢¤ë¥Ó¥Ã¥È¥Þ¥¹¥¯ÃͤǤ¢¤ë( XtAppProcessEvent ¤ò»²¾È)¡£ ½èÍý¤µ¤ì¤Æ¤¤¤Ê¤¤¥¤¥Ù¥ó¥È¤¬¤Ê¤¤¾ì¹ç¡¢ XtAppPending ¤Ï½ÐÎϥХåե¡¤ò¥Õ¥é¥Ã¥·¥å¤·¤Æ 0 ¤òÊÖ¤¹¡£
´Ø¿ô XtAppProcessEvent ¤Ï¡¢¥¿¥¤¥Þ¡¢ÂåÂØÆþÎÏ¡¢¥·¥°¥Ê¥ë¥½¡¼¥¹¡¢X ¤Î¥¤¥Ù¥ó¥È¤Î¤¤¤º¤ì¤«1¤Ä¤ò½èÍý ¤¹¤ë¡£½èÍý¤¹¤ëŬÀڤʷ¿¤¬¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢½èÍý¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ë¤Þ¤Ç XtAppProcessEvent ¤Ï¥Ö¥í¥Ã¥¯¤µ¤ì¤ë¡£ ½èÍý¤Ç¤¤ë·¿¤Î¤â¤Î¤¬Ê£¿ô¤¢¤ë¾ì¹ç¡¢¤É¤ì¤¬½èÍý¤µ¤ì¤ë¤«¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£ Ä̾ï¤Ï¥¯¥é¥¤¥¢¥ó¥È¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬¤³¤Î¼ê³¤¤ò¸Æ¤Ö¤³¤È¤Ï¤Ê¤¤( XtAppMainLoop ¤ò»²¾È)¡£ XtAppProcessEvent ¤Ï¡¢Å¬Àڤʥ¿¥¤¥Þ¥³¡¼¥ë¥Ð¥Ã¥¯¤ò¸Æ¤ó¤Ç¥¿¥¤¥Þ¥¤¥Ù¥ó¥È¤ò½èÍý¤·¡¢Å¬Àڤʾ¤Î ÆþÎÏ¥³¡¼¥ë¥Ð¥Ã¥¯¤ò¸Æ¤ó¤Ç¾¤ÎÆþÎϤò½èÍý¤·¡¢Å¬Àڤʥ·¥°¥Ê¥ë¥³¡¼¥ë¥Ð¥Ã¥¯¤ò ¸Æ¤ó¤Ç¥·¥°¥Ê¥ë¥½¡¼¥¹¤ò½èÍý¤·¡¢ XtDispatchEvent ¤ò¸Æ¤ó¤Ç X ¤Î¥¤¥Ù¥ó¥È¤ò½èÍý¤¹¤ë¡£
X ¤Î¥¤¥Ù¥ó¥È¤ò¼õ¤±¼è¤Ã¤¿¤È¤¡¢¤³¤ì¤Ï XtDispatchEvent ¤ËÅϤµ¤ì¤ë¡£¤³¤Î´Ø¿ô¤ÏŬÀڤʥ¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤ò¸Æ¤Ó½Ð¤·¡¢¤³¤ì¤é¤ËÂФ·¤Æ ¤½¤ì¤¾¤ì¤Î¼ê³¤¤ËÅÐÏ¿¤µ¤ì¤¿¥¦¥£¥¸¥§¥Ã¥È¡¢¥¤¥Ù¥ó¥È¡¢¥¯¥é¥¤¥¢¥ó¥È¸ÇͤΠ¥Ç¡¼¥¿¤òÅϤ¹¡£
ÌõÃí: ¤³¤Î¥¯¥é¥¤¥¢¥ó¥È¸ÇͤΥǡ¼¥¿¤È¤Ï¡¢¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ëͽ¤á³ä¤êÅö¤Æ ¤é¤ì¤Æ¤¤¤ë¥¯¥é¥¤¥¢¥ó¥È¥Ç¡¼¥¿¤Î¤³¤È¤Ç¤¢¤ë¡£ ¥¤¥Ù¥ó¥È¤ËÂФ·¤ÆÅÐÏ¿¤µ¤ì¤¿¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤¬¤Ê¤¤¾ì¹ç¤Ï¡¢¥¤¥Ù¥ó¥È¤Ï̵»ë ¤µ¤ì¡¢¥Ç¥£¥¹¥Ñ¥Ã¥Á¥ã¤Ïñ¤ËÌá¤Ã¤Æ¤¯¤ë¤À¤±¤Ç¤¢¤ë¡£ ¥Ï¥ó¥É¥é¤¬¸Æ¤Ó½Ð¤µ¤ì¤ë½ç½ø¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
´Ø¿ô XtDispatchEvent ¤Ï¡¢´û¤ËÇÛÁ÷¥ë¡¼¥Á¥ó¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¥¤¥Ù¥ó¥È¤ò¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤ËÁ÷¤ë¡£ XtDispatchEvent ¤Ï¡¢¥¤¥Ù¥ó¥È¤ò¥Ï¥ó¥É¥é¤ËÇÛÁ÷¤·¤¿¾ì¹ç¤Ë¤Ï True ¤òÊÖ¤·¡¢¥¤¥Ù¥ó¥È¤òÇÛÁ÷¤¹¤ë¥Ï¥ó¥É¥é¤¬Ìµ¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï False ¤òÊÖ¤¹¡£ XtDispatchEvent ¤ÎºÇ¤â°ìÈÌŪ¤Ê»È¤¤Êý¤Ï XtAppNextEvent ¤Ë¤è¤Ã¤ÆÁª¤é¤ì¤¿¥¤¥Ù¥ó¥È¤ò³Æ¼ï¼ê³¤¤ËÇÛÁ÷¤¹¤ë¤³¤È¤Ç¤¢¤ë¡£ ¤Ê¤ª¡¢¤³¤Î´Ø¿ô¤Ï¥æ¡¼¥¶¤¬ºîÀ®¤·¤¿¥¤¥Ù¥ó¥È¤ò(¥¤¥Ù¥ó¥È¥Ï¥ó¥É¥é¤Ë)ÇÛÁ÷¤¹¤ë ¤¿¤á¤Ë¤âÍøÍѤǤ¤ë¡£ XtDispatchEvent ¤Ï¤Þ¤¿¡¢ XtAddGrab ¤Î¤¿¤á¤Î¥°¥é¥Ö¤Î¥»¥Þ¥ó¥Æ¥£¥¯¥¹¤ò¼Â¸½¤¹¤ëÌò³ä¤â»ý¤Ã¤Æ¤¤¤ë¡£
´Ø¿ô XtAppMainLoop ¤Ï¡¢ºÇ½é¤Ë XtAppNextEvent ¤ò¸Æ¤Ó¡¢¼¡¤Ë¤ä¤Ã¤Æ¤¯¤ë X ¤Î¥¤¥Ù¥ó¥È¤ò¼èÆÀ¤¹¤ë¡£ ¤½¤·¤Æ¡¢¼¡¤Ë XtDispatchEvent ¤ò¸Æ¤Ó¡¢ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ëŬÀڤʼ곤¤Ë¤³¤Î¥¤¥Ù¥ó¥È¤òÇÛÁ÷¤¹¤ë¡£ ¤³¤ì¤Ï¥Ä¡¼¥ë¥¥Ã¥È¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥á¥¤¥ó¥ë¡¼¥×¤ò¹½À®¤¹¤ë¡£ ¤·¤¿¤¬¤Ã¤Æ¡¢ XtAppSetExitFlag ¤¬¸Æ¤Ð¤ì¤ë¤Þ¤Ç¤Ï¤³¤Î´Ø¿ô¤ÏÌá¤Ã¤Æ¤¯¤ë¤³¤È¤Ï¤Ê¤¤¡£ ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¥æ¡¼¥¶¤Î¥¢¥¯¥·¥ç¥ó¤ËÂФ¹¤ë±þÅú¤ÎÃæ¤Ç½ªÎ»¤¹¤ë(exit¤¹ ¤ë)¤³¤È¤¬´üÂÔ¤µ¤ì¤Æ¤¤¤ë¡£ XtAppMainLoop ¤Ë´Ø¤·¤ÆÆÃÊ̤ʤ³¤È¤Ï²¿¤â¤Ê¤¤¡£ ¤³¤Î´Ø¿ô¤Ïñ¤Ë¡¢ XtAppGetExitFlag() ¤¬¿¿¤òÊÖ¤¹¤Þ¤Ç XtAppNextEvent ¤È XtDispatchEvent ¤ò·«¤êÊÖ¤·¸Æ¤Ö¥ë¡¼¥×¤Ë²á¤®¤Ê¤¤¡£
¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤³¤Î¥ë¡¼¥×¤ò¼«Ê¬¼«¿È¤Çºî¤ë¤³¤È¤¬¤Ç¤¤ë¡£ ¤³¤Î¾ì¹ç¤Ë¤Ï¡¢¥ë¡¼¥×Æâ¤Ç XtAppNextEvent ¤ò·«¤êÊÖ¤·¤Æ¸Æ¤ÖÁ°¤Ë¡¢¥°¥í¡¼¥Ð¥ë¤Ê½ªÎ»¥Õ¥é¥°¤ò³Îǧ¤·¤¿¤ê¡¢¥È¥Ã¥×¥ì¥Ù¥ë ¤Î¥¦¥£¥¸¥§¥Ã¥È¤Î¿ô¤¬ 0 ¤è¤ê¿¤¤¤«¤É¤¦¤«¤ò³Îǧ¤·¤¿¤ê¤¹¤ë¤³¤È¤Ç¡¢½ªÎ»¤¹ ¤ë¤«¸Æ¤Ó½Ð¤·¥ë¡¼¥×¤ËÌá¤ë¤«¤ò·è¤á¤ë¤³¤È¤¬¤Ç¤¤ë¡£
´ØÏ¢¹àÌܶ
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
Release 6.5 | X Version 11 |