1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-07-05 00:59:07 +00:00
evince/shell/ev-zoom-action.h
Pablo Correa Gómez 61152289ac shell: Use composite template for EvToolbar
This adapts to the most recent used pattern and simplifies
the code.

It was required to modify EvZoomAction to fit the template model.
EvZoomAction needs the model (EvDocumentModel) to be fully-functional.
The said model is not available at the widget creation time when using
templates because the model is only available programmatically. Therefore,
we partially revert commit 55b21fe75e
by using again ev_zoom_action_set_model. In the process, the "document-model"
property is also removed, as it is not needed (never emmited, no consumers).
The G_PARAM_CONSTRUCT_ONLY condition of the property is partially kept by
making sure that we throw a critical if the model is already set.
2022-10-27 20:19:58 -03:00

52 lines
1.9 KiB
C

/* ev-zoom-action.h
* this file is part of evince, a gnome document viewer
*
* Copyright (C) 2012 Carlos Garcia Campos <carlosgc@gnome.org>
*
* Evince 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.
*
* Evince 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#pragma once
#include <gtk/gtk.h>
#include <evince-document.h>
#include <evince-view.h>
G_BEGIN_DECLS
#define EV_TYPE_ZOOM_ACTION (ev_zoom_action_get_type ())
#define EV_ZOOM_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_ZOOM_ACTION, EvZoomAction))
#define EV_IS_ZOOM_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_ZOOM_ACTION))
#define EV_ZOOM_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EV_TYPE_ZOOM_ACTION, EvZoomActionClass))
#define EV_IS_ZOOM_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EV_TYPE_ZOOM_ACTION))
#define EV_ZOOM_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EV_TYPE_ZOOM_ACTION, EvZoomActionClass))
typedef struct _EvZoomAction EvZoomAction;
typedef struct _EvZoomActionClass EvZoomActionClass;
struct _EvZoomAction {
GtkBox parent;
};
struct _EvZoomActionClass {
GtkBoxClass parent_class;
};
GType ev_zoom_action_get_type (void);
void ev_zoom_action_set_model (EvZoomAction *zoom_action,
EvDocumentModel *model);
G_END_DECLS