タグ

caml-pangoに関するmzpのブックマーク (2)

  • Interfacing C with Objective Caml

    この章では C で記述したユーザ定義プリミティブに Caml のコードをリンクしたり、逆に Caml の関数からコールしたりする方法について解説します。 ユーザプリミティブは実装ファイルや struct...end モジュール式中で external キーワードを使って宣言します。 external name : type = C-function-name これは変数名 name を type 型の関数として定義します。この関数を呼び出すと与えられた C 関数が実行されます。例えば、標準ライブラリのモジュール Pervasives で input プリミティブはこのように宣言されています。 external input : in_channel -> string -> int -> int -> int = "input" 引数をとるプリミティブは常にカリー化されます。C の関数名は

    mzp
    mzp 2009/03/19
    OCamlからCの関数を呼ぶ
  • Pango-1.0

    A PangoContext stores global information used to control the itemization process.

    mzp
    mzp 2009/03/19
    pangoでcairoレンダリング
  • 1