gnome-control-center/control-center/capplet-dir.h

101 lines
2.8 KiB
C
Raw Normal View History

2000-08-01 20:22:57 +00:00
/* -*- mode: c; style: linux -*- */
/* capplet-dir.h
2001-10-15 16:06:56 +00:00
* Copyright (C) 2000, 2001 Ximian, Inc.
2000-08-01 20:22:57 +00:00
*
2001-10-15 16:06:56 +00:00
* Written by Bradford Hovinen <hovinen@ximian.com>
2000-08-01 20:22:57 +00:00
*
* 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, 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 __CAPPLET_DIR_H
#define __CAPPLET_DIR_H
#include <gnome.h>
#include <libgnome/gnome-desktop-item.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
Read control center directory structure out of GnomeVFS instead of 2002-01-28 Seth Nickell <snickell@stanford.edu> * control-center/capplet-dir.c: (capplet_new), (capplet_dir_new), (capplet_dir_entry_destroy), (read_entries), (get_root_capplet_dir): * control-center/capplet-dir.h: Read control center directory structure out of GnomeVFS instead of directly off the disk. Also deal with pixmaps more uniformly, and properly load them out of PREFIX/share/pixmaps when they aren't an absolute path. * capplets/desktop-links/Sawfish/appearance-properties.desktop.in: * capplets/desktop-links/Sawfish/bindings-properties.desktop.in: * capplets/desktop-links/Sawfish/focus-properties.desktop.in: * capplets/desktop-links/Sawfish/match-properties.desktop.in: * capplets/desktop-links/Sawfish/maximize-properties.desktop.in: * capplets/desktop-links/Sawfish/meta-properties.desktop.in: * capplets/desktop-links/Sawfish/misc-properties.desktop.in: * capplets/desktop-links/Sawfish/move-properties.desktop.in: * capplets/desktop-links/Sawfish/placement-properties.desktop.in: * capplets/desktop-links/Sawfish/sound-properties.desktop.in: * capplets/desktop-links/Sawfish/workspace-properties.desktop.in: * capplets/ui-properties/behavior.desktop.in.in: Add a Categories Field. * capplets/desktop-links/Makefile.am: * capplets/desktop-links/Sawfish/Makefile.am: * capplets/file-types/Makefile.am: * capplets/theme-switcher/Makefile.am: * capplets/ui-properties/Makefile.am: * control-center/Gnome.directory.in.in: * control-center/Makefile.am: Install directory files into PREFIX/share/gnome/vfolders, the standard vfolder description location.
2002-01-29 04:48:25 +00:00
#include <libgnomevfs/gnome-vfs.h>
2000-08-01 20:22:57 +00:00
#define CAPPLET_DIR_ENTRY(obj) ((CappletDirEntry *) obj)
#define CAPPLET_DIR(obj) ((CappletDir *) obj)
#define CAPPLET(obj) ((Capplet *) obj)
#define IS_CAPPLET(obj) (((CappletDirEntry *) obj)->type == TYPE_CAPPLET)
#define IS_CAPPLET_DIR(obj) (((CappletDirEntry *) obj)->type == TYPE_CAPPLET_DIR)
2000-08-01 20:22:57 +00:00
typedef struct _CappletDirEntry CappletDirEntry;
typedef struct _CappletDir CappletDir;
typedef struct _Capplet Capplet;
typedef struct _CappletDirView CappletDirView;
2000-08-01 20:22:57 +00:00
typedef enum {
TYPE_CAPPLET,
TYPE_CAPPLET_DIR
2000-08-01 20:22:57 +00:00
} CappletEntryType;
struct _CappletDirEntry
{
CappletEntryType type;
GnomeDesktopItem *entry;
gchar **exec;
2000-08-01 20:22:57 +00:00
gchar *label;
gchar *icon;
Read control center directory structure out of GnomeVFS instead of 2002-01-28 Seth Nickell <snickell@stanford.edu> * control-center/capplet-dir.c: (capplet_new), (capplet_dir_new), (capplet_dir_entry_destroy), (read_entries), (get_root_capplet_dir): * control-center/capplet-dir.h: Read control center directory structure out of GnomeVFS instead of directly off the disk. Also deal with pixmaps more uniformly, and properly load them out of PREFIX/share/pixmaps when they aren't an absolute path. * capplets/desktop-links/Sawfish/appearance-properties.desktop.in: * capplets/desktop-links/Sawfish/bindings-properties.desktop.in: * capplets/desktop-links/Sawfish/focus-properties.desktop.in: * capplets/desktop-links/Sawfish/match-properties.desktop.in: * capplets/desktop-links/Sawfish/maximize-properties.desktop.in: * capplets/desktop-links/Sawfish/meta-properties.desktop.in: * capplets/desktop-links/Sawfish/misc-properties.desktop.in: * capplets/desktop-links/Sawfish/move-properties.desktop.in: * capplets/desktop-links/Sawfish/placement-properties.desktop.in: * capplets/desktop-links/Sawfish/sound-properties.desktop.in: * capplets/desktop-links/Sawfish/workspace-properties.desktop.in: * capplets/ui-properties/behavior.desktop.in.in: Add a Categories Field. * capplets/desktop-links/Makefile.am: * capplets/desktop-links/Sawfish/Makefile.am: * capplets/file-types/Makefile.am: * capplets/theme-switcher/Makefile.am: * capplets/ui-properties/Makefile.am: * control-center/Gnome.directory.in.in: * control-center/Makefile.am: Install directory files into PREFIX/share/gnome/vfolders, the standard vfolder description location.
2002-01-29 04:48:25 +00:00
GnomeVFSURI *uri;
GdkPixbuf *pb;
CappletDir *dir;
2000-08-01 20:22:57 +00:00
};
struct _CappletDir
{
CappletDirEntry entry;
GSList *entries;
CappletDirView *view;
2000-08-01 20:22:57 +00:00
};
struct _Capplet
{
CappletDirEntry entry;
gboolean launching;
2000-08-01 20:22:57 +00:00
};
CappletDirEntry *capplet_new (CappletDir *dir,
gchar *desktop_path);
CappletDirEntry *capplet_dir_new (CappletDir *dir, gchar *dir_path);
2000-08-01 20:22:57 +00:00
CappletDirEntry *capplet_lookup (const char *path);
char *capplet_dir_entry_get_html (CappletDirEntry *entry);
2000-08-01 20:22:57 +00:00
void capplet_dir_entry_destroy (CappletDirEntry *entry);
void capplet_dir_entry_activate (CappletDirEntry *entry,
CappletDirView *launcher);
2000-08-01 20:22:57 +00:00
void capplet_dir_entry_shutdown (CappletDirEntry *entry);
void capplet_dir_load (CappletDir *dir);
void capplet_dir_init (CappletDirView *(*cb)
(CappletDir *,
CappletDirView *));
CappletDir *get_root_capplet_dir (void);
2000-08-01 20:22:57 +00:00
GtkWidget *capplet_control_launch (const gchar *capplet_name,
gchar *window_title);
2000-08-01 20:22:57 +00:00
#endif /* __CAPPLET_DIR_H */