[beast: 11/26] BEAST: use Bse:: Category, CategorySeq and Icon from bseapi.idl everywhere
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 11/26] BEAST: use Bse:: Category, CategorySeq and Icon from bseapi.idl everywhere
- Date: Fri, 14 Oct 2016 15:48:55 +0000 (UTC)
commit aeb1ec2939c3e579bdbba285a7a23b76162e70e2
Author: Tim Janik <timj gnu org>
Date: Sat May 28 22:30:07 2016 +0200
BEAST: use Bse:: Category, CategorySeq and Icon from bseapi.idl everywhere
Signed-off-by: Tim Janik <timj gnu org>
beast-gtk/bstapp.cc | 15 +++++-----
beast-gtk/bstbseutils.cc | 23 ++++++++-------
beast-gtk/bstbseutils.hh | 2 +-
beast-gtk/bstcanvassource.cc | 6 ++--
beast-gtk/bstmenus.cc | 29 +++++++++-----------
beast-gtk/bstmenus.hh | 18 ++++++------
beast-gtk/bstpartdialog.cc | 7 ++---
beast-gtk/bstsnetrouter.cc | 10 +++----
beast-gtk/bstusermessage.cc | 6 ++--
beast-gtk/bstutils.cc | 62 ++++++++++++++++-------------------------
beast-gtk/bstutils.hh | 16 +++-------
11 files changed, 84 insertions(+), 110 deletions(-)
---
diff --git a/beast-gtk/bstapp.cc b/beast-gtk/bstapp.cc
index 7c97885..324ff55 100644
--- a/beast-gtk/bstapp.cc
+++ b/beast-gtk/bstapp.cc
@@ -199,7 +199,6 @@ bst_app_init (BstApp *self)
{
new (&self->project) Bse::ProjectH();
GtkWidget *widget = GTK_WIDGET (self);
- BseCategorySeq *cseq;
GxkActionList *al1, *al2;
g_object_set (self,
@@ -248,26 +247,26 @@ bst_app_init (BstApp *self)
gxk_widget_publish_actions (self, "demo-dialogs", G_N_ELEMENTS (demo_dialogs), demo_dialogs,
NULL, app_action_check, app_action_exec);
/* Project utilities */
- cseq = bse_categories_match ("/Project/*");
+ Bse::CategorySeq cseq = bse_server.category_match ("/Project/*");
al1 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, bst_app_run_script_proc, self);
gxk_action_list_sort (al1);
gxk_widget_publish_action_list (widget, "tools-project", al1);
/* Song scripts */
- cseq = bse_categories_match ("/Song/*");
+ cseq = bse_server.category_match ("/Song/*");
al1 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, bst_app_run_script_proc, self);
gxk_action_list_sort (al1);
gxk_widget_publish_action_list (widget, "tools-song", al1);
/* CSynth & SNet utilities */
- cseq = bse_categories_match ("/CSynth/*");
+ cseq = bse_server.category_match ("/CSynth/*");
al1 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, bst_app_run_script_proc, self);
gxk_action_list_sort (al1);
- cseq = bse_categories_match ("/SNet/*");
+ cseq = bse_server.category_match ("/SNet/*");
al2 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, bst_app_run_script_proc, self);
gxk_action_list_sort (al2);
al1 = gxk_action_list_merge (al1, al2);
gxk_widget_publish_action_list (widget, "tools-synth", al1);
/* WaveRepo utilities */
- cseq = bse_categories_match ("/WaveRepo/*");
+ cseq = bse_server.category_match ("/WaveRepo/*");
al1 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, bst_app_run_script_proc, self);
gxk_action_list_sort (al1);
gxk_widget_publish_action_list (widget, "tools-wave-repo", al1);
@@ -791,7 +790,7 @@ static void
bst_app_run_script_proc (gpointer data, size_t action_id)
{
BstApp *self = BST_APP (data);
- BseCategory *cat = bse_category_find (g_quark_to_string (action_id));
+ Bse::Category cat = bst_category_find (g_quark_to_string (action_id));
SfiProxy super = bst_app_get_current_super (self);
const gchar *song = "", *wave_repo = "", *snet = "", *csynth = "";
@@ -806,7 +805,7 @@ bst_app_run_script_proc (gpointer data, size_t action_id)
csynth = "custom-synth";
}
- bst_procedure_exec_auto (cat->otype,
+ bst_procedure_exec_auto (cat.otype.c_str(),
"project", SFI_TYPE_PROXY, self->project.proxy_id(),
song, SFI_TYPE_PROXY, super,
wave_repo, SFI_TYPE_PROXY, super,
diff --git a/beast-gtk/bstbseutils.cc b/beast-gtk/bstbseutils.cc
index 514cc88..bd4ea0b 100644
--- a/beast-gtk/bstbseutils.cc
+++ b/beast-gtk/bstbseutils.cc
@@ -1,5 +1,6 @@
// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
#include "bstbseutils.hh"
+#include "bstutils.hh"
/* --- BEAST utilities --- */
Bse::Error
@@ -61,23 +62,23 @@ bst_procedure_get_title (const gchar *procedure)
{
if (procedure)
{
- BseCategorySeq *cseq = bse_categories_match_typed ("*", procedure);
- if (cseq->n_cats)
- return cseq->cats[0]->category + bst_path_leaf_index (cseq->cats[0]->category);
+ Bse::CategorySeq cseq = bse_server.category_match_typed ("*", procedure);
+ if (cseq.size())
+ return cseq[0].category.c_str() + bst_path_leaf_index (cseq[0].category);
}
return NULL;
}
-BseCategory*
-bse_category_find (const gchar* pattern)
+Bse::Category
+bst_category_find (const String &pattern)
{
- BseCategorySeq *cseq = NULL;
- if (pattern)
- cseq = bse_categories_match (pattern);
- if (cseq && cseq->n_cats == 1)
- return cseq->cats[0];
- return NULL;
+ Bse::CategorySeq cseq;
+ if (!pattern.empty())
+ cseq = bse_server.category_match (pattern);
+ if (cseq.size() == 1)
+ return cseq[0];
+ return Bse::Category();
}
/// Return the character index of the last string segment not containing @a separator.
diff --git a/beast-gtk/bstbseutils.hh b/beast-gtk/bstbseutils.hh
index 4f35009..0facb5d 100644
--- a/beast-gtk/bstbseutils.hh
+++ b/beast-gtk/bstbseutils.hh
@@ -40,7 +40,7 @@ Bse::Error bst_project_import_midi_file (Bse::ProjectH project,
const gchar *file_name);
const gchar* bst_procedure_get_title (const gchar *procedure);
uint bst_path_leaf_index (const String &path, char separator = '/');
-BseCategory* bse_category_find (const gchar* pattern);
+Bse::Category bst_category_find (const String &pattern);
G_END_DECLS
diff --git a/beast-gtk/bstcanvassource.cc b/beast-gtk/bstcanvassource.cc
index b485344..a60d7f7 100644
--- a/beast-gtk/bstcanvassource.cc
+++ b/beast-gtk/bstcanvassource.cc
@@ -341,9 +341,9 @@ csource_info_update (BstCanvasSource *csource)
/* type & category */
gxk_scroll_text_push_indent (text);
gxk_scroll_text_aprintf (text, "Type: %s\n", bse_item_get_type_name (csource->source));
- BseCategorySeq *cseq = bse_categories_match_typed ("*", bse_item_get_type (csource->source));
- if (cseq->n_cats)
- gxk_scroll_text_aprintf (text, "Category: %s\n", cseq->cats[0]->category);
+ Bse::CategorySeq cseq = bse_server.category_match_typed ("*", bse_item_get_type_name
(csource->source));
+ if (cseq.size())
+ gxk_scroll_text_aprintf (text, "Category: %s\n", cseq[0].category);
gxk_scroll_text_pop_indent (text);
/* input channels */
diff --git a/beast-gtk/bstmenus.cc b/beast-gtk/bstmenus.cc
index 1195d46..8d8ed00 100644
--- a/beast-gtk/bstmenus.cc
+++ b/beast-gtk/bstmenus.cc
@@ -4,13 +4,13 @@
/* --- structures --- */
-struct _BstChoice
-{
+struct BstChoice {
BstChoiceFlags type_and_flags;
const gchar *icon_stock_id;
- BseIc0n *bse_icon;
+ Bse::Icon bseicon;
const gchar *name;
- gpointer p_id;
+ void *p_id;
+ BstChoice() : type_and_flags (BST_CHOICE_TYPE_SEPARATOR), icon_stock_id (NULL), name (NULL), p_id (NULL) {}
};
@@ -26,13 +26,12 @@ bst_choice_alloc (BstChoiceFlags type,
const gchar *choice_name,
gpointer choice_id,
const gchar *icon_stock_id,
- BseIc0n *icon)
+ const Bse::Icon &bseicon)
{
- BstChoice *choice = g_new (BstChoice, 1);
-
+ BstChoice *choice = new BstChoice();
choice->type_and_flags = type;
choice->icon_stock_id = icon_stock_id;
- choice->bse_icon = icon ? bse_ic0n_copy_shallow (icon) : NULL;
+ choice->bseicon = bseicon;
choice->name = choice_name;
choice->p_id = choice_id;
@@ -40,6 +39,12 @@ bst_choice_alloc (BstChoiceFlags type,
}
static void
+free_choice (BstChoice *choice)
+{
+ delete choice;
+}
+
+static void
menu_choice_activate (GtkWidget *item,
gpointer data)
{
@@ -101,14 +106,6 @@ menu_item_add_activator (GtkWidget *widget,
NULL);
}
-static void
-free_choice (BstChoice *choice)
-{
- if (choice->bse_icon)
- bse_ic0n_free (choice->bse_icon);
- g_free (choice);
-}
-
void
bst_choice_menu_add_choice_and_free (GtkWidget *menu,
BstChoice *choice)
diff --git a/beast-gtk/bstmenus.hh b/beast-gtk/bstmenus.hh
index b786edc..250f8de 100644
--- a/beast-gtk/bstmenus.hh
+++ b/beast-gtk/bstmenus.hh
@@ -9,7 +9,7 @@ G_BEGIN_DECLS
/* --- BstChoice --- */
/* BstChoice are simple inlined popup menus for modal selections.
*/
-typedef struct _BstChoice BstChoice;
+struct BstChoice;
GtkWidget* bst_choice_menu_createv (const gchar *menu_path,
BstChoice *first_choice,
@@ -31,24 +31,24 @@ void bst_choice_destroy (GtkWidget *choice);
/* --- BstChoice shortcuts --- */
#define BST_CHOICE_TITLE(name) (bst_choice_alloc (BST_CHOICE_TYPE_TITLE, \
- (name), NULL, BST_STOCK_NONE, 0))
+ (name), NULL, BST_STOCK_NONE, Bse::Icon()))
#define BST_CHOICE(id, name, bst_icon) (bst_choice_alloc (BST_CHOICE_TYPE_ITEM, \
(name), (void*) (size_t) (id), \
- BST_STOCK_ ## bst_icon, 0))
+ BST_STOCK_ ## bst_icon, Bse::Icon()))
#define BST_CHOICE_D(id, name, bst_icon) (bst_choice_alloc (BST_CHOICE_TYPE_ITEM | \
BST_CHOICE_FLAG_DEFAULT, \
(name), (void*) (size_t) (id), \
- BST_STOCK_ ## bst_icon, 0))
+ BST_STOCK_ ## bst_icon, Bse::Icon()))
#define BST_CHOICE_S(id, name, icon, s) (bst_choice_alloc (BST_CHOICE_TYPE_ITEM | \
((s) ? (BstChoiceFlags) 0 :
BST_CHOICE_FLAG_INSENSITIVE), \
(name), (void*) (size_t) (id), \
- BST_STOCK_ ## icon, 0))
+ BST_STOCK_ ## icon, Bse::Icon()))
#define BST_CHOICE_SUBMENU(nam,menu,icn) (bst_choice_alloc (BST_CHOICE_TYPE_SUBMENU, \
- (nam), (menu), BST_STOCK_ ## icn, 0))
+ (nam), (menu), BST_STOCK_ ## icn, Bse::Icon()))
#define BST_CHOICE_TEXT(name) (bst_choice_alloc (BST_CHOICE_TYPE_TEXT, \
- (name), NULL, BST_STOCK_NONE, 0))
+ (name), NULL, BST_STOCK_NONE, Bse::Icon()))
#define BST_CHOICE_SEPERATOR (bst_choice_alloc (BST_CHOICE_TYPE_SEPARATOR, \
- NULL, NULL, BST_STOCK_NONE, 0))
+ NULL, NULL, BST_STOCK_NONE, Bse::Icon()))
#define BST_CHOICE_END (NULL)
@@ -69,7 +69,7 @@ BstChoice* bst_choice_alloc (BstChoiceFlags type,
const gchar *choice_name,
gpointer choice_id,
const gchar *icon_stock_id,
- BseIc0n *bse_icon);
+ const Bse::Icon &bseicon);
G_END_DECLS
diff --git a/beast-gtk/bstpartdialog.cc b/beast-gtk/bstpartdialog.cc
index 0070c85..3c4ae56 100644
--- a/beast-gtk/bstpartdialog.cc
+++ b/beast-gtk/bstpartdialog.cc
@@ -104,7 +104,6 @@ bst_part_dialog_init (BstPartDialog *self)
{
new (&self->project) Bse::ProjectH();
GtkRange *srange;
- BseCategorySeq *cseq;
GxkActionList *al1;
GtkObject *adjustment;
GtkAdjustment *adj;
@@ -133,7 +132,7 @@ bst_part_dialog_init (BstPartDialog *self)
NULL, part_dialog_action_check, part_dialog_action_exec);
/* publish /Part/ scripts */
- cseq = bse_categories_match ("/Part/*");
+ Bse::CategorySeq cseq = bse_server.category_match ("/Part/*");
al1 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, part_dialog_run_script_proc, self);
gxk_action_list_sort (al1);
gxk_widget_publish_action_list (self, "part-scripts", al1);
@@ -324,10 +323,10 @@ static void
part_dialog_run_script_proc (gpointer data, size_t action_id)
{
BstPartDialog *self = BST_PART_DIALOG (data);
- BseCategory *cat = bse_category_find (g_quark_to_string (action_id));
+ Bse::Category cat = bst_category_find (g_quark_to_string (action_id));
Bse::PartH part = self->proll->part;
- bst_procedure_exec_auto (cat->otype,
+ bst_procedure_exec_auto (cat.otype.c_str(),
"project", SFI_TYPE_PROXY, bse_item_get_project (part.proxy_id()),
"part", SFI_TYPE_PROXY, part.proxy_id(),
NULL);
diff --git a/beast-gtk/bstsnetrouter.cc b/beast-gtk/bstsnetrouter.cc
index 8487426..d15fc96 100644
--- a/beast-gtk/bstsnetrouter.cc
+++ b/beast-gtk/bstsnetrouter.cc
@@ -320,8 +320,8 @@ static void
bst_router_run_method (gpointer user_data, size_t action_id)
{
BstSNetRouter *self = BST_SNET_ROUTER (user_data);
- BseCategory *cat = bse_category_find (g_quark_to_string (action_id));
- bst_procedure_exec_auto (cat->otype,
+ Bse::Category cat = bst_category_find (g_quark_to_string (action_id));
+ bst_procedure_exec_auto (cat.otype.c_str(),
"synth-net", SFI_TYPE_PROXY, self->snet.proxy_id(),
BSE_IS_CSYNTH (self->snet.proxy_id()) ? "custom-synth" : "", SFI_TYPE_PROXY,
self->snet.proxy_id(),
NULL);
@@ -1016,11 +1016,10 @@ bst_snet_router_init (BstSNetRouter *self)
NULL);
/* CSynth & SNet utilities */
- BseCategorySeq *cseq;
- cseq = bse_categories_match ("/CSynth/*");
+ Bse::CategorySeq cseq = bse_server.category_match ("/CSynth/*");
al1 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, bst_router_run_method, self);
gxk_action_list_sort (al1);
- cseq = bse_categories_match ("/SNet/*");
+ cseq = bse_server.category_match ("/SNet/*");
al2 = bst_action_list_from_cats (cseq, 1, BST_STOCK_EXECUTE, NULL, bst_router_run_method, self);
gxk_action_list_sort (al2);
al1 = gxk_action_list_merge (al1, al2);
@@ -1033,7 +1032,6 @@ bst_snet_router_init (BstSNetRouter *self)
gxk_widget_publish_actions (self, "router-toolbar-actions",
G_N_ELEMENTS (router_toolbar_actions), router_toolbar_actions,
NULL, NULL, snet_router_action_exec);
- cseq = NULL;
// construct module type action lists
canvas_modules = gxk_action_list_create_grouped (self->canvas_tool);
diff --git a/beast-gtk/bstusermessage.cc b/beast-gtk/bstusermessage.cc
index 1862362..e4bd84a 100644
--- a/beast-gtk/bstusermessage.cc
+++ b/beast-gtk/bstusermessage.cc
@@ -481,9 +481,9 @@ message_fill_from_script (BstMessage *msg,
const gchar *proc_title = NULL;
if (hastext (proc_name))
{
- BseCategorySeq *cseq = bse_categories_match_typed ("*", proc_name);
- if (cseq->n_cats)
- proc_title = cseq->cats[0]->category + bst_path_leaf_index (cseq->cats[0]->category);
+ Bse::CategorySeq cseq = bse_server.category_match_typed ("*", proc_name);
+ if (cseq.size())
+ proc_title = cseq[0].category.c_str() + bst_path_leaf_index (cseq[0].category);
}
msg->title = g_strdup (proc_title);
msg->primary = g_strdup (primary ? primary : proc_title);
diff --git a/beast-gtk/bstutils.cc b/beast-gtk/bstutils.cc
index d72175a..fb99cdd 100644
--- a/beast-gtk/bstutils.cc
+++ b/beast-gtk/bstutils.cc
@@ -143,17 +143,12 @@ bst_stock_icon_button (const gchar *stock_id)
}
void
-bst_stock_register_icon (const gchar *stock_id,
- guint bytes_per_pixel,
- guint width,
- guint height,
- guint rowstride,
- const guint8 *pixels)
+bst_stock_register_icon (const String &stock_id, uint bytes_per_pixel, uint width, uint height, uint
rowstride, const uint8 *pixels)
{
assert_return (bytes_per_pixel == 3 || bytes_per_pixel == 4);
assert_return (width > 0 && height > 0 && rowstride >= width * bytes_per_pixel);
- if (!gtk_icon_factory_lookup (stock_icon_factory, stock_id))
+ if (!gtk_icon_factory_lookup (stock_icon_factory, stock_id.c_str()))
{
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data ((guchar*) g_memdup (pixels, rowstride * height),
GDK_COLORSPACE_RGB, bytes_per_pixel == 4,
@@ -162,7 +157,7 @@ bst_stock_register_icon (const gchar *stock_id,
(GdkPixbufDestroyNotify) g_free, NULL);
GtkIconSet *iset = gtk_icon_set_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
- gtk_icon_factory_add (stock_icon_factory, stock_id, iset);
+ gtk_icon_factory_add (stock_icon_factory, stock_id.c_str(), iset);
gtk_icon_set_unref (iset);
}
}
@@ -476,39 +471,34 @@ bst_hpack0 (const gchar *first_location,
}
void
-bst_action_list_add_cat (GxkActionList *alist,
- BseCategory *cat,
- guint skip_levels,
- const gchar *stock_fallback,
- GxkActionCheck acheck,
- GxkActionExec aexec,
- gpointer user_data)
+bst_action_list_add_cat (GxkActionList *alist, const Bse::Category &cat, uint skip_levels, const char
*stock_fallback,
+ GxkActionCheck acheck, GxkActionExec aexec, void *user_data)
{
- const gchar *p, *stock_id;
-
- if (cat->icon)
+ const char *p;
+ String stock_id;
+ if (cat.icon.pixels.size())
{
- BseIc0n *icon = cat->icon;
- assert (icon->width * icon->height == int (icon->pixel_seq->n_pixels));
- bst_stock_register_icon (cat->category, 4,
- icon->width, icon->height,
- icon->width * 4,
- (guchar*) icon->pixel_seq->pixels);
- stock_id = cat->category;
+ const Bse::Icon &icon = cat.icon;
+ assert (icon.width * size_t (icon.height) == icon.pixels.size());
+ bst_stock_register_icon (cat.category, 4,
+ icon.width, icon.height,
+ icon.width * 4,
+ (uint8*) &icon.pixels[0]);
+ stock_id = cat.category;
}
else
stock_id = stock_fallback;
- p = cat->category[0] == '/' ? cat->category + 1 : cat->category;
+ p = cat.category[0] == '/' ? cat.category.c_str() + 1 : cat.category.c_str();
while (skip_levels--)
{
- const gchar *d = strchr (p, '/');
+ const char *d = strchr (p, '/');
p = d ? d + 1 : p;
}
gxk_action_list_add_translated (alist, NULL, p, NULL,
- gxk_factory_path_get_leaf (cat->category),
- g_quark_from_string (cat->category), stock_id,
+ gxk_factory_path_get_leaf (cat.category.c_str()),
+ g_quark_from_string (cat.category.c_str()), stock_id.c_str(),
acheck, aexec, user_data);
}
@@ -542,7 +532,7 @@ bst_action_list_add_module (GxkActionList *alist, const Bse::AuxData &ad, const
}
GxkActionList*
-bst_action_list_from_cats_pred (BseCategorySeq *cseq,
+bst_action_list_from_cats_pred (const Bse::CategorySeq &cseq,
guint skip_levels,
const gchar *stock_fallback,
GxkActionCheck acheck,
@@ -552,18 +542,14 @@ bst_action_list_from_cats_pred (BseCategorySeq *cseq,
gpointer predicate_data)
{
GxkActionList *alist = gxk_action_list_create ();
- guint i;
-
- assert_return (cseq != NULL, alist);
-
- for (i = 0; i < cseq->n_cats; i++)
- if (!predicate || predicate (predicate_data, cseq->cats[i]))
- bst_action_list_add_cat (alist, cseq->cats[i], skip_levels, stock_fallback, acheck, aexec, user_data);
+ for (size_t i = 0; i < cseq.size(); i++)
+ if (!predicate || predicate (predicate_data, cseq[i]))
+ bst_action_list_add_cat (alist, cseq[i], skip_levels, stock_fallback, acheck, aexec, user_data);
return alist;
}
GxkActionList*
-bst_action_list_from_cats (BseCategorySeq *cseq,
+bst_action_list_from_cats (const Bse::CategorySeq &cseq,
guint skip_levels,
const gchar *stock_fallback,
GxkActionCheck acheck,
diff --git a/beast-gtk/bstutils.hh b/beast-gtk/bstutils.hh
index e84e76a..08cbb96 100644
--- a/beast-gtk/bstutils.hh
+++ b/beast-gtk/bstutils.hh
@@ -45,19 +45,18 @@ GtkWidget* bst_vpack0 (const gchar *first_location,
...) G_GNUC_NULL_TERMINATED;
GtkWidget* bst_hpack0 (const gchar *first_location,
...) G_GNUC_NULL_TERMINATED;
-void bst_action_list_add_cat (GxkActionList *alist, BseCategory *cat, uint skip_levels, const char
*stock_fallback,
+void bst_action_list_add_cat (GxkActionList *alist, const Bse::Category &cat, uint skip_levels, const
char *stock_fallback,
GxkActionCheck acheck, GxkActionExec aexec, gpointer user_data);
void bst_action_list_add_module (GxkActionList *alist, const Bse::AuxData &ad, const Bse::Icon &icon, const
char *stock_fallback,
GxkActionCheck acheck, GxkActionExec aexec, gpointer user_data);
-GxkActionList* bst_action_list_from_cats (BseCategorySeq *cseq,
+GxkActionList* bst_action_list_from_cats (const Bse::CategorySeq &cseq,
guint skip_levels,
const gchar *stock_fallback,
GxkActionCheck acheck,
GxkActionExec aexec,
gpointer user_data);
-typedef gboolean (*BstActionListCategoryP) (gpointer predicate_data,
- BseCategory *cat);
-GxkActionList* bst_action_list_from_cats_pred (BseCategorySeq *cseq,
+typedef gboolean (*BstActionListCategoryP) (gpointer predicate_data, const Bse::Category &cat);
+GxkActionList* bst_action_list_from_cats_pred (const Bse::CategorySeq &cseq,
guint skip_levels,
const gchar *stock_fallback,
GxkActionCheck acheck,
@@ -77,12 +76,7 @@ void bst_background_handler2_add (gboolean (*handler) (gpoint
GtkWidget* bst_stock_button (const gchar *stock_id);
GtkWidget* bst_stock_dbutton (const gchar *stock_id);
GtkWidget* bst_stock_icon_button (const gchar *stock_id);
-void bst_stock_register_icon (const gchar *stock_id,
- guint bytes_per_pixel,
- guint width,
- guint height,
- guint rowstride,
- const guint8 *pixels);
+void bst_stock_register_icon (const String &stock_id, uint bytes_per_pixel, uint width, uint
height, uint rowstride, const uint8 *pixels);
/* --- pixbuf shortcuts --- */
#define bst_pixbuf_no_icon() gxk_stock_fallback_pixbuf (BST_STOCK_NO_ICON)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]