let get_flag obj wf =
    (get_flags obj) land (Gpointer.encode_variant GtkEnums.widget_flags wf)
      <> 0