Sweden-Number/programs/progman/progman.h

340 lines
10 KiB
C
Raw Normal View History

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.
1996-03-02 20:34:10 +01:00
/*
* Program Manager
*
* Copyright 1996 Ulrich Schmid
*/
#ifndef PROGMAN_H
#define PROGMAN_H
#ifndef RC_INVOKED
#include "windows.h"
#define MAX_PATHNAME_LEN 1024
/* Fallback icon */
#ifdef WINELIB
#define DEFAULTICON OIC_WINEICON
#else
#define DEFAULTICON OIC_LANDSCAPE
#endif
/* Icon index in M$ Window's progman.exe */
#define PROGMAN_ICON_INDEX 0
#define GROUP_ICON_INDEX 6
#define DEFAULT_ICON_INDEX 7
#define DEF_GROUP_WIN_XPOS 100
#define DEF_GROUP_WIN_YPOS 100
#define DEF_GROUP_WIN_WIDTH 300
#define DEF_GROUP_WIN_HEIGHT 200
typedef struct
{
HLOCAL hGroup;
HLOCAL hPrior;
HLOCAL hNext;
HWND hWnd;
/**/ /* Numbers are byte indexes in *.grp */
/**/ /* Program entry */
INT x, y; /* 0 - 3 */
INT nIconIndex; /* 4 - 5 */
HICON hIcon;
/* icon flags ??? */ /* 6 - 7 */
/* iconANDsize */ /* 8 - 9 */
/* iconXORsize */ /* 10 - 11 */
/* pointer to IconInfo */ /* 12 - 13 */
/* pointer to iconXORbits */ /* 14 - 15 */ /* sometimes iconANDbits ?! */
/* pointer to iconANDbits */ /* 16 - 17 */ /* sometimes iconXORbits ?! */
HLOCAL hName; /* 18 - 19 */
HLOCAL hCmdLine; /* 20 - 21 */
HLOCAL hIconFile; /* 22 - 23 */
HLOCAL hWorkDir; /* Extension 0x8101 */
INT nHotKey; /* Extension 0x8102 */
/* Modifier: bit 8... */
INT nCmdShow; /* Extension 0x8103 */
/**/ /* IconInfo */
/* HotSpot x ??? */ /* 0 - 1 */
/* HotSpot y ??? */ /* 2 - 3 */
/* Width */ /* 4 - 5 */
/* Height */ /* 6 - 7 */
/* WidthBytes ??? */ /* 8 - 9 */
/* Planes */ /* 10 - 10 */
/* BitsPerPixel */ /* 11 - 11 */
} PROGRAM;
typedef struct
{
HLOCAL hPrior;
HLOCAL hNext;
HWND hWnd;
HLOCAL hGrpFile;
HLOCAL hActiveProgram;
BOOL bFileNameModified;
BOOL bOverwriteFileOk;
INT seqnum;
/**/ /* Absolute */
/* magic `PMCC' */ /* 0 - 3 */
/* checksum */ /* 4 - 5 */
/* Extension ptr */ /* 6 - 7 */
INT nCmdShow; /* 8 - 9 */
INT x, y; /* 10 - 13 */
INT width, height; /* 14 - 17 */
INT iconx, icony; /* 18 - 21 */
HLOCAL hName; /* 22 - 23 */
/* unknown */ /* 24 - 31 */
/* number of programs */ /* 32 - 33 */
HLOCAL hPrograms; /* 34 ... */
/**/ /* Extensions */
/* Extension type */ /* 0 - 1 */
/* Program number */ /* 2 - 3 */
/* Size of entry */ /* 4 - 5 */
/* Data */ /* 6 ... */
/* magic `PMCC' */ /* Extension 0x8000 */
/* End of Extensions */ /* Extension 0xffff */
} GROUP;
typedef struct
{
HANDLE hInstance;
HANDLE hAccel;
HWND hMainWnd;
HWND hMDIWnd;
HICON hMainIcon;
HICON hGroupIcon;
HICON hDefaultIcon;
HMENU hMainMenu;
HMENU hFileMenu;
HMENU hOptionMenu;
HMENU hWindowsMenu;
LPCSTR lpszIniFile;
LPCSTR lpszIcoFile;
BOOL bAutoArrange;
BOOL bSaveSettings;
BOOL bMinOnRun;
HLOCAL hGroups;
LPCSTR lpszLanguage;
LPCSTR *StringTable;
/* FIXME should use MDI */
HLOCAL hActiveGroup;
} GLOBALS;
extern GLOBALS Globals;
VOID MAIN_ReplaceString(HLOCAL *handle, LPSTR replacestring);
VOID MAIN_NotImplementedError(void);
VOID MAIN_FileReadError(LPCSTR lpszPath);
VOID MAIN_FileWriteError(LPCSTR lpszPath);
VOID MAIN_GrpFileReadError(LPCSTR lpszPath);
VOID MAIN_OutOfMemoryError(void);
VOID MAIN_WinHelpError(void);
HLOCAL GRPFILE_ReadGroupFile(const char* path);
BOOL GRPFILE_WriteGroupFile(HLOCAL hGroup);
ATOM GROUP_RegisterGroupWinClass(void);
HLOCAL GROUP_AddGroup(LPCSTR lpszName, LPCSTR lpszGrpFile, INT showcmd,
INT x, INT y, INT width, INT heiht,
INT iconx, INT icony,
BOOL bModifiedFileName, BOOL bOverwriteFileOk,
/* FIXME shouldn't be necessary */
BOOL bSuppressShowWindow);
VOID GROUP_NewGroup(void);
VOID GROUP_ModifyGroup(HLOCAL hGroup);
VOID GROUP_DeleteGroup(HLOCAL hGroup);
/* FIXME shouldn't be necessary */
VOID GROUP_ShowGroupWindow(HLOCAL hGroup);
HLOCAL GROUP_FirstGroup(void);
HLOCAL GROUP_NextGroup(HLOCAL hGroup);
HLOCAL GROUP_ActiveGroup(void);
HWND GROUP_GroupWnd(HLOCAL hGroup);
LPCSTR GROUP_GroupName(HLOCAL hGroup);
ATOM PROGRAM_RegisterProgramWinClass(void);
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);
VOID PROGRAM_NewProgram(HLOCAL hGroup);
VOID PROGRAM_ModifyProgram(HLOCAL hProgram);
VOID PROGRAM_CopyMoveProgram(HLOCAL hProgram, BOOL bMove);
VOID PROGRAM_DeleteProgram(HLOCAL hProgram, BOOL BUpdateGrpFile);
HLOCAL PROGRAM_FirstProgram(HLOCAL hGroup);
HLOCAL PROGRAM_NextProgram(HLOCAL hProgram);
HLOCAL PROGRAM_ActiveProgram(HLOCAL hGroup);
LPCSTR PROGRAM_ProgramName(HLOCAL hProgram);
VOID PROGRAM_ExecuteProgram(HLOCAL hLocal);
INT DIALOG_New(INT nDefault);
HLOCAL DIALOG_CopyMove(LPCSTR lpszProgramName, LPCSTR lpszGroupName, BOOL bMove);
BOOL DIALOG_Delete(LPCSTR lpszFormat, LPCSTR lpszName);
BOOL DIALOG_GroupAttributes(LPSTR lpszTitle, LPSTR lpszPath, INT nSize);
BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine,
LPSTR lpszWorkDir, LPSTR lpszIconFile,
HICON *lphIcon, INT *nIconIndex,
INT *lpnHotKey, INT *lpnCmdShow, INT nSize);
VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile,
INT *lpnIconIndex, INT nSize);
VOID DIALOG_Execute(void);
VOID STRING_SelectLanguage(LPCSTR lang);
/* Class names */
extern CHAR STRING_MAIN_WIN_CLASS_NAME[];
extern CHAR STRING_MDI_WIN_CLASS_NAME[];
extern CHAR STRING_GROUP_WIN_CLASS_NAME[];
extern CHAR STRING_PROGRAM_WIN_CLASS_NAME[];
/* Resource names */
extern CHAR STRING_ACCEL[];
extern CHAR STRING_MAIN_Xx[];
extern CHAR STRING_NEW_Xx[];
extern CHAR STRING_OPEN_Xx[];
extern CHAR STRING_MOVE_Xx[];
extern CHAR STRING_COPY_Xx[];
extern CHAR STRING_DELETE_Xx[];
extern CHAR STRING_GROUP_Xx[];
extern CHAR STRING_PROGRAM_Xx[];
extern CHAR STRING_SYMBOL_Xx[];
extern CHAR STRING_EXECUTE_Xx[];
/* Strings */
#define STRING_PROGRAM_MANAGER Globals.StringTable[ 0]
#define STRING_ERROR Globals.StringTable[ 1]
#define STRING_INFO Globals.StringTable[ 2]
#define STRING_DELETE Globals.StringTable[ 3]
#define STRING_DELETE_GROUP_s Globals.StringTable[ 4]
#define STRING_DELETE_PROGRAM_s Globals.StringTable[ 5]
#define STRING_NOT_IMPLEMENTED Globals.StringTable[ 6]
#define STRING_FILE_READ_ERROR_s Globals.StringTable[ 7]
#define STRING_FILE_WRITE_ERROR_s Globals.StringTable[ 8]
#define STRING_GRPFILE_READ_ERROR_s Globals.StringTable[ 9]
#define STRING_OUT_OF_MEMORY Globals.StringTable[10]
#define STRING_WINHELP_ERROR Globals.StringTable[11]
#define STRING_UNKNOWN_FEATURE_IN_GRPFILE Globals.StringTable[12]
#define STRING_FILE_NOT_OVERWRITTEN_s Globals.StringTable[13]
#define STRING_SAVE_GROUP_AS_s Globals.StringTable[14]
#define STRING_NO_HOT_KEY Globals.StringTable[15]
#define STRING_BROWSE_EXE_FILTER Globals.StringTable[16]
#define STRING_BROWSE_ICO_FILTER Globals.StringTable[17]
#define NUMBER_OF_STRINGS 18
extern LPCSTR StringTableCz[];
extern LPCSTR StringTableDa[];
extern LPCSTR StringTableDe[];
extern LPCSTR StringTableEn[];
extern LPCSTR StringTableEs[];
extern LPCSTR StringTableFi[];
extern LPCSTR StringTableFr[];
extern LPCSTR StringTableNo[];
#if defined(WINELIB) && !defined(HAVE_WINE_CONSTRUCTOR)
VOID LIBWINE_Register_accel(void);
VOID LIBWINE_Register_Cz(void);
VOID LIBWINE_Register_Da(void);
VOID LIBWINE_Register_De(void);
VOID LIBWINE_Register_Es(void);
VOID LIBWINE_Register_En(void);
VOID LIBWINE_Register_Fi(void);
VOID LIBWINE_Register_Fr(void);
VOID LIBWINE_Register_No(void);
#endif
#endif /* !RC_INVOKED */
/* Menu */
#define PM_NEW 100
#define PM_OPEN 101
#define PM_MOVE 102
#define PM_COPY 103
#define PM_DELETE 104
#define PM_ATTRIBUTES 105
#define PM_EXECUTE 107
#define PM_EXIT 108
#define PM_AUTO_ARRANGE 200
#define PM_MIN_ON_RUN 201
#define PM_SAVE_SETTINGS 203
#define PM_OVERLAP 300
#define PM_SIDE_BY_SIDE 301
#define PM_ARRANGE 302
#define PM_FIRST_CHILD 3030
#define PM_En 400
#define PM_Es 401
#define PM_De 402
#define PM_No 403
#define PM_Fr 404
#define PM_Fi 405
#define PM_Da 406
#define PM_Cz 407
#define PM_CONTENTS 501
#define PM_SEARCH 502
#define PM_HELPONHELP 503
#define PM_TUTORIAL 504
#define PM_LICENSE 510
#define PM_NO_WARRANTY 511
#define PM_ABOUT_WINE 512
/* Dialog `New' */
/* RADIOBUTTON: The next two must be in sequence */
#define PM_NEW_GROUP 1000
#define PM_NEW_PROGRAM 1001
#define PM_NEW_GROUP_TXT 1002
#define PM_NEW_PROGRAM_TXT 1003
/* Dialogs `Copy', `Move' */
#define PM_PROGRAM 1200
#define PM_FROM_GROUP 1201
#define PM_TO_GROUP 1202
#define PM_TO_GROUP_TXT 1203
/* Dialogs `Group attributes' */
#define PM_DESCRIPTION 1500
#define PM_DESCRIPTION_TXT 1501
#define PM_FILE 1502
#define PM_FILE_TXT 1503
/* Dialogs `Program attributes' */
#define PM_COMMAND_LINE 1510
#define PM_COMMAND_LINE_TXT 1511
#define PM_DIRECTORY 1512
#define PM_DIRECTORY_TXT 1513
#define PM_HOT_KEY 1514
#define PM_HOT_KEY_TXT 1515
#define PM_ICON 1516
#define PM_OTHER_SYMBOL 1517
/* Dialog `Symbol' */
#define PM_ICON_FILE 1520
#define PM_ICON_FILE_TXT 1521
#define PM_SYMBOL_LIST 1522
#define PM_SYMBOL_LIST_TXT 1523
/* Dialog `Execute' */
#define PM_COMMAND 1600
#define PM_SYMBOL 1601
#define PM_BROWSE 1602
#define PM_HELP 1603
#endif /* PROGMAN_H */
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */