diff options
author | Marco Pesenti Gritti <mpgritti@gmail.com> | 2008-09-10 16:29:19 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpgritti@gmail.com> | 2008-09-13 11:30:10 (GMT) |
commit | 388f74a56d1c9f5cae06c1e475092d08e6f5d8a7 (patch) | |
tree | b160ef895d6ba403bdbd2b5f1e2575d2d45867f4 /src/sugar/_sugarext.defs | |
parent | 1ac335f2718b26d01fbb2ecca82a2f81c97446f3 (diff) |
Add a SugarGrid object to replace the numpy implementation. Part of the fix for #8394
Diffstat (limited to 'src/sugar/_sugarext.defs')
-rw-r--r-- | src/sugar/_sugarext.defs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/sugar/_sugarext.defs b/src/sugar/_sugarext.defs index 72ff7af..bd9f052 100644 --- a/src/sugar/_sugarext.defs +++ b/src/sugar/_sugarext.defs @@ -22,6 +22,13 @@ (gtype-id "SUGAR_TYPE_MENU") ) +(define-object Grid + (in-module "Sugar") + (parent "GObject") + (c-name "SugarGrid") + (gtype-id "SUGAR_TYPE_GRID") +) + (define-object Preview (in-module "Sugar") (parent "GObject") @@ -95,6 +102,45 @@ (return-type "none") ) +;; From sugar-grid.h + +(define-method setup + (of-object "SugarGrid") + (c-name "sugar_grid_setup") + (return-type "none") + (parameters + '("gint" "width") + '("gint" "height") + ) +) + +(define-method add_weight + (of-object "SugarGrid") + (c-name "sugar_grid_add_weight") + (return-type "none") + (parameters + '("GdkRectangle*" "rect") + ) +) + +(define-method remove_weight + (of-object "SugarGrid") + (c-name "sugar_grid_remove_weight") + (return-type "none") + (parameters + '("GdkRectangle*" "rect") + ) +) + +(define-method compute_weight + (of-object "SugarGrid") + (c-name "sugar_grid_compute_weight") + (return-type "guint") + (parameters + '("GdkRectangle*" "rect") + ) +) + ;; From sugar-key-grabber.h (define-function sugar_key_grabber_get_type |