diff os2/dw.c @ 508:078a40ba2e41

Added dw_container_get_column_type and dw_filesystem_get_column_type.
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 18 Feb 2004 10:26:49 +0000
parents c607eb385e58
children 710f82598210
line wrap: on
line diff
--- a/os2/dw.c	Thu Jan 22 18:51:49 2004 +0000
+++ b/os2/dw.c	Wed Feb 18 10:26:49 2004 +0000
@@ -6660,6 +6660,47 @@
 }
 
 /*
+ * Gets column type for a container column
+ * Parameters:
+ *          handle: Handle to the container window (widget).
+ *          column: Zero based column.
+ */
+int API dw_container_get_column_type(HWND handle, int column)
+{
+	WindowData *blah = (WindowData *)WinQueryWindowPtr(handle, QWP_USER);
+	ULONG *flags = blah ? blah->data : 0;
+	int rc;
+
+	if(!flags)
+		return 0;
+
+	if(flags[column] & DW_CFA_BITMAPORICON)
+		rc = DW_CFA_BITMAPORICON;
+	else if(flags[column] & DW_CFA_STRING)
+		rc = DW_CFA_STRING;
+	else if(flags[column] & DW_CFA_ULONG)
+		rc = DW_CFA_ULONG;
+	else if(flags[column] & DW_CFA_DATE)
+		rc = DW_CFA_DATE;
+	else if(flags[column] & DW_CFA_TIME)
+		rc = DW_CFA_TIME;
+	else
+		rc = 0;
+	return rc;
+}
+
+/*
+ * Gets column type for a filesystem container column
+ * Parameters:
+ *          handle: Handle to the container window (widget).
+ *          column: Zero based column.
+ */
+int API dw_filesystem_get_column_type(HWND handle, int column)
+{
+	return dw_container_get_column_type( handle, column + 1 );
+}
+
+/*
  * Sets the width of a column in the container.
  * Parameters:
  *          handle: Handle to window (widget) of container.