]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkitemfactory.h
Free label->label_wc.
[~andy/gtk] / gtk / gtkitemfactory.h
index aad4ee635517060563d5d2cccdc63183921685c8..eb7f9f98fd87c983f2631ac3cc88c87079c5c64a 100644 (file)
 
 #ifdef __cplusplus
 extern "C" {
-#pragma }
 #endif /* __cplusplus */
 
 
 typedef void   (*GtkPrintFunc)            (gpointer             func_data,
                                            gchar               *str);
+typedef gchar * (*GtkTranslateFunc)       (const gchar         *path,
+                                           gpointer             func_data);
 typedef        void    (*GtkItemFactoryCallback)  ();
 typedef        void    (*GtkItemFactoryCallback1) (gpointer             callback_data,
                                            guint                callback_action,
                                            GtkWidget           *widget);
-typedef        void    (*GtkItemFactoryCallback2) (GtkWidget           *widget,
-                                           gpointer             callback_data,
-                                           guint                callback_action);
 
 #define        GTK_TYPE_ITEM_FACTORY            (gtk_item_factory_get_type ())
 #define        GTK_ITEM_FACTORY(object)         (GTK_CHECK_CAST (object, GTK_TYPE_ITEM_FACTORY, GtkItemFactory))
@@ -64,6 +62,10 @@ struct _GtkItemFactory
   GtkAccelGroup                *accel_group;
   GtkWidget            *widget;
   GSList               *widgets_by_action;
+
+  GtkTranslateFunc       translate_func;
+  gpointer               translate_data;
+  GtkDestroyNotify       translate_notify;   
 };
 
 struct _GtkItemFactoryClass
@@ -114,8 +116,8 @@ struct _GtkItemFactoryItem
 
 GtkType                gtk_item_factory_get_type           (void);
 
-/* `container_type' must be of gtk_menu_bar_get_type (), gtk_menu_get_type (),
- * or gtk_option_menu_get_type ().
+/* `container_type' must be of GTK_TYPE_MENU_BAR, GTK_TYPE_MENU,
+ * or GTK_TYPE_OPTION_MENU.
  */
 GtkItemFactory*        gtk_item_factory_new       (GtkType              container_type,
                                            const gchar         *path,
@@ -160,11 +162,6 @@ void       gtk_item_factory_create_items   (GtkItemFactory         *ifactory,
                                         guint                   n_entries,
                                         GtkItemFactoryEntry    *entries,
                                         gpointer                callback_data);
-void   gtk_item_factory_create_items_ac(GtkItemFactory         *ifactory,
-                                        guint                   n_entries,
-                                        GtkItemFactoryEntry    *entries,
-                                        gpointer                callback_data,
-                                        guint                   callback_type);
 void   gtk_item_factory_delete_item    (GtkItemFactory         *ifactory,
                                         const gchar            *path);
 void   gtk_item_factory_delete_entry   (GtkItemFactory         *ifactory,
@@ -186,20 +183,30 @@ void      gtk_item_factory_popup_with_data(GtkItemFactory         *ifactory,
                                         guint32                 time);
 gpointer gtk_item_factory_popup_data   (GtkItemFactory         *ifactory);
 gpointer gtk_item_factory_popup_data_from_widget (GtkWidget    *widget);
+void   gtk_item_factory_set_translate_func (GtkItemFactory      *ifactory,
+                                           GtkTranslateFunc     func,
+                                           gpointer             data,
+                                           GtkDestroyNotify     notify);
 
-/* Compatibility functions for ol GtkMenuFactory code
+/* Compatibility functions for deprecated GtkMenuFactory code
  */
 GtkItemFactory*        gtk_item_factory_from_path   (const gchar       *path);
 void   gtk_item_factory_create_menu_entries (guint              n_entries,
                                              GtkMenuEntry      *entries);
 void   gtk_item_factories_path_delete     (const gchar         *ifactory_path,
                                            const gchar         *path);
-
+typedef        void    (*GtkItemFactoryCallback2) (GtkWidget           *widget,
+                                           gpointer             callback_data,
+                                           guint                callback_action);
+void   gtk_item_factory_create_items_ac (GtkItemFactory        *ifactory,
+                                         guint                  n_entries,
+                                         GtkItemFactoryEntry   *entries,
+                                         gpointer               callback_data,
+                                         guint                  callback_type);
 
 
 
 #ifdef __cplusplus
-#pragma {
 }
 #endif /* __cplusplus */