added Get_Geometry.
This commit is contained in:
parent
443e7ebb9c
commit
72e7e23b89
|
@ -351,6 +351,28 @@ s48_value Query_Pointer (s48_value Xdisplay, s48_value Xwindow) {
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s48_value Get_Geometry(s48_value Xdisplay, s48_value Xdrawable) {
|
||||||
|
s48_value v;
|
||||||
|
Window root;
|
||||||
|
unsigned int x,y,width,height,border_width,depth;
|
||||||
|
S48_DECLARE_GC_PROTECT(1);
|
||||||
|
|
||||||
|
XGetGeometry(EXTRACT_DISPLAY(Xdisplay), EXTRACT_DRAWABLE(Xdrawable),
|
||||||
|
&root, &x, &y, &width, &height, &border_width, &depth);
|
||||||
|
|
||||||
|
v = s48_make_vector(7, S48_FALSE);
|
||||||
|
S48_GC_PROTECT_1(v);
|
||||||
|
S48_VECTOR_SET(v, 0, ENTER_WINDOW(root));
|
||||||
|
S48_VECTOR_SET(v, 1, s48_enter_integer(x));
|
||||||
|
S48_VECTOR_SET(v, 2, s48_enter_integer(y));
|
||||||
|
S48_VECTOR_SET(v, 3, s48_enter_integer(width));
|
||||||
|
S48_VECTOR_SET(v, 4, s48_enter_integer(height));
|
||||||
|
S48_VECTOR_SET(v, 5, s48_enter_integer(border_width));
|
||||||
|
S48_VECTOR_SET(v, 6, s48_enter_integer(depth));
|
||||||
|
S48_GC_UNPROTECT();
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
void s48_init_window(void) {
|
void s48_init_window(void) {
|
||||||
S48_EXPORT_FUNCTION(Create_Window);
|
S48_EXPORT_FUNCTION(Create_Window);
|
||||||
S48_EXPORT_FUNCTION(Destroy_Window);
|
S48_EXPORT_FUNCTION(Destroy_Window);
|
||||||
|
@ -366,5 +388,6 @@ void s48_init_window(void) {
|
||||||
S48_EXPORT_FUNCTION(Query_Tree);
|
S48_EXPORT_FUNCTION(Query_Tree);
|
||||||
S48_EXPORT_FUNCTION(Translate_Coordinates);
|
S48_EXPORT_FUNCTION(Translate_Coordinates);
|
||||||
S48_EXPORT_FUNCTION(Query_Pointer);
|
S48_EXPORT_FUNCTION(Query_Pointer);
|
||||||
|
S48_EXPORT_FUNCTION(Get_Geometry);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue