2006-12-08 02:28:18 -06:00
|
|
|
/*
|
|
|
|
* mooutils-thread.h
|
|
|
|
*
|
2010-12-21 20:15:45 -08:00
|
|
|
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
|
2006-12-08 02:28:18 -06:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* This file is part of medit. medit is free software; you can
|
|
|
|
* redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2.1 of the License,
|
|
|
|
* or (at your option) any later version.
|
2006-12-08 02:28:18 -06:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
|
2006-12-08 02:28:18 -06:00
|
|
|
*/
|
|
|
|
|
2007-04-12 10:31:28 -05:00
|
|
|
#ifndef MOO_UTILS_WIN32_H
|
|
|
|
#define MOO_UTILS_WIN32_H
|
2006-12-08 02:28:18 -06:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
2006-12-10 10:54:35 -06:00
|
|
|
typedef void (*MooEventQueueCallback) (GList *events,
|
|
|
|
gpointer data);
|
2006-12-08 02:28:18 -06:00
|
|
|
|
2008-08-27 23:03:37 -05:00
|
|
|
typedef struct MooAsyncJob MooAsyncJob;
|
|
|
|
typedef gboolean (*MooAsyncJobCallback) (gpointer data);
|
|
|
|
|
|
|
|
MooAsyncJob *moo_async_job_new (MooAsyncJobCallback callback,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify data_notify);
|
|
|
|
void moo_async_job_start (MooAsyncJob *job);
|
|
|
|
void moo_async_job_cancel (MooAsyncJob *job);
|
|
|
|
void moo_async_job_ref (MooAsyncJob *job);
|
|
|
|
void moo_async_job_unref (MooAsyncJob *job);
|
2006-12-08 02:28:18 -06:00
|
|
|
|
|
|
|
guint _moo_event_queue_connect (MooEventQueueCallback callback,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
void _moo_event_queue_disconnect (guint event_id);
|
|
|
|
|
|
|
|
void _moo_event_queue_do_events (guint event_id);
|
|
|
|
|
|
|
|
/* called from a thread */
|
|
|
|
void _moo_event_queue_push (guint event_id,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify data_destroy);
|
|
|
|
|
2006-12-10 10:54:35 -06:00
|
|
|
void _moo_print_async (const char *format,
|
2008-06-08 14:54:36 -05:00
|
|
|
...) G_GNUC_PRINTF(1,2);
|
2006-12-10 10:54:35 -06:00
|
|
|
void _moo_message_async (const char *format,
|
2008-06-08 14:54:36 -05:00
|
|
|
...) G_GNUC_PRINTF(1,2);
|
2006-12-10 10:54:35 -06:00
|
|
|
|
2006-12-08 02:28:18 -06:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2007-04-12 10:31:28 -05:00
|
|
|
#endif /* MOO_UTILS_WIN32_H */
|