Changeset 504
- Timestamp:
- 06/24/08 16:08:39 (2 months ago)
- Files:
-
- trunk/src/gtk/Widget.d (modified) (1 diff)
- trunk/wrap/APILookupGtk.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/gtk/Widget.d
r503 r504 237 237 return height; 238 238 } 239 239 240 /** 241 * The widget's desired size. 242 * Returns: the GtkRequisition for this widget 243 */ 244 public GtkRequisition getRequisition() 245 { 246 GtkRequisition req; 247 int* pt = cast(int*)getStruct(); 248 249 pt += 28/4; 250 req.width = *pt; 251 252 pt++; 253 req.height = *pt; 254 255 return req; 256 } 257 258 /** 259 * The widget's desired size. 260 */ 261 public void setRequisition(GtkRequisition req) 262 { 263 int* pt = cast(int*)getStruct(); 264 265 pt += 28/4; 266 *pt = req.width; 267 268 pt++; 269 *pt = req.height; 270 } 271 272 /** 273 * The widget's allocated size. 274 * Returns: the GtkAllocation for this widget 275 */ 240 276 public GtkAllocation getAllocation() 241 277 { 242 278 GtkAllocation allo; 243 279 int* pt = cast(int*)getStruct(); 244 280 245 281 pt += 36/4; 246 282 allo.x = *pt; 247 283 248 284 pt++; 249 285 allo.y = *pt; 250 286 251 287 pt++; 252 288 allo.width = *pt; 253 289 254 290 pt++; 255 291 allo.height = *pt; 256 292 257 293 return allo; 258 294 } 259 295 296 /** 297 * The widget's allocated size. 298 */ 260 299 public void setAllocation(GtkAllocation allo) 261 300 { 262 301 int* pt = cast(int*)getStruct(); 263 302 264 303 pt += 36/4; 265 *pt = allo.x;266 304 *pt = allo.x; 305 267 306 pt++; 268 *pt = allo.y;269 307 *pt = allo.y; 308 270 309 pt++; 271 *pt = allo.width;272 310 *pt = allo.width; 311 273 312 pt++; 274 *pt = allo.height;313 *pt = allo.height; 275 314 } 276 315 trunk/wrap/APILookupGtk.txt
r503 r504 5999 5999 6000 6000 /** 6001 * The widget's desired size. 6002 * Returns: the GtkRequisition for this widget 6003 */ 6004 public GtkRequisition getRequisition() 6005 { 6006 GtkRequisition req; 6007 int* pt = cast(int*)getStruct(); 6008 6009 pt += 28/4; 6010 req.width = *pt; 6011 6012 pt++; 6013 req.height = *pt; 6014 6015 return req; 6016 } 6017 6018 /** 6019 * The widget's desired size. 6020 */ 6021 public void setRequisition(GtkRequisition req) 6022 { 6023 int* pt = cast(int*)getStruct(); 6024 6025 pt += 28/4; 6026 *pt = req.width; 6027 6028 pt++; 6029 *pt = req.height; 6030 } 6031 6032 /** 6001 6033 * The widget's allocated size. 6002 6034 * Returns: the GtkAllocation for this widget
