103 lines
4.4 KiB
C
103 lines
4.4 KiB
C
|
/* PIKA - Photo and Image Kooker Application
|
||
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
||
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
||
|
*
|
||
|
* Original copyright, applying to most contents (license remains unchanged):
|
||
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||
|
*
|
||
|
* pikadockable.h
|
||
|
* Copyright (C) 2001-2003 Michael Natterer <mitch@gimp.org>
|
||
|
*
|
||
|
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
|
#ifndef __PIKA_DOCKABLE_H__
|
||
|
#define __PIKA_DOCKABLE_H__
|
||
|
|
||
|
|
||
|
#define PIKA_DOCKABLE_DRAG_OFFSET (-6)
|
||
|
|
||
|
|
||
|
#define PIKA_TYPE_DOCKABLE (pika_dockable_get_type ())
|
||
|
#define PIKA_DOCKABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_DOCKABLE, PikaDockable))
|
||
|
#define PIKA_DOCKABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_DOCKABLE, PikaDockableClass))
|
||
|
#define PIKA_IS_DOCKABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_DOCKABLE))
|
||
|
#define PIKA_IS_DOCKABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_DOCKABLE))
|
||
|
#define PIKA_DOCKABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_DOCKABLE, PikaDockableClass))
|
||
|
|
||
|
|
||
|
typedef struct _PikaDockablePrivate PikaDockablePrivate;
|
||
|
typedef struct _PikaDockableClass PikaDockableClass;
|
||
|
|
||
|
/**
|
||
|
* PikaDockable:
|
||
|
*
|
||
|
* A kind of adapter to make other widgets dockable. The widget to
|
||
|
* dock is put inside the PikaDockable, which is put in a
|
||
|
* PikaDockbook.
|
||
|
*/
|
||
|
struct _PikaDockable
|
||
|
{
|
||
|
GtkBin parent_instance;
|
||
|
|
||
|
PikaDockablePrivate *p;
|
||
|
};
|
||
|
|
||
|
struct _PikaDockableClass
|
||
|
{
|
||
|
GtkBinClass parent_class;
|
||
|
};
|
||
|
|
||
|
|
||
|
GType pika_dockable_get_type (void) G_GNUC_CONST;
|
||
|
|
||
|
GtkWidget * pika_dockable_new (const gchar *name,
|
||
|
const gchar *blurb,
|
||
|
const gchar *icon_name,
|
||
|
const gchar *help_id);
|
||
|
|
||
|
void pika_dockable_set_dockbook (PikaDockable *dockable,
|
||
|
PikaDockbook *dockbook);
|
||
|
PikaDockbook * pika_dockable_get_dockbook (PikaDockable *dockable);
|
||
|
|
||
|
void pika_dockable_set_tab_style (PikaDockable *dockable,
|
||
|
PikaTabStyle tab_style);
|
||
|
PikaTabStyle pika_dockable_get_tab_style (PikaDockable *dockable);
|
||
|
|
||
|
void pika_dockable_set_locked (PikaDockable *dockable,
|
||
|
gboolean lock);
|
||
|
gboolean pika_dockable_get_locked (PikaDockable *dockable);
|
||
|
|
||
|
const gchar * pika_dockable_get_name (PikaDockable *dockable);
|
||
|
const gchar * pika_dockable_get_blurb (PikaDockable *dockable);
|
||
|
const gchar * pika_dockable_get_help_id (PikaDockable *dockable);
|
||
|
const gchar * pika_dockable_get_icon_name (PikaDockable *dockable);
|
||
|
GtkWidget * pika_dockable_get_icon (PikaDockable *dockable,
|
||
|
GtkIconSize size);
|
||
|
|
||
|
GtkWidget * pika_dockable_create_tab_widget (PikaDockable *dockable,
|
||
|
PikaContext *context,
|
||
|
PikaTabStyle tab_style,
|
||
|
GtkIconSize size);
|
||
|
void pika_dockable_set_context (PikaDockable *dockable,
|
||
|
PikaContext *context);
|
||
|
PikaUIManager * pika_dockable_get_menu (PikaDockable *dockable,
|
||
|
const gchar **ui_path,
|
||
|
gpointer *popup_data);
|
||
|
|
||
|
void pika_dockable_detach (PikaDockable *dockable);
|
||
|
|
||
|
|
||
|
#endif /* __PIKA_DOCKABLE_H__ */
|