diff options
author | (no author) <(no author)@f5e0f49d-192f-0410-a22d-a8d8700d0965> | 2002-08-21 02:27:32 +0000 |
---|---|---|
committer | (no author) <(no author)@f5e0f49d-192f-0410-a22d-a8d8700d0965> | 2002-08-21 02:27:32 +0000 |
commit | 80226360c0bd03dc2fb5c22f4e8311570dc5749d (patch) | |
tree | be36cfe64cd72d4c3b8bd0251fab2b0db0c99580 /glabels2/src/label-object.h | |
parent | f6ff99094d3186251143d610868179191c9ebc51 (diff) |
This commit was manufactured by cvs2svn to create branch 'vendor'.
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/branches/vendor@40 f5e0f49d-192f-0410-a22d-a8d8700d0965
Diffstat (limited to 'glabels2/src/label-object.h')
-rw-r--r-- | glabels2/src/label-object.h | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/glabels2/src/label-object.h b/glabels2/src/label-object.h new file mode 100644 index 0000000..878f711 --- /dev/null +++ b/glabels2/src/label-object.h @@ -0,0 +1,106 @@ +/* + * (GLABELS) Label and Business Card Creation program for GNOME + * + * label_object.h: GLabels label object base class + * + * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>. + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __LABEL_OBJECT_H__ +#define __LABEL_OBJECT_H__ + +#include <glib-object.h> + + +G_BEGIN_DECLS + +typedef enum { + GL_LABEL_OBJECT_TEXT, + GL_LABEL_OBJECT_BOX, + GL_LABEL_OBJECT_LINE, + GL_LABEL_OBJECT_ELLIPSE, + GL_LABEL_OBJECT_IMAGE, + GL_LABEL_OBJECT_BARCODE, + GL_LABEL_OBJECT_N_TYPES +} glLabelObjectType; + + +#define GL_TYPE_LABEL_OBJECT (gl_label_object_get_type ()) +#define GL_LABEL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_OBJECT, glLabelObject)) +#define GL_LABEL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_OBJECT, glLabelObjectClass)) +#define GL_IS_LABEL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_OBJECT)) +#define GL_IS_LABEL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_OBJECT)) + +typedef struct _glLabelObject glLabelObject; +typedef struct _glLabelObjectClass glLabelObjectClass; + +typedef struct _glLabelObjectPrivate glLabelObjectPrivate; + +#include "label.h" + +struct _glLabelObject { + GObject object; + + glLabel *parent; + + glLabelObjectPrivate *private; +}; + +struct _glLabelObjectClass { + GObjectClass parent_class; + + void (*changed) (glLabelObject *object, gpointer user_data); + + void (*moved) (glLabelObject *object, + gdouble dx, gdouble dy, gpointer user_data); + + void (*top) (glLabelObject *object, gpointer user_data); + void (*bottom) (glLabelObject *object, gpointer user_data); +}; + +extern GType gl_label_object_get_type (void); + +extern GObject *gl_label_object_new (glLabel *label); + +extern void gl_label_object_emit_changed (glLabelObject *object); + +extern void gl_label_object_set_parent (glLabelObject *object, + glLabel *label); +extern glLabel *gl_label_object_get_parent (glLabelObject *object); + +extern void gl_label_object_set_name (glLabelObject *object, + gchar *name); +extern gchar *gl_label_object_get_name (glLabelObject *object); + +extern void gl_label_object_set_position (glLabelObject *object, + gdouble x, gdouble y); +extern void gl_label_object_set_position_relative (glLabelObject *object, + gdouble dx, + gdouble dy); +extern void gl_label_object_get_position (glLabelObject *object, + gdouble *x, gdouble *y); +extern void gl_label_object_set_size (glLabelObject *object, + gdouble w, gdouble h); +extern void gl_label_object_get_size (glLabelObject *object, + gdouble *w, gdouble *h); + +extern void gl_label_object_raise_to_top (glLabelObject * object); +extern void gl_label_object_lower_to_bottom (glLabelObject * object); + +G_END_DECLS + +#endif /* __LABEL_OBJECT_H__ */ |