Skip to content

Commit 8f9ba86

Browse files
committed
typing: Pango: Update
1 parent c75512a commit 8f9ba86

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

src/gi-stubs/repository/Pango.pyi

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@ GLYPH_INVALID_INPUT: int = 4294967295
1818
GLYPH_UNKNOWN_FLAG: int = 268435456
1919
SCALE: int = 1024
2020
VERSION_MAJOR: int = 1
21-
VERSION_MICRO: int = 4
22-
VERSION_MINOR: int = 56
23-
VERSION_STRING: str = "1.56.4"
24-
_lock = ... # FIXME Constant
25-
_namespace: str = "Pango"
26-
_overrides_module = ... # FIXME Constant
27-
_version: str = "1.0"
21+
VERSION_MICRO: int = 0
22+
VERSION_MINOR: int = 57
23+
VERSION_STRING: str = "1.57.0"
2824

2925
def attr_allow_breaks_new(allow_breaks: bool) -> Attribute: ...
3026
def attr_background_alpha_new(alpha: int) -> Attribute: ...
@@ -601,6 +597,7 @@ class FontDescription(GObject.GBoxed):
601597
def free(self) -> None: ...
602598
@staticmethod
603599
def from_string(str: str) -> FontDescription: ...
600+
def get_color(self) -> FontColor: ...
604601
def get_family(self) -> typing.Optional[str]: ...
605602
def get_features(self) -> typing.Optional[str]: ...
606603
def get_gravity(self) -> Gravity: ...
@@ -622,6 +619,7 @@ class FontDescription(GObject.GBoxed):
622619
@classmethod
623620
def new(cls) -> FontDescription: ...
624621
def set_absolute_size(self, size: float) -> None: ...
622+
def set_color(self, color: FontColor) -> None: ...
625623
def set_family(self, family: str) -> None: ...
626624
def set_family_static(self, family: str) -> None: ...
627625
def set_features(self, features: typing.Optional[str] = None) -> None: ...
@@ -679,8 +677,6 @@ class FontFaceClass(GObject.GPointer):
679677
list_sizes: typing.Callable[[FontFace], list[int]] = ...
680678
is_synthesized: typing.Callable[[FontFace], bool] = ...
681679
get_family: typing.Callable[[FontFace], FontFamily] = ...
682-
_pango_reserved3: None = ...
683-
_pango_reserved4: None = ...
684680

685681
class FontFamily(GObject.Object, Gio.ListModel):
686682
"""
@@ -751,7 +747,6 @@ class FontFamilyClass(GObject.GPointer):
751747
get_face: typing.Callable[
752748
[FontFamily, typing.Optional[str]], typing.Optional[FontFace]
753749
] = ...
754-
_pango_reserved2: None = ...
755750

756751
class FontMap(GObject.Object, Gio.ListModel):
757752
"""
@@ -904,10 +899,6 @@ class FontsetClass(GObject.GPointer):
904899
get_metrics: typing.Callable[[Fontset], FontMetrics] = ...
905900
get_language: typing.Callable[[Fontset], Language] = ...
906901
foreach: typing.Callable[..., None] = ...
907-
_pango_reserved1: None = ...
908-
_pango_reserved2: None = ...
909-
_pango_reserved3: None = ...
910-
_pango_reserved4: None = ...
911902

912903
class FontsetSimple(Fontset):
913904
"""
@@ -1175,7 +1166,9 @@ class Layout(GObject.Object):
11751166
def set_justify(self, justify: bool) -> None: ...
11761167
def set_justify_last_line(self, justify: bool) -> None: ...
11771168
def set_line_spacing(self, factor: float) -> None: ...
1178-
def set_markup(self, text, length=-1): ... # FIXME Function
1169+
def set_markup(
1170+
self, text, length=-1
1171+
): ... # FIXME: Override is missing typing annotation
11791172
def set_markup_with_accel(
11801173
self, markup: str, length: int, accel_marker: str
11811174
) -> str: ...
@@ -1227,7 +1220,6 @@ class LayoutLine(GObject.GBoxed):
12271220
start_index: int = ...
12281221
length: int = ...
12291222
runs: list[GlyphItem] = ...
1230-
is_paragraph_start: int = ...
12311223
resolved_dir: int = ...
12321224
def get_extents(self) -> typing.Tuple[Rectangle, Rectangle]: ...
12331225
def get_height(self) -> int: ...
@@ -1421,9 +1413,6 @@ class RendererClass(GObject.GPointer):
14211413
draw_glyph_item: typing.Callable[
14221414
[Renderer, typing.Optional[str], GlyphItem, int, int], None
14231415
] = ...
1424-
_pango_reserved2: None = ...
1425-
_pango_reserved3: None = ...
1426-
_pango_reserved4: None = ...
14271416

14281417
class RendererPrivate(GObject.GPointer): ...
14291418

@@ -1468,6 +1457,7 @@ class TabArray(GObject.GBoxed):
14681457
def to_string(self) -> str: ...
14691458

14701459
class FontMask(GObject.GFlags):
1460+
COLOR = 512
14711461
FAMILY = 1
14721462
FEATURES = 256
14731463
GRAVITY = 64
@@ -1599,6 +1589,11 @@ class EllipsizeMode(GObject.GEnum):
15991589
NONE = 0
16001590
START = 1
16011591

1592+
class FontColor(GObject.GEnum):
1593+
DONT_CARE = 2
1594+
FORBIDDEN = 0
1595+
REQUIRED = 1
1596+
16021597
class FontScale(GObject.GEnum):
16031598
NONE = 0
16041599
SMALL_CAPS = 3

0 commit comments

Comments
 (0)