LECTURE 15 ¥¦¥£¥ó¥É¥¦¤Î°À­

¡û ¤Ï¤¸¤á¤Ë

¤³¤ì¤Þ¤Ç¤Î LECTURE ¤Ë¤ª¤¤¤Æ¡¢XCreateSimpleWindow() ¤ò»È¤Ã¤Æ¥¦¥£¥ó¥É¥¦¤òºîÀ®¤¹¤ëºÝ¤Ë¡¢¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤ä°ÌÃ֤˴ؤ¹¤ë¾ðÊó°Ê³°¤Ë¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥«¥é¡¼¤È¥Ü¡¼¥À¤Î¿§¤ò»ØÄꤷ¤Þ¤·¤¿¡£¥µ¥¤¥º¤ä°ÌÃÖ¾ðÊó¤Ï LECTURE 8 ¤Ç½Ò¤Ù¤¿¤è¤¦¤Ë¥¸¥ª¥á¥È¥ê¾ðÊó¤È¸Æ¤Ó¤Þ¤¹¤¬¡¢¤½¤ì°Ê³°¤Î¥¦¥£¥ó¥É¥¦¤Ë´Ø¤¹¤ë¾ðÊó¤ò°ìÈ̤˥¦¥£¥ó¥É¥¦¤Î°À­¤È¸Æ¤Ó¤Þ¤¹¡£¤½¤ì¤é¤òÀßÄꤹ¤ë¤³¤È¤Ç¡¢¥¦¥£¥ó¥É¥¦¤Î¸«¤¿ÌܤäÆ°ºî¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¤³¤³¤Ç¤Ï¡¢¥¸¥ª¥á¥È¥ê¾ðÊó°Ê³°¤Î¥¦¥£¥ó¥É¥¦¤Î°À­¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Æ¤¤¤­¤Þ¤¹¡£

¡û ¥¦¥£¥ó¥É¥¦¤Î°À­¹àÌÜ

¥¦¥£¥ó¥É¥¦¤Î»ý¤Ä°À­( ¥¸¥ª¥á¥È¥ê°Ê³° )¤Ï¡¢XSetWindowAttributes ¹½Â¤ÂÎ( <X11/Xlib.h> )¤Î³Æ¥á¥ó¥Ð¤¬Âбþ¤·¤Æ¤¤¤Þ¤¹(Á´Éô¤Ç15¸Ä)¡£

typedef struct
{
  Pixmap        background_pixmap;     /* ÇطʤΥѥ¿¡¼¥ó */
  unsigned long background_pixel;      /* Çطʤο§ */
  Pixmap        border_pixmap;         /* ¥Ü¡¼¥À¤Î¥Ñ¥¿¡¼¥ó */
  unsigned long border_pixel;          /* ¥Ü¡¼¥À¤Î¿§ */
  int           bit_gravity;           /* ¥ê¥µ¥¤¥º»þ¤ÎÉÁ²èÆâÍƤΰ·¤¤ */
  int           win_gravity;           /* ¥ê¥µ¥¤¥º»þ¤Î»Ò¥¦¥£¥ó¥É¥¦¤Î°·¤¤ */
  int           backing_store;         /* ¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢ */
  unsigned long backing_planes;        /* ¥Ð¥Ã¥­¥ó¥°¥×¥ì¡¼¥ó */
  unsigned long backing_pixel;         /* ¥Ð¥Ã¥­¥ó¥°¥Ô¥¯¥»¥ë */
  Bool          save_under;            /* ¥»¡¼¥Ö¥¢¥ó¥À */
  long          event_mask;            /* ¥¤¥Ù¥ó¥È¥Þ¥¹¥¯ */
  long          do_not_propagate_mask; /* ÈóÅÁÇÅ¥Þ¥¹¥¯ */
  Bool          override_redirect;     /* ¥ê¥À¥¤¥ì¥¯¥È̵¸ú */
  Colormap      colormap;              /* ¥«¥é¡¼¥Þ¥Ã¥× */
  Cursor        cursor;                /* ¥Þ¥¦¥¹¥«¡¼¥½¥ë */
} XSetWindowAttributes;

¤½¤ì¤¾¤ì¤Î¥á¥ó¥Ð¤¬¤É¤¦¤¤¤¦¤â¤Î¤Ç¤¢¤ë¤«¤Ë¤Ä¤¤¤Æ¡¢

  1. Çطʤο§¤È¥Ñ¥¿¡¼¥ó
  2. ¥Ü¡¼¥À¤Î¿§¤È¥Ñ¥¿¡¼¥ó
  3. ¥ê¥µ¥¤¥º»þ¤ÎÉÁ²èÆâÍƤȻҥ¦¥£¥ó¥É¥¦¤Î°·¤¤
  4. ¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢/¥»¡¼¥Ö¥¢¥ó¥À/¥Ñ¥Ã¥­¥ó¥° ¥×¥ì¡¼¥ó¥Ð¥Ã¥­¥ó¥°¥Ô¥¯¥»¥ë
  5. ¥¤¥Ù¥ó¥È¥Þ¥¹¥¯/ÈóÅÁÇÅ¥Þ¥¹¥¯
  6. ¥ê¥À¥¤¥ì¥¯¥È̵¸ú
  7. ¥«¥é¡¼¥Þ¥Ã¥×
  8. ¥Þ¥¦¥¹¥«¡¼¥½¥ë

¤Î½ç¤ËÀâÌÀ¤·¤Æ¤¤¤­¤Þ¤¹¡£¤Ê¤ª¡¢³Æ¹àÌܤÎÀâÌÀ¤Ë¤ª¤¤¤ÆÀßÄê´Ø¿ô¤Ë¤Ä¤¤¤Æ¤Îµ­½Ò¤¬Ìµ¤¤¤â¤Î¤Ë¤Ä¤¤¤Æ¤Ï

¤ÇÀâÌÀ¤¹¤ëÊýË¡¤ÇÀßÄê/Êѹ¹¤ò¹Ô¤¤¤Þ¤¹¡£

¡ü Çطʤο§¤È¥Ñ¥¿¡¼¥ó

¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É(ÇØ·Ê)¤Ë´Ø¤¹¤ë°À­¤Ë¤Ï¡¢Åɤê¤Ä¤Ö¤¹¤¿¤á¤Î¿§¤ÈÉߤ­¤Ä¤á¤ë¥Ñ¥¿¡¼¥ó¤Î 2 ¤Ä¤¬¤¢¤ê¤Þ¤¹¡£¤¤¤º¤ì¤«¤òÀßÄꤷ¤Þ¤¹¤¬¡¢ÁÐÊý¤È¤âÀßÄꤵ¤ì¤¿¾ì¹ç¤Ë¤Ï¿§¤ÎÀßÄ꤬»ÈÍѤµ¤ì¤Þ¤¹¡£

  • ¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥«¥é¡¼(background_pixel)

    ¥¦¥£¥ó¥É¥¦¤Î¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤òÅɤê¤Ä¤Ö¤¹¿§¤Î¥Ô¥¯¥»¥ëÃͤò»ØÄꤷ¤Þ¤¹¡£ÀßÄꤷ¤¿½Ö´Ö¤Ë¿§¤¬ ÊѤï¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢XClearWindow() ¤Ê¤É¤Ç¥¦¥£¥ó¥É¥¦¤¬¥¯¥ê¥¢¤µ¤ì¤¿»þ¤Ë¤Ï¤¸¤á¤ÆÀßÄꤷ¤¿¿§¤ÇÅÉ ¤ê¤Ä¤Ö¤µ¤ì¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ï̤ÄêµÁ¤Ç¤¹¡£

    ¥¦¥£¥ó¥É¥¦¤Î¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥«¥é¡¼¤ò»ØÄꤹ¤ë¤Ë¤Ï XSetWindowBackground() ¤ò»È¤¤¤Þ¤¹¡£

      XSetWindowBackground( Display*      display, 
                            Window        w, 
                            unsigned long background_pixel 
                           );
      background_pixel : ÀßÄꤷ¤¿¤¤¿§¤Î¥Ô¥¯¥»¥ëÃÍ
    
    

  • ¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤Î¥Ñ¥¿¡¼¥ó(background_pixmap)

    ¥¦¥£¥ó¥É¥¦¤Î¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤ËÉߤ­¤Ä¤á¤ë(¥¿¥¤¥ê¥ó¥°¤¹¤ë)¥Ñ¥¿¡¼¥ó¤Ë»È¤¦¥Ô¥¯¥¹¥Þ¥Ã¥× ¤ò»ØÄꤷ¤Þ¤¹¡£¥Ô¥¯¥¹¥Þ¥Ã¥×ID¤Ç¥Ô¥¯¥¹¥Þ¥Ã¥×¤ò»ØÄꤹ¤ë¾¤Ë¡¢Äê¿ô None(Æ©²á¥Ð¥Ã¥¯¥°¥é¥¦ ¥ó¥É)¤È ParentRelative (¿Æ¥¦¥£¥ó¥É¥¦¤ÈƱ¤¸¥Ñ¥¿¡¼¥ó¤ò»ÈÍÑ)¤¬»ØÄê¤Ç¤­¤Þ¤¹¡£

    ¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥«¥é¡¼Æ±ÍÍ¡¢ÀßÄꤷ¤¿½Ö´Ö¤Ë¥¿¥¤¥ê¥ó¥°¤µ¤ì¤ë¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤Þ¤¿¡¢ »ØÄꤹ¤ë¥Ô¥¯¥¹¥Þ¥Ã¥×¤Î¿¼¤µ¤Ï¤½¤ì¤ò»ÈÍѤ¹¤ë¥¦¥£¥ó¥É¥¦¤Î¿¼¤µ¤ÈƱ¤¸¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£

    ¥¿¥¤¥ê¥ó¥°¥Ñ¥¿¡¼¥ó¤ò»ØÄꤹ¤ë¤Ë¤Ï¡¢XSetWindowBackgroundPixmap()¤ò»È¤¤¤Þ¤¹¡£

      XSetWindowBackgroundPixmap( Display* dpy, 
                                  Window   w, 
                                  Pixmap   background_pixmap 
                                );
      background_pixmap : ¥Ô¥¯¥¹¥Þ¥Ã¥×¤ÎID
    
    

¡ü ¥Ü¡¼¥À¤Î¿§¤È¥Ñ¥¿¡¼¥ó

¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤ÈƱ¤¸¤¯¿§¤È¥¿¥¤¥ê¥ó¥°¥Ñ¥¿¡¼¥ó¤È¤¤¤¦ 2 ¤Ä¤Î°À­¤¬¤¢¤ê¡¢¤¤¤º¤ì¤«¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£Î¾Êý»ØÄꤷ¤¿¾ì¹ç¤Ë¤Ï¡¢¿§¤Î°À­¤¬»ÈÍѤµ¤ì¤Þ¤¹¡£

  • ¥Ü¡¼¥À¤Î¿§(border_pixel)

    ¥¦¥£¥ó¥É¥¦¤Î¥Ü¡¼¥À¤òÅɤê¤Ä¤Ö¤¹¿§¤Î¥Ô¥¯¥»¥ëÃͤò»ØÄꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ï̤ÄêµÁ¤Ç¤¹¡£¥¦¥£ ¥ó¥É¥¦¤Î¥Ü¡¼¥À¥«¥é¡¼¤òÀßÄꤹ¤ë¤Ë¤Ï¡¢XSetWindowBorder()¤ò»È¤¤¤Þ¤¹¡£

      XSetWindowBorder( Display* dpy, Window w, unsigned int border_pixel );
      border_pixel : ÀßÄꤷ¤¿¤¤¿§¤Î¥Ô¥¯¥»¥ëÃÍ
    
    

  • ¥Ü¡¼¥À¤Î¥Ñ¥¿¡¼¥ó(border_pixmap)

    ¥¦¥£¥ó¥É¥¦¤Î¥Ü¡¼¥À¤Ë»ÈÍѤ¹¤ë¥¿¥¤¥ê¥ó¥°¥Ñ¥¿¡¼¥ó¤ò¥Ô¥¯¥¹¥Þ¥Ã¥×¤Ç»ØÄꤷ¤Þ¤¹¡£¥Ô¥¯¥¹¥Þ¥Ã ¥×ID¤Î¾¤Ë¡¢Äê¿ô CopyFromParent ( ¿Æ¥¦¥£¥ó¥É¥¦¤ÈƱ¤¸¥Ñ¥¿¡¼¥ó(¥Ç¥Õ¥©¥ë¥È) )¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£ »ØÄꤹ¤ë¥Ô¥¯¥¹¥Þ¥Ã¥×¤Î¿¼¤µ¤Ï¤½¤ì¤ò»ÈÍѤ¹¤ë¥¦¥£¥ó¥É¥¦¤Î¿¼¤µ¤ÈƱ¤¸¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

    ¥¿¥¤¥ê¥ó¥°¥Ñ¥¿¡¼¥ó¤ò»ØÄꤹ¤ë¤Ë¤Ï XSetWindowBorderPixmap()¤ò»È¤¤¤Þ¤¹¡£

      XSetWindowBorderPixmap( Display* dpy, Window w, Pixmap border_pixmap );
      border_pixmap : ¥Ô¥¯¥¹¥Þ¥Ã¥× ID
    
    

¡ü ¥ê¥µ¥¤¥º»þ¤ÎÉÁ²èÆâÍƤȻҥ¦¥£¥ó¥É¥¦¤Î°·¤¤

¿Æ¥¦¥£¥ó¥É¥¦¤Î¥ê¥µ¥¤¥º»þ¤Ë¤Ï¡¢¥¦¥£¥ó¥É¥¦¤ÎÉÁ²èÆâÍÆ(¤ª¤è¤Ó»Ò¥¦¥£¥ó¥É¥¦)¤¬»ØÄꤷ¤¿Êý¸þ¤Ë°ú¤­´ó¤»¤é¤ì¤Þ¤¹¡£¤³¤ì¤òÀßÄꤹ¤ë°À­¤¬¥°¥é¥Ó¥Æ¥£( gravity )¤Ç¤¹¡£

¥°¥é¥Ó¥Æ¥£¤Ë¤Ï»Ò¥¦¥£¥ó¥É¥¦¤Î°ÌÃÖ¤òÀ©¸æ¤¹¤ë¤¿¤á¤Î¥¦¥£¥ó¥É¥¦¥°¥é¥Ó¥Æ¥£( win_gravity )¤È¡¢¥¦¥£¥ó¥É¥¦¤ÎÉÁ²èÆâÍƤΰÌÃÖ¤òÀ©¸æ¤¹¤ë¥Ó¥Ã¥È¥°¥é¥Ó¥Æ¥£( bit_gravity )¤¬¤¢¤ê¤Þ¤¹¡£

°Ê²¼¤Î 9¤Ä¤Ïξ¥°¥é¥Ó¥Æ¥£¤Ç¶¦Ä̤ǡ¢Ì¾Á°¤¬É½¤¹Êý¸þ¤Ë¥¦¥£¥ó¥É¥¦¤Îɽ¼¨ÆâÍƤ¬°ú¤­´ó¤»¤é¤ì¤Þ¤¹¡£

  • NorthWestGravity ( º¸¾å )
  • NorthGravity ( ¾å )
  • NorthEastGravity ( ±¦¾å )
  • WestGravity ( º¸ )
  • CenterGravity ( ¿¿Ãæ )
  • EastGravity ( ±¦ )
  • SouthWestGravity ( º¸²¼ )
  • SouthGravity ( ²¼ )
  • SouthEastGravity ( ±¦²¼ )

°Ê²¼¤Ï³Æ¥°¥é¥Ó¥Æ¥£¸ÄÍ­¤Î°À­ÃͤǤ¹¡£

  • ¥Ó¥Ã¥È¥°¥é¥Ó¥Æ¥£
    • StaticGravity ¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤ËÂФ·¤Æ¸ÇÄê
    • ForgetGravity ÉÁ²èÆâÍƤò¼Î¤Æ¤Æ Expose ¥¤¥Ù¥ó¥È¤òȯÀ¸¤¹¤ë

  • ¥¦¥£¥ó¥É¥¦¥°¥é¥Ó¥Æ¥£
    • UnmapGravity ¥¦¥£¥ó¥É¥¦¤ò¥¢¥ó¥Þ¥Ã¥×¤¹¤ë

¥Ó¥Ã¥È¥°¥é¥Ó¥Æ¥£¤Î¥Ç¥Õ¥©¥ë¥È¤Ï ForgetGravity¡¢¥¦¥£¥ó¥É¥¦¥°¥é¥Ó¥Æ¥£¤Î¥Ç¥Õ¥©¥ë¥È¤Ï NorthWestGravity ¤Ç¤¹¡£

¡ü ¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢/¥»¡¼¥Ö¥¢¥ó¥À/¥Ð¥Ã¥­¥ó¥°¥×¥ì¡¼¥ó/¥Ð¥Ã¥­¥ó¥°¥Ô¥¯¥»¥ë

¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢¤È¥»¡¼¥Ö¥¢¥ó¥À¡¼¤Ï¡¢X ¥µ¡¼¥Ð¤Ë¥¦¥£¥ó¥É¥¦¤ÎÆâÍƤò¥»¡¼¥Ö¤·¤Æ¤ª¤¯¤è¤¦¤Ë°ÍÍꤷ¤Æ Expose ¤µ¤ì¤¿¤È¤­¤Ë X ¥µ¡¼¥Ð¤ËºÆÉÁ²è¤·¤Æ¤â¤é¤¦µ¡Ç½¤Ç¤¹¡£¥Ð¥Ã¥­¥ó¥°¥×¥ì¡¼¥ó¤È¥Ð¥Ã¥­¥ó¥°¥Ô¥¯¥»¥ë¤Ï¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢¤È¥»¡¼¥Ö¥¢¥ó¥À¡¼¤ÎÆ°ºîÀßÄêÍÑ°À­¤È»×¤Ã¤Æ¤â¤é¤¨¤ì¤Ð¤¤¤¤¤Ç¤¹¡£

¤³¤ì¤é¤Îµ¡Ç½¤Ï

  • X ¥µ¡¼¥Ð¤Ë¤«¤«¤ëÉé²Ù¤¬½Å¤¤
  • X ¥µ¡¼¥Ð¤¬¾¡¼ê¤Ë½èÍý¤òÃæ»ß¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤¢¤ë
  • ¤½¤â¤½¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤¬¤¢¤ë

¤È¤¤¤¦À­³Ê¤¬¤¢¤ë¤Î¤Ç¡¢»È¤¦¾ì¹ç¤ÏÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£

  1. ¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢(backing_store)

    »ØÄꥦ¥£¥ó¥É¥¦¤¬Â¾¤Î¥¦¥£¥ó¥É¥¦¤Ë±£¤µ¤ì¤¿¾ì¹ç¡¢¤â¤·¤¯¤Ï¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¤¿¤È¤­¤Ë¤½¤Î¥¦¥£¥ó ¥É¥¦¤ÎÉÁ²èÆâÍƤò X ¥µ¡¼¥Ð¤¬¥»¡¼¥Ö¤¹¤ë¤«¤É¤¦¤«¤ò»ØÄꤷ¤Þ¤¹¡£

    ÃÍ ÀâÌÀ
    NotUseful ¥»¡¼¥Ö¤·¤Ê¤¤(¥Ç¥Õ¥©¥ë¥È)
    WhenMapped¥Þ¥Ã¥×»þ¤Ë¥»¡¼¥Ö¤¹¤ë
    Always ¥¢¥ó¥Þ¥Ã¥×»þ¤Ë¤âÆâÍƤò¥»¡¼¥Ö¤¹¤ë

  2. ¥»¡¼¥Ö¥¢¥ó¥À¡¼(save_under)

    »ØÄꥦ¥£¥ó¥É¥¦¤Î¥Þ¥Ã¥×»þ¤Ë¡¢²¼¤Ë±£¤ì¤ë¤³¤È¤Ë¤Ê¤ë¥¦¥£¥ó¥É¥¦¤ÎÆâÍƤò X ¥µ¡¼¥Ð¤¬¥»¡¼¥Ö¤¹¤ë ¤«¤É¤¦¤«¤ò»ØÄꤷ¤Þ¤¹¡£»ØÄꥦ¥£¥ó¥É¥¦¤Î¥¢¥ó¥Þ¥Ã¥×»þ¤Ë¥»¡¼¥Ö¤µ¤ì¤¿ÆâÍƤ¬ºÆÉÁ²è¤µ¤ì¡¢²¼¤Î¥¦ ¥£¥ó¥É¥¦¤ËÂФ¹¤ë Expose ¥¤¥Ù¥ó¥È¤ÏȯÀ¸¤·¤Þ¤»¤ó¡£¥á¥Ë¥å¡¼¥¦¥£¥ó¥É¥¦¤òɽ¼¨¤¹¤ë¤È¤­¤Ê¤É¤Ë»È ¤¦¤ÈÊØÍø¤Ê¤è¤¦¤Ç¤¹¡£

    ÃÍÀâÌÀ
    False¥»¡¼¥Ö¤·¤Ê¤¤(¥Ç¥Õ¥©¥ë¥È)
    True ¥»¡¼¥Ö¤¹¤ë

  3. ¥Ð¥Ã¥­¥ó¥°¥×¥ì¡¼¥ó(backing_planes)

    ¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢/¥»¡¼¥Ö¥¢¥ó¥À¡¼»þ¤Ë¥»¡¼¥Ö¤¹¤ë¥×¥ì¡¼¥ó¤ò¥Ó¥Ã¥È¥Ñ¥¿¡¼¥ó¤Ç»ØÄꤷ¤Þ¤¹¡£ 1 ¤¬Î©¤Ã¤Æ¤¤¤ë¥×¥ì¡¼¥ó¤Î¤ß¤ò¥»¡¼¥Ö¤·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤ÏÁ´¤Æ¤Î¥×¥ì¡¼¥ó¤ò¥»¡¼¥Ö¤·¤Þ¤¹¡£

  4. ¥Ð¥Ã¥­¥ó¥°¥Ô¥¯¥»¥ë(backing_pixel)

    ºÆÉÁ²è»þ¤Ë¡¢¥Ð¥Ã¥­¥ó¥°¥×¥ì¡¼¥ó¤Ë¤è¤Ã¤Æ¥»¡¼¥Ö¤·¤Ê¤¤¤È»ØÄꤵ¤ì¤¿¥×¥ì¡¼¥ó¤ËÉÁ²è¤¹¤ëÃͤò»Ø Äꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ï 0 ¤Ç¤¹¡£

¡ü ¥¤¥Ù¥ó¥È¥Þ¥¹¥¯/ÈóÅÁÇÅ¥Þ¥¹¥¯

  1. ¥¤¥Ù¥ó¥È¥Þ¥¹¥¯(event_mask)

    ¥¦¥£¥ó¥É¥¦¤¬¼õ¤±¼è¤ë¥¤¥Ù¥ó¥È¤ò»ØÄꤷ¤Þ¤¹(´û¤Ë XSelectInput() ¤ò»È¤Ã¤Æ¥¤¥Ù¥ó¥È»ØÄê¤ò ¹Ô¤Ã¤Æ¤­¤Þ¤·¤¿)¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï 0 ¤¬»ØÄꤵ¤ì¤Æ¤ª¤ê¡¢°ìÉô¤Î̵¾ò·ï¤ËÁ÷¤é¤ì¤ÆÍè¤ë¥¤¥Ù¥ó¥È (¥Î¥ó¥Þ¥¹¥«¥Ö¥ë¥¤¥Ù¥ó¥È)°Ê³°¤Î¥¤¥Ù¥ó¥È¤Ï X ¥µ¡¼¥Ð¤«¤éÁ÷¤é¤ì¤Æ¤­¤Þ¤»¤ó¡£

  2. ÈóÅÁÇÅ¥Þ¥¹¥¯(do_not_propagate_mask)

    ¤¢¤ë¥¦¥£¥ó¥É¥¦¤Ç¤¢¤ë¥¤¥Ù¥ó¥È¤¬È¯À¸¤·¤¿¾ì¹ç¡¢¤½¤Î¥¦¥£¥ó¥É¥¦¤Ç³ºÅö¤¹¤ë¥¤¥Ù¥ó¥È¤òÁªÂò¤· ¤Æ¤¤¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤ÏÄ̾綠¤Î¿Æ¥¦¥£¥ó¥É¥¦¤ò¤¿¤É¤Ã¤Æ¤¤¤­¤Þ¤¹(¥¤¥Ù¥ó¥È¤ÎÅÁÇÅ)¡£¥¤¥Ù¥ó¥È¤Ï ¼õ¤±¼è¤é¤Ê¤¤¤¬¡¢¿Æ¥¦¥£¥ó¥É¥¦¤Ø¤ÎÅÁÇŤϤµ¤»¤¿¤¯¤Ê¤¤¤È¤¤¤¦¾ì¹ç¤Ë¤Ï¡¢ÈóÅÁÇÅ¥Þ¥¹¥¯( do_not_propagate_mask )¤ËÂоݤȤʤ륤¥Ù¥ó¥È¥Þ¥¹¥¯¤òÀßÄꤷ¤Þ¤¹¡£

    ¥Ç¥Õ¥©¥ë¥È¤Ç¤ÏÈóÅÁÇÅ¥Þ¥¹¥¯¤Ë¤Ï 0 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Æ¡¢¤½¤Î¥¦¥£¥ó¥É¥¦¤ÇÁªÂò¤µ¤ì¤Æ¤¤¤Ê¤¤Á´ ¤Æ¤Î¥¤¥Ù¥ó¥È¤¬¿Æ¥¦¥£¥ó¥É¥¦¤ËÅÁÇŤµ¤ì¤Þ¤¹¡£ÈóÅÁÇÅ¥Þ¥¹¥¯¤Ï XChangeWindowAttributes() ¤Ç¤· ¤«ÀßÄê/Êѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£

¡ü ¥ê¥À¥¤¥ì¥¯¥È̵¸ú

¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤òµ¯Æ°¤·¤Æ¤¤¤ë¾ì¹ç¡¢Ä̾ï¤Ï¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤¬¥¯¥é¥¤¥¢¥ó¥È¤È X ¥µ¡¼¥Ð¤Î´Ö¤ËÆþ¤ë¤¿¤á¡¢Í×µá¤òľÀÜ X ¥µ¡¼¥Ð¤ËÅÁ¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤³¤ì¤Ë¤è¤Ã¤Æ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ãÆȼ«¤ÎÀ©¸æ¤¬¼Â¸½¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢¼«Ê¬¤¬¥×¥í¥°¥é¥àÃæ¤Ëµ­½Ò¤·¤¿Ä̤ê¤Ëɽ¼¨¤µ¤ì¤Ê¤«¤Ã¤¿¤ê¡¢·Ù¹ð¥À¥¤¥¢¥í¥°¤ò¤Á¤ç¤Ã¤È½Ð¤·¤¿¤¤»þ¤Ë¤¤¤Á¤¤¤Á¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤Îµ¡Ç½¤Ë¤è¤Ã¤Æ¥Þ¥¦¥¹¤Çɽ¼¨°ÌÃÖ¤ò·è¤á¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤¤È¤¤¤¦¤³¤È¤¬¤¢¤ë¤¿¤á¡¢ÅԹ礬°­¤¤¤È´¶¤¸¤ë¤È¤­¤â¤¢¤ê¤Þ¤¹¡£

¥ê¥À¥¤¥ì¥¯¥È̵¸ú°À­¤Ï¡¢¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤ò¥¹¥ë¡¼¤·¤Æ¤·¤Þ¤¦¤«¤É¤¦¤«¤ò·èÄꤷ¤Þ¤¹¡£¼¡¤Î 2 ¤Ä¤¬»ØÄê¤Ç¤­¤Þ¤¹¡£

ÃÍÀâÌÀ
False¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤¬´Ö¤ËÆþ¤ë(¥Ç¥Õ¥©¥ë¥È)
True ¥¹¥ë¡¼¤¹¤ë

¡ü ¥«¥é¡¼¥Þ¥Ã¥×

²èÌ̤ËƱ»þ¤Ëɽ¼¨¤Ç¤­¤ë¿§¿ô¤Ï¡¢¥×¥ì¡¼¥ó¤ò²¿Ëç»ý¤Ã¤Æ¤¤¤ë¤«¤Ë¤è¤Ã¤Æ·èÄꤵ¤ì¤Þ¤¹¡£Î㤨¤Ð 3 ¥×¥ì¡¼¥ó¤·¤«Ìµ¤¤¾ì¹ç¡¢¥Ô¥¯¥»¥ëÃÍ¤Ï 2 ¤Î 3 ¾è( 8 )¸Ä¤Þ¤Ç¤·¤«¤Ê¤¤¤Î¤Ç¡¢¥«¥é¡¼¥Þ¥Ã¥×Ãæ¤Ë¤ÏºÇÂç 8 ¿§¤Þ¤Ç¤·¤«ÅÐÏ¿¤Ç¤­¤Þ¤»¤ó¡£¤½¤Î¤¿¤áƱ»þ¤Ëɽ¼¨¤Ç¤­¤ë¿§¤Ï 8 ¿§ ¤Þ¤Ç¤È¤Ê¤ê¤Þ¤¹¡£

X ¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ç¤Ï¥¦¥£¥ó¥É¥¦¤´¤È¤ËÊÌ¡¹¤Î¥«¥é¡¼¥Þ¥Ã¥×¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤Ç¡¢1 ¤Ä¤Î¥¦¥£¥ó¥É¥¦¤Ç¤ÏƱ»þ¤Ë 8 ¿§¤·¤«É½¼¨¤Ç¤­¤Ê¤¤¤¬Ê̤Υ¦¥£¥ó¥É¥¦¤Ç¤Ï¾¤Î 8 ¿§¤òɽ¼¨¤Ç¤­¤ë¤È¤¤¤¦»ÅÁȤߤò¼Â¸½¤·¤Æ¤¤¤Þ¤¹¡£

Æȼ«¤Î¥«¥é¡¼¥Þ¥Ã¥×¤ò»ØÄꤹ¤ë¤¿¤á¤Î°À­¤¬ colormap ¤Ç¤¹¡£¼¡¤Î2¤Ä¤¬»ØÄê²Äǽ¤Ç¤¹¡£

ÃÍÀâÌÀ
CopyFromParent¿Æ¤ÈƱ¤¸¥«¥é¡¼¥Þ¥Ã¥×¤ò»ÈÍÑ(¥Ç¥Õ¥©¥ë¥È)
¥«¥é¡¼¥Þ¥Ã¥×ID»ØÄꤷ¤¿¥«¥é¡¼¥Þ¥Ã¥×¤ò»ÈÍÑ

¥«¥é¡¼¥Þ¥Ã¥× ID ¤ò»ØÄꤹ¤ë¾ì¹ç¤Ï¡¢Æȼ«¤ËÀ¸À®¤·¤¿¥«¥é¡¼¥Þ¥Ã¥×¤òÀßÄꤹ¤ë¤Î¤¬ÉáÄ̤Ǥ¹¡£¥«¥é¡¼¥Þ¥Ã¥×¤Î°·¤¤¤Ë¤Ä¤¤¤Æ¤Ï¡¢º£¸å¤Î LECTURE ¤Ç¼è¤êµó¤²¤¿¤¤¤È»×¤¤¤Þ¤¹¡£

¡ü ¥Þ¥¦¥¹¥«¡¼¥½¥ë( cursor )

¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤¹¤ë¥Þ¥¦¥¹¥«¡¼¥½¥ë¤ò»ØÄꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¿Æ¥¦¥£¥ó¥É¥¦¤ÈƱ¤¸¥Þ¥¦¥¹¥«¡¼¥½¥ë¤¬»ÈÍѤµ¤ì¤Þ¤¹¡£¥¦¥£¥ó¥É¥¦¤Ë¥«¡¼¥½¥ë¤òÀßÄꤹ¤ë¤Ë¤Ï XDefineCursor() ¤ò»È¤¤¤Þ¤¹¡£¤Þ¤¿¡¢¸µ¤ËÌ᤹¤Ë¤Ï XUndefineCursor() ¤ò»È¤¤¤Þ¤¹( LECTURE 9 ¤ÇÀâÌÀºÑ )¡£

XDefineCursor( display, w, cursor );
XUndefineCursor( display, w );

XDefineCursor() ¤Ë¤Ïɽ¼¨¤·¤¿¤¤¥Þ¥¦¥¹¥«¡¼¥½¥ë¤Î¥ê¥½¡¼¥¹ ID ¤ò»ØÄꤷ¤Þ¤¹¡£X ¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ç¤Ï¡¢¤è¤¯»È¤¦¥Þ¥¦¥¹¥«¡¼¥½¥ë¤¬¥Õ¥©¥ó¥È¤È¤·¤ÆÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹(¥Õ¥©¥ó¥È¥«¡¼¥½¥ë)¤Î¤Ç¡¢¤³¤ì¤ò»È¤¦¤È´Êñ¤Ë¥Þ¥¦¥¹¥«¡¼¥½¥ë¤Îɽ¼¨¤òÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Õ¥©¥ó¥È¥«¡¼¥½¥ë¤Î»È¤¤Êý¤Ë¤Ä¤¤¤Æ¤Ï¡¢LECTURE 9 ¤ÇÀâÌÀ¤·¤Æ¤¤¤ë¤Î¤Ç¡¢»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

¡û ¥¦¥£¥ó¥É¥¦¤Î°À­¤ÎÀßÄê

º£¤Þ¤Ç¤Î LECTURE ¤Ç¤Ï¡¢XCreateSimpleWindow() ¤ò»È¤Ã¤Æ¥¦¥£¥ó¥É¥¦¤òºîÀ®¤·¤Æ¤­¤Þ¤·¤¿¡£¤³¤Î´Ø¿ô¤Ç¤Ï¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥«¥é¡¼¤È¥Ü¡¼¥À¤Î¿§°Ê³°¤Î°À­¤Ë¤Ä¤¤¤Æ¤Ï¡¢¿Æ¥¦¥£¥ó¥É¥¦¤Î»ý¤Ä°À­¤ÈƱ¤¸Ãͤò»ý¤Ã¤¿¥¦¥£¥ó¥É¥¦¤¬ºî¤é¤ì¤Þ¤¹¡£

¤³¤ì¤ËÂФ·¤Æ¡¢¥¦¥£¥ó¥É¥¦À¸À®»þ¤Ë¤¹¤Ù¤Æ¤Î¥¦¥£¥ó¥É¥¦¤Î°À­¤ò»ØÄê¤Ç¤­¤ë¥¦¥£¥ó¥É¥¦À¸À®´Ø¿ô XCreateWindow() ¤¬¤¢¤ê¤Þ¤¹¡£

Window XCreateWindow( Display*              display, 
                      Window                parent, 
                      int                   x, 
                      int                   y, 
                      unsigned int          width, 
                      unsigned int          height,
                      unsigned int          border_width, 
                      int                   depth, 
                      unsigned int          class, 
                      Visual*               visual, 
                      unsigned long         valuemask, 
                      XSetWindowAttributes* attributes 
                    );

parent     : ¿Æ¥¦¥£¥ó¥É¥¦
x, y       : ¿Æ¥¦¥£¥ó¥É¥¦Æâ¤Ç¤ÎºÂɸ 
width, height, border_width
           : Éý¡¢¹â¤µ¡¢¥Ü¡¼¥À¤ÎÉý 
depth      : ¥¦¥£¥ó¥É¥¦¤Î¿¼¤µ 
class      : ¥¯¥é¥¹(ÆþÎÏÀìÍÑ¡¢Æþ½ÐÎÏÍÑ)
visual     : ¥Ó¥¸¥å¥¢¥ë(CopyFromParent)
valuemask  : »ØÄꤹ¤ë°À­¤Î¥Þ¥¹¥¯
attributes : °À­ÃÍ 

¥¦¥£¥ó¥É¥¦¤ËÀßÄꤹ¤ë°À­¤Ï valuemask ¤È attributes ¤Ç»ØÄꤷ¤Þ¤¹¡£valuemask ¤Ë¤Ï attributes ¤Î¤É¤Î¥á¥ó¥Ð¤ËÃͤòÀßÄꤷ¤¿¤«¤ò¡¢¥á¥ó¥Ð¤ËÂбþ¤¹¤ë¥Þ¥¹¥¯¤òÏÀÍýϤÇÀßÄꤷ¤Þ¤¹¡£valuemask ¤Ë 0 ¤ò»ØÄꤹ¤ë¤È¥Ç¥Õ¥©¥ë¥È¤Î°À­¤ò»ý¤Ã¤¿¥¦¥£¥ó¥É¥¦¤¬ºî¤é¤ì¤Þ¤¹¡£

¥¦¥£¥ó¥É¥¦¤Î¥Ç¥Õ¥©¥ë¥È¤Î°À­ÃÍ¤È valuemask ¤Ç»ØÄꤹ¤ë¥Þ¥¹¥¯¤ÎÂбþɽ¤ò°Ê²¼¤Ë¼¨¤·¤Þ¤¹¡£

¥á¥ó¥Ð ¥Ç¥Õ¥©¥ë¥ÈÃÍ ¥Þ¥¹¥¯
background_pixmap None CWBackPixmap
background_pixel ̤ÄêµÁ CWBackPixel
border_pixmap CopyFromParent CWBorderPixmap
border_pixel ̤ÄêµÁ CWBorderPixel
bit_gravity ForgetGravity CWBitGravity
win_gravity NorthWestGravityCWWinGravity
backing_store NotUseful CWBackingStore
backing_planes Á´¤Æ1 CWBackingPlanes
backing_pixel 0 CWBackingPixel
save_under False CWSaveUnder
event_mask 0 CWEventMask
do_not_propagate_mask0 CWDontPropagate
override_redirect False CWOverrideRedirect
colormap CopyFromParent CWColormap
cursor None CWCursor

»Ä¤ê¤Î°ú¿ô¤Ç¤¢¤ë¥¦¥£¥ó¥É¥¦¤Î¿¼¤µ¡¢¥¯¥é¥¹¡¢¥Ó¥¸¥å¥¢¥ë¤ÎÀßÄê¤Ï²¼É½¤Ë½¾¤¤¤Þ¤¹¡£

¹àÌÜ̾ÀâÌÀ
¥¯¥é¥¹ InputOnly (ÆþÎÏÀìÍÑ)¤« InputOutput (Æþ½ÐÎÏÍÑ)¤« CopyFromParent (¿Æ¤ÈƱ¤¸¥¯¥é¥¹)¤ò»ØÄꤹ¤ë¡£InputOnly ¤Î¾ì¹ç¡¢ ²¼¤Î¿¼¤µ¤ò 0 ¤Ë¤·¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤(¿Æ¥¦¥£¥ó¥É¥¦¤ÈƱ¤¸)¡£
¥¦¥£¥ó¥É¥¦¤Î¿¼¤µ InputOutput ¤Þ¤¿¤Ï CopyFromParent ¥¯¥é¥¹¤Î¥¦¥£¥ó¥É¥¦¤ËÂФ·¤Æ¿¼¤µ¤ò 0 ¤È¤¹¤ë¤È¿Æ¥¦¥£¥ó¥É¥¦¤ÈƱ¤¸¿¼¤µ¤Ë¤Ê¤ë¡£
¥Ó¥¸¥å¥¢¥ë ¥Ô¥¯¥»¥ëÃͤò²èÌ̾å¤Ëɽ¼¨¤¹¤ë¿§¤Ë¤É¤Î¤è¤¦¤ËÊÑ´¹¤¹¤ë¤«¤ò»ØÄꤹ¤ë (¥Ó¥¸¥å¥¢¥ë¤Ë¤Ä¤¤¤Æ¤ÏLECTURE 2 ¤ò»²¾È)¡£Ä̾ï CopyFromParent ¤ò»ØÄꤹ¤ë¡£

¾å¤Î3¤Ä¤Ï¥¦¥£¥ó¥É¥¦¤ÎÆÃÀ­¤È¸Æ¤Ð¤ì¡¢¥¦¥£¥ó¥É¥¦À¸À®»þ¤Ë¤Î¤ßÀßÄê¤Ç¤­¤Þ¤¹(À¸À®¸å¤ÎÊѹ¹¤Ï¤Ç¤­¤Þ¤»¤ó)¡£

¡û ¥¦¥£¥ó¥É¥¦¤Î°À­¤ÎÊѹ¹

¥¦¥£¥ó¥É¥¦À¸À®¸å¤Ë¥¦¥£¥ó¥É¥¦¤Î°À­ÃͤòÊѹ¹¤¹¤ë¤Ë¤Ï¡¢XSetWindowBackground() ¤Î¤è¤¦¤Ê°À­¤´¤È¤ËÍÑ°Õ¤µ¤ì¤¿ÀßÄêÍÑ´Ø¿ô¤Î¾¤Ë¡¢XChangeWindowAttributes() ¤ò»È¤¤¤Þ¤¹¡£

XChangeWindowAttributes( Display*              display,
                         Window                w, 
                         unsigned long         valuemask, 
                         XSetWindowAttributes* attributes 
                       );

valuemask  : »ØÄꤹ¤ë°À­¤Î¥Þ¥¹¥¯
attributes : °À­ÃÍ

valuemask ¤Ç»ØÄꤷ¤¿Â°À­¤¬ attributes ¤Ç»ØÄꤷ¤¿Â°À­ÃͤËÊѹ¹¤µ¤ì¤Þ¤¹( XCreateWindow() ¤Î°ú¿ô¤ÈƱ¤¸)¡£

¡û ¥¦¥£¥ó¥É¥¦¤Î°À­¤Î¼èÆÀ

¸½ºß¥¦¥£¥ó¥É¥¦¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë°À­¤ò¼èÆÀ¤¹¤ë¤Ë¤Ï¡¢XGetWindowAttributes() ¤ò»È¤¤¤Þ¤¹¡£

Status XGetWindowAttributes( Display*           display, 
                             Window             w, 
                             XWindowAttributes* attributes 
                           );

attributes : ¼èÆÀ¤·¤¿¥¦¥£¥ó¥É¥¦¤Î°À­¾ðÊ󤬳ÊǼ¤µ¤ì¤ë

°À­¾ðÊó¤Î¼èÆÀ¤ËÀ®¸ù¤¹¤ë¤È 0 °Ê³°¤ÎÃͤò¡¢¼ºÇÔ¤¹¤ë¤È 0 ¤òÊÖ¤·¤Þ¤¹¡£À®¸ù¤·¤¿¾ì¹ç¡¢XWindowAttributes ·¿¹½Â¤ÂΤǤ¢¤ë attributes ¤Ë»ØÄꤷ¤¿¥¦¥£¥ó¥É¥¦¤Ë¸½ºßÀßÄꤵ¤ì¤Æ¤¤¤ë°À­¤¬³ÊǼ¤µ¤ì¤Þ¤¹¡£XWindowAttributes ·¿¹½Â¤ÂΤϼ¡¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

typedef struct
{
  int           x, y;                  /* ¥¦¥£¥ó¥É¥¦¤Î°ÌÃÖ */
  int           width, height;         /* Éý¡¢¹â¤µ */
  int           border_width;          /* ¥Ü¡¼¥À¤ÎÉý */
  int           depth;                 /* ¥¦¥£¥ó¥É¥¦¤Î¿¼¤µ */
  Visual*       visual;                /* ¥Ó¥¸¥å¥¢¥ë¹½Â¤ÂÎ */
  Window        root;                  /* ¥¹¥¯¥ê¡¼¥ó¤Î¥ë¡¼¥È¥¦¥£¥ó¥É¥¦ */
  int           class;                 /* ¥¯¥é¥¹(ÆþÎÏÀìÍÑ¡¢Æþ½ÐÎÏÍÑ) */
  int           bit_gravity;           /* ¥ê¥µ¥¤¥º»þ¤ÎÉÁ²èÆâÍƤΰ·¤¤ */
  int           win_gravity;           /* ¥ê¥µ¥¤¥º»þ¤Î»Ò¥¦¥£¥ó¥É¥¦¤Î°·¤¤ */
  int           backing_store;         /* ¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢ */
  unsigned long backing_planes;        /* ¥Ð¥Ã¥­¥ó¥°¥×¥ì¡¼¥ó */
  unsigned long backing_pixels;        /* ¥Ð¥Ã¥­¥ó¥°¥Ô¥¯¥»¥ë */
  Bool          save_under;            /* ¥»¡¼¥Ö¥¢¥ó¥À¡¼ */
  Colormap      colormap;              /* ¥«¥é¡¼¥Þ¥Ã¥× */
  Bool          map_installed;         /* ¸½ºß¥«¥é¡¼¥Þ¥Ã¥×¤Ï¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤« */
  int           map_state;             /* IsUnmapped¡¢IsUnviewable¡¢IsViewable */
  long          all_event_masks;       /* ¥¯¥é¥¤¥¢¥ó¥ÈÁ´¤Æ¤¬¸«¤Æ¤¤¤ë¥¤¥Ù¥ó¥È¥Þ¥¹¥¯ */
  long          your_event_mask;       /* ¼«Ê¬¤Î¥¤¥Ù¥ó¥È¥Þ¥¹¥¯ */
  long          do_not_propagate_mask; /* ÈóÅÁÇÅ¥¤¥Ù¥ó¥È¤Î½¸¹ç */
  Bool          override_redirect;     /* ¥ê¥À¥¤¥ì¥¯¥È̵¸ú°À­ */
  Screen*       screen;                /* ¥¹¥¯¥ê¡¼¥ó¤Ø¤Î¥Ý¥¤¥ó¥¿ */
} XWindowAttributes;

ÄêµÁ¤ò¸«¤ì¤Ðʬ¤«¤ê¤Þ¤¹¤¬¡¢XGetWindowAttributes() ¤ò»È¤¦¤È¥¸¥ª¥á¥È¥ê¾ðÊó¤âÊ»¤»¤Æ¼èÆÀ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£