AdwAlertDialog.def 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. DEFINITION MODULE FOR "C" AdwAlertDialog ;
  2. (*
  3. m2-GTK4 - AdwAlertDialog: a simple alert dialog with responses.
  4. Mapped onto <libadwaita-1/adw-alert-dialog.h>.
  5. Choose a response asynchronously with choose(); the callback has the
  6. GAsyncReadyCallback shape
  7. void callback(AdwAlertDialog *source, GAsyncResult *result,
  8. gpointer user_data)
  9. and obtains the chosen response id with choose_finish().
  10. Note: the variadic format_*() and add_responses() helpers are left out.
  11. *)
  12. FROM SYSTEM IMPORT ADDRESS;
  13. FROM AdwEnums IMPORT AdwResponseAppearance;
  14. EXPORT UNQUALIFIED
  15. AdwAlertDialog,
  16. adw_alert_dialog_new,
  17. adw_alert_dialog_add_response, adw_alert_dialog_remove_response,
  18. adw_alert_dialog_has_response,
  19. adw_alert_dialog_get_heading, adw_alert_dialog_set_heading,
  20. adw_alert_dialog_get_body, adw_alert_dialog_set_body,
  21. adw_alert_dialog_get_heading_use_markup,
  22. adw_alert_dialog_set_heading_use_markup,
  23. adw_alert_dialog_get_body_use_markup,
  24. adw_alert_dialog_set_body_use_markup,
  25. adw_alert_dialog_get_close_response, adw_alert_dialog_set_close_response,
  26. adw_alert_dialog_get_default_response,
  27. adw_alert_dialog_set_default_response,
  28. adw_alert_dialog_get_extra_child, adw_alert_dialog_set_extra_child,
  29. adw_alert_dialog_get_prefer_wide_layout,
  30. adw_alert_dialog_set_prefer_wide_layout,
  31. adw_alert_dialog_get_response_appearance,
  32. adw_alert_dialog_set_response_appearance,
  33. adw_alert_dialog_get_response_enabled,
  34. adw_alert_dialog_set_response_enabled,
  35. adw_alert_dialog_get_response_label,
  36. adw_alert_dialog_set_response_label,
  37. adw_alert_dialog_choose, adw_alert_dialog_choose_finish;
  38. TYPE
  39. AdwAlertDialog = ADDRESS;
  40. (* AdwDialog *adw_alert_dialog_new(const char *heading, const char *body) *)
  41. PROCEDURE adw_alert_dialog_new (heading, body: ARRAY OF CHAR) : AdwAlertDialog;
  42. (* void adw_alert_dialog_add_response(AdwAlertDialog *self,
  43. const char *id, const char *label) *)
  44. PROCEDURE adw_alert_dialog_add_response (self: AdwAlertDialog;
  45. id, label: ARRAY OF CHAR);
  46. (* void adw_alert_dialog_remove_response(AdwAlertDialog *self,
  47. const char *id) *)
  48. PROCEDURE adw_alert_dialog_remove_response (self: AdwAlertDialog;
  49. id: ARRAY OF CHAR);
  50. (* gboolean adw_alert_dialog_has_response(AdwAlertDialog *self,
  51. const char *response) *)
  52. PROCEDURE adw_alert_dialog_has_response (self: AdwAlertDialog;
  53. response: ARRAY OF CHAR) : INTEGER;
  54. (* const char *adw_alert_dialog_get_heading(AdwAlertDialog *self) *)
  55. PROCEDURE adw_alert_dialog_get_heading (self: AdwAlertDialog) : ADDRESS;
  56. (* void adw_alert_dialog_set_heading(AdwAlertDialog *self,
  57. const char *heading) *)
  58. PROCEDURE adw_alert_dialog_set_heading (self: AdwAlertDialog;
  59. heading: ARRAY OF CHAR);
  60. (* const char *adw_alert_dialog_get_body(AdwAlertDialog *self) *)
  61. PROCEDURE adw_alert_dialog_get_body (self: AdwAlertDialog) : ADDRESS;
  62. (* void adw_alert_dialog_set_body(AdwAlertDialog *self, const char *body) *)
  63. PROCEDURE adw_alert_dialog_set_body (self: AdwAlertDialog;
  64. body: ARRAY OF CHAR);
  65. (* gboolean adw_alert_dialog_get_heading_use_markup(AdwAlertDialog *self) *)
  66. PROCEDURE adw_alert_dialog_get_heading_use_markup (self: AdwAlertDialog)
  67. : INTEGER;
  68. (* void adw_alert_dialog_set_heading_use_markup(AdwAlertDialog *self,
  69. gboolean use_markup) *)
  70. PROCEDURE adw_alert_dialog_set_heading_use_markup (self: AdwAlertDialog;
  71. use_markup: INTEGER);
  72. (* gboolean adw_alert_dialog_get_body_use_markup(AdwAlertDialog *self) *)
  73. PROCEDURE adw_alert_dialog_get_body_use_markup (self: AdwAlertDialog)
  74. : INTEGER;
  75. (* void adw_alert_dialog_set_body_use_markup(AdwAlertDialog *self,
  76. gboolean use_markup) *)
  77. PROCEDURE adw_alert_dialog_set_body_use_markup (self: AdwAlertDialog;
  78. use_markup: INTEGER);
  79. (* const char *adw_alert_dialog_get_close_response(AdwAlertDialog *self) *)
  80. PROCEDURE adw_alert_dialog_get_close_response (self: AdwAlertDialog) : ADDRESS;
  81. (* void adw_alert_dialog_set_close_response(AdwAlertDialog *self,
  82. const char *response) *)
  83. PROCEDURE adw_alert_dialog_set_close_response (self: AdwAlertDialog;
  84. response: ARRAY OF CHAR);
  85. (* const char *adw_alert_dialog_get_default_response(AdwAlertDialog *self) *)
  86. PROCEDURE adw_alert_dialog_get_default_response (self: AdwAlertDialog)
  87. : ADDRESS;
  88. (* void adw_alert_dialog_set_default_response(AdwAlertDialog *self,
  89. const char *response) *)
  90. PROCEDURE adw_alert_dialog_set_default_response (self: AdwAlertDialog;
  91. response: ARRAY OF CHAR);
  92. (* GtkWidget *adw_alert_dialog_get_extra_child(AdwAlertDialog *self) *)
  93. PROCEDURE adw_alert_dialog_get_extra_child (self: AdwAlertDialog) : ADDRESS;
  94. (* void adw_alert_dialog_set_extra_child(AdwAlertDialog *self,
  95. GtkWidget *child) *)
  96. PROCEDURE adw_alert_dialog_set_extra_child (self: AdwAlertDialog;
  97. child: ADDRESS);
  98. (* gboolean adw_alert_dialog_get_prefer_wide_layout(AdwAlertDialog *self) *)
  99. PROCEDURE adw_alert_dialog_get_prefer_wide_layout (self: AdwAlertDialog)
  100. : INTEGER;
  101. (* void adw_alert_dialog_set_prefer_wide_layout(AdwAlertDialog *self,
  102. gboolean prefer_wide_layout) *)
  103. PROCEDURE adw_alert_dialog_set_prefer_wide_layout (self: AdwAlertDialog;
  104. prefer_wide_layout: INTEGER);
  105. (* AdwResponseAppearance adw_alert_dialog_get_response_appearance(
  106. AdwAlertDialog *self, const char *response) *)
  107. PROCEDURE adw_alert_dialog_get_response_appearance (self: AdwAlertDialog;
  108. response: ARRAY OF CHAR)
  109. : AdwResponseAppearance;
  110. (* void adw_alert_dialog_set_response_appearance(
  111. AdwAlertDialog *self, const char *response,
  112. AdwResponseAppearance appearance) *)
  113. PROCEDURE adw_alert_dialog_set_response_appearance
  114. (self: AdwAlertDialog; response: ARRAY OF CHAR;
  115. appearance: AdwResponseAppearance);
  116. (* gboolean adw_alert_dialog_get_response_enabled(AdwAlertDialog *self,
  117. const char *response) *)
  118. PROCEDURE adw_alert_dialog_get_response_enabled (self: AdwAlertDialog;
  119. response: ARRAY OF CHAR)
  120. : INTEGER;
  121. (* void adw_alert_dialog_set_response_enabled(AdwAlertDialog *self,
  122. const char *response,
  123. gboolean enabled) *)
  124. PROCEDURE adw_alert_dialog_set_response_enabled (self: AdwAlertDialog;
  125. response: ARRAY OF CHAR;
  126. enabled: INTEGER);
  127. (* const char *adw_alert_dialog_get_response_label(AdwAlertDialog *self,
  128. const char *response) *)
  129. PROCEDURE adw_alert_dialog_get_response_label (self: AdwAlertDialog;
  130. response: ARRAY OF CHAR)
  131. : ADDRESS;
  132. (* void adw_alert_dialog_set_response_label(AdwAlertDialog *self,
  133. const char *response,
  134. const char *label) *)
  135. PROCEDURE adw_alert_dialog_set_response_label (self: AdwAlertDialog;
  136. response: ARRAY OF CHAR;
  137. label: ARRAY OF CHAR);
  138. (* void adw_alert_dialog_choose(AdwAlertDialog *self, GtkWidget *parent,
  139. GCancellable *cancellable,
  140. GAsyncReadyCallback callback,
  141. gpointer user_data) *)
  142. PROCEDURE adw_alert_dialog_choose (self: AdwAlertDialog; parent: ADDRESS;
  143. cancellable: ADDRESS; callback: ADDRESS;
  144. user_data: ADDRESS);
  145. (* const char *adw_alert_dialog_choose_finish(AdwAlertDialog *self,
  146. GAsyncResult *result) *)
  147. PROCEDURE adw_alert_dialog_choose_finish (self: AdwAlertDialog;
  148. result: ADDRESS) : ADDRESS;
  149. END AdwAlertDialog.