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-transition-effect.c File Reference
#include <config.h>
#include "ev-transition-effect.h"
#include "ev-document-type-builtins.h"
+ Include dependency graph for ev-transition-effect.c:

Go to the source code of this file.

Data Structures

struct  EvTransitionEffectPrivate
 

Macros

#define EV_TRANSITION_EFFECT_GET_PRIV(obj)   (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffectPrivate))
 

Typedefs

typedef struct
EvTransitionEffectPrivate 
EvTransitionEffectPrivate
 

Enumerations

enum  {
  PROP_0, PROP_TYPE, PROP_ALIGNMENT, PROP_DIRECTION,
  PROP_DURATION, PROP_ANGLE, PROP_SCALE, PROP_RECTANGULAR
}
 

Functions

static void ev_transition_effect_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 
static void ev_transition_effect_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 
static void ev_transition_effect_init (EvTransitionEffect *effect)
 
static void ev_transition_effect_class_init (EvTransitionEffectClass *klass)
 
EvTransitionEffectev_transition_effect_new (EvTransitionEffectType type, const gchar *first_property_name,...)
 

Macro Definition Documentation

#define EV_TRANSITION_EFFECT_GET_PRIV (   obj)    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_TRANSITION_EFFECT, EvTransitionEffectPrivate))

Definition at line 27 of file ev-transition-effect.c.

Typedef Documentation

Enumeration Type Documentation

anonymous enum
Enumerator
PROP_0 
PROP_TYPE 
PROP_ALIGNMENT 
PROP_DIRECTION 
PROP_DURATION 
PROP_ANGLE 
PROP_SCALE 
PROP_RECTANGULAR 

Definition at line 43 of file ev-transition-effect.c.

43  {
44  PROP_0,
45  PROP_TYPE,
49  PROP_ANGLE,
50  PROP_SCALE,
52 };

Function Documentation

static void ev_transition_effect_class_init ( EvTransitionEffectClass klass)
static

Definition at line 143 of file ev-transition-effect.c.

144 {
145  GObjectClass *object_class = G_OBJECT_CLASS (klass);
146 
147  object_class->set_property = ev_transition_effect_set_property;
148  object_class->get_property = ev_transition_effect_get_property;
149 
150  g_object_class_install_property (object_class,
151  PROP_TYPE,
152  g_param_spec_enum ("type",
153  "Effect type",
154  "Page transition effect type",
155  EV_TYPE_TRANSITION_EFFECT_TYPE,
157  G_PARAM_READWRITE |
158  G_PARAM_STATIC_STRINGS));
159  g_object_class_install_property (object_class,
161  g_param_spec_enum ("alignment",
162  "Effect alignment",
163  "Alignment for the effect",
164  EV_TYPE_TRANSITION_EFFECT_ALIGNMENT,
166  G_PARAM_READWRITE |
167  G_PARAM_STATIC_STRINGS));
168  g_object_class_install_property (object_class,
170  g_param_spec_enum ("direction",
171  "Effect direction",
172  "Direction for the effect",
173  EV_TYPE_TRANSITION_EFFECT_DIRECTION,
175  G_PARAM_READWRITE |
176  G_PARAM_STATIC_STRINGS));
177  g_object_class_install_property (object_class,
179  g_param_spec_int ("duration",
180  "Effect duration",
181  "Effect duration in seconds",
182  0, G_MAXINT, 0,
183  G_PARAM_READWRITE |
184  G_PARAM_STATIC_STRINGS));
185  g_object_class_install_property (object_class,
186  PROP_ANGLE,
187  g_param_spec_int ("angle",
188  "Effect angle",
189  "Effect angle in degrees, counted "
190  "counterclockwise from left to right",
191  0, 360, 0,
192  G_PARAM_READWRITE |
193  G_PARAM_STATIC_STRINGS));
194  g_object_class_install_property (object_class,
195  PROP_SCALE,
196  g_param_spec_double ("scale",
197  "Effect scale",
198  "Scale at which the effect is applied",
199  0., 1., 1.,
200  G_PARAM_READWRITE |
201  G_PARAM_STATIC_STRINGS));
202  g_object_class_install_property (object_class,
204  g_param_spec_boolean ("rectangular",
205  "Rectangular area",
206  "Whether the covered area is rectangular",
207  FALSE,
208  G_PARAM_READWRITE |
209  G_PARAM_STATIC_STRINGS));
210 
211  g_type_class_add_private (klass, sizeof (EvTransitionEffectPrivate));
212 }
static void ev_transition_effect_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

Definition at line 95 of file ev-transition-effect.c.

99 {
101 
102  priv = EV_TRANSITION_EFFECT_GET_PRIV (object);
103 
104  switch (prop_id) {
105  case PROP_TYPE:
106  g_value_set_enum (value, priv->type);
107  break;
108  case PROP_ALIGNMENT:
109  g_value_set_enum (value, priv->alignment);
110  break;
111  case PROP_DIRECTION:
112  g_value_set_enum (value, priv->direction);
113  break;
114  case PROP_DURATION:
115  g_value_set_int (value, priv->duration);
116  break;
117  case PROP_ANGLE:
118  g_value_set_int (value, priv->angle);
119  break;
120  case PROP_SCALE:
121  g_value_set_double (value, priv->scale);
122  break;
123  case PROP_RECTANGULAR:
124  g_value_set_enum (value, priv->rectangular);
125  break;
126  default:
127  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
128  break;
129  }
130 }

+ Here is the caller graph for this function:

static void ev_transition_effect_init ( EvTransitionEffect effect)
static

Definition at line 133 of file ev-transition-effect.c.

134 {
136 
137  priv = EV_TRANSITION_EFFECT_GET_PRIV (effect);
138 
139  priv->scale = 1.;
140 }
EvTransitionEffect* ev_transition_effect_new ( EvTransitionEffectType  type,
const gchar *  first_property_name,
  ... 
)

Definition at line 215 of file ev-transition-effect.c.

218 {
219  GObject *object;
220  va_list args;
221 
222  object = g_object_new (EV_TYPE_TRANSITION_EFFECT,
223  "type", type,
224  NULL);
225 
226  va_start (args, first_property_name);
227  g_object_set_valist (object, first_property_name, args);
228  va_end (args);
229 
230  return EV_TRANSITION_EFFECT (object);
231 }

+ Here is the caller graph for this function:

static void ev_transition_effect_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

Definition at line 57 of file ev-transition-effect.c.

61 {
63 
64  priv = EV_TRANSITION_EFFECT_GET_PRIV (object);
65 
66  switch (prop_id) {
67  case PROP_TYPE:
68  priv->type = g_value_get_enum (value);
69  break;
70  case PROP_ALIGNMENT:
71  priv->alignment = g_value_get_enum (value);
72  break;
73  case PROP_DIRECTION:
74  priv->direction = g_value_get_enum (value);
75  break;
76  case PROP_DURATION:
77  priv->duration = g_value_get_int (value);
78  break;
79  case PROP_ANGLE:
80  priv->angle = g_value_get_int (value);
81  break;
82  case PROP_SCALE:
83  priv->scale = g_value_get_double (value);
84  break;
85  case PROP_RECTANGULAR:
86  priv->rectangular = g_value_get_boolean (value);
87  break;
88  default:
89  G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
90  break;
91  }
92 }

+ Here is the caller graph for this function: