X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fgtkutil%2Fmenu.h;h=9b040450c8c5a582c49685d165be16efb4d31bc3;hb=e2900e168ea677efd1cdfac7fc91fb1fc071a269;hp=a394d82358bfe6d5b8d473ee75de013d2f64b635;hpb=6ee91d153ea09f2dafa62ed2f022f4183c090168;p=xonotic%2Fnetradiant.git diff --git a/libs/gtkutil/menu.h b/libs/gtkutil/menu.h index a394d823..9b040450 100644 --- a/libs/gtkutil/menu.h +++ b/libs/gtkutil/menu.h @@ -1,58 +1,51 @@ /* -Copyright (C) 2001-2006, William Joseph. -All Rights Reserved. + Copyright (C) 2001-2006, William Joseph. + All Rights Reserved. -This file is part of GtkRadiant. + This file is part of GtkRadiant. -GtkRadiant is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + GtkRadiant is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -GtkRadiant is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + GtkRadiant is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with GtkRadiant; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + You should have received a copy of the GNU General Public License + along with GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ -#if !defined(INCLUDED_GTKUTIL_MENU_H) +#if !defined( INCLUDED_GTKUTIL_MENU_H ) #define INCLUDED_GTKUTIL_MENU_H +#include #include "generic/callbackfwd.h" typedef int gint; typedef gint gboolean; typedef struct _GSList GSList; -typedef struct _GtkMenu GtkMenu; -typedef struct _GtkMenuBar GtkMenuBar; -typedef struct _GtkMenuItem GtkMenuItem; -typedef struct _GtkCheckMenuItem GtkCheckMenuItem; -typedef struct _GtkRadioMenuItem GtkRadioMenuItem; -typedef struct _GtkTearoffMenuItem GtkTearoffMenuItem; - -void menu_add_item(GtkMenu* menu, GtkMenuItem* item); -GtkMenuItem* menu_separator(GtkMenu* menu); -GtkTearoffMenuItem* menu_tearoff(GtkMenu* menu); -GtkMenuItem* new_sub_menu_item_with_mnemonic(const char* mnemonic); -GtkMenu* create_sub_menu_with_mnemonic(GtkMenuBar* bar, const char* mnemonic); -GtkMenu* create_sub_menu_with_mnemonic(GtkMenu* parent, const char* mnemonic); -GtkMenuItem* create_menu_item_with_mnemonic(GtkMenu* menu, const char* mnemonic, const Callback& callback); -GtkCheckMenuItem* create_check_menu_item_with_mnemonic(GtkMenu* menu, const char* mnemonic, const Callback& callback); -GtkRadioMenuItem* create_radio_menu_item_with_mnemonic(GtkMenu* menu, GSList** group, const char* mnemonic, const Callback& callback); + +void menu_add_item( ui::Menu menu, ui::MenuItem item ); +ui::MenuItem menu_separator( ui::Menu menu ); +ui::TearoffMenuItem menu_tearoff( ui::Menu menu ); +ui::MenuItem new_sub_menu_item_with_mnemonic( const char* mnemonic ); +ui::Menu create_sub_menu_with_mnemonic( ui::MenuBar bar, const char* mnemonic ); +ui::Menu create_sub_menu_with_mnemonic( ui::Menu parent, const char* mnemonic ); +ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback& callback ); +ui::CheckMenuItem create_check_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Callback& callback ); +ui::RadioMenuItem create_radio_menu_item_with_mnemonic( ui::Menu menu, GSList** group, const char* mnemonic, const Callback& callback ); class Command; -GtkMenuItem* create_menu_item_with_mnemonic(GtkMenu* menu, const char* mnemonic, const Command& command); +ui::MenuItem create_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Command& command ); class Toggle; -GtkCheckMenuItem* create_check_menu_item_with_mnemonic(GtkMenu* menu, const char* mnemonic, const Toggle& toggle); +ui::CheckMenuItem create_check_menu_item_with_mnemonic( ui::Menu menu, const char* mnemonic, const Toggle& toggle ); -typedef struct _GtkCheckMenuItem GtkCheckMenuItem; -void check_menu_item_set_active_no_signal(GtkCheckMenuItem* item, gboolean active); -typedef struct _GtkRadioMenuItem GtkRadioMenuItem; -void radio_menu_item_set_active_no_signal(GtkRadioMenuItem* item, gboolean active); +void check_menu_item_set_active_no_signal( ui::CheckMenuItem item, gboolean active ); +void radio_menu_item_set_active_no_signal( ui::RadioMenuItem item, gboolean active ); #endif