b90341f30ae9836181043046d69a5a049c5e1b9c
[pandora-libraries.git] / minimenu / freedesktop_cats.c
1
2 #include <stdio.h>
3 #include <strings.h>
4
5 #include "freedesktop_cats.h"
6
7 // folks want to limit categories to official ones, so okay.
8 // http://standards.freedesktop.org/menu-spec/latest/apa.html
9 //
10
11 char *freedesktop_approved_cats[] = {
12   "AudioVideo",
13   "Audio",
14   "Video",
15   "Development",
16   "Education",
17   "Game",
18   "Graphics",
19   "Network",
20   "Office",
21   "Settings",
22   "System",
23   "Utility",
24   "Building",
25   "Debugger",
26   "IDE",
27   "GUIDesigner",
28   "Profiling",
29   "RevisionControl",
30   "Translation",
31   "Calendar",
32   "ContactManagement",
33   "Database",
34   "Dictionary",
35   "Chart",
36   "Email",
37   "Finance",
38   "FlowChart",
39   "PDA",
40   "ProjectManagement",
41   "Presentation",
42   "Spreadsheet",
43   "WordProcessor",
44   "2DGraphics",
45   "VectorGraphics",
46   "RasterGraphics",
47   "3DGraphics",
48   "Scanning",
49   "OCR",
50   "Photography",
51   "Publishing",
52   "Viewer",
53   "TextTools",
54   "DesktopSettings",
55   "HardwareSettings",
56   "Printing",
57   "PackageManager",
58   "Dialup",
59   "InstantMessaging",
60   "Chat",
61   "IRCClient",
62   "FileTransfer",
63   "HamRadio",
64   "News",
65   "P2P",
66   "RemoteAccess",
67   "Telephony",
68   "TelephonyTools",
69   "VideoConference",
70   "WebBrowser",
71   "WebDevelopment",
72   "Midi",
73   "Mixer",
74   "Sequencer",
75   "Tuner",
76   "TV",
77   "AudioVideoEditing",
78   "Player",
79   "Recorder",
80   "DiscBurning",
81   "ActionGame",
82   "AdventureGame",
83   "ArcadeGame",
84   "BoardGame",
85   "BlocksGame",
86   "CardGame",
87   "KidsGame",
88   "LogicGame",
89   "RolePlaying",
90   "Simulation",
91   "SportsGame",
92   "StrategyGame",
93   "Art",
94   "Construction",
95   "Music",
96   "Languages",
97   "Science",
98   "ArtificialIntelligence",
99   "Astronomy",
100   "Biology",
101   "Chemistry",
102   "ComputerScience",
103   "DataVisualization",
104   "Economy",
105   "Electricity",
106   "Geography",
107   "Geology",
108   "Geoscience",
109   "History",
110   "ImageProcessing",
111   "Literature",
112   "Math",
113   "NumericalAnalysis",
114   "MedicalSoftware",
115   "Physics",
116   "Robotics",
117   "Sports",
118   "ParallelComputing",
119   "Amusement",
120   "Archiving",
121   "Compression",
122   "Electronics",
123   "Emulator",
124   "Engineering",
125   "FileTools",
126   "FileManager",
127   "TerminalEmulator",
128   "Filesystem",
129   "Monitor",
130   "Security",
131   "Accessibility",
132   "Calculator",
133   "Clock",
134   "TextEditor",
135   "Documentation",
136   "Core",
137   "KDE",
138   "GNOME",
139   "GTK",
140   "Qt",
141   "Motif",
142   "Java",
143   "ConsoleOnly",
144   "Screensaver",
145   "TrayIcon",
146   "Applet",
147   "Shell",
148   NULL
149 };
150
151 unsigned char freedesktop_check_cat ( char *name ) {
152   char **p = freedesktop_approved_cats;
153
154   while ( *p ) {
155
156     if ( strcasecmp ( *p, name ) == 0 ) {
157       return ( 1 );
158     }
159
160     p++;
161   }
162
163   return ( 0 );
164 }
165
166 #if 0
167 int main ( void ) {
168
169   printf ( "check Applet (should be 1) -> %d\n", freedesktop_check_cat ( "Applet" ) );
170   printf ( "check Education (should be 1) -> %d\n", freedesktop_check_cat ( "Education" ) );
171   printf ( "check Mofo (should be 0) -> %d\n", freedesktop_check_cat ( "Mofo" ) );
172
173   return ( 0 );
174 }
175 #endif