/* * ui_call.h -- the call window * * License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. */ #ifndef _Dtchat_ui_call_h #define _Dtchat_ui_call_h #include #include "dc_internal.h" typedef struct DtCallWindow DtCallWindow; /* called when the person hangs up (button or window close) */ typedef void (*DtCallHangupFn)(void *arg); /* * A window for one call: the video area (I420 frames, scaled bilinearly and * converted to XRGB), push-to-talk and hang-up. CALL may be NULL for the * demo, then PTT and hang-up are insensitive and only frames are shown. The * window does not own CALL. */ DtCallWindow *dtchat_call_window_create(Widget parent, DcMediaCall *call, const char *peer_name, DtCallHangupFn hangup, void *arg); void dtchat_call_window_destroy(DtCallWindow *window); Widget dtchat_call_window_shell(const DtCallWindow *window); /* the newest I420 frame (W x H) to show */ void dtchat_call_window_set_frame(DtCallWindow *window, const unsigned char *i420, int w, int h); void dtchat_call_window_set_status(DtCallWindow *window, const char *text); int dtchat_call_window_has_frame(const DtCallWindow *window); /* push-to-talk state as the button shows it */ void dtchat_call_window_set_talking(DtCallWindow *window, int on); /* an incoming call: the Answer button becomes sensitive and answers with * dc_call_accept() */ void dtchat_call_window_set_incoming(DtCallWindow *window, int incoming); /* the Camera button: the hook cycles the source and answers its name, or * NULL when there is none; it is called with the window's ARG */ typedef const char *(*DtCallCameraFn)(void *arg); void dtchat_call_window_set_camera_hook(DtCallWindow *window, DtCallCameraFn fn, void *arg); #endif /* _Dtchat_ui_call_h */