mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
changes related to plugin system & drawstring
This commit is contained in:
@@ -2212,8 +2212,10 @@ getTextRenderer(WScreen *scr, WDefaultEntry *entry, proplist_t value,
|
||||
elem = PLGetArrayElement(value, 2); /* function name */
|
||||
if (!elem || !PLIsString(elem)) return False;
|
||||
func = PLGetString(elem);
|
||||
scr->drawstring_func[changed] = wPluginCreateFunction (W_FUNCTION_DRAWSTRING,
|
||||
lib, "initDrawString", func, "destroyDrawString", value,
|
||||
scr->drawstring_func[changed] = wPluginCreateFunction(W_FUNCTION_DRAWSTRING,
|
||||
lib, "initDrawString",
|
||||
wPluginPackData(2, func, "widthOfString"),
|
||||
"destroyDrawString", value,
|
||||
wPluginPackData(3, dpy, &scr->w_colormap, "dummy"));
|
||||
}
|
||||
|
||||
|
||||
@@ -947,9 +947,11 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
{
|
||||
WScreen *scr = fwin->screen_ptr;
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
#define DRAWSTRING_CURRENT_STATE fwin->flags.state + fwin->drawstring_proc_offset
|
||||
Pixmap *background;
|
||||
Pixmap tmp_bg;
|
||||
int tb = fwin->top_width;
|
||||
WPluginData *pd;
|
||||
#endif
|
||||
|
||||
if (fwin->flags.is_client_window_frame)
|
||||
@@ -1083,11 +1085,28 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
scr->b_pixmaps[WBUT_XKBGROUP1 + fwin->languagemode];
|
||||
#endif
|
||||
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if(scr->drawstring_func[DRAWSTRING_CURRENT_STATE]) {
|
||||
title = ShrinkString(*fwin->font, fwin->title,
|
||||
fwin->titlebar->width - lofs - rofs,
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]);
|
||||
titlelen = strlen(title);
|
||||
pd = wPluginPackData(1, scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->data);
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->proc.widthOfString[W_DSPROC_WIDTHOFSTRING](
|
||||
title, titlelen, pd, &w, NULL, NULL);
|
||||
wfree(pd);
|
||||
} else {
|
||||
title = ShrinkString(*fwin->font, fwin->title,
|
||||
fwin->titlebar->width - lofs - rofs, NULL);
|
||||
titlelen = strlen(title);
|
||||
w = WMWidthOfString(*fwin->font, title, titlelen);
|
||||
}
|
||||
#else
|
||||
title = ShrinkString(*fwin->font, fwin->title,
|
||||
fwin->titlebar->width - lofs - rofs);
|
||||
titlelen = strlen(title);
|
||||
w = WMWidthOfString(*fwin->font, title, titlelen);
|
||||
|
||||
#endif
|
||||
switch (fwin->flags.justification) {
|
||||
case WTJ_LEFT:
|
||||
x = lofs;
|
||||
@@ -1109,28 +1128,25 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
fwin->title_pixel[fwin->flags.state]);
|
||||
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
#define DRAWSTRING_CURRENT_STATE fwin->flags.state + fwin->drawstring_proc_offset
|
||||
/* if the plugin want to do shrinking locally, they can trick
|
||||
* wmaker by returning a very short value (such as 0) to widthOfString -- I think */
|
||||
if (scr->drawstring_func[DRAWSTRING_CURRENT_STATE]) {
|
||||
void **p;
|
||||
|
||||
p = wPluginPackData(6,
|
||||
/* 0 number of argument, will be passed */
|
||||
pd = wPluginPackData(6, /* number of argument, will be passed */
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->data,
|
||||
/* 1 plugin data, as it was initialized */
|
||||
background,
|
||||
/* 2 current background Pixmap */
|
||||
fwin->title_gc, /* 3 gc */
|
||||
*fwin->font, /* 4 WMFont** */
|
||||
/* 0 plugin data, as it was initialized */
|
||||
background, /* 1 current background Pixmap */
|
||||
fwin->title_gc, /* 2 gc */
|
||||
*fwin->font, /* 3 WMFont** */
|
||||
&fwin->titlebar->width,
|
||||
/* 5 suggested width */
|
||||
&tb /* 6 suggested height */
|
||||
/* 4 suggested width */
|
||||
&tb /* 5 suggested height */
|
||||
);
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->proc.drawString(
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->proc.drawString[W_DSPROC_DRAWSTRING](
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->arg,
|
||||
fwin->titlebar->window,
|
||||
x, 0,
|
||||
fwin->title, strlen(fwin->title), p);
|
||||
free(p);
|
||||
title, strlen(fwin->title), pd);
|
||||
wfree(pd);
|
||||
} else {
|
||||
WMDrawString(scr->wmscreen, fwin->titlebar->window,
|
||||
*fwin->title_gc, *fwin->font,
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "window.h"
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
#include "plugin.h"
|
||||
#endif
|
||||
|
||||
typedef void (WCallBack)(void *cdata);
|
||||
|
||||
@@ -116,7 +119,11 @@ WWindow *NextToFocusBefore(WWindow *wwin);
|
||||
|
||||
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
|
||||
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
char *ShrinkString(WMFont *font, char *string, int width, WFunction *func);
|
||||
#else
|
||||
char *ShrinkString(WMFont *font, char *string, int width);
|
||||
#endif
|
||||
|
||||
char *FindImage(char *paths, char *file);
|
||||
|
||||
|
||||
@@ -824,8 +824,13 @@ wIconPaint(WIcon *icon)
|
||||
int l;
|
||||
int w;
|
||||
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
tmp = ShrinkString(scr->icon_title_font, icon->icon_name,
|
||||
wPreferences.icon_size-4, NULL);
|
||||
#else
|
||||
tmp = ShrinkString(scr->icon_title_font, icon->icon_name,
|
||||
wPreferences.icon_size-4);
|
||||
#endif
|
||||
w = WMWidthOfString(scr->icon_title_font, tmp, l=strlen(tmp));
|
||||
|
||||
if (w > icon->core->width - 4)
|
||||
|
||||
68
src/menu.c
68
src/menu.c
@@ -731,6 +731,14 @@ paintEntry(WMenu *menu, int index, int selected)
|
||||
WScreen *scr=menu->frame->screen_ptr;
|
||||
Window win = menu->menu->window;
|
||||
WMenuEntry *entry=menu->entries[index];
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
Pixmap tmp_bg;
|
||||
Pixmap *texture_data;
|
||||
WPluginData *p;
|
||||
int _y;
|
||||
int tb = menu->entry_height; /* convert short into int */
|
||||
#endif
|
||||
|
||||
|
||||
if (!menu->flags.realized) return;
|
||||
h = menu->entry_height;
|
||||
@@ -800,12 +808,6 @@ paintEntry(WMenu *menu, int index, int selected)
|
||||
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (scr->drawstring_func[W_STRING_MTEXT]) {
|
||||
Pixmap tmp_bg;
|
||||
Pixmap *texture_data;
|
||||
void **p;
|
||||
int _y;
|
||||
int tb = menu->entry_height; /* convert short into int */
|
||||
|
||||
_y = (wPreferences.menu_style == MS_NORMAL) ? 0 : y;
|
||||
texture_data = menu->flags.brother ?
|
||||
&menu->brother->menu_texture_data : &menu->menu_texture_data;
|
||||
@@ -835,10 +837,9 @@ paintEntry(WMenu *menu, int index, int selected)
|
||||
&textGC,
|
||||
scr->menu_entry_font,
|
||||
&menu->frame->core->width,
|
||||
&tb,
|
||||
"extendable");
|
||||
&tb, "extendable");
|
||||
|
||||
scr->drawstring_func[W_STRING_MTEXT]->proc.drawString(
|
||||
scr->drawstring_func[W_STRING_MTEXT]->proc.drawString[W_DSPROC_DRAWSTRING](
|
||||
scr->drawstring_func[W_STRING_MTEXT]->arg,
|
||||
win,
|
||||
x, y,
|
||||
@@ -908,11 +909,54 @@ paintEntry(WMenu *menu, int index, int selected)
|
||||
/* draw right text */
|
||||
|
||||
if (entry->rtext && entry->cascade<0) {
|
||||
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (scr->drawstring_func[W_STRING_MTEXT]) {
|
||||
/*
|
||||
p = wPluginPackData(1, scr->drawstring_func[W_STRING_MTEXT]->data);
|
||||
scr->drawstring_func[W_STRING_MTEXT]->proc.widthOfString[W_DSPROC_WIDTHOFSTRING](
|
||||
entry->rtext, strlen(entry->rtext), p, &tw, NULL, NULL);
|
||||
wfree(p);
|
||||
|
||||
texture_data = menu->flags.brother ?
|
||||
&menu->brother->menu_texture_data : &menu->menu_texture_data;
|
||||
|
||||
tmp_bg = XCreatePixmap(dpy, win, w, menu->entry_height,
|
||||
DefaultDepth(dpy, DefaultScreen(dpy)));
|
||||
|
||||
XCopyArea(dpy, win, tmp_bg, textGC,
|
||||
0, y, w, menu->entry_height, 0, 0);
|
||||
|
||||
p = wPluginPackData(6,
|
||||
scr->drawstring_func[W_STRING_MTEXT]->data,
|
||||
&tmp_bg,
|
||||
&textGC,
|
||||
scr->menu_entry_font,
|
||||
&menu->frame->core->width,
|
||||
&tb, "extendable");
|
||||
|
||||
scr->drawstring_func[W_STRING_MTEXT]->proc.drawString[W_DSPROC_DRAWSTRING](
|
||||
scr->drawstring_func[W_STRING_MTEXT]->arg,
|
||||
win,
|
||||
w-0-tw, y,
|
||||
entry->rtext, strlen(entry->rtext), p);
|
||||
|
||||
XFreePixmap(dpy, tmp_bg);
|
||||
|
||||
free(p);
|
||||
*/
|
||||
} else {
|
||||
tw = WMWidthOfString(scr->menu_entry_font, entry->rtext,
|
||||
strlen(entry->rtext));
|
||||
WMDrawString(scr->wmscreen, win, textGC, scr->menu_entry_font, w-6-tw,
|
||||
y + 3 + wPreferences.menu_text_clearance, entry->rtext, strlen(entry->rtext));
|
||||
}
|
||||
#else
|
||||
tw = WMWidthOfString(scr->menu_entry_font, entry->rtext,
|
||||
strlen(entry->rtext));
|
||||
|
||||
WMDrawString(scr->wmscreen, win, textGC, scr->menu_entry_font, w-6-tw,
|
||||
y + 3 + wPreferences.menu_text_clearance, entry->rtext, strlen(entry->rtext));
|
||||
WMDrawString(scr->wmscreen, win, textGC, scr->menu_entry_font, w-6-tw,
|
||||
y + 3 + wPreferences.menu_text_clearance, entry->rtext, strlen(entry->rtext));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
51
src/misc.c
51
src/misc.c
@@ -48,6 +48,7 @@
|
||||
#include "dialog.h"
|
||||
#include "xutil.h"
|
||||
#include "xmodifier.h"
|
||||
#include "plugin.h"
|
||||
|
||||
|
||||
/**** global variables *****/
|
||||
@@ -420,23 +421,45 @@ SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y)
|
||||
|
||||
|
||||
char*
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
ShrinkString(WMFont *font, char *string, int width, WFunction *func)
|
||||
#else
|
||||
ShrinkString(WMFont *font, char *string, int width)
|
||||
#endif
|
||||
{
|
||||
int w, w1=0;
|
||||
int p;
|
||||
char *pos;
|
||||
char *text;
|
||||
int p1, p2, t;
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
WPluginData *pd;
|
||||
#endif
|
||||
|
||||
if (wPreferences.multi_byte_text)
|
||||
return wstrdup(string);
|
||||
|
||||
p = strlen(string);
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (func) {
|
||||
pd = wPluginPackData(1, func->data);
|
||||
func->proc.widthOfString[W_DSPROC_WIDTHOFSTRING](
|
||||
string, strlen(string), pd, &w, NULL, NULL);
|
||||
} else w = WMWidthOfString(font, string, p);
|
||||
#else
|
||||
w = WMWidthOfString(font, string, p);
|
||||
#endif
|
||||
text = wmalloc(strlen(string)+8);
|
||||
strcpy(text, string);
|
||||
if (w<=width)
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
{
|
||||
if (func) wfree(pd);
|
||||
return text;
|
||||
}
|
||||
#else
|
||||
return text;
|
||||
#endif
|
||||
|
||||
pos = strchr(text, ' ');
|
||||
if (!pos)
|
||||
@@ -445,7 +468,14 @@ ShrinkString(WMFont *font, char *string, int width)
|
||||
if (pos) {
|
||||
*pos = 0;
|
||||
p = strlen(text);
|
||||
w1 = WMWidthOfString(font, text, p);
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (func) {
|
||||
func->proc.widthOfString[W_DSPROC_WIDTHOFSTRING](
|
||||
text, strlen(text), pd, &w1, NULL, NULL);
|
||||
} else w1 = WMWidthOfString(font, text, p);
|
||||
#else
|
||||
w1 = WMWidthOfString(font, text, p);
|
||||
#endif
|
||||
if (w1 > width) {
|
||||
w1 = 0;
|
||||
p = 0;
|
||||
@@ -462,14 +492,28 @@ ShrinkString(WMFont *font, char *string, int width)
|
||||
*text=0;
|
||||
}
|
||||
strcat(text, "...");
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (func) {
|
||||
func->proc.widthOfString[W_DSPROC_WIDTHOFSTRING](
|
||||
"...", 3, pd, &w1, NULL, NULL);
|
||||
} else w1 = WMWidthOfString(font, "...", 3);
|
||||
width -= w1;
|
||||
#else
|
||||
width -= WMWidthOfString(font, "...", 3);
|
||||
|
||||
#endif
|
||||
pos = string;
|
||||
p1=0;
|
||||
p2=p;
|
||||
t = (p2-p1)/2;
|
||||
while (p2>p1 && p1!=t) {
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (func) {
|
||||
func->proc.widthOfString[W_DSPROC_WIDTHOFSTRING](
|
||||
&string[p-t], t, pd, &w, NULL, NULL);
|
||||
} else w = WMWidthOfString(font, &string[p-t], t);
|
||||
#else
|
||||
w = WMWidthOfString(font, &string[p-t], t);
|
||||
#endif
|
||||
if (w>width) {
|
||||
p2 = t;
|
||||
t = p1+(p2-p1)/2;
|
||||
@@ -479,6 +523,9 @@ ShrinkString(WMFont *font, char *string, int width)
|
||||
} else
|
||||
p2=p1=t;
|
||||
}
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (func) wfree(pd);
|
||||
#endif
|
||||
strcat(text, &string[p-p1]);
|
||||
|
||||
return text;
|
||||
|
||||
39
src/plugin.c
39
src/plugin.c
@@ -45,30 +45,33 @@
|
||||
#include <proplist.h>
|
||||
|
||||
|
||||
void**
|
||||
WPluginData*
|
||||
wPluginPackData(int members, ...)
|
||||
{
|
||||
void **p;
|
||||
va_list vp;
|
||||
int i;
|
||||
p = wmalloc(sizeof(void *) * (members + 1));
|
||||
memset(p, 0, sizeof(void *) * (members + 1));
|
||||
p[0] = (void *)members;
|
||||
WPluginData *data;
|
||||
data = wmalloc(sizeof(WPluginData));
|
||||
data->size = members;
|
||||
data->array = wmalloc(sizeof(void *) * (members));
|
||||
memset(data->array, 0, sizeof(void *) * (members));
|
||||
va_start(vp, members);
|
||||
for(i=1;i<members+1;i++) {
|
||||
p[i] = va_arg(vp, void *);
|
||||
for(i=0;i<members;i++) {
|
||||
data->array[i] = va_arg(vp, void *);
|
||||
}
|
||||
va_end(vp);
|
||||
return p;
|
||||
return data;
|
||||
}
|
||||
|
||||
WFunction *
|
||||
wPluginCreateFunction(int type, char *library_name,
|
||||
char *init_proc_name, char *proc_name, char *free_data_proc_name,
|
||||
proplist_t pl_arg, void *init_data)
|
||||
char *init_proc_name, WPluginData *proc_name, char *free_data_proc_name,
|
||||
proplist_t pl_arg, WPluginData *init_data)
|
||||
{
|
||||
WFunction *function;
|
||||
_DL_InitDataProc *initProc;
|
||||
int i;
|
||||
|
||||
function = wmalloc(sizeof(WFunction));
|
||||
memset(function, 0, sizeof(WFunction));
|
||||
@@ -80,12 +83,17 @@ wPluginCreateFunction(int type, char *library_name,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
function->proc.any = dlsym(function->handle, proc_name);
|
||||
if (!function->proc.any) {
|
||||
wwarning(_("function \"%s\" not found in library \"%s\""), proc_name, library_name);
|
||||
dlclose(function->handle);
|
||||
wfree(function);
|
||||
return NULL;
|
||||
i = proc_name->size;
|
||||
function->proc.any = wmalloc(sizeof(_DL_AnyProc) * i);
|
||||
for (i = 0; i < proc_name->size; i++) {
|
||||
function->proc.any[i] = dlsym(function->handle, (char *)proc_name->array[i]);
|
||||
if (!function->proc.any[i]) {
|
||||
wwarning(_("function \"%s\" not found in library \"%s\""), proc_name, library_name);
|
||||
dlclose(function->handle);
|
||||
wfree(function->proc.any);
|
||||
wfree(function);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (free_data_proc_name) {
|
||||
@@ -129,6 +137,7 @@ wPluginDestroyFunction(WFunction *function)
|
||||
wfree(function->data);
|
||||
}
|
||||
if (function->arg) PLRelease(function->arg);
|
||||
if (function->proc.any) wfree(function->proc.any);
|
||||
wfree(function);
|
||||
return;
|
||||
}
|
||||
|
||||
35
src/plugin.h
35
src/plugin.h
@@ -39,6 +39,11 @@
|
||||
#define W_FUNCTION_ANY 0
|
||||
#define W_FUNCTION_DRAWSTRING 1
|
||||
|
||||
typedef struct _WPluginData {
|
||||
int size;
|
||||
void **array;
|
||||
} WPluginData;
|
||||
|
||||
typedef void _DL_AnyProc(proplist_t);
|
||||
|
||||
/* first 3 must == WS_FOCUSED WS_UNFOCUSED WS_PFOCUSED -- ]d */
|
||||
@@ -50,27 +55,29 @@ typedef void _DL_AnyProc(proplist_t);
|
||||
#define W_STRING_MTEXT 4
|
||||
#define W_STRING_MEMBERS 5
|
||||
|
||||
typedef void _DL_DrawStringProc(proplist_t, Drawable, int, int, char*, int, void**);
|
||||
typedef void _DL_DrawStringProc(proplist_t, Drawable, int, int, char*, int, WPluginData*);
|
||||
typedef void _DL_WidthStringProc(char*, int, WPluginData*, int*, int*, int*);
|
||||
#endif
|
||||
|
||||
typedef void _DL_FreeDataProc(proplist_t pl, void *free_data);
|
||||
typedef void _DL_FreeDataProc(proplist_t pl, WPluginData *free_data);
|
||||
|
||||
typedef int _DL_InitDataProc(proplist_t pl, void *init_data); /* prototype
|
||||
for function
|
||||
initializer
|
||||
*/
|
||||
typedef int _DL_InitDataProc(proplist_t pl, WPluginData *init_data);
|
||||
/* prototype for function initializer */
|
||||
|
||||
#define W_DSPROC_DRAWSTRING 0
|
||||
#define W_DSPROC_WIDTHOFSTRING 1
|
||||
#define W_DSPROC_MEMBERS 2
|
||||
|
||||
typedef struct _WFunction {
|
||||
int type;
|
||||
void *handle;
|
||||
proplist_t arg;
|
||||
void *data;
|
||||
WPluginData *data;
|
||||
_DL_FreeDataProc *freeData;
|
||||
union {
|
||||
_DL_AnyProc *any;
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
_DL_DrawStringProc *drawString;
|
||||
#endif
|
||||
_DL_AnyProc **any;
|
||||
_DL_DrawStringProc **drawString;
|
||||
_DL_WidthStringProc **widthOfString;
|
||||
} proc;
|
||||
/*
|
||||
char *libraryName;
|
||||
@@ -90,11 +97,11 @@ typedef struct _WFunction {
|
||||
*/
|
||||
|
||||
WFunction* wPluginCreateFunction(int type, char *library_name,
|
||||
char *init_proc_name, char *proc_name, char *free_data_proc_name,
|
||||
proplist_t pl_arg, void *init_data);
|
||||
char *init_proc_name, WPluginData *funcs, char *free_data_proc_name,
|
||||
proplist_t pl_arg, WPluginData *init_data);
|
||||
|
||||
void wPluginDestroyFunction(WFunction *function);
|
||||
|
||||
void** wPluginPackData(int members, ...);
|
||||
WPluginData* wPluginPackData(int members, ...);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -195,7 +195,12 @@ UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action)
|
||||
sprintf(title, "%s", wwin->frame->title);
|
||||
else
|
||||
sprintf(title, "%s", DEF_WINDOW_TITLE);
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
t = ShrinkString(scr->menu_entry_font, title, MAX_WINDOWLIST_WIDTH,
|
||||
scr->drawstring_func[W_STRING_MTEXT]);
|
||||
#else
|
||||
t = ShrinkString(scr->menu_entry_font, title, MAX_WINDOWLIST_WIDTH);
|
||||
#endif
|
||||
|
||||
if (IS_OMNIPRESENT(wwin))
|
||||
idx = -1;
|
||||
@@ -252,8 +257,12 @@ UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action)
|
||||
else
|
||||
sprintf(title, "%s", DEF_WINDOW_TITLE);
|
||||
|
||||
t = ShrinkString(scr->menu_entry_font, title,
|
||||
MAX_WINDOWLIST_WIDTH);
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
t = ShrinkString(scr->menu_entry_font, title, MAX_WINDOWLIST_WIDTH,
|
||||
scr->drawstring_func[W_STRING_MTEXT]);
|
||||
#else
|
||||
t = ShrinkString(scr->menu_entry_font, title, MAX_WINDOWLIST_WIDTH);
|
||||
#endif
|
||||
entry->text = t;
|
||||
|
||||
wMenuRealize(switchmenu);
|
||||
|
||||
Reference in New Issue
Block a user