From a2717539e6fbf557020fab6065770f54714c9c96 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 15 Feb 2010 14:00:56 -0600 Subject: Adding in the new object we're building for evaluating desktop shortcuts. --- libindicator/indicator-desktop-shortcuts.h | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 libindicator/indicator-desktop-shortcuts.h (limited to 'libindicator/indicator-desktop-shortcuts.h') diff --git a/libindicator/indicator-desktop-shortcuts.h b/libindicator/indicator-desktop-shortcuts.h new file mode 100644 index 0000000..6b3f022 --- /dev/null +++ b/libindicator/indicator-desktop-shortcuts.h @@ -0,0 +1,31 @@ +#ifndef __INDICATOR_DESKTOP_SHORTCUTS_H__ +#define __INDICATOR_DESKTOP_SHORTCUTS_H__ + +#include +#include + +G_BEGIN_DECLS + +#define INDICATOR_TYPE_DESKTOP_SHORTCUTS (indicator_desktop_shortcuts_get_type ()) +#define INDICATOR_DESKTOP_SHORTCUTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_TYPE_DESKTOP_SHORTCUTS, IndicatorDesktopShortcuts)) +#define INDICATOR_DESKTOP_SHORTCUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_TYPE_DESKTOP_SHORTCUTS, IndicatorDesktopShortcutsClass)) +#define IS_INDICATOR_DESKTOP_SHORTCUTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_TYPE_DESKTOP_SHORTCUTS)) +#define IS_INDICATOR_DESKTOP_SHORTCUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_TYPE_DESKTOP_SHORTCUTS)) +#define INDICATOR_DESKTOP_SHORTCUTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_TYPE_DESKTOP_SHORTCUTS, IndicatorDesktopShortcutsClass)) + +typedef struct _IndicatorDesktopShortcuts IndicatorDesktopShortcuts; +typedef struct _IndicatorDesktopShortcutsClass IndicatorDesktopShortcutsClass; + +struct _IndicatorDesktopShortcutsClass { + GObjectClass parent_class; +}; + +struct _IndicatorDesktopShortcuts { + GObject parent; +}; + +GType indicator_desktop_shortcuts_get_type (void); + +G_END_DECLS + +#endif -- cgit v1.2.3 From 95f07c4e018e2a257a765ee7f71c777d555f548d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 15 Feb 2010 14:13:51 -0600 Subject: Copyright headers --- libindicator/indicator-desktop-shortcuts.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libindicator/indicator-desktop-shortcuts.h') diff --git a/libindicator/indicator-desktop-shortcuts.h b/libindicator/indicator-desktop-shortcuts.h index 6b3f022..190c541 100644 --- a/libindicator/indicator-desktop-shortcuts.h +++ b/libindicator/indicator-desktop-shortcuts.h @@ -1,3 +1,26 @@ +/* +A small file to parse through the actions that are available +in the desktop file and making those easily usable. + +Copyright 2010 Canonical Ltd. + +Authors: + Ted Gould + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +version 3.0 as published by the Free Software Foundation. + +This library 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 version 3.0 for more details. + +You should have received a copy of the GNU General Public +License along with this library. If not, see +. +*/ + #ifndef __INDICATOR_DESKTOP_SHORTCUTS_H__ #define __INDICATOR_DESKTOP_SHORTCUTS_H__ -- cgit v1.2.3 From d970c855552615e22881b8ebb57ecc5de6481b8a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 15 Feb 2010 14:22:01 -0600 Subject: Letz get ur prototypes --- libindicator/indicator-desktop-shortcuts.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'libindicator/indicator-desktop-shortcuts.h') diff --git a/libindicator/indicator-desktop-shortcuts.h b/libindicator/indicator-desktop-shortcuts.h index 190c541..10cacff 100644 --- a/libindicator/indicator-desktop-shortcuts.h +++ b/libindicator/indicator-desktop-shortcuts.h @@ -39,15 +39,34 @@ G_BEGIN_DECLS typedef struct _IndicatorDesktopShortcuts IndicatorDesktopShortcuts; typedef struct _IndicatorDesktopShortcutsClass IndicatorDesktopShortcutsClass; +/** + IndicatorDesktopShortcutsClass: + @parent_class: Space for #GObjectClass + + The vtable for our precious #IndicatorDesktopShortcutsClass. +*/ struct _IndicatorDesktopShortcutsClass { GObjectClass parent_class; }; +/** + IndicatorDesktopShortcuts: + @parent: The parent data from #GObject + + The public data for an instance of the class + #IndicatorDesktopShortcuts. +*/ struct _IndicatorDesktopShortcuts { GObject parent; }; -GType indicator_desktop_shortcuts_get_type (void); +GType indicator_desktop_shortcuts_get_type (void); +IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const gchar * file, + const gchar * identity); +const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids); +const gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, + const gchar * nick); + G_END_DECLS -- cgit v1.2.3 From 3a95d842bbcd99afc85307ca1d699cc17072d986 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 15 Feb 2010 14:57:23 -0600 Subject: Instanciating the prototypes and making some comments. --- libindicator/indicator-desktop-shortcuts.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libindicator/indicator-desktop-shortcuts.h') diff --git a/libindicator/indicator-desktop-shortcuts.h b/libindicator/indicator-desktop-shortcuts.h index 10cacff..bda65a6 100644 --- a/libindicator/indicator-desktop-shortcuts.h +++ b/libindicator/indicator-desktop-shortcuts.h @@ -66,7 +66,8 @@ IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids); const gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, const gchar * nick); - +gboolean indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, + const gchar * nick); G_END_DECLS -- cgit v1.2.3 From 5d2ace5acc4c15d3ced8439ab8afa216806a1b53 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 15 Feb 2010 15:20:09 -0600 Subject: Fleshing out _new and _get_nicks Both are lovely functions. --- libindicator/indicator-desktop-shortcuts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libindicator/indicator-desktop-shortcuts.h') diff --git a/libindicator/indicator-desktop-shortcuts.h b/libindicator/indicator-desktop-shortcuts.h index bda65a6..16a23a4 100644 --- a/libindicator/indicator-desktop-shortcuts.h +++ b/libindicator/indicator-desktop-shortcuts.h @@ -32,8 +32,8 @@ G_BEGIN_DECLS #define INDICATOR_TYPE_DESKTOP_SHORTCUTS (indicator_desktop_shortcuts_get_type ()) #define INDICATOR_DESKTOP_SHORTCUTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_TYPE_DESKTOP_SHORTCUTS, IndicatorDesktopShortcuts)) #define INDICATOR_DESKTOP_SHORTCUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_TYPE_DESKTOP_SHORTCUTS, IndicatorDesktopShortcutsClass)) -#define IS_INDICATOR_DESKTOP_SHORTCUTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_TYPE_DESKTOP_SHORTCUTS)) -#define IS_INDICATOR_DESKTOP_SHORTCUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_TYPE_DESKTOP_SHORTCUTS)) +#define INDICATOR_IS_DESKTOP_SHORTCUTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_TYPE_DESKTOP_SHORTCUTS)) +#define INDICATOR_IS_DESKTOP_SHORTCUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_TYPE_DESKTOP_SHORTCUTS)) #define INDICATOR_DESKTOP_SHORTCUTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_TYPE_DESKTOP_SHORTCUTS, IndicatorDesktopShortcutsClass)) typedef struct _IndicatorDesktopShortcuts IndicatorDesktopShortcuts; -- cgit v1.2.3 From f2196d128ea412f115d452b2cc5a3cd27ca5bee9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 15 Feb 2010 15:44:00 -0600 Subject: Fleshing out getting the Name of a shortcut --- libindicator/indicator-desktop-shortcuts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libindicator/indicator-desktop-shortcuts.h') diff --git a/libindicator/indicator-desktop-shortcuts.h b/libindicator/indicator-desktop-shortcuts.h index 16a23a4..5ed490e 100644 --- a/libindicator/indicator-desktop-shortcuts.h +++ b/libindicator/indicator-desktop-shortcuts.h @@ -64,7 +64,7 @@ GType indicator_desktop_shortcuts_get_type (void); IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const gchar * file, const gchar * identity); const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids); -const gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, +gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, const gchar * nick); gboolean indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick); -- cgit v1.2.3