GTK+ 的gtk_dialog_run 返回值备注

http://developer.gnome.org/gtk/2.24/GtkDialog.html


enum GtkResponseType

typedef enum {
  /* GTK returns this if a response widget has no response_id,
   * or if the dialog gets programmatically hidden or destroyed.
   */
  GTK_RESPONSE_NONE = -1,

  /* GTK won't return these unless you pass them in
   * as the response for an action widget. They are
   * for your convenience.
   */
  GTK_RESPONSE_REJECT = -2,
  GTK_RESPONSE_ACCEPT = -3,

  /* If the dialog is deleted. */
  GTK_RESPONSE_DELETE_EVENT = -4,

  /* These are returned from GTK dialogs, and you can also use them
   * yourself if you like.
   */
  GTK_RESPONSE_OK     = -5,
  GTK_RESPONSE_CANCEL = -6,
  GTK_RESPONSE_CLOSE  = -7,
  GTK_RESPONSE_YES    = -8,
  GTK_RESPONSE_NO     = -9,
  GTK_RESPONSE_APPLY  = -10,
  GTK_RESPONSE_HELP   = -11
} GtkResponseType;

Predefined values for use as response ids in gtk_dialog_add_button(). All predefined values are negative, GTK+ leaves positive values for application-defined response ids.

GTK_RESPONSE_NONE

Returned if an action widget has no response id, or if the dialog gets programmatically hidden or destroyed.

GTK_RESPONSE_REJECT

Generic response id, not used by GTK+ dialogs.

GTK_RESPONSE_ACCEPT

Generic response id, not used by GTK+ dialogs.

GTK_RESPONSE_DELETE_EVENT

Returned if the dialog is deleted.

GTK_RESPONSE_OK

Returned by OK buttons in GTK+ dialogs.

GTK_RESPONSE_CANCEL

Returned by Cancel buttons in GTK+ dialogs.

GTK_RESPONSE_CLOSE

Returned by Close buttons in GTK+ dialogs.

GTK_RESPONSE_YES

Returned by Yes buttons in GTK+ dialogs.

GTK_RESPONSE_NO

Returned by No buttons in GTK+ dialogs.

GTK_RESPONSE_APPLY

Returned by Apply buttons in GTK+ dialogs.

GTK_RESPONSE_HELP

Returned by Help buttons in GTK+ dialogs.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值