Add a SugarGrid object to replace the numpy implementation. Part of the fix for #8394

This commit is contained in:
Marco Pesenti Gritti
2008-09-10 18:29:19 +02:00
parent 1ac335f271
commit 388f74a56d
6 changed files with 238 additions and 5 deletions
+46
View File
@@ -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