Xlib Programming Lectures

Á°¤Î¥Ú¡¼¥¸¤Ø ¼¡¤Î¥Ú¡¼¥¸¤Ø

¡û ¤Ï¤¸¤á¤Ë

ËÜʸ½ñ¤Ç¤Ï¡¢Unix ¤ÎÂåɽŪ ¤Ê GUI ´Ä¶­¤Ç¤¢¤ë X Window System ¾å¤Ë¤ª¤¤¤Æ¡¢ºÇ¤âÄã¥ì¥Ù¥ë¤Ê API ¤Ç¤¢¤ë Xlib ¤ò»ÈÍѤ·¤¿ GUI ¥×¥í¥°¥é¥ß¥ó¥°¤Ë¤Ä¤¤¤Æ²òÀ⤷¤Æ¤¤¤­¤Þ¤¹¡£

2002 ǯ 1 ·î 18 Æü¸½ºß¡¢À¤´Ö¤Î X Window ¥Ç¥¹¥¯¥È¥Ã¥×´Ä¶­¤Ï GNOME ¤ä KDE ¤¬Ã濴Ū¸ºß¤È¤Ê¤Ã¤Æ¤­¤Æ¤ª¤ê¡¢GUI ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òºîÀ®¤¹¤ëºÝ¤Ë¤Ï GTK+ ¤ä Qt ¤Î¤è¤¦¤Ê¹âµ¡Ç½¤Ê¥Ä¡¼¥ë¥­¥Ã¥È¤ò»È¤¦¤Î¤¬°ìÈÌŪ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

¤½¤Î¤è¤¦¤ËÀ¤´Ö°ìÈ̤ε»½Ñ¤¬¹âµ¡Ç½²½¤·¤Æ¤¤¤¯¤Ë¤Ä¤ì¤Æ¡¢²¿¸Î¤«¼«Ê¬¤Ï¤½¤Î¼Â¸½ÊýË¡¤ÎÊý¤¬µ¤¤Ë¤Ê¤Ã¤Æ»ÅÊý¤¢¤ê¤Þ¤»¤ó¡£

GNOME ¤ä KDE ¤È¤¤¤Ã¤¿²Ú¡¹¤·¤¤¥Ç¥¹¥¯¥È¥Ã¥×¤ò¹½ÃÛ¤¹¤ë¤Î¤Ë°ìÌòÇã¤Ã¤Æ¤¤¤ë GTK+ ¤ä Qt ¤Î¤è¤¦¤Ê GUI ¥Ä¡¼¥ë¥­¥Ã¥È¤Îº¬Ëܵ»½Ñ¤Ï¡¢X Window ´Ä¶­¤Ë¤ª¤±¤ëºÇ¤âÄã¥ì¥Ù¥ë¤Ê API ¥é¥¤¥Ö¥é¥ê¤Ç¤¢¤ë Xlib ¤ò»È¤Ã¤¿¥×¥í¥°¥é¥ß¥ó¥°¤Ë¾¤Ê¤ê¤Þ¤»¤ó¡£Xlib ¥×¥í¥°¥é¥ß¥ó¥°¤Ë¤Ä¤¤¤Æ²òÀ⤷¤¿ Web ¥µ¥¤¥È¤Ï¸Å¤¯¤«¤é´û¤Ë¤¤¤¯¤Ä¤â¸ºß¤·¤Þ¤¹¤¬¡¢º£²ó¤­¤Á¤ó¤È Xlib ¤ò³Ø¤Ö¤ËºÝ¤·¼«Ê¬¤ÎÊÙ¶¯·ë²Ì / ¥á¥â¤ò»Ä¤¹¤È¸À¤¦°ÕÌ£¤â´Þ¤á¤ÆËÜ¥µ¥¤¥È¤Ë¤Þ¤È¤á¤Þ¤·¤¿¡£

¤Ê¤ë¤Ù¤¯ Xlib ¥×¥í¥°¥é¥ß¥ó¥°Á´È̤òÌÖÍ夷¤¿¤¤¤È»×¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¢º£¸å¤â¤Á¤é¤Û¤é¤È Topics ¤òÄɲ䷤Ƥ¤¤Ã¤¿¤ê¤¹¤ë¤³¤È¤â¤¢¤ë¤È»×¤¤¤Þ¤¹¡£³§¤µ¤ó¤¬¤Á¤ç¤Ã¤È Xlib ¤Ë¤Ä¤¤¤ÆÄ´¤Ù¤¿¤¤¤Ê¤È»×¤Ã¤¿ºÝ¤Î»²¹Í¤Ë¤Ê¤ì¤Ð´ò¤·¤¤¤Ç¤¹¡£

ËÜʸ½ñ¤Ø¤Î¥ê¥ó¥¯¤Ï¸æ¼«Í³¤Ë¤É¤¦¤¾¡£ËÜ¥µ¥¤¥ÈÆâ¤Îʸ¾Ï¤Ë´Ø¤·¤Æ²¿¤«¤´°Õ¸«¤Ê¤É¤¬¤¢¤ê¤Þ¤·¤¿¤é¡¢¥Ú¡¼¥¸ºÇ²¼Éô¤Ë¤¢¤ë¥¢¥É¥ì¥¹¤Þ¤Ç¡¢¤¢¤ë¤¤¤Ï¤³¤³¤«¤é¤ª´ê¤¤¤·¤Þ¤¹¡£¤Ê¤ª¡¢ËÜʸ½ñ¤Ë¤ª¤¤¤Æ»ÈÍѤ·¤Æ¤¤¤ë¥µ¥ó¥×¥ë¥³¡¼¥É¤ò tar ·Á¼°¤Ç°µ½Ì¤·¤¿¤â¤Î¤òsrc.tar.gz¤È¤·¤ÆÃÖ¤¤¤Æ¤Þ¤¹¡£Å¸³«¤·¤ÆÆÀ¤é¤ì¤ë³Æ¥½¡¼¥¹¥³¡¼¥É¤Ï EUC ¤Ç½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¡£³Æ¥Õ¥¡¥¤¥ë̾¤Ë¤Ï¤½¤Î¥³¡¼¥É¤ò»ÈÍѤ·¤¿ Lecture ¤ÎÈֹ椬Éղ䵤ì¤Æ¤¤¤Þ¤¹¡£¤³¤Î¥½¡¼¥¹¥³¡¼¥É¤Î»ÈÍѤ˴ؤ·¤Æ¤Ï¡¢ÌÈÀÕ»ö¹à¤Îµ­½Ò¤òλ¾µ¤·¤Æ¤¤¤¿¤À¤±¤ì¤Ð¼«Í³¤Ë»È¤Ã¤Æ¤¤¤¿¤À¤¤¤Æ¹½¤¤¤Þ¤»¤ó¡£

¤Þ¤¿¡¢¥½¡¼¥¹¥³¡¼¥É¤ò´Þ¤á¤¿Ê¸½ñÁ´ÂΤΥ¢¡¼¥«¥¤¥Ö( tar ·Á¼° )¤ò xlib_doc.tar.gz¤È¤·¤ÆÃÖ¤¤¤Æ¤Þ¤¹¡£¤³¤Á¤é¤â EUC ¤Ç½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¡£

¡û Á°Äé´Ä¶­

¼«Ê¬¤¬´ðËÜŪ¤Ë Linux® ¥æ¡¼¥¶¤Ç¤¹¤Î¤Ç¡¢Linux ¾å¤Ç gcc ¤ò»È¤Ã¤¿¥×¥í¥°¥é¥ß¥ó¥°¤òÁ°Äé¤È¤·¤Þ¤¹¡£

¤È¤Ï¤¤¤Ã¤Æ¤â¡¢Xlib ¤ÏÊÌ¤Ë Linux Only ¤Ê¤ï¤±¤Ç¤Ï¤Ê¤¤¤··ÇºÜ¤·¤Æ¤¤¤ë¥µ¥ó¥×¥ë¥³¡¼¥É¤âÊ̤˵¡¼ï°Í¸¤Ê¤³¤È¤Ï¤ä¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢¤É¤Î´Ä¶­¤Ç¤â¥³¥ó¥Ñ¥¤¥ë¤ª¤è¤Ó¼Â¹Ô¤Ï²Äǽ¤À¤È»×¤¤¤Þ¤¹¡£

Linux ¤Ç¤Ï´ðËÜŪ¤Ë

gcc -L/usr/X11R6/lib -o <target> <target source name> -lX11

¤Ç¥³¥ó¥Ñ¥¤¥ë¤ÏÄ̤ë¤È»×¤¤¤Þ¤¹¡£¥é¥¤¥Ö¥é¥ê¥Ñ¥¹¤ä¥ê¥ó¥¯¥â¥¸¥å¡¼¥ë¤Î»ØÄê¤Ï´Ä¶­¤Ë±þ¤¸¤Æ½¤Àµ¤·¤Æ¤¯¤À¤µ¤¤¡£

¡û ÌÈÀÕ»ö¹à

ËÜ¥µ¥¤¥È¤Ç¸ø³«¤·¤Æ¤¤¤ëÆâÍƤˤĤ¤¤Æ¤Ï²Äǽ¤Ê¸Â¤êÀµ³Î¤ò´ü¤¹¤ëÍͤ˿´³Ý¤±¤Æ¤¤¤Þ¤¹¤¬¡¢Ãø¼Ô¤ÎÃμ±ÉÔ­¤«¤éµ»½ÑŪ¤Ê¸í¤ê¤â¤·¤¯¤ÏÉÔŬÀÚ¤Êɽ¸½¤ä¸í¿¢¤ò´Þ¤à²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤é¤ÎÆâÍƤò»ÈÍѤ¹¤ë¤³¤È¤Ë¤è¤Ã¤ÆÀ¸¤¸¤ë²ÄǽÀ­¤Î¤¢¤ë¤¤¤«¤Ê¤ëÈï³²/»³²¤ËÂФ·¤Æ¡¢Ãø¼Ô¤Ï°ìÀÚ¤ÎÀÕǤ¤òÉ館¤Þ¤»¤ó¡£¤è¤Ã¤Æ¡¢¤´ÍøÍѤˤʤé¤ì¤ëºÝ¤Ï¤ß¤Ê¤µ¤ó³Æ¼«¤ÎÀÕǤ¤ÇÆâÍƳÎǧ/Æ°ºî³Îǧ¤ò¹Ô¤Ã¤Æ²¼¤µ¤¤¡£

¡û ¾¦É¸

  • Linux ¤Ï Linus Torvalds »á¤ÎÆüËܵڤӤ½¤Î¾¤Î¹ñ¤Ë¤ª¤±¤ëÅÐÏ¿¾¦É¸¤Þ¤¿¤Ï¾¦É¸¤Ç¤¹¡£
  • UNIX ¤Ï The Open Group ¤ÎÊƹñµÚ¤Ó¤½¤Î¾¤Î¹ñ¤Ë¤ª¤±¤ëÅÐÏ¿¾¦É¸¤Ç¤¹¡£
  • ¤½¤Î¾¡¢ËÜ¥µ¥¤¥È¤Îʸ½ñÃæ¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤ë²ñ¼Ò̾¤äÀ½ÉÊ̾¤Ï¡¢°ìÈ̤˳ƼҤξ¦É¸¤Þ¤¿¤ÏÅÐÏ¿¾¦É¸¤Ç¤¹¡£
  • ¤Ê¤ª¡¢ËÜ¥µ¥¤¥È¤Îʸ½ñÃæ¤Ç¤Ï´ðËÜŪ¤Ë TM ¤ª¤è¤Ó R ¥Þ¡¼¥¯¤òÌÀµ­¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¸¢Íø¤ò¿¯³²¤¹¤ë°Õ»×¤äÌÜŪÅù¤Ï°ìÀÚ¤¢¤ê¤Þ¤»¤ó¡£

¡û »²¹Í¾ðÊó(ʸ¸¥¡¢¥ê¥ó¥¯)

Á°¤Î¥Ú¡¼¥¸¤Ø ¼¡¤Î¥Ú¡¼¥¸¤Ø