- PROP_URI,
- g_param_spec_string ("uri",
- "Link URI",
- "The link URI",
- NULL,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_FILENAME,
- g_param_spec_string ("filename",
- "Filename",
- "The link filename",
- NULL,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_PARAMS,
- g_param_spec_string ("params",
- "Params",
- "The link params",
- NULL,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_TYPE,
- g_param_spec_enum ("type",
- "Link Type",
- "The link type",
- EV_TYPE_LINK_TYPE,
- EV_LINK_TYPE_TITLE,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_PAGE,
- g_param_spec_int ("page",
- "Link Page",
- "The link page",
- -1,
- G_MAXINT,
- 0,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_LEFT,
- g_param_spec_double ("left",
- "Left coordinate",
- "The left coordinate",
- -G_MAXDOUBLE,
- G_MAXDOUBLE,
- 0,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_TOP,
- g_param_spec_double ("top",
- "Top coordinate",
- "The top coordinate",
- -G_MAXDOUBLE,
- G_MAXDOUBLE,
- 0,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_BOTTOM,
- g_param_spec_double ("bottom",
- "Bottom coordinate",
- "The bottom coordinate",
- -G_MAXDOUBLE,
- G_MAXDOUBLE,
- 0,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (g_object_class,
- PROP_RIGHT,
- g_param_spec_double ("right",
- "Right coordinate",
- "The right coordinate",
- -G_MAXDOUBLE,
- G_MAXDOUBLE,
- 0,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
-
- g_object_class_install_property (g_object_class,
- PROP_ZOOM,
- g_param_spec_double ("zoom",
- "Zoom",
- "Zoom",
- 0,
- G_MAXDOUBLE,
- 0,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
-}
-
-EvLink *
-ev_link_new_title (const char *title)
-{
- return EV_LINK (g_object_new (EV_TYPE_LINK,
- "title", title,
- "type", EV_LINK_TYPE_TITLE,
- NULL));
-}
-
-EvLink *
-ev_link_new_page (const char *title, int page)
-{
- return EV_LINK (g_object_new (EV_TYPE_LINK,
- "title", title,
- "page", page,
- "type", EV_LINK_TYPE_PAGE,
- NULL));
-}
-
-EvLink *
-ev_link_new_page_xyz (const char *title,
- int page,
- double left,
- double top,
- double zoom)
-{
- return EV_LINK (g_object_new (EV_TYPE_LINK,
- "title", title,
- "page", page,
- "type", EV_LINK_TYPE_PAGE_XYZ,
- "left", left,
- "top", top,
- "zoom", zoom,
- NULL));
-}
-
-EvLink *
-ev_link_new_page_fit (const char *title,
- int page)
-{
- return EV_LINK (g_object_new (EV_TYPE_LINK,
- "title", title,
- "page", page,
- "type", EV_LINK_TYPE_PAGE_FIT,
- NULL));
-}
-
-EvLink *
-ev_link_new_page_fith (const char *title,
- int page,
- double top)
-{
- return EV_LINK (g_object_new (EV_TYPE_LINK,
- "title", title,
- "page", page,
- "type", EV_LINK_TYPE_PAGE_FITH,
- "top", top,
- NULL));
-}
-
-EvLink *
-ev_link_new_page_fitv (const char *title,
- int page,
- double left)
-{
- return EV_LINK (g_object_new (EV_TYPE_LINK,
- "title", title,
- "page", page,
- "type", EV_LINK_TYPE_PAGE_FITV,
- "left", left,
- NULL));
-}
-
-EvLink *
-ev_link_new_page_fitr (const char *title,
- int page,
- double left,
- double bottom,
- double right,
- double top)
-{
- return EV_LINK (g_object_new (EV_TYPE_LINK,
- "title", title,
- "page", page,
- "type", EV_LINK_TYPE_PAGE_FITR,
- "left", left,
- "bottom", bottom,
- "right", right,
- "top", top,
- NULL));