2002-04-26 05:16:26 -07:00
|
|
|
##ifdef CAMLTK
|
|
|
|
|
|
|
|
let cCAMLtoTKcolor = function
|
2002-07-23 07:12:03 -07:00
|
|
|
NamedColor x -> TkToken x
|
|
|
|
| Black -> TkToken "black"
|
|
|
|
| White -> TkToken "white"
|
|
|
|
| Red -> TkToken "red"
|
|
|
|
| Green -> TkToken "green"
|
|
|
|
| Blue -> TkToken "blue"
|
2002-04-26 05:16:26 -07:00
|
|
|
| Yellow -> TkToken "yellow"
|
|
|
|
;;
|
|
|
|
|
|
|
|
let cTKtoCAMLcolor = function s -> NamedColor s
|
|
|
|
;;
|
|
|
|
|
|
|
|
let cCAMLtoTKcursor = function
|
|
|
|
XCursor s -> TkToken s
|
|
|
|
| XCursorFg (s,fg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken s; cCAMLtoTKcolor fg])
|
|
|
|
| XCursortFgBg (s,fg,bg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken s; cCAMLtoTKcolor fg; cCAMLtoTKcolor bg])
|
|
|
|
| CursorFileFg (s,fg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken ("@"^s); cCAMLtoTKcolor fg])
|
|
|
|
| CursorMaskFile (s,m,fg,bg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken ("@"^s); TkToken m; cCAMLtoTKcolor fg; cCAMLtoTKcolor bg])
|
|
|
|
;;
|
|
|
|
|
|
|
|
##else
|
|
|
|
|
1999-11-30 06:59:39 -08:00
|
|
|
let cCAMLtoTKcolor : color -> tkArgs = function
|
2000-02-16 03:51:37 -08:00
|
|
|
| `Color x -> TkToken x
|
1999-11-30 06:59:39 -08:00
|
|
|
| `Black -> TkToken "black"
|
|
|
|
| `White -> TkToken "white"
|
|
|
|
| `Red -> TkToken "red"
|
|
|
|
| `Green -> TkToken "green"
|
|
|
|
| `Blue -> TkToken "blue"
|
|
|
|
| `Yellow -> TkToken "yellow"
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
let cTKtoCAMLcolor = function s -> `Color s
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
let cCAMLtoTKcursor : cursor -> tkArgs = function
|
2000-02-16 03:51:37 -08:00
|
|
|
| `Xcursor s -> TkToken s
|
1999-11-30 06:59:39 -08:00
|
|
|
| `Xcursorfg (s,fg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken s; cCAMLtoTKcolor fg])
|
|
|
|
| `Xcursorfgbg (s,fg,bg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken s; cCAMLtoTKcolor fg; cCAMLtoTKcolor bg])
|
|
|
|
| `Cursorfilefg (s,fg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken ("@"^s); cCAMLtoTKcolor fg])
|
|
|
|
| `Cursormaskfile (s,m,fg,bg) ->
|
|
|
|
TkQuote(TkTokenList [TkToken ("@"^s); TkToken m; cCAMLtoTKcolor fg; cCAMLtoTKcolor bg])
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
##endif
|