1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * Copyright (C) 2007 Kouhei Sutou <kou@cozmixng.org> 4 * 5 * This library is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 */ 19 20 #ifndef __CUT_LISTENER_H__ 21 #define __CUT_LISTENER_H__ 22 23 #include <glib-object.h> 24 #include <cutter/cut-private.h> 25 26 G_BEGIN_DECLS 27 28 #define CUT_TYPE_LISTENER (cut_listener_get_type ()) 29 #define CUT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CUT_TYPE_LISTENER, CutListener)) 30 #define CUT_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CUT_TYPE_LISTENER, CutListenerClass)) 31 #define CUT_IS_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CUT_TYPE_LISTENER)) 32 #define CUT_IS_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUT_TYPE_LISTENER)) 33 #define CUT_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), CUT_TYPE_LISTENER, CutListenerClass)) 34 35 typedef struct _CutListenerClass CutListenerClass; 36 37 struct _CutListenerClass 38 { 39 GTypeInterface base_iface; 40 41 void (*attach_to_run_context) (CutListener *listener, 42 CutRunContext *run_context); 43 void (*detach_from_run_context) (CutListener *listener, 44 CutRunContext *run_context); 45 }; 46 47 GType cut_listener_get_type (void) G_GNUC_CONST; 48 49 void cut_listener_attach_to_run_context (CutListener *listener, 50 CutRunContext *run_context); 51 void cut_listener_detach_from_run_context(CutListener *listener, 52 CutRunContext *run_context); 53 54 G_END_DECLS 55 56 #endif /* __CUT_LISTENER_H__ */ 57 58 /* 59 vi:ts=4:nowrap:ai:expandtab:sw=4 60 */ 61