Mercurial > dwindows
comparison gtk/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 | 7061da3532d7 |
children | 710f82598210 |
comparison
equal
deleted
inserted
replaced
507:c607eb385e58 | 508:078a40ba2e41 |
---|---|
5134 { | 5134 { |
5135 _dw_container_set_item(handle, pointer, column + 1, row, data, NULL); | 5135 _dw_container_set_item(handle, pointer, column + 1, row, data, NULL); |
5136 } | 5136 } |
5137 | 5137 |
5138 /* | 5138 /* |
5139 * Gets column type for a container column | |
5140 * Parameters: | |
5141 * handle: Handle to the container window (widget). | |
5142 * column: Zero based column. | |
5143 */ | |
5144 int dw_container_get_column_type(HWND handle, int column) | |
5145 { | |
5146 char numbuf[10]; | |
5147 int flag, rc; | |
5148 GtkWidget *clist; | |
5149 int _locked_by_me = FALSE; | |
5150 | |
5151 DW_MUTEX_LOCK; | |
5152 clist = (GtkWidget *)gtk_object_get_user_data(GTK_OBJECT(handle)); | |
5153 if(!clist) | |
5154 { | |
5155 DW_MUTEX_UNLOCK; | |
5156 return 0; | |
5157 } | |
5158 | |
5159 sprintf(numbuf, "%d", column); | |
5160 flag = (int)gtk_object_get_data(GTK_OBJECT(clist), numbuf); | |
5161 | |
5162 if(flag & DW_CFA_BITMAPORICON) | |
5163 rc = DW_CFA_BITMAPORICON; | |
5164 else if(flag & DW_CFA_STRING) | |
5165 rc = DW_CFA_STRING; | |
5166 else if(flag & DW_CFA_ULONG) | |
5167 rc = DW_CFA_ULONG; | |
5168 else if(flag & DW_CFA_DATE) | |
5169 rc = DW_CFA_DATE; | |
5170 else if(flag & DW_CFA_TIME) | |
5171 rc = DW_CFA_TIME; | |
5172 else | |
5173 rc = 0; | |
5174 DW_MUTEX_UNLOCK; | |
5175 return rc; | |
5176 } | |
5177 | |
5178 /* | |
5179 * Gets column type for a filesystem container column | |
5180 * Parameters: | |
5181 * handle: Handle to the container window (widget). | |
5182 * column: Zero based column. | |
5183 */ | |
5184 int API dw_filesystem_get_column_type(HWND handle, int column) | |
5185 { | |
5186 return dw_container_get_column_type( handle, column + 1 ); | |
5187 } | |
5188 | |
5189 /* | |
5139 * Sets the width of a column in the container. | 5190 * Sets the width of a column in the container. |
5140 * Parameters: | 5191 * Parameters: |
5141 * handle: Handle to window (widget) of container. | 5192 * handle: Handle to window (widget) of container. |
5142 * column: Zero based column of width being set. | 5193 * column: Zero based column of width being set. |
5143 * width: Width of column in pixels. | 5194 * width: Width of column in pixels. |