Add a SugarGrid object to replace the numpy implementation. Part of the fix for #8394
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user