perl-Pango r22 - in trunk: . xs
- From: tsch svn gnome org
- To: svn-commits-list gnome org
- Subject: perl-Pango r22 - in trunk: . xs
- Date: Tue, 24 Mar 2009 19:03:25 +0000 (UTC)
Author: tsch
Date: Tue Mar 24 19:03:25 2009
New Revision: 22
URL: http://svn.gnome.org/viewvc/perl-Pango?rev=22&view=rev
Log:
Clean up a holdover from the split-off: properly declare
gtk2perl_pango_attribute_register_custom_type in pango-perl.h so that Gtk2 can
use it without having to jump through hoops, and move the one macro that is in
use out of pango-perl-private.h which thus becomes empty.
Removed:
trunk/pango-perl-private.h
Modified:
trunk/ChangeLog
trunk/pango-perl.h
trunk/xs/PangoAttributes.xs
Modified: trunk/pango-perl.h
==============================================================================
--- trunk/pango-perl.h (original)
+++ trunk/pango-perl.h Tue Mar 24 19:03:25 2009
@@ -67,4 +67,7 @@
SV * newSVPangoRectangle (PangoRectangle * rectangle);
PangoRectangle * SvPangoRectangle (SV * sv);
+/* for registering custom attribute types */
+void gtk2perl_pango_attribute_register_custom_type (PangoAttrType type, const char *package);
+
#endif /* _PANGO_PERL_H_ */
Modified: trunk/xs/PangoAttributes.xs
==============================================================================
--- trunk/xs/PangoAttributes.xs (original)
+++ trunk/xs/PangoAttributes.xs Tue Mar 24 19:03:25 2009
@@ -18,7 +18,14 @@
*/
#include "pango-perl.h"
-#include "pango-perl-private.h"
+
+#define PANGO_PERL_ATTR_STORE_INDICES(offset, attr) \
+ if (items == offset + 2) { \
+ guint start = SvUV (ST (offset)); \
+ guint end = SvUV (ST (offset + 1)); \
+ attr->start_index = start; \
+ attr->end_index = end; \
+ }
/* ------------------------------------------------------------------------- */
@@ -442,7 +449,7 @@
C_ARGS:
language
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoLanguage *
value (PangoAttribute * attr, ...)
@@ -466,7 +473,7 @@
C_ARGS:
family
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
# --------------------------------------------------------------------------- #
@@ -479,7 +486,7 @@
C_ARGS:
red, green, blue
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (4, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (4, RETVAL);
# --------------------------------------------------------------------------- #
@@ -492,7 +499,7 @@
C_ARGS:
red, green, blue
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (4, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (4, RETVAL);
# --------------------------------------------------------------------------- #
@@ -505,7 +512,7 @@
C_ARGS:
size
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
#if PANGO_CHECK_VERSION (1, 8, 0)
@@ -513,7 +520,7 @@
C_ARGS:
size
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
#endif
@@ -532,7 +539,7 @@
C_ARGS:
style
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoStyle
value (PangoAttribute * attr, ...)
@@ -554,7 +561,7 @@
C_ARGS:
weight
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoWeight
value (PangoAttribute * attr, ...)
@@ -576,7 +583,7 @@
C_ARGS:
variant
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoVariant
value (PangoAttribute * attr, ...)
@@ -598,7 +605,7 @@
C_ARGS:
stretch
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoStretch
value (PangoAttribute * attr, ...)
@@ -620,7 +627,7 @@
C_ARGS:
underline
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoUnderline
value (PangoAttribute * attr, ...)
@@ -642,7 +649,7 @@
C_ARGS:
strikethrough
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
gboolean
value (PangoAttribute * attr, ...)
@@ -664,7 +671,7 @@
C_ARGS:
font_desc
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoFontDescription_own *
desc (PangoAttribute * attr, ...)
@@ -690,7 +697,7 @@
C_ARGS:
scale
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
double
value (PangoAttribute * attr, ...)
@@ -712,7 +719,7 @@
C_ARGS:
rise
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
# --------------------------------------------------------------------------- #
@@ -725,7 +732,7 @@
C_ARGS:
ink_rect, logical_rect
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (3, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (3, RETVAL);
PangoRectangle *
ink_rect (PangoAttribute * attr, ...)
@@ -762,7 +769,7 @@
C_ARGS:
enable_fallback
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
gboolean
value (PangoAttribute * attr, ...)
@@ -788,7 +795,7 @@
C_ARGS:
letter_spacing
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
#endif
@@ -805,7 +812,7 @@
C_ARGS:
red, green, blue
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (4, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (4, RETVAL);
#endif
@@ -822,7 +829,7 @@
C_ARGS:
red, green, blue
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (4, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (4, RETVAL);
#endif
@@ -839,7 +846,7 @@
C_ARGS:
gravity
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoGravity
value (PangoAttribute * attr, ...)
@@ -859,7 +866,7 @@
C_ARGS:
hint
POSTCALL:
- GTK2PERL_PANGO_ATTR_STORE_INDICES (2, RETVAL);
+ PANGO_PERL_ATTR_STORE_INDICES (2, RETVAL);
PangoGravityHint
value (PangoAttribute * attr, ...)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]