Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-link.c File Reference
#include <config.h>
#include "ev-link.h"
+ Include dependency graph for ev-link.c:

Go to the source code of this file.

Data Structures

struct  _EvLink
 
struct  _EvLinkClass
 
struct  _EvLinkPrivate
 

Macros

#define EV_LINK_GET_PRIVATE(object)   (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK, EvLinkPrivate))
 

Enumerations

enum  { PROP_0, PROP_TITLE, PROP_ACTION }
 

Functions

const gchar * ev_link_get_title (EvLink *self)
 
EvLinkActionev_link_get_action (EvLink *self)
 
static void ev_link_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *param_spec)
 
static void ev_link_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *param_spec)
 
static void ev_link_finalize (GObject *object)
 
static void ev_link_init (EvLink *ev_link)
 
static void ev_link_class_init (EvLinkClass *ev_window_class)
 
EvLinkev_link_new (const char *title, EvLinkAction *action)
 

Macro Definition Documentation

#define EV_LINK_GET_PRIVATE (   object)    (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LINK, EvLinkPrivate))

Definition at line 46 of file ev-link.c.

Enumeration Type Documentation

anonymous enum
Enumerator
PROP_0 
PROP_TITLE 
PROP_ACTION 

Definition at line 24 of file ev-link.c.

24  {
25  PROP_0,
26  PROP_TITLE,
28 };

Function Documentation

static void ev_link_class_init ( EvLinkClass ev_window_class)
static

Definition at line 146 of file ev-link.c.

147 {
148  GObjectClass *g_object_class;
149 
150  g_object_class = G_OBJECT_CLASS (ev_window_class);
151 
152  g_object_class->set_property = ev_link_set_property;
153  g_object_class->get_property = ev_link_get_property;
154 
155  g_object_class->finalize = ev_link_finalize;
156 
157  g_type_class_add_private (g_object_class, sizeof (EvLinkPrivate));
158 
159  g_object_class_install_property (g_object_class,
160  PROP_TITLE,
161  g_param_spec_string ("title",
162  "Link Title",
163  "The link title",
164  NULL,
165  G_PARAM_READWRITE |
166  G_PARAM_CONSTRUCT_ONLY |
167  G_PARAM_STATIC_STRINGS));
168  g_object_class_install_property (g_object_class,
169  PROP_ACTION,
170  g_param_spec_object ("action",
171  "Link Action",
172  "The link action",
174  G_PARAM_READWRITE |
175  G_PARAM_CONSTRUCT_ONLY |
176  G_PARAM_STATIC_STRINGS));
177 }
static void ev_link_finalize ( GObject *  object)
static

Definition at line 120 of file ev-link.c.

121 {
122  EvLinkPrivate *priv;
123 
124  priv = EV_LINK (object)->priv;
125 
126  if (priv->title) {
127  g_free (priv->title);
128  priv->title = NULL;
129  }
130 
131  g_clear_object (&priv->action);
132 
133  G_OBJECT_CLASS (ev_link_parent_class)->finalize (object);
134 }

+ Here is the caller graph for this function:

EvLinkAction* ev_link_get_action ( EvLink self)

ev_link_get_action: : an EvLink

Returns: (transfer none): an EvLinkAction

Definition at line 64 of file ev-link.c.

65 {
66  g_return_val_if_fail (EV_IS_LINK (self), NULL);
67 
68  return self->priv->action;
69 }

+ Here is the caller graph for this function:

static void ev_link_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  param_spec 
)
static

Definition at line 72 of file ev-link.c.

76 {
77  EvLink *self;
78 
79  self = EV_LINK (object);
80 
81  switch (prop_id) {
82  case PROP_TITLE:
83  g_value_set_string (value, self->priv->title);
84  break;
85  case PROP_ACTION:
86  g_value_set_object (value, self->priv->action);
87  break;
88  default:
89  G_OBJECT_WARN_INVALID_PROPERTY_ID (object,
90  prop_id,
91  param_spec);
92  break;
93  }
94 }

+ Here is the caller graph for this function:

const gchar* ev_link_get_title ( EvLink self)

Definition at line 50 of file ev-link.c.

51 {
52  g_return_val_if_fail (EV_IS_LINK (self), NULL);
53 
54  return self->priv->title;
55 }

+ Here is the caller graph for this function:

static void ev_link_init ( EvLink ev_link)
static

Definition at line 137 of file ev-link.c.

138 {
139  ev_link->priv = EV_LINK_GET_PRIVATE (ev_link);
140 
141  ev_link->priv->title = NULL;
142  ev_link->priv->action = NULL;
143 }
EvLink* ev_link_new ( const char *  title,
EvLinkAction action 
)

Definition at line 180 of file ev-link.c.

182 {
183  return EV_LINK (g_object_new (EV_TYPE_LINK,
184  "title", title,
185  "action", action,
186  NULL));
187 }

+ Here is the caller graph for this function:

static void ev_link_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  param_spec 
)
static

Definition at line 97 of file ev-link.c.

101 {
102  EvLink *self = EV_LINK (object);
103 
104  switch (prop_id) {
105  case PROP_TITLE:
106  self->priv->title = g_value_dup_string (value);
107  break;
108  case PROP_ACTION:
109  self->priv->action = g_value_dup_object (value);
110  break;
111  default:
112  G_OBJECT_WARN_INVALID_PROPERTY_ID (object,
113  prop_id,
114  param_spec);
115  break;
116  }
117 }

+ Here is the caller graph for this function: