messenger-gtk

Gtk+3 graphical user interfaces for GNUnet Messenger
Log | Files | Refs | Submodules | README | LICENSE

tag.h (1767B)


      1 /*
      2    This file is part of GNUnet.
      3    Copyright (C) 2024 GNUnet e.V.
      4 
      5    GNUnet is free software: you can redistribute it and/or modify it
      6    under the terms of the GNU Affero General Public License as published
      7    by the Free Software Foundation, either version 3 of the License,
      8    or (at your option) any later version.
      9 
     10    GNUnet is distributed in the hope that it will be useful, but
     11    WITHOUT ANY WARRANTY; without even the implied warranty of
     12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13    Affero General Public License for more details.
     14 
     15    You should have received a copy of the GNU Affero General Public License
     16    along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 
     18    SPDX-License-Identifier: AGPL3.0-or-later
     19  */
     20 /*
     21  * @author Tobias Frisch
     22  * @file ui/tag.h
     23  */
     24 
     25 #ifndef UI_TAG_H_
     26 #define UI_TAG_H_
     27 
     28 #include "messenger.h"
     29 
     30 typedef struct UI_TAG_Handle
     31 {
     32   GtkBuilder *builder;
     33 
     34   GtkLabel *tag_label;
     35 } UI_TAG_Handle;
     36 
     37 /**
     38  * Allocates and creates a new tag handle 
     39  * to manage a tag in a list for a given 
     40  * messenger application.
     41  *
     42  * @param app Messenger application
     43  * @return New tag handle
     44  */
     45 UI_TAG_Handle*
     46 ui_tag_new(MESSENGER_Application *app);
     47 
     48 /**
     49  * Sets the content of the given tag handle 
     50  * respectively to visually represent a
     51  * selected chat tag message.
     52  *
     53  * @param handle Tag handle
     54  * @param app Messenger application
     55  * @param message Chat tag message
     56  */
     57 void
     58 ui_tag_set_message(UI_TAG_Handle* handle,
     59                    MESSENGER_Application *app,
     60                    const struct GNUNET_CHAT_Message *message);
     61 
     62 /**
     63  * Frees its resources and destroys a given
     64  * tag handle.
     65  *
     66  * @param handle Tag handle
     67  */
     68 void
     69 ui_tag_delete(UI_TAG_Handle *handle);
     70 
     71 #endif /* UI_TAG_H_ */