/*
* ion/ioncore/conf.c
*
- * Copyright (c) Tuomo Valkonen 1999-2006.
+ * Copyright (c) Tuomo Valkonen 1999-2007.
*
* Ion is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
END_STRINGINTMAP
};
+static bool get_winprop_fn_set=FALSE;
+static ExtlFn get_winprop_fn;
+
+static bool get_layout_fn_set=FALSE;
+static ExtlFn get_layout_fn;
+
/*EXTL_DOC
* Set ioncore basic settings. The table \var{tab} may contain the
* \var{float_placement_method} & (string) How to place floating frames.
* One of ''udlr'' (up-down, then left-right),
* ''lrud'' (left-right, then up-down) or ''random''. \\
- * \var{default_ws_params} & (table) Default workspace layout; the
- * attach/creation parameters for a \type{WGroup}. \\
* \end{tabularx}
*
* When a keyboard resize function is called, and at most \var{kbresize_t_max}
int dd, rd;
char *wst, *tmp;
ExtlTab t;
+ ExtlFn fn;
extl_table_gets_b(tab, "opaque_resize", &(ioncore_g.opaque_resize));
extl_table_gets_b(tab, "warp", &(ioncore_g.warp_enabled));
ioncore_set_moveres_accel(tab);
ioncore_groupws_set(tab);
+
+ /* Internal -- therefore undocumented above */
+ if(extl_table_gets_f(tab, "_get_winprop", &fn)){
+ if(get_winprop_fn_set)
+ extl_unref_fn(get_winprop_fn);
+ get_winprop_fn=fn;
+ get_winprop_fn_set=TRUE;
+ }
+
+ if(extl_table_gets_f(tab, "_get_layout", &fn)){
+ if(get_layout_fn_set)
+ extl_unref_fn(get_layout_fn);
+ get_layout_fn=fn;
+ get_layout_fn_set=TRUE;
+ }
+
}
return tab;
}
-
+
+
+ExtlTab ioncore_get_winprop(WClientWin *cwin)
+{
+ ExtlTab tab=extl_table_none();
+
+ if(get_winprop_fn_set){
+ extl_protect(NULL);
+ extl_call(get_winprop_fn, "o", "t", cwin, &tab);
+ extl_unprotect(NULL);
+ }
+
+ return tab;
+}
+
+
+ExtlTab ioncore_get_layout(const char *layout)
+{
+ ExtlTab tab=extl_table_none();
+
+ if(get_layout_fn_set){
+ extl_protect(NULL);
+ extl_call(get_layout_fn, "s", "t", layout, &tab);
+ extl_unprotect(NULL);
+ }
+
+ return tab;
+}
+
/*EXTL_DOC
* Get important directories (userdir, sessiondir, searchpath).
ret=extl_read_config(cfgfile, ".", TRUE);
- unset+=(ioncore_rootwin_bindmap->nbindings==0);
+ unset+=(ioncore_screen_bindmap->nbindings==0);
unset+=(ioncore_mplex_bindmap->nbindings==0);
unset+=(ioncore_frame_bindmap->nbindings==0);