haiku-website/static/legacy-docs/ArtOfBeOSProgramming/index.html

325 lines
19 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="Ja">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Art of BeOS Programming</title>
<link href="css/format.css" rel="stylesheet" type="text/css">
<link href="css/layout.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="pagewidth">
<div id="main">
<h1>公開にあたって</h1>
<p>
8月も下旬に差し掛かった空の雲。その下の青い水面。東海道新幹線の車窓から、浜名湖を眺めています。
</p>
<p>
もう年も前に書いた本の内容を、Webで公開して欲しいというリクエストを頂いたのは、とても嬉しいことでした。あの当時、メーリングリストで議論や情報交換を行い、知見を交わした人達の一部と、今、仕事で繋がりを持つ機会に恵まれていることに、素敵な縁を感じます。
</p>
<p>
今回、<a href="http://www.digintrans.com/ ">Jorge G. Mare (a.k.a "Koki")</a> さんからリクエストを頂くことになったのも、何かしらの縁があるのかも知れません。一度も顔を合わせたことがなく、メールでのやり取りのみですが、誠実な人柄は、メールの文章から伺えます。
</p>
<p>
この原稿内容のWeb公開にあたり、出版元のソフトバンクパブリッシングに公開可能か問い合わせを行ったところ、問題ない旨の御快諾を頂きました。有難うございます。
</p>
<p>
この本の執筆当時、Be社に在籍し、BeOSを作り上げていたエンジニア達は、その後も、それぞれに活躍を続けていることでしょう。BeFSの開発を行ったドミニクは、現在はApple社で"Spotlight"の開発チームにいるそうですし、BeBoxのハードウェア・エンジニアだったジョゼフ・パルマーは、"HipTop"という携帯端末の開発に関わったと聞いています。また、BeOSというOSの風味は、<a href="http://haiku-os.org/">"HAIKU"</a>と名づけられたオープンソース実装のOSに受け継がれているようです。
</p>
<p>
そして、BeOSの「消費者」だった僕や、メーリングリストの話題を賑わせながら、国内有志が主体となって開催した、日本国内の開発者向けカンファレンスで素敵なデモを披露した、単なる消費者ではない、先駆的な開発者だった人達も、自らを成長させ続けています。願わくば、この原稿内容が、自分で「ものを作る」楽しみを知る人達にとって、ほんの少しでも役に立てることがあれば、それに勝る喜びは、ありません。Let's enjoy it:-)
</p>
<p style="text-align: right">
2006/08/16
品川から京都へ向かう新幹線の車中にて<br/>
古賀信哉 (株)サムシングプレシャス
</p>
<h1>ライセンス/サポート</h1>
<p>
<a href="http://www.opensource.org/licenses/bsd-license.php">修正版 BSDライセンス (The Modified BSD License)</a>
<ul>
<li>改変可能</li>
<li>再利用の際は著作権表示を遵守</li>
<li>"as is" ベースで無保証、免責とさせていただきます</li>
</ul>
を満たす限り、無償でご利用できます。
</p>
<p>&gt;&gt;&nbsp;&nbsp;<a href="./license.txt">ライセンス表示</a></p>
<p>サポート、サンプルコードについては書籍化時のサポートページを参照下さい。</p>
<p>&gt;&gt;&nbsp;&nbsp;<a href="http://www.rr.iij4u.or.jp/~shkoga/beos/beos_programming/index.html">"Art of BeOS Programming"のサポートページ</a></p>
<p><br/></p>
<h1><a href="./chapter/">目次</a></h1>
<span id="idt1"><a href="./chapter/chapter00.html#0">第0章 はじめに</a></span><br/>
<span id="idt1"><a href="./chapter/chapter01.html#1">第1章 BeOSとは何か</a></span><br/>
<span id="idt2"><a href="./chapter/chapter01.html#1.1">
1.1&nbsp;&nbsp;これまでの経緯</a></span><br/>
<span id="idt2"><a href="./chapter/chapter01.html#1.2">
1.2&nbsp;&nbsp;大まかな特徴</a></span><br/>
<span id="idt2"><a href="./chapter/chapter01.html#1.3">
1.3&nbsp;&nbsp;サポート機種</a></span><br/>
<span id="idt2"><a href="./chapter/chapter01.html#1.4">
1.4&nbsp;&nbsp;BeOSの入手方法</a></span><br/>
<span id="idt2"><a href="./chapter/chapter01.html#1.5">
1.5&nbsp;&nbsp;インストール手順</a></span><br/>
<span id="idt2"><a href="./chapter/chapter01.html#1.6">
1.6&nbsp;&nbsp;日本語フォントについて</a></span><br/>
<span id="idt1"><a href="./chapter/chapter02.html#2">第2章 BeOSのアーキテクチャとAPI</a></span><br/>
<span id="idt2"><a href="./chapter/chapter02.html#2.1">
2.1&nbsp;&nbsp;内部構造の概観</a></span><br/>
<span id="idt2"><a href="./chapter/chapter02.html#2.2">
2.2&nbsp;&nbsp;BeOSのシステム構成</a></span><br/>
<span id="idt2"><a href="./chapter/chapter02.html#2.3">
2.3&nbsp;&nbsp;サーバモジュール</a></span><br/>
<span id="idt2"><a href="./chapter/chapter02.html#2.4">
2.4&nbsp;&nbsp;デバイスドライバ</a></span><br/>
<span id="idt2"><a href="./chapter/chapter02.html#2.5">
2.5&nbsp;&nbsp;三種類の実行形式</a></span><br/>
<span id="idt2"><a href="./chapter/chapter02.html#2.6">
2.6&nbsp;&nbsp;APIの概観</a></span><br/>
<span id="idt1"><a href="./chapter/chapter03.html#3">第3章 アプリケーション内部の仕組み</a></span><br/>
<span id="idt2"><a href="./chapter/chapter03.html#3.1">
3.1&nbsp;&nbsp;BeOSのアプリケーション</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.1.1">
3.1.1&nbsp;&nbsp;一般的な外観</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.1.2">
3.1.2&nbsp;&nbsp;ファイルのオープンとセーブ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.1.3">
3.1.3&nbsp;&nbsp;初期設定ファイル</a></span><br/>
<span id="idt2"><a href="./chapter/chapter03.html#3.2">
3.2&nbsp;&nbsp;アプリケーションの内部動作</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.2.1">
3.2.1&nbsp;&nbsp;アプリケーションの実行</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.2.2">
3.2.2&nbsp;&nbsp;入力イベントの通知</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.2.3">
3.2.3&nbsp;&nbsp;他のOSとの比較</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.2.4">
3.2.4&nbsp;&nbsp;BLooperとメッセージループ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.2.5">
3.2.5&nbsp;&nbsp;BHandlerによるメッセージ応答</a></span><br/>
<span id="idt2"><a href="./chapter/chapter03.html#3.3">
3.3&nbsp;&nbsp;マルチスレッドによる並行処理</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.3.1">
3.3.1&nbsp;&nbsp;並行処理と共有データ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.3.2">
3.3.2&nbsp;&nbsp;スレッド間通信とメッセージ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter03.html#3.3.3">
3.3.3&nbsp;&nbsp;並行処理と非同期メッセージ</a></span><br/>
<span id="idt2"><a href="./chapter/chapter03.html#3.4">
3.4&nbsp;&nbsp;データの保存</a></span><br/>
<span id="idt2"><a href="./chapter/chapter03.html#3.5">
3.5&nbsp;&nbsp;BMessageと構造化データ</a></span><br/>
<span id="idt1"><a href="./chapter/chapter04.html#4">第4章 プログラミングを始める前に</a></span><br/>
<span id="idt2"><a href="./chapter/chapter04.html#4.1">
4.1&nbsp;&nbsp;BeOSの開発環境</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.1.1">
4.1.1&nbsp;&nbsp;開発環境とは</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.1.2">
4.1.2&nbsp;&nbsp;CodeWarrior IDE</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.1.3">
4.1.3&nbsp;&nbsp;シェル端末とmake</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.1.4">
4.1.4&nbsp;&nbsp;その他のツール</a></span><br/>
<span id="idt2"><a href="./chapter/chapter04.html#4.2">
4.2&nbsp;&nbsp;アプリケーション作成に必要なファイル</a></span><br/>
<span id="idt2"><a href="./chapter/chapter04.html#4.3">
4.3&nbsp;&nbsp;BeIDEによる開発</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.3.1">
4.3.1&nbsp;&nbsp;サンプルアプリケーション</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.3.2">
4.3.2&nbsp;&nbsp;リソースファイルの作成</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.3.3">
4.3.3&nbsp;&nbsp;プロジェクトファイルの作成とファイルの登録</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.3.4">
4.3.4&nbsp;&nbsp;プロジェクトのパラメータ設定</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.3.5">
4.3.5&nbsp;&nbsp;makeコマンドの実行</a></span><br/>
<span id="idt2"><a href="./chapter/chapter04.html#4.4">
4.4&nbsp;&nbsp;Terminalとmakeを使った開発</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.4.1">
4.4.1&nbsp;&nbsp;サンプルアプリケーション</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.4.2">
4.4.2&nbsp;&nbsp;リソースファイルの作成</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.4.3">
4.4.3&nbsp;&nbsp;Makefileの作成とファイルの登録</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.4.4">
4.4.4&nbsp;&nbsp;コンパイラとリンカに対するオプション設定</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.4.5">
4.4.5&nbsp;&nbsp;makeコマンドの実行</a></span><br/>
<span id="idt2"><a href="./chapter/chapter04.html#4.5">
4.5&nbsp;&nbsp;ソースレベルデバッガの利用</a></span><br/>
<span id="idt2"><a href="./chapter/chapter04.html#4.6">
4.6&nbsp;&nbsp;C++でのプログラミング</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.6.1">
4.6.1&nbsp;&nbsp;C++に関する参考書</a></span><br/>
<span id="idt3"><a href="./chapter/chapter04.html#4.6.2">
4.6.2&nbsp;&nbsp;本書でのプログラミング作法</a></span><br/>
<span id="idt1"><a href="./chapter/chapter05.html#5">第5章 アプリケーション最初の一歩</a></span><br/>
<span id="idt2"><a href="./chapter/chapter05.html#5.1">
5.1&nbsp;&nbsp;空っぽのアプリケーション</a></span><br/>
<span id="idt3"><a href="./chapter/chapter05.html#5.1.1">
5.1.1&nbsp;&nbsp;アプリケーションオブジェクト</a></span><br/>
<span id="idt3"><a href="./chapter/chapter05.html#5.1.2">
5.1.2&nbsp;&nbsp;ウィンドウを出さなきゃね</a></span><br/>
<span id="idt3"><a href="./chapter/chapter05.html#5.1.3">
5.1.3&nbsp;&nbsp;アプリケーションフレームワーク</a></span><br/>
<span id="idt2"><a href="./chapter/chapter05.html#5.2">
5.2&nbsp;&nbsp;ウィンドウに絵を描きたい</a></span><br/>
<span id="idt3"><a href="./chapter/chapter05.html#5.2.1">
5.2.1&nbsp;&nbsp;他人と同時にゃ描けないぜ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter05.html#5.2.2">
5.2.2&nbsp;&nbsp;消えても消えても描き直せ</a></span><br/>
<span id="idt2"><a href="./chapter/chapter05.html#5.3">
5.3&nbsp;&nbsp;まとめと練習問題</a></span><br/>
<span id="idt1"><a href="./chapter/chapter06.html#6">第6章 ボタンがなくちゃ始まらない</a></span><br/>
<span id="idt2"><a href="./chapter/chapter06.html#6.1">
6.1&nbsp;&nbsp;マウスクリックに応答せよ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter06.html#6.1.1">
6.1.1&nbsp;&nbsp;どこを押したらいいんだい</a></span><br/>
<span id="idt3"><a href="./chapter/chapter06.html#6.1.2">
6.1.2&nbsp;&nbsp;イベントとメッセージ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter06.html#6.1.3">
6.1.3&nbsp;&nbsp;メッセージプロトコル</a></span><br/>
<span id="idt2"><a href="./chapter/chapter06.html#6.2">
6.2&nbsp;&nbsp;標準部品を便利に使おう</a></span><br/>
<span id="idt3"><a href="./chapter/chapter06.html#6.2.1">
6.2.1&nbsp;&nbsp;ボタンの数を増やしたら</a></span><br/>
<span id="idt3"><a href="./chapter/chapter06.html#6.2.2">
6.2.2&nbsp;&nbsp;部品があるなら作って貼るだけ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter06.html#6.2.3">
6.2.3&nbsp;&nbsp;その他の標準ビュー部品</a></span><br/>
<span id="idt2"><a href="./chapter/chapter06.html#6.3">
6.3&nbsp;&nbsp;もっとアプリケーションらしく</a></span><br/>
<span id="idt2"><a href="./chapter/chapter06.html#6.4">
6.4&nbsp;&nbsp;まとめと練習問題</a></span><br/>
<span id="idt1"><a href="./chapter/chapter07.html#7">第7章 もっと動きを</a></span><br/>
<span id="idt2"><a href="./chapter/chapter07.html#7.1">
7.1&nbsp;&nbsp;時計じかけのアニメーション</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.1.1">
7.1.1&nbsp;&nbsp;サンプルの機能と構造</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.1.2">
7.1.2&nbsp;&nbsp;サンプルのソースコード</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.1.3">
7.1.3&nbsp;&nbsp;Pulse()のどこがいけないの</a></span><br/>
<span id="idt2"><a href="./chapter/chapter07.html#7.2">
7.2&nbsp;&nbsp;ちらつきを無くすには</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.2.1">
7.2.1&nbsp;&nbsp;改善目標</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.2.2">
7.2.2&nbsp;&nbsp;オフスクリーン描画とBBitmap</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.2.3">
7.2.3&nbsp;&nbsp;改良版ClockworkWave</a></span><br/>
<span id="idt2"><a href="./chapter/chapter07.html#7.3">
7.3&nbsp;&nbsp;マルチスレッドとメッセージ</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.3.1">
7.3.1&nbsp;&nbsp;いつになったら起こせばいいの</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.3.2">
7.3.2&nbsp;&nbsp;モーニングコールの取消し</a></span><br/>
<span id="idt3"><a href="./chapter/chapter07.html#7.3.3">
7.3.3&nbsp;&nbsp;取り込み中につきお待ち下さい</a></span><br/>
<span id="idt2"><a href="./chapter/chapter07.html#7.4">
7.4&nbsp;&nbsp;まとめと練習問題</a></span><br/>
<span id="idt1"><a href="./chapter/chapter08.html#8">第8章 伝えたいメッセージ</a></span><br/>
<span id="idt2"><a href="./chapter/chapter08.html#8.1">
8.1&nbsp;&nbsp;メッセージが届くまで</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.1.1">
8.1.1&nbsp;&nbsp;Messengerアプリケーションの機能と構造</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.1.2">
8.1.2&nbsp;&nbsp;Messengerアプリケーションのソースコード</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.1.3">
8.1.3&nbsp;&nbsp;他のチームに届けるときは</a></span><br/>
<span id="idt2"><a href="./chapter/chapter08.html#8.2">
8.2&nbsp;&nbsp;伝える相手を探すには</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.2.1">
8.2.1&nbsp;&nbsp;誰に何を伝えるの</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.2.2">
8.2.2&nbsp;&nbsp;スクリプティングの基本要素</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.2.3">
8.2.3&nbsp;&nbsp;スクリプティング・フレームワーク</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.2.4">
8.2.4&nbsp;&nbsp;汎用スイートと遠隔オブジェクト</a></span><br/>
<span id="idt2"><a href="./chapter/chapter08.html#8.3">
8.3&nbsp;&nbsp;メッセージばかりじゃ物足りない</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.3.1">
8.3.1&nbsp;&nbsp;Scriptorアプリケーションの機能と構造</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.3.2">
8.3.2&nbsp;&nbsp;Scriptorアプリケーションのソースコード</a></span><br/>
<span id="idt3"><a href="./chapter/chapter08.html#8.3.3">
8.3.3&nbsp;&nbsp;スクリプトを書いて動かすには</a></span><br/>
<span id="idt2"><a href="./chapter/chapter08.html#8.4">
8.4&nbsp;&nbsp;まとめと練習問題</a></span><br/>
<span id="idt1"><a href="./chapter/chapter09.html#9">第9章 ファイルを操ろう</a></span><br/>
<span id="idt2"><a href="./chapter/chapter09.html#9.1">
9.1&nbsp;&nbsp;ファイルを探す</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.1.1">
9.1.1&nbsp;&nbsp;BeFSのファイル検索機能</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.1.2">
9.1.2&nbsp;&nbsp;FileSearchが利用するAPI</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.1.3">
9.1.3&nbsp;&nbsp;FileSearchの外部仕様</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.1.4">
9.1.4&nbsp;&nbsp;FileSearchのモジュール構成</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.1.5">
9.1.5&nbsp;&nbsp;FileSearchのソースコード</a></span><br/>
<span id="idt2"><a href="./chapter/chapter09.html#9.2">
9.2&nbsp;&nbsp;名前と体と付属物</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.2.1">
9.2.1&nbsp;&nbsp;ファイルに関する三通りの情報</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.2.2">
9.2.2&nbsp;&nbsp;ファイルシステムとデータベース</a></span><br/>
<span id="idt2"><a href="./chapter/chapter09.html#9.3">
9.3&nbsp;&nbsp;分類できたらもっと便利</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.3.1">
9.3.1&nbsp;&nbsp;InfoChestが利用するAPI</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.3.2">
9.3.2&nbsp;&nbsp;InfoChestの外部仕様</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.3.3">
9.3.3&nbsp;&nbsp;InfoChestのモジュール構成</a></span><br/>
<span id="idt3"><a href="./chapter/chapter09.html#9.3.4">
9.3.4&nbsp;&nbsp;InfoChestのソースコード</a></span><br/>
<span id="idt2"><a href="./chapter/chapter09.html#9.4">
9.4&nbsp;&nbsp;まとめと練習問題</a></span><br/>
<span id="idt1"><a href="./chapter/chapter10.html#10">第10章 メモを書いたら貼りつけろ</a></span><br/>
<span id="idt2"><a href="./chapter/chapter10.html#10.1">
10.1&nbsp;&nbsp;エディタを作ろう</a></span><br/>
<span id="idt2"><a href="./chapter/chapter10.html#10.2">
10.2&nbsp;&nbsp;データを保存するには</a></span><br/>
<span id="idt2"><a href="./chapter/chapter10.html#10.3">
10.3&nbsp;&nbsp;レプリカント誕生秘話</a></span><br/>
<span id="idt2"><a href="./chapter/chapter10.html#10.4">
10.4&nbsp;&nbsp;まとめと練習問題</a></span><br/>
<span id="idt1"><a href="./chapter/chapter11.html#11">第11章 メールを送ろう</a></span><br/>
<span id="idt2"><a href="./chapter/chapter11.html#11.1">
11.1&nbsp;&nbsp;ソケットだったら知ってるよ</a></span><br/>
<span id="idt2"><a href="./chapter/chapter11.html#11.2.1">
11.2.1&nbsp;&nbsp;Mail Kitの使い方</a></span><br/>
<span id="idt2"><a href="./chapter/chapter11.html#11.3">
11.3&nbsp;&nbsp;まとめと練習問題</a></span><br/>
<hr>
<address>
Art of BeOS Programming<br/>
koga@stprec.co.jp
</address>
</div><!-- End of main -->
</div><!-- End of pagewidth -->
</body>
</html>