Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Apply "Parse fields in classes and generate correct class structs" in gir #35

Merged
merged 3 commits into from
Dec 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
environment:
matrix:
- RUST: 1.6.0
- RUST: 1.9.0
BITS: 32
- RUST: 1.6.0
- RUST: 1.9.0
BITS: 64

install:
Expand Down
95 changes: 76 additions & 19 deletions atk-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (5e8c56e) from gir-files (71d73f0)
// This file was generated by gir (41b8c21) from gir-files (71d73f0)
// DO NOT EDIT

#![allow(non_camel_case_types, non_upper_case_globals)]
Expand All @@ -16,9 +16,11 @@ use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};

// Aliases
pub type AtkAttributeSet = glib::GSList;
pub type AtkState = u64;

// Enums
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum AtkCoordType {
Expand Down Expand Up @@ -592,30 +594,31 @@ pub const ATK_VALUE_VERY_GOOD: AtkValueType = AtkValueType::VeryGood;
pub const ATK_VALUE_BEST: AtkValueType = AtkValueType::Best;
pub const ATK_VALUE_LAST_DEFINED: AtkValueType = AtkValueType::LastDefined;


// Constants
pub const ATK_BINARY_AGE: i32 = 22210;
pub const ATK_INTERFACE_AGE: i32 = 1;
pub const ATK_MAJOR_VERSION: i32 = 2;
pub const ATK_MICRO_VERSION: i32 = 0;
pub const ATK_MINOR_VERSION: i32 = 22;
pub const ATK_VERSION_MIN_REQUIRED: i32 = 2;

// Flags
bitflags! {
#[repr(C)]
flags AtkHyperlinkStateFlags: c_uint {
const ATK_HYPERLINK_IS_INLINE = 1,
}
}



// Callbacks
pub type AtkEventListener = Option<unsafe extern "C" fn(*mut AtkObject)>;
pub type AtkEventListenerInit = Option<unsafe extern "C" fn()>;
pub type AtkFocusHandler = Option<unsafe extern "C" fn(*mut AtkObject, gboolean)>;
pub type AtkFunction = Option<unsafe extern "C" fn(gpointer) -> gboolean>;
pub type AtkKeySnoopFunc = Option<unsafe extern "C" fn(*mut AtkKeyEventStruct, gpointer) -> c_int>;
pub type AtkPropertyChangeHandler = Option<unsafe extern "C" fn(*mut AtkObject, *mut AtkPropertyValues)>;

// Records
#[repr(C)]
pub struct AtkActionIface {
pub parent: gobject::GTypeInterface,
Expand Down Expand Up @@ -1007,36 +1010,90 @@ pub struct AtkWindowIface {
pub parent: gobject::GTypeInterface,
}


// Classes
#[repr(C)]
pub struct AtkGObjectAccessible(c_void);
pub struct AtkGObjectAccessible {
pub parent: AtkObject,
}

#[repr(C)]
pub struct AtkHyperlink(c_void);
pub struct AtkHyperlink {
pub parent: gobject::GObject,
}

#[repr(C)]
pub struct AtkMisc(c_void);
pub struct AtkMisc {
pub parent: gobject::GObject,
}

#[repr(C)]
pub struct AtkNoOpObject(c_void);
pub struct AtkNoOpObject {
pub parent: AtkObject,
}

#[repr(C)]
pub struct AtkNoOpObjectFactory(c_void);
pub struct AtkNoOpObjectFactory {
pub parent: AtkObjectFactory,
}

#[repr(C)]
pub struct AtkObject(c_void);
pub struct AtkObject {
pub parent: gobject::GObject,
pub description: *mut c_char,
pub name: *mut c_char,
pub accessible_parent: *mut AtkObject,
pub role: AtkRole,
pub relation_set: *mut AtkRelationSet,
pub layer: AtkLayer,
}

#[repr(C)]
pub struct AtkObjectFactory(c_void);
pub struct AtkObjectFactory {
pub parent: gobject::GObject,
}

#[repr(C)]
pub struct AtkPlug(c_void);
pub struct AtkPlug {
pub parent: AtkObject,
}

#[repr(C)]
pub struct AtkRegistry(c_void);
pub struct AtkRegistry {
pub parent: gobject::GObject,
pub factory_type_registry: *mut glib::GHashTable,
pub factory_singleton_cache: *mut glib::GHashTable,
}

#[repr(C)]
pub struct AtkRelation(c_void);
pub struct AtkRelation {
pub parent: gobject::GObject,
pub target: *mut glib::GPtrArray,
pub relationship: AtkRelationType,
}

#[repr(C)]
pub struct AtkRelationSet(c_void);
pub struct AtkRelationSet {
pub parent: gobject::GObject,
pub relations: *mut glib::GPtrArray,
}

#[repr(C)]
pub struct AtkSocket(c_void);
pub struct AtkSocket {
pub parent: AtkObject,
embedded_plug_id: *mut c_char,
}

#[repr(C)]
pub struct AtkStateSet(c_void);
pub struct AtkStateSet {
pub parent: gobject::GObject,
}

#[repr(C)]
pub struct AtkUtil(c_void);
pub struct AtkUtil {
pub parent: gobject::GObject,
}

// Interfaces
#[repr(C)]
pub struct AtkAction(c_void);
#[repr(C)]
Expand Down
24 changes: 16 additions & 8 deletions gdk-pixbuf-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (5e8c56e) from gir-files (71d73f0)
// This file was generated by gir (41b8c21) from gir-files (71d73f0)
// DO NOT EDIT

#![allow(non_camel_case_types, non_upper_case_globals)]
Expand All @@ -17,7 +17,7 @@ use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};


// Enums
pub type Colorspace = c_int;
pub const GDK_COLORSPACE_RGB: Colorspace = 0;
pub type GdkColorspace = Colorspace;
Expand Down Expand Up @@ -76,7 +76,7 @@ pub const GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE: GdkPixbufRotation = GdkPixbufRotat
pub const GDK_PIXBUF_ROTATE_UPSIDEDOWN: GdkPixbufRotation = GdkPixbufRotation::Upsidedown;
pub const GDK_PIXBUF_ROTATE_CLOCKWISE: GdkPixbufRotation = GdkPixbufRotation::Clockwise;


// Constants
pub const GDK_PIXBUF_FEATURES_H: i32 = 1;
pub const GDK_PIXBUF_MAGIC_NUMBER: i32 = 1197763408;
pub const GDK_PIXBUF_MAJOR: i32 = 2;
Expand All @@ -85,6 +85,7 @@ pub const GDK_PIXBUF_MINOR: i32 = 36;
pub const GDK_PIXBUF_VERSION: &'static str = r##"2.36.0"##;
pub const GDK_PIXDATA_HEADER_LENGTH: i32 = 24;

// Flags
bitflags! {
#[repr(C)]
flags GdkPixdataDumpType: c_uint {
Expand Down Expand Up @@ -113,11 +114,11 @@ bitflags! {
}
}



// Callbacks
pub type GdkPixbufDestroyNotify = Option<unsafe extern "C" fn(*mut u8, gpointer)>;
pub type GdkPixbufSaveFunc = Option<unsafe extern "C" fn(*mut u8, size_t, *mut *mut glib::GError, gpointer) -> gboolean>;

// Records
#[repr(C)]
pub struct GdkPixbufFormat(c_void);

Expand All @@ -144,21 +145,28 @@ pub struct GdkPixdata {
pub pixel_data: *mut u8,
}


// Classes
#[repr(C)]
pub struct GdkPixbuf(c_void);

#[repr(C)]
pub struct GdkPixbufAnimation(c_void);

#[repr(C)]
pub struct GdkPixbufAnimationIter(c_void);

#[repr(C)]
pub struct GdkPixbufLoader(c_void);
pub struct GdkPixbufLoader {
pub parent_instance: gobject::GObject,
priv_: gpointer,
}

#[repr(C)]
pub struct GdkPixbufSimpleAnim(c_void);

#[repr(C)]
pub struct GdkPixbufSimpleAnimIter(c_void);


extern "C" {

//=========================================================================
Expand Down
34 changes: 29 additions & 5 deletions gdk-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (5e8c56e) from gir-files (71d73f0)
// This file was generated by gir (41b8c21) from gir-files (71d73f0)
// DO NOT EDIT

#![allow(non_camel_case_types, non_upper_case_globals)]
Expand All @@ -20,9 +20,11 @@ use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};

// Aliases
pub type GdkAtom = *mut GdkAtom_;
pub type GdkXEvent = gpointer;

// Enums
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum GdkAxisUse {
Expand Down Expand Up @@ -795,7 +797,7 @@ pub enum GdkWindowWindowClass {
pub const GDK_INPUT_OUTPUT: GdkWindowWindowClass = GdkWindowWindowClass::InputOutput;
pub const GDK_INPUT_ONLY: GdkWindowWindowClass = GdkWindowWindowClass::InputOnly;


// Constants
pub const GDK_BUTTON_MIDDLE: i32 = 2;
pub const GDK_BUTTON_PRIMARY: i32 = 1;
pub const GDK_BUTTON_SECONDARY: i32 = 3;
Expand Down Expand Up @@ -3076,6 +3078,7 @@ pub const GDK_MAX_TIMECOORD_AXES: i32 = 128;
pub const GDK_PARENT_RELATIVE: i32 = 1;
pub const GDK_PRIORITY_REDRAW: i32 = 20;

// Flags
bitflags! {
#[repr(C)]
flags GdkAnchorHints: c_uint {
Expand Down Expand Up @@ -3284,15 +3287,17 @@ bitflags! {
}
}


// Unions
pub type GdkEvent = c_void; // union

// Callbacks
pub type GdkEventFunc = Option<unsafe extern "C" fn(*mut GdkEvent, gpointer)>;
pub type GdkFilterFunc = Option<unsafe extern "C" fn(*mut GdkXEvent, *mut GdkEvent, gpointer) -> GdkFilterReturn>;
pub type GdkSeatGrabPrepareFunc = Option<unsafe extern "C" fn(*mut GdkSeat, *mut GdkWindow, gpointer)>;
pub type GdkWindowChildFunc = Option<unsafe extern "C" fn(*mut GdkWindow, gpointer) -> gboolean>;
pub type GdkWindowInvalidateHandlerFunc = Option<unsafe extern "C" fn(*mut GdkWindow, *mut cairo::cairo_region_t)>;

// Records
#[repr(C)]
pub struct GdkAtom_(c_void);

Expand Down Expand Up @@ -3709,42 +3714,61 @@ pub struct GdkWindowClass {
#[repr(C)]
pub struct GdkWindowRedirect(c_void);


// Classes
#[repr(C)]
pub struct GdkAppLaunchContext(c_void);

#[repr(C)]
pub struct GdkCursor(c_void);

#[repr(C)]
pub struct GdkDevice(c_void);

#[repr(C)]
pub struct GdkDeviceManager(c_void);

#[repr(C)]
pub struct GdkDeviceTool(c_void);

#[repr(C)]
pub struct GdkDisplay(c_void);

#[repr(C)]
pub struct GdkDisplayManager(c_void);

#[repr(C)]
pub struct GdkDragContext(c_void);

#[repr(C)]
pub struct GdkDrawingContext(c_void);

#[repr(C)]
pub struct GdkFrameClock(c_void);

#[repr(C)]
pub struct GdkGLContext(c_void);

#[repr(C)]
pub struct GdkKeymap(c_void);

#[repr(C)]
pub struct GdkMonitor(c_void);

#[repr(C)]
pub struct GdkScreen(c_void);

#[repr(C)]
pub struct GdkSeat(c_void);
pub struct GdkSeat {
pub parent_instance: gobject::GObject,
}

#[repr(C)]
pub struct GdkVisual(c_void);

#[repr(C)]
pub struct GdkWindow(c_void);

// Interfaces
#[repr(C)]
pub struct GdkDevicePad(c_void);

Expand Down
Loading