Changes to qemacs/display.h
Charlie Gordon <[email protected]> Fri, 13 May 2005 06:05:27 -0400
| Newsgroups | gmane.editors.qemacs.devel |
|---|---|
| Message-ID | <[email protected]> |
Index: qemacs/display.h
diff -u qemacs/display.h:1.4 qemacs/display.h:1.5
--- qemacs/display.h:1.4 Wed May 11 11:59:03 2005
+++ qemacs/display.h Fri May 13 10:05:24 2005
@@ -30,6 +30,7 @@
#define QE_FAMILY_FALLBACK_MASK 0xff0000
typedef struct QEFont {
+ int refcount;
int ascent;
int descent;
void *private;
@@ -186,6 +187,16 @@
QEDisplay *probe_display(void);
QEFont *select_font(QEditScreen *s, int style, int size);
+static inline QEFont *lock_font(QEditScreen *s, QEFont *font) {
+ if (font && font->refcount)
+ font->refcount++;
+ return font;
+}
+static inline void release_font(QEditScreen *s, QEFont *font) {
+ if (font && font->refcount)
+ font->refcount--;
+}
+
void selection_activate(QEditScreen *s);
void selection_request(QEditScreen *s);