11 #define LICE_IBitmap LICE_IBitmap_disabledAPI
19#ifdef EEL_LICE_API_ONLY
20#define EEL_LICE_FUNCDEF extern
22#define EEL_LICE_FUNCDEF
25#define LICE_FUNCTION_VALID(x) (x)
30EEL_LICE_FUNCDEF bool (*__LICE_ClipLine)(
int* pX1,
int* pY1,
int* pX2,
int* pY2,
int xLo,
int yLo,
int xHi,
int yHi);
43 float srcx,
float srcy,
float srcw,
float srch,
float alpha,
int mode);
48EEL_LICE_FUNCDEF
void (*__LICE_RoundRect)(
LICE_IBitmap *drawbm,
float xpos,
float ypos,
float w,
float h,
int cornerradius,
LICE_pixel col,
float alpha,
int mode,
bool aa);
53 int dstx,
int dsty,
int dstw,
int dsth,
54 float srcx,
float srcy,
float srcw,
float srch,
56 bool cliptosourcerect,
float alpha,
int mode,
57 float rotxcent,
float rotycent);
61 float rsc,
float gsc,
float bsc,
float asc,
62 float radd,
float gadd,
float badd,
float aadd);
64EEL_LICE_FUNCDEF
void (*__LICE_GradRect)(
LICE_IBitmap *dest,
int dstx,
int dsty,
int dstw,
int dsth,
65 float ir,
float ig,
float ib,
float ia,
66 float drdx,
float dgdx,
float dbdx,
float dadx,
67 float drdy,
float dgdy,
float dbdy,
float dady,
71 int dstx,
int dsty,
int dstw,
int dsth,
72 double *srcpoints,
int div_w,
int div_h,
73 float alpha,
int mode);
76 int dstx,
int dsty,
int dstw,
int dsth,
77 float srcx,
float srcy,
float srcw,
float srch,
78 double dsdx,
double dtdx,
double dsdy,
double dtdy,
79 double dsdxdy,
double dtdxdy,
80 bool cliptosourcerect,
float alpha,
int mode);
83#define LICE_Blur __LICE_Blur
84#define LICE_Clear __LICE_Clear
85#define LICE_Line __LICE_Line
86#define LICE_ClipLine __LICE_ClipLine
87#define LICE_FillRect __LICE_FillRect
88#define LICE_DrawRect __LICE_DrawRect
89#define LICE_PutPixel __LICE_PutPixel
90#define LICE_GetPixel __LICE_GetPixel
91#define LICE_DrawText __LICE_DrawText
92#define LICE_DrawChar __LICE_DrawChar
93#define LICE_MeasureText __LICE_MeasureText
94#define LICE_LoadImage __LICE_LoadImage
95#define LICE_RotatedBlit __LICE_RotatedBlit
96#define LICE_ScaledBlit __LICE_ScaledBlit
97#define LICE_MultiplyAddRect __LICE_MultiplyAddRect
98#define LICE_GradRect __LICE_GradRect
99#define LICE_TransformBlit2 __LICE_TransformBlit2
100#define LICE_DeltaBlit __LICE_DeltaBlit
101#define LICE_Circle __LICE_Circle
102#define LICE_FillCircle __LICE_FillCircle
103#define LICE_FillTriangle __LICE_FillTriangle
104#define LICE_FillConvexPolygon __LICE_FillConvexPolygon
105#define LICE_RoundRect __LICE_RoundRect
106#define LICE_Arc __LICE_Arc
115EEL_LICE_FUNCDEF
LICE_IFont *(*LICE_CreateFont)();
126#define LICE_FUNCTION_VALID(x) (sizeof(int) > 0)
159 if (ifont)
return ifont->
DrawText(bm, str, strcnt, rect, dtFlags);
235 const int a = (
int)idx;
255 EEL_F *
m_gfx_r, *
m_gfx_g, *
m_gfx_b, *
m_gfx_w, *
m_gfx_h, *
m_gfx_a, *
m_gfx_x, *
m_gfx_y, *
m_gfx_mode, *
m_gfx_clear, *
m_gfx_texth,*
m_gfx_dest, *
m_gfx_a2;
265 void gfx_lineto(EEL_F xpos, EEL_F ypos, EEL_F aaflag);
267 void gfx_line(
int np, EEL_F **parms);
268 void gfx_rect(
int np, EEL_F **parms);
270 void gfx_arc(
int np, EEL_F **parms);
271 void gfx_set(
int np, EEL_F **parms);
280 void gfx_blitext(EEL_F img, EEL_F *coords, EEL_F angle);
283 void gfx_circle(
float x,
float y,
float r,
bool fill,
bool aaflag);
295#ifdef EEL_LICE_WANT_STANDALONE
296 HWND create_wnd(
HWND par,
int isChild);
297 HWND hwnd_standalone;
298 int hwnd_standalone_kb_state[32];
301 EEL_F gfx_showmenu(
void*
opaque, EEL_F** parms,
int nparms);
302 EEL_F gfx_setcursor(
void*
opaque, EEL_F** parms,
int nparms);
305 unsigned char m_kb_queue_valid;
306 unsigned char m_kb_queue_pos;
309#ifdef EEL_LICE_LOADTHEMECURSOR
310 char m_cursor_name[128];
313#ifndef EEL_LICE_STANDALONE_NOINITQUIT
314 RECT m_last_undocked_r;
325#ifndef EEL_LICE_API_ONLY
329#ifdef EEL_LICE_WANT_STANDALONE
330 hwnd_standalone=
NULL;
331 memset(hwnd_standalone_kb_state,0,
sizeof(hwnd_standalone_kb_state));
335#ifndef EEL_LICE_STANDALONE_NOINITQUIT
336 memset(&m_last_undocked_r,0,
sizeof(m_last_undocked_r));
339#ifdef EEL_LICE_LOADTHEMECURSOR
383#ifdef EEL_LICE_WANT_STANDALONE
410 const int sm=(gmode>>4)&0xf;
419 const int sm=(gmode>>4)&0xf;
438 if (green<0) green=0;
else if (green>255)green=255;
439 if (blue<0) blue=0;
else if (blue>255) blue=255;
440 if (a2<0) a2=0;
else if (a2>255) a2=255;
448 if (ctx) ctx->
gfx_lineto(*xpos, *ypos, *useaa);
468 if (ctx) ctx->
gfx_line((
int)np,parms);
475 if (ctx) ctx->
gfx_rect((
int)np,parms);
487 if (ctx) ctx->
gfx_arc((
int)np,parms);
493 if (ctx) ctx->
gfx_set((
int)np,parms);
522#ifndef EEL_LICE_NO_RAM
523 const int divw = (
int) (parms[5][0]+0.5);
524 const int divh = (
int) (parms[6][0]+0.5);
525 if (divw < 1 || divh < 1)
return 0.0;
526 const int sz = divw*divh*2;
528#ifdef EEL_LICE_RAMFUNC
529 EEL_F *
d = EEL_LICE_RAMFUNC(
opaque,7,sz);
533 if (!blocks || np < 8)
return 0.0;
535 const int addr1= (
int) (parms[7][0]+0.5);
544 if (end !=
d+sz-1)
return 0.0;
556 bool aa =
true, fill =
false;
557 if (np>3) fill = parms[3][0] > 0.5;
558 if (np>4) aa = parms[4][0] > 0.5;
559 if (ctx) ctx->
gfx_circle((
float)parms[0][0], (
float)parms[1][0], (
float)parms[2][0], fill, aa);
589 EEL_F *
p[3]={str,xOut,yOut};
599 EEL_F *
p[3]={str,xOut,yOut};
627 if (ctx)
return ctx->gfx_showmenu(
opaque, parms, (
int)nparms);
634 if (ctx)
return ctx->gfx_setcursor(
opaque, parms, (
int)nparms);
665 if (idx>=0 && idx < ctx->m_gfx_fonts.
GetSize())
671#ifdef NOT_EEL_STRING_UPDATE_STRING
672 NOT_EEL_STRING_UPDATE_STRING(parms[0][0],
f->actual_fontname);
674 WDL_FastString *fs=
NULL;
676 if (fs) fs->Set(
f->actual_fontname);
700#ifndef EEL_LICE_NO_RAM
701#ifdef EEL_LICE_RAMFUNC
702 EEL_F *buf = EEL_LICE_RAMFUNC(
opaque,1,10);
703 if (!buf)
return img;
705 EEL_F fc = *coordidx;
713 if (!blocks)
return img;
714 for (
x = 0;
x < 10;
x ++)
812 LICE_FillTriangle(dest, (
int)parms[0][0], (
int)parms[1][0], (
int)parms[2][0], (
int)parms[3][0],
819 const int maxpt = 512;
822 int x[maxpt],
y[maxpt];
823 for (
i=0;
i <
n;
i++)
825 x[
i]=(
int)parms[rdi++][0];
826 y[
i]=(
int)parms[rdi++][0];
840 if (x2<x1) { x1=x2; x2=xpos; }
841 if (y2<y1) { y1=y2; y2=ypos; }
858 int x1=(
int)floor(parms[0][0]),y1=(
int)floor(parms[1][0]),x2=(
int)floor(parms[2][0]), y2=(
int)floor(parms[3][0]);
874 int x1=(
int)floor(parms[0][0]),y1=(
int)floor(parms[1][0]),
w=(
int)floor(parms[2][0]),
h=(
int)floor(parms[3][0]);
875 int filled=(np < 5 || parms[4][0] > 0.5);
890 const bool aa = np <= 5 || parms[5][0]>0.5;
904 const bool aa = np <= 5 || parms[5][0]>0.5;
918 const int x1=(
int)floor(parms[0][0]),y1=(
int)floor(parms[1][0]),
w=(
int)floor(parms[2][0]),
h=(
int)floor(parms[3][0]);
925 LICE_GradRect(dest,x1,y1,
w,
h,(
float)parms[4][0],(
float)parms[5][0],(
float)parms[6][0],(
float)parms[7][0],
926 np > 8 ? (
float)parms[8][0]:0.0f, np > 9 ? (
float)parms[9][0]:0.0f, np > 10 ? (
float)parms[10][0]:0.0f, np > 11 ? (
float)parms[11][0]:0.0f,
927 np > 12 ? (
float)parms[12][0]:0.0f, np > 13 ? (
float)parms[13][0]:0.0f, np > 14 ? (
float)parms[14][0]:0.0f, np > 15 ? (
float)parms[15][0]:0.0f,
932 const double sc = 255.0;
933 LICE_MultiplyAddRect(dest,x1,y1,
w,
h,(
float)parms[4][0],(
float)parms[5][0],(
float)parms[6][0],np>7 ? (
float)parms[7][0]:1.0f,
934 (
float)(np > 8 ? sc*parms[8][0]:0.0), (
float)(np > 9 ? sc*parms[9][0]:0.0), (
float)(np > 10 ? sc*parms[10][0]:0.0), (
float)(np > 11 ? sc*parms[11][0]:0.0));
947 int green=(
int) (
g*255.0);
948 int blue=(
int) (
b*255.0);
950 if (green<0) green=0;
else if (green>255)green=255;
951 if (blue<0) blue=0;
else if (blue>255) blue=255;
977 const int idx = (
int) parms[0][0];
981#ifdef NOT_EEL_STRING_UPDATE_STRING
982 NOT_EEL_STRING_UPDATE_STRING(parms[1][0],
m_ddrop_files.Get(idx));
987 WDL_FastString *fs=
NULL;
1006 if (ok && fs.GetLength())
1028 int use_w = (
int)*
w;
1029 int use_h = (
int)*
h;
1030 if (use_w<1 || use_h < 1) use_w=use_h=0;
1031 if (use_w > 8192) use_w=8192;
1032 if (use_h > 8192) use_h=8192;
1067 if (srch < 0) { srch=-srch; srcy = (
int)*
m_gfx_y; }
1068 if (srcw < 0) { srcw=-srcw; srcx = (
int)*
m_gfx_x; }
1069 LICE_Blur(dest,dest,srcx,srcy,srcx,srcy,srcw,srch);
1076 if (coords[0]+coords[2] < coords[4])
return false;
1077 if (coords[0] > coords[4] + coords[6])
return false;
1078 if (coords[1]+coords[3] < coords[5])
return false;
1079 if (coords[1] > coords[5] + coords[7])
return false;
1112 0.0f,0.0f,(
float)bmw,(
float)bmh,
1116 LICE_TransformBlit2(dest,bm,(
int)floor(parms[1][0]),(
int)floor(parms[2][0]),(
int)floor(parms[3][0]),(
int)floor(parms[4][0]),tab,div_w,div_h, (
float)*
m_gfx_a,
getCurModeForBlit(isFromFB));
1121 int a = np>0 ? ((
int)floor(parms[0][0]))-1 : -1;
1128 const int sz=np>2 ? (
int)parms[2][0] : 10;
1130 bool doCreate=
false;
1132 if (!
s->font)
s->actual_fontname[0]=0;
1138 #ifdef EEL_STRING_DEBUGOUT
1139 if (!face) EEL_STRING_DEBUGOUT(
"gfx_setfont: invalid string identifier %f",parms[1][0]);
1141 if (!face || !*face) face=
"Arial";
1144 unsigned int c = np > 3 ? (
unsigned int) parms[3][0] : 0;
1147 switch (toupper(
c&0xff))
1152 case 'R': fontflag|=16;
break;
1153 case 'V': fontflag|=32;
break;
1154 case 'M': fontflag|=64;
break;
1155 case 'S': fontflag|=128;
break;
1156 case 'O': fontflag|=256;
break;
1157 case 'Z': fontflag|=1;
break;
1158 case 'Y': fontflag|=1|2;
break;
1165 if (fontflag !=
s->last_fontflag || sz!=
s->last_fontsize || strncmp(
s->last_fontname,face,
sizeof(
s->last_fontname)-1))
1168 s->last_fontsize=sz;
1169 s->last_fontflag=fontflag;
1176 s->actual_fontname[0]=0;
1184#if defined(_WIN32) && !defined(WDL_NO_SUPPORT_UTF8)
1187 GetVersion()<0x80000000 &&
1188 MultiByteToWideChar(CP_UTF8,MB_ERR_INVALID_CHARS,
s->last_fontname,-1,wf,256))
1190 hf = CreateFontW(sz,0,0,0,fw,italic,underline,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,wf);
1193 if (!hf) hf =
CreateFont(sz,0,0,0,fw,italic,underline,
FALSE,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH,
s->last_fontname);
1215#if defined(_WIN32) && !defined(WDL_NO_SUPPORT_UTF8)
1216 if (GetVersion()<0x80000000 &&
1217 GetTextFaceW(hdc,
sizeof(wf)/
sizeof(wf[0]),wf) &&
1218 WideCharToMultiByte(CP_UTF8,0,wf,-1,
s->actual_fontname,
sizeof(
s->actual_fontname),
NULL,
NULL))
1220 s->actual_fontname[
sizeof(
s->actual_fontname)-1]=0;
1224 GetTextFace(hdc,
sizeof(
s->actual_fontname),
s->actual_fontname);
1237 if (
s->font &&
s->use_fonth)
1245 #ifdef EEL_STRING_DEBUGOUT
1246 if (
a >=
m_gfx_fonts.GetSize()) EEL_STRING_DEBUGOUT(
"gfx_setfont: invalid font %d specified",
a);
1276 const double sc = blitmode==0 && np > 1 ? parms[1][0] : 1.0,
1277 angle = blitmode==0 && np > 2 ? parms[2][0] : 0.0;
1284 coords[0]=np > 1 ? parms[1][0] : 0.0f;
1285 coords[1]=np > 2 ? parms[2][0] : 0.0f;
1286 coords[2]=np > 3 ? parms[3][0] : bmw;
1287 coords[3]=np > 4 ? parms[4][0] : bmh;
1288 coords[4]=np > 5 ? parms[5][0] : *
m_gfx_x;
1289 coords[5]=np > 6 ? parms[6][0] : *
m_gfx_y;
1290 coords[6]=np > 7 ? parms[7][0] : coords[2]*sc;
1291 coords[7]=np > 8 ? parms[8][0] : coords[3]*sc;
1297 (blitmode != 0 || np > 1) &&
1306 (
int)coords[0],(
int)coords[1],(
int)coords[2],(
int)coords[3],
1307 (
float)coords[0],(
float)coords[1],(
float)coords[2],(
float)coords[3],
1315 LICE_DeltaBlit(dest,bm,(
int)coords[4],(
int)coords[5],(
int)coords[6],(
int)coords[7],
1316 (
float)coords[0],(
float)coords[1],(
float)coords[2],(
float)coords[3],
1317 np > 9 ? (
float)parms[9][0]:1.0f,
1318 np > 10 ? (
float)parms[10][0]:0.0f,
1319 np > 11 ? (
float)parms[11][0]:0.0f,
1320 np > 12 ? (
float)parms[12][0]:1.0f,
1321 np > 13 ? (
float)parms[13][0]:0.0f,
1322 np > 14 ? (
float)parms[14][0]:0.0f,
1325 else if (fabs(angle)>0.000000001)
1327 LICE_RotatedBlit(dest,bm,(
int)coords[4],(
int)coords[5],(
int)coords[6],(
int)coords[7],
1328 (
float)coords[0],(
float)coords[1],(
float)coords[2],(
float)coords[3],
1330 np > 9 ? (
float)parms[9][0] : 0.0f,
1331 np > 10 ? (
float)parms[10][0] : 0.0f);
1335 LICE_ScaledBlit(dest,bm,(
int)coords[4],(
int)coords[5],(
int)coords[6],(
int)coords[7],
1367 (
int)coords[0],(
int)coords[1],(
int)coords[2],(
int)coords[3],
1368 (
float)coords[0],(
float)coords[1],(
float)coords[2],(
float)coords[3],
1373 if (fabs(angle)>0.000000001)
1375 LICE_RotatedBlit(dest,bm,(
int)coords[4],(
int)coords[5],(
int)coords[6],(
int)coords[7],
1376 (
float)coords[0],(
float)coords[1],(
float)coords[2],(
float)coords[3],(
float)angle,
1378 (
float)coords[8],(
float)coords[9]);
1382 LICE_ScaledBlit(dest,bm,(
int)coords[4],(
int)coords[5],(
int)coords[6],(
int)coords[7],
1414 int fg,
int mode,
float alpha,
int flags, EEL_F *wantYoutput, EEL_F **measureOnly)
1427 while (thislen < buflen && buf[thislen] !=
'\n') thislen++;
1428 memset(&
r,0,
sizeof(
r));
1434 if (wantYoutput) *wantYoutput = tr.
top;
1438 if (
r.right > maxx) maxx=
r.right;
1442 buflen -= thislen+1;
1447 measureOnly[0][0] = maxx;
1448 measureOnly[1][0] = tr.
top;
1454 int xpos=rect->
left, ypos=rect->
top;
1460 (LICE_IBitmap_disabledAPI*)
1476 EEL_F *
mo[2] = { &
w,&
h};
1478 __drawTextWithFont(dest,&tr,
NULL,buf,buflen,0,0,0.0f,0,
NULL,
mo);
1487 const int sxpos = xpos;
1498 case ' ': xpos += 8;
break;
1499 case '\t': xpos += 8*5;
break;
1503 if (xpos > maxx) maxx=xpos;
1510 measureOnly[0][0]=maxx;
1511 measureOnly[1][0]=maxy;
1515 if (wantYoutput) *wantYoutput=ypos;
1529 const char* sep=strchr(
p,
'|');
1532 int len = (
int)(sep ? sep-
p : strlen(
p));
1533 int destlen=
wdl_min(len, (
int)
sizeof(buf)-1);
1536 if (sep) sep=strchr(++
p,
'|');
1542 while (strspn(
q,
">#!<"))
1544 if (*
q ==
'>' && !subm)
1551 if (*
q ==
'<') done=
true;
1571EEL_F eel_lice_state::gfx_showmenu(
void*
opaque, EEL_F** parms,
int nparms)
1574 if (!
p || !
p[0])
return 0.0;
1583 if (hwnd_standalone)
1607EEL_F eel_lice_state::gfx_setcursor(
void*
opaque, EEL_F** parms,
int nparms)
1609 if (!hwnd_standalone)
return 0.0;
1612 const int nc = (
int)parms[0][0];
1613 if (m_cursor_resid != nc)
1615 m_cursor_resid = nc;
1619 const char *
p =
NULL;
1620#ifdef EEL_LICE_LOADTHEMECURSOR
1623 if (strncmp(
p?
p:
"",m_cursor_name,
sizeof(m_cursor_name)-1))
1625 lstrcpyn(m_cursor_name,
p?
p:
"",
sizeof(m_cursor_name));
1633 if (m_cursor_resid > 0)
1636#ifdef EEL_LICE_LOADTHEMECURSOR
1637 else m_cursor = EEL_LICE_LOADTHEMECURSOR(m_cursor_resid,
p);
1641 bool do_set =
GetCapture() == hwnd_standalone;
1642 if (!do_set &&
GetFocus() == hwnd_standalone)
1664 int nfmtparms = nparms-1;
1665 EEL_F **fmtparms = parms+1;
1666 const char *funcname = formatmode==1?
"gfx_printf":
1667 formatmode==2?
"gfx_measurestr":
1668 formatmode==3?
"gfx_measurechar" :
"gfx_drawstr";
1679 WDL_FastString *fs=
NULL;
1692 #ifdef EEL_STRING_DEBUGOUT
1693 if (!
s) EEL_STRING_DEBUGOUT(
"gfx_%s: invalid string identifier %f",funcname,parms[0][0]);
1700 else if (formatmode==1)
1702 extern int eel_format_strings(
void *,
const char *
s,
const char *ep,
char *,
int,
int, EEL_F **);
1704 if (s_len<1)
return;
1709 s_len = fs?fs->GetLength():(
int)strlen(
s);
1729 if (formatmode == 0 && nparms >= 4)
1731 flags=(
int)*parms[1];
1733 r.right=(
int)*parms[2];
1734 r.bottom=(
int)*parms[3];
1749 int a=(
int)(ch+0.5);
1750 if (
a ==
'\r' ||
a==
'\n')
a=
' ';
1771 int a=(
int)(ndigits+0.5);
1773 else if (
a > 16)
a=16;
1774 snprintf(buf,
sizeof(buf),
"%.*f",
a,
n);
1784 int use_w =
r.right -
r.left;
1785 int use_h =
r.bottom -
r.top;
1787 POINT pt = { _mouse_x, _mouse_y };
1816 if (!__GetDpiForWindow)
1820 if (!__GetDpiForWindow)
1821 *(
void **)&__GetDpiForWindow = (
void*)(
INT_PTR)1;
1825 int dpi = __GetDpiForWindow(
hwnd);
1899 void *
p = SWELL_InitAutoRelease();
1906 SWELL_QuitAutoRelease(
p);
1912#ifndef EEL_LICE_NO_REGISTER
1952#ifdef EEL_LICE_WANT_STANDALONE
1957static const char *eel_lice_standalone_classname;
1959#ifdef EEL_LICE_WANT_STANDALONE_UPDATE
1966 if (ctx->hwnd_standalone)
1968#ifndef EEL_LICE_WANT_STANDALONE_UPDATE_NO_SETUPFRAME
1973#ifndef EEL_LICE_WANT_STANDALONE_UPDATE_NO_MSGPUMP
1977 while (PeekMessage(&
msg,
NULL,0,0,PM_REMOVE))
1979 TranslateMessage(&
msg);
1980 DispatchMessage(&
msg);
1987#ifndef EEL_LICE_WANT_STANDALONE_UPDATE_NO_SETUPFRAME
2011 if (ctx->hwnd_standalone)
2013 if (ctx->hwnd_standalone==
GetFocus()) rv|=2;
2019 const int n =
sizeof(ctx->hwnd_standalone_kb_state) /
sizeof(ctx->hwnd_standalone_kb_state[0]);
2020 int *st = ctx->hwnd_standalone_kb_state;
2022 for (
x=0;
x<
n && st[
x] !=
a;
x++);
2023 return x<
n ? 1.0 : 0.0;
2026 if (!ctx->hwnd_standalone)
return -1.0;
2028 if (ctx->m_kb_queue_valid)
2030 const int qsize =
sizeof(ctx->m_kb_queue)/
sizeof(ctx->m_kb_queue[0]);
2031 const int a = ctx->m_kb_queue[ctx->m_kb_queue_pos & (qsize-1)];
2032 ctx->m_kb_queue_pos++;
2033 ctx->m_kb_queue_valid--;
2040static int eel_lice_key_xlate(
int msg,
int wParam,
int lParam,
bool *isAltOut)
2042#define EEL_MB_C(a) (sizeof(a)<=2 ? a[0] : \
2043 sizeof(a)==3 ? (((a[0])<<8)+(a[1])) : \
2044 sizeof(a)==4 ? (((a[0])<<16)+((a[1])<<8)+(a[2])) : \
2045 (((a[0])<<24)+((a[1])<<16)+((a[2])<<8)+(a[3])))
2054 case VK_HOME:
return EEL_MB_C(
"home");
2055 case VK_UP:
return EEL_MB_C(
"up");
2056 case VK_PRIOR:
return EEL_MB_C(
"pgup");
2057 case VK_LEFT:
return EEL_MB_C(
"left");
2058 case VK_RIGHT:
return EEL_MB_C(
"rght");
2059 case VK_END:
return EEL_MB_C(
"end");
2060 case VK_DOWN:
return EEL_MB_C(
"down");
2061 case VK_NEXT:
return EEL_MB_C(
"pgdn");
2064 case VK_F1:
return EEL_MB_C(
"f1");
2065 case VK_F2:
return EEL_MB_C(
"f2");
2066 case VK_F3:
return EEL_MB_C(
"f3");
2067 case VK_F4:
return EEL_MB_C(
"f4");
2068 case VK_F5:
return EEL_MB_C(
"f5");
2069 case VK_F6:
return EEL_MB_C(
"f6");
2070 case VK_F7:
return EEL_MB_C(
"f7");
2071 case VK_F8:
return EEL_MB_C(
"f8");
2072 case VK_F9:
return EEL_MB_C(
"f9");
2073 case VK_F10:
return EEL_MB_C(
"f10");
2074 case VK_F11:
return EEL_MB_C(
"f11");
2075 case VK_F12:
return EEL_MB_C(
"f12");
2112 if (wParam>=
'a' && wParam<=
'z')
2114 if (isctrl) wParam += 1-
'a';
2115 if (isalt) wParam += 256;
2119 if (wParam>=
'A' && wParam<=
'Z')
2121 if (isctrl) wParam += 1-
'A';
2122 if (isalt) wParam += 256;
2130 if ((wParam&~0x80) ==
'[')
return 27;
2131 if ((wParam&~0x80) ==
']')
return 29;
2145 if (wParam>=
'A' && wParam<=
'Z')
2163 void *objc_getClass(
const char *
p);
2164#ifndef _OBJC_OBJC_H_
2165 void *sel_getUid(
const char *
p);
2167 void objc_msgSend(
void);
2172HWND eel_lice_state::create_wnd(
HWND par,
int isChild)
2174 if (hwnd_standalone)
return hwnd_standalone;
2189#ifdef EEL_LICE_WANTDOCK
2190#ifndef ID_DOCKWINDOW
2191#define ID_DOCKWINDOW 40269
2199 if (np > 0 && parms[0][0] >= 0.0 && ctx->hwnd_standalone) EEL_LICE_WANTDOCK(ctx,(
int)parms[0][0]);
2201 if (np > 1 && parms[1]) parms[1][0] = ctx->m_last_undocked_r.left;
2202 if (np > 2 && parms[2]) parms[2][0] = ctx->m_last_undocked_r.top;
2203 if (np > 3 && parms[3]) parms[3][0] = ctx->m_last_undocked_r.right;
2204 if (np > 4 && parms[4]) parms[4][0] = ctx->m_last_undocked_r.bottom;
2206#ifdef EEL_LICE_ISDOCKED
2207 return EEL_LICE_ISDOCKED(ctx);
2216#ifndef EEL_LICE_STANDALONE_NOINITQUIT
2223 if (ctx->hwnd_standalone)
2227 ctx->hwnd_standalone=0;
2234#ifdef EEL_LICE_GET_CONTEXT_INIT
2241 bool wantShow=
false, wantResize=
true;
2242 int sug_w = np > 1 ? (
int)parms[1][0] : 640;
2243 int sug_h = np > 2 ? (
int)parms[2][0] : 480;
2244 if (sug_w <1 && sug_h < 1 && ctx->hwnd_standalone)
2251 #ifdef EEL_LICE_WANTDOCK
2252 const int pos_offs = 4;
2254 const int pos_offs = 3;
2257 if (sug_w < 16) sug_w=16;
2258 else if (sug_w > 8192) sug_w=8192;
2259 if (sug_h < 16) sug_h=16;
2260 else if (sug_h > 8192) sug_h=8192;
2262 if (!ctx->hwnd_standalone)
2265 void *(*send_msg)(
void *,
void *) = (
void *(*)(
void *,
void *))objc_msgSend;
2266 void (*send_msg_longparm)(
void *,
void *, long) = (
void (*)(
void *,
void *,
long))objc_msgSend;
2268 void *nsapp=send_msg( objc_getClass(
"NSApplication"), sel_getUid(
"sharedApplication"));
2269 send_msg_longparm(nsapp,sel_getUid(
"setActivationPolicy:"), 0);
2270 send_msg_longparm(nsapp,sel_getUid(
"activateIgnoringOtherApps:"), 1);
2274 #ifdef EEL_LICE_STANDALONE_PARENT
2275 HWND par = EEL_LICE_STANDALONE_PARENT(
opaque);
2276 #elif defined(_WIN32)
2277 HWND par=GetDesktopWindow();
2282 ctx->create_wnd(par,0);
2285 if (ctx->hwnd_standalone)
2288 if (np >= pos_offs+2)
2290 px = (
int) floor(parms[pos_offs][0] + 0.5);
2291 py = (
int) floor(parms[pos_offs+1][0] + 0.5);
2292#ifdef EEL_LICE_VALIDATE_RECT_ON_SCREEN
2293 RECT r = {px,py,px+sug_w,py+sug_h};
2294 EEL_LICE_VALIDATE_RECT_ON_SCREEN(
r);
2295 px=
r.left; py=
r.top; sug_w =
r.right-
r.left; sug_h =
r.bottom-
r.top;
2297 ctx->m_last_undocked_r.left = px;
2298 ctx->m_last_undocked_r.top = py;
2299 ctx->m_last_undocked_r.right = sug_w;
2300 ctx->m_last_undocked_r.bottom = sug_h;
2307 sug_h +=
abs(r1.bottom-r1.top) -
r2.bottom;
2312 #ifdef EEL_LICE_WANTDOCK
2313 if (np > 3) EEL_LICE_WANTDOCK(ctx,parms[3][0]);
2315 #ifdef EEL_LICE_WANT_STANDALONE_UPDATE
2325 if (!ctx->hwnd_standalone)
return 0;
2331 #ifdef EEL_STRING_DEBUGOUT
2332 if (!
title) EEL_STRING_DEBUGOUT(
"gfx_init: invalid string identifier %f",parms[0][0]);
2347 const bool do_size = sug_w !=
r2.right || sug_h !=
r2.bottom;
2350 sug_h +=
abs(r1.bottom-r1.top) -
r2.bottom;
2353 const bool do_move=(np >= pos_offs+2);
2356 px = (
int) floor(parms[pos_offs][0] + 0.5);
2357 py = (
int) floor(parms[pos_offs+1][0] + 0.5);
2358#ifdef EEL_LICE_VALIDATE_RECT_ON_SCREEN
2359 RECT r = {px,py,px+sug_w,py+sug_h};
2360 EEL_LICE_VALIDATE_RECT_ON_SCREEN(
r);
2361 px=
r.left; py=
r.top; sug_w =
r.right-
r.left; sug_h =
r.bottom-
r.top;
2364 if (do_size || do_move)
2376 if (ctx && ctx->hwnd_standalone)
2390 if (ctx && ctx->hwnd_standalone)
2404#ifndef WM_MOUSEWHEEL
2405#define WM_MOUSEWHEEL 0x20A
2407#ifndef WM_MOUSEHWHEEL
2408#define WM_MOUSEHWHEEL 0x20E
2414 static UINT Scroll_Message;
2415 static bool sm_init;
2419 Scroll_Message = RegisterWindowMessage(
"MSWHEEL_ROLLMSG");
2421 if (Scroll_Message && uMsg == Scroll_Message)
2433 LPCREATESTRUCT lpcs= (LPCREATESTRUCT )lParam;
2441 ctx->m_kb_queue_valid=0;
2442 ctx->hwnd_standalone=
hwnd;
2455#ifdef EEL_LICE_WANTDOCK
2456 EEL_LICE_WANTDOCK(ctx,0);
2458 ctx->hwnd_standalone=
NULL;
2465 if (ctx) memset(&ctx->hwnd_standalone_kb_state,0,
sizeof(ctx->hwnd_standalone_kb_state));
2471 if (ctx && ctx->m_cursor)
2486#ifdef EEL_LICE_WANTDOCK
2492 char title[512], buf[1024];
2500 snprintf(buf,
sizeof(buf),
"Dock %s window in Docker",
title);
2502 snprintf(buf,
sizeof(buf),
"Close %s window",
title);
2516#ifdef EEL_LICE_WANTDOCK
2520 if (ctx) EEL_LICE_WANTDOCK(ctx, EEL_LICE_ISDOCKED(ctx)^1);
2538 for (
int x=0;
x<
n;
x++)
2556 if (
p) *
p += (EEL_F) (
short)
HIWORD(wParam);
2570 bool hadAltAdj=
false;
2571 int a=eel_lice_key_xlate(uMsg,(
int)wParam,(
int)lParam, &hadAltAdj);
2575 const int mask = hadAltAdj ? ~256 : ~0;
2581 a = (
int)MapVirtualKey((
UINT)wParam,2);
2587 int a_no_alt = (
a&
mask);
2588 const int lowera = a_no_alt >= 1 && a_no_alt < 27 ? (a_no_alt+
'a'-1) : a_no_alt >=
'A' && a_no_alt <=
'Z' ? a_no_alt+
'a'-
'A' : a_no_alt;
2590 int *st = ctx->hwnd_standalone_kb_state;
2592 const int n =
sizeof(ctx->hwnd_standalone_kb_state) /
sizeof(ctx->hwnd_standalone_kb_state[0]);
2595 for (
x=0;
x<
n && st[
x] != lowera;
x++)
if (
x < zp && !st[
x]) zp=
x;
2613 a = (
int)MapVirtualKey((
UINT)wParam,2);
2624 const int qsize =
sizeof(ctx->m_kb_queue)/
sizeof(ctx->m_kb_queue[0]);
2625 if (ctx->m_kb_queue_valid>=qsize)
2627 ctx->m_kb_queue_valid--;
2628 ctx->m_kb_queue_pos++;
2630 ctx->m_kb_queue[(ctx->m_kb_queue_pos + ctx->m_kb_queue_valid++) & (qsize-1)] =
a;
2645 if (
p.x >=
r.left &&
p.x <
r.right &&
p.y >=
r.top &&
p.y <
r.bottom)
2700 RECT *prcNewWindow = (
RECT*)lParam;
2703 prcNewWindow ->
left,
2705 prcNewWindow->
right - prcNewWindow->
left,
2706 prcNewWindow->
bottom - prcNewWindow->
top,
2713#ifndef EEL_LICE_STANDALONE_NOINITQUIT
2719#ifdef EEL_LICE_ISDOCKED
2727 if (ctx->m_last_undocked_r.bottom < ctx->m_last_undocked_r.top) ctx->m_last_undocked_r.top = ctx->m_last_undocked_r.bottom;
2728 ctx->m_last_undocked_r.right =
r.right;
2729 ctx->m_last_undocked_r.bottom =
r.bottom;
2751 StretchBlt(ps.
hdc,0,0,
w/2,
h/2,
LICE__GetDC(ctx->
m_framebuffer),0,0,
w,
h,
SRCCOPY);
2764 if (
p->ptMinTrackSize.x > 10)
p->ptMinTrackSize.x = 10;
2765 if (
p->ptMinTrackSize.y > 10)
p->ptMinTrackSize.y = 10;
2775void eel_lice_register_standalone(
HINSTANCE hInstance,
const char *classname,
HWND hwndPar,
HICON icon)
2777 eel_lice_standalone_classname=classname && *classname ? classname :
"EEL_LICE_gfx_standalone";
2782 eel_lice_hinstance=hInstance;
2783 WNDCLASS wc={CS_DBLCLKS,eel_lice_wndproc,0,0,hInstance,icon,
LoadCursor(
NULL,
IDC_ARROW),
NULL,
NULL,eel_lice_standalone_classname};
2789#ifndef EEL_LICE_NO_REGISTER
2791#ifndef EEL_LICE_STANDALONE_NOINITQUIT
2799#ifdef EEL_LICE_WANTDOCK
2803#ifdef EEL_LICE_WANT_STANDALONE_UPDATE
2822 if (!getFunc)
return;
2825 *(
void **)&
LICE_Clear = getFunc(
"LICE_Clear");
2826 *(
void **)&
LICE_Line = getFunc(
"LICE_LineInt");
2841 *(
void **)&
LICE_Blur = getFunc(
"LICE_Blur");
2849 *(
void **)&
LICE_Arc = getFunc(
"LICE_Arc");
2866#ifdef EEL_WANT_DOCUMENTATION
2868#ifdef EELSCRIPT_LICE_MAX_IMAGES
2870#define MKSTR(x) MKSTR2(x)
2871#define EEL_LICE_DOC_MAXHANDLE MKSTR(EELSCRIPT_LICE_MAX_IMAGES-1)
2873#define EEL_LICE_DOC_MAXHANDLE "127"
2877static const char *eel_lice_function_reference =
2878#ifdef EEL_LICE_WANT_STANDALONE
2879#ifndef EEL_LICE_STANDALONE_NOINITQUIT
2880#ifdef EEL_LICE_WANTDOCK
2881 "gfx_init\t\"name\"[,width,height,dockstate,xpos,ypos]\tInitializes the graphics window with title name. Suggested width and height can be specified. If window is already open, a non-empty name will re-title window, or an empty title will resize window. \n\n"
2883 "gfx_init\t\"name\"[,width,height,xpos,ypos]\tInitializes the graphics window with title name. Suggested width and height can be specified. If window is already open, a non-empty name will re-title window, or an empty title will resize window.\n\n"
2885 "Once the graphics window is open, gfx_update() should be called periodically. \0"
2886 "gfx_quit\t\tCloses the graphics window.\0"
2888#ifdef EEL_LICE_WANT_STANDALONE_UPDATE
2889 "gfx_update\t\tUpdates the graphics display, if opened\0"
2892#ifdef EEL_LICE_WANTDOCK
2893 "gfx_dock\tv[,wx,wy,ww,wh]\tCall with v=-1 to query docked state, otherwise v>=0 to set docked state. State is &1 if docked, second byte is docker index (or last docker index if undocked). If wx-wh are specified, they will be filled with the undocked window position/size\0"
2896 "The following global variables are special and will be used by the graphics system:\n\n\3"
2898 "\4gfx_r - current red component (0..1) used by drawing operations.\n"
2899 "\4gfx_g - current green component (0..1) used by drawing operations.\n"
2900 "\4gfx_b - current blue component (0..1) used by drawing operations.\n"
2901 "\4gfx_a2 - current alpha component (0..1) used by drawing operations when writing solid colors (normally ignored but useful when creating transparent images).\n"
2902 "\4gfx_a - alpha for drawing (1=normal).\n"
2903 "\4gfx_mode - blend mode for drawing. Set mode to 0 for default options. Add 1.0 for additive blend mode (if you wish to do subtractive, set gfx_a to negative and use gfx_mode as additive). Add 2.0 to disable source alpha for gfx_blit(). Add 4.0 to disable filtering for gfx_blit(). \n"
2904 "\4gfx_w - width of the UI framebuffer. \n"
2905 "\4gfx_h - height of the UI framebuffer. \n"
2906 "\4gfx_x - current graphics position X. Some drawing functions use as start position and update. \n"
2907 "\4gfx_y - current graphics position Y. Some drawing functions use as start position and update. \n"
2908 "\4gfx_clear - if greater than -1.0, framebuffer will be cleared to that color. the color for this one is packed RGB (0..255), i.e. red+green*256+blue*65536. The default is 0 (black). \n"
2909 "\4gfx_dest - destination for drawing operations, -1 is main framebuffer, set to 0.." EEL_LICE_DOC_MAXHANDLE
" to have drawing operations go to an offscreen buffer (or loaded image).\n"
2910 "\4gfx_texth - the (READ-ONLY) height of a line of text in the current font. Do not modify this variable.\n"
2911 "\4gfx_ext_retina - to support hidpi/retina, callers should set to 1.0 on initialization, this value will be updated to value greater than 1.0 (such as 2.0) if retina/hidpi. On macOS gfx_w/gfx_h/etc will be doubled, but on other systems gfx_w/gfx_h will remain the same and gfx_ext_retina is a scaling hint for drawing.\n"
2912 "\4mouse_x - current X coordinate of the mouse relative to the graphics window.\n"
2913 "\4mouse_y - current Y coordinate of the mouse relative to the graphics window.\n"
2914 "\4mouse_wheel - wheel position, will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.\n"
2915 "\4mouse_hwheel - horizontal wheel positions, will change typically by 120 or a multiple thereof, the caller should clear the state to 0 after reading it.\n"
2916 "\4mouse_cap - a bitfield of mouse and keyboard modifier state. Note that a script must call gfx_getchar() at least once in order to get modifier state when the mouse is not captured by the window. Bitfield bits:\3"
2917 "\4" "1: left mouse button\n"
2918 "\4" "2: right mouse button\n"
2920 "\4" "4: Command key\n"
2921 "\4" "8: Shift key\n"
2922 "\4" "16: Option key\n"
2923 "\4" "32: Control key\n"
2925 "\4" "4: Control key\n"
2926 "\4" "8: Shift key\n"
2927 "\4" "16: Alt key\n"
2928 "\4" "32: Windows key\n"
2930 "\4" "64: middle mouse button\n"
2934"gfx_getchar\t[char]\tIf char is 0 or omitted, returns a character from the keyboard queue, or 0 if no character is available, or -1 if the graphics window is not open. "
2935 "If char is specified and nonzero, that character's status will be checked, and the function will return greater than 0 if it is pressed. Note that calling gfx_getchar() at least once causes mouse_cap to reflect keyboard modifiers even when the mouse is not captured.\n\n"
2936 "Common values are standard ASCII, such as 'a', 'A', '=' and '1', but for many keys multi-byte values are used, including 'home', 'up', 'down', 'left', 'rght', 'f1'.. 'f12', 'pgup', 'pgdn', 'ins', and 'del'. \n\n"
2937 "Modified and special keys can also be returned, including:\3\n"
2938 "\4Ctrl/Cmd+A..Ctrl+Z as 1..26\n"
2939 "\4Ctrl/Cmd+Alt+A..Z as 257..282\n"
2940 "\4Alt+A..Z as 'A'+256..'Z'+256\n"
2942 "\4" "13 for Enter\n"
2944 "\4" "65536 for query of special flags, returns: &1 (supported), &2=window has focus, &4=window is visible\n"
2947 "gfx_showmenu\t\"str\"\tShows a popup menu at gfx_x,gfx_y. str is a list of fields separated by | characters. "
2948 "Each field represents a menu item.\nFields can start with special characters:\n\n"
2951 "> : this menu item shows a submenu\n"
2952 "< : last item in the current submenu\n\n"
2953 "An empty field will appear as a separator in the menu. "
2954 "gfx_showmenu returns 0 if the user selected nothing from the menu, 1 if the first field is selected, etc.\nExample:\n\n"
2955 "gfx_showmenu(\"first item, followed by separator||!second item, checked|>third item which spawns a submenu|#first item in submenu, grayed out|<second and last item in submenu|fourth item in top menu\")\0"
2957#ifdef EEL_LICE_LOADTHEMECURSOR
2958 "gfx_setcursor\tresource_id,custom_cursor_name\tSets the mouse cursor. resource_id is a value like 32512 (for an arrow cursor), custom_cursor_name is a string description (such as \"arrow\") that will be override the resource_id, if available. In either case resource_id should be nonzero.\0"
2960 "gfx_setcursor\tresource_id\tSets the mouse cursor. resource_id is a value like 32512 (for an arrow cursor).\0"
2962 "gfx_lineto\tx,y[,aa]\tDraws a line from gfx_x,gfx_y to x,y. If aa is 0.5 or greater, then antialiasing is used. Updates gfx_x and gfx_y to x,y.\0"
2963 "gfx_line\tx,y,x2,y2[,aa]\tDraws a line from x,y to x2,y2, and if aa is not specified or 0.5 or greater, it will be antialiased. \0"
2964 "gfx_rectto\tx,y\tFills a rectangle from gfx_x,gfx_y to x,y. Updates gfx_x,gfx_y to x,y. \0"
2965 "gfx_rect\tx,y,w,h[,filled]\tFills a rectangle at x,y, w,h pixels in dimension, filled by default. \0"
2966 "gfx_setpixel\tr,g,b\tWrites a pixel of r,g,b to gfx_x,gfx_y.\0"
2967 "gfx_getpixel\tr,g,b\tGets the value of the pixel at gfx_x,gfx_y into r,g,b. \0"
2968 "gfx_drawnumber\tn,ndigits\tDraws the number n with ndigits of precision to gfx_x, gfx_y, and updates gfx_x to the right side of the drawing. The text height is gfx_texth.\0"
2969 "gfx_drawchar\tchar\tDraws the character (can be a numeric ASCII code as well), to gfx_x, gfx_y, and moves gfx_x over by the size of the character.\0"
2970 "gfx_drawstr\t\"str\"[,flags,right,bottom]\tDraws a string at gfx_x, gfx_y, and updates gfx_x/gfx_y so that subsequent draws will occur in a similar place.\n\n"
2971 "If flags, right ,bottom passed in:\n"
2972 "\4flags&1: center horizontally\n"
2973 "\4flags&2: right justify\n"
2974 "\4flags&4: center vertically\n"
2975 "\4flags&8: bottom justify\n"
2976 "\4flags&256: ignore right/bottom, otherwise text is clipped to (gfx_x, gfx_y, right, bottom)\0"
2977 "gfx_measurestr\t\"str\",&w,&h\tMeasures the drawing dimensions of a string with the current font (as set by gfx_setfont). \0"
2978 "gfx_measurechar\tcharacter,&w,&h\tMeasures the drawing dimensions of a character with the current font (as set by gfx_setfont). \0"
2979 "gfx_setfont\tidx[,\"fontface\", sz, flags]\tCan select a font and optionally configure it. idx=0 for default bitmapped font, no configuration is possible for this font. idx=1..16 for a configurable font, specify fontface such as \"Arial\", sz of 8-100, and optionally specify flags, which is a multibyte character, which can include 'i' for italics, 'u' for underline, or 'b' for bold. These flags may or may not be supported depending on the font and OS. After calling gfx_setfont(), gfx_texth may be updated to reflect the new average line height.\0"
2980 "gfx_getfont\t[#str]\tReturns current font index. If a string is passed, it will receive the actual font face used by this font, if available.\0"
2981 "gfx_printf\t\"format\"[, ...]\tFormats and draws a string at gfx_x, gfx_y, and updates gfx_x/gfx_y accordingly (the latter only if the formatted string contains newline). For more information on format strings, see sprintf()\0"
2982 "gfx_blurto\tx,y\tBlurs the region of the screen between gfx_x,gfx_y and x,y, and updates gfx_x,gfx_y to x,y.\0"
2983 "gfx_blit\tsource[, scale, rotation, srcx, srcy, srcw, srch, destx, desty, destw, desth, rotxoffs, rotyoffs]\t"
2984 "Copies from source (-1 = main framebuffer, or an image from gfx_loadimg() etc), using current opacity and copy mode (set with gfx_a, gfx_mode).\n"
2985 "If destx/desty are not specified, gfx_x/gfx_y will be used as the destination position.\n"
2986 "scale (1.0 is unscaled) will be used only if destw/desth are not specified.\n"
2987 "rotation is an angle in radians\n"
2988 "srcx/srcy/srcw/srch specify the source rectangle (if omitted srcw/srch default to image size)\n"
2989 "destx/desty/destw/desth specify destination rectangle (if not specified destw/desth default to srcw/srch * scale). \0"
2990 "gfx_blitext\tsource,coordinatelist,rotation\tDeprecated, use gfx_blit instead.\0"
2991 "gfx_getimgdim\timage,w,h\tRetreives the dimensions of image (representing a filename: index number) into w and h. Sets these values to 0 if an image failed loading (or if the filename index is invalid).\0"
2992 "gfx_setimgdim\timage,w,h\tResize image referenced by index 0.." EEL_LICE_DOC_MAXHANDLE
", width and height must be 0-8192. The contents of the image will be undefined after the resize.\0"
2993 "gfx_loadimg\timage,\"filename\"\tLoad image from filename into slot 0.." EEL_LICE_DOC_MAXHANDLE
" specified by image. Returns the image index if success, otherwise -1 if failure. The image will be resized to the dimensions of the image file. \0"
2994 "gfx_gradrect\tx,y,w,h, r,g,b,a[, drdx, dgdx, dbdx, dadx, drdy, dgdy, dbdy, dady]\tFills a gradient rectangle with the color and alpha specified. drdx-dadx reflect the adjustment (per-pixel) applied for each pixel moved to the right, drdy-dady are the adjustment applied for each pixel moved toward the bottom. Normally drdx=adjustamount/w, drdy=adjustamount/h, etc.\0"
2995 "gfx_muladdrect\tx,y,w,h,mul_r,mul_g,mul_b[,mul_a,add_r,add_g,add_b,add_a]\tMultiplies each pixel by mul_* and adds add_*, and updates in-place. Useful for changing brightness/contrast, or other effects.\0"
2996 "gfx_deltablit\tsrcimg,srcs,srct,srcw,srch,destx,desty,destw,desth,dsdx,dtdx,dsdy,dtdy,dsdxdy,dtdxdy[,usecliprect=1]\tBlits from srcimg(srcx,srcy,srcw,srch) "
2997 "to destination (destx,desty,destw,desth). Source texture coordinates are s/t, dsdx represents the change in s coordinate for each x pixel"
2998 ", dtdy represents the change in t coordinate for each y pixel, etc. dsdxdy represents the change in dsdx for each line. If usecliprect is specified and 0, then srcw/srch are ignored.\0"
2999 "gfx_transformblit\tsrcimg,destx,desty,destw,desth,div_w,div_h,table\tBlits to destination at (destx,desty), size (destw,desth). "
3000 "div_w and div_h should be 2..64, and table should point to a table of 2*div_w*div_h values (this table must not cross a "
3001 "65536 item boundary). Each pair in the table represents a S,T coordinate in the source image, and the table is treated as "
3002 "a left-right, top-bottom list of texture coordinates, which will then be rendered to the destination.\0"
3003 "gfx_circle\tx,y,r[,fill,antialias]\tDraws a circle, optionally filling/antialiasing. \0"
3004 "gfx_triangle\tx1,y1,x2,y2,x3,y3[x4,y4...]\tDraws a filled triangle, or any convex polygon. \0"
3005 "gfx_roundrect\tx,y,w,h,radius[,antialias]\tDraws a rectangle with rounded corners. \0"
3006 "gfx_arc\tx,y,r,ang1,ang2[,antialias]\tDraws an arc of the circle centered at x,y, with ang1/ang2 being specified in radians.\0"
3007 "gfx_set\tr[,g,b,a,mode,dest,a2]\tSets gfx_r/gfx_g/gfx_b/gfx_a/gfx_mode/gfx_a2, sets gfx_dest if final parameter specified\0"
3008 "gfx_getdropfile\tidx[,#str]\tEnumerates any drag/dropped files. call gfx_dropfile(-1) to clear the list when finished. Returns 1 if idx is valid, 0 if idx is out of range.\0"
3010#ifdef EEL_LICE_WANT_STANDALONE
3011#ifndef EEL_LICE_STANDALONE_NOINITQUIT
3012 "gfx_clienttoscreen\tx,y\tConverts client coordinates x,y to screen coordinates.\0"
3013 "gfx_screentoclient\tx,y\tConverts screen coordinates x,y to client coordinates.\0"
3017#ifdef EELSCRIPT_LICE_MAX_IMAGES
uint8_t a
Definition Spc_Cpu.h:141
float abs(const fft_t *freqs, off_t x)
Definition OscilGen.cpp:52
static const unsigned long mask[]
Definition bitwise.c:31
Definition lice_text.h:61
virtual int getHeight()=0
virtual bool resize(int w, int h)=0
virtual HDC getDC()
Definition lice.h:95
Definition lice_text.h:37
virtual void SetFromHFont(HFONT font, int flags=0)=0
virtual LICE_pixel SetTextColor(LICE_pixel color)=0
virtual int DrawText(LICE_IBitmap *bm, const char *str, int strcnt, RECT *rect, UINT dtFlags)=0
virtual void SetCombineMode(int combine, float alpha=1.0f)=0
PTRTYPE * Add(PTRTYPE *item)
Definition ptrlist.h:82
void Empty()
Definition ptrlist.h:166
int GetSize() const
Definition heapbuf.h:263
Definition eel_lice.h:190
EEL_F gfx_loadimg(void *opaque, int img, EEL_F loadFrom)
Definition eel_lice.h:995
bool m_has_had_getch
Definition eel_lice.h:319
eel_lice_state(NSEEL_VMCTX vm, void *ctx, int image_slots, int font_slots)
Definition eel_lice.h:327
EEL_F * m_gfx_r
Definition eel_lice.h:255
void gfx_rect(int np, EEL_F **parms)
Definition eel_lice.h:869
EEL_F * m_gfx_a2
Definition eel_lice.h:255
void gfx_circle(float x, float y, float r, bool fill, bool aaflag)
Definition eel_lice.h:786
LICE_pixel getCurColor()
Definition eel_lice.h:431
void gfx_rectto(EEL_F xpos, EEL_F ypos)
Definition eel_lice.h:834
LICE_IFont * GetActiveFont()
Definition eel_lice.h:227
void gfx_blitext2(int np, EEL_F **parms, int mode)
Definition eel_lice.h:1258
void gfx_blurto(EEL_F x, EEL_F y)
Definition eel_lice.h:1052
EEL_F * m_gfx_h
Definition eel_lice.h:255
EEL_F gfx_getdropfile(void *opaque, int np, EEL_F **parms)
Definition eel_lice.h:975
void * m_user_ctx
Definition eel_lice.h:260
void gfx_drawnumber(EEL_F n, EEL_F ndigits)
Definition eel_lice.h:1763
void gfx_arc(int np, EEL_F **parms)
Definition eel_lice.h:899
void resetVarsToStock()
Definition eel_lice.h:196
EEL_F * m_gfx_y
Definition eel_lice.h:255
EEL_F * m_gfx_a
Definition eel_lice.h:255
void gfx_drawstr(void *opaque, EEL_F **parms, int nparms, int formatmode)
Definition eel_lice.h:1662
EEL_F * m_mouse_hwheel
Definition eel_lice.h:256
@ EELFONT_FLAG_BOLD
Definition eel_lice.h:220
@ EELFONT_FLAG_MASK
Definition eel_lice.h:223
@ EELFONT_FLAG_ITALIC
Definition eel_lice.h:221
@ EELFONT_FLAG_UNDERLINE
Definition eel_lice.h:222
void gfx_line(int np, EEL_F **parms)
Definition eel_lice.h:853
void gfx_triangle(EEL_F **parms, int nparms)
Definition eel_lice.h:801
EEL_F * m_mouse_wheel
Definition eel_lice.h:256
int m_has_cap
Definition eel_lice.h:318
void gfx_grad_or_muladd_rect(int mode, int np, EEL_F **parms)
Definition eel_lice.h:913
int getCurModeForBlit(bool isFBsrc)
Definition eel_lice.h:415
void finish_draw()
Definition eel_lice.h:1894
EEL_F gfx_setfont(void *opaque, int np, EEL_F **parms)
Definition eel_lice.h:1119
EEL_F * m_gfx_x
Definition eel_lice.h:255
LICE_IBitmap * m_framebuffer
Definition eel_lice.h:206
void gfx_getpixel(EEL_F *r, EEL_F *g, EEL_F *b)
Definition eel_lice.h:1399
EEL_F * m_gfx_clear
Definition eel_lice.h:255
EEL_F * m_gfx_g
Definition eel_lice.h:255
void gfx_drawchar(EEL_F ch)
Definition eel_lice.h:1742
void SetImageDirty(LICE_IBitmap *bm)
Definition eel_lice.h:241
WDL_TypedBuf< LICE_IBitmap * > m_gfx_images
Definition eel_lice.h:208
void gfx_blitext(EEL_F img, EEL_F *coords, EEL_F angle)
Definition eel_lice.h:1340
LICE_IBitmap * GetImageForIndex(EEL_F idx, const char *callername)
Definition eel_lice.h:229
void gfx_transformblit(EEL_F **parms, int div_w, int div_h, EEL_F *tab)
Definition eel_lice.h:1083
WDL_TypedBuf< gfxFontStruct > m_gfx_fonts
Definition eel_lice.h:218
NSEEL_VMCTX m_vmref
Definition eel_lice.h:259
EEL_F * m_gfx_w
Definition eel_lice.h:255
~eel_lice_state()
Definition eel_lice.h:381
int getCurMode()
Definition eel_lice.h:407
int setup_frame(HWND hwnd, RECT r, int _mouse_x=0, int _mouse_y=0, int has_dpi=0)
Definition eel_lice.h:1782
void gfx_setpixel(EEL_F r, EEL_F g, EEL_F b)
Definition eel_lice.h:941
void gfx_lineto(EEL_F xpos, EEL_F ypos, EEL_F aaflag)
Definition eel_lice.h:768
void gfx_getimgdim(EEL_F img, EEL_F *w, EEL_F *h)
Definition eel_lice.h:960
EEL_F gfx_getfont(void *opaque, int np, EEL_F **parms)
EEL_F * m_gfx_ext_retina
Definition eel_lice.h:257
EEL_F * m_mouse_x
Definition eel_lice.h:256
EEL_F gfx_setimgdim(int img, EEL_F *w, EEL_F *h)
Definition eel_lice.h:1021
EEL_F * m_gfx_b
Definition eel_lice.h:255
EEL_F * m_gfx_dest
Definition eel_lice.h:255
WDL_PtrList< char > m_ddrop_files
Definition eel_lice.h:321
void gfx_roundrect(int np, EEL_F **parms)
Definition eel_lice.h:885
EEL_F * m_gfx_mode
Definition eel_lice.h:255
LICE_IBitmap * m_framebuffer_extra
Definition eel_lice.h:206
EEL_F * m_gfx_texth
Definition eel_lice.h:255
EEL_F * m_mouse_y
Definition eel_lice.h:256
int m_gfx_font_active
Definition eel_lice.h:226
EEL_F * m_mouse_cap
Definition eel_lice.h:256
void gfx_set(int np, EEL_F **parms)
Definition eel_lice.h:1387
int m_framebuffer_dirty
Definition eel_lice.h:207
UINT_D64 w
Definition inflate.c:942
int y
Definition inflate.c:1588
unsigned v[N_MAX]
Definition inflate.c:1584
unsigned d
Definition inflate.c:940
int g
Definition inflate.c:1573
register unsigned i
Definition inflate.c:1575
unsigned s
Definition inflate.c:1555
unsigned x[BMAX+1]
Definition inflate.c:1586
unsigned f
Definition inflate.c:1572
EEL_F *(* NSEEL_VM_regvar)(NSEEL_VMCTX ctx, const char *name)
Definition eel_import.h:13
#define NSEEL_addfunc_varparm(name, min_np, pproc, fptr)
Definition eel_import.h:63
#define NSEEL_addfunc_exparms(name, np, pproc, fptr)
Definition eel_import.h:67
#define NSEEL_addfunc_retptr(name, np, pproc, fptr)
Definition eel_import.h:55
#define NSEEL_addfunc_retval(name, np, pproc, fptr)
Definition eel_import.h:51
void *(* NSEEL_PProc_THIS)(void *data, int data_size, struct _compileContext *ctx)
Definition eel_import.h:40
void eel_lice_register()
Definition eel_lice.h:1913
static EEL_F *NSEEL_CGEN_CALL _gfx_lineto2(void *opaque, EEL_F *xpos, EEL_F *ypos)
Definition eel_lice.h:451
static void LICE__SetTextCombineMode(LICE_IFont *ifont, int mode, float alpha)
Definition eel_lice.h:153
static HDC LICE__GetDC(LICE_IBitmap *bm)
Definition eel_lice.h:128
static EEL_F NSEEL_CGEN_CALL _gfx_drawstr(void *opaque, INT_PTR nparms, EEL_F **parms)
Definition eel_lice.h:605
static int LICE__GetWidth(LICE_IBitmap *bm)
Definition eel_lice.h:132
static void LICE__Destroy(LICE_IBitmap *bm)
Definition eel_lice.h:140
static EEL_F NSEEL_CGEN_CALL _gfx_triangle(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:563
static EEL_F NSEEL_CGEN_CALL _gfx_loadimg(void *opaque, EEL_F *img, EEL_F *fr)
Definition eel_lice.h:743
static LICE_IBitmap * __LICE_CreateBitmap(int mode, int w, int h)
Definition eel_lice.h:177
static bool LICE__resize(LICE_IBitmap *bm, int w, int h)
Definition eel_lice.h:172
static EEL_F NSEEL_CGEN_CALL _gfx_rect(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:472
static EEL_F NSEEL_CGEN_CALL _gfx_set(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:490
static EEL_F NSEEL_CGEN_CALL _gfx_roundrect(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:478
static EEL_F *NSEEL_CGEN_CALL _gfx_lineto(void *opaque, EEL_F *xpos, EEL_F *ypos, EEL_F *useaa)
Definition eel_lice.h:445
static HMENU PopulateMenuFromStr(const char **str, int *startid)
Definition eel_lice.h:1521
static EEL_F NSEEL_CGEN_CALL _gfx_blit2(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:684
static int LICE__DrawText(LICE_IFont *ifont, LICE_IBitmap *bm, const char *str, int strcnt, RECT *rect, UINT dtFlags)
Definition eel_lice.h:157
static EEL_F NSEEL_CGEN_CALL _gfx_setfont(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:652
static EEL_F *NSEEL_CGEN_CALL _gfx_blurto(void *opaque, EEL_F *x, EEL_F *y)
Definition eel_lice.h:729
static EEL_F *NSEEL_CGEN_CALL _gfx_rectto(void *opaque, EEL_F *xpos, EEL_F *ypos)
Definition eel_lice.h:458
static EEL_F NSEEL_CGEN_CALL _gfx_deltablit(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:510
static EEL_F *NSEEL_CGEN_CALL _gfx_measurechar(void *opaque, EEL_F *str, EEL_F *xOut, EEL_F *yOut)
Definition eel_lice.h:594
static int LICE__GetHeight(LICE_IBitmap *bm)
Definition eel_lice.h:136
static EEL_F NSEEL_CGEN_CALL _gfx_arc(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:484
static EEL_F *NSEEL_CGEN_CALL _gfx_drawchar(void *opaque, EEL_F *n)
Definition eel_lice.h:577
static EEL_F NSEEL_CGEN_CALL _gfx_setimgdim(void *opaque, EEL_F *img, EEL_F *w, EEL_F *h)
Definition eel_lice.h:756
static EEL_F *NSEEL_CGEN_CALL _gfx_blitext(void *opaque, EEL_F *img, EEL_F *coordidx, EEL_F *rotate)
Definition eel_lice.h:695
#define LICE_FUNCTION_VALID(x)
Definition eel_lice.h:126
static bool CoordsSrcDestOverlap(EEL_F *coords)
Definition eel_lice.h:1074
static void LICE__DestroyFont(LICE_IFont *bm)
Definition eel_lice.h:168
static EEL_F *NSEEL_CGEN_CALL _gfx_measurestr(void *opaque, EEL_F *str, EEL_F *xOut, EEL_F *yOut)
Definition eel_lice.h:584
static EEL_F NSEEL_CGEN_CALL _gfx_setcursor(void *opaque, INT_PTR nparms, EEL_F **parms)
Definition eel_lice.h:631
static int __drawTextWithFont(LICE_IBitmap *dest, const RECT *rect, LICE_IFont *font, const char *buf, int buflen, int fg, int mode, float alpha, int flags, EEL_F *wantYoutput, EEL_F **measureOnly)
Definition eel_lice.h:1413
static EEL_F *NSEEL_CGEN_CALL _gfx_getimgdim(void *opaque, EEL_F *img, EEL_F *w, EEL_F *h)
Definition eel_lice.h:736
static EEL_F NSEEL_CGEN_CALL _gfx_muladdrect(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:503
static EEL_F *NSEEL_CGEN_CALL _gfx_drawnumber(void *opaque, EEL_F *n, EEL_F *nd)
Definition eel_lice.h:570
static EEL_F NSEEL_CGEN_CALL _gfx_getfont(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:659
static LICE_IFont * LICE_CreateFont()
Definition eel_lice.h:164
static EEL_F NSEEL_CGEN_CALL _gfx_printf(void *opaque, INT_PTR nparms, EEL_F **parms)
Definition eel_lice.h:612
static EEL_F NSEEL_CGEN_CALL _gfx_showmenu(void *opaque, INT_PTR nparms, EEL_F **parms)
Definition eel_lice.h:624
static EEL_F *NSEEL_CGEN_CALL _gfx_getpixel(void *opaque, EEL_F *r, EEL_F *g, EEL_F *b)
Definition eel_lice.h:645
static EEL_F NSEEL_CGEN_CALL _gfx_line(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:465
static void LICE__SetFromHFont(LICE_IFont *ifont, HFONT font, int flags)
Definition eel_lice.h:144
static EEL_F NSEEL_CGEN_CALL _gfx_circle(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:553
static EEL_F NSEEL_CGEN_CALL _gfx_getdropfile(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:750
static LICE_pixel LICE__SetTextColor(LICE_IFont *ifont, LICE_pixel color)
Definition eel_lice.h:148
static EEL_F *NSEEL_CGEN_CALL _gfx_setpixel(void *opaque, EEL_F *r, EEL_F *g, EEL_F *b)
Definition eel_lice.h:638
static EEL_F NSEEL_CGEN_CALL _gfx_getsyscol(void *ctxe, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:763
static EEL_F NSEEL_CGEN_CALL _gfx_gradrect(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:496
static EEL_F NSEEL_CGEN_CALL _gfx_transformblit(void *opaque, INT_PTR np, EEL_F **parms)
Definition eel_lice.h:517
#define EEL_STRING_GET_FOR_WRITE(x, wr)
Definition eel_strings.h:100
#define EEL_STRING_GET_FOR_INDEX(x, wr)
Definition eel_strings.h:96
#define EEL_STRING_MUTEXLOCK_SCOPE
Definition eel_strings.h:90
int eel_format_strings(void *opaque, const char *fmt, const char *fmt_end, char *buf, int buf_sz, int num_fmt_parms, EEL_F **fmt_parms)
Definition eel_strings.h:402
#define opaque
Definition eelscript.h:281
#define EEL_LICE_GET_CONTEXT(opaque)
Definition eelscript.h:209
struct @113205115357366127300225113341150224053346037032::@137033172036070230260373056156374243321245367362 left
static char filename[]
Definition features.c:5
static void r2(register WDL_FFT_REAL *a)
Definition fft.c:1089
static const char * title
Definition pugl.h:1747
static const char * name
Definition pugl.h:1582
LICE_pixel LICE_GetPixel(LICE_IBitmap *bm, int x, int y)
Definition lice.cpp:2220
void LICE_MultiplyAddRect(LICE_IBitmap *dest, int x, int y, int w, int h, float rsc, float gsc, float bsc, float asc, float radd, float gadd, float badd, float aadd)
Definition lice.cpp:2006
void LICE_Blur(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int srcx, int srcy, int srcw, int srch)
Definition lice.cpp:1103
void LICE_DeltaBlit(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, float srcx, float srcy, float srcw, float srch, double dsdx, double dtdx, double dsdy, double dtdy, double dsdxdy, double dtdxdy, bool cliptosourcerect, float alpha, int mode)
Definition lice.cpp:1485
void LICE_TransformBlit2(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, const double *srcpoints, int div_w, int div_h, float alpha, int mode)
Definition lice.cpp:2464
void LICE_GradRect(LICE_IBitmap *dest, int dstx, int dsty, int dstw, int dsth, float ir, float ig, float ib, float ia, float drdx, float dgdx, float dbdx, float dadx, float drdy, float dgdy, float dbdy, float dady, int mode)
Definition lice.cpp:835
LICE_IBitmap * LICE_LoadImage(const char *filename, LICE_IBitmap *bmp=NULL, bool tryIgnoreExtension=false)
Definition lice_image.cpp:5
#define LICE_GETG(v)
Definition lice.h:59
#define LICE_BLIT_USE_ALPHA
Definition lice.h:331
#define LICE_GETB(v)
Definition lice.h:58
#define LICE_RGBA(r, g, b, a)
Definition lice.h:57
static LICE_pixel LICE_RGBA_FROMNATIVE(LICE_pixel col, int alpha=0)
Definition lice.h:76
#define LICE_BLIT_FILTER_BILINEAR
Definition lice.h:327
#define LICE_GETR(v)
Definition lice.h:60
#define LICE_BLIT_MODE_COPY
Definition lice.h:316
unsigned int LICE_pixel
Definition lice.h:54
#define LICE_BLIT_MODE_ADD
Definition lice.h:317
void LICE_DrawChar(LICE_IBitmap *bm, int x, int y, char c, LICE_pixel color, float alpha, int mode)
Definition lice_text.cpp:1283
bool LICE_ClipLine(int *pX1, int *pY1, int *pX2, int *pY2, int xLo, int yLo, int xHi, int yHi)
Definition lice_line.cpp:980
#define LICE_BLIT_MODE_HSVADJ
Definition lice.h:321
void LICE_RoundRect(LICE_IBitmap *drawbm, float xpos, float ypos, float w, float h, int cornerradius, LICE_pixel col, float alpha, int mode, bool aa)
Definition lice_arc.cpp:684
LICE_FUNC_DEF_DECL void(* __LICE_DrawRect)(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel color, float alpha, int mode)
Definition lice_import.h:16
#define LICE_PutPixel
Definition lice_import.h:34
#define LICE_MeasureText
Definition lice_import.h:53
LICE_FUNC_DEF_DECL void(* __LICE_PutPixel)(LICE_IBitmap *dest, int x, int y, LICE_pixel color, float alpha, int mode)
Definition lice_import.h:11
LICE_FUNC_DEF_DECL void(* __LICE_Arc)(LICE_IBitmap *dest, float cx, float cy, float r, float alo, float ahi, LICE_pixel color, float alpha, int mode, bool aa)
Definition lice_import.h:25
#define LICE_Arc
Definition lice_import.h:48
#define LICE_DrawText
Definition lice_import.h:52
LICE_FUNC_DEF_DECL void(* __LICE_FillConvexPolygon)(LICE_IBitmap *dest, int *x, int *y, int npoints, LICE_pixel color, float alpha, int mode)
Definition lice_import.h:27
#define LICE_DrawRect
Definition lice_import.h:39
#define LICE_Circle
Definition lice_import.h:40
#define LICE_FillRect
Definition lice_import.h:38
LICE_FUNC_DEF_DECL void(* __LICE_RotatedBlit)(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, float srcx, float srcy, float srcw, float srch, float angle, bool cliptosourcerect, float alpha, int mode, float rotxcent, float rotycent)
Definition lice_import.h:22
LICE_FUNC_DEF_DECL void(* __LICE_ScaledBlit)(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, float srcx, float srcy, float srcw, float srch, float alpha, int mode)
Definition lice_import.h:31
LICE_FUNC_DEF_DECL void *(* LICE_CreateFont)()
Definition lice_import.h:33
#define LICE_Clear
Definition lice_import.h:41
LICE_FUNC_DEF_DECL void(* __LICE_FillTriangle)(LICE_IBitmap *dest, int x1, int y1, int x2, int y2, int x3, int y3, LICE_pixel color, float alpha, int mode)
Definition lice_import.h:24
#define LICE_FillTriangle
Definition lice_import.h:47
LICE_FUNC_DEF_DECL void(* __LICE_Line)(LICE_IBitmap *dest, int x1, int y1, int x2, int y2, LICE_pixel color, float alpha, int mode, bool aa)
Definition lice_import.h:12
#define LICE_FillConvexPolygon
Definition lice_import.h:50
LICE_FUNC_DEF_DECL void(* __LICE_DrawText)(LICE_IBitmap *bm, int x, int y, const char *string, LICE_pixel color, float alpha, int mode)
Definition lice_import.h:29
LICE_FUNC_DEF_DECL void(* __LICE_Clear)(LICE_IBitmap *dest, LICE_pixel color)
Definition lice_import.h:20
#define LICE_Line
Definition lice_import.h:35
LICE_FUNC_DEF_DECL void(* __LICE_FillCircle)(LICE_IBitmap *dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa)
Definition lice_import.h:19
LICE_FUNC_DEF_DECL LICE_IBitmap *(* __LICE_CreateBitmap)(int, int, int)
Definition lice_import.h:10
#define LICE_ScaledBlit
Definition lice_import.h:54
LICE_FUNC_DEF_DECL void(* __LICE_MeasureText)(const char *string, int *w, int *h)
Definition lice_import.h:30
#define LICE_RotatedBlit
Definition lice_import.h:43
LICE_FUNC_DEF_DECL void(* __LICE_Circle)(LICE_IBitmap *dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa)
Definition lice_import.h:18
#define LICE_FillCircle
Definition lice_import.h:45
LICE_FUNC_DEF_DECL void(* __LICE_FillRect)(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel color, float alpha, int mode)
Definition lice_import.h:15
const char * msg
Definition missing_descriptor.c:20
jack_client_t client jack_client_t client jack_client_t client jack_client_t JackInfoShutdownCallback void arg jack_client_t jack_port_t port void func jack_client_t const char const char unsigned long flags
Definition juce_linux_JackAudio.cpp:69
struct _compileContext compileContext
EEL_F *NSEEL_CGEN_CALL __NSEEL_RAMAlloc(EEL_F **blocks, unsigned int w)
Definition nseel-ram.c:139
EEL_F nseel_ramalloc_onfail
Definition nseel-ram.c:92
#define NSEEL_CGEN_CALL
Definition ns-eel.h:44
void * NSEEL_VMCTX
Definition ns-eel.h:117
#define NSEEL_RAM_ITEMSPERBLOCK
Definition ns-eel.h:235
#define NSEEL_RAM_BLOCKS
Definition ns-eel.h:234
png_structrp int mode
Definition png.h:1139
png_structrp int png_fixed_point red
Definition png.h:1083
Definition swell-types.h:254
Definition swell-types.h:535
HDC hdc
Definition swell-types.h:536
Definition swell-types.h:218
LONG x
Definition swell-types.h:219
LONG y
Definition swell-types.h:219
Definition swell-types.h:231
LONG bottom
Definition swell-types.h:232
LONG left
Definition swell-types.h:232
LONG top
Definition swell-types.h:232
LONG right
Definition swell-types.h:232
Definition swell-types.h:526
LONG tmHeight
Definition swell-types.h:527
Definition eel_lice.h:209
int last_fontsize
Definition eel_lice.h:213
int use_fonth
Definition eel_lice.h:216
char actual_fontname[128]
Definition eel_lice.h:212
char last_fontname[128]
Definition eel_lice.h:211
LICE_IFont * font
Definition eel_lice.h:210
int last_fontflag
Definition eel_lice.h:214
#define WM_CAPTURECHANGED
#define WS_EX_ACCEPTFILES
#define OUT_DEFAULT_PRECIS
#define CLIP_DEFAULT_PRECIS
HWND SWELL_CreateDialog(SWELL_DialogResourceIndex *reshead, const char *resid, HWND parent, DLGPROC dlgproc, LPARAM param)
Definition swell-dlg-generic.cpp:272
#define SetWindowText(hwnd, text)
Definition swell-functions.h:210
#define SWELL_EnableMetal(hwnd, x)
#define GetWindowText(hwnd, text, textlen)
Definition swell-functions.h:209
RECT const char void HWND hwnd
Definition swell-functions.h:1066
void StretchBlt(HDC hdcOut, int x, int y, int w, int h, HDC hdcIn, int xin, int yin, int srcw, int srch, int mode)
Definition swell-gdi-generic.cpp:502
HGDIOBJ SelectObject(HDC ctx, HGDIOBJ pen)
Definition swell-gdi-generic.cpp:193
void BitBlt(HDC hdcOut, int x, int y, int w, int h, HDC hdcIn, int xin, int yin, int mode)
Definition swell-gdi-generic.cpp:498
BOOL GetTextMetrics(HDC ctx, TEXTMETRIC *tm)
Definition swell-gdi-generic.cpp:398
int SWELL_GetScaling256(void)
Definition swell-gdi-generic.cpp:62
HFONT CreateFont(int lfHeight, int lfWidth, int lfEscapement, int lfOrientation, int lfWeight, char lfItalic, char lfUnderline, char lfStrikeOut, char lfCharSet, char lfOutPrecision, char lfClipPrecision, char lfQuality, char lfPitchAndFamily, const char *lfFaceName)
Definition swell-gdi-generic.cpp:137
HDC BeginPaint(HWND hwnd, PAINTSTRUCT *ps)
Definition swell-gdi-generic.cpp:562
int GetTextFace(HDC ctx, int nCount, LPTSTR lpFaceName)
Definition swell-gdi-generic.cpp:167
int GetSysColor(int idx)
Definition swell-gdi-generic.cpp:42
WORD GetAsyncKeyState(int key)
Definition swell-generic-headless.cpp:218
bool GetWindowRect(HWND hwnd, RECT *r)
Definition swell-generic-headless.cpp:130
void SWELL_RunEvents()
Definition swell-generic-headless.cpp:98
void GetCursorPos(POINT *pt)
Definition swell-generic-headless.cpp:211
void UpdateWindow(HWND hwnd)
Definition swell-generic-headless.cpp:151
#define LOWORD(l)
Definition swell-types.h:90
void * HINSTANCE
Definition swell-types.h:212
uintptr_t UINT_PTR
Definition swell-types.h:43
LONG_PTR LRESULT
Definition swell-types.h:171
unsigned int UINT
Definition swell-types.h:166
LONG_PTR LPARAM
Definition swell-types.h:170
intptr_t INT_PTR
Definition swell-types.h:42
struct MINMAXINFO * LPMINMAXINFO
void * HDROP
Definition swell-types.h:212
ULONG_PTR WPARAM
Definition swell-types.h:169
struct HGDIOBJ__ * HFONT
Definition swell-types.h:272
struct HMENU__ * HMENU
Definition swell-types.h:211
#define WINAPI
Definition swell-types.h:631
struct HGDIOBJ__ * HGDIOBJ
Definition swell-types.h:269
struct HCURSOR__ * HCURSOR
Definition swell-types.h:264
struct HWND__ * HWND
Definition swell-types.h:210
struct HGDIOBJ__ * HICON
Definition swell-types.h:268
struct HDC__ * HDC
Definition swell-types.h:263
INT_PTR(* DLGPROC)(HWND, UINT, WPARAM, LPARAM)
Definition swell-types.h:586
#define HIWORD(l)
Definition swell-types.h:91
#define MAKEINTRESOURCE(x)
Definition swell-types.h:1157
HWND SetCapture(HWND hwnd)
Definition swell-wnd-generic.cpp:6934
LONG_PTR GetWindowLong(HWND hwnd, int idx)
Definition swell-wnd-generic.cpp:235
void DragFinish(HDROP hDrop)
Definition swell-wnd-generic.cpp:7516
UINT DragQueryFile(HDROP hDrop, UINT wf, char *buf, UINT bufsz)
Definition swell-wnd-generic.cpp:7521
LRESULT DefWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition swell-wnd-generic.cpp:7223
int GetSystemMetrics(int p)
Definition swell-wnd-generic.cpp:7734
void SWELL_SetClassName(HWND hwnd, const char *p)
Definition swell-wnd-generic.cpp:8421
HWND GetCapture()
Definition swell-wnd-generic.cpp:6929
void DestroyWindow(HWND hwnd)
Definition swell-wnd-generic.cpp:449
HWND GetFocus()
Definition swell-wnd-generic.cpp:572
void SetWindowPos(HWND hwnd, HWND zorder, int x, int y, int cx, int cy, int flags)
Definition swell-wnd-generic.cpp:637
bool IsWindowVisible(HWND hwnd)
Definition swell-wnd-generic.cpp:302
void ScreenToClient(HWND hwnd, POINT *pt)
Definition swell-wnd-generic.cpp:580
void SetFocus(HWND hwnd)
Definition swell-wnd-generic.cpp:506
LONG_PTR SetWindowLong(HWND hwnd, int idx, LONG_PTR val)
Definition swell-wnd-generic.cpp:163
BOOL EndPaint(HWND hwnd, PAINTSTRUCT *ps)
Definition swell-wnd-generic.cpp:7082
void ClientToScreen(HWND hwnd, POINT *pt)
Definition swell-wnd-generic.cpp:596
void ReleaseCapture()
Definition swell-wnd-generic.cpp:6946
BOOL InvalidateRect(HWND hwnd, const RECT *r, int eraseBk)
Definition swell-wnd-generic.cpp:6848
void GetClientRect(HWND hwnd, RECT *r)
Definition swell-wnd-generic.cpp:621
void ShowWindow(HWND hwnd, int cmd)
Definition swell-wnd-generic.cpp:1034
HINSTANCE LoadLibrary(const char *fn)
Definition swell.cpp:793
void * GetProcAddress(HINSTANCE hInst, const char *procName)
Definition swell.cpp:902
char * lstrcpyn(char *dest, const char *src, int l)
Definition swell.cpp:767
int n
Definition crypt.c:458
uch * p
Definition crypt.c:594
return c
Definition crypt.c:175
int r
Definition crypt.c:458
uch h[RAND_HEAD_LEN]
Definition crypt.c:459
register uch * q
Definition fileio.c:817
int flag
Definition unix.c:754
typedef int(UZ_EXP MsgFn)()
#define void
Definition unzip.h:396
#define TRUE
Definition unzpriv.h:1295
#define FALSE
Definition unzpriv.h:1298
mo
Definition zipinfo.c:2287
_WDL_CSTRING_PREFIX void lstrcpyn_safe(char *o, const char *in, INT_PTR count)
Definition wdlcstring.h:129
#define GetWindowLongPtr(a, b)
Definition wdltypes.h:63
#define WDL_STATICFUNC_UNUSED
Definition wdltypes.h:87
#define SetWindowLongPtr(a, b, c)
Definition wdltypes.h:62
#define wdl_max(x, y)
Definition wdltypes.h:106
#define wdl_min(x, y)
Definition wdltypes.h:107
static int WDL_STATICFUNC_UNUSED WDL_MakeUTFChar(char *dest, int c, int destlen)
Definition wdlutf8.h:162
static int WDL_STATICFUNC_UNUSED WDL_DetectUTF8(const char *str)
Definition wdlutf8.h:202
#define GWLP_USERDATA
Definition win.c:30
#define WM_MOUSEHWHEEL
Definition win.c:24
#define WM_MOUSEWHEEL
Definition win.c:21
#define EEL_LICE_GET_FILENAME_FOR_STRING(idx, fs, p)
Definition ysfx_api_gfx.cpp:80