medit/moo/mooutils/moofileview/moofileview.h

126 lines
5.7 KiB
C
Raw Normal View History

2005-09-06 16:21:05 +00:00
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*-
2005-08-25 09:29:01 +00:00
* moofileview.h
*
* Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu>
2005-08-25 09:29:01 +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 of the License, or
* (at your option) any later version.
*
* See COPYING file that comes with this distribution.
*/
#ifndef __MOO_FILE_VIEW_H__
#define __MOO_FILE_VIEW_H__
#include <gtk/gtkvbox.h>
#include <gtk/gtkmenu.h>
2005-11-18 20:07:56 +00:00
#include <mooutils/moouixml.h>
2005-08-25 09:29:01 +00:00
G_BEGIN_DECLS
#define MOO_TYPE_FILE_VIEW_TYPE (moo_file_view_type_get_type ())
#define MOO_TYPE_FILE_VIEW (moo_file_view_get_type ())
#define MOO_FILE_VIEW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_FILE_VIEW, MooFileView))
#define MOO_FILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_FILE_VIEW, MooFileViewClass))
#define MOO_IS_FILE_VIEW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_FILE_VIEW))
#define MOO_IS_FILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_FILE_VIEW))
#define MOO_FILE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_FILE_VIEW, MooFileViewClass))
typedef enum {
MOO_FILE_VIEW_LIST,
MOO_FILE_VIEW_ICON,
MOO_FILE_VIEW_BOOKMARK
2005-08-25 09:29:01 +00:00
} MooFileViewType;
typedef struct _MooFileView MooFileView;
typedef struct _MooFileViewPrivate MooFileViewPrivate;
typedef struct _MooFileViewClass MooFileViewClass;
struct _MooFileView
{
GtkVBox vbox;
GtkWidget *toolbar;
2005-08-25 09:29:01 +00:00
MooFileViewPrivate *priv;
};
struct _MooFileViewClass
{
GtkVBoxClass vbox_class;
gboolean (*chdir) (MooFileView *fileview,
const char *dir,
GError **error);
void (*populate_popup) (MooFileView *fileview,
GList *selected,
GtkMenu *menu);
void (*activate) (MooFileView *fileview,
const char *path);
gboolean (*drop) (MooFileView *fileview,
const char *path,
GtkWidget *widget,
GdkDragContext *context,
int x,
int y,
guint time);
gboolean (*drop_data_received) (MooFileView *fileview,
const char *path,
GtkWidget *widget,
GdkDragContext *context,
int x,
int y,
GtkSelectionData *data,
guint info,
guint time);
2005-08-25 09:29:01 +00:00
};
GType moo_file_view_get_type (void) G_GNUC_CONST;
GType moo_file_view_type_get_type (void) G_GNUC_CONST;
GtkWidget *moo_file_view_new (void);
gboolean moo_file_view_chdir (MooFileView *fileview,
const char *dir,
GError **error);
void moo_file_view_select_name (MooFileView *fileview,
const char *name);
void moo_file_view_select_display_name (MooFileView *fileview,
const char *name);
void moo_file_view_set_view_type (MooFileView *fileview,
MooFileViewType type);
void moo_file_view_set_show_hidden (MooFileView *fileview,
gboolean show);
void moo_file_view_set_show_parent (MooFileView *fileview,
gboolean show);
void moo_file_view_set_sort_case_sensitive (MooFileView *fileview,
gboolean case_sensitive);
void moo_file_view_set_typeahead_case_sensitive (MooFileView *fileview,
gboolean case_sensitive);
2005-11-18 20:07:56 +00:00
MooUIXML *moo_file_view_get_ui_xml (MooFileView *fileview);
MooActionGroup *moo_file_view_get_actions (MooFileView *fileview);
2005-11-07 14:50:24 +00:00
void moo_file_view_add_target (MooFileView *fileview,
GdkAtom target,
guint flags,
guint info);
void moo_file_view_drag_finish (MooFileView *fileview,
GdkDragContext *context,
gboolean success,
gboolean delete_data,
guint time);
2005-08-25 09:29:01 +00:00
G_END_DECLS
#endif /* __MOO_FILE_VIEW_H__ */