~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/libcroco/cr-additional-sel.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
 
2
 
 
3
/*
 
4
 * This file is part of The Croco Library
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of version 2.1 of the GNU Lesser General Public
 
8
 * License as published by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 
18
 * USA
 
19
 *
 
20
 * Author: Dodji Seketeli
 
21
 * See the COPYRIGHTS file for copyright information.
 
22
 */
 
23
 
 
24
 
 
25
/**
 
26
 *@file
 
27
 *This file holds the declaration of the
 
28
 *#CRAddSel class. 
 
29
 */
 
30
#ifndef __CR_ADD_SEL_H__
 
31
#define __CR_ADD_SEL_H__
 
32
 
 
33
#include <stdio.h>
 
34
#include <glib.h>
 
35
#include "cr-utils.h"
 
36
#include "cr-attr-sel.h"
 
37
#include "cr-pseudo.h"
 
38
#include "cr-additional-sel.h"
 
39
 
 
40
G_BEGIN_DECLS
 
41
 
 
42
enum AddSelectorType
 
43
{
 
44
        NO_ADD_SELECTOR = 0 ,
 
45
        CLASS_ADD_SELECTOR = 1 ,
 
46
        PSEUDO_CLASS_ADD_SELECTOR = 1 << 1,
 
47
        ID_ADD_SELECTOR = 1 << 3,
 
48
        ATTRIBUTE_ADD_SELECTOR = 1 << 4
 
49
} ;
 
50
 
 
51
union CRAdditionalSelectorContent
 
52
{
 
53
        CRString *class_name ;
 
54
        CRString *id_name ;
 
55
        CRPseudo *pseudo ;
 
56
        CRAttrSel *attr_sel ;
 
57
} ;
 
58
 
 
59
typedef struct _CRAdditionalSel CRAdditionalSel ;
 
60
 
 
61
/**
 
62
 *#CRAdditionalSel abstracts
 
63
 *an additionnal selector.
 
64
 *An additional selector is the selector part
 
65
 *that comes after the combination of type selectors.
 
66
 *It can be either "a class selector (the .class part),
 
67
 *a pseudo class selector, an attribute selector 
 
68
 *or an id selector.
 
69
 */
 
70
struct _CRAdditionalSel
 
71
{
 
72
        enum AddSelectorType type ;
 
73
        union CRAdditionalSelectorContent content ;
 
74
 
 
75
        CRAdditionalSel * next ;
 
76
        CRAdditionalSel * prev ;
 
77
        CRParsingLocation location ;
 
78
} ;
 
79
 
 
80
CRAdditionalSel * cr_additional_sel_new (void) ;
 
81
 
 
82
CRAdditionalSel * cr_additional_sel_new_with_type  (enum AddSelectorType a_sel_type) ;
 
83
 
 
84
CRAdditionalSel * cr_additional_sel_append (CRAdditionalSel *a_this, 
 
85
                                            CRAdditionalSel *a_sel) ;
 
86
 
 
87
void cr_additional_sel_set_class_name (CRAdditionalSel *a_this,
 
88
                                       CRString *a_class_name) ;
 
89
 
 
90
void cr_additional_sel_set_id_name (CRAdditionalSel *a_this,
 
91
                                    CRString *a_id) ;
 
92
 
 
93
void cr_additional_sel_set_pseudo (CRAdditionalSel *a_this,
 
94
                                   CRPseudo *a_pseudo) ;
 
95
 
 
96
void cr_additional_sel_set_attr_sel (CRAdditionalSel *a_this,
 
97
                                     CRAttrSel *a_sel) ;
 
98
 
 
99
CRAdditionalSel * cr_additional_sel_prepend (CRAdditionalSel *a_this, 
 
100
                                             CRAdditionalSel *a_sel) ;
 
101
 
 
102
guchar * cr_additional_sel_to_string (CRAdditionalSel *a_this) ;
 
103
 
 
104
guchar * cr_additional_sel_one_to_string (CRAdditionalSel *a_this) ;
 
105
 
 
106
void cr_additional_sel_dump (CRAdditionalSel *a_this, FILE *a_fp) ;
 
107
 
 
108
void cr_additional_sel_destroy (CRAdditionalSel *a_this) ;
 
109
 
 
110
G_END_DECLS
 
111
 
 
112
#endif /*__CR_ADD_SEL_H*/