Release 941107
Sun Nov 6 18:52:04 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [objects/oembitmap.c] (New file) Added possibility to use .xpm files for OEM bitmaps. * [include/bitmaps/obm*] (New files) Redrawn all OEM bitmaps in xpm format. * [objects/font.c] Add space for internal leading when using a negative font height. Stubs for AddFontResource() and RemoveFontResource(). Fix in FONT_Init() for uninitialised default font. * [windows/dialog.c] Make font height negative as it is really a point size and not a pixel size; dialogs using 8-point fonts look better now. * [windows/graphics.c] Fixed the fix :-) for Pie() to make it work for Arc() and Chord() also. * [windows/nonclient.c] A few changes for new OEM bitmaps. Sun Nov 6 18:22:18 1994 Michael Patra <micky@marie.physik.tu-berlin.de> * [windows/class.c] The names of local classes have to be stored using GlobalAtom*. Otherwise they couldn't be accessed from other modules (e.g. BWCC) * [if1632/call.S] CallTo16(cx): It's possible to set the contents of the cx-register. * [loader/ne_image.c] InitNEDLL(): The size of the local heap is now passed in the cx- register when initializing a DLL. * [memory/heap.c] LocalInit(): The case start==0 is now handled in the way it should. * [windows/win.c] GetWindowLong(): If the adress of the windows function is requested it's no longer returned if it's within the Wine code (and therefore unreachable by a windows program). This makes Borland's OWL happy. * [controls/edit.c] EDIT_GetStr(): Added handling for off<0. Sun Nov 6 17:37:14 1994 Chris Jones <chrisj@ichips.intel.com> * [loader/library.c] Fixed infinite loop bug when two DLLs refer to each other (fixes hangup of Quicken during loading). Thu Nov 04 12:00:00 1994 Jan Willamowius (jan@janhh.sh.sub.de) * [misc/dos_fs.c] Bug fix: The size of a disk an the available space is now returned in bytes instead of (incorrectly) KBytes. Thu Nov 03 12:00:00 1994 Jan Willamowius (jan@janhh.sh.sub.de) * [windows/graphics.c] Bug fix: Pie segments are now filled with correct brush. Thu Nov 3 10:40:09 1994 Martin von Loewis (martin@cs.csufresno.edu) * [Imakefile] generate rc.o before loader.o * [controls/menu.c] CopySysMenu: generate SYSMENU on the fly, eliminate hSysMenu * [include/resource.h] Add struct ResourceTable * [loader/bitmap.h] Load system bitmaps from sysresbmTable * [misc/clipboard.c] [windows/event.c] IsClipboardFormatAvailable,EVENT_SelectionRequest: bug fixes * [rc/Imakefile] generate rc.o from sysres.o and sysresbm.o. Added -lfl * [rc/rc.y] change style handling to allow ( S1 | S2 ) | S3 * [rc/sysres.rc] [rc/sysresbm.rc] Put bitmaps and icons to sysresbm, everything else to sysres * [rc/winerc.c] [rc/winerc.h] Added -o, -c flags. New function set_out_file. Output to files. * [windows/dialog.c] DialogBoxIndirectPtr, DialogBoxIndirectParamPtr: New functions * [windows/nonclient.c] Create AboutWine dialog from template pointer
This commit is contained in:
parent
3a405baf38
commit
3ed37e0869
108
ChangeLog
108
ChangeLog
|
@ -1,3 +1,106 @@
|
|||
Sun Nov 6 18:52:04 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
|
||||
|
||||
* [objects/oembitmap.c] (New file)
|
||||
Added possibility to use .xpm files for OEM bitmaps.
|
||||
|
||||
* [include/bitmaps/obm*] (New files)
|
||||
Redrawn all OEM bitmaps in xpm format.
|
||||
|
||||
* [objects/font.c]
|
||||
Add space for internal leading when using a negative font height.
|
||||
Stubs for AddFontResource() and RemoveFontResource().
|
||||
Fix in FONT_Init() for uninitialised default font.
|
||||
|
||||
* [windows/dialog.c]
|
||||
Make font height negative as it is really a point size and not a
|
||||
pixel size; dialogs using 8-point fonts look better now.
|
||||
|
||||
* [windows/graphics.c]
|
||||
Fixed the fix :-) for Pie() to make it work for Arc() and Chord() also.
|
||||
|
||||
* [windows/nonclient.c]
|
||||
A few changes for new OEM bitmaps.
|
||||
|
||||
Sun Nov 6 18:22:18 1994 Michael Patra <micky@marie.physik.tu-berlin.de>
|
||||
|
||||
* [windows/class.c]
|
||||
The names of local classes have to be stored using GlobalAtom*.
|
||||
Otherwise they couldn't be accessed from other modules (e.g. BWCC)
|
||||
|
||||
* [if1632/call.S]
|
||||
CallTo16(cx): It's possible to set the contents of the cx-register.
|
||||
|
||||
* [loader/ne_image.c]
|
||||
InitNEDLL(): The size of the local heap is now passed in the cx-
|
||||
register when initializing a DLL.
|
||||
|
||||
* [memory/heap.c]
|
||||
LocalInit(): The case start==0 is now handled in the way it should.
|
||||
|
||||
* [windows/win.c]
|
||||
GetWindowLong(): If the adress of the windows function is requested
|
||||
it's no longer returned if it's within the Wine code (and therefore
|
||||
unreachable by a windows program). This makes Borland's OWL happy.
|
||||
|
||||
* [controls/edit.c]
|
||||
EDIT_GetStr(): Added handling for off<0.
|
||||
|
||||
Sun Nov 6 17:37:14 1994 Chris Jones <chrisj@ichips.intel.com>
|
||||
|
||||
* [loader/library.c]
|
||||
Fixed infinite loop bug when two DLLs refer to each other (fixes
|
||||
hangup of Quicken during loading).
|
||||
|
||||
Thu Nov 04 12:00:00 1994 Jan Willamowius (jan@janhh.sh.sub.de)
|
||||
|
||||
* [misc/dos_fs.c]
|
||||
Bug fix: The size of a disk an the available space
|
||||
is now returned in bytes instead of (incorrectly)
|
||||
KBytes.
|
||||
|
||||
Thu Nov 03 12:00:00 1994 Jan Willamowius (jan@janhh.sh.sub.de)
|
||||
|
||||
* [windows/graphics.c]
|
||||
Bug fix: Pie segments are now filled with correct brush.
|
||||
|
||||
Thu Nov 3 10:40:09 1994 Martin von Loewis (martin@cs.csufresno.edu)
|
||||
|
||||
* [Imakefile]
|
||||
generate rc.o before loader.o
|
||||
|
||||
* [controls/menu.c]
|
||||
CopySysMenu: generate SYSMENU on the fly, eliminate hSysMenu
|
||||
|
||||
* [include/resource.h]
|
||||
Add struct ResourceTable
|
||||
|
||||
* [loader/bitmap.h]
|
||||
Load system bitmaps from sysresbmTable
|
||||
|
||||
* [misc/clipboard.c]
|
||||
[windows/event.c]
|
||||
IsClipboardFormatAvailable,EVENT_SelectionRequest: bug fixes
|
||||
|
||||
* [rc/Imakefile]
|
||||
generate rc.o from sysres.o and sysresbm.o. Added -lfl
|
||||
|
||||
* [rc/rc.y]
|
||||
change style handling to allow ( S1 | S2 ) | S3
|
||||
|
||||
* [rc/sysres.rc]
|
||||
[rc/sysresbm.rc]
|
||||
Put bitmaps and icons to sysresbm, everything else to sysres
|
||||
|
||||
* [rc/winerc.c]
|
||||
[rc/winerc.h]
|
||||
Added -o, -c flags. New function set_out_file. Output to files.
|
||||
|
||||
* [windows/dialog.c]
|
||||
DialogBoxIndirectPtr, DialogBoxIndirectParamPtr: New functions
|
||||
|
||||
* [windows/nonclient.c]
|
||||
Create AboutWine dialog from template pointer
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Sun Oct 30 13:01:18 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
|
||||
|
||||
|
@ -346,6 +449,11 @@ Sat Oct 15 17:35:00 PDT 1994 <martin@cs.csufresno.edu>
|
|||
* [debugger/info.c]
|
||||
symbolic backtrace for 32-bit stack. Breaks 16-bit bt.
|
||||
|
||||
Sun Sep 25 12:00:00 PDT 1994 <martin@osiris.cs.csufresno.edu>
|
||||
|
||||
* [rc/rc.y] [rc/rc.h] [rc/rc.l] [rc/winerc.c]
|
||||
Files created
|
||||
|
||||
Sun Sep 18 11:04:45 MET DST 1994 Dag Asheim (dash@ifi.uio.no)
|
||||
|
||||
* [misc/spy.c]
|
||||
|
|
16
Configure
16
Configure
|
@ -41,6 +41,7 @@ else
|
|||
# if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
# then
|
||||
# PROCEMU='#define PROCEMU'
|
||||
# ALLDEFINES="$ALLDEFINES -DPROCEMU"
|
||||
# echo
|
||||
# echo -n 'bochs directory [/usr/src/bochs]? '
|
||||
# read input
|
||||
|
@ -65,6 +66,17 @@ else
|
|||
SHORTNAMES=''
|
||||
fi
|
||||
|
||||
echo
|
||||
echo -n 'Use the XPM library (Y/N) [N]? '
|
||||
read input
|
||||
if [ "$input" = 'y' -o "$input" = 'Y' ]
|
||||
then
|
||||
XPM='#define USE_XPM'
|
||||
ALLDEFINES="$ALLDEFINES -DUSE_XPM"
|
||||
else
|
||||
XPM=''
|
||||
fi
|
||||
|
||||
prompt "Global configfile name" WINE_CONFIGFILE /usr/local/etc/wine.conf
|
||||
|
||||
WINE_INI_GLOBAL='#define WINE_INI_GLOBAL "'$WINE_CONFIGFILE'"'
|
||||
|
@ -179,16 +191,16 @@ fi
|
|||
NEWLINUXLDT=''
|
||||
if grep -s seg_not_present /usr/include/linux/ldt.h 2> /dev/null
|
||||
then
|
||||
NEWLINUXLDT='#define NEW_LDT_STRUCT'
|
||||
ALLDEFINES="$ALLDEFINES -DNEW_LDT_STRUCT"
|
||||
fi
|
||||
|
||||
cat > autoconf.h << EOF
|
||||
/* autoconf.h generated automatically. Run Configure. */
|
||||
$WINELIB
|
||||
$SHORTNAMES
|
||||
$XPM
|
||||
$NEWBUILD
|
||||
$WINE_INI_GLOBAL
|
||||
$NEWLINUXLDT
|
||||
$ENDIAN
|
||||
$PROCEMUDIR
|
||||
#define AutoDefines $ALLDEFINES
|
||||
|
|
11
Imakefile
11
Imakefile
|
@ -27,10 +27,10 @@ COMMONSUBDIRS = \
|
|||
controls \
|
||||
etc \
|
||||
include \
|
||||
rc \
|
||||
loader \
|
||||
misc \
|
||||
objects \
|
||||
rc \
|
||||
test \
|
||||
windows
|
||||
|
||||
|
@ -51,6 +51,7 @@ COMMONOBJS = \
|
|||
loader.o \
|
||||
misc.o \
|
||||
objects.o \
|
||||
rc.o \
|
||||
windows.o
|
||||
|
||||
/*
|
||||
|
@ -86,12 +87,18 @@ SYSLIBS = -ll -lm -lgnumalloc
|
|||
SYSLIBS = -lm -lg
|
||||
#endif
|
||||
|
||||
#ifdef USE_XPM
|
||||
XPM_LIB = -lXpm
|
||||
#else
|
||||
XPM_LIB =
|
||||
#endif
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
DependSubdirs($(SUBDIRS))
|
||||
AllTarget(wine.sym)
|
||||
|
||||
#ifndef WINELIB
|
||||
NormalProgramTarget(wine,$(EMUOBJS) $(COMMONOBJS),$(DEPXLIB),$(XLIB),$(SYSLIBS))
|
||||
NormalProgramTarget(wine,$(EMUOBJS) $(COMMONOBJS),$(DEPXLIB),$(XPM_LIB) $(XLIB),$(SYSLIBS))
|
||||
#else
|
||||
NormalLibraryTarget(wine,$(LIBOBJS) $(COMMONOBJS))
|
||||
#endif
|
||||
|
|
|
@ -1,2 +1,9 @@
|
|||
/* autoconf.h generated automatically. Run Configure. */
|
||||
#error You must run Configure before you can build the makefiles.
|
||||
|
||||
|
||||
|
||||
|
||||
#define WINE_INI_GLOBAL "/home/alex/wine/wine.conf"
|
||||
|
||||
|
||||
#define AutoDefines -DNEW_LDT_STRUCT
|
||||
|
|
|
@ -57,7 +57,7 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
case WM_CREATE:
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
if (wndPtr == NULL) return 0;
|
||||
dprintf_combo(stddeb,"Combo WM_CREATE %p !\n", lphc);
|
||||
dprintf_combo(stddeb,"Combo WM_CREATE %d !\n", hwnd);
|
||||
if (hComboBit == (HBITMAP)NULL)
|
||||
hComboBit = LoadBitmap((HINSTANCE)NULL, MAKEINTRESOURCE(OBM_COMBO));
|
||||
GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
|
||||
|
@ -388,6 +388,7 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
dprintf_combo(stddeb,"ComboBox CB_SHOWDROPDOWN !\n");
|
||||
lphc = ComboGetStorageHeader(hwnd);
|
||||
if (lphc == NULL) return 0;
|
||||
wndPtr = WIN_FindWndPtr(hwnd);
|
||||
lphc->dwState = lphc->dwState | CB_SHOWDROPDOWN;
|
||||
if (wParam != 0) {
|
||||
GetWindowRect(hwnd, &rect);
|
||||
|
@ -481,6 +482,7 @@ void ComboBoxStaticOwnerDraw(HWND hWnd, LPHEADCOMBO lphc)
|
|||
SendMessage(lphc->hWndLBox, LB_GETTEXT, y, (LPARAM)str);
|
||||
ptr = (LPSTR)SendMessage(lphc->hWndLBox, LB_GETITEMDATA, y, 0L);
|
||||
}
|
||||
hDC = GetDC(hWnd);
|
||||
hBrush = SendMessage(GetParent(hWnd), WM_CTLCOLOR, (WORD)hDC,
|
||||
MAKELONG(hWnd, CTLCOLOR_STATIC));
|
||||
if (hBrush == (HBRUSH)NULL) hBrush = GetStockObject(WHITE_BRUSH);
|
||||
|
@ -490,9 +492,9 @@ void ComboBoxStaticOwnerDraw(HWND hWnd, LPHEADCOMBO lphc)
|
|||
lpdis = (LPDRAWITEMSTRUCT) USER_HEAP_ADDR(hTemp);
|
||||
if (lpdis == NULL) {
|
||||
printf("ComboBox Ownerdraw // Error allocating DRAWITEMSTRUCT !\n");
|
||||
ReleaseDC( hWnd, hDC );
|
||||
return;
|
||||
}
|
||||
hDC = GetDC(hWnd);
|
||||
FillRect(hDC, &lphc->RectEdit, hBrush);
|
||||
lpdis->hDC = hDC;
|
||||
if (y != LB_ERR) lpdis->itemID = y - 1;
|
||||
|
|
|
@ -16,7 +16,6 @@ static char Copyright[] = "Copyright David W. Metcalfe, 1994";
|
|||
#include "win.h"
|
||||
#include "class.h"
|
||||
#include "user.h"
|
||||
#include "scroll.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_EDIT */
|
||||
/* #undef DEBUG_EDIT */
|
||||
|
@ -583,7 +582,7 @@ long EDIT_CreateMsg(HWND hwnd, LONG lParam)
|
|||
memset(text, ' ', (ClientWidth(wndPtr) / charWidths[32]) + 2);
|
||||
|
||||
/* set up text cursor for edit class */
|
||||
CLASS_FindClassByName("EDIT", &classPtr);
|
||||
CLASS_FindClassByName("EDIT", 0, &classPtr);
|
||||
classPtr->wc.hCursor = LoadCursor(0, IDC_IBEAM);
|
||||
|
||||
/* paint background on first WM_PAINT */
|
||||
|
@ -1093,18 +1092,18 @@ HANDLE EDIT_GetStr(HWND hwnd, char *lp, int off, int len, int *diff)
|
|||
{
|
||||
HANDLE hStr;
|
||||
char *str;
|
||||
int ch = 0, i = 0, j, s_i;
|
||||
int ch = 0, i = 0, j, s_i=0;
|
||||
int ch1;
|
||||
|
||||
dprintf_edit(stddeb,"EDIT_GetStr %s %d %d\n", lp, off, len);
|
||||
dprintf_edit(stddeb,"EDIT_GetStr lp='%s' off=%d len=%d\n", lp, off, len);
|
||||
|
||||
if (off<0) off=0;
|
||||
while (i < off)
|
||||
{
|
||||
s_i = i;
|
||||
i += EDIT_CharWidth(hwnd, (BYTE)(*(lp + ch)), i);
|
||||
ch++;
|
||||
}
|
||||
|
||||
/* if stepped past _off_, go back a character */
|
||||
if (i - off)
|
||||
{
|
||||
|
@ -1113,7 +1112,6 @@ HANDLE EDIT_GetStr(HWND hwnd, char *lp, int off, int len, int *diff)
|
|||
}
|
||||
*diff = off - i;
|
||||
ch1 = ch;
|
||||
|
||||
while (i < len + off)
|
||||
{
|
||||
i += EDIT_CharWidth(hwnd, (BYTE)(*(lp + ch)), i);
|
||||
|
@ -2176,7 +2174,7 @@ void EDIT_MouseMoveMsg(HWND hwnd, WORD wParam, LONG lParam)
|
|||
|
||||
int EDIT_PixelToChar(HWND hwnd, int row, int *pixel)
|
||||
{
|
||||
int ch = 0, i = 0, s_i;
|
||||
int ch = 0, i = 0, s_i = 0;
|
||||
char *text;
|
||||
|
||||
dprintf_edit(stddeb,"EDIT_PixelToChar: row=%d, pixel=%d\n", row, *pixel);
|
||||
|
@ -2214,12 +2212,14 @@ LONG EDIT_SetTextMsg(HWND hwnd, LONG lParam)
|
|||
|
||||
if (strlen((char *)lParam) <= es->MaxTextLen)
|
||||
{
|
||||
len = strlen((char *)lParam);
|
||||
len = ( lParam? strlen((char *)lParam) : 0 );
|
||||
EDIT_ClearText(hwnd);
|
||||
es->textlen = len;
|
||||
es->hText = EDIT_HeapReAlloc(hwnd, es->hText, len + 3);
|
||||
text = EDIT_HeapAddr(hwnd, es->hText);
|
||||
if (lParam)
|
||||
strcpy(text, (char *)lParam);
|
||||
text[len] = '\0';
|
||||
text[len + 1] = '\0';
|
||||
text[len + 2] = '\0';
|
||||
EDIT_BuildTextPointers(hwnd);
|
||||
|
|
|
@ -19,7 +19,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
|
|||
#include "msdos.h"
|
||||
#include "wine.h"
|
||||
#include "listbox.h"
|
||||
#include "scroll.h"
|
||||
#include "prototypes.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_LISTBOX */
|
||||
|
@ -58,11 +57,6 @@ int ListBoxFindNextMatch(HWND hwnd, WORD wChar);
|
|||
((wndPtr->dwStyle & LBS_OWNERDRAWVARIABLE) != LBS_OWNERDRAWVARIABLE) ) || \
|
||||
((wndPtr->dwStyle & LBS_HASSTRINGS) == LBS_HASSTRINGS) )
|
||||
|
||||
#define HasStrings(wndPtr) ( \
|
||||
( ((wndPtr->dwStyle & LBS_OWNERDRAWFIXED) != LBS_OWNERDRAWFIXED) && \
|
||||
((wndPtr->dwStyle & LBS_OWNERDRAWVARIABLE) != LBS_OWNERDRAWVARIABLE) ) || \
|
||||
((wndPtr->dwStyle & LBS_HASSTRINGS) == LBS_HASSTRINGS) )
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* ListBoxWndProc
|
||||
|
@ -399,6 +393,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
wRet = ListBoxAddString(hwnd, (LPSTR)lParam);
|
||||
return wRet;
|
||||
case LB_GETTEXT:
|
||||
dprintf_listbox(stddeb, "LB_GETTEXT wParam=%d\n",wParam);
|
||||
wRet = ListBoxGetText(hwnd, wParam, (LPSTR)lParam, FALSE);
|
||||
return wRet;
|
||||
case LB_INSERTSTRING:
|
||||
|
@ -423,7 +418,8 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
case LB_GETHORIZONTALEXTENT:
|
||||
return wRet;
|
||||
case LB_GETITEMDATA:
|
||||
lRet = ListBoxGetText(hwnd, wParam, (LPSTR)lParam, HasStrings(wndPtr));
|
||||
dprintf_listbox(stddeb, "LB_GETITEMDATA wParam=%x\n", wParam);
|
||||
lRet = ListBoxGetText(hwnd, wParam, (LPSTR)lParam, TRUE);
|
||||
return lRet;
|
||||
case LB_GETITEMHEIGHT:
|
||||
ListBoxGetItemRect(hwnd, wParam, &rect);
|
||||
|
@ -460,6 +456,7 @@ LONG ListBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
|
|||
case LB_SETHORIZONTALEXTENT:
|
||||
return wRet;
|
||||
case LB_SETITEMDATA:
|
||||
dprintf_listbox(stddeb, "LB_SETITEMDATA wParam=%x lParam=%lx\n", wParam, lParam);
|
||||
wRet = ListBoxSetItemData(hwnd, wParam, lParam);
|
||||
return wRet;
|
||||
case LB_SETTABSTOPS:
|
||||
|
@ -960,6 +957,8 @@ int ListBoxGetText(HWND hwnd, UINT uIndex, LPSTR OutStr, BOOL bItemData)
|
|||
LPHEADLIST lphl;
|
||||
LPLISTSTRUCT lpls;
|
||||
UINT Count;
|
||||
if ((!OutStr)&&(!bItemData))
|
||||
fprintf(stderr, "ListBoxGetText // OutStr==NULL\n");
|
||||
if (!bItemData) *OutStr=0;
|
||||
lphl = ListBoxGetWindowAndStorage(hwnd, &wndPtr);
|
||||
if (lphl == NULL) return LB_ERR;
|
||||
|
@ -1083,6 +1082,8 @@ int ListBoxResetContent(HWND hwnd)
|
|||
if (lphl == NULL) return LB_ERR;
|
||||
lpls = lphl->lpFirst;
|
||||
if (lpls == NULL) return LB_ERR;
|
||||
dprintf_listbox(stddeb, "ListBoxResetContent // ItemCount = %d\n",
|
||||
lphl->ItemsCount);
|
||||
for(i = 0; i <= lphl->ItemsCount; i++) {
|
||||
lpls2 = lpls;
|
||||
lpls = (LPLISTSTRUCT)lpls->lpNext;
|
||||
|
|
|
@ -67,7 +67,6 @@ extern BOOL GRAPH_DrawBitmap( HDC hdc, HBITMAP hbitmap, int xdest, int ydest,
|
|||
|
||||
extern HINSTANCE hSysRes;
|
||||
|
||||
static HMENU hSysMenu = 0;
|
||||
static HBITMAP hStdCheck = 0;
|
||||
static HBITMAP hStdMnArrow = 0;
|
||||
|
||||
|
@ -97,14 +96,6 @@ BOOL MENU_Init()
|
|||
arrow_bitmap_width = bm.bmWidth;
|
||||
arrow_bitmap_height = bm.bmHeight;
|
||||
|
||||
/* Load system menu */
|
||||
|
||||
if (!(hSysMenu = LoadMenu( hSysRes, "SYSMENU" )))
|
||||
{
|
||||
fprintf(stderr,"SysMenu not found in system resources !\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1075,13 +1066,12 @@ static BOOL MENU_ButtonUp( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
|||
static BOOL MENU_MouseMove( HWND hwndOwner, HMENU hmenu, HMENU *hmenuCurrent,
|
||||
POINT pt )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
MENUITEM *item;
|
||||
POPUPMENU *menu = (POPUPMENU *) USER_HEAP_ADDR( hmenu );
|
||||
WORD id = NO_SELECTED_ITEM;
|
||||
|
||||
if (hmenu)
|
||||
{
|
||||
menu = (POPUPMENU *) USER_HEAP_ADDR( hmenu );
|
||||
item = MENU_FindItemByCoords( menu, pt.x, pt.y, &id );
|
||||
if (!item) /* Maybe in system menu */
|
||||
{
|
||||
|
@ -2049,20 +2039,16 @@ HMENU LoadMenuIndirect(LPSTR menu_template)
|
|||
HMENU CopySysMenu()
|
||||
{
|
||||
HMENU hMenu;
|
||||
LPPOPUPMENU sysmenu, menu;
|
||||
MENUITEM *item;
|
||||
int i;
|
||||
LPPOPUPMENU menu;
|
||||
extern unsigned char sysres_MENU_SYSMENU[];
|
||||
|
||||
sysmenu = (LPPOPUPMENU) USER_HEAP_ADDR(hSysMenu);
|
||||
if (!(hMenu = CreatePopupMenu())) return 0;
|
||||
menu = (POPUPMENU *) USER_HEAP_ADDR( hMenu );
|
||||
menu->wFlags |= MF_SYSMENU;
|
||||
item = (MENUITEM *) USER_HEAP_ADDR( sysmenu->hItems );
|
||||
for (i = 0; i < sysmenu->nItems; i++, item++)
|
||||
{
|
||||
AppendMenu( hMenu, item->item_flags, item->item_id, item->item_text );
|
||||
hMenu=LoadMenuIndirect(sysres_MENU_SYSMENU);
|
||||
if(!hMenu){
|
||||
dprintf_menu(stddeb,"No SYSMENU\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
menu = (POPUPMENU*) USER_HEAP_ADDR(hMenu);
|
||||
menu->wFlags |= MF_SYSMENU|MF_POPUP;
|
||||
dprintf_menu(stddeb,"CopySysMenu hMenu=%04X !\n", hMenu);
|
||||
return hMenu;
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#define UDATASEL 0x27
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
#define A( addr) addr
|
||||
#define A(addr) addr
|
||||
#else
|
||||
#define A( addr) _##addr
|
||||
#define A(addr) _##addr
|
||||
#endif
|
||||
.data
|
||||
jump_target:
|
||||
|
@ -21,22 +21,22 @@ return_value:
|
|||
* Places to keep info about the current 32-bit stack frame.
|
||||
*/
|
||||
.globl A( IF1632_Saved32_esp), A(IF1632_Saved32_ebp), A(IF1632_Saved32_ss)
|
||||
A(IF1632_Saved32_esp):
|
||||
A(IF1632_Saved32_esp:)
|
||||
.long 0
|
||||
A(IF1632_Saved32_ebp):
|
||||
A(IF1632_Saved32_ebp:)
|
||||
.long 0
|
||||
A(IF1632_Saved32_ss):
|
||||
A(IF1632_Saved32_ss:)
|
||||
.word 0
|
||||
|
||||
/**********************************************************************
|
||||
* Places to keep info about the current 16-bit stack frame.
|
||||
*/
|
||||
.globl A(IF1632_Saved16_esp),A(IF1632_Saved16_ebp),A(IF1632_Saved16_ss)
|
||||
A(IF1632_Saved16_esp):
|
||||
A(IF1632_Saved16_esp:)
|
||||
.long 0
|
||||
A(IF1632_Saved16_ebp):
|
||||
A(IF1632_Saved16_ebp:)
|
||||
.long 0
|
||||
A(IF1632_Saved16_ss):
|
||||
A(IF1632_Saved16_ss:)
|
||||
.word 0
|
||||
|
||||
nbytes:
|
||||
|
@ -62,7 +62,7 @@ offset:
|
|||
*/
|
||||
.align 4
|
||||
.globl A(CallToInit16)
|
||||
A(CallToInit16):
|
||||
A(CallToInit16:)
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
|
||||
|
@ -154,17 +154,20 @@ A(CallToInit16):
|
|||
ret
|
||||
|
||||
/**********************************************************************
|
||||
* int CallTo16(unsigned long csip, unsigned short ds)
|
||||
* int CallTo16 (unsigned long csip, unsigned short ds)
|
||||
* int CallTo16cx(unsigned long csip, unsigned long dscx);
|
||||
*
|
||||
* Stack: 0 ebp
|
||||
* 4 eip
|
||||
* 8 target ip
|
||||
* 10 target cs
|
||||
* 12 target ds
|
||||
* 14 target cx (only CallTo16cx)
|
||||
*/
|
||||
.align 4
|
||||
.globl A(CallTo16)
|
||||
A(CallTo16):
|
||||
.globl A(CallTo16), A(CallTo16cx)
|
||||
A(CallTo16:)
|
||||
A(CallTo16cx:)
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
|
||||
|
@ -175,6 +178,7 @@ A(CallTo16):
|
|||
movl %eax,jump_target
|
||||
lea jump_target,%edx
|
||||
movw 12(%ebp),%ax
|
||||
movw 14(%ebp),%cx
|
||||
|
||||
/*
|
||||
* Switch to 16-bit stack
|
||||
|
@ -252,7 +256,7 @@ A(CallTo16):
|
|||
*/
|
||||
.align 4
|
||||
.globl A(CallTo32)
|
||||
A(CallTo32):
|
||||
A(CallTo32:)
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
|
||||
|
@ -354,7 +358,7 @@ noargs:
|
|||
*/
|
||||
.align 4
|
||||
.globl A(CallTo32_16)
|
||||
A(CallTo32_16):
|
||||
A(CallTo32_16:)
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
|
||||
|
@ -443,7 +447,7 @@ noargs2:
|
|||
* ReturnFromRegisterFunc()
|
||||
*/
|
||||
.globl A(ReturnFromRegisterFunc)
|
||||
A(ReturnFromRegisterFunc):
|
||||
A(ReturnFromRegisterFunc:)
|
||||
/*
|
||||
* Restore 16-bit stack
|
||||
*/
|
||||
|
|
|
@ -32,11 +32,6 @@ struct thunk_s
|
|||
unsigned char thunk[10];
|
||||
};
|
||||
|
||||
static __inline__ int Is16bitAddress(void *address)
|
||||
{
|
||||
return ((unsigned int) address
|
||||
>= (((FIRST_SELECTOR << 3) | 0x0007) << 16));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* PushOn16
|
||||
|
@ -197,7 +192,7 @@ LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
|
|||
exit(1);
|
||||
}
|
||||
}
|
||||
else if (Is16bitAddress(func))
|
||||
else if (IS_16_BIT_ADDRESS(func))
|
||||
{
|
||||
dprintf_callback(stddeb, "CallWindowProc // 16bit func=%p !\n", func);
|
||||
PushOn16( CALLBACK_SIZE_WORD, hwnd );
|
||||
|
@ -219,7 +214,7 @@ LONG CallWindowProc( WNDPROC func, HWND hwnd, WORD message,
|
|||
*/
|
||||
void CallLineDDAProc(FARPROC func, short xPos, short yPos, long lParam)
|
||||
{
|
||||
if (Is16bitAddress(func))
|
||||
if (IS_16_BIT_ADDRESS(func))
|
||||
{
|
||||
PushOn16( CALLBACK_SIZE_WORD, xPos );
|
||||
PushOn16( CALLBACK_SIZE_WORD, yPos );
|
||||
|
@ -238,7 +233,7 @@ void CallLineDDAProc(FARPROC func, short xPos, short yPos, long lParam)
|
|||
*/
|
||||
DWORD CallHookProc( HOOKPROC func, short code, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if (Is16bitAddress(func))
|
||||
if (IS_16_BIT_ADDRESS(func))
|
||||
{
|
||||
PushOn16( CALLBACK_SIZE_WORD, code );
|
||||
PushOn16( CALLBACK_SIZE_WORD, wParam );
|
||||
|
@ -257,7 +252,7 @@ DWORD CallHookProc( HOOKPROC func, short code, WPARAM wParam, LPARAM lParam )
|
|||
*/
|
||||
BOOL CallGrayStringProc(FARPROC func, HDC hdc, LPARAM lParam, INT cch )
|
||||
{
|
||||
if (Is16bitAddress(func))
|
||||
if (IS_16_BIT_ADDRESS(func))
|
||||
{
|
||||
PushOn16( CALLBACK_SIZE_WORD, hdc );
|
||||
PushOn16( CALLBACK_SIZE_LONG, lParam );
|
||||
|
|
|
@ -125,6 +125,7 @@ length 490
|
|||
105 pascal16 SelectVisRgn(word word) SelectVisRgn(1 2)
|
||||
106 pascal SetBitmapBits(word long ptr) SetBitmapBits(1 2 3)
|
||||
117 pascal SetDCOrg(word s_word s_word) SetDCOrg(1 2 3)
|
||||
119 pascal16 AddFontResource(ptr) AddFontResource(1)
|
||||
#121 pascal Death
|
||||
#122 pascal ReSurRection
|
||||
123 pascal16 PlayMetaFile(word word) PlayMetaFile(1 2)
|
||||
|
@ -140,7 +141,7 @@ length 490
|
|||
133 pascal16 GetEnvironment(ptr ptr word) GetEnvironment(1 2 3)
|
||||
134 pascal16 GetRgnBox(word ptr) GetRgnBox(1 2)
|
||||
#135 pascal ScanLr
|
||||
#136 pascal RemoveFontResource
|
||||
136 pascal16 RemoveFontResource(ptr) RemoveFontResource(1)
|
||||
148 pascal SetBrushOrg(word s_word s_word) SetBrushOrg(1 2 3)
|
||||
149 pascal GetBrushOrg(word) GetBrushOrg(1)
|
||||
150 pascal16 UnrealizeObject(word) UnrealizeObject(1)
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/* XPM */
|
||||
static char * obm_btncorners[] = {
|
||||
"30 10 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" .... ",
|
||||
" .... ...... ",
|
||||
" . . .. .. .... ",
|
||||
" . . .. .. .... ",
|
||||
" . . .. .. .... ",
|
||||
" . . .. .. .... ",
|
||||
" .... ...... ",
|
||||
" .... ",
|
||||
" "};
|
|
@ -0,0 +1,20 @@
|
|||
/* XPM */
|
||||
static char * obm_btsize[] = {
|
||||
"15 15 2 1",
|
||||
" c black",
|
||||
". c white",
|
||||
" ",
|
||||
" ....... ..... ",
|
||||
" ....... ..... ",
|
||||
" ....... ..... ",
|
||||
" ....... ..... ",
|
||||
" ....... ..... ",
|
||||
" ....... ..... ",
|
||||
" ....... ..... ",
|
||||
" ..... ",
|
||||
" ............. ",
|
||||
" ............. ",
|
||||
" ............. ",
|
||||
" ............. ",
|
||||
" ............. ",
|
||||
" "};
|
|
@ -0,0 +1,19 @@
|
|||
/* XPM */
|
||||
static char * obm_check[] = {
|
||||
"14 14 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" . ",
|
||||
" . ",
|
||||
" .. ",
|
||||
" . ",
|
||||
" .. ",
|
||||
" .. . ",
|
||||
" .. .. ",
|
||||
" . . ",
|
||||
" ... ",
|
||||
" . ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,44 @@
|
|||
/* XPM */
|
||||
static char * obm_checkboxes[] = {
|
||||
"56 39 2 1",
|
||||
" c black",
|
||||
". c white",
|
||||
" . . . .",
|
||||
" ........... . ......... . . .",
|
||||
" ........... . . ....... . . ......... . ....... .",
|
||||
" ........... . .. ..... .. . ......... . . ..... . .",
|
||||
" ........... . ... ... ... . ......... . .. ... .. .",
|
||||
" ........... . .... . .... . ......... . ... . ... .",
|
||||
" ........... . ..... ..... . ......... . .... .... .",
|
||||
" ........... . .... . .... . ......... . ... . ... .",
|
||||
" ........... . ... ... ... . ......... . .. ... .. .",
|
||||
" ........... . .. ..... .. . ......... . . ..... . .",
|
||||
" ........... . . ....... . . ......... . ....... .",
|
||||
" ........... . ......... . . .",
|
||||
" . . . .",
|
||||
"..... ........... ........... ........... ......",
|
||||
"... ... ....... ... ....... ....... ....",
|
||||
".. ....... ..... ....... ..... ... ..... ... ...",
|
||||
". ......... ... ... ... ... ....... ... . . ..",
|
||||
". ......... ... .. .. ... ....... ... . . ..",
|
||||
" ........... . .. .. . ......... . . . .",
|
||||
" ........... . .. .. . ......... . . . .",
|
||||
" ........... . .. .. . ......... . . . .",
|
||||
". ......... ... .. .. ... ....... ... . . ..",
|
||||
". ......... ... ... ... ... ....... ... . . ..",
|
||||
".. ....... ..... ....... ..... ... ..... ... ...",
|
||||
"... ... ....... ... ....... ....... ....",
|
||||
"..... ........... ........... ........... ......",
|
||||
".............. ............... .",
|
||||
".............. . . . . . . ............... .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... . . . . .",
|
||||
".............. . . . . . ............... . . . . . .",
|
||||
".............. . . . . . . ............... .",
|
||||
".............. ............... ."};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_close[] = {
|
||||
"36 18 4 1",
|
||||
" s button_face c grey75",
|
||||
". s window_frame c black",
|
||||
"X c white",
|
||||
"o s button_shadow c grey50",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ............. ....... ",
|
||||
" .XXXXXXXXXXX.o .XXXXX.o ",
|
||||
" .............o .......o ",
|
||||
" ooooooooooooo ooooooo ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,14 @@
|
|||
/* XPM */
|
||||
static char * obm_combo[] = {
|
||||
"7 9 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
".......",
|
||||
" ..... ",
|
||||
" ... ",
|
||||
" . ",
|
||||
" ",
|
||||
"......."};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_dnarrow[] = {
|
||||
"17 17 5 1",
|
||||
" s window_frame c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
"O s button_text c black",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .oooOOOOOOOooXX ",
|
||||
" .ooooOOOOOoooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .ooooooOoooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_dnarrowd[] = {
|
||||
"17 17 4 1",
|
||||
" s window_frame c black",
|
||||
". s button_shadow c grey50",
|
||||
"X s button_face c grey75",
|
||||
"o s button_text c black",
|
||||
" ",
|
||||
" ............... ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXoooooooXXX ",
|
||||
" .XXXXXoooooXXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXXXXoXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_dnarrowi[] = {
|
||||
"17 17 4 1",
|
||||
" s button_text c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .oooooXXXooooXX ",
|
||||
" .oooooXXX.oooXX ",
|
||||
" .oooooXXX.oooXX ",
|
||||
" .oooXXXXXXXooXX ",
|
||||
" .ooooXXXXX..oXX ",
|
||||
" .oooooXXX..ooXX ",
|
||||
" .ooooooX..oooXX ",
|
||||
" .ooooooo.ooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_lfarrow[] = {
|
||||
"17 17 5 1",
|
||||
" s window_frame c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
"O s button_text c black",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooOoooooXX ",
|
||||
" .oooooOOoooooXX ",
|
||||
" .ooooOOOOOOooXX ",
|
||||
" .oooOOOOOOOooXX ",
|
||||
" .ooooOOOOOOooXX ",
|
||||
" .oooooOOoooooXX ",
|
||||
" .ooooooOoooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_lfarrowd[] = {
|
||||
"17 17 4 1",
|
||||
" s window_frame c black",
|
||||
". s button_shadow c grey50",
|
||||
"X s button_face c grey75",
|
||||
"o s button_text c black",
|
||||
" ",
|
||||
" ............... ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXoXXXXXX ",
|
||||
" .XXXXXXooXXXXXX ",
|
||||
" .XXXXXooooooXXX ",
|
||||
" .XXXXoooooooXXX ",
|
||||
" .XXXXXooooooXXX ",
|
||||
" .XXXXXXooXXXXXX ",
|
||||
" .XXXXXXXoXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_lfarrowi[] = {
|
||||
"17 17 4 1",
|
||||
" s button_text c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooX.ooooXX ",
|
||||
" .oooooXX.ooooXX ",
|
||||
" .ooooXXXXXXooXX ",
|
||||
" .oooXXXXXXX.oXX ",
|
||||
" .ooooXXXXXX.oXX ",
|
||||
" .oooooXXo...oXX ",
|
||||
" .ooooooX.ooooXX ",
|
||||
" .ooooooo.ooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,16 @@
|
|||
/* XPM */
|
||||
static char * obm_mnarrow[] = {
|
||||
"7 11 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" . ",
|
||||
" .. ",
|
||||
" ... ",
|
||||
" .... ",
|
||||
" ..... ",
|
||||
" .... ",
|
||||
" ... ",
|
||||
" .. ",
|
||||
" . ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_old_close[] = {
|
||||
"50 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .................... .......... ",
|
||||
" . .. . .. ",
|
||||
" . .. . .. ",
|
||||
" ..................... ........... ",
|
||||
" .................... .......... ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,20 @@
|
|||
/* XPM */
|
||||
static char * obm_old_dnarrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ......... ",
|
||||
" ....... ",
|
||||
" ..... ",
|
||||
" ... ",
|
||||
" . ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,20 @@
|
|||
/* XPM */
|
||||
static char * obm_old_lfarrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . ",
|
||||
" .. ",
|
||||
" ... ",
|
||||
" ........ ",
|
||||
" ......... ",
|
||||
" ........ ",
|
||||
" ... ",
|
||||
" .. ",
|
||||
" . ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_old_reduce[] = {
|
||||
"25 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ..... ",
|
||||
" . . ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" .... .... ",
|
||||
" . ... ",
|
||||
" . ... ",
|
||||
" . ... ",
|
||||
" . ... ",
|
||||
" ... ",
|
||||
" . ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_old_restore[] = {
|
||||
"25 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" ",
|
||||
" ..... . ",
|
||||
" . .. . .. ",
|
||||
" . .. . .. ",
|
||||
" . .. . .. ",
|
||||
" . .. . .. ",
|
||||
" . ...... ..... ",
|
||||
" . .. . .... ",
|
||||
" . .. . .. ",
|
||||
" .... ...... .. ",
|
||||
" . .... .. ",
|
||||
" . ... . .. ",
|
||||
" . ... . .. ",
|
||||
" . ... . .. ",
|
||||
" ... ...... ",
|
||||
" . ..... ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,20 @@
|
|||
/* XPM */
|
||||
static char * obm_old_rgarrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . ",
|
||||
" .. ",
|
||||
" ... ",
|
||||
" ........ ",
|
||||
" ......... ",
|
||||
" ........ ",
|
||||
" ... ",
|
||||
" .. ",
|
||||
" . ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,20 @@
|
|||
/* XPM */
|
||||
static char * obm_old_uparrow[] = {
|
||||
"15 15 2 1",
|
||||
" s button_highlight c white",
|
||||
". s button_text c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . ",
|
||||
" ... ",
|
||||
" ..... ",
|
||||
" ....... ",
|
||||
" ......... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_old_zoom[] = {
|
||||
"25 19 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" ",
|
||||
" . ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" .... ..... ",
|
||||
" . .... ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" . .. ",
|
||||
" ...... ",
|
||||
" ..... ",
|
||||
" ",
|
||||
" "};
|
|
@ -0,0 +1,26 @@
|
|||
/* XPM */
|
||||
static char * obm_reduce[] = {
|
||||
"19 18 5 1",
|
||||
" s window_frame c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
"O s button_text c black",
|
||||
" .................X",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .ooooOOOOOOOooooXX",
|
||||
" .oooooOOOOOoooooXX",
|
||||
" .ooooooOOOooooooXX",
|
||||
" .oooooooOoooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" XXXXXXXXXXXXXXXXXX"};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_reduced[] = {
|
||||
"19 18 4 1",
|
||||
" s window_frame c black",
|
||||
". s button_shadow c grey50",
|
||||
"X s button_face c grey75",
|
||||
"o s button_text c black",
|
||||
" ..................",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXoooooooXXXXX",
|
||||
" .XXXXXXoooooXXXXXX",
|
||||
" .XXXXXXXoooXXXXXXX",
|
||||
" .XXXXXXXXoXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX"};
|
|
@ -0,0 +1,26 @@
|
|||
/* XPM */
|
||||
static char * obm_restore[] = {
|
||||
"19 18 5 1",
|
||||
" s window_frame c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
"O s button_text c black",
|
||||
" .................X",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooOoooooooXX",
|
||||
" .ooooooOOOooooooXX",
|
||||
" .oooooOOOOOoooooXX",
|
||||
" .ooooOOOOOOOooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .ooooOOOOOOOooooXX",
|
||||
" .oooooOOOOOoooooXX",
|
||||
" .ooooooOOOooooooXX",
|
||||
" .oooooooOoooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" XXXXXXXXXXXXXXXXXX"};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_restored[] = {
|
||||
"19 18 4 1",
|
||||
" s window_frame c black",
|
||||
". s button_shadow c grey50",
|
||||
"X s button_face c grey75",
|
||||
"o s button_text c black",
|
||||
" ..................",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXoXXXXXXXX",
|
||||
" .XXXXXXXoooXXXXXXX",
|
||||
" .XXXXXXoooooXXXXXX",
|
||||
" .XXXXXoooooooXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXoooooooXXXXX",
|
||||
" .XXXXXXoooooXXXXXX",
|
||||
" .XXXXXXXoooXXXXXXX",
|
||||
" .XXXXXXXXoXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX"};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_rgarrow[] = {
|
||||
"17 17 5 1",
|
||||
" s window_frame c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
"O s button_text c black",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooOoooooXX ",
|
||||
" .ooooooOOooooXX ",
|
||||
" .oooOOOOOOoooXX ",
|
||||
" .oooOOOOOOOooXX ",
|
||||
" .oooOOOOOOoooXX ",
|
||||
" .ooooooOOooooXX ",
|
||||
" .ooooooOoooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_rgarrowd[] = {
|
||||
"17 17 4 1",
|
||||
" s window_frame c black",
|
||||
". s button_shadow c grey50",
|
||||
"X s button_face c grey75",
|
||||
"o s button_text c black",
|
||||
" ",
|
||||
" ............... ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXoXXXXXX ",
|
||||
" .XXXXXXXooXXXXX ",
|
||||
" .XXXXooooooXXXX ",
|
||||
" .XXXXoooooooXXX ",
|
||||
" .XXXXooooooXXXX ",
|
||||
" .XXXXXXXooXXXXX ",
|
||||
" .XXXXXXXoXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_rgarrowi[] = {
|
||||
"17 17 4 1",
|
||||
" s button_text c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooXoooooXX ",
|
||||
" .ooooooXXooooXX ",
|
||||
" .oooXXXXXXoooXX ",
|
||||
" .oooXXXXXXXooXX ",
|
||||
" .oooXXXXXX..oXX ",
|
||||
" .oooo..XX..ooXX ",
|
||||
" .ooooooX..oooXX ",
|
||||
" .ooooooo.ooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,18 @@
|
|||
/* XPM */
|
||||
static char * obm_size[] = {
|
||||
"13 13 2 1",
|
||||
" c white",
|
||||
". c black",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
"........ ",
|
||||
"........ ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... ",
|
||||
" ... "};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_uparrow[] = {
|
||||
"17 17 5 1",
|
||||
" s window_frame c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
"O s button_text c black",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooOoooooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .ooooOOOOOoooXX ",
|
||||
" .oooOOOOOOOooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .oooooOOOooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_uparrowd[] = {
|
||||
"17 17 4 1",
|
||||
" s window_frame c black",
|
||||
". s button_shadow c grey50",
|
||||
"X s button_face c grey75",
|
||||
"o s button_text c black",
|
||||
" ",
|
||||
" ............... ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXoXXXXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXXoooooXXXX ",
|
||||
" .XXXXoooooooXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXXXoooXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,24 @@
|
|||
/* XPM */
|
||||
static char * obm_uparrowi[] = {
|
||||
"17 17 4 1",
|
||||
" s button_text c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
" ",
|
||||
" ..............X ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .ooooooXoooooXX ",
|
||||
" .oooooXXXooooXX ",
|
||||
" .ooooXXXXXoooXX ",
|
||||
" .oooXXXXXXXooXX ",
|
||||
" .ooo..XXXo..oXX ",
|
||||
" .oooooXXX.oooXX ",
|
||||
" .oooooXXX.oooXX ",
|
||||
" .oooooo...oooXX ",
|
||||
" .ooooooooooooXX ",
|
||||
" .XXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXX ",
|
||||
" "};
|
|
@ -0,0 +1,26 @@
|
|||
/* XPM */
|
||||
static char * obm_zoom[] = {
|
||||
"19 18 5 1",
|
||||
" s window_frame c black",
|
||||
". s button_highlight c white",
|
||||
"X s button_shadow c grey50",
|
||||
"o s button_face c grey75",
|
||||
"O s button_text c black",
|
||||
" .................X",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooOoooooooXX",
|
||||
" .ooooooOOOooooooXX",
|
||||
" .oooooOOOOOoooooXX",
|
||||
" .ooooOOOOOOOooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .oooooooooooooooXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" XXXXXXXXXXXXXXXXXX"};
|
|
@ -0,0 +1,25 @@
|
|||
/* XPM */
|
||||
static char * obm_zoomd[] = {
|
||||
"19 18 4 1",
|
||||
" s window_frame c black",
|
||||
". s button_shadow c grey50",
|
||||
"X s button_face c grey75",
|
||||
"o s button_text c black",
|
||||
" ..................",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXoXXXXXXXX",
|
||||
" .XXXXXXXoooXXXXXXX",
|
||||
" .XXXXXXoooooXXXXXX",
|
||||
" .XXXXXoooooooXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX",
|
||||
" .XXXXXXXXXXXXXXXXX"};
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#define CLASS_MAGIC 0x4b4e /* 'NK' */
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* !! Don't change this structure (see GetClassLong()) */
|
||||
typedef struct tagCLASS
|
||||
{
|
||||
|
@ -23,8 +25,10 @@ typedef struct tagCLASS
|
|||
WORD wExtra[1]; /* Class extra bytes */
|
||||
} CLASS;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
HCLASS CLASS_FindClassByName( char * name, CLASS **ptr );
|
||||
|
||||
HCLASS CLASS_FindClassByName( char * name, WORD hinstance, CLASS **ptr );
|
||||
CLASS * CLASS_FindClassPtr( HCLASS hclass );
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "windows.h"
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Dialog info structure.
|
||||
* This structure is stored into the window extra bytes (cbWndExtra).
|
||||
|
@ -64,5 +65,6 @@ typedef struct
|
|||
LPSTR faceName;
|
||||
} DLGTEMPLATE;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
#endif /* DIALOG_H */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#define METAFILE_MAGIC 0x4f50
|
||||
#define METAFILE_DC_MAGIC 0x4f51
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct tagREGION
|
||||
{
|
||||
|
@ -82,6 +83,8 @@ typedef struct tagRGNOBJ
|
|||
REGION region;
|
||||
} RGNOBJ;
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD version; /* 0: driver version */
|
||||
|
|
|
@ -142,35 +142,10 @@ extern void sync_profiles(void);
|
|||
|
||||
extern void SpyInit(void);
|
||||
|
||||
/* controls/button.c */
|
||||
|
||||
extern LONG ButtonWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam);
|
||||
|
||||
/* controls/combo.c */
|
||||
|
||||
extern LONG ComboBoxWndProc(HWND hwnd, WORD message, WORD wParam, LONG lParam);
|
||||
|
||||
/* controls/desktop.c */
|
||||
|
||||
extern LONG DesktopWndProc (HWND hwnd, WORD message, WORD wParam, LONG lParam);
|
||||
extern BOOL DESKTOP_SetPattern(char *pattern);
|
||||
|
||||
/* controls/listbox.c */
|
||||
|
||||
extern LONG ListBoxWndProc(HWND hwnd, WORD message, WORD wParam, LONG lParam);
|
||||
|
||||
/* controls/menu.c */
|
||||
|
||||
extern LONG PopupMenuWndProc(HWND hwnd, WORD message, WORD wParam, LONG lParam);
|
||||
|
||||
/* controls/scrollbar.c */
|
||||
|
||||
extern LONG ScrollBarWndProc(HWND hWnd, WORD message, WORD wParam, LONG lParam);
|
||||
|
||||
/* controls/static.c */
|
||||
|
||||
extern LONG StaticWndProc(HWND hwnd, WORD message, WORD wParam, LONG lParam);
|
||||
|
||||
/* controls/widget.c */
|
||||
|
||||
extern BOOL WIDGETS_Init(void);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define __WINE_REGISTERS_H
|
||||
|
||||
#include <windows.h>
|
||||
#include "autoconf.h"
|
||||
|
||||
#ifndef PROCEMU
|
||||
|
||||
|
@ -33,7 +32,11 @@
|
|||
#define DI context->sc_edi
|
||||
#define SI context->sc_esi
|
||||
#define SP context->sc_esp
|
||||
#ifndef __FreeBSD__
|
||||
#define EFL context->sc_eflags
|
||||
#else
|
||||
#define EFL context->sc_efl
|
||||
#endif
|
||||
#define EIP context->sc_eip
|
||||
|
||||
#define SetCflag (EFL |= 0x00000001)
|
||||
|
|
|
@ -20,4 +20,10 @@ typedef struct resource_s {
|
|||
struct w_files *wpnt;
|
||||
} RESOURCE;
|
||||
|
||||
struct ResourceTable{
|
||||
int id,type;
|
||||
char *name;
|
||||
unsigned char* value;
|
||||
unsigned size;
|
||||
};
|
||||
#endif /* __WINE_RESOURCE_H */
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
extern unsigned short SelectorMap[MAX_SELECTORS];
|
||||
|
||||
#ifdef HAVE_IPC
|
||||
#define SAFEMAKEPTR(s, o) (((int) (s) << 16) | ((o) & 0xffff))
|
||||
#define SAFEMAKEPTR(s, o) ((void *)(((int) (s) << 16) | ((o) & 0xffff)))
|
||||
#define FIXPTR(p) (p)
|
||||
#else
|
||||
#define SAFEMAKEPTR(s, o) \
|
||||
(((int) SelectorMap[SelectorMap[(s) >> 3] & SELECTOR_INDEXMASK] << 19) \
|
||||
| 0x70000 | ((o) & 0xffff))
|
||||
((void *)(((int)SelectorMap[SelectorMap[(s) >> 3] & SELECTOR_INDEXMASK] \
|
||||
<< 19) | 0x70000 | ((o) & 0xffff)))
|
||||
#define FIXPTR(p) SAFEMAKEPTR((unsigned long) (p) >> 16, (p))
|
||||
#endif
|
||||
|
||||
|
@ -77,6 +77,9 @@ extern int IPCCopySelector(int i_old, unsigned long new, int swap_type);
|
|||
|
||||
#define FIRST_SELECTOR 8
|
||||
|
||||
#define IS_16_BIT_ADDRESS(addr) \
|
||||
((unsigned int)(addr) >= (((FIRST_SELECTOR << 3) | 0x0007) << 16))
|
||||
|
||||
extern SEGDESC Segments[];
|
||||
|
||||
#endif /* SEGMEM_H */
|
||||
|
|
|
@ -122,6 +122,8 @@ typedef PAINTSTRUCT *LPPAINTSTRUCT;
|
|||
#define WINE_PACKED __attribute__ ((packed))
|
||||
#endif
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/* Window classes */
|
||||
|
||||
typedef LONG (*WNDPROC)(HWND, UINT, WPARAM, LPARAM);
|
||||
|
@ -2341,6 +2343,8 @@ typedef METAFILEPICT *LPMETAFILEPICT;
|
|||
#define META_CREATEBITMAP 0x06FE
|
||||
#define META_CREATEREGION 0x06FF
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
|
||||
#define F(ret,name) ret name(void);
|
||||
#define Fa(ret,name,t1,a1) ret name(t1 a1);
|
||||
|
|
|
@ -25,7 +25,7 @@ struct sigcontext_struct {
|
|||
unsigned long sc_err;
|
||||
unsigned long sc_eip;
|
||||
unsigned short sc_cs, __csh;
|
||||
unsigned long sc_efl;
|
||||
unsigned long sc_eflags;
|
||||
unsigned long esp_at_signal;
|
||||
unsigned short sc_ss, __ssh;
|
||||
unsigned long i387;
|
||||
|
|
|
@ -81,7 +81,7 @@ print_ldt()
|
|||
{
|
||||
printf("Entry %2d: Base %08lx, Limit %05lx, DPL %d, Type %d\n",
|
||||
i, base_addr, limit, dpl, type);
|
||||
printf(" SYSTEM: %08x %08x\n", *lp, *(lp-1));
|
||||
printf(" SYSTEM: %08lx %08lx\n", *lp, *(lp-1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include "autoconf.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_LDT */
|
||||
/* #undef DEBUG_LDT */
|
||||
|
|
|
@ -96,7 +96,7 @@ void InitializeLoadedDLLs(struct w_files *wpnt)
|
|||
static flagReadyToRun = 0;
|
||||
struct w_files *final_wpnt;
|
||||
|
||||
dprintf_module(stddeb,"InitializeLoadedDLLs(%08lX)\n", wpnt);
|
||||
dprintf_module(stddeb,"InitializeLoadedDLLs(%p)\n", wpnt);
|
||||
|
||||
if (wpnt == NULL)
|
||||
{
|
||||
|
@ -221,14 +221,13 @@ HINSTANCE LoadImage(char *module, int filetype, int change_dir)
|
|||
read(wpnt->fd, &header, sizeof(header));
|
||||
|
||||
handle = 0;
|
||||
if (header[0] == 'N' && header[1] == 'E')
|
||||
handle = LoadNEImage(wpnt);
|
||||
if (header[0] == 'P' && header[1] == 'E')
|
||||
handle = LoadPEImage(wpnt);
|
||||
wpnt->hinstance = handle;
|
||||
|
||||
if (handle > 32) {
|
||||
/* ok, loaded, add to the end of the list */
|
||||
/*
|
||||
* Stick this file into the list of loaded files so we don't try to reload
|
||||
* it again if another module references this module. Do this before
|
||||
* calling loadNEImage because we might get back here before loadNEImage
|
||||
* returns.
|
||||
*/
|
||||
if(wine_files == NULL)
|
||||
wine_files = wpnt;
|
||||
else {
|
||||
|
@ -239,10 +238,22 @@ HINSTANCE LoadImage(char *module, int filetype, int change_dir)
|
|||
}
|
||||
wpnt->next = NULL;
|
||||
|
||||
if (header[0] == 'N' && header[1] == 'E')
|
||||
handle = LoadNEImage(wpnt);
|
||||
if (header[0] == 'P' && header[1] == 'E')
|
||||
handle = LoadPEImage(wpnt);
|
||||
wpnt->hinstance = handle;
|
||||
|
||||
if (handle > 32) {
|
||||
return handle;
|
||||
} else {
|
||||
fprintf(stderr, "wine: (%s) unknown fileformat !\n", wpnt->filename);
|
||||
|
||||
/* Remove this module from the list of loaded modules */
|
||||
if (wine_files == wpnt)
|
||||
wine_files = NULL;
|
||||
else
|
||||
wpnt1->next = NULL;
|
||||
close(wpnt->fd);
|
||||
free(wpnt->filename);
|
||||
free(wpnt->name);
|
||||
|
|
|
@ -33,6 +33,7 @@ extern HANDLE CreateNewTask(HINSTANCE hInst);
|
|||
extern void InitializeLoadedDLLs(struct w_files *wpnt);
|
||||
extern int CallToInit16(unsigned long csip, unsigned long sssp,
|
||||
unsigned short ds);
|
||||
extern int CallTo16cx(unsigned long csip, unsigned long dscx);
|
||||
extern void CallTo32();
|
||||
extern char WindowsPath[256];
|
||||
extern unsigned short WIN_StackSize;
|
||||
|
@ -472,7 +473,7 @@ int StartNEprogram(struct w_files *wpnt)
|
|||
|
||||
void InitNEDLL(struct w_files *wpnt)
|
||||
{
|
||||
int cs_reg, ds_reg, ip_reg, rv;
|
||||
int cs_reg, ds_reg, ip_reg, cx_reg, rv;
|
||||
/*
|
||||
* Is this a library?
|
||||
*/
|
||||
|
@ -490,11 +491,13 @@ void InitNEDLL(struct w_files *wpnt)
|
|||
cs_reg = wpnt->ne->selector_table[wpnt->ne->ne_header->cs-1].selector;
|
||||
ip_reg = wpnt->ne->ne_header->ip;
|
||||
|
||||
if (cs_reg) {
|
||||
dprintf_dll(stddeb,"Initializing %s, cs:ip %04x:%04x, ds %04x\n",
|
||||
wpnt->name, cs_reg, ip_reg, ds_reg);
|
||||
cx_reg = wpnt->ne->ne_header->local_heap_length;
|
||||
|
||||
rv = CallTo16(cs_reg << 16 | ip_reg, ds_reg);
|
||||
if (cs_reg) {
|
||||
dprintf_dll(stddeb,"Initializing %s, cs:ip %04x:%04x, ds %04x, cx %04x\n",
|
||||
wpnt->name, cs_reg, ip_reg, ds_reg, cx_reg);
|
||||
|
||||
rv = CallTo16cx(cs_reg << 16 | ip_reg, ds_reg | (cx_reg<<16));
|
||||
dprintf_exec(stddeb,"rv = %x\n", rv);
|
||||
} else
|
||||
dprintf_exec(stddeb,"%s skipped\n", wpnt->name);
|
||||
|
|
|
@ -24,6 +24,7 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
/* #define DEBUG_ACCEL */
|
||||
/* #undef DEBUG_ACCEL */
|
||||
#include "debug.h"
|
||||
#include "../rc/sysresbm.h"
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
|
@ -32,7 +33,7 @@ extern HINSTANCE hSysRes;
|
|||
|
||||
extern int NE_FindResource(HANDLE, LPSTR, LPSTR, RESOURCE *);
|
||||
extern int PE_FindResource(HANDLE, LPSTR, LPSTR, RESOURCE *);
|
||||
extern HBITMAP BITMAP_LoadOEMBitmap( WORD id ); /* objects/bitmap.c */
|
||||
extern HBITMAP OBM_LoadOEMBitmap( WORD id ); /* objects/oembitmap.c */
|
||||
|
||||
#define PrintId(name) \
|
||||
if (HIWORD((DWORD)name)) \
|
||||
|
@ -731,10 +732,23 @@ LoadBitmap(HANDLE instance, LPSTR bmp_name)
|
|||
#endif
|
||||
|
||||
if (!instance) {
|
||||
hbitmap = BITMAP_LoadOEMBitmap(((int) bmp_name) & 0xffff);
|
||||
struct ResourceTable *it;
|
||||
hbitmap = OBM_LoadOEMBitmap(((int) bmp_name) & 0xffff);
|
||||
if (hbitmap)
|
||||
return hbitmap;
|
||||
/* Load from sysresbm */
|
||||
dprintf_resource(stddeb,"Searching for %d\n",bmp_name);
|
||||
for(it=sysresbmTable;it;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;
|
||||
dprintf_resource(stddeb,"Found %s\n",it->name);
|
||||
lp=it->value;
|
||||
rsc_mem=(HANDLE)NULL;
|
||||
} else { /* Load from file - indent this code properly later */
|
||||
|
||||
rsc_mem = RSC_LoadResource(instance, bmp_name, (LPSTR) NE_RSCTYPE_BITMAP,
|
||||
&image_size);
|
||||
|
@ -745,12 +759,13 @@ LoadBitmap(HANDLE instance, LPSTR bmp_name)
|
|||
return 0;
|
||||
}
|
||||
lp = (long *) GlobalLinearLock(rsc_mem);
|
||||
if (!(hdc = GetDC(0))) lp = NULL;
|
||||
if (lp == NULL)
|
||||
{
|
||||
GlobalFree(rsc_mem);
|
||||
return 0;
|
||||
}
|
||||
} /* Load from file */
|
||||
if (!(hdc = GetDC(0))) lp = NULL;
|
||||
size = CONV_LONG (*lp);
|
||||
if (size == sizeof(BITMAPCOREHEADER)){
|
||||
CONV_BITMAPCOREHEADER (lp);
|
||||
|
|
|
@ -770,7 +770,7 @@ CreateEnvironment(void)
|
|||
/*
|
||||
* Display environment
|
||||
*/
|
||||
dprintf_selectors(stddeb, "Environment at %08.8x\n", s->base_addr);
|
||||
dprintf_selectors(stddeb, "Environment at %p\n", s->base_addr);
|
||||
for (p = s->base_addr; *p; p += strlen(p) + 1)
|
||||
dprintf_selectors(stddeb, " %s\n", p);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ extern int do_int2a(struct sigcontext_struct *);
|
|||
extern int do_int2f(struct sigcontext_struct *);
|
||||
extern int do_int31(struct sigcontext_struct *);
|
||||
|
||||
#if !defined(BSD4_4) || defined(linux)
|
||||
#if !defined(BSD4_4) || defined(linux) || defined(__FreeBSD__)
|
||||
char * cstack[4096];
|
||||
#endif
|
||||
struct sigaction segv_act;
|
||||
|
@ -200,7 +200,7 @@ static void win_fault(int signal, int code, struct sigcontext *scp)
|
|||
XUngrabServer(display);
|
||||
XFlush(display);
|
||||
fprintf(stderr,"In win_fault %x:%lx\n", scp->sc_cs, scp->sc_eip);
|
||||
#if defined(linux) || defined(__NetBSD__)
|
||||
#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
wine_debug(signal, scp); /* Enter our debugger */
|
||||
#else
|
||||
fprintf(stderr,"Stack: %x:%x\n", scp->sc_ss, scp->sc_esp);
|
||||
|
@ -233,7 +233,7 @@ int init_wine_signals(void)
|
|||
#endif
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
sigset_t sig_mask;
|
||||
#ifdef BSD4_4
|
||||
#if defined(BSD4_4) && !defined (__FreeBSD__)
|
||||
struct sigaltstack ss;
|
||||
|
||||
if ((ss.ss_base = malloc(MINSIGSTKSZ)) == NULL) {
|
||||
|
@ -308,7 +308,11 @@ test_memory( char *p, int write )
|
|||
*p = c;
|
||||
ret = TRUE;
|
||||
}
|
||||
#ifdef linux
|
||||
wine_sigaction(SIGSEGV, &old_act, NULL);
|
||||
#else
|
||||
sigaction(SIGSEGV, &old_act, NULL);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ HANDLE CreateNewTask(HINSTANCE hInst, HTASK hTaskParent)
|
|||
}
|
||||
hTask = GlobalAlloc(GMEM_MOVEABLE, sizeof(WINETASKENTRY));
|
||||
lpNewTask = (LPWINETASKENTRY) GlobalLock(hTask);
|
||||
dprintf_task(stddeb,"CreateNewTask entry allocated %08X\n", lpNewTask);
|
||||
dprintf_task(stddeb,"CreateNewTask entry allocated %p\n", lpNewTask);
|
||||
if (lpNewTask == NULL) return 0;
|
||||
if (lpTaskList == NULL) {
|
||||
lpTaskList = lpNewTask;
|
||||
|
|
|
@ -479,6 +479,21 @@ WIN16_LocalInit(unsigned int segment, unsigned int start, unsigned int end)
|
|||
segment = Stack16Frame[6];
|
||||
}
|
||||
|
||||
dprintf_heap(stddeb, "WIN16_LocalInit segment=%04x start=%04x end=%04x\n", segment, start, end);
|
||||
|
||||
/* start=0 doesn't mean the first byte of the segment if the segment
|
||||
is an auto data segment. Instead it should start after the actual
|
||||
data (and the stack if there is one). As we don't know the length
|
||||
of the data and stack right now, we simply put the local heap at the
|
||||
end of the segment */
|
||||
if ((start==0)&&(Segments[segment>>3].owner==segment))
|
||||
{
|
||||
return;
|
||||
start = Segments[segment>>3].length-end-2;
|
||||
end = Segments[segment>>3].length-1;
|
||||
dprintf_heap(stddeb, "Changed to start=%04x end=%04x\n",start,end);
|
||||
}
|
||||
|
||||
if (lh == NULL)
|
||||
{
|
||||
HEAP_LocalInit(owner,
|
||||
|
|
|
@ -321,7 +321,8 @@ ATOM DeleteAtom( ATOM atom )
|
|||
*/
|
||||
ATOM FindAtom( LPCSTR str )
|
||||
{
|
||||
if (!*LOCALATOMTABLE()) InitAtomTable( DEFAULT_ATOMTABLE_SIZE );
|
||||
if (!*LOCALATOMTABLE()) return 0;
|
||||
/* if (!*LOCALATOMTABLE()) InitAtomTable( DEFAULT_ATOMTABLE_SIZE );*/
|
||||
return ATOM_FindAtom( *LOCALATOMTABLE(), str );
|
||||
}
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ BOOL IsClipboardFormatAvailable(WORD wFormat)
|
|||
{
|
||||
LPCLIPFORMAT lpFormat = ClipFormats;
|
||||
dprintf_clipboard(stddeb,"IsClipboardFormatAvailable(%04X) !\n", wFormat);
|
||||
if(wFormat == CF_TEXT) /* obtain selection as text if possible */
|
||||
if(wFormat == CF_TEXT && !wineOwnsSelection) /* obtain selection as text if possible */
|
||||
return GetClipboardData(CF_TEXT)!=0;
|
||||
while(TRUE) {
|
||||
if (lpFormat == NULL) return FALSE;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <sys/vfs.h>
|
||||
#endif
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
|
@ -93,7 +93,7 @@ void ChopOffSlash(char *path)
|
|||
void DOS_InitFS(void)
|
||||
{
|
||||
int x;
|
||||
char drive[2], temp[256], *ptr;
|
||||
char drive[2], temp[256];
|
||||
|
||||
GetPrivateProfileString("wine", "windows", "c:\\windows",
|
||||
WindowsDirectory, sizeof(WindowsDirectory), WINE_INI);
|
||||
|
@ -250,12 +250,14 @@ int DOS_ValidDirectory(char *name)
|
|||
{
|
||||
char *dirname;
|
||||
struct stat s;
|
||||
dprintf_dosfs(stddeb, "DOS_ValidDirectory: '%s'\n", name);
|
||||
if ((dirname = GetUnixFileName(name)) == NULL)
|
||||
return 0;
|
||||
if (stat(dirname,&s))
|
||||
return 0;
|
||||
if (!S_ISDIR(s.st_mode))
|
||||
return 0;
|
||||
dprintf_dosfs(stddeb, "==> OK\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -543,8 +545,8 @@ int DOS_GetFreeSpace(int drive, long *size, long *available)
|
|||
return 0;
|
||||
}
|
||||
|
||||
*size = info.f_bsize * info.f_blocks / 1024;
|
||||
*available = info.f_bavail * info.f_bsize / 1024;
|
||||
*size = info.f_bsize * info.f_blocks;
|
||||
*available = info.f_bavail * info.f_bsize;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -303,10 +303,10 @@ LONG SystemMessageBoxProc(HWND hWnd, WORD message, WORD wParam, LONG lParam)
|
|||
DrawIcon(hDC, lpmb->rectIcon.left,
|
||||
lpmb->rectIcon.top, lpmb->hIcon);
|
||||
DrawText(hDC, lpmb->Str, -1, &rect,
|
||||
DT_CALCRECT | DT_CENTER | DT_WORDBREAK);
|
||||
DT_CALCRECT | DT_LEFT | DT_VCENTER | DT_WORDBREAK);
|
||||
rect.top = lpmb->rectStr.bottom / 2 - rect.bottom / 2;
|
||||
rect.bottom = lpmb->rectStr.bottom / 2 + rect.bottom / 2;
|
||||
DrawText(hDC, lpmb->Str, -1, &rect, DT_CENTER | DT_WORDBREAK);
|
||||
DrawText(hDC, lpmb->Str, -1, &rect, DT_LEFT | DT_VCENTER | DT_WORDBREAK);
|
||||
SetTextColor(hDC, OldTextColor);
|
||||
EndPaint(hWnd, &ps);
|
||||
dprintf_msgbox(stddeb, "MessageBox End of WM_PAINT !\n");
|
||||
|
|
|
@ -16,6 +16,7 @@ SRCS = \
|
|||
gdiobj.c \
|
||||
linedda.c \
|
||||
metafile.c \
|
||||
oembitmap.c \
|
||||
palette.c \
|
||||
pen.c \
|
||||
region.c \
|
||||
|
|
|
@ -380,9 +380,9 @@ static __inline__ int muldiv64( int m1, int m2, int d )
|
|||
__asm__(
|
||||
"imull %%edx\n\t"
|
||||
"idivl %3\n\t"
|
||||
: "=a" (result) /* out */
|
||||
: "a" (m1), "d" (m2), "g" (d) /* in */
|
||||
: "ax", "dx" /* mod */
|
||||
: "=&a" (result) /* out */
|
||||
: "0" (m1), "d" (m2), "g" (d) /* in */
|
||||
: "%edx" /* mod */
|
||||
);
|
||||
return result;
|
||||
#else
|
||||
|
|
|
@ -19,11 +19,6 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993";
|
|||
/* #define DEBUG_BITMAP /* */
|
||||
#include "debug.h"
|
||||
|
||||
/* Include OEM bitmaps */
|
||||
#include "bitmaps/check_boxes"
|
||||
#include "bitmaps/check_mark"
|
||||
#include "bitmaps/menu_arrow"
|
||||
|
||||
/* GCs used for B&W and color bitmap operations */
|
||||
GC BITMAP_monoGC = 0, BITMAP_colorGC = 0;
|
||||
|
||||
|
@ -81,65 +76,6 @@ static XImage *BITMAP_BmpToImage( BITMAP * bmp, void * bmpData )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* BITMAP_LoadOEMBitmap
|
||||
*/
|
||||
HBITMAP BITMAP_LoadOEMBitmap( WORD id )
|
||||
{
|
||||
BITMAPOBJ * bmpObjPtr;
|
||||
HBITMAP hbitmap;
|
||||
WORD width, height;
|
||||
char *data;
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case OBM_MNARROW:
|
||||
width = menu_arrow_width;
|
||||
height = menu_arrow_height;
|
||||
data = menu_arrow_bits;
|
||||
break;
|
||||
|
||||
case OBM_CHECKBOXES:
|
||||
width = check_boxes_width;
|
||||
height = check_boxes_height;
|
||||
data = check_boxes_bits;
|
||||
break;
|
||||
|
||||
case OBM_CHECK:
|
||||
width = check_mark_width;
|
||||
height = check_mark_height;
|
||||
data = check_mark_bits;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Create the BITMAPOBJ */
|
||||
if (!(hbitmap = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC )))
|
||||
return 0;
|
||||
bmpObjPtr = (BITMAPOBJ *) GDI_HEAP_ADDR( hbitmap );
|
||||
bmpObjPtr->size.cx = 0;
|
||||
bmpObjPtr->size.cy = 0;
|
||||
bmpObjPtr->bitmap.bmType = 0;
|
||||
bmpObjPtr->bitmap.bmWidth = width;
|
||||
bmpObjPtr->bitmap.bmHeight = height;
|
||||
bmpObjPtr->bitmap.bmWidthBytes = (width + 15) / 16 * 2;
|
||||
bmpObjPtr->bitmap.bmPlanes = 1;
|
||||
bmpObjPtr->bitmap.bmBitsPixel = 1;
|
||||
bmpObjPtr->bitmap.bmBits = NULL;
|
||||
|
||||
/* Create the pixmap */
|
||||
if (!(bmpObjPtr->pixmap = XCreateBitmapFromData( display, rootWindow,
|
||||
data, width, height )))
|
||||
{
|
||||
GDI_HEAP_FREE( hbitmap );
|
||||
return 0;
|
||||
}
|
||||
return hbitmap;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateBitmap (GDI.48)
|
||||
*/
|
||||
|
|
|
@ -50,7 +50,7 @@ HBRUSH CreateBrushIndirect( LOGBRUSH * brush )
|
|||
HBRUSH CreateHatchBrush( short style, COLORREF color )
|
||||
{
|
||||
LOGBRUSH logbrush = { BS_HATCHED, color, style };
|
||||
dprintf_gdi(stddeb, "CreateHatchBrush: %d %06x\n", style, color );
|
||||
dprintf_gdi(stddeb, "CreateHatchBrush: %d %06lx\n", style, color );
|
||||
if ((style < 0) || (style >= NB_HATCH_STYLES)) return 0;
|
||||
return CreateBrushIndirect( &logbrush );
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ HBRUSH CreateDIBPatternBrush( HANDLE hbitmap, WORD coloruse )
|
|||
HBRUSH CreateSolidBrush( COLORREF color )
|
||||
{
|
||||
LOGBRUSH logbrush = { BS_SOLID, color, 0 };
|
||||
dprintf_gdi(stddeb, "CreateSolidBrush: %06x\n", color );
|
||||
dprintf_gdi(stddeb, "CreateSolidBrush: %06lx\n", color );
|
||||
return CreateBrushIndirect( &logbrush );
|
||||
}
|
||||
|
||||
|
|
|
@ -65,9 +65,9 @@ void Font_Init( void )
|
|||
int i;
|
||||
|
||||
if( GetPrivateProfileString("fonts", NULL, "*", temp, sizeof(temp), WINE_INI) > 2 ) {
|
||||
for( ptr = temp, i = 1; strlen(ptr) != 0; ptr += strlen(ptr) + 1, i++ )
|
||||
for( ptr = temp, i = 1; strlen(ptr) != 0; ptr += strlen(ptr) + 1 )
|
||||
if( strcmp( ptr, "default" ) )
|
||||
FontNames[i].window = strdup( ptr );
|
||||
FontNames[i++].window = strdup( ptr );
|
||||
FontSize = i;
|
||||
|
||||
for( i = 1; i < FontSize; i++ ) {
|
||||
|
@ -75,7 +75,6 @@ void Font_Init( void )
|
|||
FontNames[i].x11 = strdup( temp );
|
||||
}
|
||||
GetPrivateProfileString("fonts", "default", "*", temp, sizeof(temp), WINE_INI);
|
||||
if( *temp == '*' )
|
||||
FontNames[0].x11 = strdup( temp );
|
||||
|
||||
} else {
|
||||
|
@ -114,7 +113,7 @@ static const char *FONT_TranslateName( char *winFaceName )
|
|||
*
|
||||
* Find a X font matching the logical font.
|
||||
*/
|
||||
static XFontStruct * FONT_MatchFont( LOGFONT * font )
|
||||
static XFontStruct * FONT_MatchFont( LOGFONT * font, DC * dc )
|
||||
{
|
||||
char pattern[100];
|
||||
const char *family, *weight, *charset;
|
||||
|
@ -125,8 +124,17 @@ static XFontStruct * FONT_MatchFont( LOGFONT * font )
|
|||
|
||||
weight = (font->lfWeight > 550) ? "bold" : "medium";
|
||||
slant = font->lfItalic ? 'i' : 'r';
|
||||
height = abs(font->lfHeight * 10);
|
||||
width = font->lfWidth * 10;
|
||||
height = font->lfHeight * dc->w.VportExtX / dc->w.WndExtX;
|
||||
if (height == 0) height = 120; /* Default height = 12 */
|
||||
else if (height < 0)
|
||||
{
|
||||
/* If height is negative, it means the height of the characters */
|
||||
/* *without* the internal leading. So we adjust it a bit to */
|
||||
/* compensate. 5/4 seems to give good results for small fonts. */
|
||||
height = 10 * (-height * 5 / 4);
|
||||
}
|
||||
else height *= 10;
|
||||
width = 10 * (font->lfWidth * dc->w.VportExtY / dc->w.WndExtY);
|
||||
spacing = (font->lfPitchAndFamily & FIXED_PITCH) ? 'm' :
|
||||
(font->lfPitchAndFamily & VARIABLE_PITCH) ? 'p' : '*';
|
||||
charset = (font->lfCharSet == ANSI_CHARSET) ? "iso8859-1" : "*-*";
|
||||
|
@ -304,7 +312,7 @@ HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
|
|||
|
||||
if (!stockPtr || !stockPtr->fstruct)
|
||||
{
|
||||
fontStruct = FONT_MatchFont( &font->logfont );
|
||||
fontStruct = FONT_MatchFont( &font->logfont, dc );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -521,6 +529,27 @@ BOOL GetCharWidth(HDC hdc, WORD wFirstChar, WORD wLastChar, LPINT lpBuffer)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* AddFontResource (GDI.119)
|
||||
*/
|
||||
int AddFontResource( LPSTR str )
|
||||
{
|
||||
fprintf( stdnimp, "STUB: AddFontResource('%s')\n", str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RemoveFontResource (GDI.136)
|
||||
*/
|
||||
BOOL RemoveFontResource( LPSTR str )
|
||||
{
|
||||
fprintf( stdnimp, "STUB: RemoveFontResource('%s')\n", str );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* ParseFontParms [internal]
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,238 @@
|
|||
/*
|
||||
* GDI OEM bitmap objects
|
||||
*
|
||||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#ifdef USE_XPM
|
||||
#include <X11/xpm.h>
|
||||
#endif
|
||||
#include "gdi.h"
|
||||
#include "bitmap.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_BITMAP */
|
||||
#include "debug.h"
|
||||
|
||||
#define OBM_FIRST OBM_LFARROWI /* First OEM bitmap */
|
||||
#define OBM_LAST OBM_OLD_CLOSE /* Last OEM bitmap */
|
||||
|
||||
#ifdef USE_XPM
|
||||
|
||||
/* Known symbolic names for colors. Use these whenever possible. */
|
||||
struct sys_colors_symbols
|
||||
{
|
||||
char *symbol;
|
||||
WORD syscolor;
|
||||
};
|
||||
|
||||
static const struct sys_colors_symbols OBM_Color_Symbols[] =
|
||||
{
|
||||
{ "button_face", COLOR_BTNFACE },
|
||||
{ "button_shadow", COLOR_BTNSHADOW },
|
||||
{ "button_highlight", COLOR_BTNHIGHLIGHT }
|
||||
};
|
||||
|
||||
/* Include OEM pixmaps */
|
||||
#include "bitmaps/obm_lfarrowi"
|
||||
#include "bitmaps/obm_rgarrowi"
|
||||
#include "bitmaps/obm_dnarrowi"
|
||||
#include "bitmaps/obm_uparrowi"
|
||||
#include "bitmaps/obm_combo"
|
||||
#include "bitmaps/obm_mnarrow"
|
||||
#include "bitmaps/obm_lfarrowd"
|
||||
#include "bitmaps/obm_rgarrowd"
|
||||
#include "bitmaps/obm_dnarrowd"
|
||||
#include "bitmaps/obm_uparrowd"
|
||||
#include "bitmaps/obm_restored"
|
||||
#include "bitmaps/obm_zoomd"
|
||||
#include "bitmaps/obm_reduced"
|
||||
#include "bitmaps/obm_restore"
|
||||
#include "bitmaps/obm_zoom"
|
||||
#include "bitmaps/obm_reduce"
|
||||
#include "bitmaps/obm_lfarrow"
|
||||
#include "bitmaps/obm_rgarrow"
|
||||
#include "bitmaps/obm_dnarrow"
|
||||
#include "bitmaps/obm_uparrow"
|
||||
#include "bitmaps/obm_close"
|
||||
#include "bitmaps/obm_old_restore"
|
||||
#include "bitmaps/obm_old_zoom"
|
||||
#include "bitmaps/obm_old_reduce"
|
||||
#include "bitmaps/obm_btncorners"
|
||||
#include "bitmaps/obm_checkboxes"
|
||||
#include "bitmaps/obm_check"
|
||||
#include "bitmaps/obm_btsize"
|
||||
#include "bitmaps/obm_old_lfarrow"
|
||||
#include "bitmaps/obm_old_rgarrow"
|
||||
#include "bitmaps/obm_old_dnarrow"
|
||||
#include "bitmaps/obm_old_uparrow"
|
||||
#include "bitmaps/obm_size"
|
||||
#include "bitmaps/obm_old_close"
|
||||
|
||||
static const struct
|
||||
{
|
||||
char** data; /* Pointer to bitmap data */
|
||||
BOOL color; /* Is it a color bitmap? */
|
||||
} OBM_Pixmaps_Data[OBM_LAST-OBM_FIRST+1] = {
|
||||
{ obm_lfarrowi, TRUE }, /* OBM_LFARROWI */
|
||||
{ obm_rgarrowi, TRUE }, /* OBM_RGARROWI */
|
||||
{ obm_dnarrowi, TRUE }, /* OBM_DNARROWI */
|
||||
{ obm_uparrowi, TRUE }, /* OBM_UPARROWI */
|
||||
{ obm_combo, FALSE }, /* OBM_COMBO */
|
||||
{ obm_mnarrow, FALSE }, /* OBM_MNARROW */
|
||||
{ obm_lfarrowd, TRUE }, /* OBM_LFARROWD */
|
||||
{ obm_rgarrowd, TRUE }, /* OBM_RGARROWD */
|
||||
{ obm_dnarrowd, TRUE }, /* OBM_DNARROWD */
|
||||
{ obm_uparrowd, TRUE }, /* OBM_UPARROWD */
|
||||
{ obm_restored, TRUE }, /* OBM_RESTORED */
|
||||
{ obm_zoomd, TRUE }, /* OBM_ZOOMD */
|
||||
{ obm_reduced, TRUE }, /* OBM_REDUCED */
|
||||
{ obm_restore, TRUE }, /* OBM_RESTORE */
|
||||
{ obm_zoom, TRUE }, /* OBM_ZOOM */
|
||||
{ obm_reduce, TRUE }, /* OBM_REDUCE */
|
||||
{ obm_lfarrow, TRUE }, /* OBM_LFARROW */
|
||||
{ obm_rgarrow, TRUE }, /* OBM_RGARROW */
|
||||
{ obm_dnarrow, TRUE }, /* OBM_DNARROW */
|
||||
{ obm_uparrow, TRUE }, /* OBM_UPARROW */
|
||||
{ obm_close, TRUE }, /* OBM_CLOSE */
|
||||
{ obm_old_restore, FALSE }, /* OBM_OLD_RESTORE */
|
||||
{ obm_old_zoom, FALSE }, /* OBM_OLD_ZOOM */
|
||||
{ obm_old_reduce, FALSE }, /* OBM_OLD_REDUCE */
|
||||
{ obm_btncorners, FALSE }, /* OBM_BTNCORNERS */
|
||||
{ obm_checkboxes, FALSE }, /* OBM_CHECKBOXES */
|
||||
{ obm_check, FALSE }, /* OBM_CHECK */
|
||||
{ obm_btsize, FALSE }, /* OBM_BTSIZE */
|
||||
{ obm_old_lfarrow, FALSE }, /* OBM_OLD_LFARROW */
|
||||
{ obm_old_rgarrow, FALSE }, /* OBM_OLD_RGARROW */
|
||||
{ obm_old_dnarrow, FALSE }, /* OBM_OLD_DNARROW */
|
||||
{ obm_old_uparrow, FALSE }, /* OBM_OLD_UPARROW */
|
||||
{ obm_size, FALSE }, /* OBM_SIZE */
|
||||
{ obm_old_close, FALSE }, /* OBM_OLD_CLOSE */
|
||||
};
|
||||
|
||||
#else /* USE_XPM */
|
||||
|
||||
/* Include OEM bitmaps */
|
||||
#include "bitmaps/check_boxes"
|
||||
#include "bitmaps/check_mark"
|
||||
#include "bitmaps/menu_arrow"
|
||||
|
||||
static const struct
|
||||
{
|
||||
WORD width, height;
|
||||
char *data;
|
||||
} OBM_Bitmaps_Data[OBM_LAST-OBM_FIRST+1] =
|
||||
{
|
||||
{ 0, 0, NULL }, /* OBM_LFARROWI */
|
||||
{ 0, 0, NULL }, /* OBM_RGARROWI */
|
||||
{ 0, 0, NULL }, /* OBM_DNARROWI */
|
||||
{ 0, 0, NULL }, /* OBM_UPARROWI */
|
||||
{ 0, 0, NULL }, /* OBM_COMBO */
|
||||
{ menu_arrow_width, menu_arrow_height, menu_arrow_bits }, /* OBM_MNARROW */
|
||||
{ 0, 0, NULL }, /* OBM_LFARROWD */
|
||||
{ 0, 0, NULL }, /* OBM_RGARROWD */
|
||||
{ 0, 0, NULL }, /* OBM_DNARROWD */
|
||||
{ 0, 0, NULL }, /* OBM_UPARROWD */
|
||||
{ 0, 0, NULL }, /* OBM_RESTORED */
|
||||
{ 0, 0, NULL }, /* OBM_ZOOMD */
|
||||
{ 0, 0, NULL }, /* OBM_REDUCED */
|
||||
{ 0, 0, NULL }, /* OBM_RESTORE */
|
||||
{ 0, 0, NULL }, /* OBM_ZOOM */
|
||||
{ 0, 0, NULL }, /* OBM_REDUCE */
|
||||
{ 0, 0, NULL }, /* OBM_LFARROW */
|
||||
{ 0, 0, NULL }, /* OBM_RGARROW */
|
||||
{ 0, 0, NULL }, /* OBM_DNARROW */
|
||||
{ 0, 0, NULL }, /* OBM_UPARROW */
|
||||
{ 0, 0, NULL }, /* OBM_CLOSE */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_RESTORE */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_ZOOM */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_REDUCE */
|
||||
{ 0, 0, NULL }, /* OBM_BTNCORNERS */
|
||||
{ check_boxes_width, check_boxes_height,
|
||||
check_boxes_bits }, /* OBM_CHECKBOXES */
|
||||
{ check_mark_width, check_mark_height, check_mark_bits }, /* OBM_CHECK */
|
||||
{ 0, 0, NULL }, /* OBM_BTSIZE */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_LFARROW */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_RGARROW */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_DNARROW */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_UPARROW */
|
||||
{ 0, 0, NULL }, /* OBM_SIZE */
|
||||
{ 0, 0, NULL }, /* OBM_OLD_CLOSE */
|
||||
};
|
||||
|
||||
#endif /* USE_XPM */
|
||||
|
||||
|
||||
extern Colormap COLOR_WinColormap;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* OBM_LoadOEMBitmap
|
||||
*/
|
||||
HBITMAP OBM_LoadOEMBitmap( WORD id )
|
||||
{
|
||||
BITMAPOBJ * bmpObjPtr;
|
||||
HBITMAP hbitmap;
|
||||
WORD width, height, bpp;
|
||||
Pixmap pixmap;
|
||||
|
||||
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;
|
||||
|
||||
attrs.valuemask = XpmColormap | XpmDepth;
|
||||
attrs.colormap = COLOR_WinColormap;
|
||||
if (OBM_Pixmaps_Data[id].color) attrs.depth = bpp = screenDepth;
|
||||
else attrs.depth = bpp = 1;
|
||||
|
||||
if (XpmCreatePixmapFromData( display, rootWindow,
|
||||
OBM_Pixmaps_Data[id].data,
|
||||
&pixmap, NULL, &attrs ) != XpmSuccess)
|
||||
{
|
||||
fprintf( stderr, "Error creating pixmap\n" );
|
||||
pixmap = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = attrs.width;
|
||||
height = attrs.height;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (!OBM_Bitmaps_Data[id].data) return 0;
|
||||
bpp = 1;
|
||||
width = OBM_Bitmaps_Data[id].width;
|
||||
height = OBM_Bitmaps_Data[id].height;
|
||||
pixmap = XCreateBitmapFromData( display, rootWindow,
|
||||
OBM_Bitmaps_Data[id].data, width, height );
|
||||
#endif /* USE_XPM */
|
||||
|
||||
if (!pixmap) return 0;
|
||||
|
||||
/* Create the BITMAPOBJ */
|
||||
if (!(hbitmap = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC )))
|
||||
{
|
||||
XFreePixmap( display, pixmap );
|
||||
return 0;
|
||||
}
|
||||
bmpObjPtr = (BITMAPOBJ *) GDI_HEAP_ADDR( hbitmap );
|
||||
bmpObjPtr->size.cx = 0;
|
||||
bmpObjPtr->size.cy = 0;
|
||||
bmpObjPtr->pixmap = pixmap;
|
||||
bmpObjPtr->bitmap.bmType = 0;
|
||||
bmpObjPtr->bitmap.bmWidth = width;
|
||||
bmpObjPtr->bitmap.bmHeight = height;
|
||||
bmpObjPtr->bitmap.bmWidthBytes = (width + 15) / 16 * 2;
|
||||
bmpObjPtr->bitmap.bmPlanes = 1;
|
||||
bmpObjPtr->bitmap.bmBitsPixel = bpp;
|
||||
bmpObjPtr->bitmap.bmBits = NULL;
|
||||
return hbitmap;
|
||||
}
|
||||
|
||||
|
12
rc/Imakefile
12
rc/Imakefile
|
@ -1,15 +1,21 @@
|
|||
#include "../Wine.tmpl"
|
||||
|
||||
MODULE = rc
|
||||
|
||||
.SUFFIXES: .rc
|
||||
|
||||
.rc.c:
|
||||
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 -v -p $* >$@
|
||||
gcc -E -x c $(CFLAGS) $*.rct | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | ./winerc -o $* -v -p $*
|
||||
$(RM) $*.rct
|
||||
|
||||
AllTarget(sysres.c)
|
||||
RCSRCS = sysres.rc sysresbm.rc
|
||||
|
||||
RCOBJS = $(RCSRCS:.rc=.o)
|
||||
|
||||
WineRelocatableTarget($(TOP)/$(MODULE),,$(RCOBJS))
|
||||
|
||||
sysres.c: winerc $(TOP)/include/windows.h
|
||||
|
||||
|
@ -28,6 +34,8 @@ SRCS = \
|
|||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
LOCAL_LIBRARIES = -lfl
|
||||
|
||||
depend:: rc.tab.c rc.tab.h lex.yy.c
|
||||
|
||||
clean::
|
||||
|
|
1
rc/rc.h
1
rc/rc.h
|
@ -89,6 +89,7 @@ gen_res *make_menu(gen_res*);
|
|||
gen_res *add_resource(gen_res*,gen_res*);
|
||||
|
||||
void create_output(gen_res*);
|
||||
void set_out_file(char*);
|
||||
|
||||
#define CT_BUTTON 0x80
|
||||
#define CT_EDIT 0x81
|
||||
|
|
6
rc/rc.y
6
rc/rc.y
|
@ -35,7 +35,7 @@ static char Copyright[] = "Copyright Martin von Loewis, 1994";
|
|||
%type <style> style optional_style
|
||||
%%
|
||||
|
||||
resource_file: resources {create_output($1)}
|
||||
resource_file: resources {create_output($1);}
|
||||
|
||||
/*resources are put into a linked list*/
|
||||
resources: {$$=0;}
|
||||
|
@ -201,8 +201,8 @@ versioninfo: VERSIONINFO NOT_SUPPORTED {$$=0;}
|
|||
NOT is used to disable default styles */
|
||||
style: NUMBER {$$=new_style();$$->or=$1;}
|
||||
| NOT NUMBER {$$=new_style();$$->and=~($2);}
|
||||
| NUMBER '|' style {$$=$3;$$->or|=$1;}
|
||||
| NOT NUMBER '|' style {$$=$4;$$->and&=~($2);}
|
||||
| '(' style ')' {$$=$2;}
|
||||
| style '|' style {$$=$1;$$->or|=$3->or;$$->and&=$3->and;}
|
||||
%%
|
||||
yyerror(char *s)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/* sysres.h
|
||||
* This File is automatically generated. Do not edit
|
||||
*/
|
||||
#include "resource.h"
|
||||
extern unsigned char sysres_MENU_SYSMENU[];
|
||||
extern unsigned char sysres_DIALOG_2[];
|
||||
extern unsigned char sysres_DIALOG_STOP_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_QUESTION_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_EXCLAMATION_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_SHELL_ABOUT_MSGBOX[];
|
||||
extern unsigned char sysres_DIALOG_3[];
|
||||
extern unsigned char sysres_DIALOG_4[];
|
||||
extern unsigned char sysres_DIALOG_11[];
|
||||
extern unsigned char sysres_DIALOG_12[];
|
||||
extern unsigned char sysres_DIALOG_5[];
|
||||
extern unsigned char sysres_DIALOG_6[];
|
||||
extern unsigned char sysres_DIALOG_7[];
|
||||
extern unsigned char sysres_DIALOG_8[];
|
||||
extern unsigned char sysres_DIALOG_9[];
|
||||
extern unsigned char sysres_DIALOG_10[];
|
||||
extern struct ResourceTable sysresTable[];
|
1822
rc/sysres.rc
1822
rc/sysres.rc
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,59 @@
|
|||
/* sysresbm.h
|
||||
* This File is automatically generated. Do not edit
|
||||
*/
|
||||
#include "resource.h"
|
||||
extern unsigned char sysresbm_CURSOR_32514[];
|
||||
extern unsigned char sysresbm_CURSOR_32648[];
|
||||
extern unsigned char sysresbm_ICON_32516[];
|
||||
extern unsigned char sysresbm_ICON_32515[];
|
||||
extern unsigned char sysresbm_ICON_32513[];
|
||||
extern unsigned char sysresbm_ICON_32514[];
|
||||
extern unsigned char sysresbm_ICON_SYSIDI_STOPICON[];
|
||||
extern unsigned char sysresbm_ICON_32512[];
|
||||
extern unsigned char sysresbm_ICON_SYSIDI_HANDHAND[];
|
||||
extern unsigned char sysresbm_ICON_WINEICON[];
|
||||
extern unsigned char sysresbm_ICON_PORTRAIT[];
|
||||
extern unsigned char sysresbm_ICON_LANDSCAP[];
|
||||
extern unsigned char sysresbm_BITMAP_32754[];
|
||||
extern unsigned char sysresbm_BITMAP_32753[];
|
||||
extern unsigned char sysresbm_BITMAP_32752[];
|
||||
extern unsigned char sysresbm_BITMAP_32751[];
|
||||
extern unsigned char sysresbm_BITMAP_32750[];
|
||||
extern unsigned char sysresbm_BITMAP_32749[];
|
||||
extern unsigned char sysresbm_BITMAP_32748[];
|
||||
extern unsigned char sysresbm_BITMAP_32747[];
|
||||
extern unsigned char sysresbm_BITMAP_32746[];
|
||||
extern unsigned char sysresbm_BITMAP_32745[];
|
||||
extern unsigned char sysresbm_BITMAP_32744[];
|
||||
extern unsigned char sysresbm_BITMAP_32743[];
|
||||
extern unsigned char sysresbm_BITMAP_32742[];
|
||||
extern unsigned char sysresbm_BITMAP_32741[];
|
||||
extern unsigned char sysresbm_BITMAP_32740[];
|
||||
extern unsigned char sysresbm_BITMAP_32739[];
|
||||
extern unsigned char sysresbm_BITMAP_32738[];
|
||||
extern unsigned char sysresbm_BITMAP_32737[];
|
||||
extern unsigned char sysresbm_BITMAP_32736[];
|
||||
extern unsigned char sysresbm_BITMAP_32735[];
|
||||
extern unsigned char sysresbm_BITMAP_32734[];
|
||||
extern unsigned char sysresbm_BITMAP_32767[];
|
||||
extern unsigned char sysresbm_BITMAP_32766[];
|
||||
extern unsigned char sysresbm_BITMAP_32765[];
|
||||
extern unsigned char sysresbm_BITMAP_32764[];
|
||||
extern unsigned char sysresbm_BITMAP_32763[];
|
||||
extern unsigned char sysresbm_BITMAP_32762[];
|
||||
extern unsigned char sysresbm_BITMAP_32761[];
|
||||
extern unsigned char sysresbm_BITMAP_32760[];
|
||||
extern unsigned char sysresbm_BITMAP_32759[];
|
||||
extern unsigned char sysresbm_BITMAP_32758[];
|
||||
extern unsigned char sysresbm_BITMAP_32757[];
|
||||
extern unsigned char sysresbm_BITMAP_32756[];
|
||||
extern unsigned char sysresbm_BITMAP_32755[];
|
||||
extern unsigned char sysresbm_BITMAP_32520[];
|
||||
extern unsigned char sysresbm_BITMAP_32521[];
|
||||
extern unsigned char sysresbm_BITMAP_32522[];
|
||||
extern unsigned char sysresbm_BITMAP_32523[];
|
||||
extern unsigned char sysresbm_BITMAP_32524[];
|
||||
extern unsigned char sysresbm_BITMAP_SMILE[];
|
||||
extern unsigned char sysresbm_BITMAP_WINELOGO[];
|
||||
extern unsigned char sysresbm_BITMAP_OBMCLOSE[];
|
||||
extern struct ResourceTable sysresbmTable[];
|
File diff suppressed because it is too large
Load Diff
70
rc/winerc.c
70
rc/winerc.c
|
@ -16,20 +16,26 @@ static char Copyright[] = "Copyright Martin von Loewis, 1994";
|
|||
#include "rc.h"
|
||||
#include "rc.tab.h"
|
||||
|
||||
char usage[]="winerc -dv -p <prefix> < infile > outfile\n";
|
||||
char usage[]="winerc -dvc -p prefix -o outfile < infile \n";
|
||||
|
||||
/*might be overwritten by command line*/
|
||||
char *prefix="_Resource";
|
||||
int verbose;
|
||||
int verbose,constant;
|
||||
gen_res* g_start;
|
||||
FILE *header,*code;
|
||||
char hname[256],sname[256];
|
||||
|
||||
main(int argc,char *argv[])
|
||||
{
|
||||
extern int yydebug;
|
||||
extern char* optarg;
|
||||
int optc,lose;
|
||||
int optc,lose,ret;
|
||||
lose=0;
|
||||
while((optc=getopt(argc,argv,"dp:v",0))!=EOF)
|
||||
#ifdef __NetBSD__
|
||||
while((optc=getopt(argc,argv,"dp:vo:"))!=EOF)
|
||||
#else
|
||||
while((optc=getopt(argc,argv,"dp:vo:",0))!=EOF)
|
||||
#endif
|
||||
switch(optc)
|
||||
{
|
||||
/* bison will print state transitions on stderr */
|
||||
|
@ -38,16 +44,31 @@ main(int argc,char *argv[])
|
|||
setbuf(stderr,0);
|
||||
break;
|
||||
case 'p':prefix=optarg;break;
|
||||
case 'c':constant=1;break;
|
||||
case 'v':verbose=1;
|
||||
setbuf(stderr,0);
|
||||
break;
|
||||
case 'o':set_out_file(optarg);break;
|
||||
default: lose++;break;
|
||||
}
|
||||
if(lose)return fprintf(stderr,usage),1;
|
||||
yyparse();
|
||||
return 0;
|
||||
if(!header)header=stdout;
|
||||
if(!code)code=stdout;
|
||||
ret=yyparse();
|
||||
fclose(header);
|
||||
fclose(code);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void set_out_file(char *prefix)
|
||||
{
|
||||
sprintf(sname,"%s.c",prefix);
|
||||
code=fopen(sname,"w");
|
||||
sprintf(hname,"%s.h",prefix);
|
||||
header=fopen(hname,"w");
|
||||
}
|
||||
|
||||
|
||||
/* SunOS' memcpy is wrong for overlapping arrays */
|
||||
char *save_memcpy(char *d,char* s,int l)
|
||||
{
|
||||
|
@ -469,19 +490,26 @@ char *get_resource_name(gen_res*it)
|
|||
return buf;
|
||||
}
|
||||
|
||||
#define ISCONSTANT constant?"const ":""
|
||||
/* create the final output */
|
||||
void create_output(gen_res* top)
|
||||
{
|
||||
gen_res *it;
|
||||
/* print the type */
|
||||
printf("struct ResourceTable{\n\tint id,type;\n\t"
|
||||
"char *name;\n\tconst unsigned char* value;\n};\n\n");
|
||||
fprintf(header,"/*\t\t%s\n * This File is automatically generated."
|
||||
" Do not edit\n */\n#include \"resource.h\"\n",hname);
|
||||
fprintf(code,"/*\t\t%s\n * This File is automatically generated."
|
||||
" Do not edit\n */\n",sname);
|
||||
/* declare the resources */
|
||||
for(it=top;it;it=it->next)
|
||||
printf("const unsigned char %s[];\n",get_resource_name(it));
|
||||
fprintf(header,"extern %sunsigned char %s[];\n",ISCONSTANT,
|
||||
get_resource_name(it));
|
||||
fprintf(header,"extern %sstruct ResourceTable %sTable[];\n",
|
||||
ISCONSTANT,prefix);
|
||||
|
||||
fprintf(code,"#include \"prototypes.h\"\n#include \"%s\"\n",hname);
|
||||
|
||||
/* print the resource table (0 terminated) */
|
||||
printf("\nconst struct ResourceTable %sTable[]={\n",prefix);
|
||||
fprintf(code,"\n%sstruct ResourceTable %sTable[]={\n",ISCONSTANT,prefix);
|
||||
for(it=top;it;it=it->next)
|
||||
{ int type;
|
||||
switch(it->type)
|
||||
|
@ -497,24 +525,26 @@ void create_output(gen_res* top)
|
|||
default:fprintf(stderr,"Unknown restype\n");type=-1;break;
|
||||
}
|
||||
if(it->n_type)
|
||||
printf("{0,%d,\"%s\",%s},\n",
|
||||
type,it->n.s_name,get_resource_name(it));
|
||||
fprintf(code,"{0,%d,\"%s\",%s,%d},\n",
|
||||
type,it->n.s_name,get_resource_name(it),it->size);
|
||||
else
|
||||
printf("{%d,%d,\"@%d\",%s},\n",
|
||||
it->n.i_name,type,it->n.i_name,get_resource_name(it));
|
||||
fprintf(code,"{%d,%d,\"@%d\",%s,%d},\n",
|
||||
it->n.i_name,type,it->n.i_name,get_resource_name(it),
|
||||
it->size);
|
||||
}
|
||||
printf("{0,0,0,0}};\n\n");
|
||||
fprintf(code,"{0,0,0,0}};\n\n");
|
||||
|
||||
/* print the resources */
|
||||
for(it=top;it;it=it->next)
|
||||
{ int i;
|
||||
printf("const unsigned char %s[]={\n",get_resource_name(it));
|
||||
fprintf(code,"%sunsigned char %s[]={\n",
|
||||
ISCONSTANT,get_resource_name(it));
|
||||
for(i=0;i<it->size-1;i++)
|
||||
{
|
||||
printf("%#4x,",it->res[i]);
|
||||
if((i&7)==7)putchar('\n');
|
||||
fprintf(code,"%#4x,",it->res[i]);
|
||||
if((i&7)==7)fputc('\n',code);
|
||||
}
|
||||
printf("%#4x};\n",it->res[i]);
|
||||
fprintf(code,"%#4x};\n",it->res[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -629,7 +629,11 @@ InitContext()
|
|||
i = n_context_strings - 1 + ((int) &context - (int) &context.sc_eip) / 4;
|
||||
context_strings[i] = PUSH_EIP;
|
||||
|
||||
i = n_context_strings - 1 + ((int) &context - (int) &context.sc_efl) / 4;
|
||||
#ifndef __FreeBSD__
|
||||
i = n_context_strings - 1 + ((int) &context - (int)&context.sc_eflags) / 4;
|
||||
#else
|
||||
i = n_context_strings - 1 + ((int) &context - (int)&context.sc_efl) / 4;
|
||||
#endif
|
||||
context_strings[i] = PUSH_EFL;
|
||||
pop_strings[n_context_strings - 1 - i] = POP_EFL;
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ void CreateCaret(HWND hwnd, HBITMAP bitmap, short width, short height)
|
|||
Caret.timeout = 750;
|
||||
LockCaret = FALSE;
|
||||
|
||||
Caret.timerid = SetSystemTimer(NULL, 0, Caret.timeout, CARET_Callback);
|
||||
Caret.timerid = SetSystemTimer((HWND)0, 0, Caret.timeout, (FARPROC)CARET_Callback);
|
||||
|
||||
dprintf_caret(stddeb,"CreateCaret: hwnd=%d, timerid=%d\n",
|
||||
hwnd, Caret.timerid);
|
||||
|
@ -152,7 +152,7 @@ void DestroyCaret()
|
|||
*/
|
||||
dprintf_caret(stddeb,"DestroyCaret: timerid=%d\n", Caret.timerid);
|
||||
|
||||
KillSystemTimer(NULL, Caret.timerid);
|
||||
KillSystemTimer( (HWND)0, Caret.timerid);
|
||||
|
||||
if (Caret.on)
|
||||
CARET_HideCaret();
|
||||
|
@ -221,9 +221,9 @@ void SetCaretBlinkTime(WORD msecs)
|
|||
{
|
||||
if (!Caret.hwnd) return;
|
||||
|
||||
KillSystemTimer(NULL, Caret.timerid);
|
||||
KillSystemTimer( (HWND)0, Caret.timerid);
|
||||
Caret.timeout = msecs;
|
||||
Caret.timerid = SetSystemTimer(NULL, 0, Caret.timeout, CARET_Callback);
|
||||
Caret.timerid = SetSystemTimer((HWND)0, 0, Caret.timeout, (FARPROC)CARET_Callback);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ static HCLASS firstClass = 0;
|
|||
* Return a handle and a pointer to the class.
|
||||
* 'ptr' can be NULL if the pointer is not needed.
|
||||
*/
|
||||
HCLASS CLASS_FindClassByName( char * name, CLASS **ptr )
|
||||
HCLASS CLASS_FindClassByName( char * name, WORD hinstance, CLASS **ptr )
|
||||
{
|
||||
ATOM atom;
|
||||
HCLASS class;
|
||||
|
@ -36,13 +36,14 @@ HCLASS CLASS_FindClassByName( char * name, CLASS **ptr )
|
|||
|
||||
/* First search task-specific classes */
|
||||
|
||||
if ((atom = FindAtom( name )) != 0)
|
||||
if ((atom = /*FindAtom*/GlobalFindAtom( name )) != 0)
|
||||
{
|
||||
for (class = firstClass; (class); class = classPtr->hNext)
|
||||
{
|
||||
classPtr = (CLASS *) USER_HEAP_ADDR(class);
|
||||
if (classPtr->wc.style & CS_GLOBALCLASS) continue;
|
||||
if (classPtr->atomName == atom)
|
||||
if ((classPtr->atomName == atom) &&
|
||||
(( hinstance==0xffff )|| (hinstance == classPtr->wc.hInstance)))
|
||||
{
|
||||
if (ptr) *ptr = classPtr;
|
||||
return class;
|
||||
|
@ -101,7 +102,8 @@ ATOM RegisterClass( LPWNDCLASS class )
|
|||
|
||||
/* Check if a class with this name already exists */
|
||||
|
||||
prevClass = CLASS_FindClassByName( class->lpszClassName, &prevClassPtr );
|
||||
prevClass = CLASS_FindClassByName( class->lpszClassName, class->hInstance,
|
||||
&prevClassPtr );
|
||||
if (prevClass)
|
||||
{
|
||||
/* Class can be created only if it is local and */
|
||||
|
@ -124,9 +126,9 @@ ATOM RegisterClass( LPWNDCLASS class )
|
|||
newClass->wc.cbWndExtra = (class->cbWndExtra < 0) ? 0 : class->cbWndExtra;
|
||||
newClass->wc.cbClsExtra = classExtra;
|
||||
|
||||
if (newClass->wc.style & CS_GLOBALCLASS)
|
||||
/*if (newClass->wc.style & CS_GLOBALCLASS)*/
|
||||
newClass->atomName = GlobalAddAtom( class->lpszClassName );
|
||||
else newClass->atomName = AddAtom( class->lpszClassName );
|
||||
/*else newClass->atomName = AddAtom( class->lpszClassName );*/
|
||||
newClass->wc.lpszClassName = NULL;
|
||||
|
||||
if (newClass->wc.style & CS_CLASSDC)
|
||||
|
@ -161,7 +163,7 @@ BOOL UnregisterClass( LPSTR className, HANDLE instance )
|
|||
CLASS * classPtr, * prevClassPtr;
|
||||
|
||||
/* Check if we can remove this class */
|
||||
class = CLASS_FindClassByName( className, &classPtr );
|
||||
class = CLASS_FindClassByName( className, instance, &classPtr );
|
||||
if (!class) return FALSE;
|
||||
if ((classPtr->wc.hInstance != instance) || (classPtr->cWindows > 0))
|
||||
return FALSE;
|
||||
|
@ -186,8 +188,8 @@ BOOL UnregisterClass( LPSTR className, HANDLE instance )
|
|||
/* Delete the class */
|
||||
if (classPtr->hdce) DCE_FreeDCE( classPtr->hdce );
|
||||
if (classPtr->wc.hbrBackground) DeleteObject( classPtr->wc.hbrBackground );
|
||||
if (classPtr->wc.style & CS_GLOBALCLASS) GlobalDeleteAtom( classPtr->atomName );
|
||||
else DeleteAtom( classPtr->atomName );
|
||||
/*if (classPtr->wc.style & CS_GLOBALCLASS)*/ GlobalDeleteAtom( classPtr->atomName );
|
||||
/*else DeleteAtom( classPtr->atomName );*/
|
||||
if ((int)classPtr->wc.lpszMenuName & 0xffff0000)
|
||||
USER_HEAP_FREE( (int)classPtr->wc.lpszMenuName & 0xffff );
|
||||
USER_HEAP_FREE( class );
|
||||
|
@ -262,6 +264,7 @@ int GetClassName(HWND hwnd, LPSTR lpClassName, short maxCount)
|
|||
WND *wndPtr;
|
||||
CLASS *classPtr;
|
||||
|
||||
/* FIXME: We have the find the correct hInstance */
|
||||
if (!(wndPtr = WIN_FindWndPtr(hwnd))) return 0;
|
||||
if (!(classPtr = CLASS_FindClassPtr(wndPtr->hClass))) return 0;
|
||||
|
||||
|
@ -277,7 +280,29 @@ BOOL GetClassInfo(HANDLE hInstance, LPSTR lpClassName,
|
|||
{
|
||||
CLASS *classPtr;
|
||||
|
||||
if (!(CLASS_FindClassByName(lpClassName, &classPtr))) return FALSE;
|
||||
if (HIWORD(lpClassName))
|
||||
{
|
||||
dprintf_class(stddeb, "GetClassInfo hInstance=%04x lpClassName=%s\n",
|
||||
hInstance, lpClassName);
|
||||
}
|
||||
else
|
||||
dprintf_class(stddeb, "GetClassInfo hInstance=%04x lpClassName=#%d\n",
|
||||
hInstance, (int)lpClassName);
|
||||
|
||||
|
||||
/* if (!(CLASS_FindClassByName(lpClassName, &classPtr))) return FALSE; */
|
||||
if (!(CLASS_FindClassByName(lpClassName, hInstance, &classPtr)))
|
||||
{
|
||||
if (!HIWORD(lpClassName))
|
||||
{
|
||||
char temp[10];
|
||||
sprintf(temp, "#%d", (int)lpClassName);
|
||||
if (!(CLASS_FindClassByName(temp, hInstance, &classPtr))) return FALSE;
|
||||
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
|
||||
if (hInstance && (hInstance != classPtr->wc.hInstance)) return FALSE;
|
||||
|
||||
memcpy(lpWndClass, &(classPtr->wc), sizeof(WNDCLASS));
|
||||
|
|
|
@ -309,7 +309,7 @@ static void CURSOR_SetCursor( HCURSOR hCursor )
|
|||
{
|
||||
CURSORALLOC *lpcur;
|
||||
|
||||
if (!(lpcur = (CURSORALLOC *)GlobalLock(hCursor))) return FALSE;
|
||||
if (!(lpcur = (CURSORALLOC *)GlobalLock(hCursor))) return;
|
||||
if (rootWindow != DefaultRootWindow(display))
|
||||
{
|
||||
XDefineCursor( display, rootWindow, lpcur->xcursor );
|
||||
|
|
|
@ -26,7 +26,6 @@ extern HWND DIALOG_GetFirstTabItem( HWND hwndDlg ); /* windows/dialog.c */
|
|||
*/
|
||||
static void DEFDLG_SetFocus( HWND hwndDlg, HWND hwndCtrl )
|
||||
{
|
||||
int dlgCode;
|
||||
HWND hwndPrev = GetFocus();
|
||||
|
||||
if (IsChild( hwndDlg, hwndPrev ))
|
||||
|
@ -126,7 +125,7 @@ LONG DefDlgProc( HWND hwnd, WORD msg, WORD wParam, LONG lParam )
|
|||
if (!wndPtr) return 0;
|
||||
dlgInfo = (DIALOGINFO *)&wndPtr->wExtra;
|
||||
|
||||
dprintf_dialog(stddeb, "DefDlgProc: %d %04x %d %08x\n",
|
||||
dprintf_dialog(stddeb, "DefDlgProc: %d %04x %d %08lx\n",
|
||||
hwnd, msg, wParam, lParam );
|
||||
|
||||
dlgInfo->msgResult = 0;
|
||||
|
|
|
@ -260,7 +260,9 @@ HWND CreateDialogIndirectParam( HINSTANCE hInst, LPCSTR dlgTemplate,
|
|||
|
||||
if (template.header->style & DS_SETFONT)
|
||||
{
|
||||
hFont = CreateFont( template.pointSize, 0, 0, 0, FW_DONTCARE,
|
||||
/* The font height must be negative as it is a point size */
|
||||
/* (see CreateFont() documentation in the Windows SDK). */
|
||||
hFont = CreateFont( -template.pointSize, 0, 0, 0, FW_DONTCARE,
|
||||
FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
|
||||
DEFAULT_QUALITY, FF_DONTCARE, template.faceName );
|
||||
if (hFont)
|
||||
|
@ -464,6 +466,16 @@ int DialogBoxIndirect( HINSTANCE hInst, HANDLE dlgTemplate,
|
|||
return DialogBoxIndirectParam( hInst, dlgTemplate, owner, dlgProc, 0 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DialogBoxIndirectPtr
|
||||
* like DialogBoxIndirect, but expects pointer to template
|
||||
*/
|
||||
int DialogBoxIndirectPtr( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||
HWND owner, WNDPROC dlgProc)
|
||||
{
|
||||
return DialogBoxIndirectParamPtr(hInst, dlgTemplate, owner, dlgProc, 0);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DialogBoxIndirectParam (USER.240)
|
||||
|
@ -481,6 +493,19 @@ int DialogBoxIndirectParam( HINSTANCE hInst, HANDLE dlgTemplate,
|
|||
return -1;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DialogBoxIndirectParamPtr
|
||||
* like DialogBoxIndirectParam, but expects pointer to template
|
||||
*/
|
||||
int DialogBoxIndirectParamPtr(HINSTANCE hInst,LPCSTR dlgTemplate,
|
||||
HWND owner, WNDPROC dlgProc, LPARAM param)
|
||||
{
|
||||
HWND hwnd;
|
||||
hwnd = CreateDialogIndirectParam( hInst, dlgTemplate, owner, dlgProc, param );
|
||||
if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* EndDialog (USER.88)
|
||||
|
@ -672,7 +697,7 @@ WORD GetDlgItemInt( HWND hwnd, WORD id, BOOL * translated, BOOL fSigned )
|
|||
{
|
||||
int len;
|
||||
HANDLE hText;
|
||||
long result;
|
||||
long result = 0;
|
||||
char * str;
|
||||
|
||||
if (translated) *translated = FALSE;
|
||||
|
|
|
@ -478,12 +478,15 @@ static void EVENT_SelectionRequest( HWND hwnd, XSelectionRequestEvent *event )
|
|||
if(event->selection!=XA_PRIMARY)rprop=None;
|
||||
else if(!IsClipboardFormatAvailable(CF_TEXT))rprop=None;
|
||||
else{
|
||||
/* don't open the clipboard, just get the data */
|
||||
/* Don't worry if we can't open */
|
||||
BOOL couldOpen=OpenClipboard(hwnd);
|
||||
hText=GetClipboardData(CF_TEXT);
|
||||
text=GlobalLock(hText);
|
||||
XChangeProperty(display,request,rprop,XA_STRING,
|
||||
8,PropModeReplace,text,strlen(text));
|
||||
GlobalUnlock(hText);
|
||||
/* close only if we opened before */
|
||||
if(couldOpen)CloseClipboard();
|
||||
}
|
||||
}
|
||||
if(rprop==None) dprintf_event(stddeb,"Request for %s ignored\n",
|
||||
|
|
|
@ -150,8 +150,6 @@ BOOL GRAPH_DrawArc( HDC hdc, int left, int top, int right, int bottom,
|
|||
yend = YLPTODP( dc, yend );
|
||||
if ((left == right) || (top == bottom)) return FALSE;
|
||||
|
||||
if (!DC_SetupGCForPen( dc )) return TRUE;
|
||||
|
||||
xcenter = (right + left) / 2;
|
||||
ycenter = (bottom + top) / 2;
|
||||
start_angle = atan2( (double)(ycenter-ystart)*(right-left),
|
||||
|
@ -164,6 +162,19 @@ BOOL GRAPH_DrawArc( HDC hdc, int left, int top, int right, int bottom,
|
|||
if (left > right) swap_int( &left, &right );
|
||||
if (top > bottom) swap_int( &top, &bottom );
|
||||
|
||||
/* Fill arc with brush if Chord() or Pie() */
|
||||
|
||||
if ((lines > 0) && DC_SetupGCForBrush( dc ))
|
||||
{
|
||||
XSetArcMode( display, dc->u.x.gc, (lines==1) ? ArcChord : ArcPieSlice);
|
||||
XFillArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
||||
}
|
||||
|
||||
/* Draw arc and lines */
|
||||
|
||||
if (!DC_SetupGCForPen( dc )) return TRUE;
|
||||
XDrawArc( display, dc->u.x.drawable, dc->u.x.gc,
|
||||
dc->w.DCOrgX + left, dc->w.DCOrgY + top,
|
||||
right-left-1, bottom-top-1, istart_angle, idiff_angle );
|
||||
|
|
|
@ -286,7 +286,7 @@ LONG MDIMaximizeChild(HWND parent, HWND child, MDICLIENTINFO *ci)
|
|||
LONG MDIRestoreChild(HWND parent, MDICLIENTINFO *ci)
|
||||
{
|
||||
HWND child;
|
||||
WND *w = WIN_FindWndPtr(child);
|
||||
WND *w = WIN_FindWndPtr(parent);
|
||||
LPRECT lprect = &ci->rectRestore;
|
||||
|
||||
dprintf_mdi(stddeb,"restoring mdi child\n");
|
||||
|
|
|
@ -11,7 +11,6 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
|||
#include "message.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "user.h"
|
||||
#include "scroll.h"
|
||||
#include "syscolor.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_NONCLIENT /* */
|
||||
|
@ -20,7 +19,6 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1994";
|
|||
|
||||
|
||||
static HBITMAP hbitmapClose = 0;
|
||||
static HBITMAP hbitmapMDIClose = 0;
|
||||
static HBITMAP hbitmapMinimize = 0;
|
||||
static HBITMAP hbitmapMinimizeD = 0;
|
||||
static HBITMAP hbitmapMaximize = 0;
|
||||
|
@ -73,6 +71,7 @@ extern WORD MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
|
|||
*/
|
||||
static void NC_AdjustRect( LPRECT rect, DWORD style, BOOL menu, DWORD exStyle )
|
||||
{
|
||||
if (style & WS_ICONIC) return; /* Nothing to change for an icon */
|
||||
if (HAS_DLGFRAME( style, exStyle ))
|
||||
InflateRect( rect, SYSMETRICS_CXDLGFRAME, SYSMETRICS_CYDLGFRAME );
|
||||
else
|
||||
|
@ -130,13 +129,6 @@ LONG NC_HandleNCCalcSize( HWND hwnd, NCCALCSIZE_PARAMS *params )
|
|||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
|
||||
if (!wndPtr) return 0;
|
||||
|
||||
/*
|
||||
* we don't want to change the size if hwnd is an icon since
|
||||
* there are no window manager handles on an icon
|
||||
*/
|
||||
if(IsIconic(hwnd)) return 0;
|
||||
|
||||
NC_AdjustRect( &tmpRect, wndPtr->dwStyle, FALSE, wndPtr->dwExStyle );
|
||||
params->rgrc[0].left -= tmpRect.left;
|
||||
params->rgrc[0].top -= tmpRect.top;
|
||||
|
@ -168,6 +160,8 @@ void NC_GetInsideRect( HWND hwnd, RECT *rect )
|
|||
rect->right = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
|
||||
rect->bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
|
||||
|
||||
if (wndPtr->dwStyle & WS_ICONIC) return; /* No border to remove */
|
||||
|
||||
/* Remove frame from rectangle */
|
||||
if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
|
||||
{
|
||||
|
@ -331,10 +325,10 @@ void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down )
|
|||
RECT rect;
|
||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||
NC_GetInsideRect( hwnd, &rect );
|
||||
GRAPH_DrawBitmap( hdc, (wndPtr->dwStyle & WS_CHILD) ?
|
||||
hbitmapMDIClose : hbitmapClose,
|
||||
GRAPH_DrawBitmap( hdc, hbitmapClose,
|
||||
rect.left, rect.top,
|
||||
1, 1, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
|
||||
(wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0,
|
||||
SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
|
||||
down ? NOTSRCCOPY : SRCCOPY );
|
||||
}
|
||||
|
||||
|
@ -349,8 +343,8 @@ static void NC_DrawMaxButton( HWND hwnd, HDC hdc, BOOL down )
|
|||
GRAPH_DrawBitmap( hdc, (IsZoomed(hwnd) ?
|
||||
(down ? hbitmapRestoreD : hbitmapRestore) :
|
||||
(down ? hbitmapMaximizeD : hbitmapMaximize)),
|
||||
rect.right - SYSMETRICS_CXSIZE - 1, rect.top - 1,
|
||||
0, 0, SYSMETRICS_CXSIZE+2, SYSMETRICS_CYSIZE+2, SRCCOPY );
|
||||
rect.right - SYSMETRICS_CXSIZE - 1, rect.top,
|
||||
0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE, SRCCOPY );
|
||||
}
|
||||
|
||||
|
||||
|
@ -364,8 +358,8 @@ static void NC_DrawMinButton( HWND hwnd, HDC hdc, BOOL down )
|
|||
NC_GetInsideRect( hwnd, &rect );
|
||||
if (wndPtr->dwStyle & WS_MAXIMIZEBOX) rect.right -= SYSMETRICS_CXSIZE + 1;
|
||||
GRAPH_DrawBitmap( hdc, (down ? hbitmapMinimizeD : hbitmapMinimize),
|
||||
rect.right - SYSMETRICS_CXSIZE - 1, rect.top - 1,
|
||||
0, 0, SYSMETRICS_CXSIZE+2, SYSMETRICS_CYSIZE+2, SRCCOPY );
|
||||
rect.right - SYSMETRICS_CXSIZE - 1, rect.top,
|
||||
0, 0, SYSMETRICS_CXSIZE+1, SYSMETRICS_CYSIZE, SRCCOPY );
|
||||
}
|
||||
|
||||
|
||||
|
@ -489,8 +483,6 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd,
|
|||
{
|
||||
if (!(hbitmapClose = LoadBitmap( 0, MAKEINTRESOURCE(OBM_CLOSE) )))
|
||||
return;
|
||||
if (!(hbitmapMDIClose = LoadBitmap( 0, MAKEINTRESOURCE(OBM_OLD_CLOSE) )))
|
||||
return;
|
||||
hbitmapMinimize = LoadBitmap( 0, MAKEINTRESOURCE(OBM_REDUCE) );
|
||||
hbitmapMinimizeD = LoadBitmap( 0, MAKEINTRESOURCE(OBM_REDUCED) );
|
||||
hbitmapMaximize = LoadBitmap( 0, MAKEINTRESOURCE(OBM_ZOOM) );
|
||||
|
@ -646,24 +638,24 @@ void NC_DoNCPaint( HWND hwnd, HRGN hrgn, BOOL active, BOOL suppress_menupaint )
|
|||
if ((wndPtr->dwStyle & WS_HSCROLL) && (wndPtr->scroll_flags & 0x0001))
|
||||
bottom -= SYSMETRICS_CYHSCROLL;
|
||||
SetRect(&rect2, rect.right - SYSMETRICS_CXVSCROLL,
|
||||
rect.top, rect.right, bottom);
|
||||
StdDrawScrollBar(hwnd, hdc, SB_VERT, &rect2, (LPHEADSCROLL)wndPtr->VScroll);
|
||||
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, rect.bottom - SYSMETRICS_CYHSCROLL,
|
||||
right, rect.bottom);
|
||||
StdDrawScrollBar(hwnd, hdc, SB_HORZ, &rect2, (LPHEADSCROLL)wndPtr->HScroll);
|
||||
SetRect(&rect2, rect.left-1, rect.bottom - SYSMETRICS_CYHSCROLL,
|
||||
right+1, rect.bottom+1);
|
||||
StdDrawScrollBar(hwnd, hdc, SB_HORZ, &rect2, wndPtr->HScroll);
|
||||
}
|
||||
|
||||
if ((wndPtr->dwStyle & WS_VSCROLL) && (wndPtr->dwStyle & WS_HSCROLL) &&
|
||||
(wndPtr->scroll_flags & 0x0003) == 0x0003) {
|
||||
RECT r = rect;
|
||||
r.left = r.right - SYSMETRICS_CXVSCROLL;
|
||||
r.top = r.bottom - SYSMETRICS_CYHSCROLL;
|
||||
r.left = r.right - SYSMETRICS_CXVSCROLL + 1;
|
||||
r.top = r.bottom - SYSMETRICS_CYHSCROLL + 1;
|
||||
FillRect( hdc, &r, sysColorObjects.hbrushScrollbar );
|
||||
}
|
||||
}
|
||||
|
@ -909,7 +901,11 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam, POINT pt )
|
|||
|
||||
if (GetCapture() != hwnd) SetCapture( hwnd );
|
||||
|
||||
if (wndPtr->dwStyle & WS_CHILD) hdc = GetDC( wndPtr->hwndParent );
|
||||
if (wndPtr->dwStyle & WS_CHILD)
|
||||
{
|
||||
/* Retrieve a default cache DC (without using the window style) */
|
||||
hdc = GetDCEx( wndPtr->hwndParent, 0, DCX_CACHE );
|
||||
}
|
||||
else
|
||||
{ /* Grab the server only when moving top-level windows without desktop */
|
||||
hdc = GetDC( 0 );
|
||||
|
@ -1262,8 +1258,10 @@ LONG NC_HandleSysCommand( HWND hwnd, WORD wParam, POINT pt )
|
|||
|
||||
case SC_SCREENSAVE:
|
||||
if (wParam == SC_ABOUTWINE)
|
||||
DialogBox( hSysRes, MAKEINTRESOURCE(2),
|
||||
{ extern char sysres_DIALOG_2[];
|
||||
DialogBoxIndirectPtr( hSysRes, sysres_DIALOG_2,
|
||||
hwnd, (WNDPROC)AboutWine_Proc );
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -66,7 +66,7 @@ BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT rc, LPRECT cliprc,
|
|||
rc->left, rc->top, rc->right, rc->bottom);
|
||||
|
||||
if (rc == NULL)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (cliprc)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT rc, LPRECT cliprc,
|
|||
|
||||
if (!BitBlt(hdc, dest.x, dest.y, width, height, hdc, src.x, src.y,
|
||||
SRCCOPY))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (hrgnUpdate)
|
||||
{
|
||||
|
@ -124,6 +124,7 @@ BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT rc, LPRECT cliprc,
|
|||
}
|
||||
|
||||
if (rcUpdate) GetRgnBox( hrgnUpdate, rcUpdate );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1993, 1994";
|
|||
#include "user.h"
|
||||
#include "dce.h"
|
||||
#include "sysmetrics.h"
|
||||
#include "scroll.h"
|
||||
#include "icon.h"
|
||||
#include "cursor.h"
|
||||
#include "stddebug.h"
|
||||
|
@ -40,7 +39,6 @@ extern HMENU CopySysMenu(); /* menu.c */
|
|||
extern LONG MDIClientWndProc(HWND hwnd, WORD message,
|
||||
WORD wParam, LONG lParam); /* mdi.c */
|
||||
|
||||
|
||||
static HWND hwndDesktop = 0;
|
||||
static HWND hWndSysModal = 0;
|
||||
|
||||
|
@ -230,7 +228,7 @@ BOOL WIN_CreateDesktopWindow()
|
|||
HCLASS hclass;
|
||||
CLASS *classPtr;
|
||||
|
||||
if (!(hclass = CLASS_FindClassByName( DESKTOP_CLASS_NAME, &classPtr )))
|
||||
if (!(hclass = CLASS_FindClassByName( DESKTOP_CLASS_NAME, 0, &classPtr )))
|
||||
return FALSE;
|
||||
|
||||
hwndDesktop = USER_HEAP_ALLOC( GMEM_MOVEABLE,
|
||||
|
@ -338,7 +336,7 @@ HWND CreateWindowEx( DWORD exStyle, LPSTR className, LPSTR windowName,
|
|||
}
|
||||
else if (style & WS_CHILD) return 0; /* WS_CHILD needs a parent */
|
||||
|
||||
if (!(class = CLASS_FindClassByName( className, &classPtr ))) {
|
||||
if (!(class = CLASS_FindClassByName( className, instance, &classPtr ))) {
|
||||
fprintf(stderr,"CreateWindow BAD CLASSNAME '%s' !\n", className);
|
||||
return 0;
|
||||
}
|
||||
|
@ -603,7 +601,7 @@ HWND FindWindow(LPSTR ClassMatch, LPSTR TitleMatch)
|
|||
|
||||
if (ClassMatch)
|
||||
{
|
||||
hclass = CLASS_FindClassByName( ClassMatch, &classPtr );
|
||||
hclass = CLASS_FindClassByName( ClassMatch, 0xffff, &classPtr );
|
||||
if (!hclass) return 0;
|
||||
}
|
||||
else hclass = 0;
|
||||
|
@ -731,7 +729,19 @@ LONG GetWindowLong( HWND hwnd, short offset )
|
|||
{
|
||||
case GWL_STYLE: return wndPtr->dwStyle;
|
||||
case GWL_EXSTYLE: return wndPtr->dwExStyle;
|
||||
case GWL_WNDPROC: return (LONG)wndPtr->lpfnWndProc;
|
||||
case GWL_WNDPROC:
|
||||
if (!IS_16_BIT_ADDRESS(wndPtr->lpfnWndProc))
|
||||
{
|
||||
/* The window procedure is part of Wine.
|
||||
Unfortunately, MS-Windows programs can't access these
|
||||
adresses.
|
||||
FIXME: There should be a jump table somewhere in if1632
|
||||
*/
|
||||
long x=Stack16Frame[11]<<16 | 0x0010;
|
||||
/* Just to make Borland's OWL happy */
|
||||
return x;
|
||||
}
|
||||
else return (LONG)wndPtr->lpfnWndProc;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue