~ubuntu-branches/debian/squeeze/galeon/squeeze

« back to all changes in this revision

Viewing changes to bookmarks/bookmarks-context-menu.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Howard
  • Date: 2004-06-06 09:02:01 UTC
  • Revision ID: james.westby@ubuntu.com-20040606090201-yhx6ruhq8um7ggs2
Tags: upstream-1.3.15
Import upstream version 1.3.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2002  Ricardo Fern�ndez Pascual
 
3
 *
 
4
 *  This program is free software; you can redistribute it and/or modify
 
5
 *  it under the terms of the GNU General Public License as published by
 
6
 *  the Free Software Foundation; either version 2, or (at your option)
 
7
 *  any later version.
 
8
 *
 
9
 *  This program is distributed in the hope that it will be useful,
 
10
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 *  GNU General Public License for more details.
 
13
 *
 
14
 *  You should have received a copy of the GNU General Public License
 
15
 *  along with this program; if not, write to the Free Software
 
16
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#ifndef __bookmarks_context_menu_h
 
20
#define __bookmarks_context_menu_h
 
21
 
 
22
#include <glib-object.h>
 
23
#include "bookmarks.h"
 
24
#include "bookmarks-util.h"
 
25
#include "bookmarks-location-source.h"
 
26
 
 
27
/* object forward declarations */
 
28
 
 
29
typedef struct _GbContextMenu GbContextMenu;
 
30
typedef struct _GbContextMenuClass GbContextMenuClass;
 
31
typedef struct _GbContextMenuPrivate GbContextMenuPrivate;
 
32
 
 
33
/**
 
34
 * Context menu object
 
35
 */
 
36
 
 
37
#define GB_TYPE_CONTEXT_MENU                    (gb_context_menu_get_type())
 
38
#define GB_CONTEXT_MENU(object)                 (G_TYPE_CHECK_INSTANCE_CAST((object), GB_TYPE_CONTEXT_MENU,\
 
39
                                                 GbContextMenu))
 
40
#define GB_CONTEXT_MENU_CLASS(klass)            (G_TYPE_CHECK_CLASS_CAST((klass), GB_TYPE_CONTEXT_MENU,\
 
41
                                                 GbContextMenuClass))
 
42
#define GB_IS_CONTEXT_MENU(object)              (G_TYPE_CHECK_INSTANCE_TYPE((object), GB_TYPE_CONTEXT_MENU))
 
43
#define GB_IS_CONTEXT_MENU_CLASS(klass)         (G_TYPE_CHECK_CLASS_TYPE((klass), GB_TYPE_CONTEXT_MENU))
 
44
#define GB_CONTEXT_MENU_GET_CLASS(obj)          (G_TYPE_INSTANCE_GET_CLASS((obj), GB_TYPE_CONTEXT_MENU,\
 
45
                                                 GbContextMenuClass))
 
46
 
 
47
struct _GbContextMenuClass 
 
48
{
 
49
        GObjectClass parent_class;
 
50
 
 
51
        /* signals */
 
52
        GbBookmarkActivatedCallback gb_context_menu_bookmark_activated;
 
53
        void            (*gb_context_menu_deactivated)          (GbContextMenu *cm);
 
54
 
 
55
};
 
56
 
 
57
/* Remember: fields are public read-only */
 
58
struct _GbContextMenu
 
59
{
 
60
        GObject parent_object;
 
61
 
 
62
        GbContextMenuPrivate *priv;
 
63
};
 
64
 
 
65
GType                   gb_context_menu_get_type                (void);
 
66
GbContextMenu *         gb_context_menu_new                     (void);
 
67
void                    gb_context_menu_set_bookmark            (GbContextMenu *cm, GbBookmark *b);
 
68
void                    gb_context_menu_popup                   (GbContextMenu *cm, GdkEventButton *event);
 
69
void                    gb_context_menu_set_location_source     (GbContextMenu *cm, GbLocationSource *src);
 
70
GbContextMenu *         gb_context_menu_new_quick               (GbBookmark *bm, 
 
71
                                                                 GbLocationSource *location_source, 
 
72
                                                                 GObject *creator);
 
73
void                    gb_context_menu_quick                   (GbBookmark *bm, GdkEventButton *event,
 
74
                                                                 GbLocationSource *location_source, 
 
75
                                                                 GObject *creator);
 
76
 
 
77
#endif