forked from enlightenment/enlightenment
Add handy functions for getting dual-app mode safe regions (safe regions
being space that is available to place a window). SVN revision: 44557
This commit is contained in:
parent
0900c11347
commit
91c093d45a
|
@ -3,6 +3,7 @@
|
|||
#include "e_mod_layout.h"
|
||||
#include "e_mod_layout_illume.h"
|
||||
#include "e_mod_config.h"
|
||||
#include "e_kbd.h"
|
||||
|
||||
// internal calls
|
||||
static void _e_mod_layout_cb_hook_container_layout(void *data, void *data2);
|
||||
|
@ -495,6 +496,49 @@ illume_border_min_get(E_Border *bd, int *mw, int *mh)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
illume_border_app1_safe_region_get(E_Zone *zone, int *x, int *y, int *w, int *h)
|
||||
{
|
||||
int ty, th;
|
||||
int kx, ky, kw, kh;
|
||||
int nx, ny, nw, nh;
|
||||
|
||||
if (!zone) return;
|
||||
e_kbd_safe_app_region_get(zone, &kx, &ky, &kw, &kh);
|
||||
nx = kx;
|
||||
ny = ky;
|
||||
nw = kw;
|
||||
illume_border_top_shelf_pos_get(NULL, &ty);
|
||||
illume_border_top_shelf_size_get(NULL, &th);
|
||||
nh = (ky + ty);
|
||||
if (x) *x = nx;
|
||||
if (y) *y = ny;
|
||||
if (w) *w = nw;
|
||||
if (h) *h = nh;
|
||||
}
|
||||
|
||||
void
|
||||
illume_border_app2_safe_region_get(E_Zone *zone, int *x, int *y, int *w, int *h)
|
||||
{
|
||||
int ty, th, bh;
|
||||
int kx, ky, kw, kh;
|
||||
int nx, ny, nw, nh;
|
||||
|
||||
if (!zone) return;
|
||||
e_kbd_safe_app_region_get(zone, &kx, &ky, &kw, &kh);
|
||||
nx = kx;
|
||||
nw = kw;
|
||||
illume_border_top_shelf_pos_get(NULL, &ty);
|
||||
illume_border_top_shelf_size_get(NULL, &th);
|
||||
illume_border_bottom_panel_size_get(NULL, &bh);
|
||||
ny = (ty + th);
|
||||
nh = (kh - ny - bh);
|
||||
if (x) *x = nx;
|
||||
if (y) *y = ny;
|
||||
if (w) *w = nw;
|
||||
if (h) *h = nh;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_mod_layout_cb_hook_container_layout(void *data, void *data2)
|
||||
{
|
||||
|
|
|
@ -69,4 +69,7 @@ void illume_border_bottom_panel_size_get(int *w, int *h);
|
|||
void illume_border_slide_to(E_Border *bd, int x, int y, Illume_Anim_Class aclass);
|
||||
void illume_border_min_get(E_Border *bd, int *mw, int *mh);
|
||||
|
||||
void illume_border_app1_safe_region_get(E_Zone *zone, int *x, int *y, int *w, int *h);
|
||||
void illume_border_app2_safe_region_get(E_Zone *zone, int *x, int *y, int *w, int *h);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue