Also allow different fonts for borders vs. menus. This adds links in /usr/local/share/enlightenment/fonts (default install) for a menu.ttf and a text.ttf file. text.tff is the font used for border text/window titles. menu.ttf will be used for menus. No change by default, but you'll need to re-run autogen.sh & make install for the links to be created automatically.
Update AUTHORS
Kevin Brosius <cobra@compuserve.com>
SVN revision: 6751
Burra <burra@colorado.edu>
Graham MacDonald <macdonag@lineone.net>
Alan Schmitt <alan.schmitt@inria.fr>
+Kevin Brosius <cobra@compuserve.com>
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-1.sticky-1.shaded-1.bits.db
ln -sf selected-0.sticky-0.shaded-0.bits.db selected-0.sticky-1.shaded-1.bits.db
cd ..
+
+cd fonts
+ln -sf borzoib.ttf menu.ttf
+ln -sf borzoib.ttf text.ttf
width, (E_Data_Value) 1);
E_DATA_NODE(cfg_desktops, "height", E_DATA_TYPE_INT, NULL, E_Config_Desktops,
height, (E_Data_Value) 1);
+ E_DATA_NODE(cfg_desktops, "cursors/e_native", E_DATA_TYPE_INT,
+ NULL, E_Config_Desktops, e_native_cursors, (E_Data_Value) 1);
}
void
int speed;
int width;
int height;
+ int e_native_cursors;
};
typedef struct _E_Config_Guides E_Config_Guides;
#include "config.h"
#include "util.h"
#include "file.h"
+#include <X11/cursorfont.h>
+#if 0
+/* XCursor */
+#include <X11/Xcursor/Xcursor.h>
+#endif
typedef struct _e_cursor E_Cursor;
char *type;
Cursor cursor;
time_t mod;
+ int x_cursor_id;
};
static int cursor_change = 0;
c->mod = e_file_mod_time(buf);
E_DB_INT_GET(buf, "/cursor/x", hx, ok);
E_DB_INT_GET(buf, "/cursor/y", hy, ok);
+ /* Handle x_cursor if available */
+ E_DB_INT_GET(buf, "/cursor/x_id", c->x_cursor_id, ok);
+ if(!ok)
+ c->x_cursor_id = XC_arrow;
+
+ /* Some sample code to load XCursor data directly. */
+ /* This works, but shading and colorization is different */
+ /* than native XFree86 XCursors. It appears the xcursorgen */
+ /* program does some preprocessing. We could do the same. */
+#if 0
+ /* XCursor */
+ if(0)
+ {
+ Evas *ic_e;
+ Evas_Object *e_im;
+ int *idata;
+ int wid, hei;
+ XcursorImage * xcur;
+
+ snprintf(buf, PATH_MAX, "%s/%s.db",
+ e_config_get("cursors"), type);
+
+ ic_e = e_evas_new_all(ecore_display_get(), 0,
+ 0, 0, 200, 200, "");
+ e_im = evas_object_image_add(ic_e);
+ evas_object_image_file_set(e_im, buf, "/cursor/image");
+ idata = evas_object_image_data_get(e_im, 1);
+ evas_object_image_size_get(e_im, &wid, &hei);
+
+ /* Make sure width and height are sane, protect ourselves.*/
+ if(wid > 128) wid=128;
+ if(hei > 128) hei=128;
+
+ xcur = XcursorImageCreate( wid, hei);
+ xcur->pixels = /*Xmalloc ? */(int *) malloc(wid * hei * 4);
+ if(!xcur->pixels)
+ D("Failed alloc!!!!!!!!!!\n");
+ memcpy(xcur->pixels, idata, wid*hei*4);
+ xcur->xhot = hx;
+ xcur->yhot = hy;
+
+ c->cursor = XcursorImageLoadCursor(ecore_display_get(), xcur);
+
+ evas_object_del(e_im);
+ }
+ else
+ {
+#endif
+
+ /* Only load images for native cursors */
+ if(config_data->desktops->e_native_cursors)
+ {
+
snprintf(buf, PATH_MAX, "%s/%s.db:/cursor/image",
e_config_get("cursors"), type);
+
im = imlib_load_image(buf);
if (im)
{
FREE(c);
c = NULL;
}
+
+
+ }
+ /* end native cursors */
+
+
if (c)
{
c->cursor =
ecore_pixmap_free(mask);
cursors = evas_list_append(cursors, c);
}
+#if 0
+ } /* XCursor */
+#endif
}
if (c)
- ecore_cursor_set(win, c->cursor);
+ {
+ /* If behavior.db has /desktops/cursors/native == 1, then use */
+ /* images installed */
+ /* by E, else use X cursors by cursorfont id. */
+ if(config_data->desktops->e_native_cursors)
+ ecore_cursor_set(win, c->cursor);
+ else
+ {
+ Cursor x_cursor;
+ x_cursor = XCreateFontCursor(ecore_display_get(), c->x_cursor_id);
+ ecore_cursor_set(win, x_cursor);
+ }
+ }
else
{
if (!strcmp(type, "Default"))
if (mi->str)
{
mi->obj_text = evas_object_text_add(m->evas);
- evas_object_text_font_set(mi->obj_text, "borzoib", 8);
+ evas_object_text_font_set(mi->obj_text, "menu", 8);
evas_object_text_text_set(mi->obj_text, mi->str);
evas_object_color_set(mi->obj_text, 0, 0, 0, 255);
evas_object_show(mi->obj_text);
t->text = strdup("");
t->evas = evas;
t->obj.o1 = evas_object_text_add(t->evas);
- evas_object_text_font_set(t->obj.o1, "borzoib", 8);
+ evas_object_text_font_set(t->obj.o1, "text", 8);
evas_object_text_text_set(t->obj.o1, t->text);
t->obj.o2 = evas_object_text_add(t->evas);
- evas_object_text_font_set(t->obj.o2, "borzoib", 8);
+ evas_object_text_font_set(t->obj.o2, "text", 8);
evas_object_text_text_set(t->obj.o2, t->text);
t->obj.o3 = evas_object_text_add(t->evas);
- evas_object_text_font_set(t->obj.o3, "borzoib", 8);
+ evas_object_text_font_set(t->obj.o3, "text", 8);
evas_object_text_text_set(t->obj.o3, t->text);
t->obj.o4 = evas_object_text_add(t->evas);
- evas_object_text_font_set(t->obj.o4, "borzoib", 8);
+ evas_object_text_font_set(t->obj.o4, "text", 8);
evas_object_text_text_set(t->obj.o4, t->text);
t->obj.text = evas_object_text_add(t->evas);
- evas_object_text_font_set(t->obj.text, "borzoib", 8);
+ evas_object_text_font_set(t->obj.text, "text", 8);
evas_object_text_text_set(t->obj.text, t->text);
evas_object_pass_events_set(t->obj.o1, 1);