LMMS
Loading...
Searching...
No Matches
swell-gdi-generic.cpp File Reference
#include "swell.h"
#include "swell-internal.h"
#include "../wdlcstring.h"
#include "../mutex.h"
#include "../ptrlist.h"
#include "swell-gdi-internalpool.h"

Classes

class  swellColorThemeLoader

Macros

#define __def_theme_ent(x, c)
#define __def_theme_ent_fb(x, c, fb)
#define FONTSCALE   0.9
#define __def_theme_ent(x, c)
#define __def_theme_ent_fb(x, c, fb)
#define __def_theme_ent(x, c)
#define __def_theme_ent_fb(x, c, fb)

Functions

int GetSysColor (int idx)
int SWELL_GetScaling256 (void)
HDC SWELL_CreateGfxContext (void *c)
HDC SWELL_CreateMemContext (HDC hdc, int w, int h)
void SWELL_DeleteGfxContext (HDC ctx)
HPEN CreatePen (int attr, int wid, int col)
HBRUSH CreateSolidBrush (int col)
HPEN CreatePenAlpha (int attr, int wid, int col, float alpha)
HBRUSH CreateSolidBrushAlpha (int col, float alpha)
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)
HFONT SWELL_GetDefaultFont ()
HFONT CreateFontIndirect (LOGFONT *lf)
int GetTextFace (HDC ctx, int nCount, LPTSTR lpFaceName)
void DeleteObject (HGDIOBJ pen)
HGDIOBJ SelectObject (HDC ctx, HGDIOBJ pen)
void SWELL_FillRect (HDC ctx, const RECT *r, HBRUSH br)
void RoundRect (HDC ctx, int x, int y, int x2, int y2, int xrnd, int yrnd)
void Ellipse (HDC ctx, int l, int t, int r, int b)
void Rectangle (HDC ctx, int l, int t, int r, int b)
HGDIOBJ GetStockObject (int wh)
void Polygon (HDC ctx, POINT *pts, int npts)
void MoveToEx (HDC ctx, int x, int y, POINT *op)
void PolyBezierTo (HDC ctx, POINT *pts, int np)
void SWELL_LineTo (HDC ctx, int x, int y)
void PolyPolyline (HDC ctx, POINT *pts, DWORD *cnts, int nseg)
voidSWELL_GetCtxGC (HDC ctx)
void SWELL_SetPixel (HDC ctx, int x, int y, int c)
BOOL GetTextMetrics (HDC ctx, TEXTMETRIC *tm)
int DrawText (HDC ctx, const char *buf, int buflen, RECT *r, int align)
void SetBkColor (HDC ctx, int col)
void SetBkMode (HDC ctx, int col)
int GetTextColor (HDC ctx)
void SetTextColor (HDC ctx, int col)
HICON LoadNamedImage (const char *name, bool alphaFromMask)
void DrawImageInRect (HDC ctx, HICON img, const RECT *r)
void SWELL_SetViewGL (HWND h, char wantGL)
bool SWELL_GetViewGL (HWND h)
bool SWELL_SetGLContextToView (HWND h)
BOOL GetObject (HICON icon, int bmsz, void *_bm)
void BitBltAlphaFromMem (HDC hdcOut, int x, int y, int w, int h, void *inbufptr, int inbuf_span, int inbuf_h, int xin, int yin, int mode, bool useAlphaChannel, float opacity)
void BitBltAlpha (HDC hdcOut, int x, int y, int w, int h, HDC hdcIn, int xin, int yin, int mode, bool useAlphaChannel, float opacity)
void BitBlt (HDC hdcOut, int x, int y, int w, int h, HDC hdcIn, int xin, int yin, int mode)
void StretchBlt (HDC hdcOut, int x, int y, int w, int h, HDC hdcIn, int xin, int yin, int srcw, int srch, int mode)
void StretchBltFromMem (HDC hdcOut, int x, int y, int w, int h, const void *bits, int srcw, int srch, int srcspan)
void SWELL_PushClipRegion (HDC ctx)
void SWELL_SetClipRegion (HDC ctx, const RECT *r)
void SWELL_PopClipRegion (HDC ctx)
voidSWELL_GetCtxFrameBuffer (HDC ctx)
HDC GetDC (HWND h)
HDC GetWindowDC (HWND h)
void ReleaseDC (HWND h, HDC hdc)
void SWELL_FillDialogBackground (HDC hdc, const RECT *r, int level)
HGDIOBJ SWELL_CloneGDIObject (HGDIOBJ a)
HDC BeginPaint (HWND hwnd, PAINTSTRUCT *ps)
HBITMAP CreateBitmap (int width, int height, int numplanes, int bitsperpixel, unsigned char *bits)
HICON CreateIconIndirect (ICONINFO *iconinfo)
HIMAGELIST ImageList_CreateEx ()
BOOL ImageList_Remove (HIMAGELIST list, int idx)
void ImageList_Destroy (HIMAGELIST list)
int ImageList_ReplaceIcon (HIMAGELIST list, int offset, HICON image)
int ImageList_Add (HIMAGELIST list, HBITMAP image, HBITMAP mask)
int AddFontResourceEx (LPCTSTR str, DWORD fl, void *pdv)
int GetGlyphIndicesW (HDC ctx, wchar_t *buf, int len, unsigned short *indices, int flags)
void swell_load_color_theme (const char *fn)

Variables

const char * g_swell_deffont_face = "Arial"
const char * swell_last_font_filename
swell_colortheme g_swell_ctheme
int g_swell_ui_scale = 256
swellColorThemeLoader g_swell_themeloader

Macro Definition Documentation

◆ __def_theme_ent [1/3]

#define __def_theme_ent ( x,
c )
Value:
g_swell_ctheme.x = load.x == -1 ? c : load.x;
swell_colortheme g_swell_ctheme
Definition swell-gdi-generic.cpp:34
return c
Definition crypt.c:175

◆ __def_theme_ent [2/3]

#define __def_theme_ent ( x,
c )
Value:
else if (!stricmp(p,#x)) load.x = col;
unsigned x[BMAX+1]
Definition inflate.c:1586
#define stricmp(x, y)
Definition swell-types.h:68
uch * p
Definition crypt.c:594

◆ __def_theme_ent [3/3]

#define __def_theme_ent ( x,
c )
Value:
(c),

◆ __def_theme_ent_fb [1/3]

#define __def_theme_ent_fb ( x,
c,
fb )
Value:
g_swell_ctheme.x = load.x == -1 ? g_swell_ctheme.fb : load.x;

◆ __def_theme_ent_fb [2/3]

#define __def_theme_ent_fb ( x,
c,
fb )
Value:
else if (!stricmp(p,#x)) load.x = col;

◆ __def_theme_ent_fb [3/3]

#define __def_theme_ent_fb ( x,
c,
fb )
Value:
(c),

◆ FONTSCALE

#define FONTSCALE   0.9

Function Documentation

◆ AddFontResourceEx()

int AddFontResourceEx ( LPCTSTR str,
DWORD fl,
void * pdv )

◆ BeginPaint()

HDC BeginPaint ( HWND hwnd,
PAINTSTRUCT * ps )

◆ BitBlt()

void BitBlt ( HDC hdcOut,
int x,
int y,
int w,
int h,
HDC hdcIn,
int xin,
int yin,
int mode )

◆ BitBltAlpha()

void BitBltAlpha ( HDC hdcOut,
int x,
int y,
int w,
int h,
HDC hdcIn,
int xin,
int yin,
int mode,
bool useAlphaChannel,
float opacity )

◆ BitBltAlphaFromMem()

void BitBltAlphaFromMem ( HDC hdcOut,
int x,
int y,
int w,
int h,
void * inbufptr,
int inbuf_span,
int inbuf_h,
int xin,
int yin,
int mode,
bool useAlphaChannel,
float opacity )

◆ CreateBitmap()

HBITMAP CreateBitmap ( int width,
int height,
int numplanes,
int bitsperpixel,
unsigned char * bits )

◆ CreateFont()

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 )

◆ CreateFontIndirect()

HFONT CreateFontIndirect ( LOGFONT * lf)

◆ CreateIconIndirect()

HICON CreateIconIndirect ( ICONINFO * iconinfo)

◆ CreatePen()

HPEN CreatePen ( int attr,
int wid,
int col )

◆ CreatePenAlpha()

HPEN CreatePenAlpha ( int attr,
int wid,
int col,
float alpha )

◆ CreateSolidBrush()

HBRUSH CreateSolidBrush ( int col)

◆ CreateSolidBrushAlpha()

HBRUSH CreateSolidBrushAlpha ( int col,
float alpha )

◆ DeleteObject()

void DeleteObject ( HGDIOBJ pen)

◆ DrawImageInRect()

void DrawImageInRect ( HDC ctx,
HICON img,
const RECT * r )

◆ DrawText()

int DrawText ( HDC ctx,
const char * buf,
int buflen,
RECT * r,
int align )

◆ Ellipse()

void Ellipse ( HDC ctx,
int l,
int t,
int r,
int b )

◆ GetDC()

HDC GetDC ( HWND h)

◆ GetGlyphIndicesW()

int GetGlyphIndicesW ( HDC ctx,
wchar_t * buf,
int len,
unsigned short * indices,
int flags )

◆ GetObject()

BOOL GetObject ( HICON icon,
int bmsz,
void * _bm )

◆ GetStockObject()

HGDIOBJ GetStockObject ( int wh)

◆ GetSysColor()

int GetSysColor ( int idx)

◆ GetTextColor()

int GetTextColor ( HDC ctx)

◆ GetTextFace()

int GetTextFace ( HDC ctx,
int nCount,
LPTSTR lpFaceName )

◆ GetTextMetrics()

BOOL GetTextMetrics ( HDC ctx,
TEXTMETRIC * tm )

◆ GetWindowDC()

HDC GetWindowDC ( HWND h)

◆ ImageList_Add()

int ImageList_Add ( HIMAGELIST list,
HBITMAP image,
HBITMAP mask )

◆ ImageList_CreateEx()

HIMAGELIST ImageList_CreateEx ( )

◆ ImageList_Destroy()

void ImageList_Destroy ( HIMAGELIST list)

◆ ImageList_Remove()

BOOL ImageList_Remove ( HIMAGELIST list,
int idx )

◆ ImageList_ReplaceIcon()

int ImageList_ReplaceIcon ( HIMAGELIST list,
int offset,
HICON image )

◆ LoadNamedImage()

HICON LoadNamedImage ( const char * name,
bool alphaFromMask )

◆ MoveToEx()

void MoveToEx ( HDC ctx,
int x,
int y,
POINT * op )

◆ PolyBezierTo()

void PolyBezierTo ( HDC ctx,
POINT * pts,
int np )

◆ Polygon()

void Polygon ( HDC ctx,
POINT * pts,
int npts )

◆ PolyPolyline()

void PolyPolyline ( HDC ctx,
POINT * pts,
DWORD * cnts,
int nseg )

◆ Rectangle()

void Rectangle ( HDC ctx,
int l,
int t,
int r,
int b )

◆ ReleaseDC()

void ReleaseDC ( HWND h,
HDC hdc )

◆ RoundRect()

void RoundRect ( HDC ctx,
int x,
int y,
int x2,
int y2,
int xrnd,
int yrnd )

◆ SelectObject()

HGDIOBJ SelectObject ( HDC ctx,
HGDIOBJ pen )

◆ SetBkColor()

void SetBkColor ( HDC ctx,
int col )

◆ SetBkMode()

void SetBkMode ( HDC ctx,
int col )

◆ SetTextColor()

void SetTextColor ( HDC ctx,
int col )

◆ StretchBlt()

void StretchBlt ( HDC hdcOut,
int x,
int y,
int w,
int h,
HDC hdcIn,
int xin,
int yin,
int srcw,
int srch,
int mode )

◆ StretchBltFromMem()

void StretchBltFromMem ( HDC hdcOut,
int x,
int y,
int w,
int h,
const void * bits,
int srcw,
int srch,
int srcspan )

◆ SWELL_CloneGDIObject()

HGDIOBJ SWELL_CloneGDIObject ( HGDIOBJ a)

◆ SWELL_CreateGfxContext()

HDC SWELL_CreateGfxContext ( void * c)

◆ SWELL_CreateMemContext()

HDC SWELL_CreateMemContext ( HDC hdc,
int w,
int h )

◆ SWELL_DeleteGfxContext()

void SWELL_DeleteGfxContext ( HDC ctx)

◆ SWELL_FillDialogBackground()

void SWELL_FillDialogBackground ( HDC hdc,
const RECT * r,
int level )

◆ SWELL_FillRect()

void SWELL_FillRect ( HDC ctx,
const RECT * r,
HBRUSH br )

◆ SWELL_GetCtxFrameBuffer()

void * SWELL_GetCtxFrameBuffer ( HDC ctx)

◆ SWELL_GetCtxGC()

void * SWELL_GetCtxGC ( HDC ctx)

◆ SWELL_GetDefaultFont()

HFONT SWELL_GetDefaultFont ( void )

◆ SWELL_GetScaling256()

int SWELL_GetScaling256 ( void )

◆ SWELL_GetViewGL()

bool SWELL_GetViewGL ( HWND h)

◆ SWELL_LineTo()

void SWELL_LineTo ( HDC ctx,
int x,
int y )

◆ swell_load_color_theme()

void swell_load_color_theme ( const char * fn)

◆ SWELL_PopClipRegion()

void SWELL_PopClipRegion ( HDC ctx)

◆ SWELL_PushClipRegion()

void SWELL_PushClipRegion ( HDC ctx)

◆ SWELL_SetClipRegion()

void SWELL_SetClipRegion ( HDC ctx,
const RECT * r )

◆ SWELL_SetGLContextToView()

bool SWELL_SetGLContextToView ( HWND h)

◆ SWELL_SetPixel()

void SWELL_SetPixel ( HDC ctx,
int x,
int y,
int c )

◆ SWELL_SetViewGL()

void SWELL_SetViewGL ( HWND h,
char wantGL )

Variable Documentation

◆ g_swell_ctheme

swell_colortheme g_swell_ctheme
Initial value:
= {
#define __def_theme_ent(x,c)
#define __def_theme_ent_fb(x,c,fb)
}

◆ g_swell_deffont_face

const char* g_swell_deffont_face = "Arial"

◆ g_swell_themeloader

swellColorThemeLoader g_swell_themeloader

◆ g_swell_ui_scale

int g_swell_ui_scale = 256

◆ swell_last_font_filename

const char* swell_last_font_filename