/* This file is part of Ganv. * Copyright 2007-2011 David Robillard * * Ganv is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) * any later version. * * Ganv is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * details. * * You should have received a copy of the GNU General Public License * along with Ganv. If not, see . */ typedef gpointer gobject; /** A case in a switch statement in a set_properties implementation. @prop: Property enumeration ID. @type: Name of the value type, e.g. uint for guint. @field: Field to set to the new value. */ #define SET_CASE(prop, type, field) \ case PROP_##prop: { \ const g##type tmp = g_value_get_##type(value); \ if (field != tmp) { \ field = tmp; \ gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(object)); \ } \ break; \ } /** A case in a switch statement in a get_properties implementation. @prop: Property enumeration ID. @type: Name of the value type, e.g. uint for guint. @field: Field to set to the new value. */ #define GET_CASE(prop, type, field) \ case PROP_##prop: \ g_value_set_##type(value, field); \ break;