Imported version 0.1
[cl-launcher] / src / cl-utils.h
diff --git a/src/cl-utils.h b/src/cl-utils.h
new file mode 100644 (file)
index 0000000..aabb3ab
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ *  Camera Launcher for Maemo.
+ *  Copyright (C) 2009 Roman Moravcik
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef CL_UTILS_H
+#define CL_UTILS_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include <gtk/gtk.h>
+#include <hildon/hildon.h>
+
+#define GCONF_CL_LAUNCHER "/apps/maemo/cl-launcher"
+#define CL_LAUNCHER_DESKTOP_DATADIR "/usr/share/applications/cl-launcher"
+
+typedef enum {
+       CL_LAUNCHER_ACTION_DO_NOTHING = 0,
+       CL_LAUNCHER_ACTION_RUN_PREFERED_APPLICATION,
+       CL_LAUNCHER_ACTION_SHOW_SELECTOR_POPUP
+} CLLauncherAction;
+
+enum {
+       SELECTOR_COLUMN_ICON = 0,
+       SELECTOR_COLUMN_NAME,
+       SELECTOR_COLUMN_OSSO_SERVICE,
+       SELECTOR_COLUMN_EXEC,
+       NUM_COLS
+};
+
+typedef struct {
+       gchar *icon;
+       gchar *name;
+       gchar *osso_service;
+       gchar *exec;
+} DesktopFileInfo;
+
+gboolean get_application_list (GtkListStore *list);
+
+DesktopFileInfo *get_desktop_file_info (const gchar *desktop_file);
+
+#endif /* CL_UTILS_H */