1 /* 2 * wire-item.h 3 * 4 * 5 * Authors: 6 * Richard Hult <rhult@hem.passagen.se> 7 * Ricardo Markiewicz <rmarkie@fi.uba.ar> 8 * Andres de Barbara <adebarbara@fi.uba.ar> 9 * Marc Lorber <lorber.marc@wanadoo.fr> 10 * 11 * Web page: https://ahoi.io/project/oregano 12 * 13 * Copyright (C) 1999-2001 Richard Hult 14 * Copyright (C) 2003,2004 Ricardo Markiewicz 15 * Copyright (C) 2009-2012 Marc Lorber 16 * 17 * This program is free software; you can redistribute it and/or 18 * modify it under the terms of the GNU General Public License as 19 * published by the Free Software Foundation; either version 2 of the 20 * License, or (at your option) any later version. 21 * 22 * This program is distributed in the hope that it will be useful, 23 * but WITHOUT ANY WARRANTY; without even the implied warranty of 24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25 * General Public License for more details. 26 * 27 * You should have received a copy of the GNU General Public 28 * License along with this program; if not, write to the 29 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 30 * Boston, MA 02110-1301, USA. 31 */ 32 33 #ifndef __WIRE_ITEM_H 34 #define __WIRE_ITEM_H 35 36 #include <gtk/gtk.h> 37 38 #include "sheet.h" 39 #include "sheet-item.h" 40 #include "wire.h" 41 42 #define TYPE_WIRE_ITEM (wire_item_get_type ()) 43 #define WIRE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, wire_item_get_type (), WireItem)) 44 #define WIRE_ITEM_CLASS(klass) \ 45 (G_TYPE_CHECK_CLASS_CAST (klass, wire_item_get_type (), WireItemClass)) 46 #define IS_WIRE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, wire_item_get_type ())) 47 48 typedef struct _WireItemPriv WireItemPriv; 49 50 typedef struct 51 { 52 SheetItem parent_object; 53 WireItemPriv *priv; 54 } WireItem; 55 56 typedef struct 57 { 58 SheetItemClass parent_class; 59 } WireItemClass; 60 61 GType wire_item_get_type (void); 62 WireItem *wire_item_new (Sheet *sheet, Wire *wire); 63 void wire_item_initiate (Sheet *sheet); 64 void wire_item_get_start_pos (WireItem *item, Coords *pos); 65 void wire_item_get_length (WireItem *item, Coords *pos); 66 67 #endif 68