Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bare functions are not generated #25

Open
valpackett opened this issue Jul 8, 2019 · 1 comment
Open

Bare functions are not generated #25

valpackett opened this issue Jul 8, 2019 · 1 comment

Comments

@valpackett
Copy link

Looks like <function>s directly in a <namespace> are ignored right now..

GIR file example
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations.  -->
<repository version="1.2"
            xmlns="http://www.gtk.org/introspection/core/1.0"
            xmlns:c="http://www.gtk.org/introspection/c/1.0"
            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  <include name="Gtk" version="3.0"/>
  <package name="gtk-layer-shell"/>
  <c:include name="gtk-layer-shell/gtk-layer-shell.h"/>
  <namespace name="GtkLayerShell"
             version="0.1"
             shared-library="libgtk-layer-shell.so"
             c:identifier-prefixes="GtkLayerShell"
             c:symbol-prefixes="gtk_layer">
    <enumeration name="Edge" c:type="GtkLayerShellEdge">
      <source-position filename="../include/gtk-layer-shell.h" line="22"/>
      <member name="left" value="0" c:identifier="GTK_LAYER_SHELL_EDGE_LEFT">
      </member>
      <member name="right" value="1" c:identifier="GTK_LAYER_SHELL_EDGE_RIGHT">
      </member>
      <member name="top" value="2" c:identifier="GTK_LAYER_SHELL_EDGE_TOP">
      </member>
      <member name="bottom"
              value="3"
              c:identifier="GTK_LAYER_SHELL_EDGE_BOTTOM">
      </member>
      <member name="entry_number"
              value="4"
              c:identifier="GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER">
      </member>
    </enumeration>
    <enumeration name="Layer" c:type="GtkLayerShellLayer">
      <source-position filename="../include/gtk-layer-shell.h" line="14"/>
      <member name="background"
              value="0"
              c:identifier="GTK_LAYER_SHELL_LAYER_BACKGROUND">
      </member>
      <member name="bottom"
              value="1"
              c:identifier="GTK_LAYER_SHELL_LAYER_BOTTOM">
      </member>
      <member name="top" value="2" c:identifier="GTK_LAYER_SHELL_LAYER_TOP">
      </member>
      <member name="overlay"
              value="3"
              c:identifier="GTK_LAYER_SHELL_LAYER_OVERLAY">
      </member>
      <member name="entry_number"
              value="4"
              c:identifier="GTK_LAYER_SHELL_LAYER_ENTRY_NUMBER">
      </member>
    </enumeration>
    <function name="auto_exclusive_zone_enable"
              c:identifier="gtk_layer_auto_exclusive_zone_enable">
      <source-position filename="../include/gtk-layer-shell.h" line="61"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
      </parameters>
    </function>
    <function name="init_for_window" c:identifier="gtk_layer_init_for_window">
      <source-position filename="../include/gtk-layer-shell.h" line="27"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
      </parameters>
    </function>
    <function name="set_anchor" c:identifier="gtk_layer_set_anchor">
      <source-position filename="../include/gtk-layer-shell.h" line="50"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
        <parameter name="edge" transfer-ownership="none">
          <type name="Edge" c:type="GtkLayerShellEdge"/>
        </parameter>
        <parameter name="anchor_to_edge" transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </parameter>
      </parameters>
    </function>
    <function name="set_exclusive_zone"
              c:identifier="gtk_layer_set_exclusive_zone">
      <source-position filename="../include/gtk-layer-shell.h" line="60"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
        <parameter name="exclusive_zone" transfer-ownership="none">
          <type name="gint" c:type="int"/>
        </parameter>
      </parameters>
    </function>
    <function name="set_keyboard_interactivity"
              c:identifier="gtk_layer_set_keyboard_interactivity">
      <source-position filename="../include/gtk-layer-shell.h" line="65"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
        <parameter name="interacitvity" transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </parameter>
      </parameters>
    </function>
    <function name="set_layer" c:identifier="gtk_layer_set_layer">
      <source-position filename="../include/gtk-layer-shell.h" line="39"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
        <parameter name="layer" transfer-ownership="none">
          <type name="Layer" c:type="GtkLayerShellLayer"/>
        </parameter>
      </parameters>
    </function>
    <function name="set_margin" c:identifier="gtk_layer_set_margin">
      <source-position filename="../include/gtk-layer-shell.h" line="55"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
        <parameter name="edge" transfer-ownership="none">
          <type name="Edge" c:type="GtkLayerShellEdge"/>
        </parameter>
        <parameter name="margin_size" transfer-ownership="none">
          <type name="gint" c:type="int"/>
        </parameter>
      </parameters>
    </function>
    <function name="set_monitor" c:identifier="gtk_layer_set_monitor">
      <source-position filename="../include/gtk-layer-shell.h" line="44"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
        <parameter name="monitor" transfer-ownership="none">
          <type name="Gdk.Monitor" c:type="GdkMonitor*"/>
        </parameter>
      </parameters>
    </function>
    <function name="set_namespace" c:identifier="gtk_layer_set_namespace">
      <source-position filename="../include/gtk-layer-shell.h" line="34"/>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="window" transfer-ownership="none">
          <type name="Gtk.Window" c:type="GtkWindow*"/>
        </parameter>
        <parameter name="name_space" transfer-ownership="none">
          <type name="utf8" c:type="const char*"/>
        </parameter>
      </parameters>
    </function>
  </namespace>
</repository>
@MikeWey
Copy link
Member

MikeWey commented Jul 9, 2019

That is indeed the case.

They could probably go in a file named after the package like: gtk/Gtk.d for the gtk functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants