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-application.h File Reference
#include <glib.h>
#include <gtk/gtk.h>
#include "ev-window.h"
+ Include dependency graph for ev-application.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EV_TYPE_APPLICATION   (ev_application_get_type ())
 
#define EV_APPLICATION(object)   (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_APPLICATION, EvApplication))
 
#define EV_APPLICATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_APPLICATION, EvApplicationClass))
 
#define EV_IS_APPLICATION(object)   (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_APPLICATION))
 
#define EV_IS_APPLICATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_APPLICATION))
 
#define EV_APPLICATION_GET_CLASS(object)   (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_APPLICATION, EvApplicationClass))
 
#define EV_APP   ((EvApplication *) g_application_get_default ())
 

Typedefs

typedef typedefG_BEGIN_DECLS
struct _EvApplication 
EvApplication
 
typedef struct _EvApplicationClass EvApplicationClass
 

Functions

GType ev_application_get_type (void) G_GNUC_CONST
 
EvApplicationev_application_new (void)
 
void ev_application_open_recent_view (EvApplication *application, GdkScreen *screen, guint32 timestamp)
 
void ev_application_open_uri_at_dest (EvApplication *application, const char *uri, GdkScreen *screen, EvLinkDest *dest, EvWindowRunMode mode, const gchar *search_string, guint32 timestamp)
 
void ev_application_open_uri_list (EvApplication *application, GSList *uri_list, GdkScreen *screen, guint32 timestamp)
 
gboolean ev_application_has_window (EvApplication *application)
 
guint ev_application_get_n_windows (EvApplication *application)
 
const gchar * ev_application_get_uri (EvApplication *application)
 
GObject * ev_application_get_media_keys (EvApplication *application)
 
const gchar * ev_application_get_dot_dir (EvApplication *application, gboolean create)
 
void ev_application_show_help (EvApplication *application, GdkScreen *screen, const char *topic)
 

Macro Definition Documentation

#define EV_APP   ((EvApplication *) g_application_get_default ())

Definition at line 47 of file ev-application.h.

#define EV_APPLICATION (   object)    (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_APPLICATION, EvApplication))

Definition at line 41 of file ev-application.h.

#define EV_APPLICATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_APPLICATION, EvApplicationClass))

Definition at line 42 of file ev-application.h.

#define EV_APPLICATION_GET_CLASS (   object)    (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_APPLICATION, EvApplicationClass))

Definition at line 45 of file ev-application.h.

#define EV_IS_APPLICATION (   object)    (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_APPLICATION))

Definition at line 43 of file ev-application.h.

#define EV_IS_APPLICATION_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_APPLICATION))

Definition at line 44 of file ev-application.h.

#define EV_TYPE_APPLICATION   (ev_application_get_type ())

Definition at line 40 of file ev-application.h.

Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _EvApplication EvApplication

Definition at line 37 of file ev-application.h.

Definition at line 38 of file ev-application.h.

Function Documentation

const gchar* ev_application_get_dot_dir ( EvApplication application,
gboolean  create 
)

Definition at line 1289 of file ev-application.c.

1291 {
1292  if (create)
1293  g_mkdir_with_parents (application->dot_dir, 0700);
1294 
1295  return application->dot_dir;
1296 }

+ Here is the caller graph for this function:

GObject* ev_application_get_media_keys ( EvApplication application)

ev_application_get_media_keys: : The instance of the application.

It gives you access to the media player keys handler object.

Returns: A EvMediaPlayerKeys.

Definition at line 1279 of file ev-application.c.

1280 {
1281 #ifdef ENABLE_DBUS
1282  return G_OBJECT (application->keys);
1283 #else
1284  return NULL;
1285 #endif /* ENABLE_DBUS */
1286 }

+ Here is the caller graph for this function:

guint ev_application_get_n_windows ( EvApplication application)

Definition at line 1248 of file ev-application.c.

1249 {
1250  GList *l, *windows;
1251  guint retval = 0;
1252 
1253  windows = gtk_application_get_windows (GTK_APPLICATION (application));
1254  for (l = windows; l != NULL && !retval; l = l->next) {
1255  if (!EV_IS_WINDOW (l->data))
1256  continue;
1257 
1258  retval++;
1259  }
1260 
1261  return retval;
1262 }
GType ev_application_get_type ( void  )
const gchar* ev_application_get_uri ( EvApplication application)

Definition at line 1265 of file ev-application.c.

1266 {
1267  return application->uri;
1268 }

+ Here is the caller graph for this function:

gboolean ev_application_has_window ( EvApplication application)

Definition at line 1232 of file ev-application.c.

1233 {
1234  GList *l, *windows;
1235 
1236  windows = gtk_application_get_windows (GTK_APPLICATION (application));
1237  for (l = windows; l != NULL; l = l->next) {
1238  if (!EV_IS_WINDOW (l->data))
1239  continue;
1240 
1241  return TRUE;
1242  }
1243 
1244  return FALSE;
1245 }

+ Here is the caller graph for this function:

EvApplication* ev_application_new ( void  )

ev_application_new:

Creates a new EvApplication instance.

Returns: (transfer full): a newly created EvApplication

Definition at line 100 of file ev-application.c.

101 {
102  const GApplicationFlags flags = G_APPLICATION_NON_UNIQUE;
103 
104  return g_object_new (EV_TYPE_APPLICATION,
105  "application-id", NULL,
106  "flags", flags,
107  NULL);
108 }

+ Here is the caller graph for this function:

void ev_application_open_recent_view ( EvApplication application,
GdkScreen *  screen,
guint32  timestamp 
)

ev_application_open_recent_view: : The instance of the application. : Current time value.

Creates a new window showing the recent view

Definition at line 665 of file ev-application.c.

668 {
669  GtkWidget *new_window = ev_window_new ();
670 
671  ev_window_open_recent_view (EV_WINDOW (new_window));
672 
673 #ifdef GDK_WINDOWING_X11
674  GdkWindow *gdk_window;
675 #endif
676 
677  if (screen) {
678  ev_stock_icons_set_screen (screen);
679  gtk_window_set_screen (GTK_WINDOW (new_window), screen);
680  }
681 
682  if (!gtk_widget_get_realized (new_window))
683  gtk_widget_realize (new_window);
684 
685 #ifdef GDK_WINDOWING_X11
686  gdk_window = gtk_widget_get_window (GTK_WIDGET (new_window));
687  if (GDK_IS_X11_WINDOW (gdk_window)) {
688  if (timestamp <= 0)
689  timestamp = gdk_x11_get_server_time (gdk_window);
690  gdk_x11_window_set_user_time (gdk_window, timestamp);
691 
692  gtk_window_present (GTK_WINDOW (new_window));
693  } else
694 #endif /* GDK_WINDOWING_X11 */
695  {
696  gtk_window_present_with_time (GTK_WINDOW (new_window), timestamp);
697  }
698 }

+ Here is the caller graph for this function:

void ev_application_open_uri_at_dest ( EvApplication application,
const char *  uri,
GdkScreen *  screen,
EvLinkDest dest,
EvWindowRunMode  mode,
const gchar *  search_string,
guint32  timestamp 
)
void ev_application_open_uri_list ( EvApplication application,
GSList *  uri_list,
GdkScreen *  screen,
guint32  timestamp 
)
void ev_application_show_help ( EvApplication application,
GdkScreen *  screen,
const char *  topic 
)

ev_application_show_help: : the EvApplication : (allow-none): a #GdkScreen, or NULL to use the default screen : (allow-none): the help topic, or NULL to show the index

Launches the help viewer on to show the evince help. If is NULL, shows the help index; otherwise the topic.

Definition at line 1308 of file ev-application.c.

1311 {
1312  char *escaped_topic, *uri;
1313 
1314  if (topic != NULL) {
1315  escaped_topic = g_uri_escape_string (topic, NULL, TRUE);
1316  uri = g_strdup_printf ("help:evince/%s", escaped_topic);
1317  g_free (escaped_topic);
1318  } else {
1319  uri = g_strdup ("help:evince");
1320  }
1321 
1322  gtk_show_uri (screen, uri, gtk_get_current_event_time (), NULL);
1323  g_free (uri);
1324 }

+ Here is the caller graph for this function: