March 29, 2024

Dynamic Windows Constants

API Constants

HWND_DESKTOP(HWND)0Constant representing the desktop window handle
DW_DESKTOP(HWND)0Constant which refers to the desktop window handle, this is the same as HWND_DESKTOP.
 
Button Mask

DW_BUTTON1_MASKValue passed to mouse related callbacks when the first (left) mouse button is pressed.
DW_BUTTON2_MASKValue passed to mouse related callbacks when the second(right) mouse button is pressed.
DW_BUTTON3_MASKValue passed to mouse related callbacks when the third (middle) mouse button is pressed.
 
Button Style

DW_BS_NOBORDERButton has no border on platforms that support it
 
Color

DW_CLR_BLACKBlack color constant
DW_CLR_DARKREDDark red color constant
DW_CLR_DARKGREENDark green color constant
DW_CLR_BROWNBrown color constant
DW_CLR_DARKBLUEDark blue color constant
DW_CLR_DARKPINKDark pink color constant
DW_CLR_DARKCYANDark cyan color constant
DW_CLR_PALEGRAYPale gray color constant
DW_CLR_DARKGRAYDark gray color constant
DW_CLR_REDRed color constant
DW_CLR_GREENGreen color constant
DW_CLR_YELLOWYellow color constant
DW_CLR_BLUEBlue color constant
DW_CLR_PINKPink color constant
DW_CLR_CYANCyan color constant
DW_CLR_WHITEWhite color constant
DW_CLR_DEFAULTSystem default color constant
 
Container Column Flags

DW_CFA_BITMAPORICONContainer column contains an image
DW_CFA_STRINGContainer column contains a string
DW_CFA_ULONGContainer column contains an integer value
DW_CFA_TIMEContainer column contains a time
DW_CFA_DATEContainer column contains a date
DW_CFA_CENTERContainer column is center aligned
DW_CFA_LEFTContainer column is left aligned
DW_CFA_RIGHTContainer column is right aligned
DW_CFA_SEPARATORColumn has a separator on platforms that support it
DW_CFA_STRINGANDICONColumn has both a string and an image on platforms that support it
 
Container Mode

DW_CONTAINER_MODE_DEFAULT0The default single column mode. (mobile only)
DW_CONTAINER_MODE_EXTRA1The mode which shows extra columns on a second line. (mobile only)
DW_CONTAINER_MODE_FULL2The full mode with a line for each column. (mobile only)
 
Container Row Flags

DW_CRA_SELECTEDContainer selected row(s)
DW_CRA_CURSOREDContainer row with the cursor
 
Dark Mode

DW_DARK_MODE_DISABLED0Passed to dw_feature_set() to disable dark mode; since 3.1.
DW_DARK_MODE_BASIC1Passed to dw_feature_set() to enable basic Dark Mode on Windows 10. Same as DW_DARK_MODE_FULL on Mac; since 3.1.
DW_DARK_MODE_FULL2Passed to dw_feature_set() to enable full Dark Mode on Windows 10. Same as DW_DARK_MODE_BASIC on Mac; since 3.1.
DW_DARK_MODE_FORCED3Passed to dw_feature_set() to force Dark Mode on regardless of system settings; since 3.1.
 
Draw

DW_DRAW_DEFAULT0Draw with default parameters. Typically an outline.
DW_DRAW_FILL1Draw shape interior filled in.
DW_DRAW_FULL1 << 1Draw complete shape specified by parameters. (For example full circle)
DW_DRAW_NOAA1 << 2Disables using antialiasing while drawing.
 
Error

DW_ERROR_NONE0Returned on successful completion of many API calls.
DW_ERROR_GENERAL1Non-specific error when an API call fails.
DW_ERROR_TIMEOUT2Returned when a timed function returns due to a timeout.
DW_ERROR_NON_INIT3Returned when an API function could not complete because a parameter was not initialized.
DW_ERROR_NO_MEM4Returned when an API function could not complete because memory could not be allocated.
DW_ERROR_INTERRUPT5Returned by API functions when an operation could not be completed due to User or System interruption.
DW_ERROR_UNKNOWN-1Non-specifc error returned when an API function failed, usually when the function would normally return a number value.
 
Execute

DW_EXEC_CON0Specifies how to execute a console application. For instance on Unix (GTK) this will launch an xterm to display output of the application
DW_EXEC_GUI1Specifies how to execute graphical applications. For instance the Mac will use the workspace to launch the application.
 
Feature

DW_FEATURE_UNSUPPORTED-1Returned by dw_feature_get() when unsupported since 3.1.
DW_FEATURE_DISABLED0Returned or passed to dw_feature_get/set() when a feature is disabled since 3.1.
DW_FEATURE_ENABLED1Returned or passed to dw_feature_get/set() when a feature is enabled since 3.1.
DW_FEATURE_HTMLSupports the HTML Widget; since 3.1.
DW_FEATURE_HTML_RESULTSupports the DW_SIGNAL_HTML_RESULT callback; since 3.1.
DW_FEATURE_WINDOW_BORDERSupports custom window border sizes; since 3.1.
DW_FEATURE_WINDOW_TRANSPARENCYSupports window frame transparency; since 3.1.
DW_FEATURE_DARK_MODESupports Dark Mode user interface; since 3.1.
DW_FEATURE_MLE_AUTO_COMPLETESupports auto completion in Multi-line Edit boxes; since 3.1.
DW_FEATURE_MLE_WORD_WRAPSupports word wrapping in Multi-line Edit boxes; since 3.1.
DW_FEATURE_CONTAINER_STRIPESupports striped line display in container widgets; since 3.1.
DW_FEATURE_MDISupports Multiple Document Interface window frame; since 3.1.
DW_FEATURE_NOTEBOOK_STATUS_TEXTSupports status text area on notebook/tabbed controls; since 3.1.
DW_FEATURE_NOTIFICATIONSupports sending system notifications; since 3.1.
DW_FEATURE_UTF8_UNICODESupports UTF8 encoded Unicode text; since 3.1.
DW_FEATURE_MLE_RICH_EDITSupports Rich Edit based MLE control (Windows); since 3.1.
DW_FEATURE_TREESupports the tree widget; since 3.2.
DW_FEATURE_WINDOW_PLACEMENTSupports arbitrary window placement; since 3.2
DW_FEATURE_TASK_BARSupports icons in the taskbar or similar system widget; since 3.2
DW_FEATURE_CONTAINER_MODESupports mobile container modes; since 3.3
 
File Browser

DW_FILE_OPEN0Specifies a file browser with an Open button.
DW_FILE_SAVE1Specifies a file browser with an Save button.
DW_DIRECTORY_OPEN2Specifies a file browser that requires selection of directories.
 
Gravity

DW_GRAV_TOP0Window anchors to the top of the screen.
DW_GRAV_LEFT0Window anchors to the left of the screen.
DW_GRAV_CENTER1Window anchors to the center of the screen.
DW_GRAV_BOTTOM2Window anchors to the bottom of the screen.
DW_GRAV_RIGHT2Window anchors to the right of the screen.
DW_GRAV_OBSTACLES(1 << 10)Flag to use system obstacles as gravity anchor points.
 
HTML

DW_HTML_GOBACK0Pass to dw_html_action to move the browser back a page.
DW_HTML_GOFORWARD1Pass to dw_html_action to move the browser forward a page.
DW_HTML_GOHOME2Pass to dw_html_action to move the browser to the home page.
DW_HTML_SEARCH3Pass to dw_html_action to move the browser to the search page.
DW_HTML_RELOAD4Pass to dw_html_action to reload the current page.
DW_HTML_STOP5Pass to dw_html_action to stop loading.
DW_HTML_PRINT6Pass to dw_html_action to print the current page.
 
HTML Status

DW_HTML_CHANGE_STARTED1HTML window started loading a page; since 3.1.
DW_HTML_CHANGE_REDIRECT2HTML window redirected to a new location; since 3.1.
DW_HTML_CHANGE_LOADING3HTML window is now loading a page; since 3.1.
DW_HTML_CHANGE_COMPLETE4HTML window completed loading; since 3.1.
 
List Flags

DW_LIT_NONE-1Returned when no list item is selected
 
Macros

DW_SIGNAL_FUNC(func)Typecast a function for use with dw_signal_connect()
DW_RESOURCE(id)Typecast a resource ID for use with functions that accept HICN
DW_INT_TO_POINTER(a)Returns a pointer from the integer value passed, casting correctly for the target CPU architecture to avoid compiler warnings.
DW_POINTER_TO_INT(a)Returns an integer from the pointer value passed, casting correctly for the target CPU architecture to avoid compiler warnings.
DW_UINT_TO_POINTER(a)Returns a pointer from the unsigned integer value passed, casting correctly for the target CPU architecture to avoid compiler warnings.
DW_POINTER_TO_UINT(a)Returns an unsigned integer from the pointer value passed, casting correctly for the target CPU architecture to avoid compiler warnings.
 
Menu

DW_MENU_SEPARATOR""Constant to pass to menu functions in the title parameter to add menu separators.
DW_NOMENU0Constant to pass to menu functions in the submenu parameter when there is no submenu.
DW_MENU_AUTO0Constant to pass to menu functions in the id parameter to automatically generate a menu ID on OS/2 and Windows.
DW_MENU_POPUP-1Constant to pass to menu functions in the id parameter to automatically generate a temporary popup menu ID on OS/2 and Windows.
 
Menu Item Style

DW_MIS_ENABLEDIndicates menu item enabled state
DW_MIS_DISABLEDIndicates menu item disabled state
DW_MIS_CHECKEDIndicates menu item checked state
DW_MIS_UNCHECKEDIndicates menu item unchecked state
 
Message Box Flags

DW_MB_OKMessage box has an OK button
DW_MB_OKCANCELMessage box has an OK button and Cancel button
DW_MB_YESNOMessage box has Yes and No buttons.
DW_MB_YESNOCANCELMessage box has Yes, No and Cancel buttons
DW_MB_WARNINGMessage box has a warning icon.
DW_MB_ERRORMessage box has an error icon.
DW_MB_INFORMATIONMessage box has an informational icon.
DW_MB_QUESTIONMessage box has a question icon.
 
Message Box Return

DW_MB_RETURN_OK0Return value when OK is clicked on a message box.
DW_MB_RETURN_YES1Return value when Yes is clicked on a message box.
DW_MB_RETURN_NO0Return value when No is clicked on a message box.
DW_MB_RETURN_CANCEL2Return value when Cancel is clicked on a message box.
 
Miscellaneous

DW_DIR_SEPARATOR(char)'/' or '\\'Directory separator for the current platform; since 3.2.
 
MLE Complete Flags

DW_MLE_COMPLETE_TEXT1Enable automatic text replacement; since 3.1 Mac only.
DW_MLE_COMPLETE_DASH(1 << 1)Enable automatic dash substitution; since 3.1 Mac only.
DW_MLE_COMPLETE_QUOTE(1 << 2)Enable automatic quote substitution; since 3.1 Mac only.
 
MLE Flags

DW_MLE_CASESENSITIVESearch the MLE in case sensitive mode
 
Mouse Pointer

DW_POINTER_DEFAULTDefault system mouse pointer
DW_POINTER_ARROWArrow mouse pointer
DW_POINTER_CLOCKMouse pointer is a clock, hour glass or other icon indicating the application is busy
DW_POINTER_QUESTIONMouse pointer is a question mark
 
Orientation

DW_HORZ0Specifies a horizontal item
DW_VERT1Specifies a vertical item
 
Percent

DW_PERCENT_INDETERMINATE-1The percent bar does not have a determinate value.
 
Pixmap

DW_PIXMAP_WIDTH(pixmap)Returns the width in pixels of the specified pixmap.
DW_PIXMAP_HEIGHT(pixmap)Returns the height in pixels of the specified pixmap.
 
RGB

DW_RGB_COLORMask identifying an RGB value
DW_RGB_TRANSPARENTTransparent color mask
DW_RGB_MASKMask identifying the RGB values
DW_RED_MASKRed component mask
DW_GREEN_MASKGreen component mask
DW_BLUE_MASKBlue component mask
DW_RED_VALUE(a)Returns the red value from an RGB color value
DW_GREEN_VALUE(a)Returns the green value of an RGB color value
DW_BLUE_VALUE(a)Returns the blue value of an RGB color value
DW_RGB(red,green,blue)Returns an RGB color value from red, green and blue component values
 
Scroll

DW_SCROLL_UP0Pass to dw_container_scroll to scroll up.
DW_SCROLL_DOWN1Pass to dw_container_scroll to scroll down.
DW_SCROLL_TOP2Pass to dw_container_scroll to scroll to the top.
DW_SCROLL_BOTTOM3Pass to dw_container_scroll to scroll to the bottom.
 
Signal Constants

DW_SIGNAL_CONFIGURE"configure_event"Identifies a signal handler that gets called when a window resizes:

int (*)(HWND, int, int, void *)
DW_SIGNAL_KEY_PRESS"key_press_event"Identifies a signal handler that gets called when a key is pressed on a window:

int (*)(HWND, char, int, int, void *)
DW_SIGNAL_BUTTON_PRESS"button_press_event"Identifies a signal handler that gets called when a mouse button is pressed:

int (*)(HWND, int, int, int, void *)
DW_SIGNAL_BUTTON_RELEASE"button_release_event"Identifies a signal handler that gets called when the mouse button is released:

int (*)(HWND, int, int, int, void *)
DW_SIGNAL_MOTION_NOTIFY"motion_notify_event"Identifies a signal handler that gets called when the mouse is moved over render widgets:

int (*)(HWND, int, int, int, void *)
DW_SIGNAL_DELETE"delete_event"Identifies a signal handler that gets called when a window is being closed:

int (*)(HWND, void *)
DW_SIGNAL_EXPOSE"expose_event"Identifies a signal handler that gets called when part of a window is exposed and needs to be redrawn:

int (*)(HWND, DWExpose *, void *)
DW_SIGNAL_CLICKED"clicked"Identifies a signal handler that gets called when a button, menu item, etc is clicked:

int (*)(HWND, void *)
DW_SIGNAL_ITEM_ENTER"container-select"Identifies a signal handler that gets called when the Enter/Return key is pressed or mouse is double clicked on a container item:

int (*)(HWND, char *, void *)
DW_SIGNAL_ITEM_CONTEXT"container-context"Identifies a signal handler that gets called when the right mouse button is clicked on a container or tree item:

int (*)(HWND, char *, int, int, void *, void *)
DW_SIGNAL_ITEM_SELECT"tree-select"Identifies a signal handler that gets called when a container or tree item is selected:

int (*)(HWND, HTREEITEM, char *, void *, void *)
DW_SIGNAL_LIST_SELECT"item-select"Identifies a signal handler that gets called when a listbox or combobox item selection changes:

int (*)(HWND, int, void *)
DW_SIGNAL_SET_FOCUS"set-focus"Identifies a signal handler that gets called when a window receives input focus:

int (*)(HWND, void *)
DW_SIGNAL_VALUE_CHANGED "value_changed"Identifies a signal handler that gets called when when a value based control changes (sliders, scrollbars, spinbuttons):

int (*)(HWND, int, void *)
DW_SIGNAL_SWITCH_PAGE"switch-page"Identifies a signal handler that gets called when the visible notebook page changes:

int (*)(HWND, unsigned long, void *)
DW_SIGNAL_COLUMN_CLICK"click-column"Identifies a signal handler that gets called when container column header is clicked:

int (*)(HWND, int, void *)
DW_SIGNAL_TREE_EXPAND"tree-expand"Identifies a signal handler that gets called when when a tree item (node) is expanded:

int (*)(HWND, HTREEITEM, void *)
DW_SIGNAL_HTML_CHANGED"html-changed"Identifies a signal handler that gets called when a HTML window changes status; since 3.1:

int (*)(HWND, int, char *, void *)
DW_SIGNAL_HTML_RESULT"html-result"Identifies a signal handler that gets called when a HTML window returns a javascript result; since 3.1:

int (*)(HWND, int, char *, void *, void *)
 
Size

DW_SIZE_AUTO-1Pass to box packing functions as a width or height, to let the platform determine the necessary size; since 3.2.
 
Text

DW_DT_LEFTDraw text aligned left
DW_DT_CENTERDraw text with centered alignment
DW_DT_RIGHTDraw text aligned right
DW_DT_TOPDraw text vertically aligned to the top
DW_DT_VCENTERDraw text with centered vertical alignment
DW_DT_BOTTOMDraw text vertically aligned to the bottom
DW_DT_UNDERSCOREDraw text underscored
DW_DT_STRIKEOUTDraw text striked out
DW_DT_WORDBREAKDraw text that wraps when it runs out of space at word boundaries. Setting this style may cause other styles to get reset.
 
Timeout Constant

DW_TIMEOUT_INFINITE-1Pass to never timeout
 
Window Frame Creation Flags

DW_FCF_CLOSEBUTTONWindow includes a close button
DW_FCF_TITLEBARWindow includes a title bar
DW_FCF_SYSMENUWindow includes a system menu (icon menu on OS/2 and Windows)
DW_FCF_MENUWindow includes a menu
DW_FCF_SIZEBORDERWindow includes a border or tab for resizing the window
DW_FCF_MINBUTTONWindow includes a minimize/miniaturize/iconify button
DW_FCF_MAXBUTTONWindow includes a maximize button
DW_FCF_MINMAXWindow includes both a minimize and maximize button
DW_FCF_DLGBORDERWindow includes a border that identifies it as "dialog" window on platforms that support it
DW_FCF_BORDERWindow includes a standard window border
DW_FCF_SHELLPOSITIONWindow is positioned by the operating system automatically
DW_FCF_TASKLISTWindow is included in the task list on systems that maintain a task switching list
DW_FCF_HIDEBUTTONWindow includes a hide button for completely hiding the window on systems that support it
DW_FCF_HIDEMAXWindow includes both hide and maximize buttons
DW_FCF_MAXIMIZEWindow is maximized as soon as it is created
DW_FCF_MINIMIZEWindow is minimized as soon as it is created
DW_FCF_COMPOSITEDWindow is translucent on platforms that support it (currently Windows Vista and 7)
DW_FCF_TEXTUREDWindow has a background texture on platforms that support it (currently Mac) since version 2.5