+ added new types, interface and structure for region.
This commit is contained in:
parent
5bd0685662
commit
45c05c8475
|
@ -1,4 +1,4 @@
|
||||||
OBJECTS = main.o display.o window.o type.o color.o colormap.o pixel.o gcontext.o event.o pixmap.o graphics.o font.o cursor.o text.o property.o wm.o client.o key.o error.o extension.o init.o util.o grab.o visual.o
|
OBJECTS = main.o display.o window.o type.o color.o colormap.o pixel.o gcontext.o event.o pixmap.o graphics.o font.o cursor.o text.o property.o wm.o client.o key.o error.o extension.o init.o util.o grab.o visual.o region.o
|
||||||
|
|
||||||
$(OBJECTS): xlib.h
|
$(OBJECTS): xlib.h
|
||||||
.c.o:
|
.c.o:
|
||||||
|
|
|
@ -23,6 +23,7 @@ extern void scx_init_init();
|
||||||
extern void scx_init_util();
|
extern void scx_init_util();
|
||||||
extern void scx_init_grab();
|
extern void scx_init_grab();
|
||||||
extern void scx_init_visual();
|
extern void scx_init_visual();
|
||||||
|
extern void scx_init_region();
|
||||||
|
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
|
@ -50,6 +51,7 @@ int main(){
|
||||||
s48_add_external_init(scx_init_util);
|
s48_add_external_init(scx_init_util);
|
||||||
s48_add_external_init(scx_init_grab);
|
s48_add_external_init(scx_init_grab);
|
||||||
s48_add_external_init(scx_init_visual);
|
s48_add_external_init(scx_init_visual);
|
||||||
|
s48_add_external_init(scx_init_region);
|
||||||
|
|
||||||
s48_main(8000000, 64000,
|
s48_main(8000000, 64000,
|
||||||
"/afs/wsi/home/dfreese/i386_fbsd43/scsh-0.6/lib/scheme48/scsh.image",
|
"/afs/wsi/home/dfreese/i386_fbsd43/scsh-0.6/lib/scheme48/scsh.image",
|
||||||
|
|
|
@ -52,6 +52,8 @@ extern char* s48_extract_symbol(s48_value);
|
||||||
#define SCX_EXTRACT_FONTSTRUCT(x) (XFontStruct*)s48_extract_integer(x)
|
#define SCX_EXTRACT_FONTSTRUCT(x) (XFontStruct*)s48_extract_integer(x)
|
||||||
#define SCX_ENTER_VISUAL(x) s48_enter_integer((long)x)
|
#define SCX_ENTER_VISUAL(x) s48_enter_integer((long)x)
|
||||||
#define SCX_EXTRACT_VISUAL(x) (Visual*)s48_extract_integer(x)
|
#define SCX_EXTRACT_VISUAL(x) (Visual*)s48_extract_integer(x)
|
||||||
|
#define SCX_ENTER_REGION(x) s48_enter_integer((long)x)
|
||||||
|
#define SCX_EXTRACT_REGION(x) (Region)s48_extract_integer(x)
|
||||||
|
|
||||||
extern unsigned long AList_To_XWindowChanges(s48_value alist,
|
extern unsigned long AList_To_XWindowChanges(s48_value alist,
|
||||||
XWindowChanges* WC);
|
XWindowChanges* WC);
|
||||||
|
|
|
@ -144,7 +144,9 @@
|
||||||
parse-color
|
parse-color
|
||||||
alloc-color-cells
|
alloc-color-cells
|
||||||
set-color-cell
|
set-color-cell
|
||||||
|
set-color-cells
|
||||||
create-colormap
|
create-colormap
|
||||||
|
copy-colormap-and-free
|
||||||
))
|
))
|
||||||
|
|
||||||
(define-interface xlib-pixel-interface
|
(define-interface xlib-pixel-interface
|
||||||
|
@ -441,6 +443,29 @@
|
||||||
match-visual-info
|
match-visual-info
|
||||||
))
|
))
|
||||||
|
|
||||||
|
(define-interface xlib-region-interface
|
||||||
|
(export region?
|
||||||
|
destroy-region
|
||||||
|
create-region
|
||||||
|
clip-box
|
||||||
|
region-empty?
|
||||||
|
region-equal?
|
||||||
|
point-in-region?
|
||||||
|
rectangle-in-region?
|
||||||
|
intersect-region
|
||||||
|
union-region
|
||||||
|
union-rectangle-with-region
|
||||||
|
subtract-region
|
||||||
|
xor-region
|
||||||
|
offset-region!
|
||||||
|
shrink-region!
|
||||||
|
polygon-region
|
||||||
|
set-region
|
||||||
|
copy-region!
|
||||||
|
duplicate-region
|
||||||
|
offset-region
|
||||||
|
shrink-region))
|
||||||
|
|
||||||
;; all together
|
;; all together
|
||||||
|
|
||||||
(define-interface xlib-interface
|
(define-interface xlib-interface
|
||||||
|
@ -466,4 +491,5 @@
|
||||||
xlib-utility-interface
|
xlib-utility-interface
|
||||||
xlib-grab-interface
|
xlib-grab-interface
|
||||||
xlib-visual-interface
|
xlib-visual-interface
|
||||||
|
xlib-region-interface
|
||||||
))
|
))
|
|
@ -156,6 +156,12 @@
|
||||||
xlib-types)
|
xlib-types)
|
||||||
(files visual))
|
(files visual))
|
||||||
|
|
||||||
|
(define-structure xlib-region xlib-region-interface
|
||||||
|
(open scheme
|
||||||
|
external-calls
|
||||||
|
xlib-types)
|
||||||
|
(files region))
|
||||||
|
|
||||||
;; all together
|
;; all together
|
||||||
|
|
||||||
(define-structure xlib xlib-interface
|
(define-structure xlib xlib-interface
|
||||||
|
@ -181,5 +187,6 @@
|
||||||
xlib-utility
|
xlib-utility
|
||||||
xlib-grab
|
xlib-grab
|
||||||
xlib-visual
|
xlib-visual
|
||||||
|
xlib-region
|
||||||
)
|
)
|
||||||
(optimize auto-integrate))
|
(optimize auto-integrate))
|
||||||
|
|
|
@ -96,6 +96,17 @@
|
||||||
cursor-Xcursor
|
cursor-Xcursor
|
||||||
free-cursor))
|
free-cursor))
|
||||||
|
|
||||||
|
(define-interface xlib-visual-type-interface
|
||||||
|
(export visual?
|
||||||
|
make-visual
|
||||||
|
visual-Xvisual))
|
||||||
|
|
||||||
|
(define-interface xlib-region-type-interface
|
||||||
|
(export region?
|
||||||
|
make-region
|
||||||
|
destroy-region
|
||||||
|
region-Xregion))
|
||||||
|
|
||||||
;; all in one
|
;; all in one
|
||||||
|
|
||||||
(define-interface xlib-types-interface
|
(define-interface xlib-types-interface
|
||||||
|
@ -113,4 +124,6 @@
|
||||||
xlib-font-type-interface
|
xlib-font-type-interface
|
||||||
xlib-atom-type-interface
|
xlib-atom-type-interface
|
||||||
xlib-cursor-type-interface
|
xlib-cursor-type-interface
|
||||||
|
xlib-visual-type-interface
|
||||||
|
xlib-region-type-interface
|
||||||
))
|
))
|
|
@ -29,4 +29,5 @@
|
||||||
font-type
|
font-type
|
||||||
atom-type
|
atom-type
|
||||||
cursor-type
|
cursor-type
|
||||||
visual-type))
|
visual-type
|
||||||
|
region-type))
|
Loading…
Reference in New Issue