diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..856550c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +build/ +*~ +docs \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a2b212 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +
+

Canvas Demo

+

Testing and Developing the new Canvas Tech for Akira and Spice-Up

+
+ +
+ +## Generate Docs + +``` +valadoc -o docs goocanvas-2.0.vapi --pkg gio-2.0 --pkg gtk+-3.0 --pkg goocanvas-2.0 --force +``` + +## Build the App + +Run `meson build` to configure the build environment and then change to the build directory and run `ninja` to build + + meson build --prefix=/usr + cd build + ninja + +To install, use `ninja install`, then execute with `com.github.philip-scott.canvas-demo` + + sudo ninja install + com.github.philip-scott.canvas-demo diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..9e85bb5 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +com.github.philip-scott.wallpaperize (0.1) UNSTABLE; urgency=low + + * Initial release + + -- Felipe Escoto Wed, 7 Jun 2017 04:52:12 -0600 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..ddf3fd2 --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: com.github.philip-scott.wallpaperize +Section: x11 +Priority: extra +Maintainer: Felipe Escoto +Build-Depends: debhelper (>= 9), + libgtk-3-dev, + valac (>= 0.26), + libgranite-dev, + meson + +Standards-Version: 3.9.3 +Package: com.github.philip-scott.wallpaperize +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Beautify your oddly-sized wallpapers + Turn your oddly sized wallpapers into a piece of beauty diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9f829ff --- /dev/null +++ b/debian/copyright @@ -0,0 +1,25 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: cmake-hello-world +Source: https://github.com/Philip-Scott/wallpaperize + +Files: * +Copyright: 2017 Felipe Escoto +License: GPL-3.0+ + +License: GPL-3.0+ + 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 3 of the License, or + (at your option) any later version. + . + This package 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, see . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..0f38649 --- /dev/null +++ b/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ + +override_dh_auto_clean: + rm -rf debian/build + +override_dh_auto_configure: + mkdir -p debian/build + cd debian/build && meson --prefix=/usr ../.. + +override_dh_auto_build: + cd debian/build && ninja -v + +override_dh_auto_test: + cd debian/build && ninja test + +override_dh_auto_install: + cd debian/build && DESTDIR=${CURDIR}/debian/com.github.philip-scott.wallpaperize ninja install diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..8045759 --- /dev/null +++ b/meson.build @@ -0,0 +1,39 @@ +project('com.github.philip-scott.canvas-demo', ['vala', 'c'], + version: '0.2.0' +) + +gnome = import('gnome') +i18n = import('i18n') + +conf = configuration_data() +conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) +configure_file(output: 'config.h', configuration: conf) +config_h_dir = include_directories('.') + +add_project_arguments(['--vapidir', join_paths(meson.current_source_dir(), 'vapi')], + language: 'vala') + + +c_args = [ + '-include', 'config.h', +] + +executable( + 'com.github.philip-scott.canvas-demo', + 'src/Application.vala', + 'src/Window.vala', + 'src/ResponsiveCanvas.vala', + c_args: c_args, + dependencies: [ + dependency('glib-2.0'), + dependency('gobject-2.0'), + dependency('gtk+-3.0'), + dependency('granite'), + dependency('libsoup-2.4'), + dependency('libsecret-1'), + dependency('goocanvas-2.0'), + ], + install : true +) + +meson.add_install_script('meson/post_install.py') diff --git a/meson/post_install.py b/meson/post_install.py new file mode 100644 index 0000000..9eaefa9 --- /dev/null +++ b/meson/post_install.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +import os +import subprocess + +schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas') + +if not os.environ.get('DESTDIR'): + print('Compiling gsettings schemas...') + subprocess.call(['glib-compile-schemas', schemadir]) \ No newline at end of file diff --git a/src/Application.vala b/src/Application.vala new file mode 100644 index 0000000..c995c95 --- /dev/null +++ b/src/Application.vala @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2018 Felipe Escoto (https://github.com/Philip-Scott) +* +* 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. +* +* Authored by: Felipe Escoto +*/ + +public class Phi.Application : Granite.Application { + public const string PROGRAM_ID = "com.github.philip-scott.canvas-demo"; + public const string PROGRAM_NAME = "CanvasDemo"; + + construct { + flags |= ApplicationFlags.HANDLES_OPEN; + + application_id = PROGRAM_ID; + program_name = PROGRAM_NAME; + exec_name = PROGRAM_ID; + app_launcher = PROGRAM_ID; + + build_version = "1.0.0"; + } + + public static Gtk.Window? window = null; + public static Gtk.Grid grid; + + Goo.Canvas canvas; + bool set_color = false; + + public override void activate () { + var window = new Gtk.Window (); + this.add_window (window); + + canvas = new Phi.ResponsiveCanvas (); + canvas.set_size_request (600, 600); + canvas.set_scale (2.0); + canvas.set_bounds (0, 0, 10000, 10000); + + var root = canvas.get_root_item (); + + var rect_item = Goo.CanvasRect.create (root, 100, 100, 400, 400, + "line-width", 5.0, + "radius-x", 100.0, + "radius-y", 100.0, + "stroke-color", "#f37329", + "fill-color", "#ffa154"); + + rect_item = Goo.CanvasRect.create (root, 50, 100, 200, 100, + "line-width", 5.0, + "stroke-color", "#64baff", + "fill-color", "#3689e6"); + + rect_item = Goo.CanvasRect.create (root, 0, 0, 64, 64, + "radius-x", 32.0, + "radius-y", 32.0, + "line-width", 5.0, + "stroke-color", "#9bdb4d", + "fill-color", "#68b723"); + + window.add (canvas); + window.show_all (); + + window.show (); + } + + public static int main (string[] args) { + /* Initiliaze gettext support */ + Intl.setlocale (LocaleCategory.MESSAGES, Intl.get_language_names ()[0]); + Intl.setlocale (LocaleCategory.NUMERIC, "en_US"); + //Intl.textdomain (Config.GETTEXT_PACKAGE); + + Environment.set_application_name (PROGRAM_NAME); + Environment.set_prgname (PROGRAM_NAME); + + var application = new Phi.Application (); + + return application.run (args); + } +} \ No newline at end of file diff --git a/src/ResponsiveCanvas.vala b/src/ResponsiveCanvas.vala new file mode 100644 index 0000000..1e2c755 --- /dev/null +++ b/src/ResponsiveCanvas.vala @@ -0,0 +1,158 @@ +/* +* Copyright (c) 2018 Felipe Escoto (https://github.com/Philip-Scott) +* +* 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. +* +* Authored by: Felipe Escoto +*/ + +public class Phi.ResponsiveCanvas : Goo.Canvas { + private const int MIN_SIZE = 40; + + /** + * Signal triggered when item was clicked by the user + */ + public signal void item_clicked (Goo.CanvasItem? item); + + /** + * Signal triggered when item has finished moving by the user, + * and a change of it's coordenates was made + */ + public signal void item_moved (Goo.CanvasItem? item); + + + public weak Goo.CanvasItem? selected_item; + + private bool holding; + private double event_x_root; + private double event_y_root; + private double start_x; + private double start_y; + private double delta_x; + private double delta_y; + private double current_scale; + private int holding_id = 0; + + construct { + events |= Gdk.EventMask.BUTTON_PRESS_MASK; + events |= Gdk.EventMask.BUTTON_RELEASE_MASK; + events |= Gdk.EventMask.POINTER_MOTION_MASK; + } + + public override bool button_press_event (Gdk.EventButton event) { + current_scale = get_scale (); + event_x_root = event.x; + event_y_root = event.y; + + selected_item = get_item_at (event.x / current_scale, event.y / current_scale, true); + + if (selected_item != null) { + if (selected_item is Goo.CanvasRect) { + start_x = (selected_item as Goo.CanvasRect).x; + start_y = (selected_item as Goo.CanvasRect).y; + } + + holding = true; + } + + return true; + } + + public override bool button_release_event (Gdk.EventButton event) { + if (!holding) return false; + + holding = false; + + if (delta_x == 0 && delta_y == 0) { // Hidden for now. Just change poss && (start_w == real_width) && (start_h == real_height)) { + return false; + } + + item_moved (selected_item); + + delta_x = 0; + delta_y = 0; + + return false; + } + + public override bool motion_notify_event (Gdk.EventMotion event) { + if (holding) { + double x = (event.x - event_x_root) / current_scale; + double y = (event.y - event_y_root) / current_scale; + switch (holding_id) { + case 0: // Moving + delta_x = x; + delta_y = y; + ((Goo.CanvasRect) selected_item).x = delta_x + start_x; + ((Goo.CanvasRect) selected_item).y = delta_y + start_y; + print (@"$x $y\n"); + + break; + // case 1: // Top left + // delta_x = fix_position (x, real_width, start_w); + // delta_y = fix_position (y, real_height, start_h); + // real_height = fix_size ((int) (start_h - 1 / current_scale * y)); + // real_width = fix_size ((int) (start_w - 1 / current_scale * x)); + // break; + // case 2: // Top + // delta_y = fix_position (y, real_height, start_h); + // real_height = fix_size ((int)(start_h - 1 / current_scale * y)); + // break; + // case 3: // Top right + // delta_y = fix_position (y, real_height, start_h); + // real_height = fix_size ((int)(start_h - 1 / current_scale * y)); + // real_width = fix_size ((int)(start_w + 1 / current_scale * x)); + // break; + // case 4: // Right + // real_width = fix_size ((int)(start_w + 1 / current_scale * x)); + // break; + // case 5: // Bottom Right + // real_width = fix_size ((int)(start_w + 1 / current_scale * x)); + // real_height = fix_size ((int)(start_h + 1 / current_scale * y)); + // break; + // case 6: // Bottom + // real_height = fix_size ((int)(start_h + 1 / current_scale * y)); + // break; + // case 7: // Bottom left + // real_height = fix_size ((int)(start_h + 1 / current_scale * y)); + // real_width = fix_size ((int)(start_w - 1 / current_scale * x)); + // delta_x = fix_position (x, real_width, start_w); + // break; + // case 8: // Left + // real_width = fix_size ((int) (start_w - 1 / current_scale * x)); + // delta_x = fix_position (x, real_width, start_w); + // break; + } + + } + + return false; + } + + // To make it so items can't become imposible to grab. TODOs + private int fix_position (int delta, int length, int initial_length) { + var max_delta = (initial_length - MIN_SIZE) * current_scale; + if (delta < max_delta) { + return delta; + } else { + return (int) max_delta; + } + } + + private int fix_size (int size) { + return size > MIN_SIZE ? size : MIN_SIZE; + } +} \ No newline at end of file diff --git a/src/Window.vala b/src/Window.vala new file mode 100644 index 0000000..f6926c6 --- /dev/null +++ b/src/Window.vala @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2018 Felipe Escoto (https://github.com/Philip-Scott) +* +* 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. +* +* Authored by: Felipe Escoto +*/ + +public class ShareUp.Window : Gtk.Window { + + public Window (Gtk.Application app) { + Object (application: app); + } + + construct { + + } +} diff --git a/vapi/goocanvas-2.0.vapi b/vapi/goocanvas-2.0.vapi new file mode 100644 index 0000000..f2da920 --- /dev/null +++ b/vapi/goocanvas-2.0.vapi @@ -0,0 +1,1080 @@ +/* goocanvas.vapi generated by vapigen, do not modify. */ +[CCode (cprefix = "Goo", gir_namespace = "GooCanvas", gir_version = "2.0", lower_case_cprefix = "goo_")] +namespace Goo { + [CCode (cheader_filename = "goocanvas.h", copy_function = "goo_cairo_matrix_copy", type_id = "GOO_TYPE_CAIRO_MATRIX")] + [Compact] + public class CairoMatrix { + public double x0; + public double xx; + public double xy; + public double y0; + public double yx; + public double yy; + public static Cairo.Matrix copy (Cairo.Matrix matrix); + } + [CCode (cheader_filename = "goocanvas.h", type_id = "goo_cairo_pattern_get_type ()")] + [Compact] + public class CairoPattern { + } + [CCode (cheader_filename = "goocanvas.h")] + public class Canvas : Gtk.Container, Atk.Implementor, Gtk.Buildable { + [CCode (has_construct_function = false)] + public Canvas (); + public void convert_bounds_to_item_space (Goo.CanvasItem item, ref Goo.CanvasBounds bounds); + public void convert_from_item_space (Goo.CanvasItem item, ref double x, ref double y); + public void convert_from_pixels (ref double x, ref double y); + public void convert_to_item_space (Goo.CanvasItem item, ref double x, ref double y); + public void convert_to_pixels (ref double x, ref double y); + public unowned Cairo.Context create_cairo_context (); + public virtual unowned Goo.CanvasItem create_item (Goo.CanvasItemModel model); + public static void create_path (GLib.Array commands, Cairo.Context cr); + public void get_bounds (out unowned double? left, out unowned double? top, out unowned double? right, out unowned double? bottom); + public double get_default_line_width (); + public unowned Goo.CanvasItem? get_item (Goo.CanvasItemModel model); + public unowned Goo.CanvasItem? get_item_at (double x, double y, bool is_pointer_event); + public GLib.List? get_items_at (double x, double y, bool is_pointer_event); + public GLib.List? get_items_in_area (Goo.CanvasBounds area, bool inside_area, bool allow_overlaps, bool include_containers); + public unowned Goo.CanvasItem? get_root_item (); + public unowned Goo.CanvasItemModel? get_root_item_model (); + public double get_scale (); + public unowned Goo.CanvasItem? get_static_root_item (); + public unowned Goo.CanvasItemModel? get_static_root_item_model (); + public void grab_focus (Goo.CanvasItem item); + public Gdk.GrabStatus keyboard_grab (Goo.CanvasItem item, bool owner_events, uint32 time); + public void keyboard_ungrab (Goo.CanvasItem item, uint32 time); + public static GLib.Array parse_path_data (string path_data); + public Gdk.GrabStatus pointer_grab (Goo.CanvasItem item, Gdk.EventMask event_mask, Gdk.Cursor? cursor, uint32 time); + public void pointer_ungrab (Goo.CanvasItem item, uint32 time); + public void register_widget_item (Goo.CanvasWidget witem); + public void render (Cairo.Context cr, Goo.CanvasBounds? bounds, double scale); + public void request_item_redraw (Goo.CanvasBounds bounds, bool is_static); + public void request_redraw (Goo.CanvasBounds bounds); + public void request_update (); + public void scroll_to (double left, double top); + public void set_bounds (double left, double top, double right, double bottom); + public void set_root_item (Goo.CanvasItem item); + public void set_root_item_model (Goo.CanvasItemModel model); + public void set_scale (double scale); + public void set_static_root_item (Goo.CanvasItem item); + public void set_static_root_item_model (Goo.CanvasItemModel model); + public void unregister_item (Goo.CanvasItemModel model); + public void unregister_widget_item (Goo.CanvasWidget witem); + public void update (); + [NoAccessorMethod] + public Goo.CanvasAnchorType anchor { get; set; } + [NoAccessorMethod] + public bool automatic_bounds { get; set; } + [NoAccessorMethod] + public string background_color { set; } + [NoAccessorMethod] + public uint background_color_rgb { set; } + [NoAccessorMethod] + public bool bounds_from_origin { get; set; } + [NoAccessorMethod] + public double bounds_padding { get; set; } + [NoAccessorMethod] + public bool clear_background { get; set; } + [NoAccessorMethod] + public bool integer_layout { get; set; } + [NoAccessorMethod] + public bool redraw_when_scrolled { get; set; } + [NoAccessorMethod] + public double resolution_x { get; set; } + [NoAccessorMethod] + public double resolution_y { get; set; } + public double scale { get; set; } + [NoAccessorMethod] + public double scale_x { get; set; } + [NoAccessorMethod] + public double scale_y { get; set; } + [NoAccessorMethod] + public Gtk.Unit units { get; set; } + [NoAccessorMethod] + public double x1 { get; set; } + [NoAccessorMethod] + public double x2 { get; set; } + [NoAccessorMethod] + public double y1 { get; set; } + [NoAccessorMethod] + public double y2 { get; set; } + public virtual signal void item_created (Goo.CanvasItem item, Goo.CanvasItemModel model); + public virtual signal void set_scroll_adjustments (Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment); + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasEllipse : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasEllipse (); + [CCode (cname = "goo_canvas_ellipse_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasEllipse create (Goo.CanvasItem? parent, double center_x, double center_y, double radius_x, double radius_y, ...); + [NoAccessorMethod] + public double center_x { get; set; } + [NoAccessorMethod] + public double center_y { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double radius_x { get; set; } + [NoAccessorMethod] + public double radius_y { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasEllipseModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasEllipseModel (); + [CCode (cname = "goo_canvas_ellipse_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasEllipseModel create (Goo.CanvasItemModel? parent, double center_x, double center_y, double radius_x, double radius_y, ...); + [NoAccessorMethod] + public double center_x { get; set; } + [NoAccessorMethod] + public double center_y { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double radius_x { get; set; } + [NoAccessorMethod] + public double radius_y { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasGrid : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasGrid (); + [CCode (cname = "goo_canvas_grid_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasGrid create (Goo.CanvasItem? parent, double x, double y, double width, double height, double x_step, double y_step, double x_offset, double y_offset, ...); + [NoAccessorMethod] + public string border_color { set; } + [NoAccessorMethod] + public uint border_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern border_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf border_pixbuf { set; } + [NoAccessorMethod] + public double border_width { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public string horz_grid_line_color { set; } + [NoAccessorMethod] + public uint horz_grid_line_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern horz_grid_line_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf horz_grid_line_pixbuf { set; } + [NoAccessorMethod] + public double horz_grid_line_width { get; set; } + [NoAccessorMethod] + public bool show_horz_grid_lines { get; set; } + [NoAccessorMethod] + public bool show_vert_grid_lines { get; set; } + [NoAccessorMethod] + public string vert_grid_line_color { set; } + [NoAccessorMethod] + public uint vert_grid_line_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern vert_grid_line_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf vert_grid_line_pixbuf { set; } + [NoAccessorMethod] + public double vert_grid_line_width { get; set; } + [NoAccessorMethod] + public bool vert_grid_lines_on_top { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double x_offset { get; set; } + [NoAccessorMethod] + public double x_step { get; set; } + [NoAccessorMethod] + public double y { get; set; } + [NoAccessorMethod] + public double y_offset { get; set; } + [NoAccessorMethod] + public double y_step { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasGridModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasGridModel (); + [CCode (cname = "goo_canvas_grid_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasGridModel create (Goo.CanvasItemModel? parent, double x, double y, double width, double height, double x_step, double y_step, double x_offset, double y_offset, ...); + [NoAccessorMethod] + public string border_color { set; } + [NoAccessorMethod] + public uint border_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern border_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf border_pixbuf { set; } + [NoAccessorMethod] + public double border_width { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public string horz_grid_line_color { set; } + [NoAccessorMethod] + public uint horz_grid_line_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern horz_grid_line_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf horz_grid_line_pixbuf { set; } + [NoAccessorMethod] + public double horz_grid_line_width { get; set; } + [NoAccessorMethod] + public bool show_horz_grid_lines { get; set; } + [NoAccessorMethod] + public bool show_vert_grid_lines { get; set; } + [NoAccessorMethod] + public string vert_grid_line_color { set; } + [NoAccessorMethod] + public uint vert_grid_line_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern vert_grid_line_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf vert_grid_line_pixbuf { set; } + [NoAccessorMethod] + public double vert_grid_line_width { get; set; } + [NoAccessorMethod] + public bool vert_grid_lines_on_top { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double x_offset { get; set; } + [NoAccessorMethod] + public double x_step { get; set; } + [NoAccessorMethod] + public double y { get; set; } + [NoAccessorMethod] + public double y_offset { get; set; } + [NoAccessorMethod] + public double y_step { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasGroup : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasGroup (); + [CCode (cname = "goo_canvas_group_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasGroup create (Goo.CanvasItem? parent, ...); + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasGroupModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasGroupModel (); + [CCode (cname = "goo_canvas_group_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasGroupModel create (Goo.CanvasItemModel? parent, ...); + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasImage : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasImage (); + [CCode (cname = "goo_canvas_image_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasImage create (Goo.CanvasItem? parent, Gdk.Pixbuf pixbuf, double x, double y, ...); + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf pixbuf { set; } + [NoAccessorMethod] + public bool scale_to_fit { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasImageModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasImageModel (); + [CCode (cname = "goo_canvas_image_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasImageModel create (Goo.CanvasItemModel? parent, Gdk.Pixbuf pixbuf, double x, double y, ...); + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf pixbuf { set; } + [NoAccessorMethod] + public bool scale_to_fit { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasItemModelSimple : GLib.Object, Goo.CanvasItemModel { + public weak Goo.CanvasItemModel parent; + public Goo.CanvasItemSimpleData simple_data; + [CCode (has_construct_function = false)] + protected CanvasItemModelSimple (); + [NoAccessorMethod] + public Goo.CairoAntialias antialias { get; set; } + [NoAccessorMethod] + public Goo.CairoFillRule clip_fill_rule { get; set; } + [NoAccessorMethod] + public string clip_path { set; } + [NoAccessorMethod] + public string fill_color { set; } + [NoAccessorMethod] + public uint fill_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern fill_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf fill_pixbuf { set; } + [NoAccessorMethod] + public Goo.CairoFillRule fill_rule { get; set; } + [NoAccessorMethod] + public string font { owned get; set; } + [NoAccessorMethod] + public Pango.FontDescription font_desc { owned get; set; } + [NoAccessorMethod] + public Goo.CairoHintMetrics hint_metrics { get; set; } + [NoAccessorMethod] + public Goo.CairoLineCap line_cap { get; set; } + [NoAccessorMethod] + public Goo.CanvasLineDash line_dash { owned get; set; } + [NoAccessorMethod] + public Goo.CairoLineJoin line_join { get; set; } + [NoAccessorMethod] + public double line_join_miter_limit { get; set; } + [NoAccessorMethod] + public double line_width { get; set; } + [NoAccessorMethod] + public Goo.CairoOperator operator { get; set; } + [NoAccessorMethod] + public string stroke_color { set; } + [NoAccessorMethod] + public uint stroke_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern stroke_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf stroke_pixbuf { set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasItemSimple : GLib.Object, Goo.CanvasItem { + public Goo.CanvasBounds bounds; + public weak Goo.Canvas canvas; + public weak Goo.CanvasItemModelSimple model; + public uint need_entire_subtree_update; + public uint need_update; + public weak Goo.CanvasItem parent; + public Goo.CanvasItemSimpleData simple_data; + [CCode (has_construct_function = false)] + protected CanvasItemSimple (); + public void changed (bool recompute_bounds); + public bool check_in_path (double x, double y, Cairo.Context cr, Goo.CanvasPointerEvents pointer_events); + public void check_style (); + public double get_line_width (); + public void get_path_bounds (Cairo.Context cr, out Goo.CanvasBounds bounds); + public void paint_path (Cairo.Context cr); + [NoWrapper] + public virtual void simple_create_path (Cairo.Context cr); + [NoWrapper] + public virtual bool simple_is_item_at (double x, double y, Cairo.Context cr, bool is_pointer_event); + [NoWrapper] + public virtual void simple_paint (Cairo.Context cr, Goo.CanvasBounds bounds); + [NoWrapper] + public virtual void simple_update (Cairo.Context cr); + public void user_bounds_to_device (Cairo.Context cr, Goo.CanvasBounds bounds); + public void user_bounds_to_parent (Cairo.Context cr, Goo.CanvasBounds bounds); + [NoAccessorMethod] + public Goo.CairoAntialias antialias { get; set; } + [NoAccessorMethod] + public Goo.CairoFillRule clip_fill_rule { get; set; } + [NoAccessorMethod] + public string clip_path { set; } + [NoAccessorMethod] + public string fill_color { set; } + [NoAccessorMethod] + public uint fill_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern fill_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf fill_pixbuf { set; } + [NoAccessorMethod] + public Goo.CairoFillRule fill_rule { get; set; } + [NoAccessorMethod] + public string font { owned get; set; } + [NoAccessorMethod] + public Pango.FontDescription font_desc { owned get; set; } + [NoAccessorMethod] + public Goo.CairoHintMetrics hint_metrics { get; set; } + [NoAccessorMethod] + public Goo.CairoLineCap line_cap { get; set; } + [NoAccessorMethod] + public Goo.CanvasLineDash line_dash { owned get; set; } + [NoAccessorMethod] + public Goo.CairoLineJoin line_join { get; set; } + [NoAccessorMethod] + public double line_join_miter_limit { get; set; } + [NoAccessorMethod] + public double line_width { get; set; } + [NoAccessorMethod] + public Goo.CairoOperator operator { get; set; } + [NoAccessorMethod] + public string stroke_color { set; } + [NoAccessorMethod] + public uint stroke_color_rgba { get; set; } + [NoAccessorMethod] + public Goo.CairoPattern stroke_pattern { owned get; set; } + [NoAccessorMethod] + public Gdk.Pixbuf stroke_pixbuf { set; } + } + [CCode (cheader_filename = "goocanvas.h", ref_function = "goo_canvas_line_dash_ref", type_id = "GOO_TYPE_CANVAS_LINE_DASH", unref_function = "goo_canvas_line_dash_unref")] + [Compact] + public class CanvasLineDash { + public double dash_offset; + public double* dashes; + public int num_dashes; + public int ref_count; + [CCode (has_construct_function = false)] + public CanvasLineDash (int num_dashes); + [CCode (has_construct_function = false)] + public CanvasLineDash.newv (int num_dashes, double* dashes); + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasPath : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasPath (); + [CCode (cname = "goo_canvas_path_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasPath create (Goo.CanvasItem? parent, string path_data, ...); + [NoAccessorMethod] + public string data { set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasPathModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasPathModel (); + [CCode (cname = "goo_canvas_path_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasPathModel create (Goo.CanvasItemModel? parent, string path_data, ...); + [NoAccessorMethod] + public string data { set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h", ref_function = "goo_canvas_points_ref", type_id = "GOO_TYPE_CANVAS_POINTS", unref_function = "goo_canvas_points_unref")] + [Compact] + public class CanvasPoints { + public double* coords; + public int num_points; + public int ref_count; + [CCode (has_construct_function = false)] + public CanvasPoints (int num_points); + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasPolyline : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasPolyline (); + [CCode (cname = "goo_canvas_polyline_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasPolyline create (Goo.CanvasItem? parent, bool close_path, int num_points, ...); + [CCode (cname = "goo_canvas_polyline_new_line", type = "GooCanvasItem*")] + public static unowned Goo.CanvasPolyline create_line (Goo.CanvasItem? parent, double x1, double y1, double x2, double y2, ...); + [NoAccessorMethod] + public double arrow_length { get; set; } + [NoAccessorMethod] + public double arrow_tip_length { get; set; } + [NoAccessorMethod] + public double arrow_width { get; set; } + [NoAccessorMethod] + public bool close_path { get; set; } + [NoAccessorMethod] + public bool end_arrow { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public Goo.CanvasPoints points { owned get; set; } + [NoAccessorMethod] + public bool start_arrow { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + [Compact] + public class CanvasPolylineArrowData { + public double arrow_length; + public double arrow_tip_length; + public double arrow_width; + [CCode (array_length = false)] + public weak double[] end_arrow_coords; + [CCode (array_length = false)] + public weak double[] line_end; + [CCode (array_length = false)] + public weak double[] line_start; + [CCode (array_length = false)] + public weak double[] start_arrow_coords; + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasPolylineModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasPolylineModel (); + [CCode (cname = "goo_canvas_polyline_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasPolylineModel create (Goo.CanvasItemModel? parent, bool close_path, int num_points, ...); + [CCode (cname = "goo_canvas_polyline_model_new_line", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasPolylineModel create_line (Goo.CanvasItemModel? parent, double x1, double y1, double x2, double y2, ...); + [NoAccessorMethod] + public double arrow_length { get; set; } + [NoAccessorMethod] + public double arrow_tip_length { get; set; } + [NoAccessorMethod] + public double arrow_width { get; set; } + [NoAccessorMethod] + public bool close_path { get; set; } + [NoAccessorMethod] + public bool end_arrow { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public Goo.CanvasPoints points { owned get; set; } + [NoAccessorMethod] + public bool start_arrow { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasRect : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasRect (); + [CCode (cname = "goo_canvas_rect_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasRect create (Goo.CanvasItem? parent, double x, double y, double width, double height, ...); + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double radius_x { get; set; } + [NoAccessorMethod] + public double radius_y { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasRectModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasRectModel (); + [CCode (cname = "goo_canvas_rect_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasRectModel create (Goo.CanvasItemModel? parent, double x, double y, double width, double height, ...); + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public double radius_x { get; set; } + [NoAccessorMethod] + public double radius_y { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasStyle : GLib.Object { + public weak Goo.CanvasStyle? parent; + public weak GLib.Array properties; + [CCode (has_construct_function = false)] + public CanvasStyle (); + public Goo.CanvasStyle copy (); + public unowned Goo.CanvasStyle? get_parent (); + public unowned GLib.Value? get_property (GLib.Quark property_id); + public bool set_fill_options (Cairo.Context cr); + public void set_parent (Goo.CanvasStyle? parent); + public void set_property (GLib.Quark property_id, GLib.Value value); + public bool set_stroke_options (Cairo.Context cr); + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasTable : Goo.CanvasGroup, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasTable (); + [CCode (cname = "goo_canvas_table_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasTable create (Goo.CanvasItem? parent, ...); + [NoAccessorMethod] + public double column_spacing { get; set; } + [NoAccessorMethod] + public bool homogeneous_columns { get; set; } + [NoAccessorMethod] + public bool homogeneous_rows { get; set; } + [NoAccessorMethod] + public double horz_grid_line_width { get; set; } + [NoAccessorMethod] + public double row_spacing { get; set; } + [NoAccessorMethod] + public double vert_grid_line_width { get; set; } + [NoAccessorMethod] + public double x_border_spacing { get; set; } + [NoAccessorMethod] + public double y_border_spacing { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasTableModel : Goo.CanvasGroupModel, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasTableModel (); + [CCode (cname = "goo_canvas_table_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasTableModel create (Goo.CanvasItemModel? parent, ...); + [NoAccessorMethod] + public double column_spacing { get; set; } + [NoAccessorMethod] + public bool homogeneous_columns { get; set; } + [NoAccessorMethod] + public bool homogeneous_rows { get; set; } + [NoAccessorMethod] + public double horz_grid_line_width { get; set; } + [NoAccessorMethod] + public double row_spacing { get; set; } + [NoAccessorMethod] + public double vert_grid_line_width { get; set; } + [NoAccessorMethod] + public double x_border_spacing { get; set; } + [NoAccessorMethod] + public double y_border_spacing { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasText : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasText (); + [CCode (cname = "goo_canvas_text_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasText create (Goo.CanvasItem? parent, string str, double x, double y, double width, Goo.CanvasAnchorType anchor, ...); + public void get_natural_extents (out unowned Pango.Rectangle? ink_rect, out unowned Pango.Rectangle? logical_rect); + [NoAccessorMethod] + public Pango.Alignment alignment { get; set; } + [NoAccessorMethod] + public Goo.CanvasAnchorType anchor { get; set; } + [NoAccessorMethod] + public Pango.EllipsizeMode ellipsize { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public string text { owned get; set; } + [NoAccessorMethod] + public bool use_markup { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public Pango.WrapMode wrap { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasTextModel : Goo.CanvasItemModelSimple, Goo.CanvasItemModel { + [CCode (has_construct_function = false)] + protected CanvasTextModel (); + [CCode (cname = "goo_canvas_text_model_new", type = "GooCanvasItemModel*")] + public static unowned Goo.CanvasTextModel create (Goo.CanvasItemModel? parent, string str, double x, double y, double width, Goo.CanvasAnchorType anchor, ...); + [NoAccessorMethod] + public Pango.Alignment alignment { get; set; } + [NoAccessorMethod] + public Goo.CanvasAnchorType anchor { get; set; } + [NoAccessorMethod] + public Pango.EllipsizeMode ellipsize { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public string text { owned get; set; } + [NoAccessorMethod] + public bool use_markup { get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public Pango.WrapMode wrap { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public class CanvasWidget : Goo.CanvasItemSimple, Goo.CanvasItem { + [CCode (has_construct_function = false)] + protected CanvasWidget (); + [CCode (cname = "goo_canvas_widget_new", type = "GooCanvasItem*")] + public static unowned Goo.CanvasWidget create (Goo.CanvasItem? parent, Gtk.Widget widget, double x, double y, double width, double height, ...); + [NoAccessorMethod] + public Goo.CanvasAnchorType anchor { get; set; } + [NoAccessorMethod] + public double height { get; set; } + [NoAccessorMethod] + public Gtk.Widget widget { owned get; set; } + [NoAccessorMethod] + public double width { get; set; } + [NoAccessorMethod] + public double x { get; set; } + [NoAccessorMethod] + public double y { get; set; } + } + [CCode (cheader_filename = "goocanvas.h")] + public interface CanvasItem : GLib.Object { + public abstract void add_child (Goo.CanvasItem child, int position); + public abstract void allocate_area (Cairo.Context cr, Goo.CanvasBounds requested_area, Goo.CanvasBounds allocated_area, double x_offset, double y_offset); + public void animate (double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, Goo.CanvasAnimateType type); + public static unowned GLib.ParamSpec? class_find_child_property (GLib.ObjectClass iclass, string property_name); + public static void class_install_child_property (GLib.ObjectClass iclass, uint property_id, GLib.ParamSpec pspec); + public static GLib.ParamSpec[] class_list_child_properties (GLib.ObjectClass iclass, out uint n_properties); + public void ensure_updated (); + public int find_child (Goo.CanvasItem child); + public abstract void get_bounds (out Goo.CanvasBounds bounds); + public abstract unowned Goo.Canvas get_canvas (); + public abstract unowned Goo.CanvasItem? get_child (int child_num); + public void get_child_properties (Goo.CanvasItem child, ...); + public abstract void get_child_property (Goo.CanvasItem child, string property_name, out GLib.Value value); + public abstract bool get_is_static (); + public abstract unowned GLib.List get_items_at (double x, double y, Cairo.Context cr, bool is_pointer_event, bool parent_is_visible, GLib.List found_items); + public abstract unowned Goo.CanvasItemModel? get_model (); + public abstract int get_n_children (); + public abstract unowned Goo.CanvasItem? get_parent (); + public abstract bool get_requested_area (Cairo.Context cr, out Goo.CanvasBounds requested_area); + public abstract double get_requested_height (Cairo.Context cr, double width); + public bool get_simple_transform (out double x, out double y, out double scale, out double rotation); + public abstract unowned Goo.CanvasStyle get_style (); + public abstract bool get_transform (out Cairo.Matrix transform); + public abstract bool get_transform_for_child (Goo.CanvasItem child, out Cairo.Matrix transform); + public bool is_container (); + public abstract bool is_visible (); + public void lower (Goo.CanvasItem? below); + public abstract void move_child (int old_position, int new_position); + public abstract void paint (Cairo.Context cr, Goo.CanvasBounds bounds, double scale); + public void raise (Goo.CanvasItem? above); + public void remove (); + public abstract void remove_child (int child_num); + public abstract void request_update (); + public void rotate (double degrees, double cx, double cy); + public void scale (double sx, double sy); + public abstract void set_canvas (Goo.Canvas canvas); + public void set_child_properties (Goo.CanvasItem child, ...); + public abstract void set_child_property (Goo.CanvasItem child, string property_name, GLib.Value value); + public abstract void set_is_static (bool is_static); + public abstract void set_model (Goo.CanvasItemModel model); + public abstract void set_parent (Goo.CanvasItem parent); + public void set_simple_transform (double x, double y, double scale, double rotation); + public abstract void set_style (Goo.CanvasStyle style); + public abstract void set_transform (Cairo.Matrix? transform); + public void skew_x (double degrees, double cx, double cy); + public void skew_y (double degrees, double cx, double cy); + public void stop_animation (); + public void translate (double tx, double ty); + public abstract void update (bool entire_tree, Cairo.Context cr, Goo.CanvasBounds bounds); + [NoAccessorMethod] + public bool can_focus { get; set; } + [NoAccessorMethod] + public string description { owned get; set; } + public Goo.CanvasItem parent { get; set; } + [NoAccessorMethod] + public Goo.CanvasPointerEvents pointer_events { get; set; } + [NoAccessorMethod] + public string title { owned get; set; } + [NoAccessorMethod] + public string tooltip { owned get; set; } + public Goo.CairoMatrix transform { get; set; } + [NoAccessorMethod] + public Goo.CanvasItemVisibility visibility { get; set; } + [NoAccessorMethod] + public double visibility_threshold { get; set; } + public signal void animation_finished (bool stopped); + public signal bool button_press_event (Goo.CanvasItem target, Gdk.EventButton event); + public signal bool button_release_event (Goo.CanvasItem target, Gdk.EventButton event); + public signal void child_notify (GLib.ParamSpec pspec); + public signal bool enter_notify_event (Goo.CanvasItem target, Gdk.EventCrossing event); + public signal bool focus_in_event (Goo.CanvasItem target, Gdk.EventFocus event); + public signal bool focus_out_event (Goo.CanvasItem target, Gdk.EventFocus event); + public signal bool grab_broken_event (Goo.CanvasItem target, Gdk.EventGrabBroken event); + public signal bool key_press_event (Goo.CanvasItem target, Gdk.EventKey event); + public signal bool key_release_event (Goo.CanvasItem target, Gdk.EventKey event); + public signal bool leave_notify_event (Goo.CanvasItem target, Gdk.EventCrossing event); + public signal bool motion_notify_event (Goo.CanvasItem target, Gdk.EventMotion event); + public signal bool query_tooltip (double x, double y, bool keyboard_tooltip, Gtk.Tooltip tooltip); + public signal bool scroll_event (Goo.CanvasItem target, Gdk.Event event); + } + [CCode (cheader_filename = "goocanvas.h")] + public interface CanvasItemModel : GLib.Object { + public abstract void add_child (Goo.CanvasItemModel child, int position); + public void animate (double x, double y, double scale, double degrees, bool absolute, int duration, int step_time, Goo.CanvasAnimateType type); + public static unowned GLib.ParamSpec? class_find_child_property (GLib.ObjectClass mclass, string property_name); + public static void class_install_child_property (GLib.ObjectClass mclass, uint property_id, GLib.ParamSpec pspec); + public static GLib.ParamSpec[] class_list_child_properties (GLib.ObjectClass iclass, out uint n_properties); + [NoWrapper] + public abstract unowned Goo.CanvasItem create_item (Goo.Canvas canvas); + public int find_child (Goo.CanvasItemModel child); + public abstract unowned Goo.CanvasItemModel? get_child (int child_num); + public void get_child_properties (Goo.CanvasItem child, ...); + public abstract void get_child_property (Goo.CanvasItemModel child, string property_name, out GLib.Value value); + public abstract int get_n_children (); + public abstract unowned Goo.CanvasItemModel? get_parent (); + public bool get_simple_transform (out double x, out double y, out double scale, out double rotation); + public abstract unowned Goo.CanvasStyle get_style (); + public abstract bool get_transform (out Cairo.Matrix transform); + public bool is_container (); + public void lower (Goo.CanvasItemModel? below); + public abstract void move_child (int old_position, int new_position); + public void raise (Goo.CanvasItemModel? above); + public void remove (); + public abstract void remove_child (int child_num); + public void rotate (double degrees, double cx, double cy); + public void scale (double sx, double sy); + public void set_child_properties (Goo.CanvasItem child, ...); + public abstract void set_child_property (Goo.CanvasItemModel child, string property_name, GLib.Value value); + public abstract void set_parent (Goo.CanvasItemModel parent); + public void set_simple_transform (double x, double y, double scale, double rotation); + public abstract void set_style (Goo.CanvasStyle style); + public abstract void set_transform (Cairo.Matrix? transform); + public void skew_x (double degrees, double cx, double cy); + public void skew_y (double degrees, double cx, double cy); + public void stop_animation (); + public void translate (double tx, double ty); + [NoAccessorMethod] + public bool can_focus { get; set; } + [NoAccessorMethod] + public string description { owned get; set; } + public Goo.CanvasItemModel parent { get; set; } + [NoAccessorMethod] + public Goo.CanvasPointerEvents pointer_events { get; set; } + [NoAccessorMethod] + public string title { owned get; set; } + [NoAccessorMethod] + public string tooltip { owned get; set; } + public Goo.CairoMatrix transform { get; set; } + [NoAccessorMethod] + public Goo.CanvasItemVisibility visibility { get; set; } + [NoAccessorMethod] + public double visibility_threshold { get; set; } + public signal void animation_finished (bool stopped); + public signal void changed (bool recompute_bounds); + public signal void child_added (int child_num); + public signal void child_moved (int old_child_num, int new_child_num); + public signal void child_notify (GLib.ParamSpec pspec); + public signal void child_removed (int child_num); + } + [CCode (cheader_filename = "goocanvas.h")] + public struct CanvasBounds { + public double x1; + public double y1; + public double x2; + public double y2; + } + [CCode (cheader_filename = "goocanvas.h")] + public struct CanvasItemSimpleData { + public Cairo.Matrix? transform; + public weak GLib.Array clip_path_commands; + public weak Goo.CanvasStyle style; + public weak string tooltip; + public double visibility_threshold; + public uint visibility; + public uint pointer_events; + public uint can_focus; + public uint own_style; + public uint clip_fill_rule; + public uint is_static; + public uint cache_setting; + public uint has_tooltip; + } + [CCode (cheader_filename = "goocanvas.h", type_id = "GOO_TYPE_CANVAS_PATH_COMMAND")] + public struct CanvasPathCommand { + public Goo.CanvasPathCommandSimple simple; + public Goo.CanvasPathCommandCurve curve; + public Goo.CanvasPathCommandArc arc; + } + [CCode (cheader_filename = "goocanvas.h")] + public struct CanvasPathCommandArc { + public uint type; + public uint relative; + public uint large_arc_flag; + public uint sweep_flag; + public double rx; + public double ry; + public double x_axis_rotation; + public double x; + public double y; + } + [CCode (cheader_filename = "goocanvas.h")] + public struct CanvasPathCommandCurve { + public uint type; + public uint relative; + public double x; + public double y; + public double x1; + public double y1; + public double x2; + public double y2; + } + [CCode (cheader_filename = "goocanvas.h")] + public struct CanvasPathCommandSimple { + public uint type; + public uint relative; + public double x; + public double y; + } + [CCode (cheader_filename = "goocanvas.h")] + public struct CanvasStyleProperty { + public GLib.Quark id; + public GLib.Value value; + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "CAIRO_ANTIALIAS_")] + public enum CairoAntialias { + DEFAULT, + NONE, + GRAY, + SUBPIXEL + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "CAIRO_FILL_RULE_")] + public enum CairoFillRule { + WINDING, + EVEN_ODD + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "CAIRO_HINT_METRICS_")] + public enum CairoHintMetrics { + DEFAULT, + OFF, + ON + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "CAIRO_LINE_CAP_")] + public enum CairoLineCap { + BUTT, + ROUND, + SQUARE + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "CAIRO_LINE_JOIN_")] + public enum CairoLineJoin { + MITER, + ROUND, + BEVEL + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "CAIRO_OPERATOR_")] + public enum CairoOperator { + CLEAR, + SOURCE, + OVER, + IN, + OUT, + ATOP, + DEST, + DEST_OVER, + DEST_IN, + DEST_OUT, + DEST_ATOP, + XOR, + ADD, + SATURATE + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "GOO_CANVAS_ANCHOR_", type_id = "goo_canvas_anchor_type_get_type ()")] + public enum CanvasAnchorType { + CENTER, + NORTH, + NORTH_WEST, + NORTH_EAST, + SOUTH, + SOUTH_WEST, + SOUTH_EAST, + WEST, + EAST, + N, + NW, + NE, + S, + SW, + SE, + W, + E + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "GOO_CANVAS_ANIMATE_")] + public enum CanvasAnimateType { + FREEZE, + RESET, + RESTART, + BOUNCE + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "GOO_CANVAS_ITEM_")] + public enum CanvasItemVisibility { + HIDDEN, + INVISIBLE, + VISIBLE, + VISIBLE_ABOVE_THRESHOLD + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "GOO_CANVAS_PATH_")] + public enum CanvasPathCommandType { + MOVE_TO, + CLOSE_PATH, + LINE_TO, + HORIZONTAL_LINE_TO, + VERTICAL_LINE_TO, + CURVE_TO, + SMOOTH_CURVE_TO, + QUADRATIC_CURVE_TO, + SMOOTH_QUADRATIC_CURVE_TO, + ELLIPTICAL_ARC + } + [CCode (cheader_filename = "goocanvas.h", cprefix = "GOO_CANVAS_EVENTS_")] + [Flags] + public enum CanvasPointerEvents { + VISIBLE_MASK, + PAINTED_MASK, + FILL_MASK, + STROKE_MASK, + NONE, + VISIBLE_PAINTED, + VISIBLE_FILL, + VISIBLE_STROKE, + VISIBLE, + PAINTED, + FILL, + STROKE, + ALL + } + [CCode (cheader_filename = "goocanvas.h")] + public const int NUM_ARROW_POINTS; +} \ No newline at end of file