Classes | Typedefs | Functions
gen/button_friend_gen.h File Reference
#include "button_gen.h"

Go to the source code of this file.


struct  button_st_
struct  button_vtable_st_


typedef struct button_private_st_button_private_handle
typedef struct button_st_ button_st
typedef void(* button_paint_fn )(button_handle button_h)
typedef void(* button_delete_fn )(button_handle button_h)
typedef struct button_vtable_st_ button_vtable_st


bool button_set_vtable (button_handle button_h, button_vtable_st *vtable)
void button_friend_delete (button_handle button_h)
bool button_init (button_handle button_h)

Detailed Description

Matt Miller <>


This program 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. This program 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 this program. If not, see <>.


This is the friend interface for the button class. It should only be included by implementors of the button interface.

Definition in file button_friend_gen.h.

Typedef Documentation

typedef void(* button_delete_fn)(button_handle button_h)

Virtual function declaration.

Definition at line 49 of file button_friend_gen.h.

typedef void(* button_paint_fn)(button_handle button_h)

Virtual function declaration.

Definition at line 43 of file button_friend_gen.h.

Opaque pointer to reference private data for the class

Definition at line 31 of file button_friend_gen.h.

typedef struct button_st_ button_st

Friend accessible data for this class

The virtual table to be specified by friend classes.

See also:

Function Documentation

void button_friend_delete ( button_handle  button_h)

Allow a friend class to delete the button object. It is assumed that the friend class is managing the memory for the button object and, thus, the object will not be freed. However, members within the button object may be freed. This does not call the virtual function table version of delete, but rather the delete specifically for type button.

button_hThe object. If NULL, then this function is a no-op.
See also:

Definition at line 75 of file button_gen.c.

bool button_init ( button_handle  button_h)

Allows a friend class to initialize their inner button object. Must be called before the button object is used. If an error is returned, any clean-up was handled internally and there is no need to call a delete function.

button_hThe object
TRUE on success, FALSE otherwise
See also:

Definition at line 200 of file button_gen.c.

bool button_set_vtable ( button_handle  button_h,
button_vtable_st vtable 

This is a function used by implementing classes to set the virtual table according with their methods.

button_hThe object
vtableThe virtual table specification for the implementing class. If any function pointer is NULL, an error is returned.
TRUE on success, FALSE otherwise

Definition at line 169 of file button_gen.c.

 All Classes Files Functions Variables Typedefs