Skip to content

Commit

Permalink
remove get_child from subclasses and added to GtkBin
Browse files Browse the repository at this point in the history
  • Loading branch information
scorninpc committed Feb 11, 2023
1 parent 96f6c04 commit d691d12
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 18 deletions.
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ extern "C"
Php::Class<GtkBin_> gtkbin("GtkBin");
gtkbin.extends(gtkcontainer);
gtkbin.method<&GtkBin_::test3>("test3");
gtkbin.method<&GtkBin_::get_child>("get_child");

Php::Class<GtkViewport_> gtkviewport("GtkViewport");
gtkviewport.extends(gtkbin);
Expand Down Expand Up @@ -1421,7 +1422,7 @@ extern "C"
gtkbutton.method<&GtkButton_::set_always_show_image>("set_always_show_image");
gtkbutton.method<&GtkButton_::get_always_show_image>("get_always_show_image");
gtkbutton.method<&GtkButton_::get_event_window>("get_event_window");
gtkbutton.method<&GtkButton_::get_child>("get_child");


// GtkColorButton
Php::Class<GtkColorButton_> gtkcolorbutton("GtkColorButton");
Expand Down Expand Up @@ -2375,7 +2376,6 @@ extern "C"
gtkalignment.method<&GtkAlignment_::set>("set");
gtkalignment.method<&GtkAlignment_::set_padding>("set_padding");
gtkalignment.method<&GtkAlignment_::get_padding>("get_padding");
gtkalignment.method<&GtkAlignment_::get_child>("get_child");
gtkalignment.method<&GtkAlignment_::__construct>("__construct");

// GtkToolItem
Expand Down
7 changes: 0 additions & 7 deletions src/Gtk/GtkAlignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,4 @@ void GtkAlignment_::__construct(Php::Parameters &parameters)
instance = (gpointer *)gtk_alignment_new(xalign, yalign, xscale, yscale);
}

Php::Value GtkAlignment_::get_child()
{
gpointer* ret = (gpointer*)gtk_bin_get_child(GTK_BIN(instance));

return cobject_to_phpobject(ret);
}


2 changes: 0 additions & 2 deletions src/Gtk/GtkAlignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
Php::Value get_padding();
void __construct(Php::Parameters &parameters);

Php::Value get_child();

};

#endif
7 changes: 7 additions & 0 deletions src/Gtk/GtkBin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ GtkBin_::~GtkBin_() = default;
void GtkBin_::test3()
{
Php::out << "-- GtkBin_::test 1" << std::endl;
}

Php::Value GtkBin_::get_child()
{
gpointer* ret = (gpointer*)gtk_bin_get_child(GTK_BIN(instance));

return cobject_to_phpobject(ret);
}
2 changes: 2 additions & 0 deletions src/Gtk/GtkBin.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
virtual ~GtkBin_();

void test3();

Php::Value get_child();
};

#endif
5 changes: 0 additions & 5 deletions src/Gtk/GtkButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,4 @@ Php::Value GtkButton_::get_event_window()
return 0;
}

Php::Value GtkButton_::get_child()
{
gpointer* ret = (gpointer*)gtk_bin_get_child(GTK_BIN(instance));

return cobject_to_phpobject(ret);
}
2 changes: 0 additions & 2 deletions src/Gtk/GtkButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@
Php::Value get_always_show_image();

Php::Value get_event_window();

Php::Value get_child();
};

#endif

0 comments on commit d691d12

Please sign in to comment.