Commit 02ed4c23 authored by Alexandre Julliard's avatar Alexandre Julliard

Release 960302

Sat Mar 2 18:19:06 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/scroll.c] Fixed SCROLL_THUMB painting fixes from Alex Korobka to store the current tracking window. * [files/file.c] Fixed two file descriptor leaks in FILE_OpenFile(). * [if1632/relay32.c] [loader/module.c] [loader/pe_image.c] [tools/build.c] Replaced LOADEDFILEINFO structure by OFSTRUCT. * [memory/atom.c] Reload the pointer to the atom table in ATOM_GetTable() and ATOM_AddAtom() in case the LOCAL_Alloc() calls caused the table to move in linear memory. Fri Mar 1 11:57:13 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl> * [include/callback.h] Added support for CallWordBreakProc(). * [controls/edit.c] New caret handling (really efficient / fast). Implemented EM_SETWORDBREAKPROC and EM_GETWORDBREAKPROC. Fixed EM_SETFONT so it now also creates a proper new caret. Wed Feb 28 22:03:34 1996 Daniel Schepler <daniel@frobnitz.wustl.edu> * [controls/desktop.c] [misc/main.c] [windows/event.c] [windows/win.c] Added WM_DELETE protocol to top-level windows. * [controls/scroll.c] Fixed a problem which caused slow scrolling to continue uncontrollably. * [misc/exec.c] Implemented ExitWindows(). * [windows/win.c] Set top-level owned windows to be transient. Wed Feb 28 19:13:22 1996 Ulrich Schmid <uschmid@mail.hh.provi.de> * [programs/progman/*] Added a program manager. Wed Feb 28 18:38:01 1996 Duncan C Thomson <duncan@spd.eee.strath.ac.uk> * [resources/sysres_Eo.c] Added support for Esperanto [Eo] language. Wed Feb 28 00:23:00 1996 Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk> * [if1632/user32.spec] Added EndDialog, GetDlgItem, GetDlgItemInt, SetDlgItemInt, * [win32/init.c] Added task.h to includes. GetModuleHandleA() - return hInstance if called with NULL parameter. Freecell needs this. NOTE this may indicate a problem with differentiation between hModule and hInstance within Wine. * [win32/resource.c] FindResource32() and LoadResource32() - Removed #if 0's around conversion from hInstance to hModule. See remarks above. * [win32/string32.c] WIN32_UniLen() - removed stray semicolon. Tue Feb 27 21:05:18 1996 Jim Peterson <jspeter@birch.ee.vt.edu> * [windows/caret.c] Set blink rate with call to GetProfileInt(). * [rc/winerc.c] In new_style(), made initial flag settings WS_CHILD | WS_VISIBLE instead of 0. This seems to correspond to Borland's defaults, and the flags can be unset by using the (rather obtuse) "| NOT WS_CHILD" or "| NOT WS_VISIBLE" technique in the *.rc file. * [win32/time.c] In GetLocalTime() and GetSystemTime(), used tv_sec field of result returned by gettimeofday() instead of making second call to time(). This eliminates clock jitter if the seconds change between the two calls (rare, but possible). * [include/wintypes.h] Added "#define _far" and "#define _pascal". * [windows/win.c] Added function GetDesktopHwnd(). * [include/xmalloc.h] Removed the '#ifdef HAVE_STDLIB_H' structure, since it seemed to have been removed from 'configure', and was causing redefinition warnings. Tue Feb 27 19:31:11 1996 Albrecht Kleine <kleine@ak.sax.de> * [windows/winpos.c] Added RDW_ALLCHILDREN flag in SetWindowPos (handling SWP_FRAMECHANGED) to force a repaint when setting menu bars with different rows. Sun Feb 25 21:15:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [windows/syscolors.c] [controls/scroll.c] Fixed DrawFocusRect pen and SCROLL_THUMB painting.
parent 7d654eb2
This is release 960225 of Wine the MS Windows emulator. This is still a
This is release 960302 of Wine the MS Windows emulator. This is still a
developer's only release. There are many bugs and many unimplemented API
features. Most applications still do not work.
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry.
WHAT'S NEW with Wine-960225: (see ChangeLog for details)
- Many caret fixes.
- New -mode option to replace -enhanced.
- Many listboxes improvements.
- Find and Replace dialogs in built-in COMMDLG fixed.
WHAT'S NEW with Wine-960302: (see ChangeLog for details)
- Program manager clone using Winelib.
- Support for Esperanto language.
- Some scrollbar fixes.
- Edit control improvements.
- Lots of bug fixes.
See the README file in the distribution for installation instructions.
......@@ -18,10 +18,10 @@ Because of lags created by using mirror, this message may reach you before
the release is available at the ftp sites. The sources will be available
from the following locations:
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960225.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960225.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960225.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960225.tar.gz
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960302.tar.gz
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960302.tar.gz
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960302.tar.gz
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960302.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite.
......
----------------------------------------------------------------------
Sat Mar 2 18:19:06 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/scroll.c]
Fixed SCROLL_THUMB painting fixes from Alex Korobka to store the
current tracking window.
* [files/file.c]
Fixed two file descriptor leaks in FILE_OpenFile().
* [if1632/relay32.c] [loader/module.c] [loader/pe_image.c]
[tools/build.c]
Replaced LOADEDFILEINFO structure by OFSTRUCT.
* [memory/atom.c]
Reload the pointer to the atom table in ATOM_GetTable() and
ATOM_AddAtom() in case the LOCAL_Alloc() calls caused the table to
move in linear memory.
Fri Mar 1 11:57:13 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>
* [include/callback.h]
Added support for CallWordBreakProc().
* [controls/edit.c]
New caret handling (really efficient / fast).
Implemented EM_SETWORDBREAKPROC and EM_GETWORDBREAKPROC.
Fixed EM_SETFONT so it now also creates a proper new caret.
Wed Feb 28 22:03:34 1996 Daniel Schepler <daniel@frobnitz.wustl.edu>
* [controls/desktop.c] [misc/main.c] [windows/event.c] [windows/win.c]
Added WM_DELETE protocol to top-level windows.
* [controls/scroll.c]
Fixed a problem which caused slow scrolling to continue uncontrollably.
* [misc/exec.c]
Implemented ExitWindows().
* [windows/win.c]
Set top-level owned windows to be transient.
Wed Feb 28 19:13:22 1996 Ulrich Schmid <uschmid@mail.hh.provi.de>
* [programs/progman/*]
Added a program manager.
Wed Feb 28 18:38:01 1996 Duncan C Thomson <duncan@spd.eee.strath.ac.uk>
* [resources/sysres_Eo.c]
Added support for Esperanto [Eo] language.
Wed Feb 28 00:23:00 1996 Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk>
* [if1632/user32.spec]
Added EndDialog, GetDlgItem, GetDlgItemInt, SetDlgItemInt,
* [win32/init.c]
Added task.h to includes. GetModuleHandleA() - return hInstance
if called with NULL parameter. Freecell needs this. NOTE this
may indicate a problem with differentiation between hModule and
hInstance within Wine.
* [win32/resource.c]
FindResource32() and LoadResource32() - Removed #if 0's around
conversion from hInstance to hModule. See remarks above.
* [win32/string32.c]
WIN32_UniLen() - removed stray semicolon.
Tue Feb 27 21:05:18 1996 Jim Peterson <jspeter@birch.ee.vt.edu>
* [windows/caret.c]
Set blink rate with call to GetProfileInt().
* [rc/winerc.c]
In new_style(), made initial flag settings WS_CHILD | WS_VISIBLE
instead of 0. This seems to correspond to Borland's defaults, and
the flags can be unset by using the (rather obtuse) "| NOT WS_CHILD"
or "| NOT WS_VISIBLE" technique in the *.rc file.
* [win32/time.c]
In GetLocalTime() and GetSystemTime(), used tv_sec field of result
returned by gettimeofday() instead of making second call to
time(). This eliminates clock jitter if the seconds change
between the two calls (rare, but possible).
* [include/wintypes.h]
Added "#define _far" and "#define _pascal".
* [windows/win.c]
Added function GetDesktopHwnd().
* [include/xmalloc.h]
Removed the '#ifdef HAVE_STDLIB_H' structure, since it seemed to
have been removed from 'configure', and was causing redefinition
warnings.
Tue Feb 27 19:31:11 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/winpos.c]
Added RDW_ALLCHILDREN flag in SetWindowPos (handling SWP_FRAMECHANGED)
to force a repaint when setting menu bars with different rows.
Sun Feb 25 21:15:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [windows/syscolors.c] [controls/scroll.c]
Fixed DrawFocusRect pen and SCROLL_THUMB painting.
----------------------------------------------------------------------
Sat Feb 24 16:17:05 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/profile.c]
......
......@@ -42,7 +42,7 @@ OBJS = $(C_SRCS:.c=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS)
echo "#include \"windows.h\"" >winerctmp.c
echo WINDOWS_H_ENDS_HERE >>winerctmp.c
cat $< >>winerctmp.c
$(CPP) $(DEFS) $(DIVINCL) -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
$(CPP) $(DEFS) $(DIVINCL) -DRC_INVOKED -P winerctmp.c | sed -e '1,/^WINDOWS_H_ENDS_HERE/d' | $(WINERC) -c -o $* -p $*
$(RM) winerctmp.c
.rc.h:
......
......@@ -69,7 +69,9 @@ EMUSUBDIRS = \
LIBSUBDIRS = library
ALLSUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS) $(LIBSUBDIRS) libtest
PROGSUBDIRS = libtest programs
ALLSUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS) $(LIBSUBDIRS) $(PROGSUBDIRS)
COMMONOBJS = \
controls/controls.o \
......
......@@ -1962,6 +1962,8 @@ misc/Makefile
miscemu/Makefile
multimedia/Makefile
objects/Makefile
programs/Makefile
programs/progman/Makefile
rc/Makefile
resources/Makefile
tools/Makefile
......@@ -2034,6 +2036,8 @@ misc/Makefile
miscemu/Makefile
multimedia/Makefile
objects/Makefile
programs/Makefile
programs/progman/Makefile
rc/Makefile
resources/Makefile
tools/Makefile
......
......@@ -97,6 +97,8 @@ misc/Makefile
miscemu/Makefile
multimedia/Makefile
objects/Makefile
programs/Makefile
programs/progman/Makefile
rc/Makefile
resources/Makefile
tools/Makefile
......
......@@ -149,6 +149,10 @@ LRESULT DesktopWndProc ( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
case WM_ERASEBKGND:
if (rootWindow == DefaultRootWindow(display)) return 1;
return DESKTOP_DoEraseBkgnd( hwnd, (HDC)wParam, infoPtr );
case WM_SYSCOMMAND:
if ((wParam & 0xfff0) != SC_CLOSE) return 0;
ExitWindows( 0, 0 );
}
return 0;
......
......@@ -2096,16 +2096,8 @@ INT DlgDirList( HWND hDlg, SEGPTR spec, INT idLBox, INT idStatic, UINT attrib )
if (!filespec[0]) strcpy( mask, "*.*" );
else
{
const char *ptr;
BYTE attr;
if (((ptr = DOSFS_GetUnixFileName( filespec, TRUE )) != NULL) &&
FILE_Stat( ptr, &attr, NULL, NULL, NULL ) &&
(attr & FA_DIRECTORY))
{
/* If the path exists and is a directory, chdir to it */
if (!DRIVE_Chdir( drive, filespec )) return FALSE;
strcpy( mask, "*.*" );
}
/* If the path exists and is a directory, chdir to it */
if (DRIVE_Chdir( drive, filespec )) strcpy( mask, "*.*" );
else
{
char *p, *p2;
......
......@@ -70,6 +70,10 @@ enum SCROLL_HITTEST
SCROLL_BOTTOM_ARROW /* Bottom or right arrow */
};
/* Thumb-tracking info */
static HWND hwndTracking = 0;
static int nBarTracking = 0;
static UINT uTrackingPos = 0;
/***********************************************************************
* SCROLL_LoadBitmaps
......@@ -430,6 +434,8 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, int nBar, RECT *rect,
Rectangle( hdc, r.left, r.top, r.right, r.bottom );
InflateRect( &r, -1, -1 );
GRAPH_DrawReliefRect( hdc, &r, 1, 2, FALSE );
if ((hwndTracking == hwnd) && (nBarTracking == nBar))
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, uTrackingPos);
}
......@@ -607,9 +613,6 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
#ifdef WINELIB32
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
(WPARAM)SB_LINEUP, (LPARAM)hwndCtl );
......@@ -617,6 +620,9 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_LINEUP, MAKELONG( 0, hwndCtl ));
#endif
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
}
}
else KillSystemTimer( hwnd, SCROLL_TIMER );
......@@ -630,9 +636,6 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
#ifdef WINELIB32
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
(WPARAM)SB_PAGEUP, (LPARAM)hwndCtl );
......@@ -640,6 +643,9 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_PAGEUP, MAKELONG( 0, hwndCtl ));
#endif
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
}
}
else KillSystemTimer( hwnd, SCROLL_TIMER );
......@@ -647,11 +653,18 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
case SCROLL_THUMB:
if (msg == WM_LBUTTONDOWN)
{
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize,
trackThumbPos + lastMousePos - lastClickPos );
hwndTracking = hwnd;
nBarTracking = nBar;
}
else if (msg == WM_LBUTTONUP)
{
hwndTracking = 0;
SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbPos,
infoPtr->flags, vertical, FALSE, FALSE );
}
else /* WM_MOUSEMOVE */
{
UINT pos, val;
......@@ -662,11 +675,11 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
{
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize,
trackThumbPos + lastMousePos - lastClickPos );
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize,
trackThumbPos + pos - lastClickPos );
lastMousePos = pos;
val = SCROLL_GetThumbVal( infoPtr, &rect, vertical,
trackThumbPos + lastMousePos - lastClickPos );
/* Save tracking info */
uTrackingPos = trackThumbPos + pos - lastClickPos;
#ifdef WINELIB32
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
MAKEWPARAM(SB_THUMBTRACK,val), (LPARAM)hwndCtl );
......@@ -674,6 +687,8 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_THUMBTRACK, MAKELONG( val, hwndCtl ));
#endif
SCROLL_DrawMovingThumb( hdc, &rect, vertical,
arrowSize, uTrackingPos );
}
}
break;
......@@ -686,9 +701,6 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
#ifdef WINELIB32
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
(WPARAM)SB_PAGEDOWN, (LPARAM)hwndCtl );
......@@ -696,6 +708,9 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_PAGEDOWN, MAKELONG( 0, hwndCtl ));
#endif
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
}
}
else KillSystemTimer( hwnd, SCROLL_TIMER );
......@@ -708,9 +723,6 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
#ifdef WINELIB32
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
(WPARAM)SB_LINEDOWN, (LPARAM)hwndCtl );
......@@ -718,6 +730,9 @@ void SCROLL_HandleScrollEvent( HWND hwnd, int nBar, WORD msg, POINT pt )
SendMessage( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_LINEDOWN, MAKELONG( 0, hwndCtl ));
#endif
SetSystemTimer( hwnd, SCROLL_TIMER, (msg == WM_LBUTTONDOWN) ?
SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
(FARPROC)0 );
}
}
else KillSystemTimer( hwnd, SCROLL_TIMER );
......
......@@ -657,11 +657,6 @@ found:
lstrcpyn( ofs->szPathName, DOSFS_GetDosTrueName( ofs->szPathName, FALSE ),
sizeof(ofs->szPathName) );
if (mode & OF_PARSE)
{
dprintf_file( stddeb, "FILE_Openfile: %s return = 0\n", name);
return 0;
}
if (mode & OF_DELETE)
{
if (unlink( unixName ) == -1) goto not_found;
......@@ -690,13 +685,18 @@ found:
if (memcmp( ofs->reserved, &st.st_mtime, sizeof(ofs->reserved) ))
{
dprintf_file( stddeb, "FILE_Openfile: %s return = -1\n", name);
close( handle );
return -1;
}
}
memcpy( ofs->reserved, &st.st_mtime, sizeof(ofs->reserved) );
}
if (mode & OF_EXIST) close( handle );
if (mode & OF_EXIST)
{
close( handle );
return 0;
}
dprintf_file( stddeb, "FILE_Openfile: %s return = %d\n", name,handle);
return handle;
......
......@@ -7,6 +7,7 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dos_fs.h"
......
......@@ -142,7 +142,7 @@ void RELAY32_MakeFakeModule(WIN32_builtin*dll)
struct w_files *wpnt;
int size;
HMODULE hModule;
LOADEDFILEINFO *pFileInfo;
OFSTRUCT *pFileInfo;
char *pStr;
wpnt=xmalloc(sizeof(struct w_files));
wpnt->hinstance=0;
......@@ -151,7 +151,8 @@ void RELAY32_MakeFakeModule(WIN32_builtin*dll)
wpnt->mz_header=wpnt->pe=0;
size=sizeof(NE_MODULE) +
/* loaded file info */
sizeof(LOADEDFILEINFO) + strlen(dll->name) +
sizeof(*pFileInfo) - sizeof(pFileInfo->szPathName) +
strlen(dll->name) + 1 +
/* name table */
12 +
/* several empty tables */
......@@ -177,10 +178,11 @@ void RELAY32_MakeFakeModule(WIN32_builtin*dll)
pModule->fileinfo=sizeof(NE_MODULE);
pModule->os_flags=NE_OSFLAGS_WINDOWS;
pModule->expected_version=0x30A;
pFileInfo=(LOADEDFILEINFO *)(pModule + 1);
pFileInfo->length = sizeof(LOADEDFILEINFO)+strlen(dll->name)-1;
strcpy(pFileInfo->filename,dll->name);
pStr = ((char*)pFileInfo+pFileInfo->length+1);
pFileInfo=(OFSTRUCT *)(pModule + 1);
pFileInfo->cBytes = sizeof(*pFileInfo) - sizeof(pFileInfo->szPathName)
+ strlen(dll->name);
strcpy( pFileInfo->szPathName, dll->name );
pStr = ((char*)pFileInfo) + pFileInfo->cBytes + 1;
pModule->name_table=(int)pStr-(int)pModule;
*pStr=strlen(dll->name);
strcpy(pStr+1,dll->name);
......
......@@ -280,7 +280,7 @@ id 2
275 stub RepaintScreen
276 stub LockMyTask
277 pascal16 GetDlgCtrlID(word) GetDlgCtrlID
278 pascal16 GetDeskTopHwnd() GetDesktopWindow
278 pascal16 GetDesktopHwnd() GetDesktopHwnd
279 stub OldSetDeskPattern
280 stub SetSystemMenu
281 pascal16 GetSysColorBrush(word) GetSysColorBrush
......
......@@ -181,7 +181,7 @@ base 1
0170 stdcall EnableScrollBar(long long long) EnableScrollBar
0171 stdcall EnableWindow(long long) EnableWindow
0172 stub EndDeferWindowPos
0173 stub EndDialog
0173 stdcall EndDialog(long long) EndDialog
0174 stub EndMenu
0175 stdcall EndPaint(long ptr) USER32_EndPaint
0176 stub EndTask
......@@ -242,8 +242,8 @@ base 1
0231 stub GetDesktopWindow
0232 stub GetDialogBaseUnits
0233 stub GetDlgCtrlID
0234 stub GetDlgItem
0235 stub GetDlgItemInt
0234 stdcall GetDlgItem(long long) GetDlgItem
0235 stdcall GetDlgItemInt(long long long long) GetDlgItemInt
0236 stub GetDlgItemTextA
0237 stub GetDlgItemTextW
0238 stub GetDoubleClickTime
......@@ -485,7 +485,7 @@ base 1
0473 stub SetCursorPos
0474 stub SetDebugErrorLevel
0475 stub SetDeskWallpaper
0476 stub SetDlgItemInt
0476 stdcall SetDlgItemInt(long long long long) SetDlgItemInt
0477 stub SetDlgItemTextA
0478 stub SetDlgItemTextW
0479 stub SetDoubleClickTime
......
......@@ -32,6 +32,7 @@ extern WORD CallTo16_word_wlw ( FARPROC, WORD, WORD, LONG, WORD );
extern LONG CallTo16_long_wwl ( FARPROC, WORD, WORD, WORD, LONG );
extern WORD CallTo16_word_llwl ( FARPROC, WORD, LONG, LONG, WORD, LONG );
extern LONG CallTo16_long_wwwl ( FARPROC, WORD, WORD, WORD, WORD, LONG );
extern WORD CallTo16_word_lwww ( FARPROC, WORD, LONG, WORD, WORD, WORD );
extern WORD CallTo16_word_wllwl( FARPROC, WORD, WORD, LONG, LONG, WORD, LONG );
extern WORD CallTo16_word_wwlll( FARPROC, WORD, WORD, WORD, LONG, LONG, LONG );
......@@ -64,6 +65,8 @@ extern WORD CallTo16_regs_( FARPROC func, WORD ds, WORD es, WORD bp, WORD ax,
CallTo16_word_wwlll( func, CURRENT_DS, id, msg, dwUser, dw1, dw2 )
#define CallWndProc( func, ds, hwnd, msg, wParam, lParam ) \
CallTo16_long_wwwl( func, ds, hwnd, msg, wParam, lParam )
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
CallTo16_word_lwww( func, CURRENT_DS, lpch, ichCurrent, cch, code )
#else /* WINELIB */
......@@ -93,6 +96,8 @@ extern WORD CallTo16_regs_( FARPROC func, WORD ds, WORD es, WORD bp, WORD ax,
(*func)( id, msg, dwUser, dw1, dw2 )
#define CallWndProc( func, ds, hwnd, msg, wParam, lParam ) \
(*func)( hwnd, msg, wParam, lParam )
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
(*func)( lpch, ichCurrent, cch, code )
#endif /* WINELIB */
......
......@@ -21,7 +21,7 @@ typedef struct
WORD entry_table; /* Near ptr to entry table */
HMODULE next; /* Selector to next module */
WORD dgroup_entry; /* Near ptr to segment entry for DGROUP */
WORD fileinfo; /* Near ptr to file info (LOADEDFILEINFO) */
WORD fileinfo; /* Near ptr to file info (OFSTRUCT) */
WORD flags; /* Module flags */
WORD dgroup; /* Logical segment for DGROUP */
WORD heap_size; /* Initial heap size */
......@@ -51,17 +51,6 @@ typedef struct
WORD self_loading_sel; /* Selector used for self-loading apps. procs */
} NE_MODULE;
/* Loaded file info */
typedef struct
{
BYTE length; /* Length of the structure, not counting this byte */
BYTE fixed_media; /* File is on removable media */
WORD error; /* Error code (?) */
WORD date; /* File date in MS-DOS format */
WORD time; /* File time in MS-DOS format */
char filename[1]; /* File name */
} LOADEDFILEINFO;
/* In-memory segment table */
typedef struct
{
......@@ -105,6 +94,9 @@ typedef struct
#define NE_MODULE_TABLE(pModule) \
((WORD *)((char *)(pModule) + (pModule)->modref_table))
#define NE_MODULE_NAME(pModule) \
(((OFSTRUCT *)((char*)(pModule) + (pModule)->fileinfo))->szPathName)
#ifndef WINELIB
#pragma pack(4)
#endif
......
......@@ -17,7 +17,8 @@ typedef enum
LANG_Fr, /* French */
LANG_Fi, /* Finnish */
LANG_Da, /* Danish */
LANG_Cz /* Czech */
LANG_Cz, /* Czech */
LANG_Eo /* Esperanto */
} WINE_LANGUAGE;
/* Supported modes */
......
......@@ -138,9 +138,11 @@ typedef FARPROC HOOKPROC;
#define FALSE 0
#define CW_USEDEFAULT ((INT)0x8000)
#define FAR
#define _far
#define NEAR
#define _near
#define PASCAL
#define _pascal
#define VOID void
#define WINAPI PASCAL
#define CALLBACK PASCAL
......
#ifndef __WINE_XMALLOC_H
#define __WINE_XMALLOC_H
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
#define size_t unsigned int
#endif
void *xmalloc (size_t);
void *xrealloc (void *, size_t);
char *xstrdup( const char * );
void *xmalloc( int size );
void *xrealloc( void *ptr, int size );
char *xstrdup( const char *str );
#endif /* __WINE_XMALLOC_H */
......@@ -27,6 +27,8 @@
#include "callback.h"
#include "wine.h"
extern HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params );
static HMODULE hFirstModule = 0;
static HMODULE hCachedModule = 0; /* Module cached by MODULE_OpenFile */
......@@ -145,8 +147,7 @@ void MODULE_PrintModule( HMODULE hmodule )
/* Dump the file info */
printf( "Filename: '%s'\n",
((LOADEDFILEINFO *)((BYTE *)pModule + pModule->fileinfo))->filename );
printf( "Filename: '%s'\n", NE_MODULE_NAME(pModule) );
/* Dump the segment table */
......@@ -269,7 +270,7 @@ int MODULE_OpenFile( HMODULE hModule )
if (hCachedModule == hModule) return cachedfd;
close( cachedfd );
hCachedModule = hModule;
name = ((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename;
name = NE_MODULE_NAME( pModule );
if (!(unixName = DOSFS_GetUnixFileName( name, TRUE )) ||
(cachedfd = open( unixName, O_RDONLY )) == -1)
fprintf( stderr, "MODULE_OpenFile: can't open file '%s' for module "NPFMT"\n",
......@@ -444,7 +445,7 @@ HMODULE MODULE_LoadExeHeader( int fd, OFSTRUCT *ofs )
size = sizeof(NE_MODULE) +
/* loaded file info */
sizeof(LOADEDFILEINFO) + strlen(ofs->szPathName) +
sizeof(OFSTRUCT)-sizeof(ofs->szPathName)+strlen(ofs->szPathName)+1+
/* segment table */
ne_header.n_segment_tab * sizeof(SEGTABLEENTRY) +
/* resource table */
......@@ -488,13 +489,10 @@ HMODULE MODULE_LoadExeHeader( int fd, OFSTRUCT *ofs )
/* Store the filename information */
pModule->fileinfo = (int)pData - (int)pModule;
((LOADEDFILEINFO*)pData)->length = sizeof(LOADEDFILEINFO)+strlen(ofs->szPathName);
((LOADEDFILEINFO*)pData)->fixed_media = TRUE;
((LOADEDFILEINFO*)pData)->error = 0;
((LOADEDFILEINFO*)pData)->date = 0;
((LOADEDFILEINFO*)pData)->time = 0;
strcpy( ((LOADEDFILEINFO*)pData)->filename, ofs->szPathName );
pData += ((LOADEDFILEINFO*)pData)->length--;
size = sizeof(OFSTRUCT)-sizeof(ofs->szPathName)+strlen(ofs->szPathName)+1;
memcpy( pData, ofs, size );
((OFSTRUCT *)pData)->cBytes = size - 1;
pData += size;
/* Get the segment table */
......@@ -845,7 +843,7 @@ HMODULE MODULE_FindModule( LPCSTR path )
{
NE_MODULE *pModule = (NE_MODULE *)GlobalLock( hModule );
if (!pModule) break;
modulepath = ((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename;
modulepath = NE_MODULE_NAME(pModule);
if (!(modulename = strrchr( modulepath, '\\' )))
modulename = modulepath;
else modulename++;
......@@ -916,8 +914,6 @@ static void MODULE_FreeModule( HMODULE hModule )
}
HINSTANCE PE_LoadModule(int fd, OFSTRUCT *ofs, LOADPARAMS* params);
/**********************************************************************
* LoadModule (KERNEL.45)
*/
......@@ -1194,12 +1190,10 @@ int GetModuleUsage( HANDLE hModule )
int GetModuleFileName( HANDLE hModule, LPSTR lpFileName, short nSize )
{
NE_MODULE *pModule;
char *name;
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
if (!(pModule = (NE_MODULE *)GlobalLock( hModule ))) return 0;
name = ((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename;
lstrcpyn( lpFileName, name, nSize );
lstrcpyn( lpFileName, NE_MODULE_NAME(pModule), nSize );
dprintf_module( stddeb, "GetModuleFilename: %s\n", lpFileName );
return strlen(lpFileName);
}
......@@ -1405,9 +1399,7 @@ BOOL ModuleNext( MODULEENTRY *lpme )
lpme->szModule[MAX_MODULE_NAME] = '\0';
lpme->hModule = lpme->wNext;
lpme->wcUsage = pModule->count;
strncpy( lpme->szExePath,
((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename,
MAX_PATH );
strncpy( lpme->szExePath, NE_MODULE_NAME(pModule), MAX_PATH );
lpme->szExePath[MAX_PATH] = '\0';
lpme->wNext = pModule->next;
return TRUE;
......
......@@ -240,7 +240,6 @@ int NE_AccessResource( HMODULE hModule, HRSRC hRsrc )
{
NE_MODULE *pModule;
NE_NAMEINFO *pNameInfo=NULL;
char *name;
int fd;
pModule = (NE_MODULE *)GlobalLock( hModule );
......@@ -249,8 +248,7 @@ int NE_AccessResource( HMODULE hModule, HRSRC hRsrc )
pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
#endif
name = ((LOADEDFILEINFO*)((char*)pModule + pModule->fileinfo))->filename;
if ((fd = _lopen( name, OF_READ )) != -1)
if ((fd = _lopen( NE_MODULE_NAME(pModule), OF_READ )) != -1)
{
WORD sizeShift = *(WORD *)((char *)pModule + pModule->res_table);
_llseek( fd, (int)pNameInfo->offset << sizeShift, SEEK_SET );
......
......@@ -536,12 +536,11 @@ static HINSTANCE PE_LoadImage( int fd, struct w_files *wpnt )
HINSTANCE MODULE_CreateInstance(HMODULE hModule,LOADPARAMS *params);
void InitTask(struct sigcontext_struct context);
HINSTANCE PE_LoadModule(int fd, OFSTRUCT *ofs, LOADPARAMS* params)
HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params )
{
struct w_files *wpnt;
int size;
int size, of_size;
NE_MODULE *pModule;
LOADEDFILEINFO *pFileInfo;
SEGTABLEENTRY *pSegment;
char *pStr;
DWORD cts;
......@@ -561,15 +560,17 @@ HINSTANCE PE_LoadModule(int fd, OFSTRUCT *ofs, LOADPARAMS* params)
wpnt->mz_header=xmalloc(sizeof(struct mz_header_s));
read(fd,wpnt->mz_header,sizeof(struct mz_header_s));
size=sizeof(NE_MODULE) +
/* loaded file info */
sizeof(LOADEDFILEINFO) + strlen(ofs->szPathName) +
/* segment table: DS,CS */
2 * sizeof(SEGTABLEENTRY) +
/* name table */
9 +
/* several empty tables */
8;
of_size = sizeof(OFSTRUCT) - sizeof(ofs->szPathName)
+ strlen(ofs->szPathName) + 1;
size = sizeof(NE_MODULE) +
/* loaded file info */
of_size +
/* segment table: DS,CS */
2 * sizeof(SEGTABLEENTRY) +
/* name table */
9 +
/* several empty tables */
8;
hModule = GlobalAlloc( GMEM_MOVEABLE | GMEM_ZEROINIT, size );
wpnt->hModule=hModule;
......@@ -593,17 +594,16 @@ HINSTANCE PE_LoadModule(int fd, OFSTRUCT *ofs, LOADPARAMS* params)
pModule->seg_count=1;
pModule->modref_count=0;
pModule->nrname_size=0;
pModule->seg_table=sizeof(NE_MODULE)+
sizeof(LOADEDFILEINFO)+strlen(ofs->szPathName);
pModule->seg_table=sizeof(NE_MODULE) + of_size;
pModule->fileinfo=sizeof(NE_MODULE);
pModule->os_flags=NE_OSFLAGS_WINDOWS;
pModule->expected_version=0x30A;
pFileInfo=(LOADEDFILEINFO *)(pModule + 1);
pFileInfo->length = sizeof(LOADEDFILEINFO)+strlen(ofs->szPathName)-1;
strcpy(pFileInfo->filename,ofs->szPathName);
/* Set loaded file information */
memcpy( pModule + 1, ofs, of_size );
((OFSTRUCT *)(pModule+1))->cBytes = of_size - 1;
pSegment=(SEGTABLEENTRY*)((char*)pFileInfo+pFileInfo->length+1);
pSegment=(SEGTABLEENTRY*)((char*)(pModule + 1) + of_size);
pModule->dgroup_entry=(int)pSegment-(int)pModule;
pSegment->size=0;
pSegment->flags=NE_SEGFLAGS_DATA;
......
......@@ -611,6 +611,8 @@ static void TASK_DeleteTask( HTASK hTask )
*/
void TASK_KillCurrentTask( int exitCode )
{
extern void EXEC_ExitWindows( int retCode );
if (hTaskToKill && (hTaskToKill != hCurrentTask))
{
/* If another task is already marked for destruction, */
......@@ -621,7 +623,7 @@ void TASK_KillCurrentTask( int exitCode )
if (nTaskCount <= 1)
{
dprintf_task( stddeb, "Killing the last task, exiting\n" );
ExitWindows( 0, 0 );
EXEC_ExitWindows( 0 );
}
/* Remove the task from the list to be sure we never switch back to it */
......
......@@ -92,6 +92,8 @@ static ATOMTABLE * ATOM_GetTable( WORD selector, BOOL create )
{
if (!create) return NULL;
if (!ATOM_InitTable( selector, DEFAULT_ATOMTABLE_SIZE )) return NULL;
/* Reload ptr in case it moved in linear memory */
ptr = (INSTANCEDATA *)PTR_SEG_OFF_TO_LIN( selector, 0 );
}
return (ATOMTABLE *)((char *)ptr + ptr->atomtable);
}
......@@ -156,6 +158,8 @@ static ATOM ATOM_AddAtom( WORD selector, SEGPTR name )
entry = LOCAL_Alloc( selector, LMEM_FIXED, sizeof(ATOMENTRY)+len-1 );
if (!entry) return 0;
/* Reload the table ptr in case it moved in linear memory */
table = ATOM_GetTable( selector, FALSE );
entryPtr = ATOM_MakePtr( selector, entry );
entryPtr->next = table->entries[hash];
entryPtr->refCount = 1;
......
......@@ -14,6 +14,7 @@
#include "callback.h"
#include "stddebug.h"
#include "debug.h"
#include "win.h"
#define HELP_CONTEXT 0x0001
#define HELP_QUIT 0x0002
......@@ -31,23 +32,82 @@
#define HELP_SETWINPOS 0x0203
/**********************************************************************
* ExitWindows [USER.7]
/***********************************************************************
* EXEC_ExitWindows
*
* Clean-up everything and exit the Wine process.
* This is the back-end of ExitWindows(), called when all windows
* have agreed to be terminated.
*/
void EXEC_ExitWindows( int retCode )
{
/* Do the clean-up stuff */
WriteOutProfiles();
SHELL_SaveRegistry();
exit( retCode );
}
/***********************************************************************
* ExitWindows (USER.7)
*/
BOOL ExitWindows(DWORD dwReturnCode, WORD wReserved)
BOOL ExitWindows( DWORD dwReturnCode, WORD wReserved )
{
HWND hwnd, hwndDesktop;
WND *wndPtr;
HWND *list, *pWnd;
int count, i;
BOOL result;
api_assert("ExitWindows", wReserved == 0);
api_assert("ExitWindows", HIWORD(dwReturnCode) == 0);
dprintf_exec( stdnimp,"PARTIAL STUB ExitWindows(%08lX, %04X)\n",
dwReturnCode, wReserved);
/* We have to build a list of all windows first, as in EnumWindows */
/* Do the clean-up stuff */
/* First count the windows */
WriteOutProfiles();
SHELL_SaveRegistry();
hwndDesktop = GetDesktopWindow();
count = 0;
for (hwnd = GetTopWindow(hwndDesktop); hwnd != 0; hwnd = wndPtr->hwndNext)
{
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE;
count++;
}
if (!count) /* No windows, we can exit at once */
EXEC_ExitWindows( LOWORD(dwReturnCode) );
/* Now build the list of all windows */
if (!(list = (HWND *)malloc( sizeof(HWND) * count ))) return FALSE;
for (hwnd = GetTopWindow(hwndDesktop), pWnd = list; hwnd != 0; hwnd = wndPtr->hwndNext)
{
wndPtr = WIN_FindWndPtr( hwnd );
*pWnd++ = hwnd;
}
/* Now send a WM_QUERYENDSESSION message to every window */
for (pWnd = list, i = 0; i < count; i++, pWnd++)
{
/* Make sure that window still exists */
if (!IsWindow(*pWnd)) continue;
if (!SendMessage( *pWnd, WM_QUERYENDSESSION, 0, 0 )) break;
}
result = (i == count);
/* Now notify all windows that got a WM_QUERYENDSESSION of the result */
for (pWnd = list; i > 0; i--, pWnd++)
{
if (!IsWindow(*pWnd)) continue;
SendMessage( *pWnd, WM_ENDSESSION, result, 0 );
}
free( list );
exit( LOWORD(dwReturnCode) );
if (result) EXEC_ExitWindows( LOWORD(dwReturnCode) );
return FALSE;
}
......
......@@ -56,6 +56,7 @@ static const char *langNames[] =
"Fi", /* LANG_Fi */
"Da", /* LANG_Da */
"Cz", /* LANG_Cz */
"Eo", /* LANG_Eo */
NULL
};
......@@ -138,7 +139,7 @@ static XrmOptionDescRec optionsTable[] =
" -fixedmap Use a \"standard\" color map\n" \
" -iconic Start as an icon\n" \
" -ipc Enable IPC facilities\n" \
" -language xx Set the language (one of En,Es,De,No,Fr,Fi,Da,Cz)\n" \
" -language xx Set the language (one of En,Es,De,No,Fr,Fi,Da,Cz,Eo)\n" \
" -managed Allow the window manager to manage created windows\n" \
" -mode mode Start Wine in a particular mode (standard or enhanced)\n" \
" -name name Set the application name\n" \
......@@ -460,6 +461,7 @@ static void MAIN_CreateDesktop( int argc, char *argv[] )
XClassHint *class_hints;
XSetWindowAttributes win_attr;
XTextProperty window_name;
Atom XA_WM_DELETE_WINDOW;
flags = XParseGeometry( Options.desktopGeometry,
&desktopX, &desktopY, &width, &height );
......@@ -505,6 +507,8 @@ static void MAIN_CreateDesktop( int argc, char *argv[] )
XStringListToTextProperty( &name, 1, &window_name );
XSetWMProperties( display, rootWindow, &window_name, &window_name,
argv, argc, size_hints, wm_hints, class_hints );
XA_WM_DELETE_WINDOW = XInternAtom( display, "WM_DELETE_WINDOW", False );
XSetWMProtocols( display, rootWindow, &XA_WM_DELETE_WINDOW, 1 );
XFree( size_hints );
XFree( wm_hints );
XFree( class_hints );
......
......@@ -31,6 +31,7 @@ DWORD WINAPI GetUserDefaultLCID()
case LANG_Fi:
case LANG_Da:
case LANG_Cz:
case LANG_Eo:
default:
return 0; /* Neutral language */
}
......@@ -421,6 +422,108 @@ LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
/* LOCVAL(LOCALE_INEGSEPBYSPACE) */
break; /* LANG(Da) */
case LANG_Eo:
/* LOCVAL(LOCALE_ILANGUAGE,"9") ISO numerical ID for language TODO */
LOCVAL(LOCALE_SLANGUAGE,"Esperanto")
LOCVAL(LOCALE_SENGLANGUAGE,"Esperanto")
/* LOCVAL(LOCALE_SABBREVLANGNAME,"deu") */
LOCVAL(LOCALE_SNATIVELANGNAME,"Esperanto")
/* LOCVAL(LOCALE_ICOUNTRY,"49") not official in any one country */
/* LOCVAL(LOCALE_SCOUNTRY,"Deutschland") */
/* LOCVAL(LOCALE_SENGCOUNTRY,"Germany") */
/* LOCVAL(LOCALE_SABBREVCTRYNAME,"De") */
/* LOCVAL(LOCALE_SNATIVECTRYNAME,"Deutschland") */
/* LOCVAL(LOCALE_IDEFAULTLANGUAGE,"9") ISO ID of lang TODO */
/* LOCVAL(LOCALE_IDEFAULTCOUNTRY,"49") */
LOCVAL(LOCALE_IDEFAULTCODEPAGE,3) /* is this right? TODO */
LOCVAL(LOCALE_IDEFAULTANSICODEPAGE,3) /* is this right? TODO */
LOCVAL(LOCALE_SLIST,";")
LOCVAL(LOCALE_IMEASURE,"0")
LOCVAL(LOCALE_SDECIMAL,",")
LOCVAL(LOCALE_STHOUSAND,".")
/* LOCVAL(LOCALE_SGROUPING) */
LOCVAL(LOCALE_IDIGITS,"2")
LOCVAL(LOCALE_ILZERO,"1")
/* LOCVAL(LOCALE_INEGNUMBER) */
/* LOCVAL(LOCALE_SNATIVEDIGITS) */
LOCVAL(LOCALE_SCURRENCY,"NLG") /* accounting currency of UEA */
/* LOCVAL(LOCALE_SINTLSYMBOL) */
/* LOCVAL(LOCALE_SMONDECIMALSEP) */
/* LOCVAL(LOCALE_SMONTHOUSANDSEP) */
/* LOCVAL(LOCALE_SMONGROUPING) */
/* LOCVAL(LOCALE_ICURRDIGITS,"2") */
/* LOCVAL(LOCALE_IINTLCURRDIGITS) */
LOCVAL(LOCALE_ICURRENCY,"3")
LOCVAL(LOCALE_INEGCURR,"8")
LOCVAL(LOCALE_SDATE,".")
LOCVAL(LOCALE_STIME,":")
LOCVAL(LOCALE_SSHORTDATE,"yyyy.mm.dd")
LOCVAL(LOCALE_SLONGDATE,"ddd, d. MMMM yyyy")
/* LOCVAL(LOCALE_STIMEFORMAT) */
LOCVAL(LOCALE_IDATE,"1")
/* LOCVAL(LOCALE_ILDATE) */
LOCVAL(LOCALE_ITIME,"1")
/* LOCVAL(LOCALE_ITIMEMARKPOSN) */
/* LOCVAL(LOCALE_ICENTURY) */
LOCVAL(LOCALE_ITLZERO,"1")
/* LOCVAL(LOCALE_IDAYLZERO) */
/* LOCVAL(LOCALE_IMONLZERO) */
/* LOCVAL(LOCALE_S1159) */
/* LOCVAL(LOCALE_S2359) */
/* LOCVAL(LOCALE_ICALENDARTYPE) */
/* LOCVAL(LOCALE_IOPTIONALCALENDAR) */
/* LOCVAL(LOCALE_IFIRSTDAYOFWEEK) */
/* LOCVAL(LOCALE_IFIRSTWEEKOFYEAR) */
LOCVAL(LOCALE_SDAYNAME1,"lundo")
LOCVAL(LOCALE_SDAYNAME2,"mardo")
LOCVAL(LOCALE_SDAYNAME3,"merkredo")
LOCVAL(LOCALE_SDAYNAME4,"ado")
LOCVAL(LOCALE_SDAYNAME5,"vendredo")
LOCVAL(LOCALE_SDAYNAME6,"sabato")
LOCVAL(LOCALE_SDAYNAME7,"dimano")
LOCVAL(LOCALE_SABBREVDAYNAME1,"lu")
LOCVAL(LOCALE_SABBREVDAYNAME2,"ma")
LOCVAL(LOCALE_SABBREVDAYNAME3,"me")
LOCVAL(LOCALE_SABBREVDAYNAME4,"a")
LOCVAL(LOCALE_SABBREVDAYNAME5,"ve")
LOCVAL(LOCALE_SABBREVDAYNAME6,"sa")
LOCVAL(LOCALE_SABBREVDAYNAME7,"di")
LOCVAL(LOCALE_SMONTHNAME1,"januaro")
LOCVAL(LOCALE_SMONTHNAME2,"februaro")
LOCVAL(LOCALE_SMONTHNAME3,"marto")
LOCVAL(LOCALE_SMONTHNAME4,"aprilo")
LOCVAL(LOCALE_SMONTHNAME5,"majo")
LOCVAL(LOCALE_SMONTHNAME6,"junio")
LOCVAL(LOCALE_SMONTHNAME7,"julio")
LOCVAL(LOCALE_SMONTHNAME8,"agusto")
LOCVAL(LOCALE_SMONTHNAME9,"septembro")
LOCVAL(LOCALE_SMONTHNAME10,"oktobro")
LOCVAL(LOCALE_SMONTHNAME11,"novembro")
LOCVAL(LOCALE_SMONTHNAME12,"decembro")
LOCVAL(LOCALE_SMONTHNAME13,"")
LOCVAL(LOCALE_SABBREVMONTHNAME1,"jan")
LOCVAL(LOCALE_SABBREVMONTHNAME2,"feb")
LOCVAL(LOCALE_SABBREVMONTHNAME3,"mar")
LOCVAL(LOCALE_SABBREVMONTHNAME4,"apr")
LOCVAL(LOCALE_SABBREVMONTHNAME5,"maj")
LOCVAL(LOCALE_SABBREVMONTHNAME6,"jun")
LOCVAL(LOCALE_SABBREVMONTHNAME7,"jul")
LOCVAL(LOCALE_SABBREVMONTHNAME8,"ag")
LOCVAL(LOCALE_SABBREVMONTHNAME9,"sep")
LOCVAL(LOCALE_SABBREVMONTHNAME10,"okt")
LOCVAL(LOCALE_SABBREVMONTHNAME11,"nov")
LOCVAL(LOCALE_SABBREVMONTHNAME12,"dec")
LOCVAL(LOCALE_SABBREVMONTHNAME13,"")
/* LOCVAL(LOCALE_SPOSITIVESIGN) */
/* LOCVAL(LOCALE_SNEGATIVESIGN) */
/* LOCVAL(LOCALE_IPOSSIGNPOSN) */
/* LOCVAL(LOCALE_INEGSIGNPOSN) */
/* LOCVAL(LOCALE_IPOSSYMPRECEDES) */
/* LOCVAL(LOCALE_IPOSSEPBYSPACE) */
/* LOCVAL(LOCALE_INEGSYMPRECEDES) */
/* LOCVAL(LOCALE_INEGSEPBYSPACE) */
break; /* LANG(Eo) */
/*Insert other languages here*/
default:
......
......@@ -14,11 +14,11 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xmalloc.h"
void *
xmalloc (size_t size)
void *xmalloc( int size )
{
void *res;
......@@ -32,8 +32,7 @@ xmalloc (size_t size)
}
void *
xrealloc (void *ptr, size_t size)
void *xrealloc( void *ptr, int size )
{
void *res = realloc (ptr, size);
if (res == NULL)
......
SUBDIRS = progman
all: $(SUBDIRS)
$(SUBDIRS): dummy
@cd $@; $(MAKE)
depend:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend); done
clean:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean); done
dummy:
Wed Feb 28 19:21:55 1996 Ulrich Schmid <uschmid@mail.hh.provi.de>
* [progman.h] [main.c] [group.c] [program.c] [dialog.c]
[grpfile.c] [string.c] [winexec.c] [license.h] [license.c] [Xx.rc]
[accel.rc] [En.rc] [Strings_En.c] [License_En.c] [De.rc]
[Strings_De.c] Original by Ulrich Schmid
/*
* Program Manager
*
* Copyright 1996 Ulrich Schmid
*/
/* Menu */
#define MENU_Xx MENU_De
#define MENU_FILE "&Datei"
#define MENU_FILE_NEW "&Neu..."
#define MENU_FILE_OPEN "Ö&ffnen\tEingabetaste"
#define MENU_FILE_MOVE "&Verschieben...\tF7"
#define MENU_FILE_COPY "&Kopieren...\tF8"
#define MENU_FILE_DELETE "&Löschen\tEntf"
#define MENU_FILE_ATTRIBUTES "&Eigenschaften...\tAlt+Eingabetaste"
#define MENU_FILE_EXECUTE "&Ausführen..."
#define MENU_FILE_EXIT "&Programm-Manager &beenden..."
#define MENU_OPTIONS "&Optionen"
#define MENU_OPTIONS_AUTO_ARRANGE "&Automatisch anordnen"
#define MENU_OPTIONS_MIN_ON_RUN "&Symbol nach Programmstart"
#define MENU_OPTIONS_SAVE_SETTINGS "&Einstellungen beim Beenden speichern"
#define MENU_WINDOWS "&Fenster"
#define MENU_WINDOWS_OVERLAP "Über&lappend\tUmschalt+F5"
#define MENU_WINDOWS_SIDE_BY_SIDE "&Nebeneinander\tUmschalt+F4"
#define MENU_WINDOWS_ARRANGE "&Symbole anordnen"
#define MENU_LANGUAGE "&Sprache"
#define MENU_HELP "&Hilfe"
#define MENU_HELP_CONTENTS "&Inhalt"
#define MENU_HELP_SEARCH "&Suchen..."
#define MENU_HELP_HELP_ON_HELP "&Hilfe benutzen"
#define MENU_HELP_TUTORIAL "&Lernprogramm"
#define MENU_INFO "Inf&o..."
#define MENU_INFO_LICENSE "&Lizenz"
#define MENU_INFO_NO_WARRANTY "&KEINE GARANTIE"
#define MENU_INFO_ABOUT_WINE "&Über WINE"
/* Dialogs */
#define DIALOG_OK "OK"
#define DIALOG_CANCEL "Abbrechen"
#define DIALOG_BROWSE "&Durchsuchen..."
#define DIALOG_HELP "&Hilfe"
#define DIALOG_NEW_Xx DIALOG_NEW_De
#define DIALOG_NEW_CAPTION "Neues Programmobject"
#define DIALOG_NEW_NEW "Neu"
#define DIALOG_NEW_GROUP "Programmgrupp&e"
#define DIALOG_NEW_PROGRAM "&Programm"
#define DIALOG_MOVE_Xx DIALOG_MOVE_De
#define DIALOG_MOVE_CAPTION "Programm verschieben"
#define DIALOG_MOVE_PROGRAM "Verschiebe Programm:"
#define DIALOG_MOVE_FROM_GROUP "Von Programmgruppe:"
#define DIALOG_MOVE_TO_GROUP "&In Gruppe:"
#define DIALOG_COPY_Xx DIALOG_COPY_De
#define DIALOG_COPY_CAPTION "Programm kopieren"
#define DIALOG_COPY_PROGRAM "Kopiere Programm:"
#define DIALOG_COPY_FROM_GROUP DIALOG_MOVE_FROM_GROUP
#define DIALOG_COPY_TO_GROUP DIALOG_MOVE_TO_GROUP
#define DIALOG_GROUP_Xx DIALOG_GROUP_De
#define DIALOG_GROUP_CAPTION "Programmgruppeneigenschaften"
#define DIALOG_GROUP_DESCRIPTION "&Beschreibung:"
#define DIALOG_GROUP_FILE "&Gruppendatei:"
#define DIALOG_PROGRAM_Xx DIALOG_PROGRAM_De
#define DIALOG_PROGRAM_CAPTION "Programmeigenschaften"
#define DIALOG_PROGRAM_DESCRIPTION DIALOG_GROUP_DESCRIPTION
#define DIALOG_PROGRAM_COMMAND_LINE "Befehls&zeile:"
#define DIALOG_PROGRAM_DIRECTORY "&Arbeitsverzeichnis:"
#define DIALOG_PROGRAM_HOT_KEY "&Tastenkombination:"
#define DIALOG_PROGRAM_SYMBOL "Als Sy&mbol"
#define DIALOG_PROGRAM_OTHER_SYMBOL "Anderes &Symbol..."
#define DIALOG_SYMBOL_Xx DIALOG_SYMBOL_De
#define DIALOG_SYMBOL_CAPTION "Symbol auswählen"
#define DIALOG_SYMBOL_FILE "Datei&name:"
#define DIALOG_SYMBOL_CURRENT "&Aktuelles Symbol:"
#define DIALOG_EXECUTE_Xx DIALOG_EXECUTE_De
#define DIALOG_EXECUTE_CAPTION "Programm Ausführen"
#define DIALOG_EXECUTE_COMMAND_LINE DIALOG_PROGRAM_COMMAND_LINE
#define DIALOG_EXECUTE_SYMBOL DIALOG_PROGRAM_SYMBOL
#include "Xx.rc"
/*
* Program Manager
*
* Copyright 1996 Ulrich Schmid
*/
/* Menu */
#define MENU_Xx MENU_En
#define MENU_FILE "&File"
#define MENU_FILE_NEW "&New..."
#define MENU_FILE_OPEN "O&pen\tEnter"
#define MENU_FILE_MOVE "&Move...\tF7"
#define MENU_FILE_COPY "&Copy...\tF8"
#define MENU_FILE_DELETE "&Delete\tEntf"
#define MENU_FILE_ATTRIBUTES "&Attributes...\tAlt+Enter"
#define MENU_FILE_EXECUTE "&Execute..."
#define MENU_FILE_EXIT "E&xit Windows..."
#define MENU_OPTIONS "&Options"
#define MENU_OPTIONS_AUTO_ARRANGE "&Arrange automatically"
#define MENU_OPTIONS_MIN_ON_RUN "&Minimize on run"
#define MENU_OPTIONS_SAVE_SETTINGS "&Save settings on exit"
#define MENU_WINDOWS "&Windows"
#define MENU_WINDOWS_OVERLAP "&Overlapped\tShift+F5"
#define MENU_WINDOWS_SIDE_BY_SIDE "&Side by side\tShift+F4"
#define MENU_WINDOWS_ARRANGE "&Arrange Symbols"
#define MENU_LANGUAGE "&Language"
#define MENU_HELP "&Help"
#define MENU_HELP_CONTENTS "&Contents"
#define MENU_HELP_SEARCH "&Search..."
#define MENU_HELP_HELP_ON_HELP "&Help on Help"
#define MENU_HELP_TUTORIAL "&Tutorial"
#define MENU_INFO "&Info..."
#define MENU_INFO_LICENSE "&License"
#define MENU_INFO_NO_WARRANTY "&NO WARRANTY"
#define MENU_INFO_ABOUT_WINE "&About WINE"
/* Dialogs */
#define DIALOG_OK "OK"
#define DIALOG_CANCEL "Cancel"
#define DIALOG_BROWSE "&Browse"
#define DIALOG_HELP "&Help"
#define DIALOG_NEW_Xx DIALOG_NEW_En
#define DIALOG_NEW_CAPTION "New Program Object"
#define DIALOG_NEW_NEW "New"
#define DIALOG_NEW_GROUP "Program &group"
#define DIALOG_NEW_PROGRAM "&Program"
#define DIALOG_MOVE_Xx DIALOG_MOVE_En
#define DIALOG_MOVE_CAPTION "Move Program"
#define DIALOG_MOVE_PROGRAM "Move program:"
#define DIALOG_MOVE_FROM_GROUP "From group:"
#define DIALOG_MOVE_TO_GROUP "&To group:"
#define DIALOG_COPY_Xx DIALOG_COPY_En
#define DIALOG_COPY_CAPTION "Copy Program"
#define DIALOG_COPY_PROGRAM "Copy program:"
#define DIALOG_COPY_FROM_GROUP DIALOG_MOVE_FROM_GROUP
#define DIALOG_COPY_TO_GROUP DIALOG_MOVE_TO_GROUP
#define DIALOG_GROUP_Xx DIALOG_GROUP_En
#define DIALOG_GROUP_CAPTION "Program Group Attributes"
#define DIALOG_GROUP_DESCRIPTION "&Description:"
#define DIALOG_GROUP_FILE "&Group file:"
#define DIALOG_PROGRAM_Xx DIALOG_PROGRAM_En
#define DIALOG_PROGRAM_CAPTION "Program Attributes"
#define DIALOG_PROGRAM_DESCRIPTION DIALOG_GROUP_DESCRIPTION
#define DIALOG_PROGRAM_COMMAND_LINE "&Command line:"
#define DIALOG_PROGRAM_DIRECTORY "&Working directory:"
#define DIALOG_PROGRAM_HOT_KEY "&Key combination:"
#define DIALOG_PROGRAM_SYMBOL "As &Symbol"
#define DIALOG_PROGRAM_OTHER_SYMBOL "&Other Symbol..."
#define DIALOG_SYMBOL_Xx DIALOG_SYMBOL_En
#define DIALOG_SYMBOL_CAPTION "Select Symbol"
#define DIALOG_SYMBOL_FILE "&Filename:"
#define DIALOG_SYMBOL_CURRENT "&Current Symbol:"
#define DIALOG_EXECUTE_Xx DIALOG_EXECUTE_En
#define DIALOG_EXECUTE_CAPTION "Execute Program"
#define DIALOG_EXECUTE_COMMAND_LINE DIALOG_PROGRAM_COMMAND_LINE
#define DIALOG_EXECUTE_SYMBOL DIALOG_PROGRAM_SYMBOL
#include "Xx.rc"
#include <windows.h>
#include "license.h"
static CHAR LicenseCaption_En[] = "LICENSE";
static CHAR License_En[] = "\
You may without charge, royalty or other payment, copy and\
distribute copies of this work and derivative works of this work\
in source or binary form provided that: (1)\
you appropriately publish on each copy an appropriate copyright\
notice; (2) faithfully reproduce all prior copyright notices\
included in the original work (you may also add your own\
copyright notice); and (3) agree to indemnify and hold all prior\
authors, copyright holders and licensors of the work harmless\
from and against all damages arising from use of the work.\
\n\
You may distribute sources of derivative works of the work\
provided that (1) (a) all source files of the original work that\
have been modified, (b) all source files of the derivative work\
that contain any party of the original work, and (c) all source\
files of the derivative work that are necessary to compile, link\
and run the derivative work without unresolved external calls and\
with the same functionality of the original work (\"Necessary\
Sources\") carry a prominent notice explaining the nature and date\
of the modification and/or creation. You are encouraged to make\
the Necessary Sources available under this license in order to\
further the development and acceptance of the work.\
\n\
EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED\
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING\
BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A\
PARTICULAR PURPOSE, MERCHANTABILITY OR TITLE. EXCEPT AS\
OTHERWISE PROVIDED BY LAW, NO AUTHOR, COPYRIGHT HOLDER OR\
LICENSOR SHALL BE LIABLE TO YOU FOR DAMAGES OF ANY KIND, EVEN IF\
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.";
static CHAR NoWarrantyCaption_En[] = "NO WARRANTY";
static CHAR NoWarranty_En[] = "\
EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED\
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING\
BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A\
PARTICULAR PURPOSE, MERCHANTABILITY OR TITLE. EXCEPT AS\
OTHERWISE PROVIDED BY LAW, NO AUTHOR, COPYRIGHT HOLDER OR\
LICENSOR SHALL BE LIABLE TO YOU FOR DAMAGES OF ANY KIND, EVEN IF\
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.";
LICENSE WineLicense_En = {License_En, LicenseCaption_En,
NoWarranty_En, NoWarrantyCaption_En};
TOPSRC = @top_srcdir@
MODULE = none
PROGRAMS = progman
ALL_LIBS = $(WINELIB) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
LANGUAGES = En De
LICENSELANG = En
MOSTOBJS = \
dialog.o \
group.o \
grpfile.o \
license.o \
main.o \
program.o \
winexec.o
STRINGOBJS = \
accel.o \
string.o \
$(LANGUAGES:%=%.o) \
$(LICENSELANG:%=License_%.o) \
$(LANGUAGES:%=Strings_%.o)
C_SRCS = $(MOSTOBJS:.o=.c) $(STRINGOBJS:.o=.c)
all: check_winerc $(PROGRAMS)
@MAKE_RULES@
# Some strings need addresses >= 0x10000
progman: $(MOSTOBJS) $(STRINGOBJS)
$(CC) -o progman $(MOSTOBJS) $(LDOPTIONS) $(ALL_LIBS) $(STRINGOBJS)
clean::
$(RM) accel.c accel.h $(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h) progman
accel.c accel.h: $(WINERC) Xx.rc
$(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h): $(WINERC) Xx.rc
### Dependencies:
This is a Program Manager for WINE.
There is a checksum in the Microsoft `*.grp' files. I don't know how
to calculate it. Therefore the group files written by this Program Manager
cannot be used with the Microsoft Program Manager!!
To prevent overwriting original files:
If there is an existing `*.grp' file this program uses the extension
`.gr' instead.
It's possible to use an alternate `progman.ini' file by adding to
`wine.conf' something like:
[progman]
progman.ini=/my/wine/path/progman.ini
It's possible to start both Windows and UNIX programs.
#include <windows.h>
#include "progman.h"
LPCSTR StringTableDe[NUMBER_OF_STRINGS] =
{
"Programm-Manager",
"FEHLER",
"Information",
"Löschen",
"Lösche Programmgruppe `%s' ?",
"Lösche Programm `%s' ?",
"Nicht implementiert",
"Fehler beim Lesen von `%s'",
"Fehler beim Schreiben von `%s'",
"Die Programmgruppendatei `%s' kann nicht geöffnet werden.\n"
"Soll weiterhin versucht werden, diese Datei zu laden?",
"Zu wenig Hauptspeicher",
"Keine Hilfe verfügbar",
"Unbekannte Eigenschaft der `.grp' Datei",
"Datei `%s' existiert. Sie wird nicht überschrieben.",
"Die Programmgruppe wird als `%s' gesichert um das Überschreiben der Originaldatei zu verhindern.",
"Keine",
"Alle Dateien (*.*)\0" "*.*\0"
"Programme\0" "*.exe;*.pif;*.com;*.bat\0",
"Alle Dateien (*.*)\0" "*.*\0"
"Bibliotheken (*.dll)\0" "*.dll\0"
"Programme\0" "*.exe\0"
"Symboldateien\0" "*.ico;*.exe;*.dll\0"
"Symbole (*.ico)\0" "*.ico\0"
};
#include <windows.h>
#include "progman.h"
LPCSTR StringTableEn[NUMBER_OF_STRINGS] =
{
"Program Manager",
"ERROR",
"Information",
"Delete",
"Delete group `%s' ?",
"Delete program `%s' ?",
"Not implemented",
"Error reading `%s'",
"Error writeing `%s'",
"The group file `%s' cannot be opened.\n"
"Should it be tried further on?",
"Out of memory",
"Help not available",
"Unknown feature in `.grp' file",
"File `%s' exists. Not overwritten.",
"Save group as `%s' to prevent overwriting original files",
"None",
"All files (*.*)\0" "*.*\0"
"Programs\0" "*.exe;*.pif;*.com;*.bat\0",
"All files (*.*)\0" "*.*\0"
"Libraries (*.dll)\0" "*.dll\0"
"Programs\0" "*.exe\0"
"Symbol files\0" "*.ico;*.exe;*.dll\0"
"Symbols (*.ico)\0" "*.ico\0"
};
* Microsoft `*.grp' files use a checksum.
Find out how to calculate it.
* Accelerators
* Create some icons
/*
* Program Manager
*
* Copyright 1996 Ulrich Schmid
*/
#include "progman.h"
/* Menu */
MENU_Xx MENU
{
POPUP MENU_FILE {
MENUITEM MENU_FILE_NEW, PM_NEW
MENUITEM MENU_FILE_OPEN, PM_OPEN
MENUITEM MENU_FILE_MOVE, PM_MOVE, GRAYED
MENUITEM MENU_FILE_COPY, PM_COPY, GRAYED
MENUITEM MENU_FILE_DELETE, PM_DELETE
MENUITEM MENU_FILE_ATTRIBUTES, PM_ATTRIBUTES
MENUITEM SEPARATOR
MENUITEM MENU_FILE_EXECUTE, PM_EXECUTE
MENUITEM SEPARATOR
MENUITEM MENU_FILE_EXIT, PM_EXIT
}
POPUP MENU_OPTIONS {
MENUITEM MENU_OPTIONS_AUTO_ARRANGE, PM_AUTO_ARRANGE
MENUITEM MENU_OPTIONS_MIN_ON_RUN, PM_MIN_ON_RUN
MENUITEM MENU_OPTIONS_SAVE_SETTINGS, PM_SAVE_SETTINGS
}
POPUP MENU_WINDOWS {
MENUITEM MENU_WINDOWS_OVERLAP, PM_OVERLAP
MENUITEM MENU_WINDOWS_SIDE_BY_SIDE, PM_SIDE_BY_SIDE
MENUITEM MENU_WINDOWS_ARRANGE, PM_ARRANGE
}
POPUP MENU_LANGUAGE {
MENUITEM "&English", PM_En
MENUITEM "&Deutsch", PM_De
}
POPUP MENU_HELP {
MENUITEM MENU_HELP_CONTENTS, PM_CONTENTS
MENUITEM MENU_HELP_SEARCH, PM_SEARCH
MENUITEM SEPARATOR
MENUITEM MENU_HELP_HELP_ON_HELP, PM_HELPONHELP
MENUITEM MENU_HELP_TUTORIAL, PM_TUTORIAL
MENUITEM SEPARATOR
POPUP MENU_INFO {
MENUITEM MENU_INFO_LICENSE, PM_LICENSE
MENUITEM MENU_INFO_NO_WARRANTY, PM_NO_WARRANTY
MENUITEM MENU_INFO_ABOUT_WINE, PM_ABOUT_WINE
}
}
}
/* Dialog `New' */
DIALOG_NEW_Xx DIALOG 0, 0, 170, 65
STYLE DS_MODALFRAME
CAPTION DIALOG_NEW_CAPTION
{
RADIOBUTTON "", PM_NEW_GROUP, 10, 15, 10, 15
LTEXT DIALOG_NEW_GROUP, PM_NEW_GROUP, 20, 18, 80, 15
RADIOBUTTON "", PM_NEW_PROGRAM, 10, 35, 10, 15
LTEXT DIALOG_NEW_PROGRAM, PM_NEW_PROGRAM, 20, 38, 80, 15
DEFPUSHBUTTON DIALOG_OK, IDOK, 105, 5, 60, 15
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 105, 25, 60, 15
PUSHBUTTON DIALOG_HELP, PM_HELP, 105, 45, 60, 15
}
/* Dialog `Move' */
DIALOG_MOVE_Xx DIALOG 0, 0, 250, 65
STYLE DS_MODALFRAME
CAPTION DIALOG_MOVE_CAPTION
{
LTEXT DIALOG_MOVE_PROGRAM, IDIGNORE, 5, 5, 90, 15
LTEXT "", PM_PROGRAM, 95, 5, 90, 15
LTEXT DIALOG_MOVE_FROM_GROUP, IDIGNORE, 5, 13, 90, 15
LTEXT "", PM_FROM_GROUP, 95, 13, 90, 15
LTEXT DIALOG_MOVE_TO_GROUP, PM_TO_GROUP_TXT, 5, 28, 140, 15
COMBOBOX PM_TO_GROUP, 5, 38, 140, 50, CBS_DROPDOWNLIST
DEFPUSHBUTTON DIALOG_OK, IDOK, 185, 5, 60, 15
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 185, 25, 60, 15
PUSHBUTTON DIALOG_HELP, PM_HELP, 185, 45, 60, 15
}
/* Dialog `Copy' */
DIALOG_COPY_Xx DIALOG 0, 0, 250, 65
STYLE DS_MODALFRAME
CAPTION DIALOG_COPY_CAPTION
{
LTEXT DIALOG_COPY_PROGRAM, IDIGNORE, 5, 5, 90, 15
LTEXT "", PM_PROGRAM, 95, 5, 90, 15
LTEXT DIALOG_COPY_FROM_GROUP, IDIGNORE, 5, 13, 90, 15
LTEXT "", PM_FROM_GROUP, 95, 13, 90, 15
LTEXT DIALOG_COPY_TO_GROUP, PM_TO_GROUP_TXT, 5, 28, 140, 15
COMBOBOX PM_TO_GROUP, 5, 38, 140, 50, CBS_DROPDOWNLIST
DEFPUSHBUTTON DIALOG_OK, IDOK, 185, 5, 60, 15
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 185, 25, 60, 15
PUSHBUTTON DIALOG_HELP, PM_HELP, 185, 45, 60, 15
}
/* Dialog `Group attributes' */
DIALOG_GROUP_Xx DIALOG 0, 0, 230, 65
STYLE DS_MODALFRAME
CAPTION DIALOG_GROUP_CAPTION
{
LTEXT DIALOG_GROUP_DESCRIPTION, PM_DESCRIPTION_TXT, 05, 18, 50, 10
EDITTEXT PM_DESCRIPTION, 60, 18, 90, 15
LTEXT DIALOG_GROUP_FILE, PM_FILE_TXT, 05, 38, 50, 10
EDITTEXT PM_FILE, 60, 38, 90, 15
DEFPUSHBUTTON DIALOG_OK, IDOK, 155, 5, 60, 15
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 155, 25, 60, 15
PUSHBUTTON DIALOG_HELP, PM_HELP, 155, 45, 60, 15
}
/* Dialog `Program attributes' */
DIALOG_PROGRAM_Xx DIALOG 0, 0, 250, 105
STYLE DS_MODALFRAME
CAPTION DIALOG_PROGRAM_CAPTION
{
LTEXT DIALOG_PROGRAM_DESCRIPTION, PM_DESCRIPTION_TXT, 05, 10, 60, 10
EDITTEXT PM_DESCRIPTION, 80, 10, 90, 15
LTEXT DIALOG_PROGRAM_COMMAND_LINE, PM_COMMAND_LINE_TXT, 05, 25, 60, 10
EDITTEXT PM_COMMAND_LINE, 80, 25, 90, 15
LTEXT DIALOG_PROGRAM_DIRECTORY, PM_DIRECTORY_TXT, 05, 40, 60, 10
EDITTEXT PM_DIRECTORY, 80, 40, 90, 15
LTEXT DIALOG_PROGRAM_HOT_KEY, PM_HOT_KEY_TXT, 05, 55, 60, 10
EDITTEXT PM_HOT_KEY, 80, 55, 90, 15
ICON "", PM_ICON, 20, 70
CHECKBOX "", PM_SYMBOL, 80, 75, 10, 10
LTEXT DIALOG_PROGRAM_SYMBOL, IDIGNORE, 95, 75, 75, 10
DEFPUSHBUTTON DIALOG_OK, IDOK, 185, 5, 60, 15
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 185, 25, 60, 15
PUSHBUTTON DIALOG_BROWSE, PM_BROWSE, 185, 45, 60, 15
PUSHBUTTON DIALOG_PROGRAM_OTHER_SYMBOL, PM_OTHER_SYMBOL, 185, 65, 60, 15
PUSHBUTTON DIALOG_HELP, PM_HELP, 185, 85, 60, 15
}
/* Dialog `Symbol' */
DIALOG_SYMBOL_Xx DIALOG 0, 0, 200, 85
STYLE DS_MODALFRAME
CAPTION DIALOG_SYMBOL_CAPTION
{
LTEXT DIALOG_SYMBOL_FILE, PM_ICON_FILE_TXT, 5, 15, 40, 10
EDITTEXT PM_ICON_FILE, 45, 15, 85, 15
LTEXT DIALOG_SYMBOL_CURRENT, PM_SYMBOL_LIST_TXT, 5, 30, 125, 10
COMBOBOX PM_SYMBOL_LIST, 5, 40, 125, 50,
CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_OWNERDRAWFIXED
DEFPUSHBUTTON DIALOG_OK, IDOK, 135, 5, 60, 15
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 135, 25, 60, 15
PUSHBUTTON DIALOG_BROWSE , PM_BROWSE, 135, 45, 60, 15
PUSHBUTTON DIALOG_HELP, PM_HELP, 135, 65, 60, 15
}
/* Dialog `Execute' */
DIALOG_EXECUTE_Xx DIALOG 0, 0, 200, 85
STYLE DS_MODALFRAME
CAPTION DIALOG_EXECUTE_CAPTION
{
LTEXT DIALOG_EXECUTE_COMMAND_LINE, IDIGNORE, 05, 15, 120, 10
EDITTEXT PM_COMMAND, 05, 25, 120, 15
CHECKBOX "", PM_SYMBOL, 05, 45, 10, 10
LTEXT DIALOG_EXECUTE_SYMBOL, IDIGNORE, 20, 45, 120, 10
DEFPUSHBUTTON DIALOG_OK, IDOK, 135, 5, 60, 15
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 135, 25, 60, 15
PUSHBUTTON DIALOG_BROWSE , PM_BROWSE, 135, 45, 60, 15
PUSHBUTTON DIALOG_HELP, PM_HELP, 135, 65, 60, 15
}
#include "progman.h"
ACCEL ACCELERATORS
{
VK_RETURN, PM_EXECUTE, VIRTKEY, ALT
}
/*
* Program Manager
*
* Copyright 1996 Ulrich Schmid
*/
#include <stdio.h>
#include <windows.h>
#include "progman.h"
/***********************************************************************
*
* GROUP_GroupWndProc
*/
static LRESULT GROUP_GroupWndProc (HWND hWnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
#if 0
printf("G %4.4x %4.4x\n", msg, wParam);
#endif
switch (msg)
{
case WM_SYSCOMMAND:
if (wParam == SC_CLOSE) wParam = SC_MINIMIZE;
break;
case WM_CHILDACTIVATE:
case WM_NCLBUTTONDOWN:
Globals.hActiveGroup = (HLOCAL) GetWindowLong(hWnd, 0);
EnableMenuItem(Globals.hFileMenu, PM_MOVE , MF_GRAYED);
EnableMenuItem(Globals.hFileMenu, PM_COPY , MF_GRAYED);
break;
}
return(DefMDIChildProc(hWnd, msg, wParam, lParam));
}
/***********************************************************************
*
* GROUP_RegisterGroupWinClass
*/
ATOM GROUP_RegisterGroupWinClass()
{
WNDCLASS class;
class.style = CS_HREDRAW | CS_VREDRAW;
class.lpfnWndProc = GROUP_GroupWndProc;
class.cbClsExtra = 0;
class.cbWndExtra = sizeof(LONG);
class.hInstance = Globals.hInstance;
class.hIcon = LoadIcon (0, MAKEINTRESOURCE(OIC_WINEICON));
class.hCursor = LoadCursor (0, IDC_ARROW);
class.hbrBackground = GetStockObject (WHITE_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_GROUP_WIN_CLASS_NAME;
return RegisterClass(&class);
}
/***********************************************************************
*
* GROUP_NewGroup
*/
VOID GROUP_NewGroup()
{
CHAR szName[MAX_PATHNAME_LEN] = "";
CHAR szFile[MAX_PATHNAME_LEN] = "";
OFSTRUCT dummy;
if (!DIALOG_GroupAttributes(szName, szFile, MAX_PATHNAME_LEN)) return;
if (OpenFile(szFile, &dummy, OF_EXIST) == HFILE_ERROR)
{
/* File doesn't exist */
HLOCAL hGroup =
GROUP_AddGroup(szName, szFile, SW_SHOWNORMAL,
DEF_GROUP_WIN_XPOS, DEF_GROUP_WIN_YPOS,
DEF_GROUP_WIN_WIDTH, DEF_GROUP_WIN_HEIGHT, 0, 0,
FALSE, FALSE, FALSE);
if (!hGroup) return;
GRPFILE_WriteGroupFile(hGroup);
}
else /* File exist */
GRPFILE_ReadGroupFile(szFile);
/* FIXME Update progman.ini */
}
/***********************************************************************
*
* GROUP_AddGroup
*/
HLOCAL GROUP_AddGroup(LPCSTR lpszName, LPCSTR lpszGrpFile, INT nCmdShow,
INT x, INT y, INT width, INT height,
INT iconx, INT icony,
BOOL bFileNameModified, BOOL bOverwriteFileOk,
/* FIXME shouldn't be necessary */
BOOL bSuppressShowWindow)
{
GROUP *group, *prior;
MDICREATESTRUCT cs;
INT seqnum;
HLOCAL hPrior, *p;
HLOCAL hGroup = LocalAlloc(LMEM_FIXED, sizeof(GROUP));
HLOCAL hName = LocalAlloc(LMEM_FIXED, 1 + lstrlen(lpszName));
HLOCAL hGrpFile = LocalAlloc(LMEM_FIXED, 1 + lstrlen(lpszGrpFile));
if (!hGroup || !hName || !hGrpFile)
{
MessageBox(Globals.hMainWnd, "out of memory", lpszName, MB_OK);
if (hGroup) LocalFree(hGroup);
if (hName) LocalFree(hName);
if (hGrpFile) LocalFree(hGrpFile);
return(0);
}
hmemcpy(LocalLock(hName), lpszName, 1 + lstrlen(lpszName));
hmemcpy(LocalLock(hGrpFile), lpszGrpFile, 1 + lstrlen(lpszGrpFile));
Globals.hActiveGroup = hGroup;
seqnum = 1;
hPrior = 0;
p = &Globals.hGroups;
while (*p)
{
hPrior = *p;
prior = LocalLock(hPrior);
p = &prior->hNext;
if (prior->seqnum >= seqnum)
seqnum = prior->seqnum + 1;
}
*p = hGroup;
group = LocalLock(hGroup);
group->hPrior = hPrior;
group->hNext = 0;
group->hName = hName;
group->hGrpFile = hGrpFile;
group->bFileNameModified = bFileNameModified;
group->bOverwriteFileOk = bOverwriteFileOk;
group->seqnum = seqnum;
group->nCmdShow = nCmdShow;
group->x = x;
group->y = y;
group->width = width;
group->height = height;
group->iconx = iconx;
group->icony = icony;
group->hPrograms = 0;
group->hActiveProgram = 0;
cs.szClass = STRING_GROUP_WIN_CLASS_NAME;
cs.szTitle = (LPSTR)lpszName;
cs.hOwner = 0;
cs.x = x;
cs.y = y;
cs.cx = width;
cs.cy = height;
cs.style = 0;
cs.lParam = 0;
group->hWnd = (HWND)SendMessage(Globals.hMDIWnd, WM_MDICREATE, 0, (LPARAM)&cs);
SetWindowLong(group->hWnd, 0, (LONG) hGroup);
#if 1
if (!bSuppressShowWindow) /* FIXME shouldn't be necessary */
#endif
{
ShowWindow (group->hWnd, nCmdShow);
UpdateWindow (group->hWnd);
}
return(hGroup);
}
/***********************************************************************
*
* GROUP_ModifyGroup
*/
VOID GROUP_ModifyGroup(HLOCAL hGroup)
{
GROUP *group = LocalLock(hGroup);
CHAR szName[MAX_PATHNAME_LEN];
CHAR szFile[MAX_PATHNAME_LEN];
lstrcpyn(szName, LocalLock(group->hName), MAX_PATHNAME_LEN);
lstrcpyn(szFile, LocalLock(group->hGrpFile), MAX_PATHNAME_LEN);
if (!DIALOG_GroupAttributes(szName, szFile, MAX_PATHNAME_LEN)) return;
if (strcmp(szFile, LocalLock(group->hGrpFile)))
group->bOverwriteFileOk = FALSE;
MAIN_ReplaceString(&group->hName, szName);
MAIN_ReplaceString(&group->hGrpFile, szFile);
GRPFILE_WriteGroupFile(hGroup);
/* FIXME Delete old GrpFile if GrpFile changed */
/* FIXME Update progman.ini */
SetWindowText(group->hWnd, szName);
}
/***********************************************************************
*
* GROUP_ShowGroupWindow
*/
/* FIXME shouldn't be necessary */
VOID GROUP_ShowGroupWindow(HLOCAL hGroup)
{
GROUP *group = LocalLock(hGroup);
ShowWindow (group->hWnd, group->nCmdShow);
UpdateWindow (group->hWnd);
}
/***********************************************************************
*
* GROUP_DeleteGroup
*/
VOID GROUP_DeleteGroup(HLOCAL hGroup)
{
GROUP *group = LocalLock(hGroup);
Globals.hActiveGroup = 0;
if (group->hPrior)
((GROUP*)LocalLock(group->hPrior))->hNext = group->hNext;
else Globals.hGroups = group->hNext;
if (group->hNext)
((GROUP*)LocalLock(group->hNext))->hPrior = group->hPrior;
while (group->hPrograms)
PROGRAM_DeleteProgram(group->hPrograms, FALSE);
/* FIXME Update progman.ini */
SendMessage(Globals.hMDIWnd, WM_MDIDESTROY, (WPARAM)group->hWnd, 0);
LocalFree(group->hName);
LocalFree(group->hGrpFile);
LocalFree(hGroup);
}
/***********************************************************************
*
* GROUP_FirstGroup
*/
HLOCAL GROUP_FirstGroup()
{
return(Globals.hGroups);
}
/***********************************************************************
*
* GROUP_NextGroup
*/
HLOCAL GROUP_NextGroup(HLOCAL hGroup)
{
GROUP *group;
if (!hGroup) return(0);
group = LocalLock(hGroup);
return(group->hNext);
}
/***********************************************************************
*
* GROUP_ActiveGroup
*/
HLOCAL GROUP_ActiveGroup()
{
return(Globals.hActiveGroup);
}
/***********************************************************************
*
* GROUP_GroupWnd
*/
HWND GROUP_GroupWnd(HLOCAL hGroup)
{
GROUP *group;
if (!hGroup) return(0);
group = LocalLock(hGroup);
return(group->hWnd);
}
/***********************************************************************
*
* GROUP_GroupName
*/
LPCSTR GROUP_GroupName(HLOCAL hGroup)
{
GROUP *group;
if (!hGroup) return(0);
group = LocalLock(hGroup);
return(LocalLock(group->hName));
}
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */
#include <windows.h>
#include "license.h"
static LICENSE* SelectLanguage(LPCSTR Language)
{
#if 0
if (!lstrcmp(Language, "Da")) return(&WineLicense_Cz);
if (!lstrcmp(Language, "Da")) return(&WineLicense_Da);
if (!lstrcmp(Language, "De")) return(&WineLicense_De);
if (!lstrcmp(Language, "Es")) return(&WineLicense_Es);
if (!lstrcmp(Language, "Fi")) return(&WineLicense_Fi);
if (!lstrcmp(Language, "Fr")) return(&WineLicense_Fr);
if (!lstrcmp(Language, "No")) return(&WineLicense_No);
#endif
return(&WineLicense_En);
}
VOID WineLicense(HWND Wnd, LPCSTR Language)
{
LICENSE *License = SelectLanguage(Language);
MessageBox(Wnd, License->License, License->LicenseCaption,
MB_ICONINFORMATION | MB_OK);
}
VOID WineWarranty(HWND Wnd, LPCSTR Language)
{
LICENSE *License = SelectLanguage(Language);
MessageBox(Wnd, License->Warranty, License->WarrantyCaption,
MB_ICONEXCLAMATION | MB_OK);
}
VOID WineLicense(HWND hWnd, LPCSTR lpszLanguage);
VOID WineWarranty(HWND hWnd, LPCSTR language);
typedef struct
{
LPCSTR License, LicenseCaption;
LPCSTR Warranty, WarrantyCaption;
} LICENSE;
extern LICENSE WineLicense_Cz, WineLicense_Da, WineLicense_De, WineLicense_En;
extern LICENSE WineLicense_Es, WineLicense_Fi, WineLicense_Fr, WineLicense_No;
/*
* Program Manager
*
* Copyright 1996 Ulrich Schmid
*/
#include <windows.h>
#include "progman.h"
/***********************************************************************
*
* PROGRAM_ProgramWndProc
*/
static LRESULT PROGRAM_ProgramWndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_NCLBUTTONDOWN:
{
HLOCAL hProgram = (HLOCAL) GetWindowLong(hWnd, 0);
PROGRAM *program = LocalLock(hProgram);
GROUP *group = LocalLock(program->hGroup);
group->hActiveProgram = hProgram;
EnableMenuItem(Globals.hFileMenu, PM_MOVE , MF_ENABLED);
EnableMenuItem(Globals.hFileMenu, PM_COPY , MF_ENABLED);
break;
}
case WM_NCLBUTTONDBLCLK:
{
PROGRAM_ExecuteProgram((HLOCAL) GetWindowLong(hWnd, 0));
return(0);
}
case WM_PAINT:
{
PROGRAM *program;
PAINTSTRUCT ps;
HDC hdc;
hdc = BeginPaint(hWnd,&ps);
program = LocalLock((HLOCAL) GetWindowLong(hWnd, 0));
if (program->hIcon)
DrawIcon(hdc, 0, 0, program->hIcon);
EndPaint(hWnd,&ps);
break;
}
}
return(DefWindowProc(hWnd, msg, wParam, lParam));
}
/***********************************************************************
*
* PROGRAM_RegisterProgramWinClass
*/
ATOM PROGRAM_RegisterProgramWinClass()
{
WNDCLASS class;
class.style = CS_HREDRAW | CS_VREDRAW;
class.lpfnWndProc = PROGRAM_ProgramWndProc;
class.cbClsExtra = 0;
class.cbWndExtra = sizeof(LONG);
class.hInstance = Globals.hInstance;
class.hIcon = 0;
class.hCursor = LoadCursor (0, IDC_ARROW);
class.hbrBackground = GetStockObject (WHITE_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_PROGRAM_WIN_CLASS_NAME;
return RegisterClass(&class);
}
/***********************************************************************
*
* PROGRAM_NewProgram
*/
VOID PROGRAM_NewProgram(HLOCAL hGroup)
{
INT nCmdShow = SW_SHOWNORMAL;
INT nHotKey = 0;
INT nIconIndex = 0;
CHAR szName[MAX_PATHNAME_LEN] = "";
CHAR szCmdLine[MAX_PATHNAME_LEN] = "";
CHAR szIconFile[MAX_PATHNAME_LEN] = "";
CHAR szWorkDir[MAX_PATHNAME_LEN] = "";
HICON hIcon = 0;
if (!DIALOG_ProgramAttributes(szName, szCmdLine, szWorkDir, szIconFile,
&hIcon, &nIconIndex, &nHotKey,
&nCmdShow, MAX_PATHNAME_LEN))
return;
if (!hIcon) hIcon = LoadIcon(0, MAKEINTRESOURCE(OIC_WINEICON));
if (!PROGRAM_AddProgram(hGroup, hIcon, szName, 0, 0, szCmdLine, szIconFile,
nIconIndex, szWorkDir, nHotKey, nCmdShow))
return;
GRPFILE_WriteGroupFile(hGroup);
}
/***********************************************************************
*
* PROGRAM_ModifyProgram
*/
VOID PROGRAM_ModifyProgram(HLOCAL hProgram)
{
PROGRAM *program = LocalLock(hProgram);
CHAR szName[MAX_PATHNAME_LEN];
CHAR szCmdLine[MAX_PATHNAME_LEN];
CHAR szIconFile[MAX_PATHNAME_LEN];
CHAR szWorkDir[MAX_PATHNAME_LEN];
lstrcpyn(szName, LocalLock(program->hName), MAX_PATHNAME_LEN);
lstrcpyn(szCmdLine, LocalLock(program->hCmdLine), MAX_PATHNAME_LEN);
lstrcpyn(szIconFile, LocalLock(program->hIconFile), MAX_PATHNAME_LEN);
lstrcpyn(szWorkDir, LocalLock(program->hWorkDir), MAX_PATHNAME_LEN);
if (!DIALOG_ProgramAttributes(szName, szCmdLine, szWorkDir, szIconFile,
&program->hIcon, &program->nIconIndex,
&program->nHotKey, &program->nCmdShow,
MAX_PATHNAME_LEN))
return;
MAIN_ReplaceString(&program->hName, szName);
MAIN_ReplaceString(&program->hCmdLine, szCmdLine);
MAIN_ReplaceString(&program->hIconFile, szIconFile);
MAIN_ReplaceString(&program->hWorkDir, szWorkDir);
SetWindowText(program->hWnd, szName);
UpdateWindow(program->hWnd);
GRPFILE_WriteGroupFile(program->hGroup);
return;
}
/***********************************************************************
*
* PROGRAM_AddProgram
*/
HLOCAL PROGRAM_AddProgram(HLOCAL hGroup, HICON hIcon, LPCSTR lpszName,
INT x, INT y, LPCSTR lpszCmdLine,
LPCSTR lpszIconFile, INT nIconIndex,
LPCSTR lpszWorkDir, INT nHotKey, INT nCmdShow)
{
GROUP *group = LocalLock(hGroup);
PROGRAM *program;
HLOCAL hPrior, *p;
HLOCAL hProgram = LocalAlloc(LMEM_FIXED, sizeof(PROGRAM));
HLOCAL hName = LocalAlloc(LMEM_FIXED, 1 + lstrlen(lpszName));
HLOCAL hCmdLine = LocalAlloc(LMEM_FIXED, 1 + lstrlen(lpszCmdLine));
HLOCAL hIconFile = LocalAlloc(LMEM_FIXED, 1 + lstrlen(lpszIconFile));
HLOCAL hWorkDir = LocalAlloc(LMEM_FIXED, 1 + lstrlen(lpszWorkDir));
if (!hProgram || !hName || !hCmdLine || !hIconFile || !hWorkDir)
{
MAIN_OutOfMemoryError();
if (hProgram) LocalFree(hProgram);
if (hName) LocalFree(hName);
if (hCmdLine) LocalFree(hCmdLine);
if (hIconFile) LocalFree(hIconFile);
if (hWorkDir) LocalFree(hWorkDir);
return(0);
}
hmemcpy(LocalLock(hName), lpszName, 1 + lstrlen(lpszName));
hmemcpy(LocalLock(hCmdLine), lpszCmdLine, 1 + lstrlen(lpszCmdLine));
hmemcpy(LocalLock(hIconFile), lpszIconFile, 1 + lstrlen(lpszIconFile));
hmemcpy(LocalLock(hWorkDir), lpszWorkDir, 1 + lstrlen(lpszWorkDir));
group->hActiveProgram = hProgram;
hPrior = 0;
p = &group->hPrograms;
while (*p)
{
hPrior = *p;
p = &((PROGRAM*)LocalLock(hPrior))->hNext;
}
*p = hProgram;
program = LocalLock(hProgram);
program->hGroup = hGroup;
program->hPrior = hPrior;
program->hNext = 0;
program->hName = hName;
program->hCmdLine = hCmdLine;
program->hIconFile = hIconFile;
program->nIconIndex = nIconIndex;
program->hWorkDir = hWorkDir;
program->hIcon = hIcon;
program->nCmdShow = nCmdShow;
program->nHotKey = nHotKey;
program->hWnd =
CreateWindow (STRING_PROGRAM_WIN_CLASS_NAME, (LPSTR)lpszName,
WS_CHILD | WS_OVERLAPPEDWINDOW,
x, y, CW_USEDEFAULT, CW_USEDEFAULT,
group->hWnd, 0, Globals.hInstance, 0);
SetWindowLong(program->hWnd, 0, (LONG) hProgram);
ShowWindow (program->hWnd, SW_SHOWMINIMIZED);
UpdateWindow (program->hWnd);
return hProgram;
}
/***********************************************************************
*
* PROGRAM_CopyMoveProgram
*/
VOID PROGRAM_CopyMoveProgram(HLOCAL hProgram, BOOL bMove)
{
PROGRAM *program = LocalLock(hProgram);
GROUP *fromgroup = LocalLock(program->hGroup);
HLOCAL hGroup = DIALOG_CopyMove(LocalLock(program->hName),
LocalLock(fromgroup->hName), bMove);
if (!hGroup) return;
/* FIXME shouldn't be necessary */
OpenIcon(((GROUP*)LocalLock(hGroup))->hWnd);
if (!PROGRAM_AddProgram(hGroup,
#if 0
CopyIcon(program->hIcon),
#else
program->hIcon,
#endif
LocalLock(program->hName),
program->x, program->y,
LocalLock(program->hCmdLine),
LocalLock(program->hIconFile),
program->nIconIndex,
LocalLock(program->hWorkDir),
program->nHotKey, program->nCmdShow)) return;
GRPFILE_WriteGroupFile(hGroup);
if (bMove) PROGRAM_DeleteProgram(hProgram, TRUE);
}
/***********************************************************************
*
* PROGRAM_ExecuteProgram
*/
VOID PROGRAM_ExecuteProgram(HLOCAL hProgram)
{
PROGRAM *program = LocalLock(hProgram);
LPSTR lpszCmdLine = LocalLock(program->hCmdLine);
LPSTR lpszWorkDir = LocalLock(program->hWorkDir);
/* FIXME set working direktory */
lpszWorkDir = lpszWorkDir;
WinExec(lpszCmdLine, program->nCmdShow);
if (Globals.bMinOnRun) CloseWindow(Globals.hMainWnd);
}
/***********************************************************************
*
* PROGRAM_DeleteProgram
*/
VOID PROGRAM_DeleteProgram(HLOCAL hProgram, BOOL bUpdateGrpFile)
{
PROGRAM *program = LocalLock(hProgram);
GROUP *group = LocalLock(program->hGroup);
group->hActiveProgram = 0;
if (program->hPrior)
((PROGRAM*)LocalLock(program->hPrior))->hNext = program->hNext;
else
((GROUP*)LocalLock(program->hGroup))->hPrograms = program->hNext;
if (program->hNext)
((PROGRAM*)LocalLock(program->hNext))->hPrior = program->hPrior;
if (bUpdateGrpFile)
GRPFILE_WriteGroupFile(program->hGroup);
DestroyWindow(program->hWnd);
#if 0
if (program->hIcon)
DestroyIcon(program->hIcon);
#endif
LocalFree(program->hName);
LocalFree(program->hCmdLine);
LocalFree(program->hIconFile);
LocalFree(program->hWorkDir);
LocalFree(hProgram);
}
/***********************************************************************
*
* PROGRAM_FirstProgram
*/
HLOCAL PROGRAM_FirstProgram(HLOCAL hGroup)
{
GROUP *group;
if (!hGroup) return(0);
group = LocalLock(hGroup);
return(group->hPrograms);
}
/***********************************************************************
*
* PROGRAM_NextProgram
*/
HLOCAL PROGRAM_NextProgram(HLOCAL hProgram)
{
PROGRAM *program;
if (!hProgram) return(0);
program = LocalLock(hProgram);
return(program->hNext);
}
/***********************************************************************
*
* PROGRAM_ActiveProgram
*/
HLOCAL PROGRAM_ActiveProgram(HLOCAL hGroup)
{
GROUP *group;
if (!hGroup) return(0);
group = LocalLock(hGroup);
if (IsIconic(group->hWnd)) return(0);
return(group->hActiveProgram);
}
/***********************************************************************
*
* PROGRAM_ProgramName
*/
LPCSTR PROGRAM_ProgramName(HLOCAL hProgram)
{
PROGRAM *program;
if (!hProgram) return(0);
program = LocalLock(hProgram);
return(LocalLock(program->hName));
}
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */
/*
* Program Manager
*
* Copyright 1996 Ulrich Schmid
*/
#include <windows.h>
#include "progman.h"
/* Class names */
CHAR STRING_MAIN_WIN_CLASS_NAME[] = "PMMain";
CHAR STRING_MDI_WIN_CLASS_NAME[] = "MDICLIENT";
CHAR STRING_GROUP_WIN_CLASS_NAME[] = "PMGroup";
CHAR STRING_PROGRAM_WIN_CLASS_NAME[] = "PMProgram";
/* Resource names */
/* Xx will be overwritten with En, ... */
CHAR STRING_ACCEL[] = "ACCEL";
CHAR STRING_MAIN_Xx[] = "MENU_Xx";
CHAR STRING_NEW_Xx[] = "DIALOG_NEW_Xx";
CHAR STRING_OPEN_Xx[] = "DIALOG_OPEN_Xx";
CHAR STRING_MOVE_Xx[] = "DIALOG_MOVE_Xx";
CHAR STRING_COPY_Xx[] = "DIALOG_COPY_Xx";
CHAR STRING_DELETE_Xx[] = "DIALOG_DELETE_Xx";
CHAR STRING_GROUP_Xx[] = "DIALOG_GROUP_Xx";
CHAR STRING_PROGRAM_Xx[] = "DIALOG_PROGRAM_Xx";
CHAR STRING_SYMBOL_Xx[] = "DIALOG_SYMBOL_Xx";
CHAR STRING_EXECUTE_Xx[] = "DIALOG_EXECUTE_Xx";
static LPCSTR StringTableEn[];
static LPCSTR StringTableDe[];
VOID STRING_SelectLanguage(LPCSTR lang)
{
/* Change string table */
Globals.StringTable = StringTableEn;
if (!lstrcmp(lang, "De")) Globals.StringTable = StringTableDe;
SetWindowText(Globals.hMainWnd, STRING_PROGRAM_MANAGER);
/* Change Resource names */
lstrcpyn(STRING_MAIN_Xx + sizeof(STRING_MAIN_Xx) - 3, lang, 3);
lstrcpyn(STRING_NEW_Xx + sizeof(STRING_NEW_Xx) - 3, lang, 3);
lstrcpyn(STRING_OPEN_Xx + sizeof(STRING_OPEN_Xx) - 3, lang, 3);
lstrcpyn(STRING_MOVE_Xx + sizeof(STRING_MOVE_Xx) - 3, lang, 3);
lstrcpyn(STRING_COPY_Xx + sizeof(STRING_COPY_Xx) - 3, lang, 3);
lstrcpyn(STRING_DELETE_Xx + sizeof(STRING_DELETE_Xx) - 3, lang, 3);
lstrcpyn(STRING_GROUP_Xx + sizeof(STRING_GROUP_Xx) - 3, lang, 3);
lstrcpyn(STRING_PROGRAM_Xx + sizeof(STRING_PROGRAM_Xx) - 3, lang, 3);
lstrcpyn(STRING_SYMBOL_Xx + sizeof(STRING_SYMBOL_Xx) - 3, lang, 3);
lstrcpyn(STRING_EXECUTE_Xx + sizeof(STRING_EXECUTE_Xx) - 3, lang, 3);
/* Destroy old menu */
if (Globals.hMainMenu)
{
SendMessage(Globals.hMDIWnd, WM_MDISETMENU, (WPARAM) NULL, (LPARAM) NULL);
#if 0 /* FIXME when MDISetMenu is complete */
DestroyMenu(Globals.hMainMenu);
#endif
}
/* Create new menu */
Globals.hMainMenu = LoadMenu(Globals.hInstance, STRING_MAIN_Xx);
if (Globals.hMainMenu)
{
Globals.hFileMenu = GetSubMenu(Globals.hMainMenu, 0);
Globals.hOptionMenu = GetSubMenu(Globals.hMainMenu, 1);
Globals.hWindowsMenu = GetSubMenu(Globals.hMainMenu, 2);
if (Globals.hMDIWnd)
SendMessage(Globals.hMDIWnd, WM_MDISETMENU,
(WPARAM) Globals.hMainMenu,
(LPARAM) Globals.hWindowsMenu);
else SetMenu(Globals.hMainWnd, Globals.hMainMenu);
}
/* Unsupported language */
else if(lstrcmp(lang, "En")) STRING_SelectLanguage("En");
else
{
MessageBox(Globals.hMainWnd, "No language found", "FATAL ERROR", MB_OK);
PostQuitMessage(1);
}
/* have to be last because of
* the possible recursion */
Globals.lpszLanguage = lang;
}
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */
#ifdef WINELIB
#include <unistd.h>
#include <string.h>
#include "windows.h"
#include "winbase.h"
#include "options.h"
#include "dos_fs.h"
#include "debug.h"
#include "progman.h"
#define MAX_CMDLINE_SIZE 256
/* FIXME should use WinExec from -lwine */
HANDLE ProgmanWinExec( LPSTR lpCmdLine, WORD nCmdShow )
{
char wine[MAX_CMDLINE_SIZE];
char filename[MAX_CMDLINE_SIZE], *p;
char cmdline[MAX_CMDLINE_SIZE];
const char *argv[10], **argptr;
const char *unixfilename;
int simplename = 1;
if (fork()) return(INVALID_HANDLE_VALUE);
strncpy( filename, lpCmdLine, MAX_CMDLINE_SIZE );
filename[MAX_CMDLINE_SIZE-1] = '\0';
for (p = filename; *p && (*p != ' ') && (*p != '\t'); p++)
if ((*p == ':') || (*p == ':') || (*p == '/')) simplename = 0;
if (*p)
{
strncpy( cmdline, p + 1, 128 );
cmdline[127] = '\0';
}
else cmdline[0] = '\0';
*p = '\0';
if (simplename) unixfilename = filename;
else unixfilename = DOSFS_GetUnixFileName(filename, 0);
argptr = argv;
*argptr++ = unixfilename;
if (nCmdShow == SW_SHOWMINIMIZED) *argptr++ = "-iconic";
if (cmdline[0]) *argptr++ = cmdline;
*argptr++ = 0;
execvp(argv[0], (char**)argv);
PROFILE_GetWineIniString("progman", "wine", "wine",
wine, sizeof(wine));
argptr = argv;
*argptr++ = wine;
*argptr++ = "-language";
*argptr++ = Globals.lpszLanguage;
if (nCmdShow == SW_SHOWMINIMIZED) *argptr++ = "-iconic";
*argptr++ = lpCmdLine;
*argptr++ = 0;
execvp(argv[0] , (char**)argv);
printf("Cannot exec `%s %s %s%s %s'\n",
wine, "-language", Globals.lpszLanguage,
nCmdShow == SW_SHOWMINIMIZED ? " -iconic" : "",
lpCmdLine);
exit(1);
}
BOOL ProgmanWinHelp(HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData)
{
char str[256];
dprintf_exec(stddeb,"WinHelp(%s, %u, %lu)\n",
lpHelpFile, wCommand, dwData);
switch(wCommand) {
case 0:
case HELP_HELPONHELP:
GetWindowsDirectory(str, sizeof(str));
strcat(str, "\\winhelp.exe winhelp.hlp");
dprintf_exec(stddeb,"'%s'\n", str);
break;
case HELP_INDEX:
GetWindowsDirectory(str, sizeof(str));
strcat(str, "\\winhelp.exe ");
strcat(str, lpHelpFile);
dprintf_exec(stddeb,"'%s'\n", str);
break;
default:
return FALSE;
}
WinExec(str, SW_SHOWNORMAL);
return(TRUE);
}
#endif
......@@ -212,7 +212,7 @@ rc_style *new_style()
/*initially, no bits have to be reset*/
ret->and=-1;
/*initially, no bits are set*/
ret->or=0;
ret->or=WS_CHILD | WS_VISIBLE;
return ret;
}
......
......@@ -2,7 +2,7 @@ TOPSRC = @top_srcdir@
MODULE = resources
LANGUAGES = En Es De No Fr Fi Da Cz
LANGUAGES = En Es De No Fr Fi Da Cz Eo
SYSRES_SRCS = $(LANGUAGES:%=sysres_%.c)
......
......@@ -17,6 +17,7 @@
#include "sysres_Fi.h"
#include "sysres_Da.h"
#include "sysres_Cz.h"
#include "sysres_Eo.h"
static const struct resource * const * SYSRES_Resources[] =
......@@ -28,7 +29,8 @@ static const struct resource * const * SYSRES_Resources[] =
sysres_Fr_Table, /* LANG_Fr */
sysres_Fi_Table, /* LANG_Fi */
sysres_Da_Table, /* LANG_Da */
sysres_Cz_Table /* LANG_Cz */
sysres_Cz_Table, /* LANG_Cz */
sysres_Eo_Table /* LANG_Eo */
};
......
SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE
{
MENUITEM "&Renormaligu", 61728
MENUITEM "&Movi", 61456
MENUITEM "&Grando", 61440
MENUITEM "E&tigu", 61472
MENUITEM "&Egigu", 61488
MENUITEM SEPARATOR
MENUITEM "&Fermu\tAlt-F4", 61536
MENUITEM SEPARATOR
MENUITEM "&Alia tasko ...\tCtrl-Esc", 61744
MENUITEM SEPARATOR
MENUITEM "&Pri WINE ...", 61761
}
MSGBOX DIALOG 100, 80, 216, 168
STYLE DS_SYSMODAL | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
BEGIN
ICON "", 1088, 8, 20, 16, 16, WS_CHILD | WS_VISIBLE
LTEXT "", 100, 32, 4, 176, 48, WS_CHILD | WS_VISIBLE | WS_GROUP
PUSHBUTTON "En&orde", 1, 16, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Nuligu", 2, 64, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "e&su", 3, 112, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Reprovu", 4, 160, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Ignoru", 5, 208, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Jes", 6, 256, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "N&e", 7, 304, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 50, 44, 223, 200
STYLE DS_LOCALEDIT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Pri %s"
FONT 10, "System"
{
DEFPUSHBUTTON "Enorde", 1, 91, 180, 40, 14
CONTROL "", -1, "STATIC", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE | WS_DISABLED, 4, 35, 215, 140
LTEXT "Text", 100, 11, 40, 200, 130, SS_NOPREFIX | WS_GROUP
ICON "", 1088, 195, 10, 18, 20
}
OPEN_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Malfermu dosieron"
FONT 8, "Helv"
{
LTEXT "Dosier&nomo:", 1090, 6, 6, 76, 9
EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
LTEXT "Dosier&ujo:", -1, 110, 6, 92, 9
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
LTEXT "Dosier&speco:", 1089, 6, 104, 90, 9
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
LTEXT "Disk&ilo:", 1091, 110, 104, 92, 9
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "Malfermu", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Helpu", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
CHECKBOX "Nur &legebla", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
}
SAVE_FILE DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 275, 134
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Sekurigu dosieron"
FONT 8, "Helv"
{
LTEXT "Dosier&nomo:", 1090, 6, 6, 76, 9
EDITTEXT 1152, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP
LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
LTEXT "Dosier&ujo:", -1, 110, 6, 92, 9
LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP
LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP
LTEXT "Dosier&speco:", 1089, 6, 104, 90, 9
COMBOBOX 1136, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP
LTEXT "Disk&ilo:", 1091, 110, 104, 92, 9
COMBOBOX 1137, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "Sekurigu", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Helpu", 1038, 208, 46, 56, 14, WS_GROUP | WS_TABSTOP
CHECKBOX "Nur &legebla", 1040, 208, 68, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
}
PRINT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Presu"
FONT 8, "Helv"
{
LTEXT "Presilo:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
GROUPBOX "Etendion", 1072, 6, 30, 160, 65, BS_GROUPBOX
RADIOBUTTON "&iujn", 1056, 16, 45, 60, 12
RADIOBUTTON "&elekton", 1057, 16, 60, 60, 12
RADIOBUTTON "&paojn", 1058, 16, 75, 60, 12
DEFPUSHBUTTON "Presu", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Aranu", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP
LTEXT "de:", 1090, 60, 80, 30, 9
LTEXT "is:", 1091, 120, 80, 30, 9
LTEXT "&Kvalito:", 1092, 6, 100, 76, 9
COMBOBOX 1136, 80, 100, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
CHECKBOX "Presu &dosieren", 1040, 20, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Mallartipe", 1041, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
}
PRINT_SETUP DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Presada Arano"
FONT 8, "Helv"
{
GROUPBOX "Presilo", 1072, 6, 10, 180, 65, BS_GROUPBOX
RADIOBUTTON "&Implicita Presilo", 1056, 16, 20, 80, 12
LTEXT "[none]", 1088, 35, 35, 120, 9
RADIOBUTTON "&Specifa Presilo", 1057, 16, 50, 80, 12
COMBOBOX 1136, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "Enorde", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Agordo", 1024, 206, 46, 56, 14, WS_GROUP | WS_TABSTOP
GROUPBOX "Formato", 1073, 6, 85, 100, 50, BS_GROUPBOX
RADIOBUTTON "&Vertikala", 1058, 50, 100, 40, 12
RADIOBUTTON "&Horizontala", 1059, 50, 115, 40, 12
ICON "LANDSCAP", 1097, 10, 95, 32, 32
ICON "PORTRAIT", 1098, 10, 95, 32, 32
GROUPBOX "Papero", 1074, 120, 85, 180, 50, BS_GROUPBOX
LTEXT "&Grando", 1089, 130, 95, 30, 9
LTEXT "&Fonto", 1090, 130, 110, 30, 9
COMBOBOX 1137, 155, 95, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
COMBOBOX 1138, 155, 110, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP
}
CHOOSE_FONT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 134
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Tiparo"
FONT 8, "Helv"
{
LTEXT "Tiparo:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
DEFPUSHBUTTON "Enorde", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
}
CHOOSE_COLOR DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Koloro"
FONT 8, "Helv"
{
LTEXT "&Normala koloraro:", 1088, 6, 6, 40, 9
LTEXT "&Persona koloraro:", 1089, 6, 126, 40, 9
LTEXT "Color|Sol&id", 1090, 100, 146, 40, 9
LTEXT "&Farbo:", 1091, 150, 126, 40, 9
LTEXT "&Saturo:", 1092, 150, 146, 40, 9
LTEXT "&Helo:", 1093, 150, 166, 40, 9
LTEXT "&Ruo:", 1094, 150, 126, 40, 9
LTEXT "&Verda:", 1095, 150, 146, 40, 9
LTEXT "&Bluo:", 1096, 150, 166, 40, 9
DEFPUSHBUTTON "Enorde", 1, 6, 182, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Aldonu al persona koloraro", 1024, 120, 182, 100, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Forv&iu personan koloraron", 1025, 6, 164, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 76, 182, 56, 14, WS_GROUP | WS_TABSTOP
}
FIND_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 84
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Seru"
FONT 8, "Helv"
{
LTEXT "&Seru:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
CHECKBOX "Nur tutan &vorton", 1040, 20, 30, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Atentu &Usklecon", 1041, 20, 50, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
GROUPBOX "Direkto", 1072, 90, 40, 80, 40, BS_GROUPBOX
RADIOBUTTON "&Retro", 1056, 100, 50, 50, 12
RADIOBUTTON "&Antaen", 1057, 150, 50, 50, 12
DEFPUSHBUTTON "&Pluseru", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
}
REPLACE_TEXT DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 264, 114
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Anstataigu"
FONT 8, "Helv"
{
LTEXT "Anstataigu:", 1088, 6, 6, 40, 9
LTEXT "", 1089, 60, 6, 150, 9
LTEXT "&per:", 1090, 6, 26, 40, 9
LTEXT "", 1091, 60, 26, 150, 9
CHECKBOX "Nur tutan &vorton", 1040, 20, 40, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
CHECKBOX "Atentu &Usklecon", 1041, 20, 60, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
DEFPUSHBUTTON "Plu&seru", 1, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Anstataigu", 1024, 206, 24, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Anstataigu &iujn", 1025, 206, 44, 56, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON "Nuligu", 2, 206, 64, 56, 14, WS_GROUP | WS_TABSTOP
}
......@@ -11,6 +11,7 @@
#include "wine.h"
#include "module.h"
#include "neexe.h"
#include "windows.h"
/* ELF symbols do not have an underscore in front */
#if defined (__ELF__) || defined (__svr4__)
......@@ -560,13 +561,13 @@ static void BuildModule( int max_code_offset, int max_data_offset )
char *buffer;
NE_MODULE *pModule;
SEGTABLEENTRY *pSegment;
LOADEDFILEINFO *pFileInfo;
OFSTRUCT *pFileInfo;
BYTE *pstr, *bundle;
WORD *pword;
/* Module layout:
* NE_MODULE Module
* LOADEDFILEINFO File information
* OFSTRUCT File information
* SEGTABLEENTRY Segment 1 (code)
* SEGTABLEENTRY Segment 2 (data)
* WORD[2] Resource table (empty)
......@@ -606,15 +607,13 @@ static void BuildModule( int max_code_offset, int max_data_offset )
/* File information */
pFileInfo = (LOADEDFILEINFO *)(pModule + 1);
pFileInfo = (OFSTRUCT *)(pModule + 1);
pModule->fileinfo = (int)pFileInfo - (int)pModule;
pFileInfo->length = sizeof(LOADEDFILEINFO) + strlen(UpperDLLName) + 3;
pFileInfo->fixed_media = 0;
pFileInfo->error = 0;
pFileInfo->date = 0;
pFileInfo->time = 0;
sprintf( pFileInfo->filename, "%s.DLL", UpperDLLName );
pstr = (char *)pFileInfo + pFileInfo->length + 1;
memset( pFileInfo, 0, sizeof(*pFileInfo) - sizeof(pFileInfo->szPathName) );
pFileInfo->cBytes = sizeof(*pFileInfo) - sizeof(pFileInfo->szPathName)
+ strlen(UpperDLLName) + 4;
sprintf( pFileInfo->szPathName, "%s.DLL", UpperDLLName );
pstr = (char *)pFileInfo + pFileInfo->cBytes + 1;
/* Segment table */
......
......@@ -12,6 +12,7 @@
#include "kernel32.h"
#include "handle32.h"
#include "pe_image.h"
#include "task.h"
#include "stddebug.h"
#define DEBUG_WIN32
#include "debug.h"
......@@ -76,8 +77,13 @@ HMODULE WIN32_GetModuleHandle(char *module)
HMODULE hModule;
dprintf_win32(stddeb, "GetModuleHandle: %s\n", module ? module : "NULL");
if (module == NULL) hModule = GetExePtr( GetCurrentTask() );
else hModule = GetModuleHandle(module);
/* Freecell uses the result of GetModuleHandleA(0) as the hInstance in
all calls to e.g. CreateWindowEx. */
if (module == NULL) {
TDB *pTask = (TDB *)GlobalLock( GetCurrentTask() );
hModule = pTask->hInstance;
} else
hModule = GetModuleHandle(module);
dprintf_win32(stddeb, "GetModuleHandle: returning %d\n", hModule );
return hModule;
}
......
......@@ -97,9 +97,7 @@ HANDLE32 FindResource32( HINSTANCE hModule, LPCWSTR name, LPCWSTR type )
DWORD root;
HANDLE32 result;
#if 0
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
#endif
dprintf_resource(stddeb, "FindResource: module=%08x type=", hModule );
PrintId( type );
dprintf_resource( stddeb, " name=" );
......@@ -133,9 +131,7 @@ HANDLE32 LoadResource32( HINSTANCE hModule, HANDLE32 hRsrc )
#ifndef WINELIB
struct w_files *wptr = wine_files;
#if 0
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
#endif
dprintf_resource(stddeb, "LoadResource: module="NPFMT" res="NPFMT"\n",
hModule, hRsrc );
if (!hRsrc) return 0;
......
......@@ -17,7 +17,7 @@
int STRING32_UniLen(LPWSTR s)
{
int i;
for(i=0;*s;s++);
for(i=0;*s;s++)
i++;
return i;
}
......
......@@ -23,9 +23,9 @@ VOID GetLocalTime(LPSYSTEMTIME systime)
struct tm *local_tm;
struct timeval tv;
time(&local_time);
local_tm = localtime(&local_time);
gettimeofday(&tv, NULL);
local_time = tv.tv_sec;
local_tm = localtime(&local_time);
systime->wYear = local_tm->tm_year + 1900;
systime->wMonth = local_tm->tm_mon + 1;
......@@ -46,9 +46,9 @@ VOID GetSystemTime(LPSYSTEMTIME systime)
struct tm *local_tm;
struct timeval tv;
time(&local_time);
local_tm = gmtime(&local_time);
gettimeofday(&tv, NULL);
local_time = tv.tv_sec;
local_tm = gmtime(&local_time);
systime->wYear = local_tm->tm_year + 1900;
systime->wMonth = local_tm->tm_mon + 1;
......
......@@ -155,7 +155,6 @@ static void CARET_Initialize()
/*****************************************************************
* CreateCaret (USER.163)
*/
BOOL CreateCaret(HWND hwnd, HBITMAP bitmap, INT width, INT height)
{
dprintf_caret(stddeb,"CreateCaret: hwnd="NPFMT"\n", hwnd);
......@@ -186,7 +185,7 @@ BOOL CreateCaret(HWND hwnd, HBITMAP bitmap, INT width, INT height)
Caret.color = GetSysColor(COLOR_GRAYTEXT);
else
Caret.color = GetSysColor(COLOR_WINDOW);
Caret.timeout = 750;
Caret.timeout = GetProfileInt( "windows", "CursorBlinkRate", 750 );
CARET_Initialize();
......@@ -220,6 +219,7 @@ BOOL DestroyCaret()
void SetCaretPos(short x, short y)
{
if (!Caret.hwnd) return;
if ((x == Caret.x) && (y == Caret.y)) return;
dprintf_caret(stddeb,"SetCaretPos: x=%d, y=%d\n", x, y);
......
......@@ -145,6 +145,7 @@ static void EVENT_ConfigureNotify( HWND hwnd, XConfigureEvent *event );
static void EVENT_SelectionRequest( HWND hwnd, XSelectionRequestEvent *event);
static void EVENT_SelectionNotify( HWND hwnd, XSelectionEvent *event);
static void EVENT_SelectionClear( HWND hwnd, XSelectionClearEvent *event);
static void EVENT_ClientMessage( HWND hwnd, XClientMessageEvent *event );
/***********************************************************************
......@@ -220,6 +221,10 @@ void EVENT_ProcessEvent( XEvent *event )
EVENT_SelectionClear( hwnd, (XSelectionClearEvent*) event );
break;
case ClientMessage:
EVENT_ClientMessage( hwnd, (XClientMessageEvent *) event );
break;
default:
dprintf_event(stddeb, "Unprocessed event %s for hwnd "NPFMT"\n",
event_names[event->type], hwnd );
......@@ -616,6 +621,30 @@ static void EVENT_SelectionClear(HWND hwnd, XSelectionClearEvent *event)
CLIPBOARD_ReleaseSelection(hwnd);
}
/**********************************************************************
* EVENT_ClientMessage
*/
static void EVENT_ClientMessage (HWND hwnd, XClientMessageEvent *event )
{
static Atom wmProtocols = None;
static Atom wmDeleteWindow = None;
if (wmProtocols == None)
wmProtocols = XInternAtom( display, "WM_PROTOCOLS", True );
if (wmDeleteWindow == None)
wmDeleteWindow = XInternAtom( display, "WM_DELETE_WINDOW", True );
if ((event->format != 32) || (event->message_type != wmProtocols) ||
(((Atom) event->data.l[0]) != wmDeleteWindow))
{
dprintf_event( stddeb, "unrecognized ClientMessage\n" );
return;
}
SendMessage( hwnd, WM_SYSCOMMAND, SC_CLOSE, 0 );
}
/**********************************************************************
* SetCapture (USER.18)
*/
......
......@@ -86,7 +86,7 @@ static void SYSCOLOR_SetColor( int index, COLORREF color )
break;
case COLOR_WINDOWTEXT:
DeleteObject( sysColorObjects.hpenWindowText );
sysColorObjects.hpenWindowText = CreatePen( PS_SOLID, 1, color );
sysColorObjects.hpenWindowText = CreatePen( PS_DOT, 1, color );
break;
case COLOR_CAPTIONTEXT:
break;
......
......@@ -306,11 +306,12 @@ HWND CreateWindowEx( DWORD exStyle, SEGPTR className, SEGPTR windowName,
{
HANDLE class, hwnd;
CLASS *classPtr;
WND *wndPtr;
WND *wndPtr, *parentWndPtr;
POINT maxSize, maxPos, minTrack, maxTrack;
CREATESTRUCT createStruct;
int wmcreate;
XSetWindowAttributes win_attr;
Atom XA_WM_DELETE_WINDOW;
/* FIXME: windowName and className should be SEGPTRs */
......@@ -473,6 +474,15 @@ HWND CreateWindowEx( DWORD exStyle, SEGPTR className, SEGPTR windowName,
CWColormap | CWCursor | CWSaveUnder |
CWBackingStore, &win_attr );
XStoreName( display, wndPtr->window, PTR_SEG_TO_LIN(windowName) );
XA_WM_DELETE_WINDOW = XInternAtom( display, "WM_DELETE_WINDOW",
False );
XSetWMProtocols( display, wndPtr->window, &XA_WM_DELETE_WINDOW, 1 );
if (parent) /* Get window owner */
{
Window win = WIN_GetXWindow( parent );
if (win) XSetTransientForHint( display, wndPtr->window, win );
}
EVENT_RegisterWindow( wndPtr->window, hwnd );
}
......@@ -663,8 +673,7 @@ HWND FindWindow( SEGPTR ClassMatch, LPSTR TitleMatch )
/**********************************************************************
* GetDesktopWindow (USER.286)
* GetDeskTopHwnd (USER.278)
* GetDesktopWindow (USER.286)
*/
HWND GetDesktopWindow(void)
{
......@@ -672,6 +681,18 @@ HWND GetDesktopWindow(void)
}
/**********************************************************************
* GetDesktopHwnd (USER.278)
*
* Exactly the same thing as GetDesktopWindow(), but not documented.
* Don't ask me why...
*/
HWND GetDesktopHwnd(void)
{
return hwndDesktop;
}
/*******************************************************************
* EnableWindow (USER.34)
*/
......
......@@ -1219,6 +1219,7 @@ BOOL SetWindowPos( HWND hwnd, HWND hwndInsertAfter, INT x, INT y,
if ((flags & SWP_FRAMECHANGED) && !(flags & SWP_NOREDRAW))
RedrawWindow( winpos.hwnd, NULL, 0,
RDW_ALLCHILDREN | /*FIXME: this should not be necessary*/
RDW_INVALIDATE | RDW_FRAME | RDW_ERASE );
if (!(flags & SWP_DEFERERASE))
RedrawWindow( wndPtr->hwndParent, NULL, 0,
......
......@@ -104,7 +104,7 @@ Start as an icon
.I -language xx
Set the language to
.I xx
(one of En, Es, De, No, Fr, Fi, Da, Cz)
(one of En, Es, De, No, Fr, Fi, Da, Cz, Eo)
.TP
.I -managed
Create each top-level window as a properly managed X window
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment