… | |
… | |
1312 | |
1312 | |
1313 | void |
1313 | void |
1314 | cursor_pos (DC::Layout self, int index) |
1314 | cursor_pos (DC::Layout self, int index) |
1315 | PPCODE: |
1315 | PPCODE: |
1316 | { |
1316 | { |
1317 | PangoRectangle strong_pos; |
1317 | PangoRectangle pos; |
1318 | pango_layout_get_cursor_pos (self->pl, index, &strong_pos, 0); |
1318 | pango_layout_get_cursor_pos (self->pl, index, &pos, 0); |
1319 | |
1319 | |
1320 | EXTEND (SP, 3); |
1320 | EXTEND (SP, 3); |
1321 | PUSHs (sv_2mortal (newSViv (strong_pos.x / PANGO_SCALE))); |
1321 | PUSHs (sv_2mortal (newSViv (pos.x / PANGO_SCALE))); |
1322 | PUSHs (sv_2mortal (newSViv (strong_pos.y / PANGO_SCALE))); |
1322 | PUSHs (sv_2mortal (newSViv (pos.y / PANGO_SCALE))); |
1323 | PUSHs (sv_2mortal (newSViv (strong_pos.height / PANGO_SCALE))); |
1323 | PUSHs (sv_2mortal (newSViv (pos.height / PANGO_SCALE))); |
1324 | } |
1324 | } |
1325 | |
1325 | |
1326 | void |
1326 | void |
1327 | index_to_line_x (DC::Layout self, int index, int trailing = 0) |
1327 | index_to_line_x (DC::Layout self, int index, int trailing = 0) |
1328 | PPCODE: |
1328 | PPCODE: |