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:29:13 (GMT) |
commit | e622c4ec993082d69bf49e542e17574dc1ccefc8 (patch) | |
tree | 7c7a692c0001f990839478c89b16b1c7b4f4b5f3 /src/sugar/_sugarext.defs | |
parent | 6fa05a8cd68826411d355e506385f5439c569a18 (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 2b795d7..a3d0f71 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 |