Blame builtin/builtini_GetBitmap.ml

Packit bd2e5d
##ifdef CAMLTK
Packit bd2e5d
Packit bd2e5d
let cCAMLtoTKbitmap = function
Packit bd2e5d
  BitmapFile s -> TkToken ("@" ^ s)
Packit bd2e5d
| Predefined s -> TkToken s
Packit bd2e5d
;;
Packit bd2e5d
Packit bd2e5d
let cTKtoCAMLbitmap s =
Packit bd2e5d
 if s = "" then Predefined ""
Packit bd2e5d
 else if String.get s 0 = '@'
Packit bd2e5d
 then BitmapFile (String.sub s 1 (String.length s - 1))
Packit bd2e5d
 else Predefined s
Packit bd2e5d
;;
Packit bd2e5d
Packit bd2e5d
##else
Packit bd2e5d
Packit bd2e5d
let cCAMLtoTKbitmap : bitmap -> tkArgs = function
Packit bd2e5d
  | `File s -> TkToken ("@" ^ s)
Packit bd2e5d
  | `Predefined s -> TkToken s
Packit bd2e5d
;;
Packit bd2e5d
Packit bd2e5d
let cTKtoCAMLbitmap s =
Packit bd2e5d
 if String.get s 0 = '@'
Packit bd2e5d
 then `File (String.sub s ~pos:1 ~len:(String.length s - 1))
Packit bd2e5d
 else `Predefined s
Packit bd2e5d
;;
Packit bd2e5d
Packit bd2e5d
##endif