Skip to content

Commit

Permalink
typing: Pango: Rerun generator
Browse files Browse the repository at this point in the history
  • Loading branch information
matperc committed Sep 22, 2023
1 parent 48c7971 commit 8aeb9c1
Showing 1 changed file with 45 additions and 30 deletions.
75 changes: 45 additions & 30 deletions src/gi-stubs/repository/Pango.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
from typing import Any
from typing import Callable
from typing import Literal
from typing import Optional
from typing import Sequence
from typing import Tuple
from typing import Type
from typing import TypeVar

from gi.repository import Gio
from gi.repository import GLib
from gi.repository import GObject
from gi.repository import HarfBuzz
from typing_extensions import Concatenate
from typing_extensions import ParamSpec

_VarArgs = ParamSpec("_VarArgs")

ANALYSIS_FLAG_CENTERED_BASELINE: int = 1
ANALYSIS_FLAG_IS_ELLIPSIS: int = 2
Expand All @@ -20,9 +26,9 @@ GLYPH_INVALID_INPUT: int = 4294967295
GLYPH_UNKNOWN_FLAG: int = 268435456
SCALE: int = 1024
VERSION_MAJOR: int = 1
VERSION_MICRO: int = 12
VERSION_MICRO: int = 14
VERSION_MINOR: int = 50
VERSION_STRING: str = "1.50.12"
VERSION_STRING: str = "1.50.14"
_introspection_module = ... # FIXME Constant
_lock = ... # FIXME Constant
_namespace: str = "Pango"
Expand Down Expand Up @@ -60,9 +66,8 @@ def attr_shape_new(ink_rect: Rectangle, logical_rect: Rectangle) -> Attribute: .
def attr_shape_new_with_data(
ink_rect: Rectangle,
logical_rect: Rectangle,
data: None,
copy_func: Optional[Callable[..., None]] = None,
destroy_func: Optional[Callable[[None], None]] = None,
data: Optional[Any] = None,
copy_func: Optional[Callable[Concatenate[_VarArgs], None]] = None,
) -> Attribute: ...
def attr_show_new(flags: ShowFlags) -> Attribute: ...
def attr_size_new(size: int) -> Attribute: ...
Expand Down Expand Up @@ -142,7 +147,7 @@ def parse_style(str: str, warn: bool) -> Tuple[bool, Style]: ...
def parse_variant(str: str, warn: bool) -> Tuple[bool, Variant]: ...
def parse_weight(str: str, warn: bool) -> Tuple[bool, Weight]: ...
def quantize_line_geometry() -> Tuple[int, int]: ...
def read_line(stream: None, str: GLib.String) -> int: ...
def read_line(stream: Optional[Any], str: GLib.String) -> int: ...
def reorder_items(items: list[Item]) -> list[Item]: ...
def scan_int() -> Tuple[bool, str, int]: ...
def scan_string(out: GLib.String) -> Tuple[bool, str]: ...
Expand Down Expand Up @@ -200,15 +205,15 @@ class Analysis(GObject.GPointer):
Analysis()
"""

shape_engine: None = ...
lang_engine: None = ...
shape_engine: Any = ...
lang_engine: Any = ...
font: Font = ...
level: int = ...
gravity: int = ...
flags: int = ...
script: int = ...
language: Language = ...
extra_attrs: list[None] = ...
extra_attrs: list[Any] = ...

class AttrClass(GObject.GPointer):
"""
Expand Down Expand Up @@ -323,7 +328,9 @@ class AttrList(GObject.GBoxed):
def change(self, attr: Attribute) -> None: ...
def copy(self) -> Optional[AttrList]: ...
def equal(self, other_list: AttrList) -> bool: ...
def filter(self, func: Callable[..., bool], *data: Any) -> Optional[AttrList]: ...
def filter(
self, func: Callable[Concatenate[Attribute, _VarArgs], bool], *data: Any
) -> Optional[AttrList]: ...
@staticmethod
def from_string(text: str) -> Optional[AttrList]: ...
def get_attributes(self) -> list[Attribute]: ...
Expand All @@ -350,18 +357,17 @@ class AttrShape(GObject.GPointer):
attr: Attribute = ...
ink_rect: Rectangle = ...
logical_rect: Rectangle = ...
data: None = ...
copy_func: Callable[..., None] = ...
destroy_func: Callable[[None], None] = ...
data: Any = ...
copy_func: Callable[Concatenate[_VarArgs], None] = ...
destroy_func: Callable[[Optional[Any]], None] = ...
@staticmethod
def new(ink_rect: Rectangle, logical_rect: Rectangle) -> Attribute: ...
@staticmethod
def new_with_data(
ink_rect: Rectangle,
logical_rect: Rectangle,
data: None,
copy_func: Optional[Callable[..., None]] = None,
destroy_func: Optional[Callable[[None], None]] = None,
data: Optional[Any] = None,
copy_func: Optional[Callable[Concatenate[_VarArgs], None]] = None,
) -> Attribute: ...

class AttrSize(GObject.GPointer):
Expand Down Expand Up @@ -668,8 +674,8 @@ class FontFaceClass(GObject.GPointer):
list_sizes: Callable[[FontFace], list[int]] = ...
is_synthesized: Callable[[FontFace], bool] = ...
get_family: Callable[[FontFace], FontFamily] = ...
_pango_reserved3: None = ...
_pango_reserved4: None = ...
_pango_reserved3: Any = ...
_pango_reserved4: Any = ...

class FontFamily(GObject.Object, Gio.ListModel):
"""
Expand Down Expand Up @@ -725,7 +731,7 @@ class FontFamilyClass(GObject.GPointer):
is_monospace: Callable[[FontFamily], bool] = ...
is_variable: Callable[[FontFamily], bool] = ...
get_face: Callable[[FontFamily, Optional[str]], Optional[FontFace]] = ...
_pango_reserved2: None = ...
_pango_reserved2: Any = ...

class FontMap(GObject.Object, Gio.ListModel):
"""
Expand Down Expand Up @@ -794,7 +800,7 @@ class FontMapClass(GObject.GPointer):
get_serial: Callable[[FontMap], int] = ...
changed: Callable[[FontMap], None] = ...
get_family: Callable[[FontMap, str], FontFamily] = ...
get_face: None = ...
get_face: Any = ...

class FontMetrics(GObject.GBoxed):
"""
Expand Down Expand Up @@ -842,11 +848,15 @@ class Fontset(GObject.Object):
"""

parent_instance: GObject.Object = ...
def do_foreach(self, func: Callable[..., bool], *data: Any) -> None: ...
def do_foreach(
self, func: Callable[Concatenate[Fontset, Font, _VarArgs], bool], *data: Any
) -> None: ...
def do_get_font(self, wc: int) -> Font: ...
def do_get_language(self) -> Language: ...
def do_get_metrics(self) -> FontMetrics: ...
def foreach(self, func: Callable[..., bool], *data: Any) -> None: ...
def foreach(
self, func: Callable[Concatenate[Fontset, Font, _VarArgs], bool], *data: Any
) -> None: ...
def get_font(self, wc: int) -> Font: ...
def get_metrics(self) -> FontMetrics: ...

Expand All @@ -863,11 +873,16 @@ class FontsetClass(GObject.GPointer):
get_font: Callable[[Fontset, int], Font] = ...
get_metrics: Callable[[Fontset], FontMetrics] = ...
get_language: Callable[[Fontset], Language] = ...
foreach: Callable[..., None] = ...
_pango_reserved1: None = ...
_pango_reserved2: None = ...
_pango_reserved3: None = ...
_pango_reserved4: None = ...
foreach: Callable[
Concatenate[
Fontset, Callable[Concatenate[Fontset, Font, _VarArgs], bool], _VarArgs
],
None,
] = ...
_pango_reserved1: Any = ...
_pango_reserved2: Any = ...
_pango_reserved3: Any = ...
_pango_reserved4: Any = ...

class FontsetSimple(Fontset):
"""
Expand Down Expand Up @@ -1376,9 +1391,9 @@ class RendererClass(GObject.GPointer):
draw_glyph_item: Callable[
[Renderer, Optional[str], GlyphItem, int, int], None
] = ...
_pango_reserved2: None = ...
_pango_reserved3: None = ...
_pango_reserved4: None = ...
_pango_reserved2: Any = ...
_pango_reserved3: Any = ...
_pango_reserved4: Any = ...

class RendererPrivate(GObject.GPointer): ...

Expand Down

0 comments on commit 8aeb9c1

Please sign in to comment.