mirror of
https://github.com/reactos/wine.git
synced 2025-04-01 07:31:34 +00:00
Release 941122
Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [controls/scroll.c] [include/scroll.h] Rewritten most of scroll-bar code for better Windows look & feel. Implemented EnableScrollBar(). Preliminary keyboard support. * [objects/bitblt.c] Fixed BadMatch error for BitBlt() and StretchBlt() when reading bits from outside the visible region. * [objects/oembitmap.c] [include/bitmaps/obm_*] Use XPM symbolic colors to load bitmaps. This allows the colors of the bitmaps to depend on the system colors. * [tools/make_debug] Made the make_debug script more robust. * [windows/dialog.c] Fixed CheckRadioButton(). * [windows/nonclient.c] A few changes to scroll-bar drawing and tracking. * [windows/winpos.c] Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to avoid confusion, and optimized it somewhat. Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca) * [misc/audio.c] * [misc/mcianim.c] more coding but nothing spectacular. * [misc/mmaux.c] some coding to access '/dev/mixer'. * [misc/midi.c] some coding to read .MID files, but it's not playing yet. Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk) * [objects/dib.c] Reimplemented DIB_SetImageBits_RLE8() so that it would cope with bitmaps which don't end 0x00, 0x02 (previously it blew up). This includes some bitmaps output by Paint Shop Pro. Implementation is possibly now too lax. Please see the notes on the function about why. * [controls/desktop.c] The desktop pattern should be painted if the wallpaper doesn't cover the whole screen width OR the whole screen height. Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl> * [objects/dib.c] Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp now work. * [loader/ne_resource.c] [include/resource.h] Some cleanup. Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu) * [Configure] [rc/sysres.rc] Primitive compile-time support for multiple languages * [rc/sysres_De.rc] New file * [loader/resource.c] LoadBitmap: Recognize end of sysresbm properly * [rc/Imakefile] Rules to compile resources simplified, dependencies changed * [rc/sysresbm.rc] Don't use sysresbm if using XPM * [windows/dialog.c] CreateDialogIndirectParam: Reverse Z-order of controls * [windows/message.c] MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling * [windows/winpos.c] NextWindowFromPoint: New function * [controls/button.c] WM_NCHITTEST: Group Box is HTTRANSPARENT BUTTON_CheckAutoRadioButton: New function BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com) * [objects/text.c] Fix hang when using DrawText(..., DT_WORDBREAK) with a word that is too long to break. * [objects/font.c] Don't assume helvetica if there is no font family; let the other font attributes decide what font to use. * [controls/widgets.c] Listboxes and combo boxes need to be notified of double-clicks. * [controls/listbox.c] [include/listbox.h] scrolling to bottom of list box should display last item at the bottom, not at the top. list boxes need to allocate a separate heap for their item data, rather than using the user heap. Otherwise, it's very easy to run out of memory for list box items. removed redundant code in ListBoxAddString(). Implemented simple version of LBS_SORT. Don't put [.] in the list box when using DDL_DIRECTORY. * [controls/combo.c] Combos should pass CBS_SORT onto their list box. * [windows/win.c] If window creation is aborted, remove the window from the linked lists. * [controls/static.c] static controls with SS_ICON were always returning 0 from WM_NCCREATE. Make sure static controls have text to draw before drawing it.
This commit is contained in:
parent
3ed37e0869
commit
ecc3712ddf
137
ChangeLog
137
ChangeLog
@ -1,3 +1,140 @@
|
||||
----------------------------------------------------------------------
|
||||
Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
|
||||
|
||||
* [controls/scroll.c] [include/scroll.h]
|
||||
Rewritten most of scroll-bar code for better Windows look & feel.
|
||||
Implemented EnableScrollBar().
|
||||
Preliminary keyboard support.
|
||||
|
||||
* [objects/bitblt.c]
|
||||
Fixed BadMatch error for BitBlt() and StretchBlt() when reading
|
||||
bits from outside the visible region.
|
||||
|
||||
* [objects/oembitmap.c] [include/bitmaps/obm_*]
|
||||
Use XPM symbolic colors to load bitmaps. This allows the colors
|
||||
of the bitmaps to depend on the system colors.
|
||||
|
||||
* [tools/make_debug]
|
||||
Made the make_debug script more robust.
|
||||
|
||||
* [windows/dialog.c]
|
||||
Fixed CheckRadioButton().
|
||||
|
||||
* [windows/nonclient.c]
|
||||
A few changes to scroll-bar drawing and tracking.
|
||||
|
||||
* [windows/winpos.c]
|
||||
Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to
|
||||
avoid confusion, and optimized it somewhat.
|
||||
|
||||
Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca)
|
||||
|
||||
* [misc/audio.c]
|
||||
* [misc/mcianim.c]
|
||||
more coding but nothing spectacular.
|
||||
|
||||
* [misc/mmaux.c]
|
||||
some coding to access '/dev/mixer'.
|
||||
|
||||
* [misc/midi.c]
|
||||
some coding to read .MID files, but it's not playing yet.
|
||||
|
||||
Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk)
|
||||
|
||||
* [objects/dib.c]
|
||||
Reimplemented DIB_SetImageBits_RLE8() so that it would cope with
|
||||
bitmaps which don't end 0x00, 0x02 (previously it blew up). This
|
||||
includes some bitmaps output by Paint Shop Pro. Implementation is
|
||||
possibly now too lax. Please see the notes on the function about
|
||||
why.
|
||||
|
||||
* [controls/desktop.c]
|
||||
The desktop pattern should be painted if the wallpaper doesn't
|
||||
cover the whole screen width OR the whole screen height.
|
||||
|
||||
Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl>
|
||||
|
||||
* [objects/dib.c]
|
||||
Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp
|
||||
now work.
|
||||
|
||||
* [loader/ne_resource.c] [include/resource.h]
|
||||
Some cleanup.
|
||||
|
||||
Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu)
|
||||
|
||||
* [Configure]
|
||||
[rc/sysres.rc]
|
||||
Primitive compile-time support for multiple languages
|
||||
|
||||
* [rc/sysres_De.rc]
|
||||
New file
|
||||
|
||||
* [loader/resource.c]
|
||||
LoadBitmap: Recognize end of sysresbm properly
|
||||
|
||||
* [rc/Imakefile]
|
||||
Rules to compile resources simplified, dependencies changed
|
||||
|
||||
* [rc/sysresbm.rc]
|
||||
Don't use sysresbm if using XPM
|
||||
|
||||
* [windows/dialog.c]
|
||||
CreateDialogIndirectParam: Reverse Z-order of controls
|
||||
|
||||
* [windows/message.c]
|
||||
MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling
|
||||
|
||||
* [windows/winpos.c]
|
||||
NextWindowFromPoint: New function
|
||||
|
||||
* [controls/button.c]
|
||||
WM_NCHITTEST: Group Box is HTTRANSPARENT
|
||||
BUTTON_CheckAutoRadioButton: New function
|
||||
BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton
|
||||
|
||||
Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com)
|
||||
|
||||
* [objects/text.c]
|
||||
Fix hang when using DrawText(..., DT_WORDBREAK) with a word that
|
||||
is too long to break.
|
||||
|
||||
* [objects/font.c]
|
||||
Don't assume helvetica if there is no font family; let the other
|
||||
font attributes decide what font to use.
|
||||
|
||||
* [controls/widgets.c]
|
||||
Listboxes and combo boxes need to be notified of double-clicks.
|
||||
|
||||
* [controls/listbox.c]
|
||||
[include/listbox.h]
|
||||
|
||||
scrolling to bottom of list box should display last item at the
|
||||
bottom, not at the top.
|
||||
|
||||
list boxes need to allocate a separate heap for their item data,
|
||||
rather than using the user heap. Otherwise, it's very easy to run
|
||||
out of memory for list box items.
|
||||
|
||||
removed redundant code in ListBoxAddString(). Implemented simple
|
||||
version of LBS_SORT.
|
||||
|
||||
Don't put [.] in the list box when using DDL_DIRECTORY.
|
||||
|
||||
* [controls/combo.c]
|
||||
Combos should pass CBS_SORT onto their list box.
|
||||
|
||||
* [windows/win.c]
|
||||
If window creation is aborted, remove the window from the
|
||||
linked lists.
|
||||
|
||||
* [controls/static.c]
|
||||
static controls with SS_ICON were always returning 0 from
|
||||
WM_NCCREATE.
|
||||
|
||||
Make sure static controls have text to draw before drawing it.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Sun Nov 6 18:52:04 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
|
||||
|
||||
* [objects/oembitmap.c] (New file)
|
||||
|
@ -175,6 +175,9 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
prompt "Language (En/De)" LANG En
|
||||
ALLDEFINES="$ALLDEFINES -ALANG\($LANG\)"
|
||||
|
||||
NEWBUILD=''
|
||||
if [ "`(domainname)`" = 'amscons.com' ]
|
||||
then
|
||||
|
@ -30,6 +30,7 @@ COMMONSUBDIRS = \
|
||||
rc \
|
||||
loader \
|
||||
misc \
|
||||
multimedia \
|
||||
objects \
|
||||
test \
|
||||
windows
|
||||
@ -50,6 +51,7 @@ COMMONOBJS = \
|
||||
controls.o \
|
||||
loader.o \
|
||||
misc.o \
|
||||
multimedia.o \
|
||||
objects.o \
|
||||
rc.o \
|
||||
windows.o
|
||||
@ -114,6 +116,9 @@ depend::
|
||||
install::
|
||||
|
||||
etags::
|
||||
etags `find . -name '*.[chS]'`
|
||||
|
||||
etags `find . -name '*.[chS]' -print`
|
||||
|
||||
distclean: clean
|
||||
$(RM) `find . -name Makefile -print`
|
||||
echo "/* autoconf.h generated automatically. Run Configure */" >autoconf.h
|
||||
echo "#error You must run Configure before you can build the makefiles." >>autoconf.h
|
||||
|
11
autoconf.h
11
autoconf.h
@ -1,9 +1,2 @@
|
||||
/* autoconf.h generated automatically. Run Configure. */
|
||||
|
||||
|
||||
|
||||
|
||||
#define WINE_INI_GLOBAL "/home/alex/wine/wine.conf"
|
||||
|
||||
|
||||
#define AutoDefines -DNEW_LDT_STRUCT
|
||||
/* autoconf.h generated automatically. Run Configure */
|
||||
#error You must run Configure before you can build the makefiles.
|
||||
|
@ -15,11 +15,11 @@ static char Copyright3[] = "Copyright Alexandre Julliard, 1994";
|
||||
#include "syscolor.h"
|
||||
|
||||
|
||||
/* windows/graphics.c */
|
||||
extern void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int highlight_size,
|
||||
int shadow_size, BOOL pressed );
|
||||
extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||
int xsrc, int ysrc, int width, int height,
|
||||
int rop ); /* windows/graphics.c */
|
||||
extern void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int thickness,
|
||||
BOOL pressed ); /* windows/graphics.c */
|
||||
int xsrc, int ysrc, int width, int height, int rop );
|
||||
|
||||
extern void DEFWND_SetText( HWND hwnd, LPSTR text ); /* windows/defwnd.c */
|
||||
|
||||
@ -28,6 +28,7 @@ static void CB_Paint( HWND hWnd, HDC hDC, WORD action );
|
||||
static void GB_Paint( HWND hWnd, HDC hDC, WORD action );
|
||||
static void UB_Paint( HWND hWnd, HDC hDC, WORD action );
|
||||
static void OB_Paint( HWND hWnd, HDC hDC, WORD action );
|
||||
static void BUTTON_CheckAutoRadioButton(HWND hWnd);
|
||||
|
||||
|
||||
#define MAX_BTN_TYPE 12
|
||||
@ -178,6 +179,11 @@ LONG ButtonWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam)
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_NCHITTEST:
|
||||
if(style == BS_GROUPBOX) return HTTRANSPARENT;
|
||||
lResult = DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
break;
|
||||
|
||||
case WM_SETTEXT:
|
||||
DEFWND_SetText( hWnd, (LPSTR)lParam );
|
||||
PAINT_BUTTON( hWnd, style, ODA_DRAWENTIRE );
|
||||
@ -226,6 +232,8 @@ LONG ButtonWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam)
|
||||
infoPtr->state = (infoPtr->state & ~3) | wParam;
|
||||
PAINT_BUTTON( hWnd, style, ODA_SELECT );
|
||||
}
|
||||
if(style == BS_AUTORADIOBUTTON && wParam==BUTTON_CHECKED)
|
||||
BUTTON_CheckAutoRadioButton(hWnd);
|
||||
break;
|
||||
|
||||
case BM_GETSTATE:
|
||||
@ -300,7 +308,7 @@ static void PB_Paint( HWND hButton, HDC hDC, WORD action )
|
||||
rc.left += 2; /* To position the text down and right */
|
||||
rc.top += 2;
|
||||
}
|
||||
else GRAPH_DrawReliefRect( hDC, &rc, 2, FALSE );
|
||||
else GRAPH_DrawReliefRect( hDC, &rc, 2, 2, FALSE );
|
||||
|
||||
/* draw button label, if any: */
|
||||
text = USER_HEAP_ADDR( wndPtr->hText );
|
||||
@ -330,7 +338,7 @@ static void PB_Paint( HWND hButton, HDC hDC, WORD action )
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Check Box & Radion Button Functions
|
||||
* Check Box & Radio Button Functions
|
||||
*/
|
||||
|
||||
static void CB_Paint( HWND hWnd, HDC hDC, WORD action )
|
||||
@ -387,6 +395,22 @@ static void CB_Paint( HWND hWnd, HDC hDC, WORD action )
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* BUTTON_CheckAutoRadioButton
|
||||
*
|
||||
* hWnd is checked, uncheck everything else in group
|
||||
*/
|
||||
static void BUTTON_CheckAutoRadioButton(HWND hWnd)
|
||||
{
|
||||
HWND parent = GetParent(hWnd);
|
||||
HWND sibling;
|
||||
for(sibling = GetNextDlgGroupItem(parent,hWnd,FALSE);
|
||||
sibling != hWnd;
|
||||
sibling = GetNextDlgGroupItem(parent,sibling,FALSE))
|
||||
SendMessage(sibling,BM_SETCHECK,BUTTON_UNCHECKED,0);
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Group Box Functions
|
||||
*/
|
||||
|
@ -24,8 +24,8 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
||||
#include "debug.h"
|
||||
|
||||
/* windows/graphics.c */
|
||||
extern void GRAPH_DrawReliefRect( HDC hdc, RECT *rect,
|
||||
int thickness, BOOL pressed );
|
||||
extern void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int highlight_size,
|
||||
int shadow_size, BOOL pressed );
|
||||
extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||
int xsrc, int ysrc, int width, int height, int rop );
|
||||
|
||||
@ -95,6 +95,8 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
dwStyle = WS_POPUP | WS_BORDER | WS_VSCROLL | LBS_NOTIFY;
|
||||
if ((wndPtr->dwStyle & CBS_HASSTRINGS) == CBS_HASSTRINGS)
|
||||
dwStyle |= LBS_HASSTRINGS;
|
||||
if ((wndPtr->dwStyle & CBS_SORT) == CBS_SORT)
|
||||
dwStyle |= LBS_SORT;
|
||||
if ((wndPtr->dwStyle & CBS_OWNERDRAWFIXED) == CBS_OWNERDRAWFIXED)
|
||||
dwStyle |= LBS_OWNERDRAWFIXED;
|
||||
if ((wndPtr->dwStyle & CBS_OWNERDRAWVARIABLE) == CBS_OWNERDRAWVARIABLE)
|
||||
@ -163,7 +165,7 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
rect.left = rect.right - (rect.bottom - rect.top);
|
||||
hDC = GetDC(hwnd);
|
||||
InflateRect(&rect, -1, -1);
|
||||
GRAPH_DrawReliefRect(hDC, &rect, 1, 1);
|
||||
GRAPH_DrawReliefRect(hDC, &rect, 1, 1, TRUE);
|
||||
ReleaseDC(hwnd, hDC);
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
@ -194,7 +196,7 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
rect.left = rect.right - (rect.bottom - rect.top);
|
||||
hDC = GetDC(hwnd);
|
||||
InflateRect(&rect, -1, -1);
|
||||
GRAPH_DrawReliefRect(hDC, &rect, 1, 0);
|
||||
GRAPH_DrawReliefRect(hDC, &rect, 1, 1, FALSE);
|
||||
ReleaseDC(hwnd, hDC);
|
||||
break;
|
||||
case WM_KEYDOWN:
|
||||
|
@ -76,8 +76,8 @@ static LONG DESKTOP_DoEraseBkgnd( HWND hwnd, HDC hdc, DESKTOPINFO *infoPtr )
|
||||
/* Paint desktop pattern (only if wall paper does not cover everything) */
|
||||
|
||||
if (!infoPtr->hbitmapWallPaper ||
|
||||
(!infoPtr->fTileWallPaper && (infoPtr->bitmapSize.cx < rect.right) &&
|
||||
(infoPtr->bitmapSize.cy < rect.bottom)))
|
||||
(!infoPtr->fTileWallPaper && ((infoPtr->bitmapSize.cx < rect.right) ||
|
||||
(infoPtr->bitmapSize.cy < rect.bottom))))
|
||||
{
|
||||
/* Set colors in case pattern is a monochrome bitmap */
|
||||
SetBkColor( hdc, RGB(0,0,0) );
|
||||
|
@ -516,11 +516,8 @@ long EDIT_NCCreateMsg(HWND hwnd, LONG lParam)
|
||||
EDIT_BuildTextPointers(hwnd);
|
||||
}
|
||||
|
||||
if ((createStruct->style & WS_VSCROLL) ||
|
||||
(createStruct->style & WS_HSCROLL)) NC_CreateScrollBars(hwnd);
|
||||
|
||||
/* ES_AUTOVSCROLL and ES_AUTOHSCROLL are automatically applied if */
|
||||
/* the corresponding WM_* message is set */
|
||||
/* the corresponding WS_* style is set */
|
||||
if (createStruct->style & WS_VSCROLL)
|
||||
wndPtr->dwStyle |= ES_AUTOVSCROLL;
|
||||
if (createStruct->style & WS_HSCROLL)
|
||||
|
@ -51,12 +51,18 @@ int ListBoxSetItemHeight(HWND hwnd, WORD wIndex, long height);
|
||||
int ListBoxDefaultItem(HWND hwnd, WND *wndPtr,
|
||||
LPHEADLIST lphl, LPLISTSTRUCT lpls);
|
||||
int ListBoxFindNextMatch(HWND hwnd, WORD wChar);
|
||||
int ListMaxFirstVisible(LPHEADLIST lphl);
|
||||
|
||||
#define HasStrings(wndPtr) ( \
|
||||
( ((wndPtr->dwStyle & LBS_OWNERDRAWFIXED) != LBS_OWNERDRAWFIXED) && \
|
||||
((wndPtr->dwStyle & LBS_OWNERDRAWVARIABLE) != LBS_OWNERDRAWVARIABLE) ) || \
|
||||
((wndPtr->dwStyle & LBS_HASSTRINGS) == LBS_HASSTRINGS) )
|
||||
|
||||
#define LIST_HEAP_ALLOC(lphl,f,size) ((int)HEAP_Alloc(&lphl->Heap,f,size) & 0xffff)
|
||||
#define LIST_HEAP_FREE(lphl,handle) (HEAP_Free(&lphl->Heap,LIST_HEAP_ADDR(lphl,handle)))
|
||||
#define LIST_HEAP_ADDR(lphl,handle) \
|
||||
((void *)((handle) ? ((handle) | ((int)lphl->Heap & 0xffff0000)) : 0))
|
||||
#define LIST_HEAP_SIZE 0x10000
|
||||
|
||||
/***********************************************************************
|
||||
* ListBoxWndProc
|
||||
@ -86,7 +92,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
lphl->hFont = GetStockObject(SYSTEM_FONT);
|
||||
lphl->ColumnsWidth = wndPtr->rectClient.right - wndPtr->rectClient.left;
|
||||
if (wndPtr->dwStyle & WS_VSCROLL) {
|
||||
SetScrollRange(hwnd, SB_VERT, 1, lphl->ItemsCount, TRUE);
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
ShowScrollBar(hwnd, SB_VERT, FALSE);
|
||||
}
|
||||
if (wndPtr->dwStyle & WS_HSCROLL) {
|
||||
@ -100,6 +106,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
|
||||
if (lphl == NULL) return 0;
|
||||
ListBoxResetContent(hwnd);
|
||||
/* XXX need to free lphl->Heap */
|
||||
free(lphl);
|
||||
*((LPHEADLIST *)&wndPtr->wExtra[1]) = 0;
|
||||
dprintf_listbox(stddeb,"ListBox WM_DESTROY %p !\n", lphl);
|
||||
@ -117,7 +124,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
lphl->FirstVisible--;
|
||||
break;
|
||||
case SB_LINEDOWN:
|
||||
if (lphl->FirstVisible < lphl->ItemsCount)
|
||||
if (lphl->FirstVisible < ListMaxFirstVisible(lphl))
|
||||
lphl->FirstVisible++;
|
||||
break;
|
||||
case SB_PAGEUP:
|
||||
@ -125,7 +132,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
lphl->FirstVisible -= lphl->ItemsVisible;
|
||||
break;
|
||||
case SB_PAGEDOWN:
|
||||
if (lphl->FirstVisible < lphl->ItemsCount)
|
||||
if (lphl->FirstVisible < ListMaxFirstVisible(lphl))
|
||||
lphl->FirstVisible += lphl->ItemsVisible;
|
||||
break;
|
||||
case SB_THUMBTRACK:
|
||||
@ -133,8 +140,8 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
break;
|
||||
}
|
||||
if (lphl->FirstVisible < 1) lphl->FirstVisible = 1;
|
||||
if (lphl->FirstVisible > lphl->ItemsCount)
|
||||
lphl->FirstVisible = lphl->ItemsCount;
|
||||
if (lphl->FirstVisible > ListMaxFirstVisible(lphl))
|
||||
lphl->FirstVisible = ListMaxFirstVisible(lphl);
|
||||
if (y != lphl->FirstVisible) {
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
@ -154,7 +161,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
lphl->FirstVisible -= lphl->ItemsPerColumn;
|
||||
break;
|
||||
case SB_LINEDOWN:
|
||||
if (lphl->FirstVisible < lphl->ItemsCount)
|
||||
if (lphl->FirstVisible < ListMaxFirstVisible(lphl))
|
||||
lphl->FirstVisible += lphl->ItemsPerColumn;
|
||||
break;
|
||||
case SB_PAGEUP:
|
||||
@ -163,7 +170,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
lphl->ItemsPerColumn * lphl->ItemsPerColumn;
|
||||
break;
|
||||
case SB_PAGEDOWN:
|
||||
if (lphl->FirstVisible < lphl->ItemsCount &&
|
||||
if (lphl->FirstVisible < ListMaxFirstVisible(lphl) &&
|
||||
lphl->ItemsPerColumn != 0)
|
||||
lphl->FirstVisible += lphl->ItemsVisible /
|
||||
lphl->ItemsPerColumn * lphl->ItemsPerColumn;
|
||||
@ -174,8 +181,8 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
break;
|
||||
}
|
||||
if (lphl->FirstVisible < 1) lphl->FirstVisible = 1;
|
||||
if (lphl->FirstVisible > lphl->ItemsCount)
|
||||
lphl->FirstVisible = lphl->ItemsCount;
|
||||
if (lphl->FirstVisible > ListMaxFirstVisible(lphl))
|
||||
lphl->FirstVisible = ListMaxFirstVisible(lphl);
|
||||
if (lphl->ItemsPerColumn != 0) {
|
||||
lphl->FirstVisible = lphl->FirstVisible /
|
||||
lphl->ItemsPerColumn * lphl->ItemsPerColumn + 1;
|
||||
@ -244,7 +251,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
||||
}
|
||||
GetClientRect(hwnd, &rect);
|
||||
if (y > (rect.bottom - 4)) {
|
||||
if (lphl->FirstVisible < lphl->ItemsCount) {
|
||||
if (lphl->FirstVisible < ListMaxFirstVisible(lphl)) {
|
||||
lphl->FirstVisible++;
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
|
||||
@ -752,6 +759,8 @@ int CreateListBoxStruct(HWND hwnd)
|
||||
{
|
||||
WND *wndPtr;
|
||||
LPHEADLIST lphl;
|
||||
int HeapHandle;
|
||||
void *HeapBase;
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
lphl = (LPHEADLIST)malloc(sizeof(HEADLIST));
|
||||
lphl->lpFirst = NULL;
|
||||
@ -767,6 +776,9 @@ int CreateListBoxStruct(HWND hwnd)
|
||||
lphl->SelCount = 0;
|
||||
lphl->DrawCtlType = ODT_LISTBOX;
|
||||
lphl->bRedrawFlag = TRUE;
|
||||
HeapHandle = GlobalAlloc(GMEM_FIXED, LIST_HEAP_SIZE);
|
||||
HeapBase = GlobalLock(HeapHandle);
|
||||
HEAP_Init(&lphl->Heap, HeapBase, LIST_HEAP_SIZE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -798,122 +810,63 @@ void ListBoxAskMeasure(WND *wndPtr, LPHEADLIST lphl, LPLISTSTRUCT lpls)
|
||||
|
||||
int ListBoxAddString(HWND hwnd, LPSTR newstr)
|
||||
{
|
||||
WND *wndPtr;
|
||||
LPHEADLIST lphl;
|
||||
LPLISTSTRUCT lpls, lplsnew;
|
||||
HANDLE hItem;
|
||||
HANDLE hStr;
|
||||
LPSTR str;
|
||||
LPHEADLIST lphl;
|
||||
UINT pos = (UINT) -1;
|
||||
WND *wndPtr;
|
||||
|
||||
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
|
||||
if (lphl == NULL) return LB_ERR;
|
||||
hItem = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LISTSTRUCT));
|
||||
lplsnew = (LPLISTSTRUCT) USER_HEAP_ADDR(hItem);
|
||||
if (lplsnew == NULL) {
|
||||
dprintf_listbox(stddeb,"ListBoxAddString() // Bad allocation of new item !\n");
|
||||
return LB_ERRSPACE;
|
||||
}
|
||||
lpls = lphl->lpFirst;
|
||||
if (lpls != NULL) {
|
||||
while(lpls->lpNext != NULL) {
|
||||
lpls = (LPLISTSTRUCT)lpls->lpNext;
|
||||
}
|
||||
lpls->lpNext = lplsnew;
|
||||
}
|
||||
else
|
||||
lphl->lpFirst = lplsnew;
|
||||
lphl->ItemsCount++;
|
||||
dprintf_listbox(stddeb,"Items Count = %u\n", lphl->ItemsCount);
|
||||
hStr = 0;
|
||||
|
||||
ListBoxDefaultItem(hwnd, wndPtr, lphl, lplsnew);
|
||||
if (HasStrings(wndPtr)) {
|
||||
hStr = USER_HEAP_ALLOC(GMEM_MOVEABLE, strlen(newstr) + 1);
|
||||
str = (LPSTR)USER_HEAP_ADDR(hStr);
|
||||
if (str == NULL) return LB_ERRSPACE;
|
||||
strcpy(str, newstr);
|
||||
newstr = str;
|
||||
lplsnew->itemText = str;
|
||||
dprintf_listbox(stddeb,"ListBoxAddString // LBS_HASSTRINGS after strcpy '%s'\n", str);
|
||||
}
|
||||
else {
|
||||
lplsnew->itemText = NULL;
|
||||
lplsnew->dis.itemData = (DWORD)newstr;
|
||||
}
|
||||
lplsnew->hMem = hItem;
|
||||
lplsnew->lpNext = NULL;
|
||||
lplsnew->dis.itemID = lphl->ItemsCount;
|
||||
lplsnew->hData = hStr;
|
||||
if (((wndPtr->dwStyle & LBS_OWNERDRAWVARIABLE) == LBS_OWNERDRAWVARIABLE) ||
|
||||
((wndPtr->dwStyle & LBS_OWNERDRAWFIXED) == LBS_OWNERDRAWFIXED))
|
||||
ListBoxAskMeasure(wndPtr, lphl, lplsnew);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, lphl->ItemsCount,
|
||||
(lphl->FirstVisible != 1 && lphl->bRedrawFlag));
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_HORZ, 1,
|
||||
lphl->ItemsVisible / lphl->ItemsPerColumn + 1,
|
||||
(lphl->FirstVisible != 1 && lphl->bRedrawFlag));
|
||||
if (lphl->FirstVisible >= (lphl->ItemsCount - lphl->ItemsVisible)) {
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
UpdateWindow(hwnd);
|
||||
}
|
||||
if ((lphl->ItemsCount - lphl->FirstVisible) == lphl->ItemsVisible) {
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
ShowScrollBar(hwnd, SB_VERT, TRUE);
|
||||
if (wndPtr->dwStyle & WS_HSCROLL)
|
||||
ShowScrollBar(hwnd, SB_HORZ, TRUE);
|
||||
}
|
||||
return (lphl->ItemsCount - 1);
|
||||
if (HasStrings(wndPtr) && (wndPtr->dwStyle & LBS_SORT)) {
|
||||
LPLISTSTRUCT lpls = lphl->lpFirst;
|
||||
for (pos = 0; lpls; lpls = lpls->lpNext, pos++)
|
||||
if (strcmp(lpls->itemText, newstr) >= 0)
|
||||
break;
|
||||
}
|
||||
return ListBoxInsertString(hwnd, pos, newstr);
|
||||
}
|
||||
|
||||
|
||||
int ListBoxInsertString(HWND hwnd, UINT uIndex, LPSTR newstr)
|
||||
{
|
||||
WND *wndPtr;
|
||||
LPHEADLIST lphl;
|
||||
LPLISTSTRUCT lpls, lplsnew;
|
||||
WND *wndPtr;
|
||||
LPHEADLIST lphl;
|
||||
LPLISTSTRUCT *lppls, lplsnew;
|
||||
HANDLE hItem;
|
||||
HANDLE hStr;
|
||||
LPSTR str;
|
||||
UINT Count;
|
||||
dprintf_listbox(stddeb,"ListBoxInsertString(%04X, %d, %p);\n",
|
||||
LPSTR str;
|
||||
UINT Count;
|
||||
|
||||
dprintf_listbox(stddeb,"ListBoxInsertString(%04X, %d, %p);\n",
|
||||
hwnd, uIndex, newstr);
|
||||
if (uIndex == (UINT)-1) return ListBoxAddString(hwnd, newstr);
|
||||
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
|
||||
if (lphl == NULL) return LB_ERR;
|
||||
/* The following line will cause problems if the content of the */
|
||||
/* listbox is sorted by the listbox itself */
|
||||
if (uIndex == lphl->ItemsCount) return ListBoxAddString(hwnd, newstr);
|
||||
if (uIndex >= lphl->ItemsCount) return LB_ERR;
|
||||
lpls = lphl->lpFirst;
|
||||
if (lpls == NULL) return LB_ERR;
|
||||
if (uIndex > lphl->ItemsCount) return LB_ERR;
|
||||
for(Count = 1; Count < uIndex; Count++) {
|
||||
if (lpls->lpNext == NULL) return LB_ERR;
|
||||
lpls = (LPLISTSTRUCT)lpls->lpNext;
|
||||
}
|
||||
hItem = USER_HEAP_ALLOC(GMEM_MOVEABLE, sizeof(LISTSTRUCT));
|
||||
lplsnew = (LPLISTSTRUCT) USER_HEAP_ADDR(hItem);
|
||||
|
||||
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
|
||||
if (lphl == NULL) return LB_ERR;
|
||||
|
||||
if (uIndex == (UINT)-1)
|
||||
uIndex = lphl->ItemsCount;
|
||||
if (uIndex > lphl->ItemsCount) return LB_ERR;
|
||||
lppls = (LPLISTSTRUCT *) &lphl->lpFirst;
|
||||
|
||||
for(Count = 0; Count < uIndex; Count++) {
|
||||
if (*lppls == NULL) return LB_ERR;
|
||||
lppls = (LPLISTSTRUCT *) &(*lppls)->lpNext;
|
||||
}
|
||||
|
||||
hItem = LIST_HEAP_ALLOC(lphl, GMEM_MOVEABLE, sizeof(LISTSTRUCT));
|
||||
lplsnew = (LPLISTSTRUCT) LIST_HEAP_ADDR(lphl, hItem);
|
||||
if (lplsnew == NULL) {
|
||||
printf("ListBoxInsertString() // Bad allocation of new item !\n");
|
||||
return LB_ERRSPACE;
|
||||
}
|
||||
ListBoxDefaultItem(hwnd, wndPtr, lphl, lplsnew);
|
||||
lplsnew->hMem = hItem;
|
||||
if (uIndex == 0) {
|
||||
lplsnew->lpNext = lphl->lpFirst;
|
||||
lphl->lpFirst = lplsnew;
|
||||
}
|
||||
else {
|
||||
lplsnew->lpNext = lpls->lpNext;
|
||||
lpls->lpNext = lplsnew;
|
||||
}
|
||||
lplsnew->lpNext = *lppls;
|
||||
*lppls = lplsnew;
|
||||
lphl->ItemsCount++;
|
||||
hStr = 0;
|
||||
|
||||
if (HasStrings(wndPtr)) {
|
||||
hStr = USER_HEAP_ALLOC(GMEM_MOVEABLE, strlen(newstr) + 1);
|
||||
str = (LPSTR)USER_HEAP_ADDR(hStr);
|
||||
hStr = LIST_HEAP_ALLOC(lphl, GMEM_MOVEABLE, strlen(newstr) + 1);
|
||||
str = (LPSTR)LIST_HEAP_ADDR(lphl, hStr);
|
||||
if (str == NULL) return LB_ERRSPACE;
|
||||
strcpy(str, newstr);
|
||||
newstr = str;
|
||||
@ -930,11 +883,12 @@ int ListBoxInsertString(HWND hwnd, UINT uIndex, LPSTR newstr)
|
||||
((wndPtr->dwStyle & LBS_OWNERDRAWFIXED) == LBS_OWNERDRAWFIXED))
|
||||
ListBoxAskMeasure(wndPtr, lphl, lplsnew);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, lphl->ItemsCount,
|
||||
(lphl->FirstVisible != 1));
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl),
|
||||
(lphl->FirstVisible != 1 && lphl->bRedrawFlag));
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
||||
lphl->ItemsPerColumn + 1, (lphl->FirstVisible != 1));
|
||||
lphl->ItemsPerColumn + 1,
|
||||
(lphl->FirstVisible != 1 && lphl->bRedrawFlag));
|
||||
if (((lphl->ItemsCount - lphl->FirstVisible) == lphl->ItemsVisible) &&
|
||||
(lphl->ItemsVisible != 0)) {
|
||||
if (wndPtr->dwStyle & WS_VSCROLL) ShowScrollBar(hwnd, SB_VERT, TRUE);
|
||||
@ -946,7 +900,6 @@ int ListBoxInsertString(HWND hwnd, UINT uIndex, LPSTR newstr)
|
||||
UpdateWindow(hwnd);
|
||||
}
|
||||
dprintf_listbox(stddeb,"ListBoxInsertString // count=%d\n", lphl->ItemsCount);
|
||||
/* return lphl->ItemsCount; */
|
||||
return uIndex;
|
||||
}
|
||||
|
||||
@ -1022,10 +975,10 @@ int ListBoxDeleteString(HWND hwnd, UINT uIndex)
|
||||
}
|
||||
lpls2->lpNext = (LPLISTSTRUCT)lpls->lpNext;
|
||||
lphl->ItemsCount--;
|
||||
if (lpls->hData != 0) USER_HEAP_FREE(lpls->hData);
|
||||
if (lpls->hMem != 0) USER_HEAP_FREE(lpls->hMem);
|
||||
if (lpls->hData != 0) LIST_HEAP_FREE(lphl, lpls->hData);
|
||||
if (lpls->hMem != 0) LIST_HEAP_FREE(lphl, lpls->hMem);
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, lphl->ItemsCount, TRUE);
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
||||
lphl->ItemsPerColumn + 1, TRUE);
|
||||
@ -1090,8 +1043,8 @@ int ListBoxResetContent(HWND hwnd)
|
||||
if (i != 0) {
|
||||
dprintf_listbox(stddeb,"ResetContent #%u\n", i);
|
||||
if (lpls2->hData != 0 && lpls2->hData != lpls2->hMem)
|
||||
USER_HEAP_FREE(lpls2->hData);
|
||||
if (lpls2->hMem != 0) USER_HEAP_FREE(lpls2->hMem);
|
||||
LIST_HEAP_FREE(lphl, lpls2->hData);
|
||||
if (lpls2->hMem != 0) LIST_HEAP_FREE(lphl, lpls2->hMem);
|
||||
}
|
||||
if (lpls == NULL) break;
|
||||
}
|
||||
@ -1104,7 +1057,7 @@ int ListBoxResetContent(HWND hwnd)
|
||||
SendMessage(lphl->hWndLogicParent, WM_COMMAND,
|
||||
wndPtr->wIDmenu, MAKELONG(hwnd, LBN_SELCHANGE));
|
||||
if (wndPtr->dwStyle & WS_VSCROLL)
|
||||
SetScrollRange(hwnd, SB_VERT, 1, lphl->ItemsCount, TRUE);
|
||||
SetScrollRange(hwnd, SB_VERT, 1, ListMaxFirstVisible(lphl), TRUE);
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && lphl->ItemsPerColumn != 0)
|
||||
SetScrollRange(hwnd, SB_HORZ, 1, lphl->ItemsVisible /
|
||||
lphl->ItemsPerColumn + 1, TRUE);
|
||||
@ -1211,7 +1164,8 @@ int ListBoxDirectory(HWND hwnd, UINT attrib, LPSTR filespec)
|
||||
if (!dp->inuse) break;
|
||||
dprintf_listbox(stddeb,"ListBoxDirectory %p '%s' !\n", dp->filename, dp->filename);
|
||||
if (dp->attribute & FA_DIREC) {
|
||||
if (attrib & DDL_DIRECTORY) {
|
||||
if (attrib & DDL_DIRECTORY &&
|
||||
strcmp(dp->filename, ".")) {
|
||||
sprintf(temp, "[%s]", dp->filename);
|
||||
if ( (wRet = ListBoxAddString(hwnd, temp)) == LB_ERR) break;
|
||||
}
|
||||
@ -1427,5 +1381,9 @@ int DlgDirList(HWND hDlg, LPSTR lpPathSpec,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* get the maximum value of lphl->FirstVisible */
|
||||
int ListMaxFirstVisible(LPHEADLIST lphl)
|
||||
{
|
||||
int m = lphl->ItemsCount-lphl->ItemsVisible+1;
|
||||
return (m < 1) ? 1 : m;
|
||||
}
|
||||
|
1587
controls/scroll.c
1587
controls/scroll.c
File diff suppressed because it is too large
Load Diff
@ -93,7 +93,7 @@ LONG StaticWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam)
|
||||
if (createStruct->lpszName)
|
||||
STATIC_SetIcon( hWnd, LoadIcon( createStruct->hInstance,
|
||||
createStruct->lpszName ));
|
||||
break;
|
||||
return 1;
|
||||
}
|
||||
return DefWindowProc(hWnd, uMsg, wParam, lParam);
|
||||
|
||||
@ -220,7 +220,8 @@ static void PaintTextfn( HWND hwnd, HDC hdc )
|
||||
MAKELONG(hwnd, CTLCOLOR_STATIC));
|
||||
if (hBrush == (HBRUSH)NULL) hBrush = GetStockObject(WHITE_BRUSH);
|
||||
FillRect(hdc, &rc, hBrush);
|
||||
DrawText(hdc, text, -1, &rc, wFormat);
|
||||
if (text)
|
||||
DrawText(hdc, text, -1, &rc, wFormat);
|
||||
}
|
||||
|
||||
static void PaintRectfn( HWND hwnd, HDC hdc )
|
||||
|
@ -9,11 +9,11 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "win.h"
|
||||
#include "button.h"
|
||||
#include "static.h"
|
||||
#include "scroll.h"
|
||||
#include "desktop.h"
|
||||
#include "mdi.h"
|
||||
#include "gdi.h"
|
||||
|
||||
LONG ScrollBarWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
LONG ListBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
LONG ComboBoxWndProc ( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
LONG EditWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam );
|
||||
@ -28,11 +28,11 @@ static WNDCLASS WIDGETS_BuiltinClasses[] =
|
||||
0, 0, 0, 0, NULL, "BUTTON" },
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC, StaticWndProc, 0, sizeof(STATICINFO),
|
||||
0, 0, 0, 0, NULL, "STATIC" },
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC, ScrollBarWndProc, 0, 8,
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC, ScrollBarWndProc, 0, sizeof(SCROLLINFO),
|
||||
0, 0, 0, 0, NULL, "SCROLLBAR" },
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC, ListBoxWndProc, 0, 8,
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS, ListBoxWndProc, 0, 8,
|
||||
0, 0, 0, 0, NULL, "LISTBOX" },
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC, ComboBoxWndProc, 0, 8,
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS, ComboBoxWndProc, 0, 8,
|
||||
0, 0, 0, 0, NULL, "COMBOBOX" },
|
||||
{ CS_GLOBALCLASS | CS_PARENTDC, EditWndProc, 0, 4,
|
||||
0, 0, 0, 0, NULL, "EDIT" },
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define N_BP 25
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "opcodes/dis-asm.h"
|
||||
#include "regpos.h"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
#include "editline.h"
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
** Manifest constants.
|
||||
|
@ -80,7 +80,6 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
||||
{
|
||||
struct dll_table_entry_s *dll_p;
|
||||
unsigned short *saved_Stack16Frame;
|
||||
unsigned int segment;
|
||||
unsigned int offset;
|
||||
unsigned int dll_id;
|
||||
unsigned int ordinal;
|
||||
@ -116,7 +115,7 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
||||
dll_builtin_table[dll_id].dll_name, ordinal,
|
||||
seg_off >> 16, seg_off & 0xffff);
|
||||
printf("ret=%08x", *ret_addr);
|
||||
printf(" ESP=%08x, EBP=%08x, SS=%04x\n",
|
||||
printf(" ESP=%08lx, EBP=%08lx, SS=%04x\n",
|
||||
IF1632_Saved16_esp, IF1632_Saved16_ebp,
|
||||
IF1632_Saved16_ss);
|
||||
|
||||
@ -210,7 +209,7 @@ DLLRelay(unsigned int func_num, unsigned int seg_off)
|
||||
#ifdef DEBUG_RELAY
|
||||
if (Options.relay_debug)
|
||||
{
|
||||
printf("Returning %08.8x from %s (%s.%d)\n",
|
||||
printf("Returning %08x from %s (%s.%d)\n",
|
||||
ret_val,
|
||||
dll_p->export_name,
|
||||
dll_builtin_table[dll_id].dll_name, ordinal);
|
||||
|
@ -65,9 +65,9 @@ length 540
|
||||
59 pascal SetActiveWindow(word) SetActiveWindow(1)
|
||||
60 pascal GetActiveWindow() GetActiveWindow()
|
||||
61 pascal ScrollWindow(word s_word s_word ptr ptr) ScrollWindow(1 2 3 4 5)
|
||||
62 pascal SetScrollPos(word word word word) SetScrollPos(1 2 3 4)
|
||||
62 pascal SetScrollPos(word word s_word word) SetScrollPos(1 2 3 4)
|
||||
63 pascal GetScrollPos(word word) GetScrollPos(1 2)
|
||||
64 pascal SetScrollRange(word word word word word) SetScrollRange(1 2 3 4 5)
|
||||
64 pascal SetScrollRange(word word s_word s_word word) SetScrollRange(1 2 3 4 5)
|
||||
65 pascal GetScrollRange(word word ptr ptr) GetScrollRange(1 2 3 4)
|
||||
66 pascal GetDC(word) GetDC(1)
|
||||
67 pascal GetWindowDC(word) GetWindowDC(1)
|
||||
@ -402,7 +402,7 @@ length 540
|
||||
473 pascal AnsiPrev(ptr ptr) AnsiPrev(1 2)
|
||||
#480 GETUSERLOCALOBJTYPE
|
||||
#481 HARDWARE_EVENT
|
||||
#482 ENABLESCROLLBAR
|
||||
482 pascal16 EnableScrollBar(word word word) EnableScrollBar(1 2 3)
|
||||
483 pascal SystemParametersInfo(word word ptr word) SystemParametersInfo(1 2 3 4)
|
||||
#484 __GP
|
||||
#499 WNETERRORTEXT
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_btncorners[] = {
|
||||
"30 10 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" .... ",
|
||||
" .... ...... ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_btsize[] = {
|
||||
"15 15 2 1",
|
||||
" c black",
|
||||
". c white",
|
||||
" s black c black",
|
||||
". s white c white",
|
||||
" ",
|
||||
" ....... ..... ",
|
||||
" ....... ..... ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_check[] = {
|
||||
"14 14 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" . ",
|
||||
" . ",
|
||||
|
@ -1,44 +1,44 @@
|
||||
/* XPM */
|
||||
static char * obm_checkboxes[] = {
|
||||
"56 39 2 1",
|
||||
" c black",
|
||||
". c white",
|
||||
" . . . .",
|
||||
" ........... . ......... . . .",
|
||||
" ........... . . ....... . . ......... . ....... .",
|
||||
" ........... . .. ..... .. . ......... . . ..... . .",
|
||||
" ........... . ... ... ... . ......... . .. ... .. .",
|
||||
" ........... . .... . .... . ......... . ... . ... .",
|
||||
" ........... . ..... ..... . ......... . .... .... .",
|
||||
" ........... . .... . .... . ......... . ... . ... .",
|
||||
" ........... . ... ... ... . ......... . .. ... .. .",
|
||||
" ........... . .. ..... .. . ......... . . ..... . .",
|
||||
" ........... . . ....... . . ......... . ....... .",
|
||||
" ........... . ......... . . .",
|
||||
" . . . .",
|
||||
"..... ........... ........... ........... ......",
|
||||
"... ... ....... ... ....... ....... ....",
|
||||
".. ....... ..... ....... ..... ... ..... ... ...",
|
||||
". ......... ... ... ... ... ....... ... . . ..",
|
||||
". ......... ... .. .. ... ....... ... . . ..",
|
||||
" ........... . .. .. . ......... . . . .",
|
||||
" ........... . .. .. . ......... . . . .",
|
||||
" ........... . .. .. . ......... . . . .",
|
||||
". ......... ... .. .. ... ....... ... . . ..",
|
||||
". ......... ... ... ... ... ....... ... . . ..",
|
||||
".. ....... ..... ....... ..... ... ..... ... ...",
|
||||
"... ... ....... ... ....... ....... ....",
|
||||
"..... ........... ........... ........... ......",
|
||||
".............. ............... .",
|
||||
".............. . . . . . . ............... .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... .",
|
||||
".............. ............... ."};
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
"............. ............. ............. ............. ",
|
||||
". . .. .. ............. ............. ",
|
||||
". . . . . . .. .. ... ... ",
|
||||
". . . . . . .. .. .. . . .. ",
|
||||
". . . . . . .. .. .. . . .. ",
|
||||
". . . . . . .. .. .. . . .. ",
|
||||
". . . . . .. .. .. . .. ",
|
||||
". . . . . . .. .. .. . . .. ",
|
||||
". . . . . . .. .. .. . . .. ",
|
||||
". . . . . . .. .. .. . . .. ",
|
||||
". . . . . . .. .. ... ... ",
|
||||
". . .. .. ............. ............. ",
|
||||
"............. ............. ............. ............. ",
|
||||
" ... ... ... ... ",
|
||||
" .. .. .. .. ....... ....... ",
|
||||
" . . . . ... ... ... ... ",
|
||||
" . . . ... . .. .. ... ... ... ",
|
||||
" . . . ..... . .. .. .. ..... .. ",
|
||||
". . . ....... . .. .. .. ....... .. ",
|
||||
". . . ....... . .. .. .. ....... .. ",
|
||||
". . . ....... . .. .. .. ....... .. ",
|
||||
" . . . ..... . .. .. .. ..... .. ",
|
||||
" . . . ... . .. .. ... ... ... ",
|
||||
" . . . . ... ... ... ... ",
|
||||
" .. .. .. .. ....... ....... ",
|
||||
" ... ... ... ... ",
|
||||
" ............. ............. ",
|
||||
" . . . . . . . ............. ",
|
||||
" .. . . . . .. .. . . . . .. ",
|
||||
" . . . . . . . ... . . . ... ",
|
||||
" .. . . . . .. .. . . . . .. ",
|
||||
" . . . . . . . ... . . . ... ",
|
||||
" .. . . . . .. .. . . . . .. ",
|
||||
" . . . . . . . ... . . . ... ",
|
||||
" .. . . . . .. .. . . . . .. ",
|
||||
" . . . . . . . ... . . . ... ",
|
||||
" .. . . . . .. .. . . . . .. ",
|
||||
" . . . . . . . ............. ",
|
||||
" ............. ............. "};
|
||||
|
@ -3,7 +3,7 @@ static char * obm_close[] = {
|
||||
"36 18 4 1",
|
||||
" s button_face c grey75",
|
||||
". s window_frame c black",
|
||||
"X c white",
|
||||
"X s white c white",
|
||||
"o s button_shadow c grey50",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_combo[] = {
|
||||
"7 9 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_mnarrow[] = {
|
||||
"7 11 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" . ",
|
||||
" .. ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_close[] = {
|
||||
"50 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_dnarrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_lfarrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_reduce[] = {
|
||||
"25 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_restore[] = {
|
||||
"25 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ..... . ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_rgarrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_uparrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_old_zoom[] = {
|
||||
"25 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" . ",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* XPM */
|
||||
static char * obm_size[] = {
|
||||
"13 13 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" s white c white",
|
||||
". s black c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
|
589
include/debug.h
589
include/debug.h
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,7 @@ typedef struct tagHEADLIST {
|
||||
HWND hWndLogicParent;
|
||||
HFONT hFont;
|
||||
BOOL bRedrawFlag;
|
||||
MDESC *Heap;
|
||||
} HEADLIST;
|
||||
typedef HEADLIST FAR* LPHEADLIST;
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
typedef struct resource_s {
|
||||
struct resource_s *next;
|
||||
HANDLE info_mem; /* this struct */
|
||||
int size_shift;
|
||||
struct resource_nameinfo_s nameinfo;
|
||||
HANDLE rsc_mem; /* resource data */
|
||||
/* */
|
||||
HANDLE instance; /* resource instance */
|
||||
|
@ -1,35 +1,26 @@
|
||||
/*
|
||||
* Scroll Bar definitions
|
||||
* Scroll-bar class extra info
|
||||
*
|
||||
* Copyright 1993 Martin Ayotte
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#ifndef SCROLL_H
|
||||
#define SCROLL_H
|
||||
|
||||
typedef struct tagHEADSSCROLL {
|
||||
short CurVal;
|
||||
short MinVal;
|
||||
short MaxVal;
|
||||
short MaxPix;
|
||||
short CurPix;
|
||||
short ThumbVal;
|
||||
RECT rect;
|
||||
RECT rectUp;
|
||||
RECT rectDown;
|
||||
BOOL ThumbActive;
|
||||
BOOL TimerPending;
|
||||
WORD ButtonDown;
|
||||
WORD Direction;
|
||||
DWORD dwStyle;
|
||||
HWND hWndOwner;
|
||||
BOOL bRedrawFlag;
|
||||
} HEADSCROLL;
|
||||
typedef HEADSCROLL FAR* LPHEADSCROLL;
|
||||
#include "windows.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INT CurVal; /* Current scroll-bar value */
|
||||
INT MinVal; /* Minimum scroll-bar value */
|
||||
INT MaxVal; /* Maximum scroll-bar value */
|
||||
WORD unused; /* Unused word, for MS-Windows compatibility */
|
||||
WORD flags; /* EnableScrollBar flags */
|
||||
} SCROLLINFO;
|
||||
|
||||
extern LONG ScrollBarWndProc( HWND hwnd, WORD uMsg, WORD wParam, LONG lParam );
|
||||
|
||||
void ScrollBarButtonDown(HWND hWnd, int nBar, int x, int y);
|
||||
void ScrollBarButtonUp(HWND hWnd, int nBar, int x, int y);
|
||||
void ScrollBarMouseMove(HWND hWnd, int nBar, WORD wParam, int x, int y);
|
||||
void StdDrawScrollBar(HWND hWnd, HDC hDC, int nBar, LPRECT lprect, LPHEADSCROLL lphs);
|
||||
int CreateScrollBarStruct(HWND hWnd);
|
||||
void NC_CreateScrollBars(HWND hWnd);
|
||||
|
||||
extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, int nBar );
|
||||
|
||||
#endif /* SCROLL_H */
|
||||
|
@ -39,8 +39,9 @@
|
||||
/* #define DEBUG_MODULE */
|
||||
/* #define DEBUG_LDT */
|
||||
/* #define DEBUG_HEAP */
|
||||
/* #define DEBUG_MCIANIM */
|
||||
/* #define DEBUG_MCIWAVE */
|
||||
/* #define DEBUG_MCIWAVE */
|
||||
/* #define DEBUG_MIDI */
|
||||
/* #define DEBUG_INT */
|
||||
/* #define DEBUG_METAFILE */
|
||||
/* #define DEBUG_GDI */
|
||||
@ -72,8 +73,8 @@
|
||||
/* #define DEBUG_CATCH */
|
||||
|
||||
|
||||
# /* Do not remove this line or change anything below this line */
|
||||
|
||||
/* Do not remove this line or change anything below this line */
|
||||
|
||||
#ifdef DEBUG_NONE
|
||||
#undef DEBUG_ACCEL
|
||||
#undef DEBUG_BITMAP
|
||||
@ -103,7 +104,6 @@
|
||||
#undef DEBUG_GRAPHICS
|
||||
#undef DEBUG_HEAP
|
||||
#undef DEBUG_ICON
|
||||
#undef DEBUG_IF
|
||||
#undef DEBUG_INT
|
||||
#undef DEBUG_KEY
|
||||
#undef DEBUG_KEYBOARD
|
||||
@ -117,6 +117,7 @@
|
||||
#undef DEBUG_MENUCALC
|
||||
#undef DEBUG_MESSAGE
|
||||
#undef DEBUG_METAFILE
|
||||
#undef DEBUG_MIDI
|
||||
#undef DEBUG_MMIO
|
||||
#undef DEBUG_MMTIME
|
||||
#undef DEBUG_MODULE
|
||||
@ -140,8 +141,7 @@
|
||||
#undef DEBUG_WIN
|
||||
#undef DEBUG_WINSOCK
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_ALL
|
||||
#define DEBUG_ACCEL
|
||||
#define DEBUG_BITMAP
|
||||
@ -171,7 +171,6 @@
|
||||
#define DEBUG_GRAPHICS
|
||||
#define DEBUG_HEAP
|
||||
#define DEBUG_ICON
|
||||
#define DEBUG_IF
|
||||
#define DEBUG_INT
|
||||
#define DEBUG_KEY
|
||||
#define DEBUG_KEYBOARD
|
||||
@ -185,6 +184,7 @@
|
||||
#define DEBUG_MENUCALC
|
||||
#define DEBUG_MESSAGE
|
||||
#define DEBUG_METAFILE
|
||||
#define DEBUG_MIDI
|
||||
#define DEBUG_MMIO
|
||||
#define DEBUG_MMTIME
|
||||
#define DEBUG_MODULE
|
||||
|
@ -42,9 +42,8 @@ typedef struct tagWND
|
||||
DWORD dwStyle; /* Window style (from CreateWindow) */
|
||||
DWORD dwExStyle; /* Extended style (from CreateWindowEx) */
|
||||
HANDLE hdce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */
|
||||
void *VScroll; /* Vertical ScrollBar Struct Pointer */
|
||||
void *HScroll; /* Horizontal ScrollBar Struct Pointer */
|
||||
WORD scroll_flags; /* scrolls flags (vert & horz visible) */
|
||||
HANDLE hVScroll; /* Vertical scroll-bar info */
|
||||
HANDLE hHScroll; /* Horizontal scroll-bar info */
|
||||
WORD wIDmenu; /* ID or hmenu (from CreateWindow) */
|
||||
HANDLE hText; /* Handle of window text */
|
||||
WORD flags; /* Misc. flags (see below) */
|
||||
|
@ -2367,41 +2367,40 @@ int wsprintf(LPSTR a,LPSTR b,...);
|
||||
|
||||
/* Implemented functions */
|
||||
|
||||
F(HMENU,CreateMenu)
|
||||
F(BOOL,GetInputState)
|
||||
F(BOOL,SetDeskPattern)
|
||||
F(LPSTR,GetDOSEnvironment)
|
||||
F(DWORD,GetMessagePos)
|
||||
F(LONG,GetMessageTime)
|
||||
F(LONG,GetMessageExtraInfo)
|
||||
F(BOOL,AnyPopup)
|
||||
F(BOOL,CloseClipboard)
|
||||
F(BOOL,EmptyClipboard)
|
||||
F(BOOL,GetInputState)
|
||||
F(BOOL,InSendMessage)
|
||||
F(BOOL,SetDeskPattern)
|
||||
F(DWORD,GetCurrentTime)
|
||||
F(DWORD,GetDialogBaseUnits)
|
||||
F(DWORD,GetMenuCheckMarkDimensions)
|
||||
F(DWORD,GetMessagePos)
|
||||
F(DWORD,GetTickCount)
|
||||
F(HANDLE,GetCurrentTask)
|
||||
F(HMENU,CreateMenu)
|
||||
F(HMENU,CreatePopupMenu)
|
||||
F(HWND,GetActiveWindow)
|
||||
F(HWND,GetCapture)
|
||||
F(HWND,GetClipboardOwner)
|
||||
F(HWND,GetOpenClipboardWindow)
|
||||
F(HWND,GetClipboardViewer)
|
||||
F(HWND,GetDesktopHwnd)
|
||||
F(HWND,GetDesktopWindow)
|
||||
F(HWND,GetFocus)
|
||||
F(HWND,GetOpenClipboardWindow)
|
||||
F(HWND,GetSysModalWindow)
|
||||
F(DWORD,GetMenuCheckMarkDimensions)
|
||||
F(LONG,GetMessageExtraInfo)
|
||||
F(LONG,GetMessageTime)
|
||||
F(LONG,GetVersion)
|
||||
F(LONG,GetWinFlags)
|
||||
F(LPINT,GetThresholdEvent)
|
||||
F(LPSTR,GetDOSEnvironment)
|
||||
F(LPSTR,ValidateFreeSpaces)
|
||||
F(void,ValidateCodeSegments)
|
||||
F(WORD,GetCaretBlinkTime)
|
||||
F(WORD,GetCurrentPDB)
|
||||
F(WORD,GetDoubleClickTime)
|
||||
F(WORD,GetNumTasks)
|
||||
F(LONG,GetVersion)
|
||||
F(int,CountClipboardFormats)
|
||||
F(int,GetKBCodePage)
|
||||
F(int,GetThresholdStatus)
|
||||
@ -2420,27 +2419,16 @@ F(void,ProfStart)
|
||||
F(void,ProfStop)
|
||||
F(void,ReleaseCapture)
|
||||
F(void,SwitchStackBack)
|
||||
F(void,ValidateCodeSegments)
|
||||
F(void,WaitMessage)
|
||||
F(void,Yield)
|
||||
Fa(BOOL,IsCharAlpha,char,ch)
|
||||
Fa(BOOL,IsCharAlphaNumeric,char,ch)
|
||||
Fa(BOOL,IsCharLower,char,ch)
|
||||
Fa(BOOL,IsCharUpper,char,ch)
|
||||
Fa(ATOM,RegisterClass,LPWNDCLASS,a)
|
||||
Fa(BOOL,TranslateMessage,LPMSG,a)
|
||||
Fa(void,PostQuitMessage,int,a)
|
||||
Fa(BOOL,SetMessageQueue,int,a)
|
||||
Fa(INT,_lclose,INT,a)
|
||||
Fb(INT,_lopen,LPSTR,a,INT,b)
|
||||
Fa(INT,lstrlen,LPCSTR,a)
|
||||
Fa(LONG,DispatchMessage,LPMSG,msg)
|
||||
Fa(void,UpdateWindow,HWND,a)
|
||||
Fa(ATOM,AddAtom,LPCSTR,a)
|
||||
Fa(ATOM,DeleteAtom,ATOM,a)
|
||||
Fa(ATOM,FindAtom,LPCSTR,a)
|
||||
Fa(ATOM,GlobalAddAtom,LPCSTR,a)
|
||||
Fa(ATOM,GlobalDeleteAtom,ATOM,a)
|
||||
Fa(ATOM,GlobalFindAtom,LPCSTR,a)
|
||||
Fa(ATOM,RegisterClass,LPWNDCLASS,a)
|
||||
Fa(BOOL,BringWindowToTop,HWND,a)
|
||||
Fa(BOOL,DeleteDC,HDC,a)
|
||||
Fa(BOOL,DeleteMetaFile,HMETAFILE,a)
|
||||
@ -2453,12 +2441,11 @@ Fa(BOOL,EnableHardwareInput,BOOL,a)
|
||||
Fa(BOOL,EndDeferWindowPos,HDWP,hWinPosInfo)
|
||||
Fa(BOOL,FreeModule,HANDLE,a)
|
||||
Fa(BOOL,FreeResource,HANDLE,a)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fa(BOOL,GlobalUnWire,HANDLE,a)
|
||||
Fa(BOOL,GlobalUnfix,HANDLE,a)
|
||||
Fa(BOOL,GlobalUnlock,HANDLE,a)
|
||||
#endif
|
||||
Fa(BOOL,InitAtomTable,WORD,a)
|
||||
Fa(BOOL,IsCharAlpha,char,ch)
|
||||
Fa(BOOL,IsCharAlphaNumeric,char,ch)
|
||||
Fa(BOOL,IsCharLower,char,ch)
|
||||
Fa(BOOL,IsCharUpper,char,ch)
|
||||
Fa(BOOL,IsClipboardFormatAvailable,WORD,a)
|
||||
Fa(BOOL,IsIconic,HWND,a)
|
||||
Fa(BOOL,IsRectEmpty,LPRECT,a)
|
||||
@ -2473,32 +2460,27 @@ Fa(BOOL,OpenIcon,HWND,a)
|
||||
Fa(BOOL,RemoveFontResource,LPSTR,a)
|
||||
Fa(BOOL,SetDeskWallPaper,LPSTR,a)
|
||||
Fa(BOOL,SetErrorMode,WORD,a)
|
||||
Fa(BOOL,SetMessageQueue,int,a)
|
||||
Fa(BOOL,SwapMouseButton,BOOL,a)
|
||||
Fa(BOOL,TranslateMessage,LPMSG,a)
|
||||
Fa(BOOL,UnhookWindowsHookEx,HHOOK,a)
|
||||
Fa(BOOL,UnrealizeObject,HBRUSH,a)
|
||||
Fa(BYTE,GetTempDrive,BYTE,a)
|
||||
Fa(COLORREF,GetBkColor,HDC,a)
|
||||
Fa(COLORREF,GetSysColor,short,a)
|
||||
Fa(COLORREF,GetTextColor,HDC,a)
|
||||
Fa(DWORD,GetAspectRatioFilter,HDC,a)
|
||||
Fa(DWORD,GetBitmapDimension,HBITMAP,a)
|
||||
Fa(COLORREF,GetBkColor,HDC,a)
|
||||
Fa(DWORD,GetBrushOrg,HDC,a)
|
||||
Fa(DWORD,GetCurrentPosition,HDC,a)
|
||||
Fa(DWORD,GetDCOrg,HDC,a)
|
||||
Fa(DWORD,GetFreeSpace,WORD,a)
|
||||
Fa(COLORREF,GetSysColor,short,a)
|
||||
Fa(COLORREF,GetTextColor,HDC,a)
|
||||
Fa(DWORD,GetViewportExt,HDC,a)
|
||||
Fa(DWORD,GetViewportOrg,HDC,a)
|
||||
Fa(DWORD,GetWindowExt,HDC,a)
|
||||
Fa(DWORD,GetWindowOrg,HDC,a)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fa(DWORD,GlobalCompact,DWORD,a)
|
||||
Fa(DWORD,GlobalHandle,WORD,a)
|
||||
Fa(DWORD,GlobalSize,HANDLE,a)
|
||||
#endif
|
||||
Fa(DWORD,OemKeyScan,WORD,a)
|
||||
Fa(FARPROC,LocalNotify,FARPROC,a)
|
||||
Fa(HDWP,BeginDeferWindowPos,INT,nNumWindows)
|
||||
Fa(HMETAFILE,CloseMetaFile,HANDLE,a)
|
||||
Fa(HANDLE,CreateMetaFile,LPSTR,a)
|
||||
Fa(HANDLE,GetAtomHandle,ATOM,a)
|
||||
Fa(HANDLE,GetClipboardData,WORD,a)
|
||||
@ -2508,11 +2490,6 @@ Fa(HANDLE,GetMetaFileBits,HANDLE,a)
|
||||
Fa(HANDLE,GetModuleHandle,LPSTR,a)
|
||||
Fa(HANDLE,GetStockObject,int,a)
|
||||
Fa(HANDLE,GetWindowTask,HWND,a)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fa(HANDLE,GlobalFree,HANDLE,a)
|
||||
Fa(HANDLE,GlobalLRUNewest,HANDLE,a)
|
||||
Fa(HANDLE,GlobalLRUOldest,HANDLE,a)
|
||||
#endif
|
||||
Fa(HANDLE,LoadLibrary,LPSTR,a)
|
||||
Fa(HANDLE,LocalFree,HANDLE,a)
|
||||
Fa(HANDLE,LocalHandle,WORD,a)
|
||||
@ -2528,9 +2505,11 @@ Fa(HDC,CreateCompatibleDC,HDC,a)
|
||||
Fa(HDC,GetDC,HWND,a)
|
||||
Fa(HDC,GetDCState,HDC,a)
|
||||
Fa(HDC,GetWindowDC,HWND,a)
|
||||
Fa(HDWP,BeginDeferWindowPos,INT,nNumWindows)
|
||||
Fa(HFONT,CreateFontIndirect,LOGFONT FAR*,a)
|
||||
Fa(HMENU,GetMenu,HWND,a)
|
||||
Fa(HMENU,LoadMenuIndirect,LPSTR,a)
|
||||
Fa(HMETAFILE,CloseMetaFile,HANDLE,a)
|
||||
Fa(HPALETTE,CreatePalette,LPLOGPALETTE,a)
|
||||
Fa(HPEN,CreatePenIndirect,LOGPEN FAR*,a)
|
||||
Fa(HRGN,CreateEllipticRgnIndirect,LPRECT,a)
|
||||
@ -2547,21 +2526,14 @@ Fa(HWND,SetClipboardViewer,HWND,a)
|
||||
Fa(HWND,SetFocus,HWND,a)
|
||||
Fa(HWND,SetSysModalWindow,HWND,a)
|
||||
Fa(HWND,WindowFromPoint,POINT,a)
|
||||
Fa(INT,_lclose,INT,a)
|
||||
Fa(INT,lstrlen,LPCSTR,a)
|
||||
Fa(LONG,DispatchMessage,LPMSG,msg)
|
||||
Fa(LONG,SetSwapAreaSize,WORD,a)
|
||||
Fa(LPSTR,AnsiLower,LPSTR,a)
|
||||
Fa(LPSTR,AnsiNext,LPSTR,a)
|
||||
Fa(LPSTR,AnsiUpper,LPSTR,a)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fa(LPSTR,GlobalLock,HANDLE,a)
|
||||
Fa(LPSTR,GlobalWire,HANDLE,a)
|
||||
#endif
|
||||
Fa(LPSTR,LockResource,HANDLE,a)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fa(void,GlobalFix,HANDLE,a)
|
||||
Fa(void,GlobalNotify,FARPROC,a)
|
||||
#endif
|
||||
Fa(void,LimitEmsPages,DWORD,a)
|
||||
Fa(void,SetConvertHook,BOOL,a)
|
||||
Fa(UINT,GDIRealizePalette,HDC,a)
|
||||
Fa(UINT,RealizePalette,HDC,a)
|
||||
Fa(WORD,AllocDStoCSAlias,WORD,a)
|
||||
@ -2569,15 +2541,16 @@ Fa(WORD,AllocSelector,WORD,a)
|
||||
Fa(WORD,ArrangeIconicWindows,HWND,a)
|
||||
Fa(WORD,EnumClipboardFormats,WORD,a)
|
||||
Fa(WORD,FreeSelector,WORD,a)
|
||||
Fa(WORD,GetBkMode,HDC,a)
|
||||
Fa(WORD,GetDriveType,INT,a)
|
||||
Fa(WORD,GetMapMode,HDC,a)
|
||||
Fa(WORD,GetMenuItemCount,HMENU,a)
|
||||
Fa(WORD,GetPolyFillMode,HDC,a)
|
||||
Fa(WORD,GetROP2,HDC,a)
|
||||
Fa(WORD,GetRelAbs,HDC,a)
|
||||
Fa(WORD,GetStretchBltMode,HDC,a)
|
||||
Fa(WORD,GetTaskQueue,HANDLE,a)
|
||||
Fa(WORD,GetTextAlign,HDC,a)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fa(WORD,GlobalFlags,HANDLE,a)
|
||||
Fa(WORD,GlobalPageLock,HANDLE,a)
|
||||
Fa(WORD,GlobalPageUnlock,HANDLE,a)
|
||||
#endif
|
||||
Fa(WORD,LocalCompact,WORD,a)
|
||||
Fa(WORD,LocalFlags,HANDLE,a)
|
||||
Fa(WORD,LocalSize,HANDLE,a)
|
||||
@ -2593,16 +2566,10 @@ Fa(int,ClearCommBreak,int,a)
|
||||
Fa(int,CloseComm,int,a)
|
||||
Fa(int,CountVoiceNotes,int,a)
|
||||
Fa(int,GetAsyncKeyState,int,a)
|
||||
Fa(WORD,GetBkMode,HDC,a)
|
||||
Fa(int,GetDlgCtrlID,HWND,a)
|
||||
Fa(int,GetKeyState,int,a)
|
||||
Fa(int,GetKeyboardType,int,a)
|
||||
Fa(WORD,GetMapMode,HDC,a)
|
||||
Fa(int,GetModuleUsage,HANDLE,a)
|
||||
Fa(WORD,GetPolyFillMode,HDC,a)
|
||||
Fa(WORD,GetRelAbs,HDC,a)
|
||||
Fa(WORD,GetROP2,HDC,a)
|
||||
Fa(WORD,GetStretchBltMode,HDC,a)
|
||||
Fa(int,GetSystemMetrics,WORD,a)
|
||||
Fa(int,GetWindowTextLength,HWND,a)
|
||||
Fa(int,RestoreVisRgn,HDC,a)
|
||||
@ -2623,39 +2590,36 @@ Fa(void,GetCaretPos,LPPOINT,a)
|
||||
Fa(void,GetCursorPos,LPPOINT,a)
|
||||
Fa(void,GetKeyboardState,BYTE FAR*,a)
|
||||
Fa(void,HideCaret,HWND,a)
|
||||
Fa(void,LimitEmsPages,DWORD,a)
|
||||
Fa(void,MessageBeep,WORD,a)
|
||||
Fa(void,OutputDebugString,LPSTR,a)
|
||||
Fa(void,PostQuitMessage,int,a)
|
||||
Fa(void,ReplyMessage,LONG,a)
|
||||
Fa(void,SetCaretBlinkTime,WORD,a)
|
||||
Fa(void,SetConvertHook,BOOL,a)
|
||||
Fa(void,SetDoubleClickTime,WORD,a)
|
||||
Fa(void,SetKeyboardState,BYTE FAR*,a)
|
||||
Fa(void,SetRectEmpty,LPRECT,a)
|
||||
Fa(void,ShowCaret,HWND,a)
|
||||
Fa(void,SwapRecording,WORD,a)
|
||||
Fb(BOOL,ExitWindows,DWORD,dwReserved,WORD,wReturnCode)
|
||||
Fb(BOOL,GetBitmapDimensionEx,HBITMAP,a,LPSIZE,b)
|
||||
Fb(BOOL,GetWindowPlacement,HWND,a,LPWINDOWPLACEMENT,b)
|
||||
Fb(BOOL,SetWindowPlacement,HWND,a,LPWINDOWPLACEMENT,b)
|
||||
Fb(BOOL,ShowWindow,HWND,a,int,b)
|
||||
Fb(HDC,BeginPaint,HWND,a,LPPAINTSTRUCT,b)
|
||||
Fb(LPSTR,lstrcat,LPSTR,a,LPCSTR,b )
|
||||
Fb(LPSTR,lstrcpy,LPSTR,a,LPCSTR,b )
|
||||
Fb(INT,_lcreat,LPSTR,a,INT,b)
|
||||
Fb(INT,lstrcmp,LPCSTR,a,LPCSTR,b )
|
||||
Fb(INT,lstrcmpi,LPCSTR,a,LPCSTR,b )
|
||||
Fb(void,EndPaint,HWND,a,LPPAINTSTRUCT,b)
|
||||
Fb(void,GetClientRect,HWND,a,LPRECT,b)
|
||||
Fb(void,SetDCState,HDC,a,HDC,b)
|
||||
Fb(BOOL,UnregisterClass,LPSTR,a,HANDLE,b)
|
||||
Fa(void,UpdateWindow,HWND,a)
|
||||
Fb(BOOL,CallMsgFilter,LPMSG,a,short,b)
|
||||
Fb(BOOL,ChangeClipboardChain,HWND,a,HWND,b)
|
||||
Fb(BOOL,EnableWindow,HWND,a,BOOL,b)
|
||||
Fb(BOOL,EnumWindows,FARPROC,a,LONG,b)
|
||||
Fb(BOOL,EqualRect,LPRECT,a,LPRECT,b)
|
||||
Fb(BOOL,EqualRgn,HRGN,a,HRGN,b)
|
||||
Fb(BOOL,ExitWindows,DWORD,dwReserved,WORD,wReturnCode)
|
||||
Fb(BOOL,FlashWindow,HWND,a,BOOL,b)
|
||||
Fb(BOOL,GetBitmapDimensionEx,HBITMAP,a,LPSIZE,b)
|
||||
Fb(BOOL,GetBrushOrgEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetCurrentPositionEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetTextMetrics,HDC,a,LPTEXTMETRIC,b)
|
||||
Fb(BOOL,GetViewportExtEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetViewportOrgEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetWindowExtEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetWindowOrgEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetWindowPlacement,HWND,a,LPWINDOWPLACEMENT,b)
|
||||
Fb(BOOL,InvertRgn,HDC,a,HRGN,b)
|
||||
Fb(BOOL,IsChild,HWND,a,HWND,b)
|
||||
Fb(BOOL,IsDialogMessage,HWND,a,LPMSG,b)
|
||||
@ -2671,20 +2635,19 @@ Fb(BOOL,ResizePalette,HPALETTE,a,WORD,b)
|
||||
Fb(BOOL,RestoreDC,HDC,a,short,b)
|
||||
Fb(BOOL,SetConvertParams,int,a,int,b)
|
||||
Fb(BOOL,SetMenu,HWND,a,HMENU,b)
|
||||
Fb(BOOL,SetWindowPlacement,HWND,a,LPWINDOWPLACEMENT,b)
|
||||
Fb(BOOL,ShowWindow,HWND,a,int,b)
|
||||
Fb(BOOL,TranslateMDISysAccel,HWND,a,LPMSG,b)
|
||||
Fb(BOOL,UnhookWindowsHook,short,a,HHOOK,b)
|
||||
Fb(BOOL,UnregisterClass,LPSTR,a,HANDLE,b)
|
||||
Fb(DWORD,GetNearestColor,HDC,a,DWORD,b)
|
||||
Fb(DWORD,SetBkColor,HDC,a,COLORREF,b)
|
||||
Fb(DWORD,SetMapperFlags,HDC,a,DWORD,b)
|
||||
Fb(DWORD,SetTextColor,HDC,a,DWORD,b)
|
||||
Fb(FARPROC,GetProcAddress,HANDLE,a,LPSTR,b)
|
||||
Fb(FARPROC,MakeProcInstance,FARPROC,a,HANDLE,b)
|
||||
Fb(HHOOK,SetWindowsHook,short,a,HOOKPROC,b)
|
||||
Fb(HANDLE,CopyMetaFile,HANDLE,a,LPSTR,b)
|
||||
Fb(HANDLE,GetProp,HWND,a,LPSTR,b)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fb(HANDLE,GlobalAlloc,WORD,a,DWORD,b)
|
||||
#endif
|
||||
Fb(HANDLE,LoadAccelerators,HANDLE,a,LPSTR,b)
|
||||
Fb(HANDLE,LoadModule,LPSTR,a,LPVOID,b)
|
||||
Fb(HANDLE,LoadResource,HANDLE,a,HANDLE,b)
|
||||
@ -2696,26 +2659,31 @@ Fb(HBITMAP,LoadBitmap,HANDLE,a,LPSTR,b)
|
||||
Fb(HBRUSH,CreateDIBPatternBrush,HANDLE,a,WORD,b)
|
||||
Fb(HBRUSH,CreateHatchBrush,short,a,COLORREF,b)
|
||||
Fb(HCURSOR,LoadCursor,HANDLE,a,LPSTR,b)
|
||||
Fb(HDC,BeginPaint,HWND,a,LPPAINTSTRUCT,b)
|
||||
Fb(HHOOK,SetWindowsHook,short,a,HOOKPROC,b)
|
||||
Fb(HICON,LoadIcon,HANDLE,a,LPSTR,b)
|
||||
Fb(HPALETTE,GDISelectPalette,HDC,a,HPALETTE,b)
|
||||
Fb(HMENU,GetSubMenu,HMENU,a,short,b)
|
||||
Fb(HMENU,GetSystemMenu,HWND,a,BOOL,b)
|
||||
Fb(HMENU,LoadMenu,HANDLE,a,LPSTR,b)
|
||||
Fb(HMENU,LookupMenuHandle,HMENU,a,INT,b)
|
||||
Fb(HPALETTE,GDISelectPalette,HDC,a,HPALETTE,b)
|
||||
Fb(HWND,ChildWindowFromPoint,HWND,a,POINT,b)
|
||||
Fb(HWND,FindWindow,LPSTR,a,LPSTR,b)
|
||||
Fb(HWND,GetDlgItem,HWND,a,WORD,b)
|
||||
Fb(HWND,GetNextWindow,HWND,a,WORD,b)
|
||||
Fb(HWND,GetWindow,HWND,a,WORD,b)
|
||||
Fb(BOOL,GetCurrentPositionEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetViewportExtEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetViewportOrgEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetWindowExtEx,HDC,a,LPPOINT,b)
|
||||
Fb(BOOL,GetWindowOrgEx,HDC,a,LPPOINT,b)
|
||||
Fb(HWND,SetParent,HWND,a,HWND,b)
|
||||
Fb(INT,AnsiToOem,LPSTR,a,LPSTR,b)
|
||||
Fb(INT,_lcreat,LPSTR,a,INT,b)
|
||||
Fb(INT,_lopen,LPSTR,a,INT,b)
|
||||
Fb(INT,lstrcmp,LPCSTR,a,LPCSTR,b )
|
||||
Fb(INT,lstrcmpi,LPCSTR,a,LPCSTR,b )
|
||||
Fb(LONG,EscapeCommFunction,int,a,int,b)
|
||||
Fb(LONG,GetClassLong,HWND,a,short,b)
|
||||
Fb(LONG,GetWindowLong,HWND,a,short,b)
|
||||
Fb(LPSTR,AnsiPrev,LPSTR,a,LPSTR,b)
|
||||
Fb(LPSTR,lstrcat,LPSTR,a,LPCSTR,b )
|
||||
Fb(LPSTR,lstrcpy,LPSTR,a,LPCSTR,b )
|
||||
Fb(WORD FAR*,SetCommEventMask,int,a,WORD,b)
|
||||
Fb(WORD,AnsiLowerBuff,LPSTR,a,WORD,b)
|
||||
Fb(WORD,AnsiUpperBuff,LPSTR,a,WORD,b)
|
||||
@ -2731,24 +2699,21 @@ Fb(WORD,GetWindowsDirectory,LPSTR,a,WORD,b)
|
||||
Fb(WORD,IsDlgButtonChecked,HWND,a,WORD,b)
|
||||
Fb(WORD,LocalShrink,HANDLE,a,WORD,b)
|
||||
Fb(WORD,MapVirtualKey,WORD,a,WORD,b)
|
||||
Fb(WORD,SetSystemPaletteUse,HDC,a,WORD,b)
|
||||
Fb(WORD,SetBkMode,HDC,a,WORD,b)
|
||||
Fb(WORD,SetMapMode,HDC,a,WORD,b)
|
||||
Fb(WORD,SetPolyFillMode,HDC,a,WORD,b)
|
||||
Fb(WORD,SetRelAbs,HDC,a,WORD,b)
|
||||
Fb(WORD,SetROP2,HDC,a,WORD,b)
|
||||
Fb(WORD,SetRelAbs,HDC,a,WORD,b)
|
||||
Fb(WORD,SetStretchBltMode,HDC,a,WORD,b)
|
||||
Fb(WORD,SetSystemPaletteUse,HDC,a,WORD,b)
|
||||
Fb(WORD,SetTaskQueue,HANDLE,a,HANDLE,b)
|
||||
Fb(WORD,SetTextAlign,HDC,a,WORD,b)
|
||||
Fb(WORD,SizeofResource,HANDLE,a,HANDLE,b)
|
||||
Fb(WORD,WinExec,LPSTR,a,WORD,b)
|
||||
Fb(int,AccessResource,HANDLE,a,HANDLE,b)
|
||||
Fb(INT,AnsiToOem,LPSTR,a,LPSTR,b)
|
||||
Fb(int,BuildCommDCB,LPSTR,a,DCB*,b)
|
||||
Fb(int,ConvertRequest,HWND,a,LPKANJISTRUCT,b)
|
||||
Fb(void,CopyRect,LPRECT,a,LPRECT,b)
|
||||
Fb(int,EnumProps,HWND,a,FARPROC,b)
|
||||
Fb(LONG,EscapeCommFunction,int,a,int,b)
|
||||
Fb(int,ExcludeUpdateRgn,HDC,a,HWND,b)
|
||||
Fb(int,FlushComm,int,a,int,b)
|
||||
Fb(int,GetClipBox,HDC,a,LPRECT,b)
|
||||
@ -2768,8 +2733,11 @@ Fb(int,TransmitCommChar,int,a,char,b)
|
||||
Fb(int,UngetCommChar,int,a,char,b)
|
||||
Fb(short,SetTextCharacterExtra,HDC,a,short,b)
|
||||
Fb(void,ClientToScreen,HWND,a,LPPOINT,b)
|
||||
Fb(void,CopyRect,LPRECT,a,LPRECT,b)
|
||||
Fb(void,DrawFocusRect,HDC,a,LPRECT,b)
|
||||
Fb(void,EndDialog,HWND,a,short,b)
|
||||
Fb(void,EndPaint,HWND,a,LPPAINTSTRUCT,b)
|
||||
Fb(void,GetClientRect,HWND,a,LPRECT,b)
|
||||
Fb(void,GetCodeInfo,FARPROC,lpProc,LPVOID,lpSegInfo)
|
||||
Fb(void,GetWindowRect,HWND,a,LPRECT,b)
|
||||
Fb(void,InvertRect,HDC,a,LPRECT,b)
|
||||
@ -2779,30 +2747,27 @@ Fb(void,ProfSetup,int,a,int,b)
|
||||
Fb(void,ScreenToClient,HWND,a,LPPOINT,b)
|
||||
Fb(void,SetCaretPos,short,a,short,b)
|
||||
Fb(void,SetCursorPos,short,a,short,b)
|
||||
Fb(void,SetDCState,HDC,a,HDC,b)
|
||||
Fb(void,SetWindowText,HWND,a,LPSTR,b)
|
||||
Fb(void,ShowOwnedPopups,HWND,a,BOOL,b)
|
||||
Fb(void,Throw,LPCATCHBUF,a,int,b)
|
||||
Fb(void,ValidateRect,HWND,a,LPRECT,b)
|
||||
Fb(void,ValidateRgn,HWND,a,HRGN,b)
|
||||
Fc(BOOL,LineTo,HDC,a,short,b,short,c)
|
||||
Fc(WORD,GetInternalWindowPos,HWND,a,LPRECT,b,LPPOINT,c)
|
||||
Fc(LONG,_llseek,INT,a,LONG,b,INT,c)
|
||||
Fc(INT,_lread,INT,a,LPSTR,b,WORD,c)
|
||||
Fc(INT,_lwrite,INT,a,LPSTR,b,WORD,c)
|
||||
Fc(int,FillRect,HDC,a,LPRECT,b,HBRUSH,c)
|
||||
Fc(DWORD,MoveTo,HDC,a,short,b,short,c)
|
||||
Fc(BOOL,CheckMenuItem,HMENU,a,WORD,b,WORD,c)
|
||||
Fc(BOOL,DPtoLP,HDC,a,LPPOINT,b,int,c)
|
||||
Fc(BOOL,DeleteMenu,HMENU,a,WORD,b,WORD,c)
|
||||
Fc(BOOL,DlgDirSelect,HWND,a,LPSTR,b,int,c)
|
||||
Fc(BOOL,DlgDirSelectComboBox,HWND,a,LPSTR,b,int,c)
|
||||
Fc(BOOL,EnableMenuItem,HMENU,a,WORD,b,WORD,c)
|
||||
Fc(BOOL,EnableScrollBar,HWND,a,INT,b,UINT,c)
|
||||
Fc(BOOL,EnumChildWindows,HWND,a,FARPROC,b,LONG,c)
|
||||
Fc(BOOL,EnumTaskWindows,HANDLE,a,FARPROC,b,LONG,c)
|
||||
Fc(BOOL,FillRgn,HDC,a,HRGN,b,HBRUSH,c)
|
||||
Fc(BOOL,GetClassInfo,HANDLE,a,LPSTR,b,LPWNDCLASS,c)
|
||||
Fc(BOOL,GetUpdateRect,HWND,a,LPRECT,b,BOOL,c)
|
||||
Fc(BOOL,IntersectRect,LPRECT,a,LPRECT,b,LPRECT,c)
|
||||
Fc(BOOL,LPtoDP,HDC,a,LPPOINT,b,int,c)
|
||||
Fc(BOOL,LineTo,HDC,a,short,b,short,c)
|
||||
Fc(BOOL,LocalInit,WORD,a,WORD,b,WORD,c)
|
||||
Fc(BOOL,Polygon,HDC,a,LPPOINT,b,int,c)
|
||||
Fc(BOOL,Polyline,HDC,a,LPPOINT,b,int,c)
|
||||
@ -2810,12 +2775,12 @@ Fc(BOOL,PtInRegion,HRGN,a,short,b,short,c)
|
||||
Fc(BOOL,PtVisible,HDC,a,short,b,short,c)
|
||||
Fc(BOOL,RemoveMenu,HMENU,a,WORD,b,WORD,c)
|
||||
Fc(BOOL,SetProp,HWND,a,LPSTR,b,HANDLE,c)
|
||||
Fc(BOOL,WriteProfileString,LPSTR,a,LPSTR,b,LPSTR,c)
|
||||
Fc(BOOL,IntersectRect,LPRECT,a,LPRECT,b,LPRECT,c)
|
||||
Fc(BOOL,UnionRect,LPRECT,a,LPRECT,b,LPRECT,c)
|
||||
Fc(BOOL,SubtractRect,LPRECT,a,LPRECT,b,LPRECT,c)
|
||||
Fc(BOOL,UnionRect,LPRECT,a,LPRECT,b,LPRECT,c)
|
||||
Fc(BOOL,WriteProfileString,LPSTR,a,LPSTR,b,LPSTR,c)
|
||||
Fc(DWORD,GetPixel,HDC,a,short,b,short,c)
|
||||
Fc(DWORD,GetTextExtent,HDC,a,LPSTR,b,short,c)
|
||||
Fc(DWORD,MoveTo,HDC,a,short,b,short,c)
|
||||
Fc(DWORD,OffsetViewportOrg,HDC,a,short,b,short,c)
|
||||
Fc(DWORD,OffsetWindowOrg,HDC,a,short,b,short,c)
|
||||
Fc(DWORD,SetBitmapDimension,HBITMAP,a,short,b,short,c)
|
||||
@ -2827,9 +2792,6 @@ Fc(DWORD,SetWindowOrg,HDC,a,short,b,short,c)
|
||||
Fc(FARPROC,SetResourceHandler,HANDLE,a,LPSTR,b,FARPROC,c)
|
||||
Fc(HANDLE,AllocResource,HANDLE,a,HANDLE,b,DWORD,c)
|
||||
Fc(HANDLE,FindResource,HANDLE,a,LPSTR,b,LPSTR,c)
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fc(HANDLE,GlobalReAlloc,HANDLE,a,DWORD,b,WORD,c)
|
||||
#endif
|
||||
Fc(HANDLE,LocalReAlloc,HANDLE,a,WORD,b,WORD,c)
|
||||
Fc(HBITMAP,CreateCompatibleBitmap,HDC,a,short,b,short,c)
|
||||
Fc(HBITMAP,CreateDiscardableBitmap,HDC,a,short,b,short,c)
|
||||
@ -2840,16 +2802,22 @@ Fc(HRGN,CreatePolygonRgn,LPPOINT,a,short,b,short,c)
|
||||
Fc(HWND,GetNextDlgGroupItem,HWND,a,HWND,b,BOOL,c)
|
||||
Fc(HWND,GetNextDlgTabItem,HWND,a,HWND,b,BOOL,c)
|
||||
Fc(INT,GetTextFace,HDC,a,INT,b,LPSTR,c)
|
||||
Fc(INT,OpenFile,LPSTR,a,LPOFSTRUCT,b,WORD,c)
|
||||
Fc(INT,_lread,INT,a,LPSTR,b,WORD,c)
|
||||
Fc(INT,_lwrite,INT,a,LPSTR,b,WORD,c)
|
||||
Fc(LONG,GetBitmapBits,HBITMAP,a,LONG,b,LPSTR,c)
|
||||
Fc(LONG,SetBitmapBits,HBITMAP,a,LONG,b,LPSTR,c)
|
||||
Fc(LONG,SetClassLong,HWND,a,short,b,LONG,c)
|
||||
Fc(LONG,SetWindowLong,HWND,a,short,b,LONG,c)
|
||||
Fc(LONG,_llseek,INT,a,LONG,b,INT,c)
|
||||
Fc(WORD,GetAtomName,ATOM,a,LPSTR,b,short,c)
|
||||
Fc(WORD,GetInternalWindowPos,HWND,a,LPRECT,b,LPPOINT,c)
|
||||
Fc(WORD,GetMenuState,HMENU,a,WORD,b,WORD,c)
|
||||
Fc(WORD,GetProfileInt,LPSTR,a,LPSTR,b,int,c)
|
||||
Fc(WORD,GlobalGetAtomName,ATOM,a,LPSTR,b,short,c)
|
||||
Fc(WORD,SetClassWord,HWND,a,short,b,WORD,c)
|
||||
Fc(WORD,SetWindowWord,HWND,a,short,b,WORD,c)
|
||||
Fc(int,FillRect,HDC,a,LPRECT,b,HBRUSH,c)
|
||||
Fc(int,FrameRect,HDC,a,LPRECT,b,HBRUSH,c)
|
||||
Fc(int,GetClassName,HWND,a,LPSTR,b,short,c)
|
||||
Fc(int,GetClipboardFormatName,WORD,a,LPSTR,b,short,c)
|
||||
@ -2864,7 +2832,6 @@ Fc(int,MulDiv,int,a,int,b,int,c)
|
||||
Fc(int,OffsetClipRgn,HDC,a,short,b,short,c)
|
||||
Fc(int,OffsetRgn,HRGN,a,short,b,short,c)
|
||||
Fc(int,OpenComm,LPSTR,a,WORD,b,WORD,c)
|
||||
Fc(INT,OpenFile,LPSTR,a,LPOFSTRUCT,b,WORD,c)
|
||||
Fc(int,ReadComm,int,a,LPSTR,b,int,c)
|
||||
Fc(int,SetEnvironment,LPSTR,a,LPSTR,b,WORD,c)
|
||||
Fc(int,SetVoiceEnvelope,int,a,int,b,int,c)
|
||||
@ -2886,25 +2853,30 @@ Fc(void,SetSysColors,int,a,LPINT,b,COLORREF*,c)
|
||||
Fc(void,ShowScrollBar,HWND,a,WORD,b,BOOL,c)
|
||||
Fc(void,SwitchStackTo,WORD,a,WORD,b,WORD,c)
|
||||
Fd(BOOL,AppendMenu,HMENU,a,WORD,b,WORD,c,LPSTR,d)
|
||||
Fd(BOOL,PostMessage,HWND,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(LONG,SendMessage,HWND,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(BOOL,GetMessage,LPMSG,msg,HWND,b,WORD,c,WORD,d)
|
||||
Fd(BOOL,GetTextExtentPoint,HDC,a,LPSTR,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,DrawIcon,HDC,a,short,b,short,c,HICON,d)
|
||||
Fd(BOOL,EnumMetaFile,HDC,a,LOCALHANDLE,b,FARPROC,c,BYTE FAR*,d)
|
||||
Fd(BOOL,FloodFill,HDC,a,INT,b,INT,c,COLORREF,d)
|
||||
Fd(BOOL,GetCharWidth,HDC,a,WORD,b,WORD,c,LPINT,d)
|
||||
Fd(BOOL,GetMessage,LPMSG,msg,HWND,b,WORD,c,WORD,d)
|
||||
Fd(BOOL,GetTextExtentPoint,HDC,a,LPSTR,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,HiliteMenuItem,HWND,a,HMENU,b,WORD,c,WORD,d)
|
||||
Fd(BOOL,MoveToEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,OffsetViewportOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,OffsetWindowOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,PolyPolygon,HDC,a,LPPOINT,b,LPINT,c,WORD,d)
|
||||
Fd(BOOL,PostAppMessage,HANDLE,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(BOOL,PostMessage,HWND,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(BOOL,RedrawWindow,HWND,a,LPRECT,b,HRGN,c,UINT,d)
|
||||
Fd(BOOL,SetBitmapDimensionEx,HBITMAP,a,short,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,SetViewportExtEx,HDC,a,short,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,SetViewportOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,SetWindowExtEx,HDC,a,short,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,SetWindowOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,WinHelp,HWND,hwndMain,LPSTR,lpszHelp,WORD,usCommand,DWORD,ulData)
|
||||
Fd(BOOL,WritePrivateProfileString,LPSTR,a,LPSTR,b,LPSTR,c,LPSTR,d)
|
||||
Fd(DWORD,DefHookProc,short,a,WORD,b,DWORD,c,HHOOK FAR*,d)
|
||||
Fd(DWORD,CallNextHookEx,HHOOK,a,short,b,WPARAM,c,LPARAM,d)
|
||||
Fd(COLORREF,SetPixel,HDC,a,short,b,short,c,COLORREF,d)
|
||||
Fd(DWORD,CallNextHookEx,HHOOK,a,short,b,WPARAM,c,LPARAM,d)
|
||||
Fd(DWORD,DefHookProc,short,a,WORD,b,DWORD,c,HHOOK FAR*,d)
|
||||
Fd(HDC,CreateDC,LPSTR,a,LPSTR,b,LPSTR,c,LPSTR,d)
|
||||
Fd(HDC,CreateIC,LPSTR,a,LPSTR,b,LPSTR,c,LPSTR,d)
|
||||
Fd(HHOOK,SetWindowsHookEx,short,a,HOOKPROC,b,HINSTANCE,c,HTASK,d)
|
||||
@ -2913,9 +2885,11 @@ Fd(HRGN,CreatePolyPolygonRgn,LPPOINT,a,LPINT,b,short,c,short,d)
|
||||
Fd(HRGN,CreateRectRgn,short,a,short,b,short,c,short,d)
|
||||
Fd(HWND,CreateDialog,HANDLE,a,LPCSTR,b,HWND,c,WNDPROC,d)
|
||||
Fd(HWND,CreateDialogIndirect,HANDLE,a,LPCSTR,b,HWND,c,WNDPROC,d)
|
||||
Fd(INT,GetTempFileName,BYTE,a,LPCSTR,b,UINT,c,LPSTR,d)
|
||||
Fd(LONG,DefDlgProc,HWND,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(LONG,DefMDIChildProc,HWND,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(LONG,DefWindowProc,HWND,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(LONG,SendMessage,HWND,a,WORD,b,WORD,c,LONG,d)
|
||||
Fd(WORD,GetDlgItemInt,HWND,a,WORD,b,BOOL FAR*,c,BOOL,d)
|
||||
Fd(WORD,GetPaletteEntries,HPALETTE,a,WORD,b,WORD,c,LPPALETTEENTRY,d)
|
||||
Fd(WORD,GetPrivateProfileInt,LPSTR,a,LPSTR,b,short,c,LPSTR,d)
|
||||
@ -2923,19 +2897,12 @@ Fd(WORD,GetSystemPaletteEntries,HDC,a,WORD,b,WORD,c,LPPALETTEENTRY,d)
|
||||
Fd(WORD,SetPaletteEntries,HPALETTE,a,WORD,b,WORD,c,LPPALETTEENTRY,d)
|
||||
Fd(WORD,SetSystemTimer,HWND,a,WORD,d,WORD,b,FARPROC,c)
|
||||
Fd(WORD,SetTimer,HWND,a,WORD,d,WORD,b,FARPROC,c)
|
||||
Fd(BOOL,SetViewportExtEx,HDC,a,short,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,SetViewportOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,SetWindowExtEx,HDC,a,short,b,short,c,LPSIZE,d)
|
||||
Fd(BOOL,SetWindowOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,OffsetViewportOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(BOOL,OffsetWindowOrgEx,HDC,a,short,b,short,c,LPPOINT,d)
|
||||
Fd(int,CombineRgn,HRGN,a,HRGN,b,HRGN,c,short,d)
|
||||
Fd(int,DialogBox,HINSTANCE,a,LPCSTR,b,HWND,c,WNDPROC,d)
|
||||
Fd(int,DialogBoxIndirect,HANDLE,a,HANDLE,b,HWND,c,WNDPROC,d)
|
||||
Fd(int,EnumFonts,HDC,a,LPSTR,b,FARPROC,c,LPSTR,d)
|
||||
Fd(int,EnumObjects,HDC,a,int,b,FARPROC,c,LPSTR,d)
|
||||
Fd(int,GetDlgItemText,HWND,a,WORD,b,LPSTR,c,WORD,d)
|
||||
Fd(INT,GetTempFileName,BYTE,a,LPCSTR,b,UINT,c,LPSTR,d)
|
||||
Fd(int,LoadString,HANDLE,a,WORD,b,LPSTR,c,int,d)
|
||||
Fd(int,MessageBox,HWND,a,LPSTR,b,LPSTR,c,WORD,d)
|
||||
Fd(int,SetScrollPos,HWND,a,int,b,int,c,BOOL,d)
|
||||
@ -2948,18 +2915,16 @@ Fd(void,FillWindow,HWND,a,HWND,b,HDC,c,HBRUSH,d)
|
||||
Fd(void,GetScrollRange,HWND,a,int,b,LPINT,c,LPINT,d)
|
||||
Fd(void,MapWindowPoints,HWND,a,HWND,b,LPPOINT,c,WORD,d)
|
||||
Fd(void,PlayMetaFileRecord,HDC,a,LPHANDLETABLE,b,LPMETARECORD,c,WORD,d)
|
||||
Fd(void,SetInternalWindowPos,HWND,a,WORD,b,LPRECT,c,LPPOINT,d)
|
||||
Fd(void,SetDlgItemInt,HWND,a,WORD,b,WORD,c,BOOL,d)
|
||||
Fe(BOOL,Rectangle,HDC,a,int,xLeft,int,yTop,int,xRight,int,yBottom)
|
||||
Fe(int,DrawText,HDC,a,LPSTR,str,int,c,LPRECT,d,WORD,flag)
|
||||
Fe(BOOL,PeekMessage,LPMSG,a,HWND,b,WORD,c,WORD,d,WORD,e)
|
||||
Fe(LONG,CallWindowProc,WNDPROC,a,HWND,b,WORD,c,WORD,d,LONG,e)
|
||||
Fd(void,SetInternalWindowPos,HWND,a,WORD,b,LPRECT,c,LPPOINT,d)
|
||||
Fe(BOOL,ChangeMenu,HMENU,a,WORD,b,LPSTR,c,WORD,d,WORD,e)
|
||||
Fe(BOOL,Ellipse,HDC,a,int,b,int,c,int,d,int,e)
|
||||
Fe(BOOL,ExtFloodFill,HDC,a,INT,b,INT,c,COLORREF,d,WORD,e)
|
||||
Fe(BOOL,FrameRgn,HDC,a,HRGN,b,HBRUSH,e,int,c,int,d)
|
||||
Fe(BOOL,InsertMenu,HMENU,a,WORD,b,WORD,c,WORD,d,LPSTR,e)
|
||||
Fe(BOOL,ModifyMenu,HMENU,a,WORD,b,WORD,c,WORD,d,LPSTR,e)
|
||||
Fe(BOOL,PeekMessage,LPMSG,a,HWND,b,WORD,c,WORD,d,WORD,e)
|
||||
Fe(BOOL,Rectangle,HDC,a,int,xLeft,int,yTop,int,xRight,int,yBottom)
|
||||
Fe(BOOL,SetMenuItemBitmaps,HMENU,a,WORD,b,WORD,c,HBITMAP,d,HBITMAP,e)
|
||||
Fe(BOOL,TextOut,HDC,a,short,b,short,c,LPSTR,d,short,e)
|
||||
Fe(DWORD,GetTabbedTextExtent,HDC,a,LPSTR,b,int,c,int,d,LPINT,e)
|
||||
@ -2968,12 +2933,14 @@ Fe(DWORD,ScaleWindowExt,HDC,a,short,b,short,c,short,d,short,e)
|
||||
Fe(HBITMAP,CreateBitmap,short,a,short,b,BYTE,c,BYTE,d,LPSTR,e)
|
||||
Fe(HWND,CreateDialogIndirectParam,HANDLE,a,LPCSTR,b,HWND,c,WNDPROC,d,LPARAM,e)
|
||||
Fe(HWND,CreateDialogParam,HANDLE,a,LPCSTR,b,HWND,c,WNDPROC,d,LPARAM,e)
|
||||
Fe(LONG,CallWindowProc,WNDPROC,a,HWND,b,WORD,c,WORD,d,LONG,e)
|
||||
Fe(LONG,DefFrameProc,HWND,a,HWND,b,WORD,c,WORD,d,LONG,e)
|
||||
Fe(LONG,SendDlgItemMessage,HWND,a,WORD,b,WORD,c,WORD,d,LONG,e)
|
||||
Fe(int,DialogBoxIndirectParam,HANDLE,a,HANDLE,b,HWND,c,WNDPROC,d,LONG,e)
|
||||
Fe(int,DialogBoxParam,HANDLE,a,LPCSTR,b,HWND,c,WNDPROC,d,LONG,e)
|
||||
Fe(int,DlgDirList,HWND,a,LPSTR,b,int,c,int,d,WORD,e)
|
||||
Fe(int,DlgDirListComboBox,HWND,a,LPSTR,b,int,c,int,d,WORD,e)
|
||||
Fe(int,DrawText,HDC,a,LPSTR,str,int,c,LPRECT,d,WORD,flag)
|
||||
Fe(int,Escape,HDC,a,int,b,int,c,LPSTR,d,LPSTR,e)
|
||||
Fe(int,ExcludeClipRect,HDC,a,short,b,short,c,short,d,short,e)
|
||||
Fe(int,ExcludeVisRect,HDC,a,short,b,short,c,short,d,short,e)
|
||||
@ -2988,38 +2955,59 @@ Fe(void,ScrollWindow,HWND,a,short,b,short,c,LPRECT,d,LPRECT,e)
|
||||
Fe(void,SetRect,LPRECT,a,short,b,short,c,short,d,short,e)
|
||||
Fe(void,SetRectRgn,HRGN,a,short,b,short,c,short,d,short,e)
|
||||
Fe(void,SetScrollRange,HWND,a,int,b,int,c,int,d,BOOL,e)
|
||||
Ff(BOOL,MoveWindow,HWND,a,short,b,short,c,short,d,short,e,BOOL,f)
|
||||
Ff(BOOL,PatBlt,HDC,a,short,b,short,c,short,d,short,e,DWORD,f)
|
||||
Ff(BOOL,ScaleViewportExtEx,HDC,a,short,b,short,c,short,d,short,e,LPSIZE,f)
|
||||
Ff(BOOL,ScaleWindowExtEx,HDC,a,short,b,short,c,short,d,short,e,LPSIZE,f)
|
||||
Ff(HBITMAP,CreateDIBitmap,HDC,a,LPBITMAPINFOHEADER,b,DWORD,c,LPSTR,d,LPBITMAPINFO,e,WORD,f)
|
||||
Ff(HRGN,CreateRoundRectRgn,short,a,short,b,short,c,short,d,short,e,short,f)
|
||||
Ff(short,GetPrivateProfileString,LPSTR,a,LPSTR,b,LPSTR,c,LPSTR,d,short,e,LPSTR,f)
|
||||
Ff(void,LineDDA,short,a,short,b,short,c,short,d,FARPROC,e,long,f)
|
||||
Ff(BOOL,MoveWindow,HWND,a,short,b,short,c,short,d,short,e,BOOL,f)
|
||||
Ff(BOOL,ScaleViewportExtEx,HDC,a,short,b,short,c,short,d,short,e,LPSIZE,f)
|
||||
Ff(BOOL,ScaleWindowExtEx,HDC,a,short,b,short,c,short,d,short,e,LPSIZE,f)
|
||||
Fg(BOOL,RoundRect,HDC,a,short,b,short,c,short,d,short,e,short,f,short,g)
|
||||
Fg(BOOL,ScrollDC,HDC,a,short,b,short,c,LPRECT,d,LPRECT,e,HRGN,f,LPRECT,g)
|
||||
Fg(BOOL,SetWindowPos,HWND,a,HWND,b,short,c,short,d,short,e,short,f,WORD,g)
|
||||
Fg(BOOL,TrackPopupMenu,HMENU,a,WORD,b,short,c,short,d,short,e,HWND,f,LPRECT,g)
|
||||
Fg(HCURSOR,CreateCursor,HANDLE,a,short,b,short,c,short,d,short,e,LPSTR,f,LPSTR,g)
|
||||
Fg(HICON,CreateIcon,HANDLE,a,int,b,int,c,BYTE,d,BYTE,e,LPSTR,f,LPSTR,g)
|
||||
Fg(int,GetDIBits,HDC,a,HANDLE,a2,WORD,b,WORD,c,LPSTR,d,LPBITMAPINFO,e,WORD,f)
|
||||
Fg(int,SetDIBits,HDC,a,HANDLE,a2,WORD,b,WORD,c,LPSTR,d,LPBITMAPINFO,e,WORD,f)
|
||||
Fg(BOOL,SetWindowPos,HWND,a,HWND,b,short,c,short,d,short,e,short,f,WORD,g)
|
||||
Fh(BOOL,ExtTextOut,HDC,a,short,b,short,c,WORD,d,LPRECT,e,LPSTR,f,WORD,g,LPINT,h)
|
||||
Fh(HDWP,DeferWindowPos,HDWP,hWinPosInfo,HWND,hWnd,HWND,hWndInsertAfter,INT,x,INT,y,INT,cx,INT,cy,WORD,wFlags)
|
||||
Fh(LONG,TabbedTextOut,HDC,a,short,b,short,c,LPSTR,d,short,e,short,f,LPINT,g,short,h)
|
||||
Fh(int,ScrollWindowEx,HWND,a,short,b,short,c,LPRECT,d,LPRECT,e,HRGN,f,LPRECT,g,WORD,h)
|
||||
Fi(BOOL,Arc,HDC,a,int,xLeft,int,yTop,int,xRight,int,yBottom,int,xStart,int,yStart,int,xEnd,int,yEnd)
|
||||
Fi(BOOL,Chord,HDC,a,int,xLeft,int,yTop,int,xRight,int,yBottom,int,xStart,int,yStart,int,xEnd,int,yEnd)
|
||||
Fi(BOOL,BitBlt,HDC,a,short,b,short,c,short,d,short,e,HDC,f,short,g,short,h,DWORD,i)
|
||||
Fi(BOOL,Chord,HDC,a,int,xLeft,int,yTop,int,xRight,int,yBottom,int,xStart,int,yStart,int,xEnd,int,yEnd)
|
||||
Fi(BOOL,GrayString,HDC,a,HBRUSH,b,FARPROC,gsprc,LPARAM,lParam,INT,cch,INT,x,INT,y,INT,cx,INT,cy)
|
||||
Fi(BOOL,Pie,HDC,a,int,xLeft,int,yTop,int,xRight,int,yBottom,int,xStart,int,yStart,int,xEnd,int,yEnd)
|
||||
Fk(HWND,CreateWindow,LPSTR,szAppName,LPSTR,Label,DWORD,ol,short,x,short,y,short,w,short,h,HWND,d,HMENU,e,,HANDLE i,LPSTR,g)
|
||||
Fk(BOOL,StretchBlt,HDC,a,short,b,short,c,short,d,short,e,HDC,f,short,g,short,h,short,i,short,j,DWORD,k)
|
||||
Fk(HWND,CreateWindow,LPSTR,szAppName,LPSTR,Label,DWORD,ol,short,x,short,y,short,w,short,h,HWND,d,HMENU,e,,HANDLE i,LPSTR,g)
|
||||
Fl(HWND,CreateWindowEx,DWORD,a,LPSTR,b,LPSTR,c,DWORD,d,short,e,short,f,short,g,short,h,HWND,i,HMENU,j,HANDLE,k,LPSTR,l)
|
||||
Fl(int,SetDIBitsToDevice,HDC,a,short,b,short,c,WORD,d,WORD,e,WORD,f,WORD,g,WORD,h,WORD,i,LPSTR,j,LPBITMAPINFO,k,WORD,l)
|
||||
Fm(int,StretchDIBits,HDC,a,WORD,b,WORD,c,WORD,d,WORD,e,WORD,f,WORD,g,WORD,h,WORD,i,LPSTR,j,LPBITMAPINFO,k,WORD,l,DWORD,m)
|
||||
Fn(HFONT,CreateFont,int,a,int,b,int,c,int,d,int,e,BYTE,f,BYTE,g,BYTE,h,BYTE,i,BYTE,j,BYTE,k,BYTE,l,BYTE,m,LPSTR,n)
|
||||
|
||||
#ifndef GLOBAL_SOURCE
|
||||
Fa(BOOL,GlobalUnWire,HANDLE,a)
|
||||
Fa(BOOL,GlobalUnfix,HANDLE,a)
|
||||
Fa(BOOL,GlobalUnlock,HANDLE,a)
|
||||
Fa(DWORD,GlobalCompact,DWORD,a)
|
||||
Fa(DWORD,GlobalHandle,WORD,a)
|
||||
Fa(DWORD,GlobalSize,HANDLE,a)
|
||||
Fa(HANDLE,GlobalFree,HANDLE,a)
|
||||
Fa(HANDLE,GlobalLRUNewest,HANDLE,a)
|
||||
Fa(HANDLE,GlobalLRUOldest,HANDLE,a)
|
||||
Fa(LPSTR,GlobalLock,HANDLE,a)
|
||||
Fa(LPSTR,GlobalWire,HANDLE,a)
|
||||
Fa(WORD,GlobalFlags,HANDLE,a)
|
||||
Fa(WORD,GlobalPageLock,HANDLE,a)
|
||||
Fa(WORD,GlobalPageUnlock,HANDLE,a)
|
||||
Fa(void,GlobalFix,HANDLE,a)
|
||||
Fa(void,GlobalNotify,FARPROC,a)
|
||||
Fb(HANDLE,GlobalAlloc,WORD,a,DWORD,b)
|
||||
Fc(HANDLE,GlobalReAlloc,HANDLE,a,DWORD,b,WORD,c)
|
||||
#endif
|
||||
|
||||
#ifdef WINELIB
|
||||
#define WINELIB_UNIMP(x) fprintf (stderr, "WineLib: Unimplemented %s\n", x)
|
||||
#endif
|
||||
|
@ -25,8 +25,6 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include "arch.h"
|
||||
#include "options.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_FIXUP */
|
||||
/* #undef DEBUG_FIXUP */
|
||||
#include "debug.h"
|
||||
|
||||
extern HANDLE CreateNewTask(HINSTANCE hInst);
|
||||
@ -202,7 +200,6 @@ GetModuleName(struct w_files * wpnt, int index, char *buffer)
|
||||
int
|
||||
FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
{
|
||||
int fd = wpnt->fd;
|
||||
struct mz_header_s *mz_header = wpnt->mz_header;
|
||||
struct ne_header_s *ne_header = wpnt->ne->ne_header;
|
||||
struct ne_segment_table_entry_s *seg_table = wpnt->ne->seg_table;
|
||||
@ -237,14 +234,14 @@ FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
if (i == 0)
|
||||
i = 0x10000;
|
||||
|
||||
status = lseek(fd, seg->seg_data_offset *
|
||||
status = lseek(wpnt->fd, seg->seg_data_offset *
|
||||
(1 << ne_header->align_shift_count) + i, SEEK_SET);
|
||||
n_entries = 0;
|
||||
read(fd, &n_entries, sizeof(short int));
|
||||
read(wpnt->fd, &n_entries, sizeof(short int));
|
||||
rep = (struct relocation_entry_s *)
|
||||
malloc(n_entries * sizeof(struct relocation_entry_s));
|
||||
|
||||
if (read(fd,rep, n_entries * sizeof(struct relocation_entry_s)) !=
|
||||
if (read(wpnt->fd, rep, n_entries * sizeof(struct relocation_entry_s)) !=
|
||||
n_entries * sizeof(struct relocation_entry_s))
|
||||
{
|
||||
myerror("Unable to read relocation information");
|
||||
@ -300,7 +297,7 @@ FixupSegment(struct w_files * wpnt, int segment_num)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (GetImportedName(fd, mz_header, ne_header,
|
||||
if (GetImportedName(wpnt->fd, mz_header, ne_header,
|
||||
rep->target2, func_name) == NULL)
|
||||
{
|
||||
fprintf(stderr,"getimportedname failed");
|
||||
|
@ -15,19 +15,12 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
||||
#include "dlls.h"
|
||||
#include "resource.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_RESOURCE */
|
||||
/* #undef DEBUG_RESOURCE */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
static int ResourceFd = -1;
|
||||
static HANDLE ResourceInst = 0;
|
||||
static struct w_files *ResourceFileInfo;
|
||||
|
||||
/**********************************************************************
|
||||
* RSC_LoadNameTable
|
||||
* NE_LoadNameTable
|
||||
*/
|
||||
void RSC_LoadNameTable(void)
|
||||
static void NE_LoadNameTable(struct w_files *wpnt)
|
||||
{
|
||||
struct resource_typeinfo_s typeinfo;
|
||||
struct resource_nameinfo_s nameinfo;
|
||||
@ -37,26 +30,21 @@ void RSC_LoadNameTable(void)
|
||||
char *p;
|
||||
int i;
|
||||
unsigned short len;
|
||||
off_t rtoff;
|
||||
off_t saved_pos;
|
||||
|
||||
top = NULL;
|
||||
|
||||
/*
|
||||
* Move to beginning of resource table.
|
||||
*/
|
||||
rtoff = (ResourceFileInfo->mz_header->ne_offset +
|
||||
ResourceFileInfo->ne->ne_header->resource_tab_offset);
|
||||
lseek(ResourceFd, rtoff, SEEK_SET);
|
||||
|
||||
lseek(wpnt->fd, wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->resource_tab_offset, SEEK_SET);
|
||||
|
||||
/*
|
||||
* Read block size.
|
||||
*/
|
||||
if (read(ResourceFd, &size_shift, sizeof(size_shift)) !=
|
||||
sizeof(size_shift))
|
||||
{
|
||||
if (read(wpnt->fd, &size_shift, sizeof(size_shift)) != sizeof(size_shift))
|
||||
return;
|
||||
}
|
||||
|
||||
size_shift = CONV_SHORT(size_shift);
|
||||
|
||||
/*
|
||||
@ -65,97 +53,48 @@ void RSC_LoadNameTable(void)
|
||||
typeinfo.type_id = 0xffff;
|
||||
while (typeinfo.type_id != 0)
|
||||
{
|
||||
if (!load_typeinfo (ResourceFd, &typeinfo))
|
||||
if (read(wpnt->fd, &typeinfo, sizeof(typeinfo)) != sizeof(typeinfo))
|
||||
break;
|
||||
|
||||
if (typeinfo.type_id == 0)
|
||||
break;
|
||||
|
||||
if (typeinfo.type_id == 0x800f)
|
||||
{
|
||||
for (i = 0; i < typeinfo.count; i++)
|
||||
{
|
||||
if (read(ResourceFd, &nameinfo, sizeof(nameinfo)) !=
|
||||
sizeof(nameinfo))
|
||||
{
|
||||
if (read(wpnt->fd, &nameinfo, sizeof(nameinfo)) != sizeof(nameinfo))
|
||||
break;
|
||||
}
|
||||
|
||||
saved_pos = lseek(ResourceFd, 0, SEEK_CUR);
|
||||
lseek(ResourceFd, (long) nameinfo.offset << size_shift,
|
||||
saved_pos = lseek(wpnt->fd, 0, SEEK_CUR);
|
||||
lseek(wpnt->fd, (long) nameinfo.offset << size_shift,
|
||||
SEEK_SET);
|
||||
read(ResourceFd, &len, sizeof(len));
|
||||
read(wpnt->fd, &len, sizeof(len));
|
||||
while (len)
|
||||
{
|
||||
new = (RESNAMTAB *) GlobalQuickAlloc(sizeof(*new));
|
||||
new->next = top;
|
||||
top = new;
|
||||
|
||||
read(ResourceFd, &new->type_ord, 2);
|
||||
read(ResourceFd, &new->id_ord, 2);
|
||||
read(ResourceFd, read_buf, len - 6);
|
||||
read(wpnt->fd, &new->type_ord, 2);
|
||||
read(wpnt->fd, &new->id_ord, 2);
|
||||
read(wpnt->fd, read_buf, len - 6);
|
||||
|
||||
p = read_buf + strlen(read_buf) + 1;
|
||||
strncpy(new->id, p, MAX_NAME_LENGTH);
|
||||
new->id[MAX_NAME_LENGTH - 1] = '\0';
|
||||
|
||||
read(ResourceFd, &len, sizeof(len));
|
||||
read(wpnt->fd, &len, sizeof(len));
|
||||
}
|
||||
|
||||
lseek(ResourceFd, saved_pos, SEEK_SET);
|
||||
lseek(wpnt->fd, saved_pos, SEEK_SET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
lseek(ResourceFd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
} else
|
||||
lseek(wpnt->fd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
ResourceFileInfo->ne->resnamtab = top;
|
||||
wpnt->ne->resnamtab = top;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* OpenResourceFile
|
||||
*/
|
||||
int
|
||||
OpenResourceFile(HANDLE instance)
|
||||
{
|
||||
struct w_files *w;
|
||||
char *res_file;
|
||||
|
||||
if (ResourceInst == instance)
|
||||
return ResourceFd;
|
||||
|
||||
w = GetFileInfo(instance);
|
||||
if (w == NULL)
|
||||
return -1;
|
||||
ResourceFileInfo = w;
|
||||
res_file = w->filename;
|
||||
|
||||
if (ResourceFd >= 0)
|
||||
close(ResourceFd);
|
||||
|
||||
ResourceInst = instance;
|
||||
ResourceFd = open (res_file, O_RDONLY);
|
||||
#if 1
|
||||
#ifndef WINELIB
|
||||
if (w->ne->resnamtab == (RESNAMTAB *) -1)
|
||||
{
|
||||
RSC_LoadNameTable();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
dprintf_resource(stddeb, "OpenResourceFile(%04X) // file='%s' hFile=%04X !\n",
|
||||
instance, w->filename, ResourceFd);
|
||||
return ResourceFd;
|
||||
}
|
||||
|
||||
int load_typeinfo (int fd, struct resource_typeinfo_s *typeinfo)
|
||||
{
|
||||
return read (fd, typeinfo, sizeof (*typeinfo)) == sizeof (*typeinfo);
|
||||
}
|
||||
|
||||
int type_match(int type_id1, int type_id2, int fd, off_t off)
|
||||
static int type_match(int type_id1, int type_id2, int fd, off_t off)
|
||||
{
|
||||
off_t old_pos;
|
||||
unsigned char c;
|
||||
@ -172,10 +111,12 @@ int type_match(int type_id1, int type_id2, int fd, off_t off)
|
||||
if ((type_id2 & 0x8000) != 0)
|
||||
return 0;
|
||||
dprintf_resource(stddeb, "type_compare: type_id2=%04X !\n", type_id2);
|
||||
|
||||
old_pos = lseek(fd, 0, SEEK_CUR);
|
||||
lseek(fd, off + type_id2, SEEK_SET);
|
||||
read(fd, &c, 1);
|
||||
nbytes = CONV_CHAR_TO_LONG (c);
|
||||
nbytes = CONV_CHAR_TO_LONG(c);
|
||||
|
||||
dprintf_resource(stddeb, "type_compare: namesize=%d\n", nbytes);
|
||||
read(fd, name, nbytes);
|
||||
lseek(fd, old_pos, SEEK_SET);
|
||||
@ -187,9 +128,7 @@ int type_match(int type_id1, int type_id2, int fd, off_t off)
|
||||
/**********************************************************************
|
||||
* FindResourceByNumber
|
||||
*/
|
||||
int
|
||||
FindResourceByNumber(struct resource_nameinfo_s *result_p,
|
||||
int type_id, int resource_id)
|
||||
static int FindResourceByNumber(RESOURCE *r, int type_id, int resource_id)
|
||||
{
|
||||
struct resource_typeinfo_s typeinfo;
|
||||
struct resource_nameinfo_s nameinfo;
|
||||
@ -197,58 +136,54 @@ FindResourceByNumber(struct resource_nameinfo_s *result_p,
|
||||
int i;
|
||||
off_t rtoff;
|
||||
|
||||
/*
|
||||
* Move to beginning of resource table.
|
||||
*/
|
||||
rtoff = (ResourceFileInfo->mz_header->ne_offset +
|
||||
ResourceFileInfo->ne->ne_header->resource_tab_offset);
|
||||
lseek(ResourceFd, rtoff, SEEK_SET);
|
||||
|
||||
/*
|
||||
* Read block size.
|
||||
*/
|
||||
if (read(ResourceFd, &size_shift, sizeof(size_shift)) !=
|
||||
sizeof(size_shift))
|
||||
{
|
||||
dprintf_resource(stddeb, "FindResourceByNumber: type_id =%x,m res_id = %x\n",
|
||||
type_id, resource_id);
|
||||
|
||||
/* Move to beginning of resource table */
|
||||
rtoff = (r->wpnt->mz_header->ne_offset +
|
||||
r->wpnt->ne->ne_header->resource_tab_offset);
|
||||
lseek(r->wpnt->fd, rtoff, SEEK_SET);
|
||||
|
||||
/* Read block size */
|
||||
if (read(r->wpnt->fd, &size_shift, sizeof(size_shift)) != sizeof(size_shift)) {
|
||||
printf("FindResourceByNumber (%d) bad block size !\n",(int) resource_id);
|
||||
return -1;
|
||||
}
|
||||
size_shift = CONV_SHORT(size_shift);
|
||||
/*
|
||||
* Find resource.
|
||||
*/
|
||||
|
||||
/* Find resource */
|
||||
for (;;) {
|
||||
if (!load_typeinfo (ResourceFd, &typeinfo)){
|
||||
if (read(r->wpnt->fd, &typeinfo, sizeof(typeinfo)) != sizeof(typeinfo)) {
|
||||
printf("FindResourceByNumber (%X) bad typeinfo size !\n", resource_id);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
dprintf_resource(stddeb, "FindResourceByNumber type=%X count=%d ?=%ld searched=%08X\n",
|
||||
typeinfo.type_id, typeinfo.count, typeinfo.reserved, type_id);
|
||||
if (typeinfo.type_id == 0) break;
|
||||
if (type_match(type_id, typeinfo.type_id, ResourceFd, rtoff)) {
|
||||
if (typeinfo.type_id == 0)
|
||||
break;
|
||||
if (type_match(type_id, typeinfo.type_id, r->wpnt->fd, rtoff)) {
|
||||
|
||||
for (i = 0; i < typeinfo.count; i++) {
|
||||
#ifndef WINELIB
|
||||
if (read(ResourceFd, &nameinfo, sizeof(nameinfo)) !=
|
||||
sizeof(nameinfo))
|
||||
if (read(r->wpnt->fd, &nameinfo, sizeof(nameinfo)) != sizeof(nameinfo))
|
||||
#else
|
||||
if (!load_nameinfo (ResourceFd, &nameinfo))
|
||||
if (!load_nameinfo(r->wpnt->fd, &nameinfo))
|
||||
#endif
|
||||
{
|
||||
printf("FindResourceByNumber (%X) bad nameinfo size !\n", resource_id);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
dprintf_resource(stddeb, "FindResource: search type=%X id=%X // type=%X id=%X\n",
|
||||
type_id, resource_id, typeinfo.type_id, nameinfo.id);
|
||||
if (nameinfo.id == resource_id) {
|
||||
memcpy(result_p, &nameinfo, sizeof(nameinfo));
|
||||
return size_shift;
|
||||
r->size = nameinfo.length << size_shift;
|
||||
r->offset = nameinfo.offset << size_shift;
|
||||
return size_shift;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
lseek(ResourceFd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
else
|
||||
lseek(r->wpnt->fd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -256,9 +191,7 @@ FindResourceByNumber(struct resource_nameinfo_s *result_p,
|
||||
/**********************************************************************
|
||||
* FindResourceByName
|
||||
*/
|
||||
int
|
||||
FindResourceByName(struct resource_nameinfo_s *result_p,
|
||||
int type_id, char *resource_name)
|
||||
static int FindResourceByName(RESOURCE *r, int type_id, char *resource_name)
|
||||
{
|
||||
struct resource_typeinfo_s typeinfo;
|
||||
struct resource_nameinfo_s nameinfo;
|
||||
@ -269,65 +202,51 @@ FindResourceByName(struct resource_nameinfo_s *result_p,
|
||||
int i;
|
||||
off_t rtoff;
|
||||
|
||||
/*
|
||||
* Check for loaded name table.
|
||||
*/
|
||||
if (ResourceFileInfo->ne->resnamtab != NULL)
|
||||
{
|
||||
/* Check for loaded name table */
|
||||
if (r->wpnt->ne->resnamtab != NULL) {
|
||||
RESNAMTAB *e;
|
||||
|
||||
for (e = ResourceFileInfo->ne->resnamtab; e != NULL; e = e->next)
|
||||
{
|
||||
if (e->type_ord == (type_id & 0x000f) &&
|
||||
strcasecmp(e->id, resource_name) == 0)
|
||||
for (e = r->wpnt->ne->resnamtab; e != NULL; e = e->next)
|
||||
if (e->type_ord == (type_id & 0x000f) &&
|
||||
strcasecmp(e->id, resource_name) == 0)
|
||||
{
|
||||
return FindResourceByNumber(result_p, type_id, e->id_ord);
|
||||
return FindResourceByNumber(r, type_id, e->id_ord);
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Move to beginning of resource table.
|
||||
*/
|
||||
rtoff = (ResourceFileInfo->mz_header->ne_offset +
|
||||
ResourceFileInfo->ne->ne_header->resource_tab_offset);
|
||||
lseek(ResourceFd, rtoff, SEEK_SET);
|
||||
|
||||
/*
|
||||
* Read block size.
|
||||
*/
|
||||
if (read(ResourceFd, &size_shift, sizeof(size_shift)) !=
|
||||
sizeof(size_shift))
|
||||
/* Move to beginning of resource table */
|
||||
rtoff = (r->wpnt->mz_header->ne_offset +
|
||||
r->wpnt->ne->ne_header->resource_tab_offset);
|
||||
lseek(r->wpnt->fd, rtoff, SEEK_SET);
|
||||
|
||||
/* Read block size */
|
||||
if (read(r->wpnt->fd, &size_shift, sizeof(size_shift)) != sizeof(size_shift))
|
||||
{
|
||||
printf("FindResourceByName (%s) bad block size !\n", resource_name);
|
||||
return -1;
|
||||
}
|
||||
size_shift = CONV_SHORT (size_shift);
|
||||
|
||||
/*
|
||||
* Find resource.
|
||||
*/
|
||||
/* Find resource */
|
||||
for (;;)
|
||||
{
|
||||
if (!load_typeinfo (ResourceFd, &typeinfo))
|
||||
{
|
||||
if (read(r->wpnt->fd, &typeinfo, sizeof(typeinfo)) != sizeof(typeinfo)) {
|
||||
printf("FindResourceByName (%s) bad typeinfo size !\n", resource_name);
|
||||
return -1;
|
||||
}
|
||||
dprintf_resource(stddeb, "FindResourceByName typeinfo.type_id=%X count=%d type_id=%X\n",
|
||||
typeinfo.type_id, typeinfo.count, type_id);
|
||||
if (typeinfo.type_id == 0) break;
|
||||
if (type_match(type_id, typeinfo.type_id, ResourceFd, rtoff))
|
||||
if (typeinfo.type_id == 0)
|
||||
break;
|
||||
if (type_match(type_id, typeinfo.type_id, r->wpnt->fd, rtoff))
|
||||
{
|
||||
for (i = 0; i < typeinfo.count; i++)
|
||||
{
|
||||
#ifndef WINELIB
|
||||
if (read(ResourceFd, &nameinfo, sizeof(nameinfo)) !=
|
||||
sizeof(nameinfo))
|
||||
if (read(r->wpnt->fd, &nameinfo, sizeof(nameinfo)) != sizeof(nameinfo))
|
||||
#else
|
||||
if (!load_nameinfo (ResourceFd, &nameinfo))
|
||||
if (!load_nameinfo (r->wpnt->fd, &nameinfo))
|
||||
#endif
|
||||
{
|
||||
printf("FindResourceByName (%s) bad nameinfo size !\n", resource_name);
|
||||
@ -337,28 +256,27 @@ FindResourceByName(struct resource_nameinfo_s *result_p,
|
||||
if ((nameinfo.id & 0x8000) != 0) continue;
|
||||
*/
|
||||
dprintf_resource(stddeb, "FindResourceByName // nameinfo.id=%04X !\n", nameinfo.id);
|
||||
old_pos = lseek(ResourceFd, 0, SEEK_CUR);
|
||||
old_pos = lseek(r->wpnt->fd, 0, SEEK_CUR);
|
||||
new_pos = rtoff + nameinfo.id;
|
||||
lseek(ResourceFd, new_pos, SEEK_SET);
|
||||
read(ResourceFd, &nbytes, 1);
|
||||
lseek(r->wpnt->fd, new_pos, SEEK_SET);
|
||||
read(r->wpnt->fd, &nbytes, 1);
|
||||
dprintf_resource(stddeb, "FindResourceByName // namesize=%d !\n", nbytes);
|
||||
nbytes = CONV_CHAR_TO_LONG (nbytes);
|
||||
read(ResourceFd, name, nbytes);
|
||||
lseek(ResourceFd, old_pos, SEEK_SET);
|
||||
read(r->wpnt->fd, name, nbytes);
|
||||
lseek(r->wpnt->fd, old_pos, SEEK_SET);
|
||||
name[nbytes] = '\0';
|
||||
dprintf_resource(stddeb, "FindResourceByName type_id=%X (%d of %d) name='%s' resource_name='%s'\n",
|
||||
typeinfo.type_id, i + 1, typeinfo.count,
|
||||
name, resource_name);
|
||||
if (strcasecmp(name, resource_name) == 0)
|
||||
{
|
||||
memcpy(result_p, &nameinfo, sizeof(nameinfo));
|
||||
return size_shift;
|
||||
if (strcasecmp(name, resource_name) == 0) {
|
||||
r->size = nameinfo.length << size_shift;
|
||||
r->offset = nameinfo.offset << size_shift;
|
||||
return size_shift;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
lseek(ResourceFd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
else
|
||||
lseek(r->wpnt->fd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -369,109 +287,92 @@ FindResourceByName(struct resource_nameinfo_s *result_p,
|
||||
*/
|
||||
int GetRsrcCount(HINSTANCE hInst, int type_id)
|
||||
{
|
||||
struct w_files *wpnt;
|
||||
struct resource_typeinfo_s typeinfo;
|
||||
struct resource_nameinfo_s nameinfo;
|
||||
unsigned short size_shift;
|
||||
off_t rtoff;
|
||||
|
||||
if (hInst == 0) return 0;
|
||||
if (hInst == 0)
|
||||
return 0;
|
||||
dprintf_resource(stddeb, "GetRsrcCount hInst=%04X typename=%08X\n",
|
||||
hInst, type_id);
|
||||
if (OpenResourceFile(hInst) < 0) return 0;
|
||||
|
||||
if ((wpnt = GetFileInfo(hInst)) == NULL)
|
||||
return 0;
|
||||
/*
|
||||
* Move to beginning of resource table.
|
||||
*/
|
||||
rtoff = (ResourceFileInfo->mz_header->ne_offset +
|
||||
ResourceFileInfo->ne->ne_header->resource_tab_offset);
|
||||
lseek(ResourceFd, rtoff, SEEK_SET);
|
||||
rtoff = (wpnt->mz_header->ne_offset +
|
||||
wpnt->ne->ne_header->resource_tab_offset);
|
||||
lseek(wpnt->fd, rtoff, SEEK_SET);
|
||||
/*
|
||||
* Read block size.
|
||||
*/
|
||||
if (read(ResourceFd, &size_shift, sizeof(size_shift)) != sizeof(size_shift)) {
|
||||
if (read(wpnt->fd, &size_shift, sizeof(size_shift)) != sizeof(size_shift)) {
|
||||
printf("GetRsrcCount // bad block size !\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
size_shift = CONV_SHORT (size_shift);
|
||||
for (;;) {
|
||||
if (!load_typeinfo (ResourceFd, &typeinfo)) {
|
||||
printf("GetRsrcCount // bad typeinfo size !\n");
|
||||
return 0;
|
||||
}
|
||||
dprintf_resource(stddeb, "GetRsrcCount // typeinfo.type_id=%X count=%d type_id=%X\n",
|
||||
if (read(wpnt->fd, &typeinfo, sizeof(typeinfo)) != sizeof(typeinfo)) {
|
||||
printf("GetRsrcCount // bad typeinfo size !\n");
|
||||
return 0;
|
||||
}
|
||||
dprintf_resource(stddeb, "GetRsrcCount // typeinfo.type_id=%X count=%d type_id=%X\n",
|
||||
typeinfo.type_id, typeinfo.count, type_id);
|
||||
if (typeinfo.type_id == 0) break;
|
||||
if (type_match(type_id, typeinfo.type_id, ResourceFd, rtoff)) {
|
||||
return typeinfo.count;
|
||||
}
|
||||
else {
|
||||
lseek(ResourceFd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
}
|
||||
if (typeinfo.type_id == 0)
|
||||
break;
|
||||
if (type_match(type_id, typeinfo.type_id, wpnt->fd, rtoff))
|
||||
return typeinfo.count;
|
||||
else
|
||||
lseek(wpnt->fd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* NE_FindResource [KERNEL.60]
|
||||
*/
|
||||
int
|
||||
NE_FindResource(HANDLE instance, LPSTR resource_name, LPSTR type_name,
|
||||
int NE_FindResource(HANDLE instance, LPSTR resource_name, LPSTR type_name,
|
||||
RESOURCE *r)
|
||||
{
|
||||
int type;
|
||||
int type, x;
|
||||
|
||||
dprintf_resource(stddeb, "NE_FindResource hInst=%04X typename=%p resname=%p\n",
|
||||
instance, type_name, resource_name);
|
||||
|
||||
ResourceFd = r->fd;
|
||||
ResourceFileInfo = r->wpnt;
|
||||
r->size = r->offset = 0;
|
||||
|
||||
/* nametable loaded ? */
|
||||
if (r->wpnt->ne->resnamtab == NULL)
|
||||
RSC_LoadNameTable();
|
||||
NE_LoadNameTable(r->wpnt);
|
||||
|
||||
if (((int) type_name & 0xffff0000) == 0)
|
||||
{
|
||||
type = (int) type_name;
|
||||
}
|
||||
else if (type_name[0] == '\0')
|
||||
{
|
||||
type = -1;
|
||||
}
|
||||
else if (type_name[0] == '#')
|
||||
{
|
||||
type = atoi(type_name + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
type = (int) type_name;
|
||||
}
|
||||
if (((int) resource_name & 0xffff0000) == 0)
|
||||
{
|
||||
r->size_shift = FindResourceByNumber(&r->nameinfo, type,
|
||||
(int) resource_name | 0x8000);
|
||||
}
|
||||
else if (resource_name[0] == '\0')
|
||||
{
|
||||
r->size_shift = FindResourceByNumber(&r->nameinfo, type, -1);
|
||||
}
|
||||
else if (resource_name[0] == '#')
|
||||
{
|
||||
r->size_shift = FindResourceByNumber(&r->nameinfo, type,
|
||||
atoi(resource_name + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
r->size_shift = FindResourceByName(&r->nameinfo, type, resource_name);
|
||||
else {
|
||||
if (type_name[0] == '\0')
|
||||
type = -1;
|
||||
if (type_name[0] == '#')
|
||||
type = atoi(type_name + 1);
|
||||
else
|
||||
type = (int) type_name;
|
||||
}
|
||||
|
||||
if (r->size_shift == -1)
|
||||
{
|
||||
if (((int) resource_name & 0xffff0000) == 0)
|
||||
x = FindResourceByNumber(r, type, (int) resource_name | 0x8000);
|
||||
else {
|
||||
if (resource_name[0] == '\0')
|
||||
x = FindResourceByNumber(r, type, -1);
|
||||
if (resource_name[0] == '#')
|
||||
x = FindResourceByNumber(r, type, atoi(resource_name + 1));
|
||||
else
|
||||
x = FindResourceByName(r, type, resource_name);
|
||||
}
|
||||
if (x == -1) {
|
||||
printf("NE_FindResource hInst=%04X typename=%08X resname=%08X not found!\n",
|
||||
instance, (int) type_name, (int) resource_name);
|
||||
return 0;
|
||||
}
|
||||
r->size = r->nameinfo.length << r->size_shift;
|
||||
r->offset = r->nameinfo.offset << r->size_shift;
|
||||
return 1;
|
||||
}
|
||||
|
@ -738,13 +738,13 @@ LoadBitmap(HANDLE instance, LPSTR bmp_name)
|
||||
return hbitmap;
|
||||
/* Load from sysresbm */
|
||||
dprintf_resource(stddeb,"Searching for %d\n",bmp_name);
|
||||
for(it=sysresbmTable;it;it++){
|
||||
for(it=sysresbmTable;it->value;it++){
|
||||
if(it->type==NE_RSCTYPE_BITMAP)
|
||||
if((((int)bmp_name & 0xFFFF0000) == 0))
|
||||
{if(it->id==(int)bmp_name)break;}
|
||||
else if(!strcmp(it->name,bmp_name))break;
|
||||
}
|
||||
if(!it)return 0;
|
||||
if(!it->value)return 0;
|
||||
dprintf_resource(stddeb,"Found %s\n",it->name);
|
||||
lp=it->value;
|
||||
rsc_mem=(HANDLE)NULL;
|
||||
|
@ -3,7 +3,6 @@
|
||||
MODULE = misc
|
||||
|
||||
SRCS = \
|
||||
audio.c \
|
||||
atom.c \
|
||||
clipboard.c \
|
||||
comm.c \
|
||||
@ -16,12 +15,7 @@ SRCS = \
|
||||
keyboard.c \
|
||||
lstr.c \
|
||||
main.c \
|
||||
mcianim.c \
|
||||
mcicda.c \
|
||||
message.c \
|
||||
midi.c \
|
||||
mmaux.c \
|
||||
mmsystem.c \
|
||||
network.c \
|
||||
profile.c \
|
||||
property.c \
|
||||
|
@ -258,7 +258,7 @@ int GetClipboardFormatName(WORD wFormat, LPSTR retStr, short maxlen)
|
||||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
dprintf_clipboard(stddeb,
|
||||
"GetClipboardFormat(%04X, %08X, %d) !\n", wFormat, retStr, maxlen);
|
||||
"GetClipboardFormat(%04X, %p, %d) !\n", wFormat, retStr, maxlen);
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return 0;
|
||||
if (lpFormat->wFormatID == wFormat) break;
|
||||
@ -280,8 +280,10 @@ int GetClipboardFormatName(WORD wFormat, LPSTR retStr, short maxlen)
|
||||
*/
|
||||
HWND SetClipboardViewer(HWND hWnd)
|
||||
{
|
||||
dprintf_clipboard(stddeb,"SetClipboardFormat(%04X) !\n", hWnd);
|
||||
HWND hwndPrev = hWndViewer;
|
||||
dprintf_clipboard(stddeb,"SetClipboardViewer(%04X) !\n", hWnd);
|
||||
hWndViewer = hWnd;
|
||||
return hwndPrev;
|
||||
}
|
||||
|
||||
|
||||
@ -340,7 +342,7 @@ HWND GetOpenClipboardWindow()
|
||||
int GetPriorityClipboardFormat(WORD FAR *lpPriorityList, short nCount)
|
||||
{
|
||||
dprintf_clipboard(stdnimp,
|
||||
"GetPriorityClipboardFormat(%08X, %d) !\n", lpPriorityList, nCount);
|
||||
"GetPriorityClipboardFormat(%p, %d) !\n", lpPriorityList, nCount);
|
||||
}
|
||||
|
||||
|
||||
@ -354,7 +356,8 @@ void CLIPBOARD_ReadSelection(Window w,Atom prop)
|
||||
{
|
||||
HANDLE hText;
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
if(prop==None)hText=NULL;
|
||||
if(prop==None)
|
||||
hText=0;
|
||||
else{
|
||||
Atom atype=None;
|
||||
int aformat;
|
||||
@ -365,11 +368,11 @@ void CLIPBOARD_ReadSelection(Window w,Atom prop)
|
||||
if(XGetWindowProperty(display,w,prop,0,0x3FFF,True,XA_STRING,
|
||||
&atype, &aformat, &nitems, &remain, &val)!=Success)
|
||||
printf("couldn't read property\n");
|
||||
dprintf_clipboard(stddeb,"Type %s,Format %d,nitems %d,value %s\n",
|
||||
dprintf_clipboard(stddeb,"Type %s,Format %d,nitems %ld,value %s\n",
|
||||
XGetAtomName(display,atype),aformat,nitems,val);
|
||||
if(atype!=XA_STRING || aformat!=8){
|
||||
fprintf(stderr,"Property not set\n");
|
||||
hText=NULL;
|
||||
hText=0;
|
||||
} else {
|
||||
dprintf_clipboard(stddeb,"Selection is %s\n",val);
|
||||
hText=GlobalAlloc(GMEM_MOVEABLE, nitems);
|
||||
|
18
misc/comm.c
18
misc/comm.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* DEC 93 Erik Bos (erik@trashcan.hacktic.nl)
|
||||
* DEC 93 Erik Bos <erik@xs4all.nl>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -20,8 +20,8 @@
|
||||
#include "windows.h"
|
||||
#include "comm.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_COMM /* */
|
||||
/* #undef DEBUG_COMM /* */
|
||||
/* #define DEBUG_COMM */
|
||||
/* #undef DEBUG_COMM */
|
||||
#include "debug.h"
|
||||
|
||||
int commerror = 0, eventmask = 0;
|
||||
@ -151,7 +151,7 @@ int BuildCommDCB(LPSTR device, DCB FAR *lpdcb)
|
||||
char *ptr, temp[256];
|
||||
|
||||
dprintf_comm(stddeb,
|
||||
"BuildCommDCB: (%s), ptr %d\n", device, (long) lpdcb);
|
||||
"BuildCommDCB: (%s), ptr %p\n", device, lpdcb);
|
||||
commerror = 0;
|
||||
|
||||
if (!strncasecmp(device,"COM",3)) {
|
||||
@ -469,7 +469,7 @@ int SetCommState(DCB FAR *lpdcb)
|
||||
struct DosDeviceStruct *ptr;
|
||||
|
||||
dprintf_comm(stddeb,
|
||||
"SetCommState: fd %d, ptr %d\n", lpdcb->Id, (long) lpdcb);
|
||||
"SetCommState: fd %d, ptr %p\n", lpdcb->Id, lpdcb);
|
||||
if (tcgetattr(lpdcb->Id, &port) == -1) {
|
||||
commerror = WinError();
|
||||
return -1;
|
||||
@ -661,7 +661,7 @@ int GetCommState(int fd, DCB FAR *lpdcb)
|
||||
{
|
||||
struct termios port;
|
||||
|
||||
dprintf_comm(stddeb,"GetCommState: fd %d, ptr %d\n", fd, (long) lpdcb);
|
||||
dprintf_comm(stddeb,"GetCommState: fd %d, ptr %p\n", fd, lpdcb);
|
||||
if (tcgetattr(fd, &port) == -1) {
|
||||
commerror = WinError();
|
||||
return -1;
|
||||
@ -824,7 +824,7 @@ int ReadComm(int fd, LPSTR lpvBuf, int cbRead)
|
||||
struct DosDeviceStruct *ptr;
|
||||
|
||||
dprintf_comm(stddeb,
|
||||
"ReadComm: fd %d, ptr %d, length %d\n", fd, (long) lpvBuf, cbRead);
|
||||
"ReadComm: fd %d, ptr %p, length %d\n", fd, lpvBuf, cbRead);
|
||||
if ((ptr = GetDeviceStruct(fd)) == NULL) {
|
||||
commerror = IE_BADID;
|
||||
return -1;
|
||||
@ -865,8 +865,8 @@ int WriteComm(int fd, LPSTR lpvBuf, int cbWrite)
|
||||
int x, length;
|
||||
struct DosDeviceStruct *ptr;
|
||||
|
||||
dprintf_comm(stddeb,"WriteComm: fd %d, ptr %d, length %d\n",
|
||||
fd, (long) lpvBuf, cbWrite);
|
||||
dprintf_comm(stddeb,"WriteComm: fd %d, ptr %p, length %d\n",
|
||||
fd, lpvBuf, cbWrite);
|
||||
if ((ptr = GetDeviceStruct(fd)) == NULL) {
|
||||
commerror = IE_BADID;
|
||||
return -1;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* DOS-FS
|
||||
* NOV 1993 Erik Bos (erik@(trashcan.)hacktic.nl)
|
||||
* NOV 1993 Erik Bos <erik@xs4all.nl>
|
||||
*
|
||||
* FindFile by Bob, hacked for dos & unixpaths by Erik.
|
||||
*
|
||||
@ -31,8 +31,6 @@
|
||||
#include "autoconf.h"
|
||||
#include "comm.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_DOSFS /* */
|
||||
/* #undef DEBIG_DOSFS /* */
|
||||
#include "debug.h"
|
||||
|
||||
#define WINE_INI_USER "~/.winerc"
|
||||
@ -141,6 +139,12 @@ void DOS_InitFS(void)
|
||||
strcat(DosDrives[x].label, drive);
|
||||
DosDrives[x].disabled = 0;
|
||||
}
|
||||
DosDrives[25].rootdir = "/";
|
||||
strcpy(DosDrives[25].cwd, "/");
|
||||
strcpy(DosDrives[25].label, "UNIX-FS");
|
||||
DosDrives[25].serialnumber = 0x12345678;
|
||||
DosDrives[25].disabled = 0;
|
||||
|
||||
DOS_SetDefaultDrive(2);
|
||||
|
||||
for (x=0; x!=MAX_DOS_DRIVES; x++) {
|
||||
@ -431,7 +435,7 @@ char *GetDosFileName(char *unixfilename)
|
||||
}
|
||||
}
|
||||
}
|
||||
sprintf(temp, "UNIX:%s", unixfilename);
|
||||
sprintf(temp, "Z:%s", unixfilename);
|
||||
ToDos(temp);
|
||||
return(temp);
|
||||
}
|
||||
@ -547,7 +551,7 @@ int DOS_GetFreeSpace(int drive, long *size, long *available)
|
||||
|
||||
*size = info.f_bsize * info.f_blocks;
|
||||
*available = info.f_bavail * info.f_bsize;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -578,14 +582,9 @@ char *FindFile(char *buffer, int buflen, char *filename, char **extensions,
|
||||
|
||||
dprintf_dosfs(stddeb,"FindFile: looking for %s\n", filename);
|
||||
rootnamelen = strlen(filename);
|
||||
if ((rootname = malloc(rootnamelen + 1)) == NULL)
|
||||
return NULL;
|
||||
strcpy(rootname, filename);
|
||||
rootname = strdup(filename);
|
||||
ToUnix(rootname);
|
||||
|
||||
if ((workingpath = malloc(strlen(path) + 1)) == NULL)
|
||||
return NULL;
|
||||
strcpy(workingpath, path);
|
||||
workingpath = strdup(path);
|
||||
|
||||
for(dirname = strtok(workingpath, ";");
|
||||
dirname != NULL;
|
||||
@ -649,7 +648,7 @@ char *WineIniFileName(void)
|
||||
{
|
||||
int fd;
|
||||
static char *filename = NULL;
|
||||
char name[256];
|
||||
static char name[256];
|
||||
|
||||
if (filename)
|
||||
return filename;
|
||||
@ -658,14 +657,12 @@ char *WineIniFileName(void)
|
||||
ExpandTildeString(name);
|
||||
if ((fd = open(name, O_RDONLY)) != -1) {
|
||||
close(fd);
|
||||
filename = malloc(strlen(name) + 1);
|
||||
strcpy(filename, name);
|
||||
filename = name;
|
||||
return(filename);
|
||||
}
|
||||
if ((fd = open(WINE_INI_GLOBAL, O_RDONLY)) != -1) {
|
||||
close(fd);
|
||||
filename = malloc(strlen(WINE_INI_GLOBAL) + 1);
|
||||
strcpy(filename, WINE_INI_GLOBAL);
|
||||
filename = WINE_INI_GLOBAL;
|
||||
return(filename);
|
||||
}
|
||||
fprintf(stderr,"wine: can't open configuration file %s or %s !\n",
|
||||
|
@ -47,7 +47,7 @@ void LoadStartupDrivers()
|
||||
*/
|
||||
LRESULT WINAPI SendDriverMessage(HDRVR hDriver, WORD msg, LPARAM lParam1, LPARAM lParam2)
|
||||
{
|
||||
dprintf_driver(stdnimp,"SendDriverMessage(%04X, %04X, %08X, %08X);\n",
|
||||
dprintf_driver(stdnimp,"SendDriverMessage(%04X, %04X, %08lX, %08lX);\n",
|
||||
hDriver, msg, lParam1, lParam2);
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ HDRVR OpenDriver(LPSTR lpDriverName, LPSTR lpSectionName, LPARAM lParam)
|
||||
LPDRIVERITEM lpnewdrv;
|
||||
LPDRIVERITEM lpdrv = lpDrvItemList;
|
||||
char DrvName[128];
|
||||
dprintf_driver(stddeb,"OpenDriver('%s', '%s', %08X);\n",
|
||||
dprintf_driver(stddeb,"OpenDriver('%s', '%s', %08lX);\n",
|
||||
lpDriverName, lpSectionName, lParam);
|
||||
if (lpSectionName == NULL) lpSectionName = "drivers";
|
||||
GetPrivateProfileString(lpSectionName, lpDriverName,
|
||||
@ -106,7 +106,7 @@ LRESULT CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
|
||||
{
|
||||
LPDRIVERITEM lpdrv;
|
||||
dprintf_driver(stddeb,
|
||||
"CloseDriver(%04X, %08X, %08X);\n", hDrvr, lParam1, lParam2);
|
||||
"CloseDriver(%04X, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
|
||||
lpdrv = (LPDRIVERITEM) GlobalLock(hDrvr);
|
||||
if (lpdrv != NULL && lpdrv->dis.hDriver == hDrvr) {
|
||||
if (lpdrv->lpPrevItem)
|
||||
@ -177,7 +177,7 @@ LRESULT DefDriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
BOOL GetDriverInfo(HDRVR hDrvr, LPDRIVERINFOSTRUCT lpDrvInfo)
|
||||
{
|
||||
LPDRIVERITEM lpdrv;
|
||||
dprintf_driver(stddeb,"GetDriverInfo(%04X, %08X);\n", hDrvr, lpDrvInfo);
|
||||
dprintf_driver(stddeb,"GetDriverInfo(%04X, %p);\n", hDrvr, lpDrvInfo);
|
||||
if (lpDrvInfo == NULL) return FALSE;
|
||||
lpdrv = (LPDRIVERITEM) GlobalLock(hDrvr);
|
||||
if (lpdrv == NULL) return FALSE;
|
||||
@ -193,7 +193,7 @@ HDRVR GetNextDriver(HDRVR hDrvr, DWORD dwFlags)
|
||||
{
|
||||
LPDRIVERITEM lpdrv;
|
||||
HDRVR hRetDrv = 0;
|
||||
dprintf_driver(stddeb,"GetNextDriver(%04X, %08X);\n", hDrvr, dwFlags);
|
||||
dprintf_driver(stddeb,"GetNextDriver(%04X, %08lX);\n", hDrvr, dwFlags);
|
||||
if (hDrvr == 0) {
|
||||
if (lpDrvItemList == NULL) {
|
||||
dprintf_driver(stddeb,
|
||||
|
@ -147,7 +147,7 @@ HANDLE LoadModule(LPSTR modulefile, LPVOID lpParamBlk)
|
||||
{
|
||||
PARAMBLOCK *pblk = lpParamBlk;
|
||||
WORD *lpCmdShow;
|
||||
dprintf_exec(stddeb,"LoadModule '%s' %08X\n", modulefile, lpParamBlk);
|
||||
dprintf_exec(stddeb,"LoadModule '%s' %p\n", modulefile, lpParamBlk);
|
||||
if (lpParamBlk == NULL) return 0;
|
||||
lpCmdShow = (WORD *)pblk->lpCmdShow;
|
||||
return WinExec(pblk->lpCmdLine, lpCmdShow[1]);
|
||||
@ -162,7 +162,6 @@ WORD WinExec(LPSTR lpCmdLine, WORD nCmdShow)
|
||||
int c = 0;
|
||||
int x, x2;
|
||||
char *ArgV[20];
|
||||
LPFNWINMAIN lpfnMain;
|
||||
HINSTANCE hInst = 0;
|
||||
HANDLE hTask = 0;
|
||||
dprintf_exec(stddeb,"WinExec('%s', %04X)\n", lpCmdLine, nCmdShow);
|
||||
@ -226,7 +225,7 @@ WORD WinExec(LPSTR lpCmdLine, WORD nCmdShow)
|
||||
*/
|
||||
BOOL ExitWindows(DWORD dwReserved, WORD wRetCode)
|
||||
{
|
||||
dprintf_exec(stdnimp,"EMPTY STUB !!! ExitWindows(%08X, %04X) !\n",
|
||||
dprintf_exec(stdnimp,"EMPTY STUB !!! ExitWindows(%08lX, %04X) !\n",
|
||||
dwReserved, wRetCode);
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,10 @@
|
||||
*
|
||||
* WARNING : Many options of OpenFile are not yet implemeted.
|
||||
*
|
||||
* NOV 93 Erik Bos (erik@(trashcan.)hacktic.nl
|
||||
* NOV 93 Erik Bos (erik@xs4all.nl)
|
||||
* - removed ParseDosFileName, and DosDrive structures.
|
||||
* - structures dynamically configured at runtime.
|
||||
* - _lopen modified to use GetUnixFileName.
|
||||
*
|
||||
* DEC 93 Erik Bos (erik@(trashcan.)hacktic.nl)
|
||||
* - Existing functions modified to use dosfs functions.
|
||||
* - Added _llseek, _lcreat, GetDriveType, GetTempDrive,
|
||||
* GetWindowsDirectory, GetSystemDirectory, GetTempFileName.
|
||||
@ -79,7 +77,7 @@ INT _lread (INT hFile, LPSTR lpBuffer, WORD wBytes)
|
||||
int result;
|
||||
|
||||
dprintf_file(stddeb, "_lread: handle %d, buffer = %ld, length = %d\n",
|
||||
hFile, (int) lpBuffer, wBytes);
|
||||
hFile, (long) lpBuffer, wBytes);
|
||||
|
||||
result = read (hFile, lpBuffer, wBytes);
|
||||
|
||||
@ -97,7 +95,7 @@ INT _lwrite (INT hFile, LPSTR lpBuffer, WORD wBytes)
|
||||
int result;
|
||||
|
||||
dprintf_file(stddeb, "_lwrite: handle %d, buffer = %ld, length = %d\n",
|
||||
hFile, (int) lpBuffer, wBytes);
|
||||
hFile, (long) lpBuffer, wBytes);
|
||||
|
||||
result = write (hFile, lpBuffer, wBytes);
|
||||
|
||||
|
@ -117,7 +117,7 @@ int GetKeyNameText(LONG lParam, LPSTR lpBuffer, int nSize)
|
||||
{
|
||||
int i;
|
||||
|
||||
dprintf_keyboard(stddeb,"GetKeyNameText(%d,<ptr>, %d)\n",lParam,nSize);
|
||||
dprintf_keyboard(stddeb,"GetKeyNameText(%ld,<ptr>,%d)\n",lParam,nSize);
|
||||
|
||||
lParam >>= 16;
|
||||
lParam &= 0xff;
|
||||
|
@ -245,7 +245,7 @@ static short GetSetProfile (int set, LPSTR AppName, LPSTR KeyName,
|
||||
return (Size - 2);
|
||||
}
|
||||
slen = min(strlen(key->KeyName) + 1, left);
|
||||
dprintf_profile(stddeb,"GetSetProfile // strncpy(%08X, %08X, %d);\n",
|
||||
dprintf_profile(stddeb,"GetSetProfile // strncpy(%p, %p, %d);\n",
|
||||
ReturnedString, key->Value, slen);
|
||||
strncpy (p, key->KeyName, slen);
|
||||
dprintf_profile(stddeb,"GetSetProfile // enum '%s' !\n", p);
|
||||
@ -302,7 +302,7 @@ short GetPrivateProfileString (LPSTR AppName, LPSTR KeyName,
|
||||
{
|
||||
int v;
|
||||
|
||||
dprintf_profile(stddeb,"GetPrivateProfileString ('%s', '%s', '%s', %08X, %d, %s\n",
|
||||
dprintf_profile(stddeb,"GetPrivateProfileString ('%s', '%s', '%s', %p, %d, %s\n",
|
||||
AppName, KeyName, Default, ReturnedString, Size, FileName);
|
||||
v = GetSetProfile (0,AppName,KeyName,Default,ReturnedString,Size,FileName);
|
||||
if (AppName)
|
||||
|
@ -1175,7 +1175,7 @@ int do_int21(struct sigcontext_struct * context)
|
||||
case 0x0e: /* SELECT DEFAULT DRIVE */
|
||||
if (!DOS_ValidDrive(DL)) {
|
||||
Error (InvalidDrive, EC_MediaError, EL_Disk);
|
||||
return;
|
||||
break;
|
||||
} else {
|
||||
DOS_SetDefaultDrive(DL);
|
||||
AX = MAX_DOS_DRIVES;
|
||||
@ -1340,7 +1340,7 @@ int do_int21(struct sigcontext_struct * context)
|
||||
errno_to_doserr();
|
||||
AL = ExtendedError;
|
||||
SetCflag;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
Error(0,0,0);
|
||||
ResetCflag;
|
||||
|
@ -37,7 +37,7 @@ BOOL DPMI_SetDescriptor(HANDLE pmSel, LPDESCRIPTOR lpDesc);
|
||||
int do_int31(struct sigcontext_struct *context)
|
||||
{
|
||||
LPDESCRIPTOR lpDesc;
|
||||
dprintf_int(stddeb,"do_int31 // context->sc_eax=%04X\n",
|
||||
dprintf_int(stddeb,"do_int31 // context->sc_eax=%08lX\n",
|
||||
context->sc_eax);
|
||||
switch(context->sc_eax)
|
||||
{
|
||||
@ -82,7 +82,7 @@ BOOL DPMI_FreeSelector(HANDLE pmSel)
|
||||
|
||||
BOOL DPMI_SetDescriptor(HANDLE pmSel, LPDESCRIPTOR lpDesc)
|
||||
{
|
||||
dprintf_int(stdnimp,"DPMI_SetDescriptor(%04X, %08X); !\n",
|
||||
dprintf_int(stdnimp,"DPMI_SetDescriptor(%04X, %p); !\n",
|
||||
pmSel, lpDesc);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->Limit=%u \n", lpDesc->Limit);
|
||||
dprintf_int(stdnimp,"DPMI lpDesc->addr_lo=%04X \n", lpDesc->addr_lo);
|
||||
|
20
multimedia/Imakefile
Normal file
20
multimedia/Imakefile
Normal file
@ -0,0 +1,20 @@
|
||||
#include "../Wine.tmpl"
|
||||
|
||||
MODULE = multimedia
|
||||
|
||||
SRCS = \
|
||||
audio.c \
|
||||
mcianim.c \
|
||||
mcicda.c \
|
||||
midi.c \
|
||||
mmaux.c \
|
||||
mmsystem.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
|
||||
DependTarget()
|
||||
|
||||
includes::
|
||||
|
||||
install::
|
@ -304,7 +304,7 @@ DWORD WAVE_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
MCIWavDev[wDevID].nUseCount--;
|
||||
if (MCIWavDev[wDevID].nUseCount == 0) {
|
||||
if (MCIWavDev[wDevID].hFile != 0) {
|
||||
close(MCIWavDev[wDevID].hFile);
|
||||
mmioClose(MCIWavDev[wDevID].hFile, 0);
|
||||
MCIWavDev[wDevID].hFile = 0;
|
||||
}
|
||||
dwRet = wodMessage(0, WODM_CLOSE, 0, 0L, 0L);
|
||||
@ -358,7 +358,7 @@ DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
dprintf_mciwave(stddeb,"WAVE_mciPlay // process started ! return to caller...\n");
|
||||
dprintf_mciwave(stddeb,"WAVE_mciPlay // process started ! return to caller...\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -388,6 +388,7 @@ DWORD WAVE_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
dprintf_mciwave(stddeb,"WAVE_mciPlay // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
MCIWavDev[wDevID].wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
|
||||
exit(0);
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
@ -1135,6 +1136,37 @@ TryAGAIN:
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* wodGetVolume [internal]
|
||||
*/
|
||||
DWORD wodGetVolume(WORD wDevID, LPDWORD lpdwVol)
|
||||
{
|
||||
#ifdef linux
|
||||
int mixer;
|
||||
int volume;
|
||||
dprintf_mciwave(stddeb,"wodGetVolume(%u, %08X);\n", wDevID, lpdwVol);
|
||||
if (lpdwVol == NULL) return MMSYSERR_NOTENABLED;
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodGetVolume' // can't read volume !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
if ((mixer = open("/dev/mixer", O_RDONLY)) < 0) {
|
||||
fprintf(stderr, "Linux 'wodGetVolume' // mixer device not available !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
if (ioctl(mixer, SOUND_MIXER_READ_PCM, &volume) == -1) {
|
||||
fprintf(stderr,"Linux 'wodGetVolume' // unable read mixer !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
close(mixer);
|
||||
*lpdwVol = MAKELONG(volume, volume);
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* wodSetVolume [internal]
|
||||
*/
|
||||
@ -1142,19 +1174,19 @@ DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
|
||||
{
|
||||
#ifdef linux
|
||||
int mixer;
|
||||
int volume = 50;
|
||||
int volume;
|
||||
dprintf_mciwave(stddeb,"wodSetVolume(%u, %08X);\n", wDevID, dwParam);
|
||||
volume = LOWORD(dwParam);
|
||||
if (WOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'wodSetVolume' // can't set volume !\n");
|
||||
fprintf(stderr,"Linux 'wodSetVolume' // can't set volume !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
if ((mixer = open("/dev/mixer", O_RDWR)) < 0) {
|
||||
fprintf(stderr,
|
||||
"Linux 'wodSetVolume' // mixer device not available !\n");
|
||||
if ((mixer = open("/dev/mixer", O_WRONLY)) < 0) {
|
||||
fprintf(stderr, "Linux 'wodSetVolume' // mixer device not available !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
if (ioctl(mixer, SOUND_MIXER_WRITE_PCM, &volume) == -1) {
|
||||
fprintf(stderr,"Linux 'wodSetVolume' // unable set mixer !\n");
|
||||
fprintf(stderr,"Linux 'wodSetVolume' // unable set mixer !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
close(mixer);
|
||||
@ -1203,7 +1235,7 @@ DWORD wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
case WODM_SETPLAYBACKRATE:
|
||||
return 0L;
|
||||
case WODM_GETVOLUME:
|
||||
return 0L;
|
||||
return wodGetVolume(wDevID, (LPDWORD)dwParam1);
|
||||
case WODM_SETVOLUME:
|
||||
return wodSetVolume(wDevID, dwParam1);
|
||||
case WODM_RESTART:
|
||||
@ -1459,8 +1491,8 @@ DWORD widAddBuffer(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"widPrepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
dprintf_mciwave(stddeb,
|
||||
"widPrepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WInDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'widPrepare' // can't prepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
@ -1489,8 +1521,8 @@ DWORD widPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
DWORD widUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
|
||||
{
|
||||
#ifdef linux
|
||||
dprintf_mciwave(stddeb,
|
||||
"widUnprepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
dprintf_mciwave(stddeb,
|
||||
"widUnprepare(%u, %08X, %08X);\n", wDevID, lpWaveHdr, dwSize);
|
||||
if (WInDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'widUnprepare' // can't unprepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
@ -22,8 +22,9 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
#include "driver.h"
|
||||
#include "mmsystem.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_ANIM /* */
|
||||
/* #undef DEBUG_ANIM /* */
|
||||
/* #define DEBUG_MCIANIM /* */
|
||||
/* #undef DEBUG_MCIANIM /* */
|
||||
#define DEBUG_MCIANIM
|
||||
#include "debug.h"
|
||||
|
||||
#define MAX_ANIMDRV 2
|
||||
@ -69,6 +70,7 @@ DWORD ANIM_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
int cdrom;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciOpen(%08X, %08X);\n",
|
||||
dwFlags, lpParms);
|
||||
printf("ANIM_mciOpen(%08X, %08X);\n", dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
wDevID = lpParms->wDeviceID;
|
||||
if (AnimDev[wDevID].nUseCount > 0) {
|
||||
@ -86,6 +88,7 @@ DWORD ANIM_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
}
|
||||
if (dwFlags & MCI_OPEN_ELEMENT) {
|
||||
dprintf_mcianim(stddeb,"ANIM_mciOpen // MCI_OPEN_ELEMENT !\n");
|
||||
printf("ANIM_mciOpen // MCI_OPEN_ELEMENT !\n");
|
||||
/* return MCIERR_NO_ELEMENT_ALLOWED; */
|
||||
}
|
||||
memcpy(&AnimDev[wDevID].openParms, lpParms, sizeof(MCI_OPEN_PARMS));
|
||||
@ -416,6 +419,7 @@ DWORD ANIM_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
int start, end;
|
||||
dprintf_mcianim(stddeb,"ANIM_mciPlay(%u, %08X, %08X);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
printf("ANIM_mciPlay(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
start = 0; end = AnimDev[wDevID].dwTotalLen;
|
||||
AnimDev[wDevID].nCurTrack = 1;
|
@ -11,22 +11,28 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
|
||||
#ifdef BUILTIN_MMSYSTEM
|
||||
|
||||
#define DEBUG_MCIMIDI
|
||||
|
||||
#include "stdio.h"
|
||||
#include "win.h"
|
||||
#include "user.h"
|
||||
#include "driver.h"
|
||||
#include "mmsystem.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MIDI /* */
|
||||
/* #undef DEBUG_MIDI /* */
|
||||
|
||||
#define DEBUG_MIDI
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#include <linux/soundcard.h>
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
#define MIDI_DEV "/dev/midi"
|
||||
#define MIDI_DEV "/dev/sequencer"
|
||||
|
||||
#ifdef SOUND_VERSION
|
||||
#define IOCTL(a,b,c) ioctl(a,b,&c)
|
||||
@ -44,7 +50,7 @@ typedef struct {
|
||||
DWORD bufsize;
|
||||
MIDIOPENDESC midiDesc;
|
||||
WORD wFlags;
|
||||
MIDIHDR lpQueueHdr;
|
||||
LPMIDIHDR lpQueueHdr;
|
||||
DWORD dwTotalPlayed;
|
||||
} LINUX_MIDIIN;
|
||||
|
||||
@ -54,7 +60,7 @@ typedef struct {
|
||||
DWORD bufsize;
|
||||
MIDIOPENDESC midiDesc;
|
||||
WORD wFlags;
|
||||
MIDIHDR lpQueueHdr;
|
||||
LPMIDIHDR lpQueueHdr;
|
||||
DWORD dwTotalPlayed;
|
||||
} LINUX_MIDIOUT;
|
||||
|
||||
@ -64,6 +70,11 @@ typedef struct {
|
||||
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
|
||||
HANDLE hCallback; /* Callback handle for pending notification */
|
||||
HMMIO hFile; /* mmio file handle open as Element */
|
||||
DWORD dwBeginData;
|
||||
DWORD dwTotalLen;
|
||||
WORD wFormat;
|
||||
WORD nTracks;
|
||||
WORD nTempo;
|
||||
MCI_OPEN_PARMS openParms;
|
||||
MIDIHDR MidiHdr;
|
||||
WORD dwStatus;
|
||||
@ -86,6 +97,17 @@ DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms);
|
||||
DWORD MIDI_mciGetDevCaps(UINT wDevID, DWORD dwFlags, LPMCI_GETDEVCAPS_PARMS lpParms);
|
||||
DWORD MIDI_mciInfo(UINT wDevID, DWORD dwFlags, LPMCI_INFO_PARMS lpParms);
|
||||
|
||||
DWORD modOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags);
|
||||
DWORD modClose(WORD wDevID);
|
||||
DWORD modGetDevCaps(WORD wDevID, LPMIDIOUTCAPS lpCaps, DWORD dwSize);
|
||||
DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize);
|
||||
DWORD modUnprepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize);
|
||||
DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize);
|
||||
DWORD modData(WORD wDevID, DWORD dwParam);
|
||||
|
||||
DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags);
|
||||
DWORD midClose(WORD wDevID);
|
||||
DWORD midGetDevCaps(WORD wDevID, LPMIDIINCAPS lpCaps, DWORD dwSize);
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_NotifyClient [internal]
|
||||
@ -169,6 +191,152 @@ LRESULT MIDI_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_ReadByte [internal]
|
||||
*/
|
||||
DWORD MIDI_ReadByte(UINT wDevID, BYTE FAR *lpbyt)
|
||||
{
|
||||
if (lpbyt != NULL) {
|
||||
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)lpbyt,
|
||||
(long) sizeof(BYTE)) == (long) sizeof(BYTE)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
printf("MIDI_ReadByte // error reading wDevID=%d \n", wDevID);
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_ReadWord [internal]
|
||||
*/
|
||||
DWORD MIDI_ReadWord(UINT wDevID, LPWORD lpw)
|
||||
{
|
||||
BYTE hibyte, lobyte;
|
||||
if (lpw != NULL) {
|
||||
if (MIDI_ReadByte(wDevID, &hibyte) == 0) {
|
||||
if (MIDI_ReadByte(wDevID, &lobyte) == 0) {
|
||||
*lpw = ((WORD)hibyte << 8) + lobyte;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("MIDI_ReadWord // error reading wDevID=%d \n", wDevID);
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_ReadLong [internal]
|
||||
*/
|
||||
DWORD MIDI_ReadLong(UINT wDevID, LPDWORD lpdw)
|
||||
{
|
||||
WORD hiword, loword;
|
||||
BYTE hibyte, lobyte;
|
||||
if (lpdw != NULL) {
|
||||
if (MIDI_ReadWord(wDevID, &hiword) == 0) {
|
||||
if (MIDI_ReadWord(wDevID, &loword) == 0) {
|
||||
*lpdw = MAKELONG(loword, hiword);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("MIDI_ReadLong // error reading wDevID=%d \n", wDevID);
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_ReadVaryLen [internal]
|
||||
*/
|
||||
DWORD MIDI_ReadVaryLen(UINT wDevID, LPDWORD lpdw)
|
||||
{
|
||||
BYTE byte;
|
||||
DWORD value;
|
||||
if (lpdw == NULL) return MCIERR_INTERNAL;
|
||||
if (MIDI_ReadByte(wDevID, &byte) != 0) {
|
||||
printf("MIDI_ReadVaryLen // error reading wDevID=%d \n", wDevID);
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
value = (DWORD)(byte & 0x7F);
|
||||
while (byte & 0x80) {
|
||||
if (MIDI_ReadByte(wDevID, &byte) != 0) {
|
||||
printf("MIDI_ReadVaryLen // error reading wDevID=%d \n", wDevID);
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
value = (value << 7) + (byte & 0x7F);
|
||||
}
|
||||
*lpdw = value;
|
||||
/*
|
||||
printf("MIDI_ReadVaryLen // val=%08lX \n", value);
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_ReadMThd [internal]
|
||||
*/
|
||||
DWORD MIDI_ReadMThd(UINT wDevID, DWORD dwOffset)
|
||||
{
|
||||
DWORD toberead;
|
||||
FOURCC fourcc;
|
||||
dprintf_midi(stddeb, "MIDI_ReadMThd(%04X, %08X);\n", wDevID, dwOffset);
|
||||
if (mmioSeek(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
|
||||
printf("MIDI_ReadMThd // can't seek at %08X begin of 'MThd' \n", dwOffset);
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
|
||||
(long) sizeof(FOURCC)) != (long) sizeof(FOURCC)) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
if (MIDI_ReadLong(wDevID, &toberead) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
if (MIDI_ReadWord(wDevID, &MCIMidiDev[wDevID].wFormat) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
if (MIDI_ReadWord(wDevID, &MCIMidiDev[wDevID].nTracks) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
if (MIDI_ReadWord(wDevID, &MCIMidiDev[wDevID].nTempo) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
printf("MIDI_ReadMThd // toberead=%08X, wFormat=%04X nTracks=%04X nTempo=%04X\n",
|
||||
toberead, MCIMidiDev[wDevID].wFormat,
|
||||
MCIMidiDev[wDevID].nTracks,
|
||||
MCIMidiDev[wDevID].nTempo);
|
||||
toberead -= 3 * sizeof(WORD);
|
||||
/*
|
||||
ntrks = read16bit ();
|
||||
Mf_division = division = read16bit ();
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
DWORD MIDI_ReadMTrk(UINT wDevID, DWORD dwOffset)
|
||||
{
|
||||
DWORD toberead;
|
||||
FOURCC fourcc;
|
||||
if (mmioSeek(MCIMidiDev[wDevID].hFile, dwOffset, SEEK_SET) != dwOffset) {
|
||||
printf("MIDI_ReadMTrk // can't seek at %08X begin of 'MThd' \n", dwOffset);
|
||||
}
|
||||
if (mmioRead(MCIMidiDev[wDevID].hFile, (HPSTR)&fourcc,
|
||||
(long) sizeof(FOURCC)) != (long) sizeof(FOURCC)) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
if (MIDI_ReadLong(wDevID, &toberead) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
printf("MIDI_ReadMTrk // toberead=%08X\n", toberead);
|
||||
toberead -= 3 * sizeof(WORD);
|
||||
MCIMidiDev[wDevID].dwTotalLen = toberead;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* MIDI_mciOpen [internal]
|
||||
*/
|
||||
@ -180,9 +348,11 @@ DWORD MIDI_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
OFSTRUCT OFstruct;
|
||||
MIDIOPENDESC MidiDesc;
|
||||
DWORD dwRet;
|
||||
DWORD dwOffset;
|
||||
char str[128];
|
||||
LPSTR ptr;
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
DWORD toberead;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciOpen(%08X, %08X)\n", dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
@ -221,6 +391,8 @@ DWORD MIDI_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
memcpy(&MCIMidiDev[wDevID].openParms, lpParms, sizeof(MCI_OPEN_PARMS));
|
||||
MCIMidiDev[wDevID].wNotifyDeviceID = lpParms->wDeviceID;
|
||||
MCIMidiDev[wDevID].dwStatus = MCI_MODE_STOP;
|
||||
MCIMidiDev[wDevID].dwBeginData = 0;
|
||||
MCIMidiDev[wDevID].dwTotalLen = 0;
|
||||
MidiDesc.hMidi = 0;
|
||||
if (MCIMidiDev[wDevID].hFile != 0) {
|
||||
MMCKINFO mmckInfo;
|
||||
@ -228,21 +400,32 @@ DWORD MIDI_mciOpen(DWORD dwFlags, LPMCI_OPEN_PARMS lpParms)
|
||||
if (mmioDescend(MCIMidiDev[wDevID].hFile, &ckMainRIFF, NULL, 0) != 0) {
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciOpen // ParentChunk ckid=%.4s fccType=%.4s cksize=%08lX \n",
|
||||
(LPSTR)&ckMainRIFF.ckid, (LPSTR)&ckMainRIFF.fccType,
|
||||
ckMainRIFF.cksize);
|
||||
#endif
|
||||
if (ckMainRIFF.ckid != FOURCC_RIFF) return MCIERR_INTERNAL;
|
||||
if (ckMainRIFF.fccType != mmioFOURCC('R', 'M', 'I', 'D') &&
|
||||
ckMainRIFF.fccType != mmioFOURCC('M', 'T', 'h', 'd')) {
|
||||
dwOffset = 0;
|
||||
if (ckMainRIFF.ckid == mmioFOURCC('R', 'M', 'I', 'D')) {
|
||||
printf("MIDI_mciOpen // is a 'RMID' file \n");
|
||||
dwOffset = ckMainRIFF.dwDataOffset;
|
||||
}
|
||||
if (ckMainRIFF.ckid != mmioFOURCC('M', 'T', 'h', 'd')) {
|
||||
printf("MIDI_mciOpen // unknown format !\n");
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
mmckInfo.ckid = mmioFOURCC('d', 'a', 't', 'a');
|
||||
if (mmioDescend(MCIMidiDev[wDevID].hFile, &mmckInfo, &ckMainRIFF, MMIO_FINDCHUNK) != 0) {
|
||||
if (MIDI_ReadMThd(wDevID, dwOffset) != 0) {
|
||||
printf("MIDI_mciOpen // can't read 'MThd' header \n");
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
dwOffset = mmioSeek(MCIMidiDev[wDevID].hFile, 0, SEEK_CUR);
|
||||
if (MIDI_ReadMTrk(wDevID, dwOffset) != 0) {
|
||||
printf("MIDI_mciOpen // can't read 'MTrk' header \n");
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
dwOffset = mmioSeek(MCIMidiDev[wDevID].hFile, 0, SEEK_CUR);
|
||||
MCIMidiDev[wDevID].dwBeginData = dwOffset;
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciOpen // Chunk Found ckid=%.4s fccType=%.4s cksize=%08lX \n",
|
||||
(LPSTR)&mmckInfo.ckid, (LPSTR)&mmckInfo.fccType,
|
||||
mmckInfo.cksize);
|
||||
@ -264,7 +447,7 @@ DWORD MIDI_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
DWORD dwRet;
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciClose(%u, %08X, %08X);\n", wDevID, dwParam, lpParms);
|
||||
#endif
|
||||
if (MCIMidiDev[wDevID].dwStatus != MCI_MODE_STOP) {
|
||||
@ -274,8 +457,9 @@ DWORD MIDI_mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
MCIMidiDev[wDevID].nUseCount--;
|
||||
if (MCIMidiDev[wDevID].nUseCount == 0) {
|
||||
if (MCIMidiDev[wDevID].hFile != 0) {
|
||||
close(MCIMidiDev[wDevID].hFile);
|
||||
mmioClose(MCIMidiDev[wDevID].hFile, 0);
|
||||
MCIMidiDev[wDevID].hFile = 0;
|
||||
printf("MIDI_mciClose // hFile closed !\n");
|
||||
}
|
||||
dwRet = modMessage(0, MODM_CLOSE, 0, 0L, 0L);
|
||||
if (dwRet != MMSYSERR_NOERROR) return MCIERR_INTERNAL;
|
||||
@ -298,8 +482,10 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
int count;
|
||||
int start, end;
|
||||
LPMIDIHDR lpMidiHdr;
|
||||
DWORD dwData;
|
||||
LPWORD ptr;
|
||||
DWORD dwRet;
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPlay(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (MCIMidiDev[wDevID].hFile == 0) {
|
||||
@ -333,8 +519,9 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
}
|
||||
/**/
|
||||
lpMidiHdr = &MCIMidiDev[wDevID].MidiHdr;
|
||||
lpMidiHdr->lpData = (LPSTR) malloc(64000);
|
||||
lpMidiHdr->dwBufferLength = 32000;
|
||||
lpMidiHdr->lpData = (LPSTR) malloc(1200);
|
||||
if (lpMidiHdr->lpData == NULL) return MCIERR_INTERNAL;
|
||||
lpMidiHdr->dwBufferLength = 1024;
|
||||
lpMidiHdr->dwUser = 0L;
|
||||
lpMidiHdr->dwFlags = 0L;
|
||||
dwRet = modMessage(0, MODM_PREPARE, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR));
|
||||
@ -343,14 +530,21 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
while(MCIMidiDev[wDevID].dwStatus != MCI_MODE_STOP) {
|
||||
printf("MIDI_mciPlay // MCIMidiDev[wDevID].dwStatus=%p %d\n",
|
||||
&MCIMidiDev[wDevID].dwStatus, MCIMidiDev[wDevID].dwStatus);
|
||||
ptr = (LPWORD)lpMidiHdr->lpData;
|
||||
for (count = 0; count < lpMidiHdr->dwBufferLength; count++) {
|
||||
if (MIDI_ReadVaryLen(wDevID, &dwData) != 0) break;
|
||||
*ptr = LOWORD(dwData);
|
||||
}
|
||||
/*
|
||||
count = mmioRead(MCIMidiDev[wDevID].hFile, lpMidiHdr->lpData, lpMidiHdr->dwBufferLength);
|
||||
*/
|
||||
if (count < 1) break;
|
||||
lpMidiHdr->dwBytesRecorded = count;
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPlay // before MODM_LONGDATA lpMidiHdr=%08X dwBytesRecorded=%u\n",
|
||||
lpMidiHdr, lpMidiHdr->dwBytesRecorded);
|
||||
#endif
|
||||
/* dwRet = modMessage(0, MODM_LONGDATA, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR)); */
|
||||
dwRet = modMessage(0, MODM_LONGDATA, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR));
|
||||
}
|
||||
dwRet = modMessage(0, MODM_UNPREPARE, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR));
|
||||
if (lpMidiHdr->lpData != NULL) {
|
||||
@ -359,7 +553,7 @@ DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
|
||||
}
|
||||
MCIMidiDev[wDevID].dwStatus = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPlay // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
#endif
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
@ -383,7 +577,7 @@ DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
||||
int start, end;
|
||||
LPMIDIHDR lpMidiHdr;
|
||||
DWORD dwRet;
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciRecord(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (MCIMidiDev[wDevID].hFile == 0) {
|
||||
@ -401,8 +595,8 @@ DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
||||
printf("MIDI_mciRecord // MCI_TO=%d \n", end);
|
||||
}
|
||||
lpMidiHdr = &MCIMidiDev[wDevID].MidiHdr;
|
||||
lpMidiHdr->lpData = (LPSTR) malloc(64000);
|
||||
lpMidiHdr->dwBufferLength = 32000;
|
||||
lpMidiHdr->lpData = (LPSTR) malloc(1200);
|
||||
lpMidiHdr->dwBufferLength = 1024;
|
||||
lpMidiHdr->dwUser = 0L;
|
||||
lpMidiHdr->dwFlags = 0L;
|
||||
dwRet = midMessage(0, MIDM_PREPARE, 0, (DWORD)lpMidiHdr, sizeof(MIDIHDR));
|
||||
@ -426,7 +620,7 @@ DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
||||
}
|
||||
MCIMidiDev[wDevID].dwStatus = MCI_MODE_STOP;
|
||||
if (dwFlags & MCI_NOTIFY) {
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciRecord // MCI_NOTIFY_SUCCESSFUL %08X !\n", lpParms->dwCallback);
|
||||
#endif
|
||||
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
|
||||
@ -445,7 +639,7 @@ DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpParms)
|
||||
DWORD MIDI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciStop(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
@ -465,7 +659,7 @@ DWORD MIDI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
DWORD MIDI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciPause(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
@ -482,7 +676,7 @@ DWORD MIDI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciResume(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
@ -499,11 +693,11 @@ DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms)
|
||||
DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciSet(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciSet // dwTimeFormat=%08X\n", lpParms->dwTimeFormat);
|
||||
printf("MIDI_mciSet // dwAudio=%08X\n", lpParms->dwAudio);
|
||||
#endif
|
||||
@ -569,7 +763,7 @@ DWORD MIDI_mciSet(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
|
||||
DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParms)
|
||||
{
|
||||
#ifdef linux
|
||||
#ifdef DEBUG_MCIMIDI
|
||||
#ifdef DEBUG_MIDI
|
||||
printf("MIDI_mciStatus(%u, %08X, %08X);\n", wDevID, dwFlags, lpParms);
|
||||
#endif
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
@ -748,8 +942,54 @@ DWORD midGetDevCaps(WORD wDevID, LPMIDIINCAPS lpCaps, DWORD dwSize)
|
||||
*/
|
||||
DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
||||
{
|
||||
printf("modOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
#ifdef linux
|
||||
int midi;
|
||||
dprintf_midi(stddeb,
|
||||
"midOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
if (lpDesc == NULL) {
|
||||
fprintf(stderr,"Linux 'midOpen' // Invalid Parameter !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
if (wDevID >= MAX_MIDIINDRV) {
|
||||
fprintf(stderr,"Linux 'midOpen' // MAX_MIDIINDRV reached !\n");
|
||||
return MMSYSERR_ALLOCATED;
|
||||
}
|
||||
MidiInDev[wDevID].unixdev = 0;
|
||||
midi = open (MIDI_DEV, O_RDONLY, 0);
|
||||
if (midi == -1) {
|
||||
fprintf(stderr,"Linux 'midOpen' // can't open !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
MidiInDev[wDevID].wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
|
||||
switch(MidiInDev[wDevID].wFlags) {
|
||||
case DCB_NULL:
|
||||
fprintf(stderr,"Linux 'midOpen' // CALLBACK_NULL !\n");
|
||||
break;
|
||||
case DCB_WINDOW:
|
||||
dprintf_midi(stddeb,
|
||||
"Linux 'midOpen' // CALLBACK_WINDOW !\n");
|
||||
break;
|
||||
case DCB_TASK:
|
||||
dprintf_midi(stddeb,
|
||||
"Linux 'midOpen' // CALLBACK_TASK !\n");
|
||||
break;
|
||||
case DCB_FUNCTION:
|
||||
dprintf_midi(stddeb,
|
||||
"Linux 'midOpen' // CALLBACK_FUNCTION !\n");
|
||||
break;
|
||||
}
|
||||
MidiInDev[wDevID].lpQueueHdr = NULL;
|
||||
MidiInDev[wDevID].unixdev = midi;
|
||||
MidiInDev[wDevID].dwTotalPlayed = 0;
|
||||
MidiInDev[wDevID].bufsize = 0x3FFF;
|
||||
if (MIDI_NotifyClient(wDevID, MIM_OPEN, 0L, 0L) != MMSYSERR_NOERROR) {
|
||||
fprintf(stderr,"Linux 'midOpen' // can't notify client !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -757,8 +997,23 @@ DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
||||
*/
|
||||
DWORD midClose(WORD wDevID)
|
||||
{
|
||||
printf("midClose(%u);\n", wDevID);
|
||||
#ifdef linux
|
||||
dprintf_midi(stddeb,"midClose(%u);\n", wDevID);
|
||||
if (MidiInDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'midClose' // can't close !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
close(MidiInDev[wDevID].unixdev);
|
||||
MidiInDev[wDevID].unixdev = 0;
|
||||
MidiInDev[wDevID].bufsize = 0;
|
||||
if (MIDI_NotifyClient(wDevID, MIM_CLOSE, 0L, 0L) != MMSYSERR_NOERROR) {
|
||||
fprintf(stderr,"Linux 'midClose' // can't notify client !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -871,8 +1126,56 @@ DWORD modGetDevCaps(WORD wDevID, LPMIDIOUTCAPS lpCaps, DWORD dwSize)
|
||||
*/
|
||||
DWORD modOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
||||
{
|
||||
printf("modOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
#ifdef linux
|
||||
int midi;
|
||||
dprintf_midi(stddeb,
|
||||
"modOpen(%u, %08X, %08X);\n", wDevID, lpDesc, dwFlags);
|
||||
if (lpDesc == NULL) {
|
||||
fprintf(stderr,"Linux 'modOpen' // Invalid Parameter !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
if (wDevID >= MAX_MIDIOUTDRV) {
|
||||
fprintf(stderr,"Linux 'modOpen' // MAX_MIDIOUTDRV reached !\n");
|
||||
return MMSYSERR_ALLOCATED;
|
||||
}
|
||||
MidiOutDev[wDevID].unixdev = 0;
|
||||
midi = open (MIDI_DEV, O_WRONLY, 0);
|
||||
if (midi == -1) {
|
||||
fprintf(stderr,"Linux 'modOpen' // can't open !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
MidiOutDev[wDevID].wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
|
||||
switch(MidiOutDev[wDevID].wFlags) {
|
||||
case DCB_NULL:
|
||||
fprintf(stderr,"Linux 'modOpen' // CALLBACK_NULL !\n");
|
||||
break;
|
||||
case DCB_WINDOW:
|
||||
dprintf_midi(stddeb,
|
||||
"Linux 'modOpen' // CALLBACK_WINDOW !\n");
|
||||
break;
|
||||
case DCB_TASK:
|
||||
dprintf_midi(stddeb,
|
||||
"Linux 'modOpen' // CALLBACK_TASK !\n");
|
||||
break;
|
||||
case DCB_FUNCTION:
|
||||
dprintf_midi(stddeb,
|
||||
"Linux 'modOpen' // CALLBACK_FUNCTION !\n");
|
||||
break;
|
||||
}
|
||||
MidiOutDev[wDevID].lpQueueHdr = NULL;
|
||||
MidiOutDev[wDevID].unixdev = midi;
|
||||
MidiOutDev[wDevID].dwTotalPlayed = 0;
|
||||
MidiOutDev[wDevID].bufsize = 0x3FFF;
|
||||
if (MIDI_NotifyClient(wDevID, MOM_OPEN, 0L, 0L) != MMSYSERR_NOERROR) {
|
||||
fprintf(stderr,"Linux 'modOpen' // can't notify client !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
dprintf_midi(stddeb,
|
||||
"Linux 'modOpen' // Succesful unixdev=%d !\n", midi);
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -881,16 +1184,43 @@ DWORD modOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
|
||||
*/
|
||||
DWORD modClose(WORD wDevID)
|
||||
{
|
||||
printf("modClose(%u);\n", wDevID);
|
||||
#ifdef linux
|
||||
dprintf_midi(stddeb,"modClose(%u);\n", wDevID);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modClose' // can't close !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
close(MidiOutDev[wDevID].unixdev);
|
||||
MidiOutDev[wDevID].unixdev = 0;
|
||||
MidiOutDev[wDevID].bufsize = 0;
|
||||
if (MIDI_NotifyClient(wDevID, MOM_CLOSE, 0L, 0L) != MMSYSERR_NOERROR) {
|
||||
fprintf(stderr,"Linux 'modClose' // can't notify client !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* modData [internal]
|
||||
*/
|
||||
DWORD modData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
DWORD modData(WORD wDevID, DWORD dwParam)
|
||||
{
|
||||
printf("modData(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
WORD event;
|
||||
dprintf_midi(stddeb,
|
||||
"modData(%u, %08X);\n", wDevID, dwParam);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modData' // can't play !\n");
|
||||
return MIDIERR_NODEVICE;
|
||||
}
|
||||
event = LOWORD(dwParam);
|
||||
if (write (MidiOutDev[wDevID].unixdev,
|
||||
&event, sizeof(WORD)) != sizeof(WORD)) {
|
||||
dprintf_midi(stddeb,
|
||||
"modData() // error writting unixdev !\n");
|
||||
}
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
|
||||
@ -899,8 +1229,49 @@ DWORD modData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
*/
|
||||
DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
{
|
||||
#ifdef linux
|
||||
int count;
|
||||
LPWORD ptr;
|
||||
dprintf_midi(stddeb,
|
||||
"modLongData(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
printf("modLongData(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modLongData' // can't play !\n");
|
||||
return MIDIERR_NODEVICE;
|
||||
}
|
||||
if (lpMidiHdr->lpData == NULL) return MIDIERR_UNPREPARED;
|
||||
if (!(lpMidiHdr->dwFlags & MHDR_PREPARED)) return MIDIERR_UNPREPARED;
|
||||
if (lpMidiHdr->dwFlags & MHDR_INQUEUE) return MIDIERR_STILLPLAYING;
|
||||
lpMidiHdr->dwFlags &= ~MHDR_DONE;
|
||||
lpMidiHdr->dwFlags |= MHDR_INQUEUE;
|
||||
dprintf_midi(stddeb,
|
||||
"modLongData() // dwBytesRecorded %u !\n", lpMidiHdr->dwBytesRecorded);
|
||||
/*
|
||||
count = write (MidiOutDev[wDevID].unixdev,
|
||||
lpMidiHdr->lpData, lpMidiHdr->dwBytesRecorded);
|
||||
*/
|
||||
ptr = (LPWORD)lpMidiHdr->lpData;
|
||||
for (count = 0; count < lpMidiHdr->dwBytesRecorded; count++) {
|
||||
if (write (MidiOutDev[wDevID].unixdev, ptr,
|
||||
sizeof(WORD)) != sizeof(WORD)) break;
|
||||
ptr++;
|
||||
}
|
||||
if (count != lpMidiHdr->dwBytesRecorded) {
|
||||
dprintf_midi(stddeb,
|
||||
"modLongData() // error writting unixdev #%d ! (%d != %d)\n",
|
||||
MidiOutDev[wDevID].unixdev, count, lpMidiHdr->dwBytesRecorded);
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
|
||||
lpMidiHdr->dwFlags |= MHDR_DONE;
|
||||
if (MIDI_NotifyClient(wDevID, MOM_DONE, 0L, 0L) != MMSYSERR_NOERROR) {
|
||||
fprintf(stderr,"Linux 'modLongData' // can't notify client !\n");
|
||||
return MMSYSERR_INVALPARAM;
|
||||
}
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -908,8 +1279,26 @@ DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
*/
|
||||
DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
{
|
||||
printf("modPrepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
#ifdef linux
|
||||
dprintf_midi(stddeb,
|
||||
"modPrepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modPrepare' // can't prepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
if (MidiOutDev[wDevID].lpQueueHdr != NULL) {
|
||||
fprintf(stderr,"Linux 'modPrepare' // already prepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
MidiOutDev[wDevID].dwTotalPlayed = 0;
|
||||
MidiOutDev[wDevID].lpQueueHdr = lpMidiHdr;
|
||||
if (lpMidiHdr->dwFlags & MHDR_INQUEUE) return MIDIERR_STILLPLAYING;
|
||||
lpMidiHdr->dwFlags |= MHDR_PREPARED;
|
||||
lpMidiHdr->dwFlags &= ~MHDR_DONE;
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -917,8 +1306,17 @@ DWORD modPrepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
*/
|
||||
DWORD modUnprepare(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
|
||||
{
|
||||
printf("modUnprepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
#ifdef linux
|
||||
dprintf_midi(stddeb,
|
||||
"modUnprepare(%u, %08X, %08X);\n", wDevID, lpMidiHdr, dwSize);
|
||||
if (MidiOutDev[wDevID].unixdev == 0) {
|
||||
fprintf(stderr,"Linux 'modUnprepare' // can't unprepare !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
return MMSYSERR_NOERROR;
|
||||
#else
|
||||
return MMSYSERR_NOTENABLED;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -955,7 +1353,7 @@ DWORD modMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
|
||||
case MODM_CLOSE:
|
||||
return modClose(wDevID);
|
||||
case MODM_DATA:
|
||||
return modData(wDevID, (LPMIDIHDR)dwParam1, dwParam2);
|
||||
return modData(wDevID, dwParam1);
|
||||
case MODM_LONGDATA:
|
||||
return modLongData(wDevID, (LPMIDIHDR)dwParam1, dwParam2);
|
||||
case MODM_PREPARE:
|
@ -119,13 +119,41 @@ DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
|
||||
#ifdef linux
|
||||
int mixer;
|
||||
int volume;
|
||||
int cmd;
|
||||
printf("AUX_GetVolume(%u, %08X);\n", wDevID, lpdwVol);
|
||||
if (lpdwVol == NULL) return MMSYSERR_NOTENABLED;
|
||||
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
|
||||
printf("Linux 'AUX_GetVolume' // mixer device not available !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
if (ioctl(mixer, SOUND_MIXER_READ_LINE, &volume) == -1) {
|
||||
switch(wDevID) {
|
||||
case 0:
|
||||
printf("Linux 'AUX_GetVolume' // SOUND_MIXER_READ_PCM !\n");
|
||||
cmd = SOUND_MIXER_READ_PCM;
|
||||
break;
|
||||
case 1:
|
||||
printf("Linux 'AUX_GetVolume' // SOUND_MIXER_READ_SYNTH !\n");
|
||||
cmd = SOUND_MIXER_READ_SYNTH;
|
||||
break;
|
||||
case 2:
|
||||
printf("Linux 'AUX_GetVolume' // SOUND_MIXER_READ_CD !\n");
|
||||
cmd = SOUND_MIXER_READ_CD;
|
||||
break;
|
||||
case 3:
|
||||
printf("Linux 'AUX_GetVolume' // SOUND_MIXER_READ_LINE !\n");
|
||||
cmd = SOUND_MIXER_READ_LINE;
|
||||
break;
|
||||
case 4:
|
||||
printf("Linux 'AUX_GetVolume' // SOUND_MIXER_READ_MIC !\n");
|
||||
cmd = SOUND_MIXER_READ_MIC;
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
printf("Linux 'AUX_GetVolume' // SOUND_MIXER_READ_VOLUME !\n");
|
||||
cmd = SOUND_MIXER_READ_VOLUME;
|
||||
break;
|
||||
}
|
||||
if (ioctl(mixer, cmd, &volume) == -1) {
|
||||
printf("Linux 'AUX_GetVolume' // unable read mixer !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
@ -144,13 +172,42 @@ DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
|
||||
{
|
||||
#ifdef linux
|
||||
int mixer;
|
||||
int volume = 50;
|
||||
int volume;
|
||||
int cmd;
|
||||
printf("AUX_SetVolume(%u, %08X);\n", wDevID, dwParam);
|
||||
volume = LOWORD(dwParam);
|
||||
if ((mixer = open(MIXER_DEV, O_RDWR)) < 0) {
|
||||
printf("Linux 'AUX_SetVolume' // mixer device not available !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
||||
if (ioctl(mixer, SOUND_MIXER_WRITE_LINE, &volume) == -1) {
|
||||
switch(wDevID) {
|
||||
case 0:
|
||||
printf("Linux 'AUX_SetVolume' // SOUND_MIXER_WRITE_PCM !\n");
|
||||
cmd = SOUND_MIXER_WRITE_PCM;
|
||||
break;
|
||||
case 1:
|
||||
printf("Linux 'AUX_SetVolume' // SOUND_MIXER_WRITE_SYNTH !\n");
|
||||
cmd = SOUND_MIXER_WRITE_SYNTH;
|
||||
break;
|
||||
case 2:
|
||||
printf("Linux 'AUX_SetVolume' // SOUND_MIXER_WRITE_CD !\n");
|
||||
cmd = SOUND_MIXER_WRITE_CD;
|
||||
break;
|
||||
case 3:
|
||||
printf("Linux 'AUX_SetVolume' // SOUND_MIXER_WRITE_LINE !\n");
|
||||
cmd = SOUND_MIXER_WRITE_LINE;
|
||||
break;
|
||||
case 4:
|
||||
printf("Linux 'AUX_SetVolume' // SOUND_MIXER_WRITE_MIC !\n");
|
||||
cmd = SOUND_MIXER_WRITE_MIC;
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
printf("Linux 'AUX_SetVolume' // SOUND_MIXER_WRITE_VOLUME !\n");
|
||||
cmd = SOUND_MIXER_WRITE_VOLUME;
|
||||
break;
|
||||
}
|
||||
if (ioctl(mixer, cmd, &volume) == -1) {
|
||||
printf("Linux 'AUX_SetVolume' // unable set mixer !\n");
|
||||
return MMSYSERR_NOTENABLED;
|
||||
}
|
@ -53,6 +53,14 @@ UINT WINAPI waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
LRESULT DrvDefDriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
|
||||
LRESULT WAVE_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
LRESULT MIDI_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
LRESULT CDAUDIO_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
LRESULT ANIM_DriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
|
||||
/**************************************************************************
|
||||
* MMSYSTEM_WEP [MMSYSTEM.1]
|
||||
@ -708,6 +716,10 @@ DWORD mciClose(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParms)
|
||||
dwRet = MIDI_DriverProc(mciDrv[wDevID].wDeviceID, 0,
|
||||
MCI_CLOSE, dwParam, (DWORD)lpParms);
|
||||
break;
|
||||
case MCI_DEVTYPE_ANIMATION:
|
||||
dwRet = ANIM_DriverProc(mciDrv[wDevID].wDeviceID, 0,
|
||||
MCI_CLOSE, dwParam, (DWORD)lpParms);
|
||||
break;
|
||||
default:
|
||||
printf("mciClose() // unknown type=%04X !\n", mciDrv[wDevID].wType);
|
||||
}
|
||||
@ -756,6 +768,9 @@ DWORD mciSendCommand(UINT wDevID, UINT wMsg, DWORD dwParam1, DWORD dwParam2)
|
||||
case MCI_DEVTYPE_SEQUENCER:
|
||||
return MIDI_DriverProc(mciDrv[wDevID].wDeviceID, hDrv,
|
||||
wMsg, dwParam1, dwParam2);
|
||||
case MCI_DEVTYPE_ANIMATION:
|
||||
return ANIM_DriverProc(mciDrv[wDevID].wDeviceID, hDrv,
|
||||
wMsg, dwParam1, dwParam2);
|
||||
default:
|
||||
printf("mciSendCommand() // unknown type=%04X !\n",
|
||||
mciDrv[wDevID].wType);
|
||||
@ -1691,6 +1706,7 @@ UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn,
|
||||
hWaveIn, lpWaveInHdr, uSize);
|
||||
lpDesc = (LPWAVEOPENDESC) GlobalLock(hWaveIn);
|
||||
if (lpDesc == NULL) return MMSYSERR_INVALHANDLE;
|
||||
if (lpWaveInHdr == NULL) return MMSYSERR_INVALHANDLE;
|
||||
USER_HEAP_FREE(HIWORD((DWORD)lpWaveInHdr->lpData));
|
||||
lpWaveInHdr->lpData = NULL;
|
||||
lpWaveInHdr->lpNext = NULL;
|
||||
@ -2039,7 +2055,10 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin)
|
||||
LPMMIOINFO lpmminfo;
|
||||
printf("mmioSeek(%04X, %08X, %d);\n", hmmio, lOffset, iOrigin);
|
||||
lpmminfo = (LPMMIOINFO)GlobalLock(hmmio);
|
||||
if (lpmminfo == NULL) return 0;
|
||||
if (lpmminfo == NULL) {
|
||||
printf("mmioSeek // can't lock hmmio=%04X !\n", hmmio);
|
||||
return 0;
|
||||
}
|
||||
count = _llseek(LOWORD(lpmminfo->dwReserved2), lOffset, iOrigin);
|
||||
GlobalUnlock(hmmio);
|
||||
return count;
|
@ -26,6 +26,47 @@ extern Colormap COLOR_WinColormap;
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BITBLT_GetImage
|
||||
*/
|
||||
static XImage *BITBLT_GetImage( HDC hdc, int x, int y, int width, int height )
|
||||
{
|
||||
XImage *image;
|
||||
RECT rect;
|
||||
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
|
||||
|
||||
GetClipBox( hdc, &rect );
|
||||
OffsetRect( &rect, dc->w.DCOrgX, dc->w.DCOrgY );
|
||||
if ((x >= rect.left) && (y >= rect.top)
|
||||
&& (x+width < rect.right) && (y+height < rect.bottom))
|
||||
{
|
||||
image = XGetImage( display, dc->u.x.drawable, x, y, width, height,
|
||||
AllPlanes, ZPixmap );
|
||||
}
|
||||
else /* Get only the visible sub-image */
|
||||
{
|
||||
int width_bytes = ((dc->w.bitsPerPixel == 24 ? 32 : dc->w.bitsPerPixel)
|
||||
* width + 31) / 32 * 4;
|
||||
char *data = malloc( height * width_bytes );
|
||||
image = XCreateImage( display, DefaultVisualOfScreen(screen),
|
||||
dc->w.bitsPerPixel, ZPixmap, 0, data,
|
||||
width, height, 32, width_bytes );
|
||||
if (image && !IsRectEmpty(&rect))
|
||||
{
|
||||
int x1, y1, x2, y2;
|
||||
x1 = max( x, rect.left );
|
||||
y1 = max( y, rect.top );
|
||||
x2 = min( x + width, rect.right );
|
||||
y2 = min( y + height, rect.bottom );
|
||||
if ((x1 < x2) && (y1 < y2))
|
||||
XGetSubImage( display, dc->u.x.drawable, x1, y1, x2-x1, y2-y1,
|
||||
AllPlanes, ZPixmap, image, x1-x, y1-y );
|
||||
}
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PatBlt (GDI.29)
|
||||
*/
|
||||
@ -161,17 +202,17 @@ BOOL BitBlt( HDC hdcDest, short xDest, short yDest, short width, short height,
|
||||
HBRUSH cur_brush=SelectObject(hdcDest, GetStockObject(BLACK_BRUSH));
|
||||
SelectObject(hdcDest, cur_brush);
|
||||
/* FillRect(hdcBrush, &r, cur_brush);*/
|
||||
sxi=XGetImage(display, dcSrc->u.x.drawable, min(xs1,xs2), min(ys1,ys2),
|
||||
abs(xs2-xs1), abs(ys2-ys1), AllPlanes, ZPixmap);
|
||||
dxi=XGetImage(display, dcDest->u.x.drawable, min(xd1,xd2),min(yd1,yd2),
|
||||
abs(xs2-xs1), abs(ys2-ys1), AllPlanes, ZPixmap);
|
||||
sxi = BITBLT_GetImage( hdcSrc, min(xs1,xs2), min(ys1,ys2),
|
||||
abs(xs2-xs1), abs(ys2-ys1) );
|
||||
dxi = BITBLT_GetImage( hdcDest, min(xd1,xd2), min(yd1,yd2),
|
||||
abs(xs2-xs1), abs(ys2-ys1) );
|
||||
/* dcBrush = (DC *) GDI_GetObjPtr( hdcBrush, DC_MAGIC );*/
|
||||
/* bxi=XGetImage(display, dcBrush->u.x.drawable, min(xd1,xd2),min(yd1,yd2),
|
||||
abs(xs2-xs1), abs(ys2-ys1), AllPlanes, ZPixmap);*/
|
||||
/* FIXME: It's really not necessary to do this on the visible screen */
|
||||
FillRect(hdcDest, &r, cur_brush);
|
||||
bxi=XGetImage(display, dcDest->u.x.drawable, min(xd1,xd2),min(yd1,yd2),
|
||||
abs(xs2-xs1), abs(ys2-ys1), AllPlanes, ZPixmap);
|
||||
bxi = BITBLT_GetImage( hdcDest, min(xd1,xd2), min(yd1,yd2),
|
||||
abs(xs2-xs1), abs(ys2-ys1) );
|
||||
for (i=0; i<min(256,1<<(dcDest->w.bitsPerPixel)); i++)
|
||||
{
|
||||
entry.pixel = i;
|
||||
@ -507,8 +548,7 @@ BOOL StretchBlt( HDC hdcDest, short xDest, short yDest, short widthDest, short h
|
||||
* the pixels
|
||||
*/
|
||||
|
||||
sxi = XGetImage(display, dcSrc->u.x.drawable, xs1, ys1,
|
||||
widthSrc, heightSrc, AllPlanes, ZPixmap);
|
||||
sxi = BITBLT_GetImage( hdcSrc, xs1, ys1, widthSrc, heightSrc );
|
||||
dxi = XCreateImage(display, DefaultVisualOfScreen(screen),
|
||||
screenDepth, ZPixmap,
|
||||
0, NULL, widthDest, heightDest,
|
||||
|
@ -13,10 +13,10 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_GDI /* */
|
||||
/* #undef DEBUG_GDI /* */
|
||||
/* #define DEBUG_BITMAP /* */
|
||||
/* #define DEBUG_BITMAP /* */
|
||||
/* #define DEBUG_GDI */
|
||||
/* #undef DEBUG_GDI */
|
||||
/* #define DEBUG_BITMAP */
|
||||
/* #define DEBUG_BITMAP */
|
||||
#include "debug.h"
|
||||
|
||||
/* GCs used for B&W and color bitmap operations */
|
||||
|
@ -11,8 +11,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "prototypes.h"
|
||||
#include "metafile.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_GDI /* */
|
||||
/* #undef DEBUG_GDI /* */
|
||||
/* #define DEBUG_GDI */
|
||||
/* #undef DEBUG_GDI */
|
||||
#include "debug.h"
|
||||
|
||||
#define NB_HATCH_STYLES 6
|
||||
|
@ -232,7 +232,7 @@ WORD COLOR_ToPhysical( DC *dc, COLORREF color )
|
||||
WORD index = 0;
|
||||
WORD *mapping;
|
||||
|
||||
if (!dc->u.x.pal.hMapping) return 0;
|
||||
if (dc && !dc->u.x.pal.hMapping) return 0;
|
||||
switch(color >> 24)
|
||||
{
|
||||
case 0: /* RGB */
|
||||
@ -242,11 +242,20 @@ WORD COLOR_ToPhysical( DC *dc, COLORREF color )
|
||||
index = color & 0xffff;
|
||||
break;
|
||||
case 2: /* PALETTERGB */
|
||||
index = GetNearestPaletteIndex( dc->w.hPalette, color );
|
||||
if (dc) index = GetNearestPaletteIndex( dc->w.hPalette, color );
|
||||
else index = 0;
|
||||
break;
|
||||
}
|
||||
if (index >= dc->u.x.pal.mappingSize) return 0;
|
||||
mapping = (WORD *) GDI_HEAP_ADDR( dc->u.x.pal.hMapping );
|
||||
if (dc)
|
||||
{
|
||||
if (index >= dc->u.x.pal.mappingSize) return 0;
|
||||
mapping = (WORD *) GDI_HEAP_ADDR( dc->u.x.pal.hMapping );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (index >= NB_RESERVED_COLORS) return 0;
|
||||
mapping = (WORD *) GDI_HEAP_ADDR( hSysColorTranslation );
|
||||
}
|
||||
return mapping[index];
|
||||
}
|
||||
|
||||
|
230
objects/dib.c
230
objects/dib.c
@ -16,6 +16,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_ICON /* */
|
||||
/* #undef DEBUG_ICON /* */
|
||||
/* #define DEBUG_BITMAP /* */
|
||||
/* #undef DEBUG_BIYMAP /* */
|
||||
#include "debug.h"
|
||||
|
||||
extern const int DC_XROPfunction[];
|
||||
@ -49,7 +51,8 @@ static XImage *DIB_DIBmpToImage( BITMAPINFOHEADER * bmp, void * bmpData )
|
||||
{
|
||||
extern void _XInitImageFuncPtrs( XImage* );
|
||||
XImage * image;
|
||||
int bytesPerLine = (bmp->biWidth * bmp->biBitCount + 31) / 32 * 4;
|
||||
int bytesPerLine = ((bmp->biBitCount == 24 ? 32 : bmp->biBitCount)
|
||||
* bmp->biWidth + 31) / 32 * 4;
|
||||
|
||||
image = XCreateImage( display, DefaultVisualOfScreen( screen ),
|
||||
bmp->biBitCount, ZPixmap, 0, bmpData,
|
||||
@ -220,61 +223,185 @@ static void DIB_SetImageBits_8( WORD lines, BYTE *bits, WORD width,
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DIB_SetImageBits_RLE8
|
||||
* DIB_SetImageBits_RLE8
|
||||
*
|
||||
* SetDIBits for an 8-bit deep compressed DIB.
|
||||
*
|
||||
* This function rewritten 941113 by James Youngman. WINE blew out when I
|
||||
* first ran it because my desktop wallpaper is a (large) RLE8 bitmap.
|
||||
*
|
||||
* This was because the algorithm assumed that all RLE8 bitmaps end with the
|
||||
* 'End of bitmap' escape code. This code is very much laxer in what it
|
||||
* allows to end the expansion. Possibly too lax. See the note by
|
||||
* case RleDelta. BTW, MS's documentation implies that a correct RLE8
|
||||
* bitmap should end with RleEnd, but on the other hand, software exists
|
||||
* that produces ones that don't and Windows 3.1 doesn't complain a bit
|
||||
* about it.
|
||||
*
|
||||
* (No) apologies for my English spelling. [Emacs users: c-indent-level=4].
|
||||
* James A. Youngman <mbcstjy@afs.man.ac.uk>
|
||||
* [JAY]
|
||||
*/
|
||||
static void DIB_SetImageBits_RLE8( WORD lines, BYTE *bits, WORD width,
|
||||
WORD *colors, XImage *bmpImage )
|
||||
|
||||
enum Rle8_EscapeCodes
|
||||
{
|
||||
int x = 0, i, length;
|
||||
BYTE *begin = bits;
|
||||
/*
|
||||
* Apologies for polluting your file's namespace...
|
||||
*/
|
||||
RleEol = 0, /* End of line */
|
||||
RleEnd = 1, /* End of bitmap */
|
||||
RleDelta = 2 /* Delta */
|
||||
};
|
||||
|
||||
static void DIB_SetImageBits_RLE8(WORD lines,
|
||||
BYTE *bits,
|
||||
WORD width,
|
||||
WORD *colors,
|
||||
XImage *bmpImage)
|
||||
{
|
||||
int x; /* X-positon on each line. Increases. */
|
||||
int line; /* Line #. Starts at lines-1, decreases */
|
||||
BYTE *pIn = bits; /* Pointer to current position in bits */
|
||||
BYTE length; /* The length pf a run */
|
||||
BYTE color_index; /* index into colors[] as read from bits */
|
||||
BYTE escape_code; /* See enum Rle8_EscapeCodes.*/
|
||||
WORD color; /* value of colour[color_index] */
|
||||
|
||||
if (lines == 0) /* Let's hope this doesn't happen. */
|
||||
return;
|
||||
|
||||
/*
|
||||
* Note that the bitmap data is stored by Windows starting at the
|
||||
* bottom line of the bitmap and going upwards. Within each line,
|
||||
* the data is stored left-to-right. That's the reason why line
|
||||
* goes from lines-1 to 0. [JAY]
|
||||
*/
|
||||
|
||||
x = 0;
|
||||
line = lines-1;
|
||||
do
|
||||
{
|
||||
length = *pIn++;
|
||||
|
||||
/*
|
||||
* If the length byte is not zero (which is the escape value),
|
||||
* We have a run of length pixels all the same colour. The colour
|
||||
* index is stored next.
|
||||
*
|
||||
* If the length byte is zero, we need to read the next byte to
|
||||
* know what to do. [JAY]
|
||||
*/
|
||||
if (length != 0)
|
||||
{
|
||||
/*
|
||||
* [Run-Length] Encoded mode
|
||||
*/
|
||||
color_index = (*pIn++); /* Get the colour index. */
|
||||
color = colors[color_index];
|
||||
|
||||
lines--;
|
||||
while (1) {
|
||||
length = *bits++;
|
||||
if (length) { /* encoded */
|
||||
while (length--) {
|
||||
XPutPixel(bmpImage, x++, lines, colors[*bits]);
|
||||
if (x > width) {
|
||||
x = 0;
|
||||
if (lines)
|
||||
lines--;
|
||||
}
|
||||
}
|
||||
bits++;
|
||||
} else {
|
||||
length = *bits++;
|
||||
switch (length) {
|
||||
case 0: /* eol */
|
||||
x = 0;
|
||||
lines--;
|
||||
continue;
|
||||
while(length--)
|
||||
XPutPixel(bmpImage, x++, line, color);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Escape codes (may be an absolute sequence though)
|
||||
*/
|
||||
escape_code = (*pIn++);
|
||||
switch(escape_code)
|
||||
{
|
||||
case RleEol: /* =0, end of line */
|
||||
{
|
||||
x = 0;
|
||||
line--;
|
||||
break;
|
||||
}
|
||||
|
||||
case RleEnd: /* =1, end of bitmap */
|
||||
{
|
||||
/*
|
||||
* Not all RLE8 bitmaps end with this
|
||||
* code. For example, Paint Shop Pro
|
||||
* produces some that don't. That's (I think)
|
||||
* what caused the previous implementation to
|
||||
* fail. [JAY]
|
||||
*/
|
||||
line=0; /* Cause exit from do loop. */
|
||||
}
|
||||
|
||||
case RleDelta: /* =2, a delta */
|
||||
{
|
||||
/*
|
||||
* Note that deltaing to line 0
|
||||
* will cause an exit from the loop,
|
||||
* which may not be what is intended.
|
||||
* The fact that there is a delta in the bits
|
||||
* almost certainly implies that there is data
|
||||
* to follow. You may feel that we should
|
||||
* jump to the top of the loop to avoid exiting
|
||||
* in this case.
|
||||
*
|
||||
* TODO: Decide what to do here in that case. [JAY]
|
||||
*/
|
||||
x += (*pIn++);
|
||||
line -= (*pIn++);
|
||||
if (line == 0)
|
||||
{
|
||||
dprintf_bitmap(stddeb,
|
||||
"DIB_SetImageBits_RLE8(): "
|
||||
"Delta to last line of bitmap "
|
||||
"(wrongly??) causes loop exit\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: /* >2, switch to absolute mode */
|
||||
{
|
||||
/*
|
||||
* Absolute Mode
|
||||
*/
|
||||
length = escape_code;
|
||||
while(length--)
|
||||
{
|
||||
color_index = (*pIn++);
|
||||
XPutPixel(bmpImage, x++, line,
|
||||
colors[color_index]);
|
||||
}
|
||||
|
||||
/*
|
||||
* If you think for a moment you'll realise that the
|
||||
* only time we could ever possibly read an odd
|
||||
* number of bytes is when there is a 0x00 (escape),
|
||||
* a value >0x02 (absolute mode) and then an odd-
|
||||
* length run. Therefore this is the only place we
|
||||
* need to worry about it. Everywhere else the
|
||||
* bytes are always read in pairs. [JAY]
|
||||
*/
|
||||
if (escape_code & 1)
|
||||
(*pIn++); /* Get and throw away the pad byte. */
|
||||
break;
|
||||
}
|
||||
} /* switch (escape_code) : Escape sequence */
|
||||
} /* process either an encoded sequence or an escape sequence */
|
||||
|
||||
/* We expect to come here more than once per line. */
|
||||
} while (line > 0); /* Do this until the bitmap is filled */
|
||||
|
||||
/*
|
||||
* Everybody comes here at the end.
|
||||
* Check how we exited the loop and print a message if it's a bit odd.
|
||||
* [JAY]
|
||||
*/
|
||||
if ( (*(pIn-2) != 0/*escape*/) || (*(pIn-1)!= RleEnd) )
|
||||
{
|
||||
dprintf_bitmap(stddeb, "DIB_SetImageBits_RLE8(): End-of-bitmap "
|
||||
"without (strictly) proper escape code. Last two "
|
||||
"bytes were: %02X %02X.\n",
|
||||
(int)*(pIn-2),
|
||||
(int)*(pIn-1));
|
||||
}
|
||||
}
|
||||
|
||||
case 1: /* eopicture */
|
||||
return;
|
||||
|
||||
case 2: /* delta */
|
||||
x += *bits++;
|
||||
lines -= *bits++;
|
||||
continue;
|
||||
|
||||
default: /* absolute */
|
||||
for (i = length; i ; i--) {
|
||||
XPutPixel(bmpImage, x++, lines,
|
||||
colors[*bits++]);
|
||||
if (x > width) {
|
||||
x = 0;
|
||||
if (lines)
|
||||
lines--;
|
||||
}
|
||||
}
|
||||
if ((bits - begin) & 1)
|
||||
bits++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DIB_SetImageBits_24
|
||||
@ -342,7 +469,8 @@ static int DIB_SetImageBits( DC *dc, WORD lines, WORD depth, LPSTR bits,
|
||||
|
||||
/* Transfer the pixels */
|
||||
|
||||
widthBytes = (info->bmiHeader.biWidth * depth + 31) / 32 * 4;
|
||||
widthBytes = ((depth == 24 ? 32 : depth) * info->bmiHeader.biWidth + 31)
|
||||
/ 32 * 4;
|
||||
bmpData = malloc( lines * widthBytes );
|
||||
bmpImage = XCreateImage( display, DefaultVisualOfScreen(screen),
|
||||
depth, ZPixmap, 0, bmpData,
|
||||
|
@ -13,8 +13,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "user.h"
|
||||
#include "gdi.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_FONT /* */
|
||||
/* #undef DEBUG_FONT /* */
|
||||
/* #define DEBUG_FONT */
|
||||
/* #undef DEBUG_FONT */
|
||||
#include "debug.h"
|
||||
|
||||
#define MAX_FONTS 256
|
||||
@ -157,7 +157,7 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
|
||||
family = FONT_TranslateName( "decorative" );
|
||||
break;
|
||||
default:
|
||||
family = FontNames[0].x11;
|
||||
family = "*-*";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ HFONT CreateFontIndirect( LOGFONT * font )
|
||||
fontPtr = (FONTOBJ *) GDI_HEAP_ADDR( hfont );
|
||||
memcpy( &fontPtr->logfont, font, sizeof(LOGFONT) );
|
||||
AnsiLower( fontPtr->logfont.lfFaceName );
|
||||
dprintf_font(stddeb,"CreateFontIndirect(%08X); return %04X\n",font,hfont);
|
||||
dprintf_font(stddeb,"CreateFontIndirect(%p); return %04x\n",font,hfont);
|
||||
return hfont;
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
|
||||
X_PHYSFONT * stockPtr;
|
||||
HFONT prevHandle = dc->w.hFont;
|
||||
XFontStruct * fontStruct;
|
||||
dprintf_font(stddeb,"FONT_SelectObject(%04X, %04X, %08X); !\n",
|
||||
dprintf_font(stddeb,"FONT_SelectObject(%p, %04x, %p)\n",
|
||||
dc, hfont, font);
|
||||
/* Load font if necessary */
|
||||
|
||||
@ -487,7 +487,7 @@ BOOL GetTextMetrics( HDC hdc, LPTEXTMETRIC metrics )
|
||||
*/
|
||||
DWORD SetMapperFlags(HDC hDC, DWORD dwFlag)
|
||||
{
|
||||
dprintf_font(stdnimp,"SetmapperFlags(%04X, %08X) // Empty Stub !\n",
|
||||
dprintf_font(stdnimp,"SetmapperFlags(%04X, %08lX) // Empty Stub !\n",
|
||||
hDC, dwFlag);
|
||||
return 0L;
|
||||
}
|
||||
@ -555,8 +555,8 @@ BOOL RemoveFontResource( LPSTR str )
|
||||
*/
|
||||
int ParseFontParms(LPSTR lpFont, WORD wParmsNo, LPSTR lpRetStr, WORD wMaxSiz)
|
||||
{
|
||||
int i, j;
|
||||
dprintf_font(stddeb,"ParseFontParms('%s', %d, %08X, %d);\n",
|
||||
int i;
|
||||
dprintf_font(stddeb,"ParseFontParms('%s', %d, %p, %d);\n",
|
||||
lpFont, wParmsNo, lpRetStr, wMaxSiz);
|
||||
if (lpFont == NULL) return 0;
|
||||
if (lpRetStr == NULL) return 0;
|
||||
@ -589,7 +589,7 @@ void InitFontsList()
|
||||
char *family, *weight, *charset;
|
||||
char **names;
|
||||
char slant, spacing;
|
||||
int i, width, count;
|
||||
int i, count;
|
||||
LPLOGFONT lpNewFont;
|
||||
weight = "medium";
|
||||
slant = 'r';
|
||||
|
@ -12,8 +12,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "gdi.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_GDI /* */
|
||||
/* #undef DEBUG_GDI /* */
|
||||
/* #define DEBUG_GDI */
|
||||
/* #undef DEBUG_GDI */
|
||||
#include "debug.h"
|
||||
|
||||
MDESC *GDI_Heap = NULL;
|
||||
@ -345,7 +345,7 @@ HANDLE GetStockObject( int obj )
|
||||
int GetObject( HANDLE handle, int count, LPSTR buffer )
|
||||
{
|
||||
GDIOBJHDR * ptr = NULL;
|
||||
dprintf_gdi(stddeb, "GetObject: %04x %d %08x\n", handle, count, buffer );
|
||||
dprintf_gdi(stddeb, "GetObject: %04x %d %p\n", handle, count, buffer );
|
||||
if (!count) return 0;
|
||||
|
||||
if (handle >= FIRST_STOCK_HANDLE)
|
||||
|
@ -22,20 +22,43 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
|
||||
#ifdef USE_XPM
|
||||
|
||||
/* Known symbolic names for colors. Use these whenever possible. */
|
||||
struct sys_colors_symbols
|
||||
|
||||
#define NB_COLOR_SYMBOLS 5
|
||||
|
||||
/* This is the list of the symbolic colors. All the colors used */
|
||||
/* in the xpm files must be included in this list. If you need */
|
||||
/* to add new colors, add them just before "black", and add the */
|
||||
/* color identifier in OBM_Sys_Colors_Symbols below. */
|
||||
/* Warning: black and white must always be the last 2 colors. */
|
||||
|
||||
static XpmColorSymbol OBM_Color_Symbols[NB_COLOR_SYMBOLS+2] =
|
||||
{
|
||||
char *symbol;
|
||||
WORD syscolor;
|
||||
{ "button_face", NULL, 0 }, /* COLOR_BTNFACE */
|
||||
{ "button_shadow", NULL, 0 }, /* COLOR_BTNSHADOW */
|
||||
{ "button_highlight", NULL, 0 }, /* COLOR_BTNHIGHLIGHT */
|
||||
{ "button_text", NULL, 0 }, /* COLOR_BTNTEXT */
|
||||
{ "window_frame", NULL, 0 }, /* COLOR_WINDOWFRAME */
|
||||
{ "black", NULL, 0 },
|
||||
{ "white", NULL, 0 }
|
||||
};
|
||||
|
||||
static const struct sys_colors_symbols OBM_Color_Symbols[] =
|
||||
static const int OBM_Sys_Colors_Symbols[NB_COLOR_SYMBOLS] =
|
||||
{
|
||||
{ "button_face", COLOR_BTNFACE },
|
||||
{ "button_shadow", COLOR_BTNSHADOW },
|
||||
{ "button_highlight", COLOR_BTNHIGHLIGHT }
|
||||
COLOR_BTNFACE,
|
||||
COLOR_BTNSHADOW,
|
||||
COLOR_BTNHIGHLIGHT,
|
||||
COLOR_BTNTEXT,
|
||||
COLOR_WINDOWFRAME
|
||||
};
|
||||
|
||||
/* Don't change this list! */
|
||||
static XpmColorSymbol OBM_BW_Symbols[2] =
|
||||
{
|
||||
{ "white", NULL, 0 },
|
||||
{ "black", NULL, 1 }
|
||||
};
|
||||
|
||||
|
||||
/* Include OEM pixmaps */
|
||||
#include "bitmaps/obm_lfarrowi"
|
||||
#include "bitmaps/obm_rgarrowi"
|
||||
@ -165,10 +188,35 @@ static const struct
|
||||
|
||||
#endif /* USE_XPM */
|
||||
|
||||
extern WORD COLOR_ToPhysical( DC *dc, COLORREF color ); /* color.c */
|
||||
|
||||
extern Colormap COLOR_WinColormap;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* OBM_InitColorSymbols
|
||||
*/
|
||||
#ifdef USE_XPM
|
||||
static void OBM_InitColorSymbols()
|
||||
{
|
||||
int i;
|
||||
static int already_done = 0;
|
||||
|
||||
if (already_done) return;
|
||||
|
||||
/* Init the system colors */
|
||||
for (i = 0; i < NB_COLOR_SYMBOLS; i++)
|
||||
{
|
||||
OBM_Color_Symbols[i].pixel = COLOR_ToPhysical( NULL,
|
||||
GetSysColor(OBM_Sys_Colors_Symbols[i]));
|
||||
}
|
||||
/* Init black and white */
|
||||
OBM_Color_Symbols[i++].pixel = COLOR_ToPhysical( NULL, RGB(0,0,0) );
|
||||
OBM_Color_Symbols[i++].pixel = COLOR_ToPhysical( NULL, RGB(255,255,255) );
|
||||
already_done = 1;
|
||||
}
|
||||
#endif /* USE_XPM */
|
||||
|
||||
/***********************************************************************
|
||||
* OBM_LoadOEMBitmap
|
||||
*/
|
||||
@ -181,21 +229,28 @@ HBITMAP OBM_LoadOEMBitmap( WORD id )
|
||||
|
||||
if ((id < OBM_FIRST) || (id > OBM_LAST)) return 0;
|
||||
id -= OBM_FIRST;
|
||||
|
||||
#ifdef USE_XPM
|
||||
if (!OBM_Pixmaps_Data[id].data) return 0;
|
||||
{
|
||||
XpmAttributes attrs;
|
||||
int err;
|
||||
|
||||
attrs.valuemask = XpmColormap | XpmDepth;
|
||||
attrs.colormap = COLOR_WinColormap;
|
||||
OBM_InitColorSymbols();
|
||||
attrs.valuemask = XpmColormap | XpmDepth | XpmColorSymbols;
|
||||
attrs.colormap = COLOR_WinColormap;
|
||||
if (OBM_Pixmaps_Data[id].color) attrs.depth = bpp = screenDepth;
|
||||
else attrs.depth = bpp = 1;
|
||||
attrs.colorsymbols = (bpp > 1) ? OBM_Color_Symbols : OBM_BW_Symbols;
|
||||
attrs.numsymbols = (bpp > 1) ? NB_COLOR_SYMBOLS + 2 : 2;
|
||||
|
||||
if (XpmCreatePixmapFromData( display, rootWindow,
|
||||
OBM_Pixmaps_Data[id].data,
|
||||
&pixmap, NULL, &attrs ) != XpmSuccess)
|
||||
if ((err = XpmCreatePixmapFromData( display, rootWindow,
|
||||
OBM_Pixmaps_Data[id].data,
|
||||
&pixmap, NULL,
|
||||
&attrs )) != XpmSuccess)
|
||||
{
|
||||
fprintf( stderr, "Error creating pixmap\n" );
|
||||
fprintf( stderr, "Error %d creating pixmap %d\n",
|
||||
err, OBM_FIRST+id );
|
||||
pixmap = 0;
|
||||
}
|
||||
else
|
||||
|
@ -9,11 +9,6 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993,1994";
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
/*
|
||||
#ifdef linux
|
||||
#include <values.h>
|
||||
#endif
|
||||
*/
|
||||
|
||||
#if !defined (MAXINT)
|
||||
#include <limits.h>
|
||||
@ -23,8 +18,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993,1994";
|
||||
#include <X11/Xlib.h>
|
||||
#include "gdi.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_PALETTE /* */
|
||||
/* #undef DEBUG_PALETTE /* */
|
||||
/* #define DEBUG_PALETTE */
|
||||
/* #undef DEBUG_PALETTE */
|
||||
#include "debug.h"
|
||||
|
||||
extern void COLOR_SetMapping( DC *dc, HANDLE map, WORD size ); /* color.c */
|
||||
@ -160,7 +155,7 @@ WORD GetNearestPaletteIndex( HPALETTE hpalette, COLORREF color )
|
||||
}
|
||||
entry++;
|
||||
}
|
||||
dprintf_palette(stddeb,"GetNearestPaletteIndex(%x,%06x) : returning %d\n",
|
||||
dprintf_palette(stddeb,"GetNearestPaletteIndex(%x,%06lx): returning %d\n",
|
||||
hpalette, color, index );
|
||||
return index;
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "gdi.h"
|
||||
#include "metafile.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_GDI /* */
|
||||
/* #undef DEBUG_GDI /* */
|
||||
/* #define DEBUG_GDI */
|
||||
/* #undef DEBUG_GDI */
|
||||
#include "debug.h"
|
||||
|
||||
extern WORD COLOR_ToPhysical( DC *dc, COLORREF color );
|
||||
@ -21,7 +21,7 @@ extern WORD COLOR_ToPhysical( DC *dc, COLORREF color );
|
||||
HPEN CreatePen( short style, short width, COLORREF color )
|
||||
{
|
||||
LOGPEN logpen = { style, { width, 0 }, color };
|
||||
dprintf_gdi(stddeb, "CreatePen: %d %d %06x\n", style, width, color );
|
||||
dprintf_gdi(stddeb, "CreatePen: %d %d %06lx\n", style, width, color );
|
||||
return CreatePenIndirect( &logpen );
|
||||
}
|
||||
|
||||
|
@ -158,9 +158,12 @@ static char *TEXT_NextLine(HDC hdc, char *str, int *count, char *dest,
|
||||
{
|
||||
if (format & DT_WORDBREAK)
|
||||
{
|
||||
*len = wb_j;
|
||||
*count = wb_count - 1;
|
||||
return (&str[wb_i]);
|
||||
if (wb_j)
|
||||
{
|
||||
*len = wb_j;
|
||||
*count = wb_count - 1;
|
||||
return (&str[wb_i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
18
rc/Imakefile
18
rc/Imakefile
@ -8,21 +8,24 @@ MODULE = rc
|
||||
echo "#include \"windows.h\"" >$*.rct
|
||||
echo WINDOWS_H_ENDS_HERE >>$*.rct
|
||||
cat $< >>$*.rct
|
||||
gcc -E -x c $(CFLAGS) $*.rct | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | ./winerc -o $* -v -p $*
|
||||
gcc -E -x c -P $(CFLAGS) $*.rct | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | ./winerc -o $* -v -p $*
|
||||
$(RM) $*.rct
|
||||
|
||||
XCOMM This would be nicer, but it breaks gcc (2.5.8 on Linux) --AJ
|
||||
XCOMM gcc -E -x c -P $(CFLAGS) -imacros ../include/windows.h $*.rc | ./winerc -o $* -v -p $*
|
||||
|
||||
RCSRCS = sysres.rc sysresbm.rc
|
||||
|
||||
RCOBJS = $(RCSRCS:.rc=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(RCOBJS))
|
||||
|
||||
sysres.c: winerc $(TOP)/include/windows.h
|
||||
$(RCOBJS): winerc $(TOP)/include/windows.h
|
||||
|
||||
includes::
|
||||
|
||||
clean::
|
||||
$(RM) sysres.c
|
||||
$(RM) $(RCSRCS:.rc=.c)
|
||||
|
||||
|
||||
XCOMM Rules to build the winerc program
|
||||
@ -34,7 +37,14 @@ SRCS = \
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
#ifdef i386BsdArchitecture
|
||||
#endif
|
||||
#if defined(i386BsdArchitecture) || defined(i386FreeBsd) || defined(FreeBSDArchitecture)
|
||||
LOCAL_LIBRARIES = -ll
|
||||
#endif
|
||||
#ifdef LinuxArchitecture
|
||||
LOCAL_LIBRARIES = -lfl
|
||||
#endif
|
||||
|
||||
depend:: rc.tab.c rc.tab.h lex.yy.c
|
||||
|
||||
@ -46,7 +56,7 @@ ComplexProgramTarget(winerc)
|
||||
rc.tab.c rc.tab.h: rc.y
|
||||
$(YACC) -b rc -d --debug rc.y
|
||||
|
||||
lex.yy.c: rc.l
|
||||
lex.yy.c: rc.l rc.tab.h
|
||||
$(LEX) -I rc.l
|
||||
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#if #LANG(En)
|
||||
|
||||
SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE
|
||||
{
|
||||
MENUITEM "&Restore", 61728
|
||||
@ -260,3 +262,8 @@ FONT 8, "Helv"
|
||||
PUSHBUTTON "Cancel", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
#endif /*LANG=En*/
|
||||
|
||||
#if #LANG(De)
|
||||
#include "sysres_De.rc"
|
||||
#endif
|
||||
|
262
rc/sysres_De.rc
Normal file
262
rc/sysres_De.rc
Normal file
@ -0,0 +1,262 @@
|
||||
SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE
|
||||
{
|
||||
MENUITEM "&Wiederherstellen", 61728
|
||||
MENUITEM "&Verschieben", 61456
|
||||
MENUITEM "&Größe", 61440
|
||||
MENUITEM "Mi&nimieren", 61472
|
||||
MENUITEM "Ma&ximieren", 61488
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Schließen\tAlt-F4", 61536
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Wechseln zu ...\tCtrl-Esc", 61744
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Über WINE ...", 61761
|
||||
}
|
||||
|
||||
|
||||
2 DIALOG LOADONCALL MOVEABLE DISCARDABLE 80, 80, 150, 170
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_DLGFRAME
|
||||
{
|
||||
PUSHBUTTON "Kredit & Lizenz", 6, 30, 150, 40, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbruch", 2, 60, 250, 40, 14, WS_GROUP | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Ok", 1, 80, 150, 40, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
STOP_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 80, 80, 150, 75
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_DLGFRAME
|
||||
{
|
||||
ICON "SYSIDI_HAND", -1, 16, 16, 0, 0
|
||||
}
|
||||
|
||||
|
||||
QUESTION_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 80, 80, 150, 75
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_DLGFRAME
|
||||
{
|
||||
ICON "SYSIDI_QUESTION", -1, 16, 16, 0, 0
|
||||
}
|
||||
|
||||
|
||||
EXCLAMATION_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 80, 80, 150, 75
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_DLGFRAME
|
||||
{
|
||||
ICON "SYSIDI_EXCLAMATION", -1, 16, 16, 0, 0
|
||||
}
|
||||
|
||||
|
||||
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 50, 44, 213, 149
|
||||
STYLE DS_LOCALEDIT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Über X"
|
||||
FONT 10, "System"
|
||||
{
|
||||
DEFPUSHBUTTON "OK", 1, 86, 130, 40, 14
|
||||
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE | WS_DISABLED, 4, 35, 205, 90
|
||||
LTEXT "Text", 100, 11, 40, 190, 80, SS_NOPREFIX | WS_GROUP
|
||||
ICON "WINEICON", -1, 185, 10, 18, 20
|
||||
}
|
||||
|
||||
|
||||
3 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Öffnen"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Datei&name:", 1090, 6, 6, 76, 9
|
||||
EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Verzeichnisse:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste der Datei&typen:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Laufwerke:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Öffnen", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Hilfe", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
4 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Speichern als ..."
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Datei&name:", 1090, 6, 6, 76, 9
|
||||
EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Verzeichnisse:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste der Datei&typen:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Laufwerke:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Speichern als", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Help", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
11 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Öffnen"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Datei&name:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Verzeichnisse:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste der Datei&typen:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Laufwerke:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Öffnen", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Help", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
12 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Speichern als ..."
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Datei&name:", 1090, 6, 6, 76, 9
|
||||
LTEXT "", 1152, 6, 16, 90, 12
|
||||
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "&Verzeichnisse:", -1, 110, 6, 92, 9
|
||||
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
|
||||
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
|
||||
LTEXT "Liste der Datei&typen:", 1089, 6, 104, 90, 9
|
||||
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "&Laufwerke:", 1091, 110, 104, 92, 9
|
||||
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Speichern als", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Help", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Schreibgeschützt", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
5 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Drucken"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Drucker:", 1088, 6, 6, 40, 9
|
||||
LTEXT "", 1089, 60, 6, 150, 9
|
||||
GROUPBOX "Druckbereicht", 1072, 6, 30, 160, 65, BS_GROUPBOX
|
||||
RADIOBUTTON "&Alles", 1056, 16, 45, 60, 12
|
||||
RADIOBUTTON "A&uswahl", 1057, 16, 60, 60, 12
|
||||
RADIOBUTTON "&Seiten", 1058, 16, 75, 60, 12
|
||||
DEFPUSHBUTTON "Drucken", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Einrichten", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
LTEXT "&Von:", 1090, 60, 80, 30, 9
|
||||
LTEXT "&Bis:", 1091, 120, 80, 30, 9
|
||||
LTEXT "Druck&qualität:", 1092, 6, 100, 76, 9
|
||||
COMBOBOX 1136, 80, 100, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
CHECKBOX "In &Datei drucken", 1040, 20, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "Verdichtet", 1041, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
6 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Druckereinrichtung"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
GROUPBOX "Drucker", 1072, 6, 10, 180, 65, BS_GROUPBOX
|
||||
RADIOBUTTON "&Standarddrucker", 1056, 16, 20, 80, 12
|
||||
LTEXT "[keiner]", 1088, 35, 35, 120, 9
|
||||
RADIOBUTTON "Bestimmter &Drucker", 1057, 16, 50, 80, 12
|
||||
COMBOBOX 1136, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Ok", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Einrichten", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
GROUPBOX "Orientierung", 1073, 6, 85, 100, 50, BS_GROUPBOX
|
||||
RADIOBUTTON "&Hochformat", 1058, 50, 100, 40, 12
|
||||
RADIOBUTTON "&Querformat", 1059, 50, 115, 40, 12
|
||||
ICON "LANDSCAP", 1097, 10, 95, 32, 32
|
||||
ICON "PORTRAIT", 1098, 10, 95, 32, 32
|
||||
GROUPBOX "Paper", 1074, 120, 85, 180, 50, BS_GROUPBOX
|
||||
LTEXT "&GrÖße", 1089, 130, 95, 30, 9
|
||||
LTEXT "P&apierquelle", 1090, 130, 110, 30, 9
|
||||
COMBOBOX 1137, 155, 95, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX 1138, 155, 110, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
7 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Font"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "Font:", 1088, 6, 6, 40, 9
|
||||
LTEXT "", 1089, 60, 6, 150, 9
|
||||
DEFPUSHBUTTON "Ok", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
8 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 200
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Farbe"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "&Standardfarben:", 1088, 6, 6, 40, 9
|
||||
LTEXT "S&elbstdefinierte Farben:", 1089, 6, 126, 40, 9
|
||||
LTEXT "Farbe|Re&in", 1090, 100, 146, 40, 9
|
||||
LTEXT "&Ton:", 1091, 150, 126, 40, 9
|
||||
LTEXT "&Sättigung:", 1092, 150, 146, 40, 9
|
||||
LTEXT "&Helligkeit:", 1093, 150, 166, 40, 9
|
||||
LTEXT "&Rot:", 1094, 150, 126, 40, 9
|
||||
LTEXT "&Grün:", 1095, 150, 146, 40, 9
|
||||
LTEXT "Bl&au:", 1096, 150, 166, 40, 9
|
||||
DEFPUSHBUTTON "Ok", 1, 6, 182, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Selbstdefinierte Farbe &hinzufügen", 1024, 120, 182, 100, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Selbstdefinierte Farbe &entfernen", 1025, 6, 164, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 76, 182, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
9 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Suchen"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "S&uchen nach:", 1088, 6, 6, 40, 9
|
||||
LTEXT "", 1089, 60, 6, 150, 9
|
||||
CHECKBOX "Nur ganze &Worte", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "Beachte Groß/Kleinschreibung", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
GROUPBOX "Richtung", 1072, 90, 40, 80, 40, BS_GROUPBOX
|
||||
RADIOBUTTON "&Hoch", 1056, 100, 50, 50, 12
|
||||
RADIOBUTTON "&Runter", 1057, 150, 50, 50, 12
|
||||
DEFPUSHBUTTON "&Nächsten finden", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
|
||||
10 DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Ersetzen"
|
||||
FONT 8, "Helv"
|
||||
{
|
||||
LTEXT "S&uchen nach:", 1088, 6, 6, 40, 9
|
||||
LTEXT "", 1089, 60, 6, 150, 9
|
||||
LTEXT "Ersetzen &durch:", 1090, 6, 26, 40, 9
|
||||
LTEXT "", 1091, 60, 26, 150, 9
|
||||
CHECKBOX "Nur ganze &Worte", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "Beachte Groß/Kleinschreibung", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
DEFPUSHBUTTON "&Nächsten finden", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Ersetzen", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "&Alle ersetzen", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Abbrechen", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
115
rc/sysresbm.rc
115
rc/sysresbm.rc
@ -1,3 +1,4 @@
|
||||
#ifndef USE_XPM
|
||||
32514 CURSOR LOADONCALL MOVEABLE DISCARDABLE
|
||||
{
|
||||
'00 00 02 00 01 00 20 20 00 00 00 00 00 00 30 01'
|
||||
@ -617,20 +618,20 @@ LANDSCAP ICON LOADONCALL MOVEABLE DISCARDABLE
|
||||
'00 00 00 BF BF 00 BF 00 00 00 BF 00 BF 00 BF BF'
|
||||
'00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
|
||||
'00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
|
||||
'00 00 FF FF FF 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF 00 FF 00 FF FF FF 00'
|
||||
'00 00 FF FF FF 00 00 00 FF FF FF 00 00 00 FF FF'
|
||||
'FF 00 00 00 FF FF FF 00 00 00 FF FF FF 00 00 00'
|
||||
'FF FF FF 00 00 00 FF FF FF 00 00 00 FF FF FF 00'
|
||||
'00 00 FF FF 00 00 00 00 00 FF FF 00 00 00 FF FF'
|
||||
'F0 00 00 00 0F FF FF 00 00 00 FF FF FF 00 00 00'
|
||||
'FF FF FF 00 00 00 FF FF FF F0 00 0F FF FF FF 00'
|
||||
'00 00 FF FF FF FF 00 FF FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00'
|
||||
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 08 88 88 88 88 88 88 88 80 00 00 00 0F 88'
|
||||
'88 88 88 88 88 88 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F 77 77 00 77 00 77 78 80 00'
|
||||
'00 00 0F 77 77 00 00 00 77 78 80 00 00 00 0F 77'
|
||||
'77 00 00 00 77 78 80 00 00 00 0F 77 77 00 00 00'
|
||||
'77 78 80 00 00 00 0F 77 77 00 00 00 77 78 80 00'
|
||||
'00 00 0F 77 00 00 00 00 00 78 80 00 00 00 0F 77'
|
||||
'70 00 00 00 07 78 80 00 00 00 0F 77 77 00 00 00'
|
||||
'77 78 80 00 00 00 0F 77 77 70 00 07 77 78 80 00'
|
||||
'00 00 0F 77 77 77 00 77 77 78 80 00 00 00 0F 77'
|
||||
'77 77 77 77 77 78 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F FF FF FF FF FF FF FF 80 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
}
|
||||
|
||||
|
||||
@ -643,20 +644,20 @@ LANDSCAP ICON LOADONCALL MOVEABLE DISCARDABLE
|
||||
'00 00 00 BF BF 00 BF 00 00 00 BF 00 BF 00 BF BF'
|
||||
'00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
|
||||
'00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
|
||||
'00 00 FF FF FF 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF FF 00 FF FF FF FF 00'
|
||||
'00 00 FF FF FF F0 00 0F FF FF FF 00 00 00 FF FF'
|
||||
'FF 00 00 00 FF FF FF 00 00 00 FF FF F0 00 00 00'
|
||||
'0F FF FF 00 00 00 FF FF 00 00 00 00 00 FF FF 00'
|
||||
'00 00 FF FF FF 00 00 00 FF FF FF 00 00 00 FF FF'
|
||||
'FF 00 00 00 FF FF FF 00 00 00 FF FF FF 00 00 00'
|
||||
'FF FF FF 00 00 00 FF FF FF 00 00 00 FF FF FF 00'
|
||||
'00 00 FF FF FF 00 FF 00 FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00'
|
||||
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 08 88 88 88 88 88 88 88 80 00 00 00 0F 88'
|
||||
'88 88 88 88 88 88 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F 77 77 77 00 77 77 78 80 00'
|
||||
'00 00 0F 77 77 70 00 07 77 78 80 00 00 00 0F 77'
|
||||
'77 00 00 00 77 78 80 00 00 00 0F 77 70 00 00 00'
|
||||
'07 78 80 00 00 00 0F 77 00 00 00 00 00 78 80 00'
|
||||
'00 00 0F 77 77 00 00 00 77 78 80 00 00 00 0F 77'
|
||||
'77 00 00 00 77 78 80 00 00 00 0F 77 77 00 00 00'
|
||||
'77 78 80 00 00 00 0F 77 77 00 00 00 77 78 80 00'
|
||||
'00 00 0F 77 77 00 77 00 77 78 80 00 00 00 0F 77'
|
||||
'77 77 77 77 77 78 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F FF FF FF FF FF FF FF 80 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
}
|
||||
|
||||
|
||||
@ -669,20 +670,20 @@ LANDSCAP ICON LOADONCALL MOVEABLE DISCARDABLE
|
||||
'00 00 00 BF BF 00 BF 00 00 00 BF 00 BF 00 BF BF'
|
||||
'00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
|
||||
'00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
|
||||
'00 00 FF FF FF 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF FF F0 FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF F0 0F FF FF FF 00 00 00 FF FF'
|
||||
'00 00 00 00 FF FF FF 00 00 00 FF FF 00 00 00 00'
|
||||
'0F FF FF 00 00 00 FF FF F0 00 00 00 00 FF FF 00'
|
||||
'00 00 FF FF F0 00 00 00 00 FF FF 00 00 00 FF FF'
|
||||
'00 00 00 00 0F FF FF 00 00 00 FF FF 00 00 00 00'
|
||||
'FF FF FF 00 00 00 FF FF FF FF F0 0F FF FF FF 00'
|
||||
'00 00 FF FF FF FF F0 FF FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00'
|
||||
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 08 88 88 88 88 88 88 88 80 00 00 00 0F 87'
|
||||
'77 77 77 77 77 78 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F 77 77 77 70 77 77 78 80 00'
|
||||
'00 00 0F 77 77 77 70 07 77 78 80 00 00 00 0F 77'
|
||||
'00 00 00 00 77 78 80 00 00 00 0F 77 00 00 00 00'
|
||||
'07 78 80 00 00 00 0F 77 70 00 00 00 00 78 80 00'
|
||||
'00 00 0F 77 70 00 00 00 00 78 80 00 00 00 0F 77'
|
||||
'00 00 00 00 07 78 80 00 00 00 0F 77 00 00 00 00'
|
||||
'77 78 80 00 00 00 0F 77 77 77 70 07 77 78 80 00'
|
||||
'00 00 0F 77 77 77 70 77 77 78 80 00 00 00 0F 77'
|
||||
'77 77 77 77 77 78 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F FF FF FF FF FF FF FF 80 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
}
|
||||
|
||||
|
||||
@ -695,20 +696,20 @@ LANDSCAP ICON LOADONCALL MOVEABLE DISCARDABLE
|
||||
'00 00 00 BF BF 00 BF 00 00 00 BF 00 BF 00 BF BF'
|
||||
'00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
|
||||
'00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
|
||||
'00 00 FF FF FF 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF F0 FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF 00 FF FF FF FF FF 00 00 00 FF FF'
|
||||
'F0 00 00 00 00 FF FF 00 00 00 FF FF 00 00 00 00'
|
||||
'00 FF FF 00 00 00 FF F0 00 00 00 00 0F FF FF 00'
|
||||
'00 00 FF F0 00 00 00 00 0F FF FF 00 00 00 FF FF'
|
||||
'00 00 00 00 00 FF FF 00 00 00 FF FF F0 00 00 00'
|
||||
'00 FF FF 00 00 00 FF FF FF 00 FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF F0 FF FF FF FF FF 00 00 00 FF FF'
|
||||
'FF FF FF FF FF FF FF 00 00 00 FF FF FF FF FF FF'
|
||||
'FF FF FF 00 00 00 FF FF FF FF FF FF FF FF FF 00'
|
||||
'00 00 FF FF FF FF FF FF FF FF FF 00 00 00'
|
||||
'00 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00'
|
||||
'00 00 08 88 88 88 88 88 88 88 80 00 00 00 0F 88'
|
||||
'88 88 88 88 88 88 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F 77 77 70 77 77 77 78 80 00'
|
||||
'00 00 0F 77 77 00 77 77 77 78 80 00 00 00 0F 77'
|
||||
'70 00 00 00 00 78 80 00 00 00 0F 77 00 00 00 00'
|
||||
'00 78 80 00 00 00 0F 70 00 00 00 00 07 78 80 00'
|
||||
'00 00 0F 70 00 00 00 00 07 78 80 00 00 00 0F 77'
|
||||
'00 00 00 00 00 78 80 00 00 00 0F 77 70 00 00 00'
|
||||
'00 78 80 00 00 00 0F 77 77 00 77 77 77 78 80 00'
|
||||
'00 00 0F 77 77 70 77 77 77 78 80 00 00 00 0F 77'
|
||||
'77 77 77 77 77 78 80 00 00 00 0F 77 77 77 77 77'
|
||||
'77 78 80 00 00 00 0F FF FF FF FF FF FF FF 80 00'
|
||||
'00 00 00 00 00 00 00 00 00 00 00 00 00 00'
|
||||
}
|
||||
|
||||
|
||||
@ -1848,4 +1849,4 @@ OBMCLOSE BITMAP LOADONCALL MOVEABLE
|
||||
'FF FF FF FF FF FF FF 80 00 00 00 00 00 00 00 00'
|
||||
'00 00 00 00 00 00'
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@ main(int argc,char *argv[])
|
||||
extern char* optarg;
|
||||
int optc,lose,ret;
|
||||
lose=0;
|
||||
#ifdef __NetBSD__
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
while((optc=getopt(argc,argv,"dp:vo:"))!=EOF)
|
||||
#else
|
||||
while((optc=getopt(argc,argv,"dp:vo:",0))!=EOF)
|
||||
|
187
tools/make_debug
187
tools/make_debug
@ -7,114 +7,155 @@
|
||||
#
|
||||
# Michael Patra <micky@marie.physik.tu-berlin.de>
|
||||
#
|
||||
makedepend -s"# /* Do not remove this line or change anything below this line */" -finclude/debug.h
|
||||
echo " " >> include/debug.h
|
||||
grep -h dprintf_ */*.c | tr -d '[:blank:]' | cut -d"(" -f1 | \
|
||||
cut -d"_" -f2 | sort | uniq > temp.$$
|
||||
echo " " >> include/debug.h
|
||||
echo "#ifdef DEBUG_NONE_EXT" >> include/debug.h
|
||||
cat temp.$$ |
|
||||
DEBUG_H=include/debug.h
|
||||
STDDEBUG_H=include/stddebug.h
|
||||
|
||||
mv $DEBUG_H $DEBUG_H.old
|
||||
mv $STDDEBUG_H $STDDEBUG_H.old
|
||||
|
||||
# Build the list of debug identifiers
|
||||
grep -h dprintf_ */*.c | sed 's/.*dprintf_\([A-Za-z0-9_]*\).*/\1/g' | \
|
||||
sort | uniq > temp.$$
|
||||
|
||||
# Build debug.h
|
||||
|
||||
sed '/^\/\* Do not remove this line or change anything below this line \*\//q'\
|
||||
<$DEBUG_H.old >$DEBUG_H
|
||||
cat <<++EOF++ >> $DEBUG_H
|
||||
|
||||
#ifdef DEBUG_NONE_EXT
|
||||
++EOF++
|
||||
|
||||
cat temp.$$ | tr a-z A-Z |
|
||||
{
|
||||
while read x
|
||||
do
|
||||
y=`echo $x | tr a-z A-Z`
|
||||
echo "#undef DEBUG_$y" >> include/debug.h
|
||||
echo "#undef DEBUG_$x" >> $DEBUG_H
|
||||
done
|
||||
}
|
||||
echo "#endif" >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
echo "#ifdef DEBUG_ALL_EXT" >> include/debug.h
|
||||
cat temp.$$ |
|
||||
|
||||
cat <<++EOF++ >>$DEBUG_H
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ALL_EXT
|
||||
++EOF++
|
||||
|
||||
cat temp.$$ | tr a-z A-Z |
|
||||
{
|
||||
while read x
|
||||
do
|
||||
y=`echo $x | tr a-z A-Z`
|
||||
echo "#define DEBUG_$y" >> include/debug.h
|
||||
echo "#define DEBUG_$x" >> $DEBUG_H
|
||||
done
|
||||
}
|
||||
echo "#endif" >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
echo "#ifdef DEBUG_RUNTIME" >> include/debug.h
|
||||
echo "#ifdef DEBUG_DEFINE_VARIABLES" >> include/debug.h
|
||||
echo "short debug_msg_enabled[]={" >> include/debug.h
|
||||
i=0;
|
||||
cat temp.$$ |
|
||||
|
||||
cat <<++EOF++ >>$DEBUG_H
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#ifdef DEBUG_DEFINE_VARIABLES
|
||||
short debug_msg_enabled[]={
|
||||
++EOF++
|
||||
|
||||
cat temp.$$ | tr a-z A-Z |
|
||||
{
|
||||
while read x
|
||||
do
|
||||
y=`echo $x | tr a-z A-Z`
|
||||
echo "#ifdef DEBUG_$y" >> include/debug.h
|
||||
echo "1," >> include/debug.h
|
||||
echo "#else" >> include/debug.h
|
||||
echo "0," >> include/debug.h
|
||||
echo "#endif" >> include/debug.h
|
||||
cat <<++EOF++ >>$DEBUG_H
|
||||
#ifdef DEBUG_$x
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
++EOF++
|
||||
|
||||
done
|
||||
}
|
||||
echo "0};" >> include/debug.h
|
||||
echo "#else" >> include/debug.h
|
||||
echo "extern short debug_msg_enabled[];" >> include/debug.h
|
||||
echo "#endif" >> include/debug.h
|
||||
echo "#endif" >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
|
||||
cat <<++EOF++ >>$DEBUG_H
|
||||
0
|
||||
};
|
||||
#else
|
||||
extern short debug_msg_enabled[];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
++EOF++
|
||||
|
||||
i=0
|
||||
cat temp.$$ |
|
||||
{
|
||||
while read x
|
||||
do
|
||||
y=`echo $x | tr a-z A-Z`
|
||||
echo "#ifdef DEBUG_RUNTIME" >> include/debug.h
|
||||
echo "#define dprintf_$x if(debug_msg_enabled[$i]) fprintf" >> include/debug.h
|
||||
echo "#else" >> include/debug.h
|
||||
echo "#ifdef DEBUG_$y" >> include/debug.h
|
||||
echo "#define dprintf_$x fprintf" >> include/debug.h
|
||||
echo "#else" >> include/debug.h
|
||||
echo "#define dprintf_$x" >> include/debug.h
|
||||
echo "#endif" >> include/debug.h
|
||||
echo "#endif" >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
cat <<++EOF++ >>$DEBUG_H
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#define dprintf_$x if(debug_msg_enabled[$i]) fprintf
|
||||
#else
|
||||
#ifdef DEBUG_$y
|
||||
#define dprintf_$x fprintf
|
||||
#else
|
||||
#define dprintf_$x
|
||||
#endif
|
||||
#endif
|
||||
|
||||
++EOF++
|
||||
let i=$i+1
|
||||
done
|
||||
}
|
||||
makedepend -s"# /* Do not remove this line or change anything below this line */" -finclude/stddebug.h
|
||||
echo " " >> include/stddebug.h
|
||||
echo "#ifdef DEBUG_NONE" >> include/stddebug.h
|
||||
cat temp.$$ |
|
||||
|
||||
cat <<++EOF++ >>$DEBUG_H
|
||||
|
||||
#ifdef DEBUG_RUNTIME
|
||||
#ifdef DEBUG_DEFINE_VARIABLES
|
||||
static char *debug_msg_name[] = {
|
||||
++EOF++
|
||||
|
||||
cat temp.$$ |
|
||||
{
|
||||
while read x
|
||||
do
|
||||
y=`echo $x | tr a-z A-Z`
|
||||
echo "#undef DEBUG_$y" >> include/stddebug.h
|
||||
echo " \"$x\"," >> $DEBUG_H
|
||||
done
|
||||
}
|
||||
echo "#endif" >> include/stddebug.h
|
||||
echo " " >> include/stddebug.h
|
||||
echo " " >> include/stddebug.h
|
||||
echo "#ifdef DEBUG_ALL" >> include/stddebug.h
|
||||
cat temp.$$ |
|
||||
|
||||
cat <<++EOF++ >>$DEBUG_H
|
||||
""
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
++EOF++
|
||||
|
||||
# Build stddebug.h
|
||||
|
||||
sed '/^\/\* Do not remove this line or change anything below this line \*\//q'\
|
||||
<$STDDEBUG_H.old >$STDDEBUG_H
|
||||
|
||||
cat <<++EOF++ >>$STDDEBUG_H
|
||||
|
||||
#ifdef DEBUG_NONE
|
||||
++EOF++
|
||||
|
||||
cat temp.$$ | tr a-z A-Z |
|
||||
{
|
||||
while read x
|
||||
do
|
||||
y=`echo $x | tr a-z A-Z`
|
||||
echo "#define DEBUG_$y" >> include/stddebug.h
|
||||
echo "#undef DEBUG_$x" >> $STDDEBUG_H
|
||||
done
|
||||
}
|
||||
echo "#endif" >> include/stddebug.h
|
||||
echo " " >> include/debug.h
|
||||
echo " " >> include/debug.h
|
||||
echo "#ifdef DEBUG_RUNTIME" >> include/debug.h
|
||||
echo "#ifdef DEBUG_DEFINE_VARIABLES" >> include/debug.h
|
||||
echo "static char *debug_msg_name[] = {" >> include/debug.h
|
||||
cat temp.$$ |
|
||||
|
||||
cat <<++EOF++ >>$STDDEBUG_H
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ALL
|
||||
++EOF++
|
||||
|
||||
cat temp.$$ | tr a-z A-Z |
|
||||
{
|
||||
while read x
|
||||
do
|
||||
echo "\"$x\"," >> include/debug.h
|
||||
echo "#define DEBUG_$x" >> $STDDEBUG_H
|
||||
done
|
||||
}
|
||||
echo "\"\"};" >> include/debug.h
|
||||
echo "#endif" >> include/debug.h
|
||||
echo "#endif" >> include/debug.h
|
||||
rm temp.$$
|
||||
}
|
||||
echo "#endif" >> $STDDEBUG_H
|
||||
|
||||
rm temp.$$ $DEBUG_H.old $STDDEBUG_H.old
|
||||
|
@ -14,8 +14,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
#include "user.h"
|
||||
#include "syscolor.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MESSAGE /* */
|
||||
/* #undef DEBUG_MESSAGE /* */
|
||||
/* #define DEBUG_MESSAGE */
|
||||
/* #undef DEBUG_MESSAGE */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ LONG DefWindowProc( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
|
||||
int len;
|
||||
WND * wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
dprintf_message(stddeb, "DefWindowProc: %d %d %d %08x\n",
|
||||
dprintf_message(stddeb, "DefWindowProc: %d %d %d %08lx\n",
|
||||
hwnd, msg, wParam, lParam );
|
||||
|
||||
switch(msg)
|
||||
@ -72,8 +72,6 @@ LONG DefWindowProc( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
|
||||
CREATESTRUCT * createStruct = (CREATESTRUCT *)lParam;
|
||||
if (createStruct->lpszName)
|
||||
DEFWND_SetText( hwnd, createStruct->lpszName );
|
||||
if ((createStruct->style & WS_VSCROLL) ||
|
||||
(createStruct->style & WS_HSCROLL)) NC_CreateScrollBars(hwnd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -99,9 +97,9 @@ LONG DefWindowProc( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
|
||||
|
||||
case WM_NCDESTROY:
|
||||
if (wndPtr->hText) USER_HEAP_FREE(wndPtr->hText);
|
||||
wndPtr->hText = 0;
|
||||
if (wndPtr->VScroll) free(wndPtr->VScroll);
|
||||
if (wndPtr->HScroll) free(wndPtr->HScroll);
|
||||
if (wndPtr->hVScroll) USER_HEAP_FREE(wndPtr->hVScroll);
|
||||
if (wndPtr->hHScroll) USER_HEAP_FREE(wndPtr->hHScroll);
|
||||
wndPtr->hText = wndPtr->hVScroll = wndPtr->hHScroll = 0;
|
||||
return 0;
|
||||
|
||||
case WM_PAINT:
|
||||
|
@ -356,6 +356,11 @@ HWND CreateDialogIndirectParam( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||
header->cx * xUnit / 4, header->cy * yUnit / 8,
|
||||
hwnd, header->id, hInst, NULL );
|
||||
}
|
||||
/* Make the control last one in Z-order, so that controls remain
|
||||
in the order in which they were created */
|
||||
SetWindowPos( hwndCtrl, HWND_BOTTOM, 0, 0, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE );
|
||||
|
||||
/* Send initialisation messages to the control */
|
||||
if (hFont) SendMessage( hwndCtrl, WM_SETFONT, hFont, 0 );
|
||||
if (SendMessage( hwndCtrl, WM_GETDLGCODE, 0, 0 ) & DLGC_DEFPUSHBUTTON)
|
||||
@ -449,7 +454,7 @@ int DialogBoxParam( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||
{
|
||||
HWND hwnd;
|
||||
|
||||
dprintf_dialog(stddeb, "DialogBoxParam: %d,'%x',%d,%p,%d\n",
|
||||
dprintf_dialog(stddeb, "DialogBoxParam: %d,'%p',%d,%p,%ld\n",
|
||||
hInst, dlgTemplate, owner, dlgProc, param );
|
||||
hwnd = CreateDialogParam( hInst, dlgTemplate, owner, dlgProc, param );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
@ -554,7 +559,7 @@ BOOL IsDialogMessage( HWND hwndDlg, LPMSG msg )
|
||||
if (!(dlgCode & DLGC_WANTTAB))
|
||||
{
|
||||
SendMessage( hwndDlg, WM_NEXTDLGCTL,
|
||||
!(GetKeyState(VK_SHIFT) & 0x80), 0 );
|
||||
(GetKeyState(VK_SHIFT) & 0x80), 0 );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@ -563,7 +568,7 @@ BOOL IsDialogMessage( HWND hwndDlg, LPMSG msg )
|
||||
case VK_DOWN:
|
||||
if (!(dlgCode & DLGC_WANTARROWS))
|
||||
{
|
||||
SetFocus(GetNextDlgGroupItem(hwndDlg,GetFocus(),TRUE));
|
||||
SetFocus(GetNextDlgGroupItem(hwndDlg,GetFocus(),FALSE));
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@ -572,7 +577,7 @@ BOOL IsDialogMessage( HWND hwndDlg, LPMSG msg )
|
||||
case VK_UP:
|
||||
if (!(dlgCode & DLGC_WANTARROWS))
|
||||
{
|
||||
SetFocus(GetNextDlgGroupItem(hwndDlg,GetFocus(),FALSE));
|
||||
SetFocus(GetNextDlgGroupItem(hwndDlg,GetFocus(),TRUE));
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@ -752,13 +757,24 @@ WORD IsDlgButtonChecked( HWND hwnd, WORD id )
|
||||
*/
|
||||
void CheckRadioButton( HWND hwndDlg, WORD firstID, WORD lastID, WORD checkID )
|
||||
{
|
||||
HWND button = GetDlgItem( hwndDlg, lastID );
|
||||
while (button != 0)
|
||||
HWND button = GetWindow( hwndDlg, GW_CHILD );
|
||||
WND *wndPtr;
|
||||
|
||||
while (button)
|
||||
{
|
||||
WND * wndPtr = WIN_FindWndPtr( button );
|
||||
if (!wndPtr) break;
|
||||
if (!(wndPtr = WIN_FindWndPtr( button ))) return;
|
||||
if ((wndPtr->wIDmenu == firstID) || (wndPtr->wIDmenu == lastID)) break;
|
||||
button = wndPtr->hwndNext;
|
||||
}
|
||||
if (!button) return;
|
||||
|
||||
if (wndPtr->wIDmenu == lastID)
|
||||
lastID = firstID; /* Buttons are in reverse order */
|
||||
while (button)
|
||||
{
|
||||
if (!(wndPtr = WIN_FindWndPtr( button ))) return;
|
||||
SendMessage( button, BM_SETCHECK, (wndPtr->wIDmenu == checkID), 0 );
|
||||
if (wndPtr->wIDmenu == firstID) break;
|
||||
if (wndPtr->wIDmenu == lastID) break;
|
||||
button = wndPtr->hwndNext;
|
||||
}
|
||||
}
|
||||
@ -823,8 +839,7 @@ HWND GetNextDlgGroupItem( HWND hwndDlg, HWND hwndCtrl, BOOL fPrevious )
|
||||
|
||||
/* Now we will have to find the start of the group */
|
||||
|
||||
hwndStart = 0;
|
||||
hwnd = dlgPtr->hwndChild;
|
||||
hwndStart = hwnd = dlgPtr->hwndChild;
|
||||
while (hwnd)
|
||||
{
|
||||
wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
@ -652,14 +652,15 @@ BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
||||
/**********************************************************************
|
||||
* GRAPH_DrawReliefRect (Not a MSWin Call)
|
||||
*/
|
||||
void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int thickness, BOOL pressed )
|
||||
void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int highlight_size,
|
||||
int shadow_size, BOOL pressed )
|
||||
{
|
||||
HBRUSH hbrushOld;
|
||||
int i;
|
||||
|
||||
hbrushOld = SelectObject( hdc, pressed ? sysColorObjects.hbrushBtnShadow :
|
||||
sysColorObjects.hbrushBtnHighlight );
|
||||
for (i = 0; i < thickness; i++)
|
||||
for (i = 0; i < highlight_size; i++)
|
||||
{
|
||||
PatBlt( hdc, rect->left + i, rect->top,
|
||||
1, rect->bottom - rect->top - i, PATCOPY );
|
||||
@ -669,7 +670,7 @@ void GRAPH_DrawReliefRect( HDC hdc, RECT *rect, int thickness, BOOL pressed )
|
||||
|
||||
SelectObject( hdc, pressed ? sysColorObjects.hbrushBtnHighlight :
|
||||
sysColorObjects.hbrushBtnShadow );
|
||||
for (i = 0; i < thickness; i++)
|
||||
for (i = 0; i < shadow_size; i++)
|
||||
{
|
||||
PatBlt( hdc, rect->right - i - 1, rect->top + i,
|
||||
1, rect->bottom - rect->top - i, PATCOPY );
|
||||
@ -882,7 +883,7 @@ BOOL ExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, WORD fillType )
|
||||
XImage *image;
|
||||
DC *dc;
|
||||
|
||||
dprintf_graphics( stddeb, "ExtFloodFill %x %d,%d %06x %d\n",
|
||||
dprintf_graphics( stddeb, "ExtFloodFill %x %d,%d %06lx %d\n",
|
||||
hdc, x, y, color, fillType );
|
||||
dc = (DC *) GDI_GetObjPtr(hdc, DC_MAGIC);
|
||||
if (!dc)
|
||||
|
@ -21,8 +21,8 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
||||
#include "sysmetrics.h"
|
||||
#include "hook.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_MSG /* */
|
||||
/* #undef DEBUG_MSG /* */
|
||||
/* #define DEBUG_MSG */
|
||||
/* #undef DEBUG_MSG */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -240,8 +240,8 @@ static BOOL MSG_TranslateMouseMsg( MSG *msg, BOOL remove )
|
||||
MAKELONG( msg->pt.x, msg->pt.y ) );
|
||||
while ((hittest_result == HTTRANSPARENT) && (msg->hwnd))
|
||||
{
|
||||
msg->hwnd = GetParent(msg->hwnd);
|
||||
if (!msg->hwnd)
|
||||
msg->hwnd = WINPOS_NextWindowFromPoint( msg->hwnd, msg->pt );
|
||||
if (msg->hwnd)
|
||||
hittest_result = SendMessage( msg->hwnd, WM_NCHITTEST, 0,
|
||||
MAKELONG( msg->pt.x, msg->pt.y ) );
|
||||
}
|
||||
@ -934,7 +934,7 @@ LONG DispatchMessage( LPMSG msg )
|
||||
LONG retval;
|
||||
int painting;
|
||||
|
||||
dprintf_msg(stddeb, "Dispatch message hwnd=%08x msg=0x%x w=%d l=%d time=%u pt=%d,%d\n",
|
||||
dprintf_msg(stddeb, "Dispatch message hwnd=%04x msg=0x%x w=%d l=%ld time=%lu pt=%d,%d\n",
|
||||
msg->hwnd, msg->message, msg->wParam, msg->lParam,
|
||||
msg->time, msg->pt.x, msg->pt.y );
|
||||
|
||||
|
@ -9,12 +9,13 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
#include "win.h"
|
||||
#include "class.h"
|
||||
#include "message.h"
|
||||
#include "scroll.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "user.h"
|
||||
#include "syscolor.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_NONCLIENT /* */
|
||||
/* #undef DEBUG_NONCLIENT /* */
|
||||
/* #define DEBUG_NONCLIENT */
|
||||
/* #undef DEBUG_NONCLIENT */
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
@ -40,7 +41,9 @@ extern WORD MENU_GetMenuBarHeight( HWND hwnd, WORD menubarWidth,
|
||||
extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT pt ); /* menu.c */
|
||||
extern void MENU_TrackKbdMenuBar( HWND hwnd, WORD wParam ); /* menu.c */
|
||||
extern WORD MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
|
||||
HWND hwnd, BOOL suppress_draw ); /* menu.c */
|
||||
HWND hwnd, BOOL suppress_draw ); /* menu.c */
|
||||
extern void SCROLL_HandleScrollEvent( HWND hwnd, int nBar,
|
||||
WORD msg, POINT pt); /* scroll.c */
|
||||
|
||||
|
||||
/* Some useful macros */
|
||||
@ -545,7 +548,7 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd,
|
||||
void NC_DoNCPaint( HWND hwnd, HRGN hrgn, BOOL active, BOOL suppress_menupaint )
|
||||
{
|
||||
HDC hdc;
|
||||
RECT rect, rect2;
|
||||
RECT rect;
|
||||
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
@ -631,33 +634,19 @@ void NC_DoNCPaint( HWND hwnd, HRGN hrgn, BOOL active, BOOL suppress_menupaint )
|
||||
rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint );
|
||||
}
|
||||
|
||||
if (wndPtr->dwStyle & (WS_VSCROLL | WS_HSCROLL)) {
|
||||
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->VScroll != NULL) &&
|
||||
(wndPtr->scroll_flags & 0x0001)) {
|
||||
int bottom = rect.bottom;
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && (wndPtr->scroll_flags & 0x0001))
|
||||
bottom -= SYSMETRICS_CYHSCROLL;
|
||||
SetRect(&rect2, rect.right - SYSMETRICS_CXVSCROLL,
|
||||
rect.top, rect.right+1, bottom+1);
|
||||
StdDrawScrollBar(hwnd, hdc, SB_VERT, &rect2, wndPtr->VScroll);
|
||||
}
|
||||
if ((wndPtr->dwStyle & WS_HSCROLL) && wndPtr->HScroll != NULL &&
|
||||
(wndPtr->scroll_flags & 0x0002)) {
|
||||
int right = rect.right;
|
||||
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->scroll_flags & 0x0001))
|
||||
right -= SYSMETRICS_CYVSCROLL;
|
||||
SetRect(&rect2, rect.left-1, rect.bottom - SYSMETRICS_CYHSCROLL,
|
||||
right+1, rect.bottom+1);
|
||||
StdDrawScrollBar(hwnd, hdc, SB_HORZ, &rect2, wndPtr->HScroll);
|
||||
}
|
||||
/* Draw the scroll-bars */
|
||||
|
||||
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL) &&
|
||||
(wndPtr->scroll_flags & 0x0003) == 0x0003) {
|
||||
RECT r = rect;
|
||||
r.left = r.right - SYSMETRICS_CXVSCROLL + 1;
|
||||
r.top = r.bottom - SYSMETRICS_CYHSCROLL + 1;
|
||||
FillRect( hdc, &r, sysColorObjects.hbrushScrollbar );
|
||||
}
|
||||
if (wndPtr->dwStyle & WS_VSCROLL) SCROLL_DrawScrollBar(hwnd, hdc, SB_VERT);
|
||||
if (wndPtr->dwStyle & WS_HSCROLL) SCROLL_DrawScrollBar(hwnd, hdc, SB_HORZ);
|
||||
|
||||
/* Draw the "size-box" */
|
||||
|
||||
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL))
|
||||
{
|
||||
RECT r = rect;
|
||||
r.left = r.right - SYSMETRICS_CXVSCROLL + 1;
|
||||
r.top = r.bottom - SYSMETRICS_CYHSCROLL + 1;
|
||||
FillRect( hdc, &r, sysColorObjects.hbrushScrollbar );
|
||||
}
|
||||
|
||||
ReleaseDC( hwnd, hdc );
|
||||
@ -1041,8 +1030,10 @@ static void NC_TrackMinMaxBox( HWND hwnd, WORD wParam )
|
||||
*/
|
||||
static void NC_TrackScrollBar( HWND hwnd, WORD wParam, POINT pt )
|
||||
{
|
||||
MSG msg;
|
||||
WORD scrollbar;
|
||||
MSG msg;
|
||||
WORD scrollbar;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if ((wParam & 0xfff0) == SC_HSCROLL)
|
||||
{
|
||||
if ((wParam & 0x0f) != HTHSCROLL) return;
|
||||
@ -1054,25 +1045,35 @@ static void NC_TrackScrollBar( HWND hwnd, WORD wParam, POINT pt )
|
||||
scrollbar = SB_VERT;
|
||||
}
|
||||
|
||||
ScreenToClient( hwnd, &pt );
|
||||
ScrollBarButtonDown( hwnd, scrollbar, pt.x, pt.y );
|
||||
pt.x -= wndPtr->rectWindow.left;
|
||||
pt.y -= wndPtr->rectWindow.top;
|
||||
SetCapture( hwnd );
|
||||
SCROLL_HandleScrollEvent( hwnd, scrollbar, WM_LBUTTONDOWN, pt );
|
||||
|
||||
do
|
||||
{
|
||||
MSG_GetHardwareMessage( &msg );
|
||||
ScreenToClient( hwnd, &msg.pt );
|
||||
GetMessage( &msg, 0, 0, 0 );
|
||||
switch(msg.message)
|
||||
{
|
||||
case WM_LBUTTONUP:
|
||||
ScrollBarButtonUp( hwnd, scrollbar, msg.pt.x, msg.pt.y );
|
||||
break;
|
||||
case WM_MOUSEMOVE:
|
||||
ScrollBarMouseMove(hwnd, scrollbar, msg.wParam, msg.pt.x,msg.pt.y);
|
||||
case WM_SYSTIMER:
|
||||
pt = MAKEPOINT(msg.lParam);
|
||||
pt.x += wndPtr->rectClient.left - wndPtr->rectWindow.left;
|
||||
pt.y += wndPtr->rectClient.top - wndPtr->rectWindow.top;
|
||||
SCROLL_HandleScrollEvent( hwnd, scrollbar, msg.message, pt );
|
||||
break;
|
||||
default:
|
||||
TranslateMessage( &msg );
|
||||
DispatchMessage( &msg );
|
||||
break;
|
||||
}
|
||||
if (!IsWindow( hwnd ))
|
||||
{
|
||||
ReleaseCapture();
|
||||
break;
|
||||
}
|
||||
} while (msg.message != WM_LBUTTONUP);
|
||||
ReleaseCapture();
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@ -1234,7 +1235,6 @@ LONG NC_HandleSysCommand( HWND hwnd, WORD wParam, POINT pt )
|
||||
|
||||
case SC_VSCROLL:
|
||||
case SC_HSCROLL:
|
||||
if (wndPtr->dwStyle & WS_CHILD) ClientToScreen(wndPtr->hwndParent, &pt);
|
||||
NC_TrackScrollBar( hwnd, wParam, pt );
|
||||
break;
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "win.h"
|
||||
@ -29,16 +30,21 @@ HDC BeginPaint( HWND hwnd, LPPAINTSTRUCT lps )
|
||||
if (!hrgnUpdate) /* Create an empty region */
|
||||
if (!(hrgnUpdate = CreateRectRgn( 0, 0, 0, 0 ))) return 0;
|
||||
|
||||
if (!(lps->hdc = GetDCEx( hwnd, hrgnUpdate,
|
||||
DCX_INTERSECTRGN | DCX_USESTYLE ))) return 0;
|
||||
GetRgnBox( InquireVisRgn(lps->hdc), &lps->rcPaint );
|
||||
|
||||
if (wndPtr->hrgnUpdate || (wndPtr->flags & WIN_INTERNAL_PAINT))
|
||||
MSG_DecPaintCount( wndPtr->hmemTaskQ );
|
||||
|
||||
wndPtr->hrgnUpdate = 0;
|
||||
wndPtr->flags &= ~(WIN_NEEDS_BEGINPAINT | WIN_INTERNAL_PAINT);
|
||||
|
||||
if (!(lps->hdc = GetDCEx( hwnd, hrgnUpdate,
|
||||
DCX_INTERSECTRGN | DCX_USESTYLE )))
|
||||
{
|
||||
fprintf( stderr, "GetDCEx() failed in BeginPaint(), hwnd=%d\n", hwnd );
|
||||
DeleteObject( hrgnUpdate );
|
||||
return 0;
|
||||
}
|
||||
GetRgnBox( InquireVisRgn(lps->hdc), &lps->rcPaint );
|
||||
|
||||
SendMessage( hwnd, WM_NCPAINT, hrgnUpdate, 0 );
|
||||
DeleteObject( hrgnUpdate );
|
||||
|
||||
|
@ -199,6 +199,7 @@ static void WIN_DestroyWindow( HWND hwnd )
|
||||
CLASS *classPtr = CLASS_FindClassPtr( wndPtr->hClass );
|
||||
|
||||
if (!wndPtr || !classPtr) return;
|
||||
WIN_UnlinkWindow( hwnd ); /* Remove the window from the linked list */
|
||||
wndPtr->dwMagic = 0; /* Mark it as invalid */
|
||||
if ((wndPtr->hrgnUpdate) || (wndPtr->flags & WIN_INTERNAL_PAINT))
|
||||
{
|
||||
@ -260,9 +261,8 @@ BOOL WIN_CreateDesktopWindow()
|
||||
wndPtr->dwStyle = WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
||||
wndPtr->dwExStyle = 0;
|
||||
wndPtr->hdce = 0;
|
||||
wndPtr->VScroll = NULL;
|
||||
wndPtr->HScroll = NULL;
|
||||
wndPtr->scroll_flags = 0;
|
||||
wndPtr->hVScroll = 0;
|
||||
wndPtr->hHScroll = 0;
|
||||
wndPtr->wIDmenu = 0;
|
||||
wndPtr->hText = 0;
|
||||
wndPtr->flags = 0;
|
||||
@ -380,15 +380,14 @@ HWND CreateWindowEx( DWORD exStyle, LPSTR className, LPSTR windowName,
|
||||
wndPtr->lpfnWndProc = classPtr->wc.lpfnWndProc;
|
||||
wndPtr->dwStyle = style;
|
||||
wndPtr->dwExStyle = exStyle;
|
||||
wndPtr->wIDmenu = 0;
|
||||
wndPtr->wIDmenu = 0;
|
||||
wndPtr->hText = 0;
|
||||
wndPtr->flags = 0;
|
||||
wndPtr->VScroll = NULL;
|
||||
wndPtr->HScroll = NULL;
|
||||
wndPtr->scroll_flags = 0;
|
||||
wndPtr->hVScroll = 0;
|
||||
wndPtr->hHScroll = 0;
|
||||
wndPtr->hSysMenu = 0;
|
||||
wndPtr->hProp = 0;
|
||||
wndPtr->hTask = 0;
|
||||
wndPtr->hProp = 0;
|
||||
wndPtr->hTask = 0;
|
||||
|
||||
if (classPtr->wc.cbWndExtra)
|
||||
memset( wndPtr->wExtra, 0, classPtr->wc.cbWndExtra );
|
||||
@ -556,9 +555,6 @@ BOOL DestroyWindow( HWND hwnd )
|
||||
/* Remove the window from current task windows list */
|
||||
RemoveWindowFromTask(GetCurrentTask(), hwnd);
|
||||
|
||||
/* Remove the window from the linked list */
|
||||
WIN_UnlinkWindow( hwnd );
|
||||
|
||||
/* Destroy the window */
|
||||
|
||||
WIN_DestroyWindow( hwnd );
|
||||
|
@ -102,7 +102,6 @@ HWND WindowFromPoint( POINT pt )
|
||||
return hwndRet;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ChildWindowFromPoint (USER.191)
|
||||
*/
|
||||
@ -399,6 +398,32 @@ BOOL SetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl )
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* WINPOS_NextWindowFromPoint
|
||||
*
|
||||
* Looks for next enabled window that is
|
||||
* a) sibling of hwnd, later in Z-order and encloses pt, or
|
||||
* b) parent of hwnd
|
||||
*/
|
||||
HWND WINPOS_NextWindowFromPoint( HWND hwnd, POINT pt )
|
||||
{
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!wndPtr->hwndParent) return hwnd; /* desktop window */
|
||||
ScreenToClient( wndPtr->hwndParent, &pt ); /* make pt relative to parent */
|
||||
for (;;)
|
||||
{
|
||||
if (!wndPtr->hwndNext) break; /* No more children */
|
||||
hwnd = wndPtr->hwndNext;
|
||||
wndPtr = WIN_FindWndPtr( hwnd );
|
||||
if ((wndPtr->dwStyle & WS_VISIBLE) &&
|
||||
!(wndPtr->dwStyle & WS_DISABLED) &&
|
||||
PtInRect( &wndPtr->rectWindow, pt )) return hwnd;
|
||||
}
|
||||
return wndPtr->hwndParent;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* WINPOS_GetMinMaxInfo
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user