summaryrefslogtreecommitdiff
path: root/app/wlib/mswlib/mswbox.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 19:35:45 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 19:35:45 +0100
commitdf5520aa2dae5b3ce7abf8733dcdd152898af163 (patch)
tree00d3047bfb14f682bfb5a21010c731ed649bfed7 /app/wlib/mswlib/mswbox.c
parentdf247efec654e512242e4f4f1b0212034f9e01fe (diff)
parentec3c0f6f6e7153fa797dc57a0e95779cbc63a23b (diff)
Merge branch 'release/debian/1_5.3.0GA-1'debian/1_5.3.0GA-1
Diffstat (limited to 'app/wlib/mswlib/mswbox.c')
-rw-r--r--app/wlib/mswlib/mswbox.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/app/wlib/mswlib/mswbox.c b/app/wlib/mswlib/mswbox.c
index 04b3656..5698ae4 100644
--- a/app/wlib/mswlib/mswbox.c
+++ b/app/wlib/mswlib/mswbox.c
@@ -1,6 +1,5 @@
#include <windows.h>
#include <string.h>
-#include <malloc.h>
#include <stdlib.h>
#include <commdlg.h>
#include <math.h>
@@ -15,9 +14,9 @@
*/
struct wBox_t {
- WOBJ_COMMON
- wBoxType_e boxTyp;
- };
+ WOBJ_COMMON
+ wBoxType_e boxTyp;
+};
#define B (1)
#define W (2)
@@ -29,9 +28,9 @@ struct wBox_t {
void wBoxSetSize(
- wBox_p bb,
- wPos_t w,
- wPos_t h )
+ wBox_p bb,
+ wWinPix_t w,
+ wWinPix_t h )
{
bb->w = w;
bb->h = h;
@@ -39,10 +38,10 @@ void wBoxSetSize(
static void repaintBox( HWND hWnd, wControl_p b )
-{
+{
HDC hDc;
wBox_p bb = (wBox_p)(b);
- wPos_t x0, y0, x1, y1;
+ wWinPix_t x0, y0, x1, y1;
char lastColor;
int lastRop;
static char colors[8][4][2] = {
@@ -53,7 +52,8 @@ static void repaintBox( HWND hWnd, wControl_p b )
{ /* ThickB */ {B,B}, {B,B}, {B,B}, {B,B} },
{ /* ThickW */ {W,W}, {W,W}, {W,W}, {W,W} },
{ /* RidgeW */ {W,B}, {W,B}, {B,W}, {B,W} },
- { /* TroughW*/ {B,W}, {B,W}, {W,B}, {W,B} } };
+ { /* TroughW*/ {B,W}, {B,W}, {W,B}, {W,B} }
+ };
x0 = bb->x;
x1 = bb->x+bb->w;
@@ -89,18 +89,19 @@ static void repaintBox( HWND hWnd, wControl_p b )
static callBacks_t boxCallBacks = {
- repaintBox,
- NULL,
- NULL };
+ repaintBox,
+ NULL,
+ NULL
+};
wBox_p wBoxCreate(
- wWin_p parent,
- wPos_t origX,
- wPos_t origY,
- const char * labelStr,
- wBoxType_e typ,
- wPos_t width,
- wPos_t height )
+ wWin_p parent,
+ wWinPix_t origX,
+ wWinPix_t origY,
+ const char * labelStr,
+ wBoxType_e typ,
+ wWinPix_t width,
+ wWinPix_t height )
{
wBox_p b;
int index;
@@ -113,7 +114,7 @@ wBox_p wBoxCreate(
b->w = width;
b->h = height;
mswAddButton( (wControl_p)b, FALSE, NULL );
- mswCallBacks[B_BOX] = &boxCallBacks;
+ mswCallBacks[B_BOX] = &boxCallBacks;
repaintBox( ((wControl_p)parent)->hWnd, (wControl_p)b );
return b;
-}
+}