Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[0ed57a]: trunk / libgxw / gxw / gxinit.cpp Maximize Restore History

Download this file

gxinit.cpp    83 lines (77 with data), 2.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "gxinit.h"
#include "gximages.cc"
typedef struct {
const char *icon_name;
const guint8 *icon_data;
} image_entry;
static image_entry image_data[] = {
{ "button_off", pb_button_off },
{ "button_on", pb_button_on },
{ "eqslider", pb_eqslider },
{ "levelslider", pb_levelslider },
{ "bigknob", pb_knob1 },
{ "led_off", pb_led_off },
{ "led_on", pb_led_on },
{ "minislider", pb_minislider },
{ "minitoggle_off", pb_minitoggle_off },
{ "minitoggle_on", pb_minitoggle_on },
{ "hslider", pb_hslider },
{ "smallknob", pb_smallknob1 },
{ "smallknobr", pb_knob_medium },
{ "switchit_off", pb_switchit_off },
{ "switchit_on", pb_switchit_on },
{ "switch_off", pb_switch_off },
{ "switch_on", pb_switch_on },
{ "pbutton_on", pb_pbutton_on },
{ "pbutton_off", pb_pbutton_off },
{ "rbutton_on", pb_rbutton_on },
{ "rbutton_off", pb_rbutton_off },
{ "vslider", pb_vslider },
{ "wheel_back", pb_wheel_back },
{ "wheel_vertical_back", pb_wheel_vertical_back },
{ "wheel_fringe", pb_wheel_fringe },
{ "wheel_pointer", pb_wheel_pointer },
{ "tribe", pb_tribe },
{ "guitar", pb_guitar },
{ "gxhead", pb_gxhead },
{ "gxhead_face", pb_gxhead_face },
{ "main_image", pb_gxhead },
{ "gxplate", pb_gxplate },
{ "gxplate2", pb_gxplate2 },
{ "gxplate3", pb_gxplate3 },
{ "portdisplay", pb_portdisplay },
{ "texture_cab", pb_texture_cab },
{ "guitarix", pb_guitarix },
{ "screw", pb_screw },
{ NULL, NULL },
};
void gxw_init()
{
g_type_init();
GtkIconFactory *factory = gtk_icon_factory_new();
for (image_entry *p = image_data; p->icon_name; p++) {
gtk_icon_factory_add(
factory, p->icon_name,
gtk_icon_set_new_from_pixbuf(
gdk_pixbuf_new_from_inline(
-1, p->icon_data, FALSE, NULL)));
}
gtk_icon_factory_add_default(factory);
}