gnomeprocbar.inc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {$IfDef read_interface}
  2. type
  3. TGnomeProcbarCallback = function (_para1:gpointer):gint; cdecl;
  4. PGnomeProcBar = ^TGnomeProcBar;
  5. TGnomeProcBar = record
  6. hbox : TGtkHBox;
  7. bar : PGtkWidget;
  8. thelabel : PGtkWidget;
  9. frame : PGtkWidget;
  10. flag0 : word;
  11. bs : PGdkPixmap;
  12. colors : PGdkColor;
  13. colors_allocated : gint;
  14. first_request : gint;
  15. n : gint;
  16. tag : gint;
  17. last : Pdword;
  18. cb : TGnomeProcbarCallback;
  19. cb_data : gpointer;
  20. end;
  21. GNOME_PROC_BAR = PGnomeProcBar;
  22. const
  23. bm__GnomeProcBar_vertical = $1;
  24. bp__GnomeProcBar_vertical = 0;
  25. function vertical(var a : TGnomeProcBar) : gboolean;
  26. procedure set_vertical(var a : TGnomeProcBar; __vertical : gboolean);
  27. type
  28. PGnomeProcBarClass = ^TGnomeProcBarClass;
  29. TGnomeProcBarClass = record
  30. parent_class : TGtkHBoxClass;
  31. end;
  32. GNOME_PROC_BAR_CLASS = PGnomeProcBarClass;
  33. function GNOME_TYPE_PROC_BAR : TGTKType;
  34. function GNOME_IS_PROC_BAR(obj : Pointer) : Boolean;
  35. function GNOME_IS_PROC_BAR_CLASS(klass : Pointer) : Boolean;
  36. function gnome_proc_bar_get_type:TGTKTYPE;cdecl;external libgnomeuidll name 'gnome_proc_bar_get_type';
  37. function gnome_proc_bar_new(thelabel:PGtkWidget; n:gint; colors:PGdkColor; cb : TGnomeProcbarCallback):PGtkWidget;cdecl;external libgnomeuidll name 'gnome_proc_bar_new';
  38. procedure gnome_proc_bar_construct(pb:PGnomeProcBar; thelabel:PGtkWidget; n:gint; colors:PGdkColor; cb:TGnomeProcbarCallback);cdecl;external libgnomeuidll name 'gnome_proc_bar_construct';
  39. procedure gnome_proc_bar_set_values(pb:PGnomeProcBar; val:Pguint);cdecl;external libgnomeuidll name 'gnome_proc_bar_set_values';
  40. procedure gnome_proc_bar_set_orient(pb:PGnomeProcBar; vertical:gboolean);cdecl;external libgnomeuidll name 'gnome_proc_bar_set_orient';
  41. procedure gnome_proc_bar_start(pb:PGnomeProcBar; gtime:gint; data:gpointer);cdecl;external libgnomeuidll name 'gnome_proc_bar_start';
  42. procedure gnome_proc_bar_stop(pb:PGnomeProcBar);cdecl;external libgnomeuidll name 'gnome_proc_bar_stop';
  43. procedure gnome_proc_bar_update(pb:PGnomeProcBar; colors:PGdkColor);cdecl;external libgnomeuidll name 'gnome_proc_bar_update';
  44. {$EndIf read_interface}
  45. {$Ifdef read_implementation}
  46. function GNOME_TYPE_PROC_BAR : TGTKType;
  47. begin
  48. GNOME_TYPE_PROC_BAR:=gnome_proc_bar_get_type;
  49. end;
  50. function GNOME_IS_PROC_BAR(obj : Pointer) : Boolean;
  51. begin
  52. GNOME_IS_PROC_BAR:=(obj<>nil) and GNOME_IS_PROC_BAR_CLASS(PGtkTypeObject(obj)^.klass);
  53. end;
  54. function GNOME_IS_PROC_BAR_CLASS(klass : Pointer) : Boolean;
  55. begin
  56. GNOME_IS_PROC_BAR_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GNOME_TYPE_PROC_BAR);
  57. end;
  58. function vertical(var a : TGnomeProcBar) : gboolean;
  59. begin
  60. vertical:=gboolean((a.flag0 and bm__GnomeProcBar_vertical) shr bp__GnomeProcBar_vertical);
  61. end;
  62. procedure set_vertical(var a : TGnomeProcBar; __vertical : gboolean);
  63. begin
  64. a.flag0:=a.flag0 or ((gint(__vertical) shl bp__GnomeProcBar_vertical) and bm__GnomeProcBar_vertical);
  65. end;
  66. {$Endif read_implementation}