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

Go to the source code of this file.

Typedefs

typedef typedefG_BEGIN_DECLS
struct _EvWindowTitle 
EvWindowTitle
 

Enumerations

enum  EvWindowTitleType { EV_WINDOW_TITLE_DOCUMENT, EV_WINDOW_TITLE_PASSWORD, EV_WINDOW_TITLE_RECENT }
 

Functions

EvWindowTitleev_window_title_new (EvWindow *window)
 
void ev_window_title_set_type (EvWindowTitle *window_title, EvWindowTitleType type)
 
void ev_window_title_set_document (EvWindowTitle *window_title, EvDocument *document)
 
void ev_window_title_set_uri (EvWindowTitle *window_title, const char *uri)
 
void ev_window_title_free (EvWindowTitle *window_title)
 

Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _EvWindowTitle EvWindowTitle

Definition at line 28 of file ev-window-title.h.

Enumeration Type Documentation

Enumerator
EV_WINDOW_TITLE_DOCUMENT 
EV_WINDOW_TITLE_PASSWORD 
EV_WINDOW_TITLE_RECENT 

Definition at line 30 of file ev-window-title.h.

Function Documentation

void ev_window_title_free ( EvWindowTitle window_title)

Definition at line 249 of file ev-window-title.c.

250 {
251  if (window_title->document)
252  g_object_weak_unref (G_OBJECT (window_title->document), (GWeakNotify)document_destroyed_cb, window_title);
253  g_free (window_title->doc_title);
254  g_free (window_title->uri);
255  g_free (window_title);
256 }

+ Here is the caller graph for this function:

EvWindowTitle* ev_window_title_new ( EvWindow window)

Definition at line 172 of file ev-window-title.c.

173 {
174  EvWindowTitle *window_title;
175 
176  window_title = g_new0 (EvWindowTitle, 1);
177  window_title->window = window;
178  window_title->type = EV_WINDOW_TITLE_DOCUMENT;
179 
180  ev_window_title_update (window_title);
181 
182  return window_title;
183 }

+ Here is the caller graph for this function:

void ev_window_title_set_document ( EvWindowTitle window_title,
EvDocument document 
)

Definition at line 202 of file ev-window-title.c.

204 {
205  if (window_title->document == document)
206  return;
207 
208  if (window_title->document)
209  g_object_weak_unref (G_OBJECT (window_title->document), (GWeakNotify)document_destroyed_cb, window_title);
210  window_title->document = document;
211  g_object_weak_ref (G_OBJECT (window_title->document), (GWeakNotify)document_destroyed_cb, window_title);
212  g_clear_pointer (&window_title->doc_title, g_free);
213 
214  if (window_title->document != NULL) {
215  gchar *doc_title;
216 
217  doc_title = g_strdup (ev_document_get_title (window_title->document));
218 
219  /* Make sure we get a valid title back */
220  if (doc_title != NULL) {
221  doc_title = g_strstrip (doc_title);
222 
223  if (doc_title[0] != '\0' &&
224  g_utf8_validate (doc_title, -1, NULL)) {
225  window_title->doc_title = doc_title;
226  } else {
227  g_free (doc_title);
228  }
229  }
230  }
231 
232  ev_window_title_update (window_title);
233 }

+ Here is the caller graph for this function:

void ev_window_title_set_type ( EvWindowTitle window_title,
EvWindowTitleType  type 
)

Definition at line 186 of file ev-window-title.c.

187 {
188  window_title->type = type;
189 
190  ev_window_title_update (window_title);
191 }

+ Here is the caller graph for this function:

void ev_window_title_set_uri ( EvWindowTitle window_title,
const char *  uri 
)

Definition at line 236 of file ev-window-title.c.

238 {
239  if (g_strcmp0 (uri, window_title->uri) == 0)
240  return;
241 
242  g_free (window_title->uri);
243  window_title->uri = g_strdup (uri);
244 
245  ev_window_title_update (window_title);
246 }

+ Here is the caller graph for this function: