2000-12-11 00:01:33 +01:00
|
|
|
/*
|
|
|
|
* User controls definitions
|
|
|
|
*
|
|
|
|
* Copyright 2000 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2000-12-11 00:01:33 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_CONTROLS_H
|
|
|
|
#define __WINE_CONTROLS_H
|
|
|
|
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "winproc.h"
|
|
|
|
|
|
|
|
/* Built-in class names (see _Undocumented_Windows_ p.418) */
|
2003-11-18 20:42:31 +01:00
|
|
|
#define POPUPMENU_CLASS_ATOMA MAKEINTATOMA(32768) /* PopupMenu */
|
|
|
|
#define POPUPMENU_CLASS_ATOMW MAKEINTATOMW(32768) /* PopupMenu */
|
2001-10-12 20:43:27 +02:00
|
|
|
#define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
|
2003-03-28 20:40:37 +01:00
|
|
|
#define DIALOG_CLASS_ATOMA MAKEINTATOMA(32770) /* Dialog */
|
|
|
|
#define DIALOG_CLASS_ATOMW MAKEINTATOMW(32770) /* Dialog */
|
2001-10-12 20:43:27 +02:00
|
|
|
#define WINSWITCH_CLASS_ATOM MAKEINTATOMA(32771) /* WinSwitch */
|
|
|
|
#define ICONTITLE_CLASS_ATOM MAKEINTATOMA(32772) /* IconTitle */
|
2000-12-11 00:01:33 +01:00
|
|
|
|
|
|
|
/* Built-in class descriptor */
|
|
|
|
struct builtin_class_descr
|
|
|
|
{
|
2003-09-10 05:56:47 +02:00
|
|
|
LPCSTR name; /* class name */
|
|
|
|
UINT style; /* class style */
|
|
|
|
WNDPROC procA; /* ASCII window procedure */
|
|
|
|
WNDPROC procW; /* Unicode window procedure */
|
|
|
|
INT extra; /* window extra bytes */
|
|
|
|
ULONG_PTR cursor; /* cursor id */
|
|
|
|
HBRUSH brush; /* brush or system color */
|
2000-12-11 00:01:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-12-08 19:06:14 +01:00
|
|
|
/* defwnd proc */
|
|
|
|
extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType );
|
|
|
|
|
2000-12-11 00:01:33 +01:00
|
|
|
/* desktop */
|
2004-03-04 02:41:11 +01:00
|
|
|
extern BOOL DESKTOP_SetPattern( LPCWSTR pattern );
|
2000-12-11 00:01:33 +01:00
|
|
|
|
|
|
|
/* icon title */
|
2001-08-11 00:51:42 +02:00
|
|
|
extern HWND ICONTITLE_Create( HWND hwnd );
|
2000-12-11 00:01:33 +01:00
|
|
|
|
|
|
|
/* menu controls */
|
2004-09-20 23:45:45 +02:00
|
|
|
extern HWND MENU_IsMenuActive(void);
|
2000-12-11 00:01:33 +01:00
|
|
|
extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
|
|
|
|
INT orgX, INT orgY );
|
2004-12-08 19:06:14 +01:00
|
|
|
extern BOOL MENU_SetMenu(HWND, HMENU);
|
2001-08-11 00:51:42 +02:00
|
|
|
extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt );
|
2003-11-26 06:08:48 +01:00
|
|
|
extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar );
|
2000-12-11 00:01:33 +01:00
|
|
|
extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
|
|
|
|
HWND hwnd, BOOL suppress_draw );
|
|
|
|
extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget );
|
|
|
|
|
2005-01-17 21:27:11 +01:00
|
|
|
/* nonclient area */
|
|
|
|
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN clip);
|
|
|
|
extern LONG NC_HandleNCActivate( HWND hwnd, WPARAM wParam );
|
|
|
|
extern LONG NC_HandleNCCalcSize( HWND hwnd, RECT *winRect );
|
|
|
|
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT pt );
|
|
|
|
extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
|
|
|
extern LONG NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam);
|
|
|
|
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
|
|
|
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
|
|
|
extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
|
|
|
|
extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect );
|
|
|
|
|
2000-12-11 00:01:33 +01:00
|
|
|
/* scrollbar */
|
|
|
|
extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior );
|
2001-10-16 23:52:26 +02:00
|
|
|
extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
|
2001-08-11 00:51:42 +02:00
|
|
|
extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
|
2000-12-11 00:01:33 +01:00
|
|
|
int hMin, int hMax, int hPos );
|
|
|
|
|
|
|
|
/* combo box */
|
|
|
|
|
|
|
|
#define ID_CB_LISTBOX 1000
|
|
|
|
#define ID_CB_EDIT 1001
|
|
|
|
|
|
|
|
/* internal flags */
|
|
|
|
#define CBF_DROPPED 0x0001
|
|
|
|
#define CBF_BUTTONDOWN 0x0002
|
|
|
|
#define CBF_NOROLLUP 0x0004
|
|
|
|
#define CBF_MEASUREITEM 0x0008
|
|
|
|
#define CBF_FOCUSED 0x0010
|
|
|
|
#define CBF_CAPTURE 0x0020
|
|
|
|
#define CBF_EDIT 0x0040
|
|
|
|
#define CBF_NORESIZE 0x0080
|
|
|
|
#define CBF_NOTIFY 0x0100
|
|
|
|
#define CBF_NOREDRAW 0x0200
|
|
|
|
#define CBF_SELCHANGE 0x0400
|
|
|
|
#define CBF_NOEDITNOTIFY 0x1000
|
|
|
|
#define CBF_NOLBSELECT 0x2000 /* do not change current selection */
|
|
|
|
#define CBF_EUI 0x8000
|
|
|
|
|
|
|
|
/* combo state struct */
|
|
|
|
typedef struct
|
|
|
|
{
|
2001-08-11 00:51:42 +02:00
|
|
|
HWND self;
|
2000-12-11 00:01:33 +01:00
|
|
|
HWND owner;
|
|
|
|
UINT dwStyle;
|
|
|
|
HWND hWndEdit;
|
|
|
|
HWND hWndLBox;
|
|
|
|
UINT wState;
|
|
|
|
HFONT hFont;
|
|
|
|
RECT textRect;
|
|
|
|
RECT buttonRect;
|
|
|
|
RECT droppedRect;
|
|
|
|
INT droppedIndex;
|
|
|
|
INT fixedOwnerDrawHeight;
|
|
|
|
INT droppedWidth; /* last two are not used unless set */
|
|
|
|
INT editHeight; /* explicitly */
|
|
|
|
} HEADCOMBO,*LPHEADCOMBO;
|
|
|
|
|
|
|
|
extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
|
|
|
|
|
2001-09-19 22:37:04 +02:00
|
|
|
/* Dialog info structure */
|
2000-12-11 00:01:33 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
2001-09-19 22:37:04 +02:00
|
|
|
HWND hwndFocus; /* Current control with focus */
|
|
|
|
HFONT hUserFont; /* Dialog font */
|
|
|
|
HMENU hMenu; /* Dialog menu */
|
|
|
|
UINT xBaseUnit; /* Dialog units (depends on the font) */
|
|
|
|
UINT yBaseUnit;
|
|
|
|
INT idResult; /* EndDialog() result / default pushbutton ID */
|
|
|
|
UINT flags; /* EndDialog() called for this dialog */
|
|
|
|
HGLOBAL16 hDialogHeap;
|
2000-12-11 00:01:33 +01:00
|
|
|
} DIALOGINFO;
|
|
|
|
|
|
|
|
#define DF_END 0x0001
|
|
|
|
#define DF_OWNERENABLED 0x0002
|
|
|
|
|
2001-09-19 22:37:04 +02:00
|
|
|
/* offset of DIALOGINFO ptr in dialog extra bytes */
|
2005-02-15 22:51:06 +01:00
|
|
|
#define DWLP_WINE_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR))
|
2001-09-19 22:37:04 +02:00
|
|
|
|
2004-07-14 02:49:40 +02:00
|
|
|
extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create );
|
2003-03-28 20:40:37 +01:00
|
|
|
extern void DIALOG_EnableOwner( HWND hOwner );
|
|
|
|
extern BOOL DIALOG_DisableOwner( HWND hOwner );
|
|
|
|
extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner );
|
2000-12-11 00:01:33 +01:00
|
|
|
|
|
|
|
#endif /* __WINE_CONTROLS_H */
|