more api additions to suport writign E17... :)

SVN revision: 3957
This commit is contained in:
Carsten Haitzler 2000-12-08 00:37:52 +00:00
parent 1175ab0854
commit 96561852bf
2 changed files with 51 additions and 6 deletions

View File

@ -223,6 +223,7 @@ void e_dnd_send_drop(Window win, Window source_win);
int e_window_get_gravity(Window win);
void e_window_gravity_reset(Window win);
void e_window_gravity_set(Window win, int gravity);
void e_window_bit_gravity_set(Window win, int gravity);
void e_pointer_warp_by(int dx, int dy);
void e_pointer_warp_to(int x, int y);
void e_gc_set_include_inferiors(GC gc);
@ -250,6 +251,9 @@ int e_window_get_wm_size_hints(Window win, XSizeHints *hints, in
int e_window_is_visible(Window win);
int e_window_is_normal(Window win);
int e_window_is_manageable(Window win);
void e_windows_restack(Window *wins, int num);
void e_window_stack_above(Window win, Window above);
void e_window_stack_below(Window win, Window below);
typedef struct _eev Eevent;
typedef struct _ev_fd_handler Ev_Fd_Handler;

View File

@ -2314,17 +2314,17 @@ e_window_gravity_reset(Window win)
{
E_XID *xid = NULL;
if (XFindContext(disp, win, xid_context, (XPointer *) & xid) == XCNOENT)
return;
xid = e_validate_xid(win);
if (xid)
{
XSetWindowAttributes att;
if (xid->gravity != NorthWestGravity)
/* if (xid->gravity != NorthWestGravity)*/
{
att.win_gravity = NorthWestGravity;
XChangeWindowAttributes(disp, win, CWWinGravity, &att);
xid->gravity = NorthWestGravity;
xid->coords_invalid = 1;
}
}
}
@ -2334,21 +2334,36 @@ e_window_gravity_set(Window win, int gravity)
{
E_XID *xid = NULL;
if (XFindContext(disp, win, xid_context, (XPointer *) & xid) == XCNOENT)
return;
xid = e_validate_xid(win);
if (xid)
{
if (xid->gravity != gravity)
/* if (xid->gravity != gravity)*/
{
XSetWindowAttributes att;
att.win_gravity = gravity;
XChangeWindowAttributes(disp, win, CWWinGravity, &att);
xid->gravity = gravity;
xid->coords_invalid = 1;
}
}
}
void
e_window_bit_gravity_set(Window win, int gravity)
{
E_XID *xid = NULL;
xid = e_validate_xid(win);
if (xid)
{
XSetWindowAttributes att;
att.bit_gravity = gravity;
XChangeWindowAttributes(disp, win, CWBitGravity, &att);
}
}
void
e_pointer_warp_by(int dx, int dy)
{
@ -2685,3 +2700,29 @@ e_window_is_manageable(Window win)
}
return 0;
}
void
e_windows_restack(Window *wins, int num)
{
XRestackWindows(disp, wins, num);
}
void
e_window_stack_above(Window win, Window above)
{
XWindowChanges xwc;
xwc.sibling = above;
xwc.stack_mode = Above;
XConfigureWindow(disp, win, CWSibling | CWStackMode, &xwc);
}
void
e_window_stack_below(Window win, Window below)
{
XWindowChanges xwc;
xwc.sibling = below;
xwc.stack_mode = Below;
XConfigureWindow(disp, win, CWSibling | CWStackMode, &xwc);
}