Get rid of nonclient.h and of the corresponding exported functions in
[wine/dcerpc.git] / dlls / user / controls.h
blob6a529384a6a1d4278c8a58de87179b97fa44864b
1 /*
2 * User controls definitions
4 * Copyright 2000 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_CONTROLS_H
22 #define __WINE_CONTROLS_H
24 #include "winuser.h"
25 #include "winproc.h"
27 /* Built-in class names (see _Undocumented_Windows_ p.418) */
28 #define POPUPMENU_CLASS_ATOMA MAKEINTATOMA(32768) /* PopupMenu */
29 #define POPUPMENU_CLASS_ATOMW MAKEINTATOMW(32768) /* PopupMenu */
30 #define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
31 #define DIALOG_CLASS_ATOMA MAKEINTATOMA(32770) /* Dialog */
32 #define DIALOG_CLASS_ATOMW MAKEINTATOMW(32770) /* Dialog */
33 #define WINSWITCH_CLASS_ATOM MAKEINTATOMA(32771) /* WinSwitch */
34 #define ICONTITLE_CLASS_ATOM MAKEINTATOMA(32772) /* IconTitle */
36 /* Built-in class descriptor */
37 struct builtin_class_descr
39 LPCSTR name; /* class name */
40 UINT style; /* class style */
41 WNDPROC procA; /* ASCII window procedure */
42 WNDPROC procW; /* Unicode window procedure */
43 INT extra; /* window extra bytes */
44 ULONG_PTR cursor; /* cursor id */
45 HBRUSH brush; /* brush or system color */
49 /* defwnd proc */
50 extern HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType );
52 /* desktop */
53 extern BOOL DESKTOP_SetPattern( LPCWSTR pattern );
55 /* icon title */
56 extern HWND ICONTITLE_Create( HWND hwnd );
58 /* menu controls */
59 extern BOOL MENU_Init(void);
60 extern HWND MENU_IsMenuActive(void);
61 extern HMENU MENU_GetSysMenu(HWND hWndOwner, HMENU hSysPopup);
62 extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
63 INT orgX, INT orgY );
64 extern BOOL MENU_SetMenu(HWND, HMENU);
65 extern void MENU_TrackMouseMenuBar( HWND hwnd, INT ht, POINT pt );
66 extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar );
67 extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
68 HWND hwnd, BOOL suppress_draw );
69 extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget );
71 /* nonclient area */
72 extern LONG NC_HandleNCPaint( HWND hwnd , HRGN clip);
73 extern LONG NC_HandleNCActivate( HWND hwnd, WPARAM wParam );
74 extern LONG NC_HandleNCCalcSize( HWND hwnd, RECT *winRect );
75 extern LONG NC_HandleNCHitTest( HWND hwnd, POINT pt );
76 extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
77 extern LONG NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam);
78 extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam );
79 extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
80 extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
81 extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect );
83 /* scrollbar */
84 extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior );
85 extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt );
86 extern INT SCROLL_SetNCSbState( HWND hwnd, int vMin, int vMax, int vPos,
87 int hMin, int hMax, int hPos );
89 /* UI tools */
90 extern HBRUSH UITOOLS_GetPattern55AABrush(void);
92 /* combo box */
94 #define ID_CB_LISTBOX 1000
95 #define ID_CB_EDIT 1001
97 /* internal flags */
98 #define CBF_DROPPED 0x0001
99 #define CBF_BUTTONDOWN 0x0002
100 #define CBF_NOROLLUP 0x0004
101 #define CBF_MEASUREITEM 0x0008
102 #define CBF_FOCUSED 0x0010
103 #define CBF_CAPTURE 0x0020
104 #define CBF_EDIT 0x0040
105 #define CBF_NORESIZE 0x0080
106 #define CBF_NOTIFY 0x0100
107 #define CBF_NOREDRAW 0x0200
108 #define CBF_SELCHANGE 0x0400
109 #define CBF_NOEDITNOTIFY 0x1000
110 #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
111 #define CBF_EUI 0x8000
113 /* combo state struct */
114 typedef struct
116 HWND self;
117 HWND owner;
118 UINT dwStyle;
119 HWND hWndEdit;
120 HWND hWndLBox;
121 UINT wState;
122 HFONT hFont;
123 RECT textRect;
124 RECT buttonRect;
125 RECT droppedRect;
126 INT droppedIndex;
127 INT fixedOwnerDrawHeight;
128 INT droppedWidth; /* last two are not used unless set */
129 INT editHeight; /* explicitly */
130 } HEADCOMBO,*LPHEADCOMBO;
132 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
134 /* Dialog info structure */
135 typedef struct
137 HWND hwndFocus; /* Current control with focus */
138 HFONT hUserFont; /* Dialog font */
139 HMENU hMenu; /* Dialog menu */
140 UINT xBaseUnit; /* Dialog units (depends on the font) */
141 UINT yBaseUnit;
142 INT idResult; /* EndDialog() result / default pushbutton ID */
143 UINT flags; /* EndDialog() called for this dialog */
144 HGLOBAL16 hDialogHeap;
145 } DIALOGINFO;
147 #define DF_END 0x0001
148 #define DF_OWNERENABLED 0x0002
150 /* offset of DIALOGINFO ptr in dialog extra bytes */
151 #define DWL_WINE_DIALOGINFO (DWL_USER+sizeof(ULONG_PTR))
153 extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create );
154 extern BOOL DIALOG_GetCharSize( HDC hdc, HFONT hFont, SIZE * pSize );
155 extern void DIALOG_EnableOwner( HWND hOwner );
156 extern BOOL DIALOG_DisableOwner( HWND hOwner );
157 extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner );
159 #endif /* __WINE_CONTROLS_H */