#ifndef XMK_GTK_H
#define XMK_GTK_H

#include    <mk.h>

#include    <gtk/gtkwindow.h>
#include    <gtk/gtkmessagedialog.h>
#include    <gtk/gtkbutton.h>
#include    <gtk/gtkwidget.h>
#include    <gdk/gdkwindow.h>
#include    <gtk/gtkmenu.h>
#include    <gtk/gtkclist.h>
#include    <gtk/gtktreemodel.h>
#include    <gtk/gtktreeselection.h>

#ifdef DMALLOC
#define g_malloc	malloc
#define g_malloc0(s)	calloc(1, s)
#define g_realloc	realloc
#define g_free		free
#endif /* DMALLOC */

/* Callbacks */
void xmk_window_focus(GtkWidget *_widget, void *_udata __unused);
void xmk_widget_hide_parent_window(GtkWidget *_widget);

void xmk_gtk_init(int *acp, char **avp[]);
int xmk_gtk_exit(void);
void xmk_error(GtkWindow *_parent,
	int _eval,
	gboolean _sys,
	const char *_fmt,
	...);
GtkMessageDialog *xmk_warning_create(GtkWindow *_parent,
	gboolean _sys,
	const gchar *_fmt,
	...);
void xmk_warning(GtkWindow *_parent, gboolean _sys, const char *_fmt, ...);
void xmk_notify(GtkWindow *_parent, const char *_fmt, ...);
void xmk_combo_tool_bind(GtkButton *_tool,
	GtkButton *_ctool,
	GtkMenu *_menu);
void xmk_busy_push(GdkWindow *_win);
void xmk_busy_pop(GdkWindow *_win);
void xmk_clist_scroll_select_bydata(GtkCList *_clist,
	gint _col,
	gpointer _data);
void xmk_tree_view_scroll_select_iter(GtkTreeModel *_model,
	GtkTreeView *_view,
	GtkTreeSelection *_select,
	GtkTreeIter *_iter);

#endif /* !XMK_GTK_H */

