(* OCaml-Win32
 * win32_animation.ml
 * Copyright (c) 2002-2004 by Harry Chomsky
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *)

open Win32_core

(********************************************************************)
(* User Interface: Windows User Experience: Windows Shell: SDK: Windows Controls: Individual Control Information: Animation Controls *)

let animate_class = "SysAnimate32"

(* Styles *)

type animation_control_style_option =
    ACS_AUTOPLAY
  | ACS_CENTER
  | ACS_TIMER
  | ACS_TRANSPARENT

external animation_control_style_of_option : animation_control_style_option -> style = "animation_control_style_of_option"

let animation_control_style_of_options = special_style_of_options ~special_func:animation_control_style_of_option

(* Messages *)

let acm_open = wm_user + 100
external issue_acm_open : sender:message_sender -> inst:hinstance -> name:resource_name option -> unit = "issue_acm_open"

let acm_play = wm_user + 101
external pack_acm_play : repeat:int -> from_frame:int -> to_frame:int -> message_contents = "pack_acm_play"
external unpack_acm_play : message_result -> unit = "unpack_acm_play"
let issue_acm_play ~sender ~repeat ~from_frame ~to_frame = unpack_acm_play (sender ~msg:(pack_acm_play ~repeat ~from_frame ~to_frame))

let acm_stop = wm_user + 102
let pack_acm_stop = pack_simple_message ~id:acm_stop
external unpack_acm_stop : message_result -> unit = "unpack_acm_stop"
let issue_acm_stop ~sender = unpack_acm_stop (sender ~msg:pack_acm_stop)

(* Notifications *)

let acn_start = 1
let acn_stop = 2
