[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / gio / gmenumodel.h
index 689c2ce..56db677 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Author: Ryan Lortie <desrt@desrt.ca>
  */
 
 G_BEGIN_DECLS
 
+/**
+ * G_MENU_ATTRIBUTE_ACTION:
+ *
+ * The menu item attribute which holds the action name of the item.  Action
+ * names are namespaced with an identifier for the action group in which the
+ * action resides. For example, "win." for window-specific actions and "app."
+ * for application-wide actions.
+ *
+ * See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute().
+ *
+ * Since: 2.32
+ **/
 #define G_MENU_ATTRIBUTE_ACTION "action"
+
+/**
+ * G_MENU_ATTRIBUTE_ACTION_NAMESPACE:
+ *
+ * The menu item attribute that holds the namespace for all action names in
+ * menus that are linked from this item.
+ *
+ * Since: 2.36
+ **/
+#define G_MENU_ATTRIBUTE_ACTION_NAMESPACE "action-namespace"
+
+/**
+ * G_MENU_ATTRIBUTE_TARGET:
+ *
+ * The menu item attribute which holds the target with which the item's action
+ * will be activated.
+ *
+ * See also g_menu_item_set_action_and_target()
+ *
+ * Since: 2.32
+ **/
 #define G_MENU_ATTRIBUTE_TARGET "target"
+
+/**
+ * G_MENU_ATTRIBUTE_LABEL:
+ *
+ * The menu item attribute which holds the label of the item.
+ *
+ * Since: 2.32
+ **/
 #define G_MENU_ATTRIBUTE_LABEL "label"
 
+/**
+ * G_MENU_ATTRIBUTE_ICON:
+ *
+ * The menu item attribute which holds the icon of the item.
+ *
+ * The icon is stored in the format returned by g_icon_serialize().
+ *
+ * This attribute is intended only to represent 'noun' icons such as
+ * favicons for a webpage, or application icons.  It should not be used
+ * for 'verbs' (ie: stock icons).
+ *
+ * Since: 2.38
+ **/
+#define G_MENU_ATTRIBUTE_ICON "icon"
+
+/**
+ * G_MENU_LINK_SUBMENU:
+ *
+ * The name of the link that associates a menu item with a submenu.
+ *
+ * See also g_menu_item_set_link().
+ *
+ * Since: 2.32
+ **/
 #define G_MENU_LINK_SUBMENU "submenu"
+
+/**
+ * G_MENU_LINK_SECTION:
+ *
+ * The name of the link that associates a menu item with a section.  The linked
+ * menu will usually be shown in place of the menu item, using the item's label
+ * as a header.
+ *
+ * See also g_menu_item_set_link().
+ *
+ * Since: 2.32
+ **/
 #define G_MENU_LINK_SECTION "section"
 
 #define G_TYPE_MENU_MODEL                                   (g_menu_model_get_type ())
@@ -64,6 +139,22 @@ struct _GMenuModel
   GMenuModelPrivate *priv;
 };
 
+/**
+ * GMenuModelClass::get_item_attributes:
+ * @model: the #GMenuModel to query
+ * @item_index: The #GMenuItem to query
+ * @attributes: (out) (element-type utf8 GLib.Variant): Attributes on the item
+ *
+ * Gets all the attributes associated with the item in the menu model.
+ */
+/**
+ * GMenuModelClass::get_item_links:
+ * @model: the #GMenuModel to query
+ * @item_index: The #GMenuItem to query
+ * @links: (out) (element-type utf8 Gio.MenuModel): Links from the item
+ *
+ * Gets all the links associated with the item in the menu model.
+ */
 struct _GMenuModelClass
 {
   GObjectClass parent_class;
@@ -89,28 +180,37 @@ struct _GMenuModelClass
                                                              const gchar         *link);
 };
 
+GLIB_AVAILABLE_IN_2_32
 GType                   g_menu_model_get_type                           (void) G_GNUC_CONST;
 
+GLIB_AVAILABLE_IN_2_32
 gboolean                g_menu_model_is_mutable                         (GMenuModel         *model);
+GLIB_AVAILABLE_IN_2_32
 gint                    g_menu_model_get_n_items                        (GMenuModel         *model);
 
+GLIB_AVAILABLE_IN_2_32
 GMenuAttributeIter *    g_menu_model_iterate_item_attributes            (GMenuModel         *model,
                                                                          gint                item_index);
+GLIB_AVAILABLE_IN_2_32
 GVariant *              g_menu_model_get_item_attribute_value           (GMenuModel         *model,
                                                                          gint                item_index,
                                                                          const gchar        *attribute,
                                                                          const GVariantType *expected_type);
+GLIB_AVAILABLE_IN_2_32
 gboolean                g_menu_model_get_item_attribute                 (GMenuModel         *model,
                                                                          gint                item_index,
                                                                          const gchar        *attribute,
                                                                          const gchar        *format_string,
                                                                          ...);
+GLIB_AVAILABLE_IN_2_32
 GMenuLinkIter *         g_menu_model_iterate_item_links                 (GMenuModel         *model,
                                                                          gint                item_index);
+GLIB_AVAILABLE_IN_2_32
 GMenuModel *            g_menu_model_get_item_link                      (GMenuModel         *model,
                                                                          gint                item_index,
                                                                          const gchar        *link);
 
+GLIB_AVAILABLE_IN_2_32
 void                    g_menu_model_items_changed                      (GMenuModel         *model,
                                                                          gint                position,
                                                                          gint                removed,
@@ -140,17 +240,22 @@ struct _GMenuAttributeIterClass
   GObjectClass parent_class;
 
   gboolean      (*get_next) (GMenuAttributeIter  *iter,
-                             const gchar        **out_type,
+                             const gchar        **out_name,
                              GVariant           **value);
 };
 
+GLIB_AVAILABLE_IN_2_32
 GType                   g_menu_attribute_iter_get_type                  (void) G_GNUC_CONST;
 
+GLIB_AVAILABLE_IN_2_32
 gboolean                g_menu_attribute_iter_get_next                  (GMenuAttributeIter  *iter,
                                                                          const gchar        **out_name,
                                                                          GVariant           **value);
+GLIB_AVAILABLE_IN_2_32
 gboolean                g_menu_attribute_iter_next                      (GMenuAttributeIter  *iter);
+GLIB_AVAILABLE_IN_2_32
 const gchar *           g_menu_attribute_iter_get_name                  (GMenuAttributeIter  *iter);
+GLIB_AVAILABLE_IN_2_32
 GVariant *              g_menu_attribute_iter_get_value                 (GMenuAttributeIter  *iter);
 
 
@@ -177,17 +282,22 @@ struct _GMenuLinkIterClass
   GObjectClass parent_class;
 
   gboolean      (*get_next) (GMenuLinkIter  *iter,
-                             const gchar   **out_name,
+                             const gchar   **out_link,
                              GMenuModel    **value);
 };
 
+GLIB_AVAILABLE_IN_2_32
 GType                   g_menu_link_iter_get_type                       (void) G_GNUC_CONST;
 
+GLIB_AVAILABLE_IN_2_32
 gboolean                g_menu_link_iter_get_next                       (GMenuLinkIter  *iter,
                                                                          const gchar   **out_link,
                                                                          GMenuModel    **value);
+GLIB_AVAILABLE_IN_2_32
 gboolean                g_menu_link_iter_next                           (GMenuLinkIter  *iter);
+GLIB_AVAILABLE_IN_2_32
 const gchar *           g_menu_link_iter_get_name                       (GMenuLinkIter  *iter);
+GLIB_AVAILABLE_IN_2_32
 GMenuModel *            g_menu_link_iter_get_value                      (GMenuLinkIter  *iter);
 
 G_END_DECLS