gnomemessagebox.inc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {$IfDef read_interface}
  2. const
  3. GNOME_MESSAGE_BOX_INFO = 'info';
  4. GNOME_MESSAGE_BOX_WARNING = 'warning';
  5. GNOME_MESSAGE_BOX_ERROR = 'error';
  6. GNOME_MESSAGE_BOX_QUESTION = 'question';
  7. GNOME_MESSAGE_BOX_GENERIC = 'generic';
  8. type
  9. PGnomeMessageBox = ^TGnomeMessageBox;
  10. TGnomeMessageBox = record
  11. dialog : TGnomeDialog;
  12. end;
  13. GNOME_MESSAGE_BOX = PGnomeMessageBox;
  14. PGnomeMessageBoxClass = ^TGnomeMessageBoxClass;
  15. TGnomeMessageBoxClass = record
  16. parent_class : TGnomeDialogClass;
  17. end;
  18. GNOME_MESSAGE_BOX_CLASS = PGnomeMessageBoxClass;
  19. function GNOME_TYPE_MESSAGE_BOX : TGTKType;
  20. function GNOME_IS_MESSAGE_BOX(obj : Pointer) : Boolean;
  21. function GNOME_IS_MESSAGE_BOX_CLASS(klass : Pointer) : Boolean;
  22. function gnome_message_box_get_type:TGTKType;cdecl;external libgnomeuidll name 'gnome_message_box_get_type';
  23. function gnome_message_box_new(message:Pgchar; messagebox_type:Pgchar; args:array of const):PGtkWidget;cdecl;external libgnomeuidll name 'gnome_message_box_new';
  24. function gnome_message_box_newv(message:Pgchar; messagebox_type:Pgchar; buttons:PPgchar):PGtkWidget;cdecl;external libgnomeuidll name 'gnome_message_box_newv';
  25. {$EndIf read_interface}
  26. {$Ifdef read_implementation}
  27. function GNOME_TYPE_MESSAGE_BOX : TGTKType;
  28. begin
  29. GNOME_TYPE_MESSAGE_BOX:=gnome_message_box_get_type;
  30. end;
  31. function GNOME_IS_MESSAGE_BOX(obj : Pointer) : Boolean;
  32. begin
  33. GNOME_IS_MESSAGE_BOX:=(obj<>nil) and GNOME_IS_MESSAGE_BOX_CLASS(PGtkTypeObject(obj)^.klass);
  34. end;
  35. function GNOME_IS_MESSAGE_BOX_CLASS(klass : Pointer) : Boolean;
  36. begin
  37. GNOME_IS_MESSAGE_BOX_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GNOME_TYPE_MESSAGE_BOX);
  38. end;
  39. {$Endif read_implementation}