Changeset 497
- Timestamp:
- 04/29/08 15:53:50 (5 months ago)
- Files:
-
- trunk/src/glib/RandG.d (modified) (5 diffs)
- trunk/src/gtk/BuildableIF.d (modified) (5 diffs)
- trunk/src/gtk/BuildableT.d (modified) (5 diffs)
- trunk/src/gtk/MenuItem.d (modified) (4 diffs)
- trunk/src/gtk/PrintUnixDialog.d (modified) (5 diffs)
- trunk/src/gtk/Toolbar.d (modified) (4 diffs)
- trunk/wrap/APILookupGLib.txt (modified) (1 diff)
- trunk/wrap/APILookupGtk.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/glib/RandG.d
r480 r497 31 31 * clss = RandG 32 32 * interf = 33 * class Code: Yes33 * class Code: No 34 34 * interface Code: No 35 35 * template for: … … 42 42 * omit prefixes: 43 43 * omit code: 44 * - g_rand_int45 * - g_rand_int_range46 * - g_rand_double47 * - g_rand_double_range48 44 * omit signals: 49 45 * imports: … … 52 48 * module aliases: 53 49 * local aliases: 50 * - double -> randDouble 51 * - doubleRange -> randDoubleRange 52 * - int -> randInt 53 * - intRange -> randIntRange 54 54 * overrides: 55 55 */ … … 131 131 132 132 /** 133 * Returns the next random guint32 from rand_ equally distributed over134 * the range [0..2^32-1].135 * Params:136 * rand = a GRand.137 * Returns: A random number.138 */139 public uint randInt()140 {141 // guint32 g_rand_int (GRand *rand_);142 return g_rand_int(gRand);143 }144 145 /**146 * Returns the next random gint32 from rand_ equally distributed over147 * the range [begin..end-1].148 * Params:149 * rand = a GRand.150 * begin = lower closed bound of the interval.151 * end = upper open bound of the interval.152 * Returns: A random number.153 */154 public int randIntRange(int begin, int end)155 {156 // gint32 g_rand_int_range (GRand *rand_, gint32 begin, gint32 end);157 return g_rand_int_range(gRand, begin, end);158 }159 160 /**161 * Returns the next random gdouble from rand_ equally distributed over162 * the range [0..1).163 * Params:164 * rand = a GRand.165 * Returns: A random number.166 */167 public double randDouble()168 {169 // gdouble g_rand_double (GRand *rand_);170 return g_rand_double(gRand);171 }172 173 /**174 * Returns the next random gdouble from rand_ equally distributed over175 * the range [begin..end).176 * Params:177 * rand = a GRand.178 * begin = lower closed bound of the interval.179 * end = upper open bound of the interval.180 * Returns: A random number.181 */182 public double randDoubleRange(double begin, double end)183 {184 // gdouble g_rand_double_range (GRand *rand_, gdouble begin, gdouble end);185 return g_rand_double_range(gRand, begin, end);186 }187 188 /**189 133 */ 190 134 … … 302 246 303 247 /** 248 * Returns the next random guint32 from rand_ equally distributed over 249 * the range [0..2^32-1]. 250 * Returns: A random number. 251 */ 252 public uint randInt() 253 { 254 // guint32 g_rand_int (GRand *rand_); 255 return g_rand_int(gRand); 256 } 257 258 /** 259 * Returns the next random gint32 from rand_ equally distributed over 260 * the range [begin..end-1]. 261 * Params: 262 * begin = lower closed bound of the interval. 263 * end = upper open bound of the interval. 264 * Returns: A random number. 265 */ 266 public int randIntRange(int begin, int end) 267 { 268 // gint32 g_rand_int_range (GRand *rand_, gint32 begin, gint32 end); 269 return g_rand_int_range(gRand, begin, end); 270 } 271 272 /** 273 * Returns the next random gdouble from rand_ equally distributed over 274 * the range [0..1). 275 * Returns: A random number. 276 */ 277 public double randDouble() 278 { 279 // gdouble g_rand_double (GRand *rand_); 280 return g_rand_double(gRand); 281 } 282 283 /** 284 * Returns the next random gdouble from rand_ equally distributed over 285 * the range [begin..end). 286 * Params: 287 * begin = lower closed bound of the interval. 288 * end = upper open bound of the interval. 289 * Returns: A random number. 290 */ 291 public double randDoubleRange(double begin, double end) 292 { 293 // gdouble g_rand_double_range (GRand *rand_, gdouble begin, gdouble end); 294 return g_rand_double_range(gRand, begin, end); 295 } 296 297 /** 304 298 * Sets the seed for the global random number generator, which is used 305 299 * by the g_random_* functions, to seed. trunk/src/gtk/BuildableIF.d
r480 r497 31 31 * clss = BuildableT 32 32 * interf = BuildableIF 33 * class Code: Yes34 * interface Code: Yes33 * class Code: No 34 * interface Code: No 35 35 * template for: 36 36 * extend = … … 42 42 * omit prefixes: 43 43 * omit code: 44 * - gtk_buildable_set_name45 * - gtk_buildable_get_name46 44 * omit signals: 47 45 * imports: … … 56 54 * module aliases: 57 55 * local aliases: 56 * - getName -> buildableGetName 57 * - setName -> buildableSetName 58 58 * overrides: 59 59 */ … … 98 98 99 99 /** 100 */ 101 102 /** 100 103 * Sets the name of the buildable object. 101 104 * Since 2.12 … … 114 117 */ 115 118 public string buildableGetName(); 116 117 /**118 */119 119 120 120 /** trunk/src/gtk/BuildableT.d
r480 r497 31 31 * clss = BuildableT 32 32 * interf = BuildableIF 33 * class Code: Yes34 * interface Code: Yes33 * class Code: No 34 * interface Code: No 35 35 * template for: 36 36 * - TStruct … … 43 43 * omit prefixes: 44 44 * omit code: 45 * - gtk_buildable_set_name46 * - gtk_buildable_get_name47 45 * omit signals: 48 46 * imports: … … 57 55 * module aliases: 58 56 * local aliases: 57 * - getName -> buildableGetName 58 * - setName -> buildableSetName 59 59 * overrides: 60 60 */ … … 102 102 103 103 /** 104 */ 105 106 /** 104 107 * Sets the name of the buildable object. 105 108 * Since 2.12 … … 126 129 return Str.toString(gtk_buildable_get_name(getBuildableTStruct())); 127 130 } 128 129 /**130 */131 131 132 132 /** trunk/src/gtk/MenuItem.d
r480 r497 42 42 * omit prefixes: 43 43 * omit code: 44 * - gtk_menu_item_activate45 44 * - gtk_menu_item_new_with_label 46 45 * - gtk_menu_item_new_with_mnemonic … … 54 53 * module aliases: 55 54 * local aliases: 55 * - activate -> itemActivate 56 56 * overrides: 57 57 * - select … … 199 199 setName(label); 200 200 } 201 202 /**203 * Emits the "activate" signal on the given item204 * Params:205 * menu_item = the menu item206 */207 public void itemActivate()208 {209 // void gtk_menu_item_activate (GtkMenuItem *menu_item);210 gtk_menu_item_activate(gtkMenuItem);211 }212 213 201 214 202 /** … … 448 436 449 437 /** 438 * Emits the "activate" signal on the given item 439 */ 440 public void itemActivate() 441 { 442 // void gtk_menu_item_activate (GtkMenuItem *menu_item); 443 gtk_menu_item_activate(gtkMenuItem); 444 } 445 446 /** 450 447 * Emits the "toggle_size_request" signal on the given item. 451 448 * Params: trunk/src/gtk/PrintUnixDialog.d
r480 r497 31 31 * clss = PrintUnixDialog 32 32 * interf = 33 * class Code: Yes33 * class Code: No 34 34 * interface Code: No 35 35 * template for: … … 42 42 * omit prefixes: 43 43 * omit code: 44 * - gtk_print_unix_dialog_set_settings45 * - gtk_print_unix_dialog_get_settings46 44 * omit signals: 47 45 * imports: … … 60 58 * module aliases: 61 59 * local aliases: 60 * - getSettings -> getPrintSettings 61 * - setSettings -> setPrintSettings 62 62 * overrides: 63 63 */ … … 159 159 160 160 /** 161 */ 162 163 /** 164 * Creates a new GtkPrintUnixDialog. 165 * Since 2.10 166 * Params: 167 * title = Title of the dialog, or NULL 168 * parent = Transient parent of the dialog, or NULL 169 */ 170 public this (string title, Window parent) 171 { 172 // GtkWidget* gtk_print_unix_dialog_new (const gchar *title, GtkWindow *parent); 173 auto p = gtk_print_unix_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct()); 174 if(p is null) 175 { 176 this = null; 177 version(Exceptions) throw new Exception("Construction failure."); 178 else return; 179 } 180 this(cast(GtkPrintUnixDialog*) p); 181 } 182 183 /** 184 * Sets the page setup of the GtkPrintUnixDialog. 185 * Since 2.10 186 * Params: 187 * pageSetup = a GtkPageSetup 188 */ 189 public void setPageSetup(PageSetup pageSetup) 190 { 191 // void gtk_print_unix_dialog_set_page_setup (GtkPrintUnixDialog *dialog, GtkPageSetup *page_setup); 192 gtk_print_unix_dialog_set_page_setup(gtkPrintUnixDialog, (pageSetup is null) ? null : pageSetup.getPageSetupStruct()); 193 } 194 195 /** 196 * Gets the page setup that is used by the GtkPrintUnixDialog. 197 * Since 2.10 198 * Returns: the page setup of dialog. 199 */ 200 public PageSetup getPageSetup() 201 { 202 // GtkPageSetup* gtk_print_unix_dialog_get_page_setup (GtkPrintUnixDialog *dialog); 203 auto p = gtk_print_unix_dialog_get_page_setup(gtkPrintUnixDialog); 204 if(p is null) 205 { 206 version(Exceptions) throw new Exception("Null GObject from GTK+."); 207 else return null; 208 } 209 return new PageSetup(cast(GtkPageSetup*) p); 210 } 211 212 /** 213 * Sets the current page number. If current_page is not -1, this enables 214 * the current page choice for the range of pages to print. 215 * Since 2.10 216 * Params: 217 * currentPage = the current page number. 218 */ 219 public void setCurrentPage(int currentPage) 220 { 221 // void gtk_print_unix_dialog_set_current_page (GtkPrintUnixDialog *dialog, gint current_page); 222 gtk_print_unix_dialog_set_current_page(gtkPrintUnixDialog, currentPage); 223 } 224 225 /** 226 * Gets the current page of the GtkPrintDialog. 227 * Since 2.10 228 * Returns: the current page of dialog 229 */ 230 public int getCurrentPage() 231 { 232 // gint gtk_print_unix_dialog_get_current_page (GtkPrintUnixDialog *dialog); 233 return gtk_print_unix_dialog_get_current_page(gtkPrintUnixDialog); 234 } 235 236 /** 161 237 * Sets the GtkPrintSettings for the GtkPrintUnixDialog. Typically, 162 238 * this is used to restore saved print settings from a previous print … … 189 265 else return null; 190 266 } 191 return new PrintSettings(p); 192 } 193 194 /** 195 */ 196 197 /** 198 * Creates a new GtkPrintUnixDialog. 199 * Since 2.10 200 * Params: 201 * title = Title of the dialog, or NULL 202 * parent = Transient parent of the dialog, or NULL 203 */ 204 public this (string title, Window parent) 205 { 206 // GtkWidget* gtk_print_unix_dialog_new (const gchar *title, GtkWindow *parent); 207 auto p = gtk_print_unix_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct()); 208 if(p is null) 209 { 210 this = null; 211 version(Exceptions) throw new Exception("Construction failure."); 212 else return; 213 } 214 this(cast(GtkPrintUnixDialog*) p); 215 } 216 217 /** 218 * Sets the page setup of the GtkPrintUnixDialog. 219 * Since 2.10 220 * Params: 221 * pageSetup = a GtkPageSetup 222 */ 223 public void setPageSetup(PageSetup pageSetup) 224 { 225 // void gtk_print_unix_dialog_set_page_setup (GtkPrintUnixDialog *dialog, GtkPageSetup *page_setup); 226 gtk_print_unix_dialog_set_page_setup(gtkPrintUnixDialog, (pageSetup is null) ? null : pageSetup.getPageSetupStruct()); 227 } 228 229 /** 230 * Gets the page setup that is used by the GtkPrintUnixDialog. 231 * Since 2.10 232 * Returns: the page setup of dialog. 233 */ 234 public PageSetup getPageSetup() 235 { 236 // GtkPageSetup* gtk_print_unix_dialog_get_page_setup (GtkPrintUnixDialog *dialog); 237 auto p = gtk_print_unix_dialog_get_page_setup(gtkPrintUnixDialog); 238 if(p is null) 239 { 240 version(Exceptions) throw new Exception("Null GObject from GTK+."); 241 else return null; 242 } 243 return new PageSetup(cast(GtkPageSetup*) p); 244 } 245 246 /** 247 * Sets the current page number. If current_page is not -1, this enables 248 * the current page choice for the range of pages to print. 249 * Since 2.10 250 * Params: 251 * currentPage = the current page number. 252 */ 253 public void setCurrentPage(int currentPage) 254 { 255 // void gtk_print_unix_dialog_set_current_page (GtkPrintUnixDialog *dialog, gint current_page); 256 gtk_print_unix_dialog_set_current_page(gtkPrintUnixDialog, currentPage); 257 } 258 259 /** 260 * Gets the current page of the GtkPrintDialog. 261 * Since 2.10 262 * Returns: the current page of dialog 263 */ 264 public int getCurrentPage() 265 { 266 // gint gtk_print_unix_dialog_get_current_page (GtkPrintUnixDialog *dialog); 267 return gtk_print_unix_dialog_get_current_page(gtkPrintUnixDialog); 267 return new PrintSettings(cast(GtkPrintSettings*) p); 268 268 } 269 269 trunk/src/gtk/Toolbar.d
r480 r497 42 42 * omit prefixes: 43 43 * omit code: 44 * - gtk_toolbar_get_style45 44 * - gtk_toolbar_insert 46 45 * omit signals: … … 54 53 * module aliases: 55 54 * local aliases: 55 * - getStyle -> toolbarGetStyle 56 56 * overrides: 57 57 */ … … 125 125 126 126 /** 127 * Retrieves whether the toolbar has text, icons, or both . See128 * gtk_toolbar_set_style().129 * Params:130 * toolbar = a GtkToolbar131 * Returns:132 * the current style of toolbar133 */134 public GtkToolbarStyle toolbarGetStyle()135 {136 // GtkToolbarStyle gtk_toolbar_get_style (GtkToolbar *toolbar);137 return gtk_toolbar_get_style(gtkToolbar);138 }139 140 /**141 127 * Insert a GtkToolItem into the toolbar at position pos. 142 128 * If pos is 0 the item is prepended to the start of the toolbar. If pos is negative, the item is appended to the end of the toolbar. … … 482 468 // GtkOrientation gtk_toolbar_get_orientation (GtkToolbar *toolbar); 483 469 return gtk_toolbar_get_orientation(gtkToolbar); 470 } 471 472 /** 473 * Retrieves whether the toolbar has text, icons, or both . See 474 * gtk_toolbar_set_style(). 475 * Returns: the current style of toolbar 476 */ 477 public GtkToolbarStyle toolbarGetStyle() 478 { 479 // GtkToolbarStyle gtk_toolbar_get_style (GtkToolbar *toolbar); 480 return gtk_toolbar_get_style(gtkToolbar); 484 481 } 485 482 trunk/wrap/APILookupGLib.txt
r493 r497 589 589 structWrap: GRand* RandG 590 590 591 nocode: g_rand_int 592 nocode: g_rand_int_range 593 nocode: g_rand_double 594 nocode: g_rand_double_range 595 596 code: start 597 /** 598 * Returns the next random guint32 from rand_ equally distributed over 599 * the range [0..2^32-1]. 600 * Params: 601 * rand = a GRand. 602 * Returns: A random number. 603 */ 604 public uint randInt() 605 { 606 // guint32 g_rand_int (GRand *rand_); 607 return g_rand_int(gRand); 608 } 609 610 /** 611 * Returns the next random gint32 from rand_ equally distributed over 612 * the range [begin..end-1]. 613 * Params: 614 * rand = a GRand. 615 * begin = lower closed bound of the interval. 616 * end = upper open bound of the interval. 617 * Returns: A random number. 618 */ 619 public int randIntRange(int begin, int end) 620 { 621 // gint32 g_rand_int_range (GRand *rand_, gint32 begin, gint32 end); 622 return g_rand_int_range(gRand, begin, end); 623 } 624 625 /** 626 * Returns the next random gdouble from rand_ equally distributed over 627 * the range [0..1). 628 * Params: 629 * rand = a GRand. 630 * Returns: A random number. 631 */ 632 public double randDouble() 633 { 634 // gdouble g_rand_double (GRand *rand_); 635 return g_rand_double(gRand); 636 } 637 638 /** 639 * Returns the next random gdouble from rand_ equally distributed over 640 * the range [begin..end). 641 * Params: 642 * rand = a GRand. 643 * begin = lower closed bound of the interval. 644 * end = upper open bound of the interval. 645 * Returns: A random number. 646 */ 647 public double randDoubleRange(double begin, double end) 648 { 649 // gdouble g_rand_double_range (GRand *rand_, gdouble begin, gdouble end); 650 return g_rand_double_range(gRand, begin, end); 651 } 652 code: end 591 alias: int randInt 592 alias: intRange randIntRange 593 alias: double randDouble 594 alias: doubleRange randDoubleRange 595 653 596 outFile: RandG 654 597 trunk/wrap/APILookupGtk.txt
r496 r497 3820 3820 structWrap: GtkWidget* Widget 3821 3821 3822 # method conflict with parent method3823 nocode: gtk_menu_item_activate3824 3822 nocode: gtk_menu_item_new_with_label 3825 3823 nocode: gtk_menu_item_new_with_mnemonic 3826 # replace the method 3827 # TODO create a method rename instead of replacing the entire code3824 3825 alias: activate itemActivate 3828 3826 3829 3827 override: select … … 3911 3909 } 3912 3910 setName(label); 3913 } 3914 3915 /** 3916 * Emits the "activate" signal on the given item 3917 * Params: 3918 * menu_item = the menu item 3919 */ 3920 public void itemActivate() 3921 { 3922 // void gtk_menu_item_activate (GtkMenuItem *menu_item); 3923 gtk_menu_item_activate(gtkMenuItem); 3924 } 3925 3911 } 3926 3912 code: end 3927 3913 outFile: MenuItem … … 4112 4098 structWrap: GtkWidget* Widget 4113 4099 4114 nocode: gtk_toolbar_get_style 4100 alias: getStyle toolbarGetStyle 4101 4115 4102 nocode: gtk_toolbar_insert 4116 4103 4117 4104 code: start 4118 /**4119 * Retrieves whether the toolbar has text, icons, or both . See4120 * gtk_toolbar_set_style().4121 * Params:4122 * toolbar = a GtkToolbar4123 * Returns:4124 * the current style of toolbar4125 */4126 public GtkToolbarStyle toolbarGetStyle()4127 {4128 // GtkToolbarStyle gtk_toolbar_get_style (GtkToolbar *toolbar);4129 return gtk_toolbar_get_style(gtkToolbar);4130 }4131 4132 4105 /** 4133 4106 * Insert a GtkToolItem into the toolbar at position pos. … … 5536 5509 structWrap: GtkPrintSettings* PrintSettings 5537 5510 5538 nocode: gtk_print_unix_dialog_set_settings 5539 nocode: gtk_print_unix_dialog_get_settings 5540 #Conflicts with Widget.getSettings 5541 code: start 5542 /** 5543 * Sets the GtkPrintSettings for the GtkPrintUnixDialog. Typically, 5544 * this is used to restore saved print settings from a previous print 5545 * operation before the print dialog is shown. 5546 * Since 2.10 5547 * Params: 5548 * settings = a GtkPrintSettings, or NULL 5549 */ 5550 public void setPrintSettings(PrintSettings settings) 5551 { 5552 // void gtk_print_unix_dialog_set_settings (GtkPrintUnixDialog *dialog, GtkPrintSettings *settings); 5553 gtk_print_unix_dialog_set_settings(gtkPrintUnixDialog, (settings is null) ? null : settings.getPrintSettingsStruct()); 5554 } 5555 5556 /** 5557 * Gets a new GtkPrintSettings object that represents the 5558 * current values in the print dialog. Note that this creates a 5559 * new object, and you need to unref it 5560 * if don't want to keep it. 5561 * Since 2.10 5562 * Returns: a new GtkPrintSettings object with the values from dialog 5563 */ 5564 public PrintSettings getPrintSettings() 5565 { 5566 // GtkPrintSettings* gtk_print_unix_dialog_get_settings (GtkPrintUnixDialog *dialog); 5567 auto p = gtk_print_unix_dialog_get_settings(gtkPrintUnixDialog); 5568 if(p is null) 5569 { 5570 version(Exceptions) throw new Exception("Null GObject from GTK+."); 5571 else return null; 5572 } 5573 return new PrintSettings(p); 5574 } 5575 code: end 5511 alias: setSettings setPrintSettings 5512 alias: getSettings getPrintSettings 5576 5513 outFile: PrintUnixDialog 5577 5514 … … 6485 6422 #structWrap: GMarkupParser* MarkupParser 6486 6423 6487 nocode: gtk_buildable_set_name 6488 nocode: gtk_buildable_get_name 6489 #Conflict with get/setName functions in other classes. 6490 6491 interfaceCode: start 6492 /** 6493 * Sets the name of the buildable object. 6494 * Since 2.12 6495 * Params: 6496 * name = name to set 6497 */ 6498 public void buildableSetName(string name); 6499 6500 /** 6501 * Gets the name of the buildable object. 6502 * GtkBuilder sets the name based on the the 6503 * GtkBuilder UI definition 6504 * used to construct the buildable. 6505 * Since 2.12 6506 * Returns: the name set with gtk_buildable_set_name() 6507 */ 6508 public string buildableGetName(); 6509 interfaceCode: end 6510 6511 code: start 6512 /** 6513 * Sets the name of the buildable object. 6514 * Since 2.12 6515 * Params: 6516 * name = name to set 6517 */ 6518 public void buildableSetName(string name) 6519 { 6520 // void gtk_buildable_set_name (GtkBuildable *buildable, const gchar *name); 6521 gtk_buildable_set_name(getBuildableTStruct(), Str.toStringz(name)); 6522 } 6523 6524 /** 6525 * Gets the name of the buildable object. 6526 * GtkBuilder sets the name based on the the 6527 * GtkBuilder UI definition 6528 * used to construct the buildable. 6529 * Since 2.12 6530 * Returns: the name set with gtk_buildable_set_name() 6531 */ 6532 public string buildableGetName() 6533 { 6534 // const gchar* gtk_buildable_get_name (GtkBuildable *buildable); 6535 return Str.toString(gtk_buildable_get_name(getBuildableTStruct())); 6536 } 6537 code: end 6424 alias: setName buildableSetName 6425 alias: getName buildableGetName 6426 6538 6427 interface: BuildableIF 6539 6428 outFile: BuildableT
