21#ifndef _SWELL_INTERNAL_H_
22#define _SWELL_INTERNAL_H_
40#ifdef SWELL_TARGET_OSX
44 #define SWELL_BEGIN_TRY @try {
45 #define SWELL_END_TRY(x) } @catch (NSException *ex) { NSLog(@"SWELL exception in %s:%d :: %@:%@\n",__FILE__,__LINE__,[ex name], [ex reason]); x }
47 #define SWELL_BEGIN_TRY
48 #define SWELL_END_TRY(x)
51#define __SWELL_PREFIX_CLASSNAME3(a,b) a##b
52#define __SWELL_PREFIX_CLASSNAME2(a,b) __SWELL_PREFIX_CLASSNAME3(a,b)
53#define __SWELL_PREFIX_CLASSNAME(cname) __SWELL_PREFIX_CLASSNAME2(SWELL_APP_PREFIX,cname)
56#define SWELL_hwndChild __SWELL_PREFIX_CLASSNAME(_hwnd)
57#define SWELL_hwndCarbonHost __SWELL_PREFIX_CLASSNAME(_hwndcarbonhost)
59#define SWELL_ModelessWindow __SWELL_PREFIX_CLASSNAME(_modelesswindow)
60#define SWELL_ModalDialog __SWELL_PREFIX_CLASSNAME(_dialogbox)
62#define SWELL_TextField __SWELL_PREFIX_CLASSNAME(_textfield)
63#define SWELL_ListView __SWELL_PREFIX_CLASSNAME(_listview)
64#define SWELL_TreeView __SWELL_PREFIX_CLASSNAME(_treeview)
65#define SWELL_TabView __SWELL_PREFIX_CLASSNAME(_tabview)
66#define SWELL_ProgressView __SWELL_PREFIX_CLASSNAME(_progind)
67#define SWELL_TextView __SWELL_PREFIX_CLASSNAME(_textview)
68#define SWELL_BoxView __SWELL_PREFIX_CLASSNAME(_box)
69#define SWELL_Button __SWELL_PREFIX_CLASSNAME(_button)
70#define SWELL_PopUpButton __SWELL_PREFIX_CLASSNAME(_pub)
71#define SWELL_ComboBox __SWELL_PREFIX_CLASSNAME(_cbox)
73#define SWELL_StatusCell __SWELL_PREFIX_CLASSNAME(_statuscell)
74#define SWELL_ListViewCell __SWELL_PREFIX_CLASSNAME(_listviewcell)
75#define SWELL_ODListViewCell __SWELL_PREFIX_CLASSNAME(_ODlistviewcell)
76#define SWELL_ODButtonCell __SWELL_PREFIX_CLASSNAME(_ODbuttoncell)
77#define SWELL_ImageButtonCell __SWELL_PREFIX_CLASSNAME(_imgbuttoncell)
79#define SWELL_FocusRectWnd __SWELL_PREFIX_CLASSNAME(_drawfocusrectwnd)
81#define SWELL_DataHold __SWELL_PREFIX_CLASSNAME(_sdh)
82#define SWELL_ThreadTmp __SWELL_PREFIX_CLASSNAME(_thread)
83#define SWELL_PopupMenuRecv __SWELL_PREFIX_CLASSNAME(_trackpopupmenurecv)
85#define SWELL_TimerFuncTarget __SWELL_PREFIX_CLASSNAME(_tft)
88#define SWELL_Menu __SWELL_PREFIX_CLASSNAME(_menu)
92#ifndef MAC_OS_X_VERSION_10_7
93typedef struct _NSDraggingSession NSDraggingSession;
96#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
98typedef unsigned int NSUInteger;
101@interface SWELL_Menu : NSMenu
105- (id)copyWithZone:(NSZone *)zone;
108@interface SWELL_DataHold : NSObject
113-(id) initWithVal:(
void *)val;
117@interface SWELL_TimerFuncTarget : NSObject
124-(
void)SWELL_Timer:(
id)sender;
127typedef struct OwnedWindowListRec
130 struct OwnedWindowListRec *_next;
133typedef struct WindowPropRec
137 struct WindowPropRec *_next;
142@interface SWELL_TextField : NSTextField
145 bool m_last_dark_mode;
151- (
void)setNeedsDisplayInRect:(NSRect)rect;
152- (
void)drawRect:(NSRect)rect;
153- (
void)initColors:(
int)darkmode;
154- (
void)swellDisableContextMenu:(
bool)dis;
155- (NSMenu *)textView:(NSTextView *)view menu:(NSMenu *)menu forEvent:(NSEvent *)event atIndex:(NSUInteger)charIndex;
158@interface SWELL_TabView : NSTabView
165@interface SWELL_ProgressView : NSProgressIndicator
171@interface SWELL_ListViewCell : NSTextFieldCell
174-(NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
175- (NSRect)drawingRectForBounds:(NSRect)rect;
178@interface SWELL_StatusCell : SWELL_ListViewCell
183-(
void)setStatusImage:(NSImage *)img;
184- (
void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
187@interface SWELL_TreeView : NSOutlineView
190 bool m_fakerightmouse;
192 WDL_PtrList<HTREEITEM__> *m_items;
194 NSMutableArray *m_selColors;
199-(
void)mouseDown:(NSEvent *)theEvent;
200-(
void)mouseDragged:(NSEvent *)theEvent;
201-(
void)mouseUp:(NSEvent *)theEvent;
202- (
void)rightMouseUp:(NSEvent *)theEvent;
203- (
void)highlightSelectionInClipRect:(NSRect)theClipRect;
206-(NSInteger) outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(
id)item;
207- (
BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(
id)item;
208- (id)outlineView:(NSOutlineView *)outlineView
209 child:(NSInteger)index
211- (id)outlineView:(NSOutlineView *)outlineView
212 objectValueForTableColumn:(NSTableColumn *)tableColumn
217- (
BOOL)outlineView:(NSOutlineView *)outlineView
218 writeItems:(NSArray *)items
219 toPasteboard:(NSPasteboard *)pasteboard;
220- (
BOOL)outlineView:(NSOutlineView *)outlineView
221 acceptDrop:(
id<NSDraggingInfo>)info
223 childIndex:(NSInteger)index;
224- (
void)outlineView:(NSOutlineView *)outlineView
225 draggingSession:(NSDraggingSession *)session
226 endedAtPoint:(NSPoint)screenPoint
227 operation:(NSDragOperation)operation;
228- (
void)outlineView:(NSOutlineView *)outlineView
229 draggingSession:(NSDraggingSession *)session
230 willBeginAtPoint:(NSPoint)screenPoint
231 forItems:(NSArray *)draggedItems;
232- (NSDragOperation)outlineView:(NSOutlineView *)outlineView
233 validateDrop:(
id<NSDraggingInfo>)info
234 proposedItem:(
id)item
235 proposedChildIndex:(NSInteger)index;
239@interface SWELL_ListView : NSTableView
241 int m_leftmousemovecnt;
242 bool m_fakerightmouse;
248 int m_start_item_clickmode;
251 WDL_PtrList<SWELL_ListView_Row> *m_items;
252 WDL_PtrList<NSTableColumn> *m_cols;
253 WDL_PtrList<HGDIOBJ__> *m_status_imagelist;
254 int m_status_imagelist_type;
257 NSMutableArray *m_selColors;
260 int m_last_plainly_clicked_item, m_last_shift_clicked_item;
265-(
int)getSwellNotificationMode;
266-(
void)setSwellNotificationMode:(
int)lbMode;
267-(NSInteger)columnAtPoint:(NSPoint)pt;
268-(
int)getColumnPos:(
int)idx;
269-(
int)getColumnIdx:(
int)pos;
271-(
BOOL)accessibilityPerformShowMenu;
274@interface SWELL_ImageButtonCell : NSButtonCell
277- (NSRect)drawTitle:(NSAttributedString *)title withFrame:(NSRect)frame inView:(NSView *)controlView;
280@interface SWELL_ODButtonCell : NSButtonCell
285@interface SWELL_ODListViewCell : NSCell
287 SWELL_ListView *m_ownctl;
290-(
void)setOwnerControl:(SWELL_ListView *)t;
291-(
void)setItemIdx:(
int)idx;
294@interface SWELL_Button : NSButton
296 void *m_swellGDIimage;
300-(
int)swellGetRadioFlags;
301-(
void)swellSetRadioFlags:(
int)f;
304-(
void)setSwellGDIImage:(
void *)par;
305-(
void *)getSwellGDIImage;
308@interface SWELL_TextView : NSTextView
315-(
void) setTag:(NSInteger)tag;
316- (
void)swellDisableContextMenu:(
bool)dis;
317- (bool)swellWantsContextMenu;
320@interface SWELL_BoxView : NSBox
327-(
void) setTag:(NSInteger)tag;
328-(
void) drawRect:(NSRect)r;
329-(
int) swellIsEtchBox;
332@interface SWELL_FocusRectWnd : NSView
337@interface SWELL_ThreadTmp : NSObject
347@interface SWELL_hwndChild : NSView
356 int m_isfakerightmouse;
357 char m_hashaddestroy;
360 bool m_supports_ddrop;
361 bool m_paintctx_used;
363 WindowPropRec *m_props;
364 NSRect m_paintctx_rect;
366 char m_titlestr[1024];
367 unsigned int m_create_windowflags;
368 NSOpenGLContext *m_glctx;
370 char m_allow_nomiddleman;
371 id m_lastTopLevelOwner;
372 id m_access_cacheptrs[6];
373 const char *m_classname;
379 char m_metal_dc_dirty;
380 char m_metal_gravity;
383 bool m_metal_in_needref_list;
384 RECT m_metal_in_needref_rect;
385 NSRect m_metal_lastframe;
388 id m_metal_pipelineState;
389 id m_metal_commandQueue;
392 DWORD m_metal_device_lastchkt;
397-(
HANDLE)swellExtendedDragOp:(
id <NSDraggingInfo>)sender retGlob:(
BOOL)retG;
398- (
const char *)onSwellGetText;
400-(
LONG)swellGetExtendedStyle;
401-(
void)swellSetExtendedStyle:(
LONG)st;
403-(
BOOL)swellHasBeenDestroyed;
407-(
void)setOpaque:(
bool)isOpaque;
408-(
LPARAM)getSwellExtraData:(
int)idx;
409-(
void)setSwellExtraData:(
int)idx value:(
LPARAM)val;
415- (NSArray*) namesOfPromisedFilesDroppedAtDestination:(NSURL*)droplocation;
418- (
int)swellCapChangeNotify;
419-(
unsigned int)swellCreateWindowFlags;
421-(bool)swellCanPostMessage;
423-(
void *)swellGetProp:(
const char *)name wantRemove:(
BOOL)rem;
424-(
int)swellSetProp:(
const char *)name value:(
void *)val ;
425-(NSOpenGLContext *)swellGetGLContext;
426- (
void) setEnabledSwellNoFocus;
427-(
const char *)getSwellClass;
433- (id)accessibilityAttributeValue:(NSString *)attribute;
447- (
BOOL)accessibilityIsIgnored;
450- (id)accessibilityHitTest:(NSPoint)point;
453- (id)accessibilityFocusedUIElement;
455-(
void) swellOnControlDoubleClick:(
id)sender;
457#ifdef MAC_OS_X_VERSION_10_8
459-(
void) onSwellCommand0:(
id)sender;
460-(
void) onSwellCommand2:(
id)sender;
461-(
void) onSwellCommand3:(
id)sender;
462-(
void) onSwellCommand4:(
id)sender;
463-(
void) onSwellCommand5:(
id)sender;
464-(
void) onSwellCommand6:(
id)sender;
465-(
void) onSwellCommand7:(
id)sender;
468-(
BOOL) swellWantsMetal;
472@interface SWELL_ModelessWindow : NSWindow
475 NSSize lastFrameSize;
477 OwnedWindowListRec *m_ownedwnds;
480 bool m_wantInitialKeyWindowOnShow;
483- (id)initModelessForChild:(
HWND)child owner:(
HWND)owner styleMask:(
unsigned int)smask;
484- (
void)keyDown:(NSEvent *)event;
485- (
void)swellDestroyAllOwnedWindows;
486- (
void)swellRemoveOwnedWindow:(NSWindow *)wnd;
487- (
void)swellAddOwnedWindow:(NSWindow*)wnd;
488- (
void)swellSetOwner:(
id)owner;
490- (
void **)swellGetOwnerWindowHead;
491-(
void)swellDoDestroyStuff;
492-(
void)swellResetOwnedWindowLevels;
494-(
void)toggleFullScreen:(
id)sender;
497@interface SWELL_ModalDialog : NSPanel
499 NSSize lastFrameSize;
501 OwnedWindowListRec *m_ownedwnds;
508- (
void)swellDestroyAllOwnedWindows;
509- (
void)swellRemoveOwnedWindow:(NSWindow *)wnd;
510- (
void)swellAddOwnedWindow:(NSWindow*)wnd;
511- (
void)swellSetOwner:(
id)owner;
513- (
void **)swellGetOwnerWindowHead;
514-(
void)swellDoDestroyStuff;
516-(
void)swellSetModalRetVal:(
int)r;
517-(
int)swellGetModalRetVal;
518-(bool)swellHasModalRetVal;
521#ifndef SWELL_NO_METAL
522void swell_removeMetalDirty(SWELL_hwndChild *slf);
523void swell_updateAllMetalDirty(
void);
524void swell_addMetalDirty(SWELL_hwndChild *slf,
const RECT *
r,
bool isReleaseDC=
false);
525HDC SWELL_CreateMetalDC(SWELL_hwndChild *);
529@interface SWELL_hwndCarbonHost : SWELL_hwndChild
530#ifdef MAC_OS_X_VERSION_10_7
537 bool m_whileresizing;
542-(
BOOL)swellIsCarbonHostingView;
547@interface SWELL_PopupMenuRecv : NSObject
552-(id) initWithWnd:(
HWND)wnd;
553-(
void) onSwellCommand:(
id)sender;
555- (
void)menuNeedsUpdate:(NSMenu *)menu;
559@interface SWELL_PopUpButton : NSPopUpButton
567@interface SWELL_ComboBox : NSComboBox
571 WDL_PtrList<char> *m_ids;
579- (
void)swellDisableContextMenu:(
bool)dis;
580- (NSMenu *)textView:(NSTextView *)view menu:(NSMenu *)menu forEvent:(NSEvent *)event atIndex:(NSUInteger)charIndex;
587#ifndef __AVAILABILITYMACROS__
588#error __AVAILABILITYMACROS__ not defined, include AvailabilityMacros.h!
592#ifndef MAC_OS_X_VERSION_10_5
594 #define SWELL_NO_CORETEXT
595 #define SWELL_ATSUI_TEXT_SUPPORT
596#elif !defined(__LP64__)
597 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
598 #ifndef MAC_OS_X_VERSION_10_9
599 #define SWELL_ATSUI_TEXT_SUPPORT
604#ifndef MAC_OS_X_VERSION_10_11
606 #define SWELL_NO_METAL
621 NSMutableDictionary *__old_fontdict;
624 ATSUStyle atsui_font_style;
643 NSColor *__old_nstextcol;
654 CGColorRef curtextcol;
662#define SWELL_DelegateExtensions __SWELL_PREFIX_CLASSNAME(_delext)
663#define SWELL_ViewExtensions __SWELL_PREFIX_CLASSNAME(_viewext)
664#define SWELL_AppExtensions __SWELL_PREFIX_CLASSNAME(_appext)
665#define SWELL_WindowExtensions __SWELL_PREFIX_CLASSNAME(_wndext)
666#define SWELL_TableColumnExtensions __SWELL_PREFIX_CLASSNAME(_tcolext)
668@interface SWELL_WindowExtensions : NSWindow
669-(
void)setCollectionBehavior:(NSUInteger)a;
671@interface SWELL_ViewExtensions : NSView
672-(
void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(
BOOL)vr rectIsVisibleRectForView:(NSView*)v topView:(NSView *)v2;
675@interface SWELL_DelegateExtensions : NSObject
676-(bool)swellPostMessage:(
HWND)dest msg:(
int)message wp:(
WPARAM)wParam lp:(
LPARAM)lParam;
677-(
void)swellPostMessageClearQ:(
HWND)dest;
678-(
void)swellPostMessageTick:(
id)sender;
681@interface SWELL_AppExtensions : NSApplication
682-(NSUInteger)presentationOptions;
683-(
void)setPresentationOptions:(NSUInteger)o;
685@interface SWELL_TableColumnExtensions : NSTableColumn
695 struct SWELL_DataHold;
699#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
701 typedef double CGFloat;
703 typedef float CGFloat;
709#define NSPOINT_TO_INTS(pt) (int)floor((pt).x+0.5), (int)floor((pt).y+0.5)
714 p->x = (
int)floor(pt.x+0.5);
715 p->y = (
int)floor((pt).
y+0.5);
719 r->left=(
int)floor(tr.origin.x+0.5);
720 r->right=(
int)floor(tr.origin.x+tr.size.width+0.5);
721 r->top=(
int)floor(tr.origin.y+0.5);
722 r->bottom=(
int)floor(tr.origin.y+tr.size.height+0.5);
727#ifdef SWELL_IMPLEMENT_GETOSXVERSION
729SWELL_IMPLEMENT_GETOSXVERSION
int SWELL_GetOSXVersion()
734 if (NSAppKitVersionNumber >= 1266.0)
736 if (NSAppKitVersionNumber >= 2100.0)
738 else if (NSAppKitVersionNumber >= 2022.0)
740 else if (NSAppKitVersionNumber >= 1894.0)
742 else if (NSAppKitVersionNumber >= 1639.10)
744 else if (NSAppKitVersionNumber >= 1560)
746 else if (NSAppKitVersionNumber >= 1404.0)
754 Gestalt(gestaltSystemVersion,&
a);
764#elif defined(SWELL_TARGET_GDK)
767#ifdef SWELL_SUPPORT_GTK
772#include <gdk/gdkkeysyms.h>
787#ifdef SWELL_TARGET_OSX
788 SWELL_DataHold *m_dh;
800#ifndef SWELL_TARGET_OSX
812#ifdef SWELL_TARGET_GDK
866 bool m_child_invalidated;
914 bool dirty_rect_valid;
972#define VALIDATE_HWND_LIST(list, par) do { } while (0)
994#ifndef SWELL_EXTRA_MINIMAL
1075#ifdef SWELL_INTERNAL_HTREEITEM_IMPL
1082#ifdef SWELL_TARGET_OSX
1083 m_dh = [[SWELL_DataHold alloc] initWithVal:this];
1092#ifdef SWELL_TARGET_OSX
1095 m_dh->m_data =
NULL;
1107 if (parOut) *parOut=
this;
1108 if (idxOut) *idxOut=
a;
1113 for (
x = 0;
x <
n;
x ++)
1115 if (m_children.Get(
x)->FindItem(it,parOut,idxOut))
return true;
1122#ifdef SWELL_INTERNAL_MERGESORT_IMPL
1124static int __listview_sortfunc(
void *p1,
void *p2,
int (*compar)(
LPARAM val1,
LPARAM val2,
LPARAM userval),
LPARAM userval)
1128 return compar(
a->m_param,
b->m_param,userval);
1132static void __listview_mergesort_internal(
void *base,
size_t nmemb,
size_t size,
1140 if (nmemb < 2)
return;
1145 b2 = b1 + (n1 *
size);
1149 __listview_mergesort_internal(b1, n1,
size, compar,
parm, tmpspace);
1150 __listview_mergesort_internal(b2, n2,
size, compar,
parm, tmpspace);
1157 if (__listview_sortfunc(b1, b2, compar,
parm) > 0)
1171 while (n1 > 0 && n2 > 0);
1180#ifndef SWELL_TARGET_OSX
1182#define SWELL_GENERIC_THEMESIZEDEFS(f,fd) \
1183 f(default_font_size, 12) \
1184 f(menubar_height, 17) \
1185 f(menubar_font_size, 13) \
1186 f(menubar_spacing_width, 8) \
1187 f(menubar_margin_width, 6) \
1188 f(scrollbar_width, 14) \
1189 f(smscrollbar_width, 16) \
1190 f(scrollbar_min_thumb_height, 4) \
1191 f(combo_height, 20) \
1194#define SWELL_GENERIC_THEMEDEFS(f,fd) \
1195 SWELL_GENERIC_THEMESIZEDEFS(f,fd) \
1196 f(_3dface,RGB(192,192,192)) \
1197 f(_3dshadow,RGB(96,96,96)) \
1198 f(_3dhilight,RGB(224,224,224)) \
1199 f(_3ddkshadow,RGB(48,48,48)) \
1200 fd(button_bg,RGB(192,192,192),_3dface) \
1201 f(button_text,RGB(0,0,0)) \
1202 f(button_text_disabled, RGB(128,128,128)) \
1203 fd(button_shadow, RGB(96,96,96), _3dshadow) \
1204 fd(button_hilight, RGB(224,224,224), _3dhilight) \
1205 f(checkbox_text,RGB(0,0,0)) \
1206 f(checkbox_text_disabled, RGB(128,128,128)) \
1207 f(checkbox_fg, RGB(0,0,0)) \
1208 f(checkbox_inter, RGB(192,192,192)) \
1209 f(checkbox_bg, RGB(255,255,255)) \
1210 f(scrollbar,RGB(32,32,32)) \
1211 f(scrollbar_fg, RGB(160,160,160)) \
1212 f(scrollbar_bg, RGB(224,224,224)) \
1213 f(edit_cursor,RGB(0,128,255)) \
1214 f(edit_bg,RGB(255,255,255)) \
1215 f(edit_bg_disabled,RGB(224,224,224)) \
1216 f(edit_text,RGB(0,0,0)) \
1217 f(edit_text_disabled, RGB(128,128,128)) \
1218 f(edit_bg_sel,RGB(128,192,255)) \
1219 f(edit_text_sel,RGB(255,255,255)) \
1220 fd(edit_hilight, RGB(224,224,224), _3dhilight) \
1221 fd(edit_shadow, RGB(96,96,96), _3dshadow) \
1222 f(info_bk,RGB(255,240,200)) \
1223 f(info_text,RGB(0,0,0)) \
1224 fd(menu_bg, RGB(192,192,192), _3dface) \
1225 fd(menu_shadow, RGB(96,96,96), _3dshadow) \
1226 fd(menu_hilight, RGB(224,224,224), _3dhilight) \
1227 fd(menu_text, RGB(0,0,0), button_text) \
1228 fd(menu_text_disabled, RGB(224,224,224), _3dhilight) \
1229 fd(menu_bg_sel, RGB(0,0,0), menu_text) \
1230 fd(menu_text_sel, RGB(224,224,224), menu_bg) \
1231 f(menu_scroll, RGB(64,64,64)) \
1232 fd(menu_scroll_arrow, RGB(96,96,96), _3dshadow) \
1233 fd(menu_submenu_arrow, RGB(96,96,96), menu_text) \
1234 fd(menu_submenu_arrow_sel, RGB(96,96,96), menu_bg) \
1235 fd(menubar_bg, RGB(192,192,192), menu_bg) \
1236 fd(menubar_bg_inactive, RGB(192,192,192), menubar_bg) \
1237 fd(menubar_text, RGB(0,0,0), menu_text) \
1238 fd(menubar_text_inactive, RGB(0,0,0), menubar_text) \
1239 fd(menubar_text_disabled, RGB(224,224,224), menu_text_disabled) \
1240 fd(menubar_bg_sel, RGB(0,0,0), menu_bg_sel) \
1241 fd(menubar_text_sel, RGB(224,224,224), menu_text_sel) \
1242 f(trackbar_track, RGB(224,224,224)) \
1243 f(trackbar_mark, RGB(96,96,96)) \
1244 f(trackbar_knob, RGB(48,48,48)) \
1245 f(progress,RGB(0,128,255)) \
1246 fd(label_text, RGB(0,0,0), button_text) \
1247 fd(label_text_disabled, RGB(128,128,128), button_text_disabled) \
1248 fd(combo_text, RGB(0,0,0), button_text) \
1249 fd(combo_text_disabled, RGB(128,128,128), button_text_disabled) \
1250 fd(combo_bg, RGB(192,192,192), _3dface) \
1251 f(combo_bg2, RGB(255,255,255)) \
1252 fd(combo_shadow, RGB(96,96,96), _3dshadow) \
1253 fd(combo_hilight, RGB(224,224,224), _3dhilight) \
1254 fd(combo_arrow, RGB(96,96,96), _3dshadow) \
1255 fd(combo_arrow_press, RGB(224,224,224), _3dhilight) \
1256 f(listview_bg, RGB(255,255,255)) \
1257 f(listview_bg_sel, RGB(128,128, 255)) \
1258 f(listview_text, RGB(0,0,0)) \
1259 fd(listview_text_sel, RGB(255,255,255), listview_text) \
1260 fd(listview_bg_sel_inactive, RGB(200,200,200), listview_bg_sel) \
1261 fd(listview_text_sel_inactive, RGB(0,0,0), listview_text_sel) \
1262 fd(listview_grid, RGB(224,224,224), _3dhilight) \
1263 f(listview_hdr_arrow,RGB(96,96,96)) \
1264 fd(listview_shadow, RGB(96,96,96), _3dshadow) \
1265 fd(listview_hilight, RGB(224,224,224), _3dhilight) \
1266 fd(listview_hdr_shadow, RGB(96,96,96), _3dshadow) \
1267 fd(listview_hdr_hilight, RGB(224,224,224), _3dhilight) \
1268 fd(listview_hdr_bg, RGB(192,192,192), _3dface) \
1269 fd(listview_hdr_text, RGB(0,0,0), button_text) \
1270 f(treeview_text,RGB( 0,0,0)) \
1271 f(treeview_bg, RGB(255,255,255)) \
1272 f(treeview_bg_sel, RGB(128,128,255)) \
1273 f(treeview_text_sel, RGB(255,255,255)) \
1274 fd(treeview_bg_sel_inactive, RGB(200,200,200), treeview_bg_sel) \
1275 fd(treeview_text_sel_inactive, RGB(0,0,0), treeview_text_sel) \
1276 f(treeview_arrow, RGB(96,96,96)) \
1277 fd(treeview_shadow, RGB(96,96,96), _3dshadow) \
1278 fd(treeview_hilight, RGB(224,224,224), _3dhilight) \
1279 fd(tab_shadow, RGB(96,96,96), _3dshadow) \
1280 fd(tab_hilight, RGB(224,224,224), _3dhilight) \
1281 fd(tab_text, RGB(0,0,0), button_text) \
1282 f(focusrect,RGB(255,0,0)) \
1283 f(group_text,RGB(0,0,0)) \
1284 fd(group_shadow, RGB(96,96,96), _3dshadow) \
1285 fd(group_hilight, RGB(224,224,224), _3dhilight) \
1286 f(focus_hilight, RGB(140,190,233)) \
1291#define __def_theme_ent(x,c) int x;
1292#define __def_theme_ent_fb(x,c,fb) int x;
1294#undef __def_theme_ent
1295#undef __def_theme_ent_fb
1298#define SWELL_UI_SCALE(x) (((x)*g_swell_ui_scale)/256)
1310 if (!thisext || *thisext !=
'.' || !
extlist)
return -1;
1311 int txlen = (
int)strlen(thisext), witem = 0;
uint8_t a
Definition Spc_Cpu.h:141
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
Definition swell-internal.h:27
LPARAM m_param
Definition swell-internal.h:33
~SWELL_ListView_Row()
Definition swell-internal.h:30
int m_imageidx
Definition swell-internal.h:34
int m_tmp
Definition swell-internal.h:35
SWELL_ListView_Row()
Definition swell-internal.h:29
WDL_PtrList< char > m_vals
Definition swell-internal.h:31
Definition assocarray.h:376
UINT_D64 w
Definition inflate.c:942
int y
Definition inflate.c:1588
unsigned v[N_MAX]
Definition inflate.c:1584
unsigned x[BMAX+1]
Definition inflate.c:1586
unsigned f
Definition inflate.c:1572
static const char * name
Definition pugl.h:1582
JSAMPIMAGE data
Definition jpeglib.h:945
const char * msg
Definition missing_descriptor.c:20
Definition swell-internal.h:908
int cur_text_color_int
Definition swell-internal.h:923
struct HDC__ * _next
Definition swell-internal.h:929
float lastpos_x
Definition swell-internal.h:927
void * ownedData
Definition swell-internal.h:916
HGDIOBJ__ * curfont
Definition swell-internal.h:921
int curbkcol
Definition swell-internal.h:925
float lastpos_y
Definition swell-internal.h:927
bool _infreelist
Definition swell-internal.h:930
HGDIOBJ__ * curpen
Definition swell-internal.h:919
int curbkmode
Definition swell-internal.h:926
HGDIOBJ__ * curbrush
Definition swell-internal.h:920
Definition swell-internal.h:893
float alpha
Definition swell-internal.h:900
int color
Definition swell-internal.h:897
struct HGDIOBJ__ * _next
Definition swell-internal.h:902
int wid
Definition swell-internal.h:898
void * typedata
Definition swell-internal.h:904
bool _infreelist
Definition swell-internal.h:903
int type
Definition swell-internal.h:894
int additional_refcnt
Definition swell-internal.h:895
WDL_PtrList< MENUITEMINFO > items
Definition swell-internal.h:880
HMENU__()
Definition swell-internal.h:875
~HMENU__()
Definition swell-internal.h:888
void Release()
Definition swell-internal.h:878
int m_refcnt
Definition swell-internal.h:882
void Retain()
Definition swell-internal.h:877
int sel_vis
Definition swell-internal.h:881
HMENU__ * Duplicate()
Definition swell-menu-generic.cpp:40
static void freeMenuItem(void *p)
Definition swell-menu-generic.cpp:58
Definition swell-internal.h:782
WDL_PtrList< HTREEITEM__ > m_children
Definition swell-internal.h:795
bool FindItem(HTREEITEM it, HTREEITEM__ **parOut, int *idxOut)
LPARAM m_param
Definition swell-internal.h:796
bool m_haschildren
Definition swell-internal.h:793
char * m_value
Definition swell-internal.h:794
int m_state
Definition swell-internal.h:790
SWELL_OSWINDOW m_oswindow
Definition swell-internal.h:830
int m_style
Definition swell-internal.h:839
void Release()
Definition swell-internal.h:826
bool m_israised
Definition swell-internal.h:851
void Retain()
Definition swell-internal.h:825
DLGPROC m_dlgproc
Definition swell-internal.h:842
int m_oswindow_private
Definition swell-internal.h:856
UINT m_id
Definition swell-internal.h:838
int m_exstyle
Definition swell-internal.h:839
bool m_wantfocus
Definition swell-internal.h:849
~HWND__()
Definition swell-wnd-generic.cpp:136
HWND__(HWND par, int wID=0, const RECT *wndr=NULL, const char *label=NULL, bool visible=false, WNDPROC wndproc=NULL, DLGPROC dlgproc=NULL, HWND ownerWindow=NULL)
Definition swell-wnd-generic.cpp:87
HWND__ * m_children
Definition swell-internal.h:834
int m_refcnt
Definition swell-internal.h:855
HWND__ * m_focused_child
Definition swell-internal.h:836
HWND__ * m_next
Definition swell-internal.h:834
int m_oswindow_fullscreen
Definition swell-internal.h:853
HWND__ * m_owned_next
Definition swell-internal.h:835
INT_PTR m_userdata
Definition swell-internal.h:840
bool m_visible
Definition swell-internal.h:846
HWND__ * m_parent
Definition swell-internal.h:834
RECT m_position
Definition swell-internal.h:837
bool m_enabled
Definition swell-internal.h:848
HMENU m_menu
Definition swell-internal.h:858
WDL_StringKeyedArray< void * > m_props
Definition swell-internal.h:861
INT_PTR m_extra[64]
Definition swell-internal.h:843
bool m_has_had_position
Definition swell-internal.h:852
char m_hashaddestroy
Definition swell-internal.h:847
const char * m_classname
Definition swell-internal.h:828
HWND__ * m_owned_prev
Definition swell-internal.h:835
HWND__ * m_owned_list
Definition swell-internal.h:835
INT_PTR m_private_data
Definition swell-internal.h:844
WDL_FastString m_title
Definition swell-internal.h:832
HWND__ * m_prev
Definition swell-internal.h:834
HWND__ * m_owner
Definition swell-internal.h:835
HFONT m_font
Definition swell-internal.h:859
WNDPROC m_wndproc
Definition swell-internal.h:841
Definition swell-types.h:535
Definition swell-types.h:218
Definition swell-types.h:231
Definition swell-dlggen.h:193
Definition swell-internal.h:987
void * instptr
Definition swell-internal.h:988
void * lastSymbolRequested
Definition swell-internal.h:998
int refcnt
Definition swell-internal.h:992
BOOL(* dllMain)(HINSTANCE, DWORD, LPVOID)
Definition swell-internal.h:996
int(* SWELL_dllMain)(HINSTANCE, DWORD, LPVOID)
Definition swell-internal.h:995
Definition swell-internal.h:1290
void DWORD DWORD LPVOID parm
Definition swell-functions.h:807
RECT const char void HWND hwnd
Definition swell-functions.h:1066
const char const char const char const char * extlist
Definition swell-functions.h:167
swell_colortheme g_swell_ctheme
Definition swell-gdi-generic.cpp:34
#define __def_theme_ent(x, c)
const char * g_swell_deffont_face
Definition swell-gdi-generic.cpp:31
int g_swell_ui_scale
Definition swell-gdi-generic.cpp:60
#define __def_theme_ent_fb(x, c, fb)
HWND swell_captured_window
Definition swell-wnd-generic.cpp:47
static WDL_STATICFUNC_UNUSED int ext_valid_for_extlist(const char *thisext, const char *extlist)
Definition swell-internal.h:1308
void swell_oswindow_update_enable(HWND hwnd)
Definition swell-generic-headless.cpp:107
void swell_oswindow_invalidate(HWND hwnd, const RECT *r)
Definition swell-generic-headless.cpp:149
bool swell_is_likely_capslock
Definition swell-wnd-generic.cpp:45
int swell_is_app_inactive()
Definition swell-generic-headless.cpp:313
HWND GetFocusIncludeMenus()
Definition swell-wnd-generic.cpp:561
void swell_oswindow_update_style(HWND hwnd, LONG oldstyle)
Definition swell-generic-headless.cpp:103
HWND swell_oswindow_to_hwnd(SWELL_OSWINDOW w)
Definition swell-wnd-generic.cpp:57
const char * g_swell_appname
Definition swell.cpp:1089
LRESULT SwellDialogDefaultWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition swell-wnd-generic.cpp:6999
void * SWELL_OSWINDOW
Definition swell-internal.h:815
bool swell_isOSwindowmenu(SWELL_OSWINDOW osw)
Definition swell-menu-generic.cpp:392
void SWELL_RunEvents()
Definition swell-generic-headless.cpp:98
bool IsRightClickEmulateEnabled()
Definition swell-misc-generic.cpp:31
HDC SWELL_CreateGfxContext(void *)
Definition swell-gdi-generic.cpp:74
void swell_oswindow_postresize(HWND hwnd, RECT f)
Definition swell-generic-headless.cpp:148
HWND swell_window_wants_all_input()
Definition swell-wnd-generic.cpp:7162
void swell_oswindow_manage(HWND hwnd, bool wantfocus)
Definition swell-generic-headless.cpp:78
int swell_delegate_menu_message(HWND src, LPARAM lParam, int msg, bool screencoords)
Definition swell-menu-generic.cpp:359
void swell_oswindow_update_text(HWND hwnd)
Definition swell-generic-headless.cpp:46
@ INTERNAL_OBJECT_START
Definition swell-internal.h:1004
@ INTERNAL_OBJECT_THREAD
Definition swell-internal.h:1005
@ INTERNAL_OBJECT_SOCKETEVENT
Definition swell-internal.h:1009
@ INTERNAL_OBJECT_PID
Definition swell-internal.h:1011
@ INTERNAL_OBJECT_NSTASK
Definition swell-internal.h:1010
@ INTERNAL_OBJECT_EXTERNALSOCKET
Definition swell-internal.h:1008
@ INTERNAL_OBJECT_END
Definition swell-internal.h:1012
@ INTERNAL_OBJECT_EVENT
Definition swell-internal.h:1006
@ INTERNAL_OBJECT_FILE
Definition swell-internal.h:1007
HWND SWELL_topwindows
Definition swell-wnd-generic.cpp:56
void swell_on_toplevel_raise(SWELL_OSWINDOW wnd)
Definition swell-wnd-generic.cpp:65
#define VALIDATE_HWND_LIST(list, par)
Definition swell-internal.h:972
void swell_oswindow_destroy(HWND hwnd)
Definition swell-generic-headless.cpp:34
SWELL_OSWINDOW SWELL_focused_oswindow
Definition swell-wnd-generic.cpp:46
void swell_scaling_init(bool no_auto_hidpi)
void swell_oswindow_focus(HWND hwnd)
Definition swell-generic-headless.cpp:52
HWND DialogBoxIsActive(void)
Definition swell-dlg-generic.cpp:72
void swell_oswindow_resize(SWELL_OSWINDOW wnd, int reposflag, RECT f)
Definition swell-generic-headless.cpp:147
#define SWELL_GENERIC_THEMEDEFS(f, fd)
Definition swell-internal.h:1194
bool DestroyPopupMenus(void)
Definition swell-menu-generic.cpp:1193
void swell_oswindow_begin_resize(SWELL_OSWINDOW wnd)
Definition swell-generic-headless.cpp:146
void swell_oswindow_updatetoscreen(HWND hwnd, RECT *rect)
Definition swell-generic-headless.cpp:74
void swell_dlg_destroyspare()
Definition swell-dlg-generic.cpp:88
HFONT SWELL_GetDefaultFont(void)
Definition swell-gdi-generic.cpp:154
HWND ChildWindowFromPoint(HWND h, POINT p)
Definition swell-wnd-generic.cpp:6761
void * HINSTANCE
Definition swell-types.h:212
uintptr_t UINT_PTR
Definition swell-types.h:43
LONG_PTR LRESULT
Definition swell-types.h:171
unsigned int UINT
Definition swell-types.h:166
LONG_PTR LPARAM
Definition swell-types.h:170
signed char BOOL
Definition swell-types.h:160
intptr_t INT_PTR
Definition swell-types.h:42
intptr_t LONG_PTR
Definition swell-types.h:42
unsigned int DWORD
Definition swell-types.h:164
#define strnicmp(x, y, z)
Definition swell-types.h:71
ULONG_PTR WPARAM
Definition swell-types.h:169
LRESULT(* WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition swell-types.h:587
struct HGDIOBJ__ * HFONT
Definition swell-types.h:272
struct HTREEITEM__ * HTREEITEM
Definition swell-types.h:418
struct HMENU__ * HMENU
Definition swell-types.h:211
void(* TIMERPROC)(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
Definition swell-types.h:215
signed int LONG
Definition swell-types.h:182
BOOL(* PROPENUMPROCEX)(HWND hwnd, const char *lpszString, HANDLE hData, LPARAM lParam)
Definition swell-types.h:639
void * HANDLE
Definition swell-types.h:212
void * LPVOID
Definition swell-types.h:174
struct HWND__ * HWND
Definition swell-types.h:210
struct HDC__ * HDC
Definition swell-types.h:263
INT_PTR(* DLGPROC)(HWND, UINT, WPARAM, LPARAM)
Definition swell-types.h:586
int n
Definition crypt.c:458
uch * p
Definition crypt.c:594
memcpy(hh, h, RAND_HEAD_LEN)
int r
Definition crypt.c:458
uch h[RAND_HEAD_LEN]
Definition crypt.c:459
typedef int(UZ_EXP MsgFn)()
#define void
Definition unzip.h:396
#define WDL_STATICFUNC_UNUSED
Definition wdltypes.h:87
#define const
Definition zconf.h:137