gnomeappbar.inc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {$IfDef read_interface}
  2. type
  3. PGnomeAppBar = ^TGnomeAppBar;
  4. TGnomeAppBar = record
  5. parent_widget : TGtkHBox;
  6. progress : PGtkWidget;
  7. status : PGtkWidget;
  8. flag0 : word;
  9. editable_start : gint;
  10. prompt : Pgchar;
  11. status_stack : PGSList;
  12. default_status : Pgchar;
  13. end;
  14. GNOME_APPBAR = PGnomeAppBar;
  15. const
  16. bm__GnomeAppBar_interactive = $1;
  17. bp__GnomeAppBar_interactive = 0;
  18. function interactive(var a : TGnomeAppBar) : gboolean;
  19. procedure set_interactive(var a : TGnomeAppBar; __interactive : gboolean);
  20. type
  21. PGnomeAppBarClass = ^TGnomeAppBarClass;
  22. TGnomeAppBarClass = record
  23. parent_class : TGtkHBoxClass;
  24. user_response : procedure (ab:PGnomeAppBar);cdecl;
  25. clear_prompt : procedure (ab:PGnomeAppBar);cdecl;
  26. end;
  27. GNOME_APPBAR_CLASS = PGnomeAppBarClass;
  28. function GNOME_TYPE_APPBAR : TGTKType;
  29. function GNOME_IS_APPBAR(obj : Pointer) : Boolean;
  30. function GNOME_IS_APPBAR_CLASS(klass : Pointer) : Boolean;
  31. function GNOME_APPBAR_HAS_STATUS(appbar : PGnomeAppBar) : gboolean;
  32. function GNOME_APPBAR_HAS_PROGRESS(appbar : PGnomeAppBar) : gboolean;
  33. function GNOME_APPBAR_INTERACTIVE(ab : PGnomeAppBar) : gboolean;
  34. function gnome_appbar_get_type:TGTKType;cdecl;external libgnomeuidll name 'gnome_appbar_get_type';
  35. function gnome_appbar_new(has_progress:gboolean; has_status:gboolean; interactivity:TGnomePreferencesType):PGtkWidget;cdecl;external libgnomeuidll name 'gnome_appbar_new';
  36. procedure gnome_appbar_set_status(appbar:PGnomeAppBar; status:Pgchar);cdecl;external libgnomeuidll name 'gnome_appbar_set_status';
  37. procedure gnome_appbar_set_default(appbar:PGnomeAppBar; default_status:Pgchar);cdecl;external libgnomeuidll name 'gnome_appbar_set_default';
  38. procedure gnome_appbar_push(appbar:PGnomeAppBar; status:Pgchar);cdecl;external libgnomeuidll name 'gnome_appbar_push';
  39. procedure gnome_appbar_pop(appbar:PGnomeAppBar);cdecl;external libgnomeuidll name 'gnome_appbar_pop';
  40. procedure gnome_appbar_clear_stack(appbar:PGnomeAppBar);cdecl;external libgnomeuidll name 'gnome_appbar_clear_stack';
  41. procedure gnome_appbar_set_progress(appbar:PGnomeAppBar; percentage:gfloat);cdecl;external libgnomeuidll name 'gnome_appbar_set_progress';
  42. function gnome_appbar_get_progress(appbar:PGnomeAppBar):PGtkProgress;cdecl;external libgnomeuidll name 'gnome_appbar_get_progress';
  43. procedure gnome_appbar_refresh(appbar:PGnomeAppBar);cdecl;external libgnomeuidll name 'gnome_appbar_refresh';
  44. procedure gnome_appbar_set_prompt(appbar:PGnomeAppBar; prompt:Pgchar; modal:gboolean);cdecl;external libgnomeuidll name 'gnome_appbar_set_prompt';
  45. procedure gnome_appbar_clear_prompt(appbar:PGnomeAppBar);cdecl;external libgnomeuidll name 'gnome_appbar_clear_prompt';
  46. function gnome_appbar_get_response(appbar:PGnomeAppBar):Pgchar;cdecl;external libgnomeuidll name 'gnome_appbar_get_response';
  47. procedure gnome_appbar_construct(ab:PGnomeAppBar; has_progress:gboolean; has_status:gboolean; interactivity:TGnomePreferencesType);cdecl;external libgnomeuidll name 'gnome_appbar_construct';
  48. {$EndIf read_interface}
  49. {$Ifdef read_implementation}
  50. function GNOME_TYPE_APPBAR : TGTKType;
  51. begin
  52. GNOME_TYPE_APPBAR:=gnome_appbar_get_type;
  53. end;
  54. function GNOME_IS_APPBAR(obj : pointer) : Boolean;
  55. begin
  56. GNOME_IS_APPBAR:=(obj<>nil) and GNOME_IS_APPBAR_CLASS(PGtkTypeObject(obj)^.klass);
  57. end;
  58. function GNOME_IS_APPBAR_CLASS(klass : pointer) : boolean;
  59. begin
  60. GNOME_IS_APPBAR_CLASS:= (klass<>nil) and (PGtkTypeClass(klass)^.thetype=GNOME_TYPE_APPBAR);
  61. end;
  62. function GNOME_APPBAR_HAS_STATUS(appbar : PGnomeAppBar) : gboolean;
  63. begin
  64. GNOME_APPBAR_HAS_STATUS:=(appbar^.status) <> NULL;
  65. end;
  66. function GNOME_APPBAR_HAS_PROGRESS(appbar : PGnomeAppBar) : gboolean;
  67. begin
  68. GNOME_APPBAR_HAS_PROGRESS:=(appbar^.progress) <> NULL;
  69. end;
  70. function interactive(var a : TGnomeAppBar) : gboolean;
  71. begin
  72. interactive:=gboolean((a.flag0 and bm__GnomeAppBar_interactive) shr bp__GnomeAppBar_interactive);
  73. end;
  74. procedure set_interactive(var a : TGnomeAppBar; __interactive : gboolean);
  75. begin
  76. a.flag0:=a.flag0 or ((gint(__interactive) shl bp__GnomeAppBar_interactive) and bm__GnomeAppBar_interactive);
  77. end;
  78. function GNOME_APPBAR_INTERACTIVE(ab : PGnomeAppBar) : gboolean;
  79. var
  80. if_local1 : gboolean;
  81. begin
  82. if ab <> nil then
  83. if_local1:=interactive(ab^)
  84. else
  85. if_local1:=False;
  86. GNOME_APPBAR_INTERACTIVE:=if_local1;
  87. end;
  88. {$Endif read_implementation}