Dynamic Windows Constants
API Constants
HWND_DESKTOP | (HWND)0 | Constant representing the desktop window handle |
DW_DESKTOP | (HWND)0 | Constant which refers to the desktop window handle, this is the same as HWND_DESKTOP. |
Button Mask | ||
DW_BUTTON1_MASK | Value passed to mouse related callbacks when the first (left) mouse button is pressed. | |
DW_BUTTON2_MASK | Value passed to mouse related callbacks when the second(right) mouse button is pressed. | |
DW_BUTTON3_MASK | Value passed to mouse related callbacks when the third (middle) mouse button is pressed. | |
Button Style | ||
DW_BS_NOBORDER | Button has no border on platforms that support it | |
Color | ||
DW_CLR_BLACK | Black color constant | |
DW_CLR_DARKRED | Dark red color constant | |
DW_CLR_DARKGREEN | Dark green color constant | |
DW_CLR_BROWN | Brown color constant | |
DW_CLR_DARKBLUE | Dark blue color constant | |
DW_CLR_DARKPINK | Dark pink color constant | |
DW_CLR_DARKCYAN | Dark cyan color constant | |
DW_CLR_PALEGRAY | Pale gray color constant | |
DW_CLR_DARKGRAY | Dark gray color constant | |
DW_CLR_RED | Red color constant | |
DW_CLR_GREEN | Green color constant | |
DW_CLR_YELLOW | Yellow color constant | |
DW_CLR_BLUE | Blue color constant | |
DW_CLR_PINK | Pink color constant | |
DW_CLR_CYAN | Cyan color constant | |
DW_CLR_WHITE | White color constant | |
DW_CLR_DEFAULT | System default color constant | |
Container Column Flags | ||
DW_CFA_BITMAPORICON | Container column contains an image | |
DW_CFA_STRING | Container column contains a string | |
DW_CFA_ULONG | Container column contains an integer value | |
DW_CFA_TIME | Container column contains a time | |
DW_CFA_DATE | Container column contains a date | |
DW_CFA_CENTER | Container column is center aligned | |
DW_CFA_LEFT | Container column is left aligned | |
DW_CFA_RIGHT | Container column is right aligned | |
DW_CFA_SEPARATOR | Column has a separator on platforms that support it | |
DW_CFA_STRINGANDICON | Column has both a string and an image on platforms that support it | |
Container Mode | ||
DW_CONTAINER_MODE_DEFAULT | 0 | The default single column mode. (mobile only) |
DW_CONTAINER_MODE_EXTRA | 1 | The mode which shows extra columns on a second line. (mobile only) |
DW_CONTAINER_MODE_FULL | 2 | The full mode with a line for each column. (mobile only) |
Container Row Flags | ||
DW_CRA_SELECTED | Container selected row(s) | |
DW_CRA_CURSORED | Container row with the cursor | |
Dark Mode | ||
DW_DARK_MODE_DISABLED | 0 | Passed to dw_feature_set() to disable dark mode; since 3.1. |
DW_DARK_MODE_BASIC | 1 | Passed 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_FULL | 2 | Passed 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_FORCED | 3 | Passed to dw_feature_set() to force Dark Mode on regardless of system settings; since 3.1. |
Draw | ||
DW_DRAW_DEFAULT | 0 | Draw with default parameters. Typically an outline. |
DW_DRAW_FILL | 1 | Draw shape interior filled in. |
DW_DRAW_FULL | 1 << 1 | Draw complete shape specified by parameters. (For example full circle) |
DW_DRAW_NOAA | 1 << 2 | Disables using antialiasing while drawing. |
Error | ||
DW_ERROR_NONE | 0 | Returned on successful completion of many API calls. |
DW_ERROR_GENERAL | 1 | Non-specific error when an API call fails. |
DW_ERROR_TIMEOUT | 2 | Returned when a timed function returns due to a timeout. |
DW_ERROR_NON_INIT | 3 | Returned when an API function could not complete because a parameter was not initialized. |
DW_ERROR_NO_MEM | 4 | Returned when an API function could not complete because memory could not be allocated. |
DW_ERROR_INTERRUPT | 5 | Returned by API functions when an operation could not be completed due to User or System interruption. |
DW_ERROR_UNKNOWN | -1 | Non-specifc error returned when an API function failed, usually when the function would normally return a number value. |
Execute | ||
DW_EXEC_CON | 0 | Specifies how to execute a console application. For instance on Unix (GTK) this will launch an xterm to display output of the application |
DW_EXEC_GUI | 1 | Specifies how to execute graphical applications. For instance the Mac will use the workspace to launch the application. |
Feature | ||
DW_FEATURE_UNSUPPORTED | -1 | Returned by dw_feature_get() when unsupported since 3.1. |
DW_FEATURE_DISABLED | 0 | Returned or passed to dw_feature_get/set() when a feature is disabled since 3.1. |
DW_FEATURE_ENABLED | 1 | Returned or passed to dw_feature_get/set() when a feature is enabled since 3.1. |
DW_FEATURE_HTML | Supports the HTML Widget; since 3.1. | |
DW_FEATURE_HTML_RESULT | Supports the DW_SIGNAL_HTML_RESULT callback; since 3.1. | |
DW_FEATURE_WINDOW_BORDER | Supports custom window border sizes; since 3.1. | |
DW_FEATURE_WINDOW_TRANSPARENCY | Supports window frame transparency; since 3.1. | |
DW_FEATURE_DARK_MODE | Supports Dark Mode user interface; since 3.1. | |
DW_FEATURE_MLE_AUTO_COMPLETE | Supports auto completion in Multi-line Edit boxes; since 3.1. | |
DW_FEATURE_MLE_WORD_WRAP | Supports word wrapping in Multi-line Edit boxes; since 3.1. | |
DW_FEATURE_CONTAINER_STRIPE | Supports striped line display in container widgets; since 3.1. | |
DW_FEATURE_MDI | Supports Multiple Document Interface window frame; since 3.1. | |
DW_FEATURE_NOTEBOOK_STATUS_TEXT | Supports status text area on notebook/tabbed controls; since 3.1. | |
DW_FEATURE_NOTIFICATION | Supports sending system notifications; since 3.1. | |
DW_FEATURE_UTF8_UNICODE | Supports UTF8 encoded Unicode text; since 3.1. | |
DW_FEATURE_MLE_RICH_EDIT | Supports Rich Edit based MLE control (Windows); since 3.1. | |
DW_FEATURE_TREE | Supports the tree widget; since 3.2. | |
DW_FEATURE_WINDOW_PLACEMENT | Supports arbitrary window placement; since 3.2 | |
DW_FEATURE_TASK_BAR | Supports icons in the taskbar or similar system widget; since 3.2 | |
DW_FEATURE_CONTAINER_MODE | Supports mobile container modes; since 3.3 | |
File Browser | ||
DW_FILE_OPEN | 0 | Specifies a file browser with an Open button. |
DW_FILE_SAVE | 1 | Specifies a file browser with an Save button. |
DW_DIRECTORY_OPEN | 2 | Specifies a file browser that requires selection of directories. |
Gravity | ||
DW_GRAV_TOP | 0 | Window anchors to the top of the screen. |
DW_GRAV_LEFT | 0 | Window anchors to the left of the screen. |
DW_GRAV_CENTER | 1 | Window anchors to the center of the screen. |
DW_GRAV_BOTTOM | 2 | Window anchors to the bottom of the screen. |
DW_GRAV_RIGHT | 2 | Window anchors to the right of the screen. |
DW_GRAV_OBSTACLES | (1 << 10) | Flag to use system obstacles as gravity anchor points. |
HTML | ||
DW_HTML_GOBACK | 0 | Pass to dw_html_action to move the browser back a page. |
DW_HTML_GOFORWARD | 1 | Pass to dw_html_action to move the browser forward a page. |
DW_HTML_GOHOME | 2 | Pass to dw_html_action to move the browser to the home page. |
DW_HTML_SEARCH | 3 | Pass to dw_html_action to move the browser to the search page. |
DW_HTML_RELOAD | 4 | Pass to dw_html_action to reload the current page. |
DW_HTML_STOP | 5 | Pass to dw_html_action to stop loading. |
DW_HTML_PRINT | 6 | Pass to dw_html_action to print the current page. |
HTML Status | ||
DW_HTML_CHANGE_STARTED | 1 | HTML window started loading a page; since 3.1. |
DW_HTML_CHANGE_REDIRECT | 2 | HTML window redirected to a new location; since 3.1. |
DW_HTML_CHANGE_LOADING | 3 | HTML window is now loading a page; since 3.1. |
DW_HTML_CHANGE_COMPLETE | 4 | HTML window completed loading; since 3.1. |
List Flags | ||
DW_LIT_NONE | -1 | Returned 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_NOMENU | 0 | Constant to pass to menu functions in the submenu parameter when there is no submenu. |
DW_MENU_AUTO | 0 | Constant to pass to menu functions in the id parameter to automatically generate a menu ID on OS/2 and Windows. |
DW_MENU_POPUP | -1 | Constant 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_ENABLED | Indicates menu item enabled state | |
DW_MIS_DISABLED | Indicates menu item disabled state | |
DW_MIS_CHECKED | Indicates menu item checked state | |
DW_MIS_UNCHECKED | Indicates menu item unchecked state | |
Message Box Flags | ||
DW_MB_OK | Message box has an OK button | |
DW_MB_OKCANCEL | Message box has an OK button and Cancel button | |
DW_MB_YESNO | Message box has Yes and No buttons. | |
DW_MB_YESNOCANCEL | Message box has Yes, No and Cancel buttons | |
DW_MB_WARNING | Message box has a warning icon. | |
DW_MB_ERROR | Message box has an error icon. | |
DW_MB_INFORMATION | Message box has an informational icon. | |
DW_MB_QUESTION | Message box has a question icon. | |
Message Box Return | ||
DW_MB_RETURN_OK | 0 | Return value when OK is clicked on a message box. |
DW_MB_RETURN_YES | 1 | Return value when Yes is clicked on a message box. |
DW_MB_RETURN_NO | 0 | Return value when No is clicked on a message box. |
DW_MB_RETURN_CANCEL | 2 | Return 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_TEXT | 1 | Enable 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_CASESENSITIVE | Search the MLE in case sensitive mode | |
Mouse Pointer | ||
DW_POINTER_DEFAULT | Default system mouse pointer | |
DW_POINTER_ARROW | Arrow mouse pointer | |
DW_POINTER_CLOCK | Mouse pointer is a clock, hour glass or other icon indicating the application is busy | |
DW_POINTER_QUESTION | Mouse pointer is a question mark | |
Orientation | ||
DW_HORZ | 0 | Specifies a horizontal item |
DW_VERT | 1 | Specifies a vertical item |
Percent | ||
DW_PERCENT_INDETERMINATE | -1 | The 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_COLOR | Mask identifying an RGB value | |
DW_RGB_TRANSPARENT | Transparent color mask | |
DW_RGB_MASK | Mask identifying the RGB values | |
DW_RED_MASK | Red component mask | |
DW_GREEN_MASK | Green component mask | |
DW_BLUE_MASK | Blue 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_UP | 0 | Pass to dw_container_scroll to scroll up. |
DW_SCROLL_DOWN | 1 | Pass to dw_container_scroll to scroll down. |
DW_SCROLL_TOP | 2 | Pass to dw_container_scroll to scroll to the top. |
DW_SCROLL_BOTTOM | 3 | Pass 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 | -1 | Pass to box packing functions as a width or height, to let the platform determine the necessary size; since 3.2. |
Text | ||
DW_DT_LEFT | Draw text aligned left | |
DW_DT_CENTER | Draw text with centered alignment | |
DW_DT_RIGHT | Draw text aligned right | |
DW_DT_TOP | Draw text vertically aligned to the top | |
DW_DT_VCENTER | Draw text with centered vertical alignment | |
DW_DT_BOTTOM | Draw text vertically aligned to the bottom | |
DW_DT_UNDERSCORE | Draw text underscored | |
DW_DT_STRIKEOUT | Draw text striked out | |
DW_DT_WORDBREAK | Draw 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 | -1 | Pass to never timeout |
Window Frame Creation Flags | ||
DW_FCF_CLOSEBUTTON | Window includes a close button | |
DW_FCF_TITLEBAR | Window includes a title bar | |
DW_FCF_SYSMENU | Window includes a system menu (icon menu on OS/2 and Windows) | |
DW_FCF_MENU | Window includes a menu | |
DW_FCF_SIZEBORDER | Window includes a border or tab for resizing the window | |
DW_FCF_MINBUTTON | Window includes a minimize/miniaturize/iconify button | |
DW_FCF_MAXBUTTON | Window includes a maximize button | |
DW_FCF_MINMAX | Window includes both a minimize and maximize button | |
DW_FCF_DLGBORDER | Window includes a border that identifies it as "dialog" window on platforms that support it | |
DW_FCF_BORDER | Window includes a standard window border | |
DW_FCF_SHELLPOSITION | Window is positioned by the operating system automatically | |
DW_FCF_TASKLIST | Window is included in the task list on systems that maintain a task switching list | |
DW_FCF_HIDEBUTTON | Window includes a hide button for completely hiding the window on systems that support it | |
DW_FCF_HIDEMAX | Window includes both hide and maximize buttons | |
DW_FCF_MAXIMIZE | Window is maximized as soon as it is created | |
DW_FCF_MINIMIZE | Window is minimized as soon as it is created | |
DW_FCF_COMPOSITED | Window is translucent on platforms that support it (currently Windows Vista and 7) | |
DW_FCF_TEXTURED | Window has a background texture on platforms that support it (currently Mac) since version 2.5 |