goocanvas 0.90.6-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +87 -0
- data/README +37 -0
- data/Rakefile +14 -0
- data/ext/goocanvas/depend +5 -0
- data/ext/goocanvas/extconf.rb +66 -0
- data/ext/goocanvas/goocanvas.def +2 -0
- data/ext/goocanvas/rbgoocairo.c +74 -0
- data/ext/goocanvas/rbgoocanvas.c +236 -0
- data/ext/goocanvas/rbgoocanvas.h +66 -0
- data/ext/goocanvas/rbgoocanvasellipse.c +50 -0
- data/ext/goocanvas/rbgoocanvasgroup.c +41 -0
- data/ext/goocanvas/rbgoocanvasimage.c +45 -0
- data/ext/goocanvas/rbgoocanvasitem.c +358 -0
- data/ext/goocanvas/rbgoocanvaspolyline.c +102 -0
- data/ext/goocanvas/rbgoocanvasrect.c +47 -0
- data/ext/goocanvas/rbgoocanvasstyle.c +61 -0
- data/ext/goocanvas/rbgoocanvastable.c +41 -0
- data/ext/goocanvas/rbgoocanvastext.c +58 -0
- data/ext/goocanvas/rbgoocanvaswidget.c +48 -0
- data/ext/goocanvas/rbgooutils.c +44 -0
- data/extconf.rb +49 -0
- data/lib/1.8/goocanvas.so +0 -0
- data/lib/1.9/goocanvas.so +0 -0
- data/lib/goocanvas.rb +145 -0
- data/sample/demo-arrowhead.rb +315 -0
- data/sample/demo-fifteen.rb +218 -0
- data/sample/demo-primitives.rb +720 -0
- data/sample/demo.rb +84 -0
- data/sample/flower.png +0 -0
- data/sample/scalability-demo.rb +130 -0
- data/sample/simple-demo.rb +35 -0
- data/sample/table-demo.rb +137 -0
- data/sample/toroid.png +0 -0
- data/sample/units-demo.rb +80 -0
- data/sample/widgets-demo.rb +197 -0
- data/vendor/local/bin/libgoocanvas-3.dll +0 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvas.h +334 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasatk.h +22 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasellipse.h +120 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasenumtypes.h +33 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasgrid.h +153 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasgroup.h +109 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasimage.h +121 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitem.h +479 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitemmodel.h +275 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasitemsimple.h +247 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasmarshal.h +61 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaspath.h +116 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaspolyline.h +176 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasprivate.h +59 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasrect.h +121 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasstyle.h +110 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvastable.h +139 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvastext.h +133 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvasutils.h +333 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/goocanvaswidget.h +66 -0
- data/vendor/local/include/goocanvas-1.0.0/goocanvas/stamp-goocanvasmarshal.h +1 -0
- data/vendor/local/lib/libgoocanvas.a +0 -0
- data/vendor/local/lib/libgoocanvas.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/goocanvas.pc +13 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvas.html +1982 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasEllipse.html +269 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasEllipseModel.html +274 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGrid.html +469 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGridModel.html +476 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGroup.html +183 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasGroupModel.html +184 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasImage.html +247 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasImageModel.html +252 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItem.html +3014 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemModel.html +1764 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemModelSimple.html +298 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasItemSimple.html +809 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPath.html +279 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPathModel.html +280 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPolyline.html +369 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasPolylineModel.html +375 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasRect.html +247 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasRectModel.html +252 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasStyle.html +489 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTable.html +452 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTableModel.html +452 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasText.html +324 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasTextModel.html +287 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/GooCanvasWidget.html +266 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/ch01.html +53 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/ch02.html +50 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/ch03.html +62 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/ch04.html +60 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/ch05.html +33 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-GooCanvas-Types.html +815 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-architecture.html +157 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-coordinates.html +106 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-creating-items.html +420 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-model-view-canvas.html +246 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-overview.html +106 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-simple-canvas.html +238 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas-wysiwyg.html +84 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas.devhelp +608 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/goocanvas.devhelp2 +639 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/index.html +138 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/index.sgml +814 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/style.css +257 -0
- data/vendor/local/share/gtk-doc/html/goocanvas/up.png +0 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/dummy.sgml +0 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvas-unused.sgml +0 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvas.sgml +536 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasellipse.sgml +82 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasellipsemodel.sgml +82 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgrid.sgml +176 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgridmodel.sgml +176 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgroup.sgml +58 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasgroupmodel.sgml +58 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasimage.sgml +81 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasimagemodel.sgml +81 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitem.sgml +773 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemmodel.sgml +490 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemmodelsimple.sgml +135 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasitemsimple.sgml +254 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspath.sgml +64 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspathmodel.sgml +64 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspolyline.sgml +109 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaspolylinemodel.sgml +109 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasrect.sgml +72 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasrectmodel.sgml +72 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasstyle.sgml +186 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastable.sgml +158 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastablemodel.sgml +158 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastext.sgml +103 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvastextmodel.sgml +93 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvasutils.sgml +241 -0
- data/vendor/local/share/gtk-doc/tmpl/goocanvas/goocanvaswidget.sgml +73 -0
- metadata +218 -0
@@ -0,0 +1,133 @@
|
|
1
|
+
/*
|
2
|
+
* GooCanvas. Copyright (C) 2005 Damon Chaplin.
|
3
|
+
* Released under the GNU LGPL license. See COPYING for details.
|
4
|
+
*
|
5
|
+
* goocanvastext.h - text item.
|
6
|
+
*/
|
7
|
+
#ifndef __GOO_CANVAS_TEXT_H__
|
8
|
+
#define __GOO_CANVAS_TEXT_H__
|
9
|
+
|
10
|
+
#include <gtk/gtk.h>
|
11
|
+
#include "goocanvasitemsimple.h"
|
12
|
+
|
13
|
+
G_BEGIN_DECLS
|
14
|
+
|
15
|
+
|
16
|
+
/* This is the data used by both model and view classes. */
|
17
|
+
typedef struct _GooCanvasTextData GooCanvasTextData;
|
18
|
+
struct _GooCanvasTextData
|
19
|
+
{
|
20
|
+
gchar *text;
|
21
|
+
gdouble x, y, width;
|
22
|
+
guint use_markup : 1;
|
23
|
+
guint anchor : 5; /* GtkAnchorType */
|
24
|
+
guint alignment : 3; /* PangoAlignment */
|
25
|
+
guint ellipsize : 3; /* PangoEllipsizeMode */
|
26
|
+
guint wrap : 3; /* PangoWrapMode */
|
27
|
+
};
|
28
|
+
|
29
|
+
|
30
|
+
#define GOO_TYPE_CANVAS_TEXT (goo_canvas_text_get_type ())
|
31
|
+
#define GOO_CANVAS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_TEXT, GooCanvasText))
|
32
|
+
#define GOO_CANVAS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_TEXT, GooCanvasTextClass))
|
33
|
+
#define GOO_IS_CANVAS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_TEXT))
|
34
|
+
#define GOO_IS_CANVAS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_TEXT))
|
35
|
+
#define GOO_CANVAS_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_TEXT, GooCanvasTextClass))
|
36
|
+
|
37
|
+
|
38
|
+
typedef struct _GooCanvasText GooCanvasText;
|
39
|
+
typedef struct _GooCanvasTextClass GooCanvasTextClass;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* GooCanvasText
|
43
|
+
*
|
44
|
+
* The #GooCanvasText-struct struct contains private data only.
|
45
|
+
*/
|
46
|
+
struct _GooCanvasText
|
47
|
+
{
|
48
|
+
GooCanvasItemSimple parent;
|
49
|
+
|
50
|
+
GooCanvasTextData *text_data;
|
51
|
+
gdouble layout_width;
|
52
|
+
};
|
53
|
+
|
54
|
+
struct _GooCanvasTextClass
|
55
|
+
{
|
56
|
+
GooCanvasItemSimpleClass parent_class;
|
57
|
+
|
58
|
+
/*< private >*/
|
59
|
+
|
60
|
+
/* Padding for future expansion */
|
61
|
+
void (*_goo_canvas_reserved1) (void);
|
62
|
+
void (*_goo_canvas_reserved2) (void);
|
63
|
+
void (*_goo_canvas_reserved3) (void);
|
64
|
+
void (*_goo_canvas_reserved4) (void);
|
65
|
+
};
|
66
|
+
|
67
|
+
|
68
|
+
GType goo_canvas_text_get_type (void) G_GNUC_CONST;
|
69
|
+
|
70
|
+
GooCanvasItem* goo_canvas_text_new (GooCanvasItem *parent,
|
71
|
+
const char *string,
|
72
|
+
gdouble x,
|
73
|
+
gdouble y,
|
74
|
+
gdouble width,
|
75
|
+
GtkAnchorType anchor,
|
76
|
+
...);
|
77
|
+
|
78
|
+
void goo_canvas_text_get_natural_extents (GooCanvasText *text,
|
79
|
+
PangoRectangle *ink_rect,
|
80
|
+
PangoRectangle *logical_rect);
|
81
|
+
|
82
|
+
|
83
|
+
#define GOO_TYPE_CANVAS_TEXT_MODEL (goo_canvas_text_model_get_type ())
|
84
|
+
#define GOO_CANVAS_TEXT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_TEXT_MODEL, GooCanvasTextModel))
|
85
|
+
#define GOO_CANVAS_TEXT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_TEXT_MODEL, GooCanvasTextModelClass))
|
86
|
+
#define GOO_IS_CANVAS_TEXT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_TEXT_MODEL))
|
87
|
+
#define GOO_IS_CANVAS_TEXT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_TEXT_MODEL))
|
88
|
+
#define GOO_CANVAS_TEXT_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_TEXT_MODEL, GooCanvasTextModelClass))
|
89
|
+
|
90
|
+
|
91
|
+
typedef struct _GooCanvasTextModel GooCanvasTextModel;
|
92
|
+
typedef struct _GooCanvasTextModelClass GooCanvasTextModelClass;
|
93
|
+
|
94
|
+
/**
|
95
|
+
* GooCanvasTextModel
|
96
|
+
*
|
97
|
+
* The #GooCanvasTextModel-struct struct contains private data only.
|
98
|
+
*/
|
99
|
+
struct _GooCanvasTextModel
|
100
|
+
{
|
101
|
+
GooCanvasItemModelSimple parent_object;
|
102
|
+
|
103
|
+
GooCanvasTextData text_data;
|
104
|
+
};
|
105
|
+
|
106
|
+
struct _GooCanvasTextModelClass
|
107
|
+
{
|
108
|
+
GooCanvasItemModelSimpleClass parent_class;
|
109
|
+
|
110
|
+
/*< private >*/
|
111
|
+
|
112
|
+
/* Padding for future expansion */
|
113
|
+
void (*_goo_canvas_reserved1) (void);
|
114
|
+
void (*_goo_canvas_reserved2) (void);
|
115
|
+
void (*_goo_canvas_reserved3) (void);
|
116
|
+
void (*_goo_canvas_reserved4) (void);
|
117
|
+
};
|
118
|
+
|
119
|
+
|
120
|
+
GType goo_canvas_text_model_get_type (void) G_GNUC_CONST;
|
121
|
+
|
122
|
+
GooCanvasItemModel* goo_canvas_text_model_new (GooCanvasItemModel *parent,
|
123
|
+
const char *string,
|
124
|
+
gdouble x,
|
125
|
+
gdouble y,
|
126
|
+
gdouble width,
|
127
|
+
GtkAnchorType anchor,
|
128
|
+
...);
|
129
|
+
|
130
|
+
|
131
|
+
G_END_DECLS
|
132
|
+
|
133
|
+
#endif /* __GOO_CANVAS_TEXT_H__ */
|
@@ -0,0 +1,333 @@
|
|
1
|
+
/*
|
2
|
+
* GooCanvas. Copyright (C) 2005 Damon Chaplin.
|
3
|
+
* Released under the GNU LGPL license. See COPYING for details.
|
4
|
+
*
|
5
|
+
* goocanvasutils.h - utility functions.
|
6
|
+
*/
|
7
|
+
#ifndef __GOO_CANVAS_UTILS_H__
|
8
|
+
#define __GOO_CANVAS_UTILS_H__
|
9
|
+
|
10
|
+
#include <gtk/gtk.h>
|
11
|
+
|
12
|
+
G_BEGIN_DECLS
|
13
|
+
|
14
|
+
|
15
|
+
/*
|
16
|
+
* Enum types.
|
17
|
+
*/
|
18
|
+
|
19
|
+
/**
|
20
|
+
* GooCanvasPointerEvents
|
21
|
+
* @GOO_CANVAS_EVENTS_VISIBLE_MASK: a mask indicating that the item only
|
22
|
+
* receives events when it is visible.
|
23
|
+
* @GOO_CANVAS_EVENTS_PAINTED_MASK: a mask indicating that the item only
|
24
|
+
* receives events when the specified parts of it are painted.
|
25
|
+
* @GOO_CANVAS_EVENTS_FILL_MASK: a mask indicating that the filled part of
|
26
|
+
* the item receives events.
|
27
|
+
* @GOO_CANVAS_EVENTS_STROKE_MASK: a mask indicating that the stroked part
|
28
|
+
* of the item receives events.
|
29
|
+
* @GOO_CANVAS_EVENTS_NONE: the item doesn't receive events at all.
|
30
|
+
* @GOO_CANVAS_EVENTS_VISIBLE_PAINTED: the item receives events in its
|
31
|
+
* painted areas when it is visible (the default).
|
32
|
+
* @GOO_CANVAS_EVENTS_VISIBLE_FILL: the item's interior receives events
|
33
|
+
* when it is visible.
|
34
|
+
* @GOO_CANVAS_EVENTS_VISIBLE_STROKE: the item's perimeter receives
|
35
|
+
* events when it is visible.
|
36
|
+
* @GOO_CANVAS_EVENTS_VISIBLE: the item receives events when it is visible,
|
37
|
+
* whether it is painted or not.
|
38
|
+
* @GOO_CANVAS_EVENTS_PAINTED: the item receives events in its painted areas,
|
39
|
+
* whether it is visible or not.
|
40
|
+
* @GOO_CANVAS_EVENTS_FILL: the item's interior receives events, whether it
|
41
|
+
* is visible or painted or not.
|
42
|
+
* @GOO_CANVAS_EVENTS_STROKE: the item's perimeter receives events, whether
|
43
|
+
* it is visible or painted or not.
|
44
|
+
* @GOO_CANVAS_EVENTS_ALL: the item's perimeter and interior receive events,
|
45
|
+
* whether it is visible or painted or not.
|
46
|
+
*
|
47
|
+
* Specifies when an item receives pointer events such as mouse clicks.
|
48
|
+
*/
|
49
|
+
typedef enum
|
50
|
+
{
|
51
|
+
GOO_CANVAS_EVENTS_VISIBLE_MASK = 1 << 0,
|
52
|
+
GOO_CANVAS_EVENTS_PAINTED_MASK = 1 << 1,
|
53
|
+
GOO_CANVAS_EVENTS_FILL_MASK = 1 << 2,
|
54
|
+
GOO_CANVAS_EVENTS_STROKE_MASK = 1 << 3,
|
55
|
+
|
56
|
+
GOO_CANVAS_EVENTS_NONE = 0,
|
57
|
+
GOO_CANVAS_EVENTS_VISIBLE_PAINTED = GOO_CANVAS_EVENTS_VISIBLE_MASK | GOO_CANVAS_EVENTS_PAINTED_MASK | GOO_CANVAS_EVENTS_FILL_MASK | GOO_CANVAS_EVENTS_STROKE_MASK,
|
58
|
+
GOO_CANVAS_EVENTS_VISIBLE_FILL = GOO_CANVAS_EVENTS_VISIBLE_MASK | GOO_CANVAS_EVENTS_FILL_MASK,
|
59
|
+
GOO_CANVAS_EVENTS_VISIBLE_STROKE = GOO_CANVAS_EVENTS_VISIBLE_MASK | GOO_CANVAS_EVENTS_STROKE_MASK,
|
60
|
+
GOO_CANVAS_EVENTS_VISIBLE = GOO_CANVAS_EVENTS_VISIBLE_MASK | GOO_CANVAS_EVENTS_FILL_MASK | GOO_CANVAS_EVENTS_STROKE_MASK,
|
61
|
+
GOO_CANVAS_EVENTS_PAINTED = GOO_CANVAS_EVENTS_PAINTED_MASK | GOO_CANVAS_EVENTS_FILL_MASK | GOO_CANVAS_EVENTS_STROKE_MASK,
|
62
|
+
GOO_CANVAS_EVENTS_FILL = GOO_CANVAS_EVENTS_FILL_MASK,
|
63
|
+
GOO_CANVAS_EVENTS_STROKE = GOO_CANVAS_EVENTS_STROKE_MASK,
|
64
|
+
GOO_CANVAS_EVENTS_ALL = GOO_CANVAS_EVENTS_FILL_MASK | GOO_CANVAS_EVENTS_STROKE_MASK
|
65
|
+
} GooCanvasPointerEvents;
|
66
|
+
|
67
|
+
|
68
|
+
/**
|
69
|
+
* GooCanvasItemVisibility
|
70
|
+
* @GOO_CANVAS_ITEM_HIDDEN: the item is invisible, and is not allocated any
|
71
|
+
* space in layout container items such as #GooCanvasTable.
|
72
|
+
* @GOO_CANVAS_ITEM_INVISIBLE: the item is invisible, but it is still allocated
|
73
|
+
* space in layout container items.
|
74
|
+
* @GOO_CANVAS_ITEM_VISIBLE: the item is visible.
|
75
|
+
* @GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD: the item is visible when the
|
76
|
+
* canvas scale setting is greater than or equal to the item's visibility
|
77
|
+
* threshold setting.
|
78
|
+
*
|
79
|
+
* The #GooCanvasItemVisibility enumeration is used to specify when a canvas
|
80
|
+
* item is visible.
|
81
|
+
*/
|
82
|
+
/* NOTE: Values are important here, as we test for <= GOO_CANVAS_ITEM_INVISIBLE
|
83
|
+
to check if an item is invisible or hidden. */
|
84
|
+
typedef enum
|
85
|
+
{
|
86
|
+
GOO_CANVAS_ITEM_HIDDEN = 0,
|
87
|
+
GOO_CANVAS_ITEM_INVISIBLE = 1,
|
88
|
+
GOO_CANVAS_ITEM_VISIBLE = 2,
|
89
|
+
GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD = 3
|
90
|
+
} GooCanvasItemVisibility;
|
91
|
+
|
92
|
+
|
93
|
+
/**
|
94
|
+
* GooCanvasPathCommandType
|
95
|
+
* @GOO_CANVAS_PATH_MOVE_TO: move to the given point.
|
96
|
+
* @GOO_CANVAS_PATH_CLOSE_PATH: close the current path, drawing a line from the
|
97
|
+
* current position to the start of the path.
|
98
|
+
* @GOO_CANVAS_PATH_LINE_TO: draw a line to the given point.
|
99
|
+
* @GOO_CANVAS_PATH_HORIZONTAL_LINE_TO: draw a horizontal line to the given
|
100
|
+
* x coordinate.
|
101
|
+
* @GOO_CANVAS_PATH_VERTICAL_LINE_TO: draw a vertical line to the given y
|
102
|
+
* coordinate.
|
103
|
+
* @GOO_CANVAS_PATH_CURVE_TO: draw a bezier curve using two control
|
104
|
+
* points to the given point.
|
105
|
+
* @GOO_CANVAS_PATH_SMOOTH_CURVE_TO: draw a bezier curve using a reflection
|
106
|
+
* of the last control point of the last curve as the first control point,
|
107
|
+
* and one new control point, to the given point.
|
108
|
+
* @GOO_CANVAS_PATH_QUADRATIC_CURVE_TO: draw a quadratic bezier curve using
|
109
|
+
* a single control point to the given point.
|
110
|
+
* @GOO_CANVAS_PATH_SMOOTH_QUADRATIC_CURVE_TO: draw a quadratic bezier curve
|
111
|
+
* using a reflection of the control point from the previous curve as the
|
112
|
+
* control point, to the given point.
|
113
|
+
* @GOO_CANVAS_PATH_ELLIPTICAL_ARC: draw an elliptical arc, using the given
|
114
|
+
* 2 radii, the x axis rotation, and the 2 flags to disambiguate the arc,
|
115
|
+
* to the given point.
|
116
|
+
*
|
117
|
+
* GooCanvasPathCommandType specifies the type of each command in the path.
|
118
|
+
* See the path element in the <ulink url="http://www.w3.org/Graphics/SVG/">
|
119
|
+
* Scalable Vector Graphics (SVG) specification</ulink> for more details.
|
120
|
+
*/
|
121
|
+
typedef enum
|
122
|
+
{
|
123
|
+
/* Simple commands like moveto and lineto: MmZzLlHhVv. */
|
124
|
+
GOO_CANVAS_PATH_MOVE_TO,
|
125
|
+
GOO_CANVAS_PATH_CLOSE_PATH,
|
126
|
+
GOO_CANVAS_PATH_LINE_TO,
|
127
|
+
GOO_CANVAS_PATH_HORIZONTAL_LINE_TO,
|
128
|
+
GOO_CANVAS_PATH_VERTICAL_LINE_TO,
|
129
|
+
|
130
|
+
/* Bezier curve commands: CcSsQqTt. */
|
131
|
+
GOO_CANVAS_PATH_CURVE_TO,
|
132
|
+
GOO_CANVAS_PATH_SMOOTH_CURVE_TO,
|
133
|
+
GOO_CANVAS_PATH_QUADRATIC_CURVE_TO,
|
134
|
+
GOO_CANVAS_PATH_SMOOTH_QUADRATIC_CURVE_TO,
|
135
|
+
|
136
|
+
/* The elliptical arc commands: Aa. */
|
137
|
+
GOO_CANVAS_PATH_ELLIPTICAL_ARC
|
138
|
+
} GooCanvasPathCommandType;
|
139
|
+
|
140
|
+
|
141
|
+
typedef union _GooCanvasPathCommand GooCanvasPathCommand;
|
142
|
+
|
143
|
+
/* Note that the command type is always the first element in each struct, so
|
144
|
+
we can always use it whatever type of command it is. */
|
145
|
+
|
146
|
+
/**
|
147
|
+
* GooCanvasPathCommand
|
148
|
+
*
|
149
|
+
* GooCanvasPathCommand holds the data for each command in the path.
|
150
|
+
*
|
151
|
+
* The @relative flag specifies that the coordinates for the command are
|
152
|
+
* relative to the current point. Otherwise they are assumed to be absolute
|
153
|
+
* coordinates.
|
154
|
+
*/
|
155
|
+
union _GooCanvasPathCommand
|
156
|
+
{
|
157
|
+
/* Simple commands like moveto and lineto: MmZzLlHhVv. */
|
158
|
+
struct {
|
159
|
+
guint type : 5; /* GooCanvasPathCommandType */
|
160
|
+
guint relative : 1;
|
161
|
+
gdouble x, y;
|
162
|
+
} simple;
|
163
|
+
|
164
|
+
/* Bezier curve commands: CcSsQqTt. */
|
165
|
+
struct {
|
166
|
+
guint type : 5; /* GooCanvasPathCommandType */
|
167
|
+
guint relative : 1;
|
168
|
+
gdouble x, y, x1, y1, x2, y2;
|
169
|
+
} curve;
|
170
|
+
|
171
|
+
/* The elliptical arc commands: Aa. */
|
172
|
+
struct {
|
173
|
+
guint type : 5; /* GooCanvasPathCommandType */
|
174
|
+
guint relative : 1;
|
175
|
+
guint large_arc_flag : 1;
|
176
|
+
guint sweep_flag : 1;
|
177
|
+
gdouble rx, ry, x_axis_rotation, x, y;
|
178
|
+
} arc;
|
179
|
+
};
|
180
|
+
|
181
|
+
|
182
|
+
GArray* goo_canvas_parse_path_data (const gchar *path_data);
|
183
|
+
void goo_canvas_create_path (GArray *commands,
|
184
|
+
cairo_t *cr);
|
185
|
+
|
186
|
+
|
187
|
+
/*
|
188
|
+
* Cairo utilities.
|
189
|
+
*/
|
190
|
+
typedef struct _GooCanvasLineDash GooCanvasLineDash;
|
191
|
+
|
192
|
+
/**
|
193
|
+
* GooCanvasLineDash
|
194
|
+
* @ref_count: the reference count of the struct.
|
195
|
+
* @num_dashes: the number of dashes and gaps between them.
|
196
|
+
* @dashes: the sizes of each dash and gap.
|
197
|
+
* @dash_offset: the start offset into the dash pattern.
|
198
|
+
*
|
199
|
+
* #GooCanvasLineDash specifies a dash pattern to be used when drawing items.
|
200
|
+
*/
|
201
|
+
struct _GooCanvasLineDash
|
202
|
+
{
|
203
|
+
int ref_count;
|
204
|
+
int num_dashes;
|
205
|
+
double *dashes;
|
206
|
+
double dash_offset;
|
207
|
+
};
|
208
|
+
|
209
|
+
|
210
|
+
/* These are here so we can document the cairo type wrappers - don't use. */
|
211
|
+
#if 0
|
212
|
+
typedef cairo_antialias_t GooCairoAntialias;
|
213
|
+
typedef cairo_fill_rule_t GooCairoFillRule;
|
214
|
+
typedef cairo_hint_metrics_t GooCairoHintMetrics;
|
215
|
+
typedef cairo_line_cap_t GooCairoLineCap;
|
216
|
+
typedef cairo_line_join_t GooCairoLineJoin;
|
217
|
+
typedef cairo_operator_t GooCairoOperator;
|
218
|
+
typedef cairo_matrix_t GooCairoMatrix;
|
219
|
+
typedef cairo_pattern_t GooCairoPattern;
|
220
|
+
#endif
|
221
|
+
|
222
|
+
/**
|
223
|
+
* GooCairoAntialias
|
224
|
+
*
|
225
|
+
* #GooCairoAntialias is simply a wrapper for the #cairo_antialias_t type,
|
226
|
+
* allowing it to be used for #GObject properties.
|
227
|
+
*
|
228
|
+
* See the #cairo_antialias_t documentation.
|
229
|
+
*/
|
230
|
+
|
231
|
+
/**
|
232
|
+
* GooCairoFillRule
|
233
|
+
*
|
234
|
+
* #GooCairoFillRule is simply a wrapper for the #cairo_fill_rule_t type,
|
235
|
+
* allowing it to be used for #GObject properties.
|
236
|
+
*
|
237
|
+
* See the #cairo_fill_rule_t documentation.
|
238
|
+
*/
|
239
|
+
|
240
|
+
/**
|
241
|
+
* GooCairoHintMetrics
|
242
|
+
*
|
243
|
+
* #GooCairoHintMetrics is simply a wrapper for the #cairo_hint_metrics_t type,
|
244
|
+
* allowing it to be used for #GObject properties.
|
245
|
+
*
|
246
|
+
* See the #cairo_hint_metrics_t documentation.
|
247
|
+
*/
|
248
|
+
|
249
|
+
/**
|
250
|
+
* GooCairoLineCap
|
251
|
+
*
|
252
|
+
* #GooCairoLineCap is simply a wrapper for the #cairo_line_cap_t type,
|
253
|
+
* allowing it to be used for #GObject properties.
|
254
|
+
*
|
255
|
+
* See the #cairo_line_cap_t documentation.
|
256
|
+
*/
|
257
|
+
|
258
|
+
/**
|
259
|
+
* GooCairoLineJoin
|
260
|
+
*
|
261
|
+
* #GooCairoLineJoin is simply a wrapper for the #cairo_line_join_t type,
|
262
|
+
* allowing it to be used for #GObject properties.
|
263
|
+
*
|
264
|
+
* See the #cairo_line_join_t documentation.
|
265
|
+
*/
|
266
|
+
|
267
|
+
/**
|
268
|
+
* GooCairoOperator
|
269
|
+
*
|
270
|
+
* #GooCairoOperator is simply a wrapper for the #cairo_operator_t type,
|
271
|
+
* allowing it to be used for #GObject properties.
|
272
|
+
*
|
273
|
+
* See the #cairo_operator_t documentation.
|
274
|
+
*/
|
275
|
+
|
276
|
+
/**
|
277
|
+
* GooCairoMatrix
|
278
|
+
*
|
279
|
+
* #GooCairoMatrix is simply a wrapper for the #cairo_matrix_t type,
|
280
|
+
* allowing it to be used for #GObject properties.
|
281
|
+
*
|
282
|
+
* See the #cairo_matrix_t documentation.
|
283
|
+
*/
|
284
|
+
|
285
|
+
/**
|
286
|
+
* GooCairoPattern
|
287
|
+
*
|
288
|
+
* #GooCairoPattern is simply a wrapper for the #cairo_pattern_t type,
|
289
|
+
* allowing it to be used for #GObject properties.
|
290
|
+
*
|
291
|
+
* See the #cairo_pattern_t documentation.
|
292
|
+
*/
|
293
|
+
|
294
|
+
|
295
|
+
#define GOO_TYPE_CANVAS_LINE_DASH (goo_canvas_line_dash_get_type ())
|
296
|
+
GType goo_canvas_line_dash_get_type (void) G_GNUC_CONST;
|
297
|
+
GooCanvasLineDash* goo_canvas_line_dash_new (gint num_dashes,
|
298
|
+
...);
|
299
|
+
GooCanvasLineDash* goo_canvas_line_dash_newv (gint num_dashes,
|
300
|
+
double *dashes);
|
301
|
+
GooCanvasLineDash* goo_canvas_line_dash_ref (GooCanvasLineDash *dash);
|
302
|
+
void goo_canvas_line_dash_unref (GooCanvasLineDash *dash);
|
303
|
+
|
304
|
+
#define GOO_TYPE_CAIRO_MATRIX (goo_cairo_matrix_get_type())
|
305
|
+
GType goo_cairo_matrix_get_type (void) G_GNUC_CONST;
|
306
|
+
cairo_matrix_t* goo_cairo_matrix_copy (const cairo_matrix_t *matrix);
|
307
|
+
void goo_cairo_matrix_free (cairo_matrix_t *matrix);
|
308
|
+
|
309
|
+
#define GOO_TYPE_CAIRO_PATTERN (goo_cairo_pattern_get_type ())
|
310
|
+
GType goo_cairo_pattern_get_type (void) G_GNUC_CONST;
|
311
|
+
|
312
|
+
#define GOO_TYPE_CAIRO_FILL_RULE (goo_cairo_fill_rule_get_type ())
|
313
|
+
GType goo_cairo_fill_rule_get_type (void) G_GNUC_CONST;
|
314
|
+
|
315
|
+
#define GOO_TYPE_CAIRO_OPERATOR (goo_cairo_operator_get_type())
|
316
|
+
GType goo_cairo_operator_get_type (void) G_GNUC_CONST;
|
317
|
+
|
318
|
+
#define GOO_TYPE_CAIRO_ANTIALIAS (goo_cairo_antialias_get_type())
|
319
|
+
GType goo_cairo_antialias_get_type (void) G_GNUC_CONST;
|
320
|
+
|
321
|
+
#define GOO_TYPE_CAIRO_LINE_CAP (goo_cairo_line_cap_get_type ())
|
322
|
+
GType goo_cairo_line_cap_get_type (void) G_GNUC_CONST;
|
323
|
+
|
324
|
+
#define GOO_TYPE_CAIRO_LINE_JOIN (goo_cairo_line_join_get_type ())
|
325
|
+
GType goo_cairo_line_join_get_type (void) G_GNUC_CONST;
|
326
|
+
|
327
|
+
#define GOO_TYPE_CAIRO_HINT_METRICS (goo_cairo_hint_metrics_get_type ())
|
328
|
+
GType goo_cairo_hint_metrics_get_type (void) G_GNUC_CONST;
|
329
|
+
|
330
|
+
|
331
|
+
G_END_DECLS
|
332
|
+
|
333
|
+
#endif /* __GOO_CANVAS_UTILS_H__ */
|
@@ -0,0 +1,66 @@
|
|
1
|
+
/*
|
2
|
+
* GooCanvas. Copyright (C) 2005-6 Damon Chaplin.
|
3
|
+
* Released under the GNU LGPL license. See COPYING for details.
|
4
|
+
*
|
5
|
+
* goocanvaswidget.h - wrapper item for an embedded GtkWidget.
|
6
|
+
*/
|
7
|
+
#ifndef __GOO_CANVAS_WIDGET_H__
|
8
|
+
#define __GOO_CANVAS_WIDGET_H__
|
9
|
+
|
10
|
+
#include <gtk/gtk.h>
|
11
|
+
#include "goocanvasitemsimple.h"
|
12
|
+
|
13
|
+
G_BEGIN_DECLS
|
14
|
+
|
15
|
+
|
16
|
+
#define GOO_TYPE_CANVAS_WIDGET (goo_canvas_widget_get_type ())
|
17
|
+
#define GOO_CANVAS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_WIDGET, GooCanvasWidget))
|
18
|
+
#define GOO_CANVAS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_WIDGET, GooCanvasWidgetClass))
|
19
|
+
#define GOO_IS_CANVAS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_WIDGET))
|
20
|
+
#define GOO_IS_CANVAS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_WIDGET))
|
21
|
+
#define GOO_CANVAS_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_WIDGET, GooCanvasWidgetClass))
|
22
|
+
|
23
|
+
|
24
|
+
typedef struct _GooCanvasWidget GooCanvasWidget;
|
25
|
+
typedef struct _GooCanvasWidgetClass GooCanvasWidgetClass;
|
26
|
+
|
27
|
+
/**
|
28
|
+
* GooCanvasWidget
|
29
|
+
*
|
30
|
+
* The #GooCanvasWidget-struct struct contains private data only.
|
31
|
+
*/
|
32
|
+
struct _GooCanvasWidget
|
33
|
+
{
|
34
|
+
GooCanvasItemSimple parent_object;
|
35
|
+
|
36
|
+
GtkWidget *widget;
|
37
|
+
gdouble x, y, width, height;
|
38
|
+
GtkAnchorType anchor;
|
39
|
+
};
|
40
|
+
|
41
|
+
struct _GooCanvasWidgetClass
|
42
|
+
{
|
43
|
+
GooCanvasItemSimpleClass parent_class;
|
44
|
+
|
45
|
+
/*< private >*/
|
46
|
+
|
47
|
+
/* Padding for future expansion */
|
48
|
+
void (*_goo_canvas_reserved1) (void);
|
49
|
+
void (*_goo_canvas_reserved2) (void);
|
50
|
+
void (*_goo_canvas_reserved3) (void);
|
51
|
+
void (*_goo_canvas_reserved4) (void);
|
52
|
+
};
|
53
|
+
|
54
|
+
|
55
|
+
GType goo_canvas_widget_get_type (void) G_GNUC_CONST;
|
56
|
+
GooCanvasItem* goo_canvas_widget_new (GooCanvasItem *parent,
|
57
|
+
GtkWidget *widget,
|
58
|
+
gdouble x,
|
59
|
+
gdouble y,
|
60
|
+
gdouble width,
|
61
|
+
gdouble height,
|
62
|
+
...);
|
63
|
+
|
64
|
+
G_END_DECLS
|
65
|
+
|
66
|
+
#endif /* __GOO_CANVAS_WIDGET_H__ */
|
@@ -0,0 +1 @@
|
|
1
|
+
timestamp
|
Binary file
|
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
prefix=/home/kou/work/ruby/ruby-gnome2.win32/goocanvas/vendor/local
|
2
|
+
exec_prefix=${prefix}
|
3
|
+
libdir=${exec_prefix}/lib
|
4
|
+
includedir=${prefix}/include
|
5
|
+
|
6
|
+
|
7
|
+
Name: GooCanvas
|
8
|
+
Description: A GTK+ canvas widget using cairo
|
9
|
+
Version: 1.0.0
|
10
|
+
Requires: gtk+-2.0 cairo
|
11
|
+
Libs: -L${libdir} -lgoocanvas
|
12
|
+
Cflags: -I${includedir}/goocanvas-1.0.0 -I${includedir}/goocanvas-1.0.0/goocanvas
|
13
|
+
|