27b6276dbde49abba22c629a19b8b7954133b8ba
[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 freedesktop_cat_t freedesktop_complete[] = {
12
13   // HACK
14   { BADCATNAME,         NULL,           "Lazy PXML dev is lazy." },
15   // HACK
16
17   { "AudioVideo",       NULL,           "A multimedia (audio/video) application" },
18   { "Audio",            NULL,           "An audio application" },
19   { "Video",            NULL,           "A video application" },
20   { "Development",      NULL,           "An application for development" },
21   { "Education",        NULL,           "Educational software" },
22   { "Game",             NULL,           "A game" },
23   { "Graphics",         NULL,           "Graphical application" },
24   { "Network",          NULL,           "Network application such as a web browser" },
25   { "Office",           NULL,           "An office type application" },
26   { "Settings",         NULL,           "Settings applications" },
27   { "System",           NULL,           "System application" },
28   { "Utility",          NULL,           "Small utility application" },
29
30   { "Building",         "Development",  "A tool to build applications " },
31   { "Debugger",         "Development",   "A tool to debug applications" },
32   { "IDE",              "Development",   "IDE application " },
33   { "GUIDesigner",      "Development",   "A GUI designer application " },
34   { "Profiling",        "Development",   "A profiling tool      " },
35   { "RevisionControl",  "Development",   "Applications like cvs or subversion " },
36   { "Translation",      "Development",   "A translation tool " },
37   { "Calendar",         "Office",   "Calendar application " },
38   { "ContactManagement",    "Office",   "E.g. an address book " },
39   { "Database",         "Office",   "Application to manage a database " },
40   { "Dictionary",       "Office",   "A dictionary  " },
41   { "Chart",            "Office",   "Chart application" },
42   { "Email",            "Office",   "Email application" },
43   { "Finance",          "Office",   "Application to manage your finance " },
44   { "FlowChart",        "Office",   "A flowchart application    " },
45   { "PDA",              "Office",   "Tool to manage your PDA    " },
46   { "ProjectManagement",     "Office",   "Project management application " },
47   { "Presentation",     "Office",   "Presentation software  " },
48   { "Spreadsheet",      "Office",   "A spreadsheet  " },
49   { "WordProcessor",    "Office",   "A word processor  " },
50   { "2DGraphics",       "Graphics",   "2D based graphical application " },
51   { "VectorGraphics",   "Graphics",   "Vector based graphical application " },
52   { "RasterGraphics",   "Graphics",   "Raster based graphical application " },
53   { "3DGraphics",       "Graphics",   "3D based graphical application     " },
54   { "Scanning",         "Graphics",   "Tool to scan a file/text      " },
55   { "OCR",              "Graphics",   "Optical character recognition application " },
56   { "Photography",      "Graphics",   "Camera tools, etc. " },
57   { "Publishing",       "Graphics",   "Desktop Publishing applications and Color Management tools " },
58   { "Viewer",           "Graphics",   "Tool to view e.g. a graphic or pdf file   " },
59   { "TextTools",        "Utility",   "A text tool utiliy  " },
60   { "DesktopSettings",  "Settings",   "Configuration tool for the GUI " },
61   { "HardwareSettings", "Settings",   "A tool to manage hardware components, like sound cards, video cards or printers " },
62   { "Printing",         "Settings",   "A tool to manage printers " },
63   { "PackageManager",   "Settings",   "A package manager application " },
64   { "Dialup",           "Network",   "A dial-up program " },
65   { "InstantMessaging", "Network",   "An instant messaging client " },
66   { "Chat",             "Network",   "A chat client" },
67   { "IRCClient",        "Network",   "An IRC client" },
68   { "FileTransfer",     "Network",   "Tools like FTP or P2P programs " },
69   { "HamRadio",         "Network",   "HAM radio software " },
70   { "News",             "Network",   "A news reader or a news ticker " },
71   { "P2P",              "Network",   "A P2P program " },
72   { "RemoteAccess",     "Network",   "A tool to remotely manage your PC " },
73   { "Telephony",        "Network",   "Telephony via PC   " },
74   { "TelephonyTools",   "Utility",   "Telephony tools, to dial a number, manage PBX, ... " },
75   { "VideoConference",  "Network",   "Video Conference software  " },
76   { "WebBrowser",       "Network",   "A web browser    " },
77   { "WebDevelopment",   "Network",   "A tool for web developers " },
78   { "Midi",             "AudioVideo",   "An app related to MIDI    " },
79   { "Mixer",            "AudioVideo",   "Just a mixer  " },
80   { "Sequencer",        "AudioVideo",   "A sequencer  " },
81   { "Tuner",            "AudioVideo",   "A tuner  " },
82   { "TV",               "AudioVideo",   "A TV application" },
83   { "AudioVideoEditing",    "Audio",   "Application to edit audio/video files " },
84   { "Player",           "Audio",   "Application to play audio/video files " },
85   { "Recorder",         "Audio",   "Application to record audio/video files " },
86   { "DiscBurning",      "AudioVideo",   "Application to burn a disc     " },
87   { "ActionGame",       "Game",   "An action game " },
88   { "AdventureGame",    "Game",   "Adventure style game" },
89   { "ArcadeGame",       "Game",   "Arcade style game" },
90   { "BoardGame",        "Game",   "A board game" },
91   { "BlocksGame",       "Game",   "Falling blocks game" },
92   { "CardGame",         "Game",   "A card game  " },
93   { "KidsGame",         "Game",   "A game for kids" },
94   { "LogicGame",        "Game",   "Logic games like puzzles, etc " },
95   { "RolePlaying",      "Game",   "A role playing game     " },
96   { "Simulation",       "Game",   "A simulation game     " },
97   { "SportsGame",       "Game",   "A sports game     " },
98   { "StrategyGame",     "Game",   "A strategy game     " },
99   { "Art",              "Education",   "Software to teach arts    " },
100   { "Construction",     "Education",   NULL },
101   { "Music",            "Audio",  "Musical software" },
102   { "Languages",        "Education",   "Software to learn foreign languages " },
103   { "Science",          "Education",   "Scientific software     " },
104   { "ArtificialIntelligence",     "Education",   "Artificial Intelligence software " },
105   { "Astronomy",        "Education",   "Astronomy software   " },
106   { "Biology",          "Education",   "Biology software   " },
107   { "Chemistry",        "Education",   "Chemistry software   " },
108   { "ComputerScience",  "Education",   "ComputerSience software " },
109   { "DataVisualization", "Education",   "Data visualization software " },
110   { "Economy",          "Education",   "Economy software   " },
111   { "Electricity",      "Education",   "Electricity software" },
112   { "Geography",        "Education",   "Geography software" },
113   { "Geology",          "Education",   "Geology software" },
114   { "Geoscience",       "Education",   "Geoscience software" },
115   { "History",          "Education",   "History software" },
116   { "ImageProcessing",  "Education",   "Image Processing software " },
117   { "Literature",       "Education",   "Literature software     " },
118   { "Math",             "Education",   "Math software     " },
119   { "NumericalAnalysis",   "Education",   "Numerical analysis software " },
120   { "MedicalSoftware",     "Education",   "Medical software   " },
121   { "Physics",          "Education",   "Physics software   " },
122   { "Robotics",         "Education",   "Robotics software  " },
123   { "Sports",           "Education",   "Sports software    " },
124   { "ParallelComputing",   "Education",   "Parallel computing software " },
125   { "Amusement",        NULL, "A simple amusement " },
126   { "Archiving",        "Utility",   "A tool to archive/backup data " },
127   { "Compression",      "Utility",   "A tool to manage compressed data/archives " },
128   { "Electronics",      NULL, "Electronics software, e.g. a circuit designer" },
129   { "Emulator",         "Game",   "Emulator of another platform, such as a DOS emulator " },
130   { "Engineering",      NULL, "Engineering software, e.g. CAD programs " },
131   { "FileTools",        "Utility",   "A file tool utility " },
132   { "FileManager",      "System",   "A file manager " },
133   { "TerminalEmulator", "System",   "A terminal emulator application " },
134   { "Filesystem",       "System",   "A file system tool  " },
135   { "Monitor",          "System",   "Monitor application/applet that monitors some resource or activity " },
136   { "Security",         "System",   "A security tool      " },
137   { "Accessibility",    "System",   "Accessibility      " },
138   { "Calculator",       "Utility",   "A calculator      " },
139   { "Clock",            "Utility",   "A clock application/applet " },
140   { "TextEditor",       "Utility",   "A text editor      " },
141   { "Documentation",    NULL, "Help or documentation      " },
142   { "Core",             NULL, "Important application, core to the desktop such as a file manager or a help browser " },
143   { "KDE",              "QT",   "Application based on KDE libraries " },
144   { "GNOME",           "GTK",   "Application based on GNOME libraries " },
145   { "GTK",              NULL, "Application based on GTK+ libraries" },
146   { "Qt",               NULL, "Application based on Qt libraries" },
147   { "Motif",            NULL, "Application based on Motif libraries" },
148   { "Java",             NULL, "Application based on Java GUI libraries, such as AWT or Swing" },
149   { "ConsoleOnly",      NULL, "Application that only works inside a terminal (text-based or command line application)" },
150   { NULL,               NULL, NULL }
151 };
152
153 freedesktop_cat_t *freedesktop_category_query ( char *name ) {
154   freedesktop_cat_t *p = freedesktop_complete;
155
156   while ( p -> cat ) {
157
158     if ( strcasecmp ( p -> cat, name ) == 0 ) {
159       return ( p );
160     }
161
162     p++;
163   }
164
165   return ( NULL );
166 }
167
168 #if 0
169 int main ( void ) {
170
171   printf ( "check Applet (should be 1) -> %d\n", freedesktop_category_query ( "Applet" ) );
172   printf ( "check Education (should be 1) -> %d\n", freedesktop_category_query ( "Education" ) );
173   printf ( "check Mofo (should be 0) -> %d\n", freedesktop_category_query ( "Mofo" ) );
174
175   return ( 0 );
176 }
177 #endif